Changeset 2199
- Timestamp:
- Oct 26, 2004, 11:57:42 AM (22 years ago)
- Location:
- trunk/psLib
- Files:
-
- 5 edited
-
src/astro/psCoord.c (modified) (4 diffs)
-
src/astro/psCoord.h (modified) (6 diffs)
-
src/astronomy/psCoord.c (modified) (4 diffs)
-
src/astronomy/psCoord.h (modified) (6 diffs)
-
test/astronomy/tst_psCoord.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.c
r2197 r2199 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.2 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-10-26 21: 24:42 $12 * @version $Revision: 1.27 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-10-26 21:57:42 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 152 152 } 153 153 154 psSphereTransform* psSphereTransformICRS toEcliptic(psTime time)154 psSphereTransform* psSphereTransformICRSToEcliptic(psTime time) 155 155 { 156 156 struct tm *tmTime = psTimeToTM(&time); … … 165 165 } 166 166 167 psSphereTransform* psSphereTransformEcliptic toICRS(psTime time)167 psSphereTransform* psSphereTransformEclipticToICRS(psTime time) 168 168 { 169 169 struct tm *tmTime = psTimeToTM(&time); … … 178 178 } 179 179 180 psSphereTransform* psSphereTransformICRS toGalatic(void)180 psSphereTransform* psSphereTransformICRSToGalatic(void) 181 181 { 182 182 return (psSphereTransformAlloc(62.6, 282.25, 33.0)); 183 183 } 184 184 185 psSphereTransform* psSphereTransformGalatic toICRS(void)185 psSphereTransform* psSphereTransformGalaticToICRS(void) 186 186 { 187 187 return (psSphereTransformAlloc(-62.6, 33.0, 282.25)); -
trunk/psLib/src/astro/psCoord.h
r2048 r2199 1 2 1 /** @file psCoord.h 3 2 * … … 11 10 * @author George Gusciora, MHPCC 12 11 * 13 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-10- 12 01:34:09$12 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-10-26 21:57:42 $ 15 14 * 16 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 215 214 * @return psSphereTransform* transform for ICRS->Ecliptic coordinate systems 216 215 */ 217 psSphereTransform* psSphereTransformICRS toEcliptic(216 psSphereTransform* psSphereTransformICRSToEcliptic( 218 217 psTime time ///< the time for which the resulting transform will be valid 219 218 ); … … 224 223 * @return psSphereTransform* transform for Ecliptic->ICRS coordinate systems 225 224 */ 226 psSphereTransform* psSphereTransformEcliptic toICRS(225 psSphereTransform* psSphereTransformEclipticToICRS( 227 226 psTime time ///< the time for which the resulting transform will be valid 228 227 ); … … 232 231 * 233 232 */ 234 psSphereTransform* psSphereTransformICRS toGalatic(void);233 psSphereTransform* psSphereTransformICRSToGalatic(void); 235 234 236 235 /** Creates the appropriate transform for converting from Galatic to ICRS … … 238 237 * 239 238 */ 240 psSphereTransform* psSphereTransformGalatic toICRS(void);239 psSphereTransform* psSphereTransformGalaticToICRS(void); 241 240 242 241 /** Projects a spherical coordinate to a linear coordinate system -
trunk/psLib/src/astronomy/psCoord.c
r2197 r2199 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.2 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-10-26 21: 24:42 $12 * @version $Revision: 1.27 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-10-26 21:57:42 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 152 152 } 153 153 154 psSphereTransform* psSphereTransformICRS toEcliptic(psTime time)154 psSphereTransform* psSphereTransformICRSToEcliptic(psTime time) 155 155 { 156 156 struct tm *tmTime = psTimeToTM(&time); … … 165 165 } 166 166 167 psSphereTransform* psSphereTransformEcliptic toICRS(psTime time)167 psSphereTransform* psSphereTransformEclipticToICRS(psTime time) 168 168 { 169 169 struct tm *tmTime = psTimeToTM(&time); … … 178 178 } 179 179 180 psSphereTransform* psSphereTransformICRS toGalatic(void)180 psSphereTransform* psSphereTransformICRSToGalatic(void) 181 181 { 182 182 return (psSphereTransformAlloc(62.6, 282.25, 33.0)); 183 183 } 184 184 185 psSphereTransform* psSphereTransformGalatic toICRS(void)185 psSphereTransform* psSphereTransformGalaticToICRS(void) 186 186 { 187 187 return (psSphereTransformAlloc(-62.6, 33.0, 282.25)); -
trunk/psLib/src/astronomy/psCoord.h
r2048 r2199 1 2 1 /** @file psCoord.h 3 2 * … … 11 10 * @author George Gusciora, MHPCC 12 11 * 13 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-10- 12 01:34:09$12 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-10-26 21:57:42 $ 15 14 * 16 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 215 214 * @return psSphereTransform* transform for ICRS->Ecliptic coordinate systems 216 215 */ 217 psSphereTransform* psSphereTransformICRS toEcliptic(216 psSphereTransform* psSphereTransformICRSToEcliptic( 218 217 psTime time ///< the time for which the resulting transform will be valid 219 218 ); … … 224 223 * @return psSphereTransform* transform for Ecliptic->ICRS coordinate systems 225 224 */ 226 psSphereTransform* psSphereTransformEcliptic toICRS(225 psSphereTransform* psSphereTransformEclipticToICRS( 227 226 psTime time ///< the time for which the resulting transform will be valid 228 227 ); … … 232 231 * 233 232 */ 234 psSphereTransform* psSphereTransformICRS toGalatic(void);233 psSphereTransform* psSphereTransformICRSToGalatic(void); 235 234 236 235 /** Creates the appropriate transform for converting from Galatic to ICRS … … 238 237 * 239 238 */ 240 psSphereTransform* psSphereTransformGalatic toICRS(void);239 psSphereTransform* psSphereTransformGalaticToICRS(void); 241 240 242 241 /** Projects a spherical coordinate to a linear coordinate system -
trunk/psLib/test/astronomy/tst_psCoord.c
r2108 r2199 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-10- 14 01:53:44$8 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-10-26 21:57:32 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 33 33 {test3, 0000, "psPlaneDistortApply()", 0, false}, 34 34 {test4, 0000, "psPSphereTransformApply()", 0, false}, 35 {test5, 0000, "psSphereTransformICRS toEcliptic()", 0, false},36 {test6, 0000, "psSphereTransformEcliptic toICRS()", 0, false},37 {test7, 0000, "psSphereTransformICRS toGalatic()", 0, false},38 {test8, 0000, "psSphereTransformGalatic toICRS()", 0, false},35 {test5, 0000, "psSphereTransformICRSToEcliptic()", 0, false}, 36 {test6, 0000, "psSphereTransformEclipticToICRS()", 0, false}, 37 {test7, 0000, "psSphereTransformICRSToGalatic()", 0, false}, 38 {test8, 0000, "psSphereTransformGalaticToICRS()", 0, false}, 39 39 {test20, 0000, "psProject()", 0, false}, 40 40 {test21, 0000, "psDeProject()", 0, false}, … … 76 76 float y) 77 77 { 78 if (y!= 0.0) { 79 return(atan(y/x)); 80 } else { 81 return(0.5 * M_PI); 82 } 83 return (0.0); 78 return((float) atan2((double) x, (double) y)); 84 79 } 85 80 … … 251 246 double T = year / 100.0; 252 247 double phi = -23.452294 + 0.013013 * T + 0.000001639 * T * T - 0.000000503 * T * T * T; 253 psSphereTransform *myST = psSphereTransformICRS toEcliptic(*now);248 psSphereTransform *myST = psSphereTransformICRSToEcliptic(*now); 254 249 255 250 if (FLT_EPSILON < fabs(sin(phi) - myST->sinPhi)) { … … 290 285 double T = year / 100.0; 291 286 double phi = +23.452294 - 0.013013 * T - 0.000001639 * T * T + 0.000000503 * T * T * T; 292 psSphereTransform *myST = psSphereTransformEcliptic toICRS(*now);287 psSphereTransform *myST = psSphereTransformEclipticToICRS(*now); 293 288 294 289 if (FLT_EPSILON < fabs(sin(phi) - myST->sinPhi)) { … … 326 321 double Xo = 282.25; 327 322 double xo = 33.0; 328 psSphereTransform *myST = psSphereTransformICRS toGalatic();323 psSphereTransform *myST = psSphereTransformICRSToGalatic(); 329 324 330 325 if (FLT_EPSILON < fabs(sin(phi) - myST->sinPhi)) { … … 359 354 double Xo = 33.0; 360 355 double xo = 282.25; 361 psSphereTransform *myST = psSphereTransformGalatic toICRS();356 psSphereTransform *myST = psSphereTransformGalaticToICRS(); 362 357 363 358 if (FLT_EPSILON < fabs(sin(phi) - myST->sinPhi)) {
Note:
See TracChangeset
for help on using the changeset viewer.
