Changeset 1287 for trunk/psLib/src/astro/psCoord.c
- Timestamp:
- Jul 22, 2004, 5:13:39 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astro/psCoord.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.c
r1285 r1287 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-07-23 0 0:40:36$12 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-07-23 03:13:39 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 21 21 #include "psList.h" 22 22 #include "psCoord.h" 23 #include "psMemory.h" 23 24 24 25 … … 27 28 const psPlane *coords) 28 29 { 29 return(NULL); 30 if (out == NULL) { 31 out = (psPlane *) psAlloc(sizeof(psPlane)); 32 } 33 out->x = transform->x->coeff[0][0] + 34 (transform->x->coeff[1][0] * coords->x) + 35 (transform->x->coeff[0][1] * coords->y); 36 37 out->y = transform->y->coeff[0][0] + 38 (transform->y->coeff[1][0] * coords->x) + 39 (transform->y->coeff[0][1] * coords->y); 40 41 return(out); 30 42 } 31 43 … … 37 49 float term4) 38 50 { 39 return(NULL); 51 if (out == NULL) { 52 out = (psPlane *) psAlloc(sizeof(psPlane)); 53 } 54 55 out->x = transform->x->coeff[0][0][0][0] + 56 (transform->x->coeff[1][0][0][0] * coords->x) + 57 (transform->x->coeff[0][1][0][0] * coords->y) + 58 (transform->x->coeff[0][0][1][0] * term3) + 59 (transform->x->coeff[0][0][0][1] * term4); 60 61 out->y = transform->y->coeff[0][0][0][0] + 62 (transform->y->coeff[1][0][0][0] * coords->x) + 63 (transform->y->coeff[0][1][0][0] * coords->y) + 64 (transform->y->coeff[0][0][1][0] * term3) + 65 (transform->y->coeff[0][0][0][1] * term4); 66 67 return(out); 40 68 } 41 69 42 70 43 71 44 psSphereTransform *psSphereTransform (double NPlon,45 double NPlat;46 double ZP)72 psSphereTransform *psSphereTransformAlloc(double NPlon, 73 double NPlat, 74 double ZP) 47 75 { 48 return(NULL); 76 psSphereTransform *tmp = (psSphereTransform *) psAlloc(sizeof(psSphereTransform)); 77 78 tmp->sinNPlon = sin(NPlon); 79 tmp->cosNPlon = cos(NPlon); 80 tmp->sinNPlat = sin(NPlat); 81 tmp->cosNPlat = cos(NPlat); 82 tmp->sinZP = sin(ZP); 83 tmp->cosZP = cos(ZP); 84 85 return(tmp); 49 86 } 50 87 … … 52 89 void p_psSphereTransformFree(psSphereTransform *trans) 53 90 { 54 return(NULL);91 psFree(trans); 55 92 } 56 93 … … 68 105 psSphereTransform *psSphereTransformICRStoEcliptic(void) 69 106 { 107 // sla_EQECL(); 70 108 return(NULL); 71 109 } … … 73 111 psSphereTransform *psSphereTransformEcliptictoICRS(void) 74 112 { 113 // sla_ECLEQ(); 75 114 return(NULL); 76 115 } … … 78 117 psSphereTransform *psSphereTransformICRStoGalatic(void) 79 118 { 119 // sla_EQGAL(); 80 120 return(NULL); 81 121 } … … 83 123 psSphereTransform *psSphereTransformGalatictoICRS(void) 84 124 { 125 // sla_GALEQL(); 85 126 return(NULL); 86 127 }
Note:
See TracChangeset
for help on using the changeset viewer.
