Changeset 5533 for trunk/psLib/test/astro/tst_psEarthOrientation.c
- Timestamp:
- Nov 16, 2005, 5:59:05 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/astro/tst_psEarthOrientation.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astro/tst_psEarthOrientation.c
r5524 r5533 5 5 * @author d-Rob, MHPCC 6 6 * 7 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-11-1 6 20:52:23$7 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-11-17 03:59:05 $ 9 9 * 10 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 14 14 #include "pslib_strict.h" 15 15 16 //static psS32 testEOCParallax(void);17 static psS32 testEOCInit_Final(void);18 16 static psS32 testAberration(void); 19 17 static psS32 testGravityDeflect(void); … … 26 24 27 25 testDescription tests[] = { 28 {testEOCInit_Final, 665, "psEOCInit_Final", 0, false},29 26 {testAberration, 666, "psAberration()", 0, false}, 30 27 {testGravityDeflect, 667, "psGravityDeflect()", 0, false}, 31 // {testEOCParallax, 668, "psEOCParallax()", 0, false},32 28 {testEOCPrecession, 669, "psEOCPrecession()", 0, false}, 33 29 {testEOCPolar, 670, "psEOCPolar()", 0, false}, … … 56 52 57 53 // return ( ! runTestSuite( stderr, "psEarthOrientation", tests, argc, argv ) ); 58 }59 60 psS32 testEOCInit_Final(void)61 {62 return 0;63 54 } 64 55 … … 171 162 psFree(UT1time); 172 163 //Check return values from valid precession input 173 174 164 pmodel = psEOC_PrecessionModel(time); 175 165 if ( pmodel == NULL ) { … … 288 278 psS32 testEOCNutation(void) 289 279 { 280 psTime *in = psTimeAlloc(PS_TIME_TAI); 281 in->sec = 1131579114; 282 in->nsec = 498489000; 283 in->leapsecond = false; 284 psTime *empty = NULL; 285 psEarthPole *nute = NULL; 286 287 //Return NULL for NULL input time. 288 nute = psEOC_NutationCorr(empty); 289 if (nute != NULL) { 290 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 291 "psEOC_NutationCorr failed to return NULL for NULL input time.\n"); 292 return 1; 293 } 294 //Return NULL for UT1 time input 295 psTime *UT1time = psTimeAlloc(PS_TIME_UT1); 296 nute = psEOC_NutationCorr(UT1time); 297 if (nute != NULL) { 298 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 299 "psEOC_NutationCorr failed to return NULL for UT1 input time.\n"); 300 return 2; 301 } 302 psFree(UT1time); 303 //Check return values from valid nutation time input 304 nute = psEOC_PrecessionModel(in); 305 if ( nute == NULL ) { 306 psError(PS_ERR_BAD_PARAMETER_NULL, false, 307 "psEOC_NutationCorr returned NULL for valid input.\n"); 308 return 3; 309 } else { 310 printf("Nutation Correction output = x,y,s = %.8g, %.8g, %.8g\n\n", 311 nute->x, nute->y, nute->s); 312 } 313 psFree(nute); 314 psFree(in); 315 316 if (!p_psEOCFinalize() ) { 317 psError(PS_ERR_BAD_PARAMETER_VALUE, false, "EOC failed finalization!\n"); 318 return 12; 319 } 290 320 291 321 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.
