Changeset 3095 for trunk/psLib/src/astronomy/psCoord.c
- Timestamp:
- Jan 26, 2005, 10:24:17 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astronomy/psCoord.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astronomy/psCoord.c
r3000 r3095 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.4 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-01- 14 23:27:55$12 * @version $Revision: 1.47 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-01-26 20:24:16 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 59 59 /* FUNCTION IMPLEMENTATION - PUBLIC */ 60 60 /*****************************************************************************/ 61 static void planeFree(psPlane *p) 62 { 63 psFree(p); 64 } 65 66 // XXX: Must test psPlaneAlloc() and planeFree(). 67 // XXX: Must rewrite code and tests to use these functions. 68 psPlane* psPlaneAlloc(void) 69 { 70 psPlane *p = psAlloc(sizeof(psPlane)); 71 72 p_psMemSetDeallocator(p, (psFreeFcn) planeFree); 73 return(p); 74 } 75 76 77 static void sphereFree(psSphere *s) 78 { 79 psFree(s); 80 } 81 82 // XXX: Must test psSphereAlloc() and sphereFree(). 83 // XXX: Must rewrite code and tests to use these functions. 84 psSphere* psSphereAlloc(void) 85 { 86 psSphere *s = psAlloc(sizeof(psSphere)); 87 88 p_psMemSetDeallocator(s, (psFreeFcn) sphereFree); 89 return(s); 90 } 91 61 92 static void planeTransformFree(psPlaneTransform *pt) 62 93 { … … 159 190 } 160 191 192 // XXX: Must code this. 193 psPlaneTransform *psPlaneTransformInvert( 194 psPlaneTransform *out, 195 const psPlaneTransform *in, 196 psRegion *region, 197 int nSamples) 198 { 199 PS_PTR_CHECK_NULL(in, NULL); 200 PS_PTR_CHECK_NULL(region, NULL); 201 202 return(NULL); 203 } 204 205 206 // XXX: Must code this. 207 psPlaneTransform *psPlaneTransformCombine( 208 psPlaneTransform *out, 209 const psPlaneTransform *trans1, 210 const psPlaneTransform *trans2) 211 { 212 PS_PTR_CHECK_NULL(trans1, NULL); 213 PS_PTR_CHECK_NULL(trans2, NULL); 214 215 return(NULL); 216 } 217 218 219 // XXX: Must code this. 220 bool psPlaneTranformFit( 221 psPlaneTransform *trans, 222 const psArray *source, 223 const psArray *dest, 224 int nRejIter, 225 float sigmaClip) 226 { 227 PS_PTR_CHECK_NULL(trans, NULL); 228 PS_PTR_CHECK_NULL(source, NULL); 229 PS_PTR_CHECK_NULL(dest, NULL); 230 231 return(NULL); 232 } 233 234 161 235 /****************************************************************************** 162 236 alpha is LONGITUDE … … 299 373 } 300 374 375 void projectionFree(psProjection *p) 376 { 377 psFree(p); 378 } 379 380 // XXX: Must test psProjectionAlloc() and projectionFree(). 381 // XXX: Must rewrite code and tests to use these functions. 382 psProjection* psProjectionAlloc( 383 psF64 R, 384 psF64 D, 385 psF64 Xs, 386 psF64 Ys, 387 psProjectionType type) 388 { 389 psProjection *p = psAlloc(sizeof(psProjection)); 390 p->D = D; 391 p->R = R; 392 p->Xs = Xs; 393 p->Ys = Ys; 394 p->type = type; 395 396 p_psMemSetDeallocator(p, (psFreeFcn) planeFree); 397 return(p); 398 } 399 400 301 401 /****************************************************************************** 302 402 XXX: Waiting for the definition of the PS_PROJ_PAR projection. … … 323 423 psF32 cosThetaSinPhi; 324 424 325 sinTheta = (sin(coord->d) * sin(projection->D)) +326 (cos(coord->d) * cos(projection->D) * (cos(coord->r - projection->R)));327 cosThetaCosPhi = (sin(coord->d) * cos(projection->D)) -328 (cos(coord->d) * sin(projection->D) * (cos(coord->r - projection->R)));329 cosThetaSinPhi = - cos(coord->d) * sin(coord->r - projection->R);425 sinTheta = (sin(coord->d) * sin(projection->D)) + 426 (cos(coord->d) * cos(projection->D) * (cos(coord->r - projection->R))); 427 cosThetaCosPhi = (sin(coord->d) * cos(projection->D)) - 428 (cos(coord->d) * sin(projection->D) * (cos(coord->r - projection->R))); 429 cosThetaSinPhi = - cos(coord->d) * sin(coord->r - projection->R); 330 430 331 431 tmp->x = -cosThetaSinPhi / sinTheta;
Note:
See TracChangeset
for help on using the changeset viewer.
