Changeset 5437 for trunk/psLib/test/astro/tst_psSphereOps.c
- Timestamp:
- Oct 20, 2005, 4:14:02 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/astro/tst_psSphereOps.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astro/tst_psSphereOps.c
r5368 r5437 6 6 * @author d-Rob, MHPCC 7 7 * 8 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-10- 18 22:14:47$8 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-10-21 02:14:02 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 19 19 static psS32 testSphereRotApplyCelestial(void); 20 20 static psS32 testSphereRotPrecess(void); 21 static psS32 testSphereToFromCube(void); 22 static psS32 testSphereOffset(void); 21 23 22 24 testDescription tests[] = { … … 26 28 {testSphereRotApplyCelestial, 822, "psSphereRotApplyCel()", 0, false}, 27 29 {testSphereRotPrecess, 823, "psSphereRotPrecess()", 0, false}, 30 {testSphereToFromCube, 824, "testSphereToFromCube()", 0, false}, 31 {testSphereOffset, 825, "testSphereOffset()", 0, false}, 28 32 {NULL} 29 33 }; … … 147 151 psSphere *temp = NULL; 148 152 psSphere *rc = NULL; 153 psSphere *temp2 = psSphereAlloc(); 149 154 // psSphereRot *myST = psSphereRotAlloc(0.0, 0.0, 0.0); 150 155 psSphereRot *myST = psSphereRotAlloc(ALPHA_P, DELTA_P, PHI_P); 156 psSphereRot *yourST = psSphereRotInvert(ALPHA_P, DELTA_P, PHI_P); 151 157 152 158 for (float r=0.0;r<180.0;r+=DEG_INC) { … … 157 163 in->dErr = 0.0; 158 164 159 if(psSphereRotApply(out, myST, in) != out) { 160 psError(PS_ERR_UNKNOWN,true,"Did not return output pointer."); 161 return 1; 162 } 163 psSphereRotInvert(myST); 164 psSphereRotApply(out, myST, out); 165 temp2 = psSphereRotApply(temp2, myST, in); 166 out = psSphereRotApply(out, yourST, temp2); 165 167 166 168 if (ERROR_TOL < fabs(out->r - in->r)) { … … 199 201 200 202 psFree(myST); 203 psFree(yourST); 204 psFree(temp2); 201 205 psFree(out); 202 206 psFree(in); … … 209 213 psS32 testSphereRotApplyCelestial( void) 210 214 { 211 212 215 int numTestPoints = 3; 213 216 // ICRS coordinates … … 220 223 double l[] = { 96.337272, 122.93192, 195.639488}; 221 224 double b[] = {-60.188553, 27.12825, 78.353806}; 222 223 225 double t[] = { MJD_2000, MJD_2000, MJD_2100}; 224 225 226 double TOLERANCE = 0.001; 226 227 228 227 229 228 for (int x = 0; x < numTestPoints; x++) { … … 286 285 // return 4; 287 286 } 288 289 287 psFree(galactic); 290 288 psFree(icrsFromGalactic); … … 294 292 psFree(toGalactic); 295 293 psFree(fromGalactic); 296 297 } 298 294 } 299 295 return 0; 300 296 } … … 432 428 return 0; 433 429 } 430 431 psS32 testSphereToFromCube(void) 432 { 433 return 0; 434 } 435 436 psS32 testSphereOffset(void) 437 { 438 return 0; 439 } 440
Note:
See TracChangeset
for help on using the changeset viewer.
