Changeset 5450 for trunk/psLib/test/astro/tst_psEarthOrientation.c
- Timestamp:
- Oct 27, 2005, 4:25:22 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/astro/tst_psEarthOrientation.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astro/tst_psEarthOrientation.c
r5447 r5450 6 6 * @author d-Rob, MHPCC 7 7 * 8 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-10-2 7 20:38:19$8 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-10-28 02:25:22 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 24 24 25 25 testDescription tests[] = { 26 {test EOCParallax, 666, "psEOCParallax()", 0, false},27 {test Aberration, 667, "psAberration()", 0, false},28 {test GravityDeflect, 668, "psGravityDeflect()", 0, false},26 {testAberration, 666, "psAberration()", 0, false}, 27 {testGravityDeflect, 667, "psGravityDeflect()", 0, false}, 28 {testEOCParallax, 668, "psEOCParallax()", 0, false}, 29 29 {testEOCPrecession, 669, "psEOCPrecession()", 0, false}, 30 30 {testEOCPolar, 670, "psEOCPolar()", 0, false}, … … 41 41 } 42 42 43 psS32 testEOCParallax(void)44 {45 46 return 0;47 }48 49 43 psS32 testAberration(void) 50 44 { 45 psSphere *actual = NULL; 46 psSphere *apparent = psSphereAlloc(); 47 psSphere *direction = psSphereAlloc(); 48 psSphere *empty = NULL; 49 50 apparent->r = 0.2; 51 apparent->d = 0.2; 52 direction->r = 0.2035; 53 direction->d = 0.2035; 54 55 empty = psAberration(empty, actual, direction, 0.1); 56 if (empty != NULL) { 57 psError(PS_ERR_BAD_PARAMETER_NULL, false, 58 "psAberration failed to return NULL for NULL apparent input.\n"); 59 return 1; 60 } 61 empty = psAberration(empty, apparent, actual, 0.1); 62 if (empty != NULL) { 63 psError(PS_ERR_BAD_PARAMETER_NULL, false, 64 "psAberration failed to return NULL for NULL direction input.\n"); 65 return 2; 66 } 67 68 actual = psAberration(actual, apparent, direction, 0.4); 69 printf("\nactual = r,d = %.8g, %.8g\n", actual->r, actual->d); 70 71 psFree(actual); 72 psFree(apparent); 73 psFree(direction); 51 74 52 75 return 0; … … 79 102 } 80 103 81 82 104 actual = psGravityDeflection(actual, apparent, sun); 83 105 psSphere *result = psSphereSetOffset(apparent, actual, PS_SPHERICAL, PS_RADIAN); … … 88 110 psFree(apparent); 89 111 psFree(sun); 112 113 return 0; 114 } 115 116 psS32 testEOCParallax(void) 117 { 90 118 91 119 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.
