Changeset 5455 for trunk/psLib/test/astro
- Timestamp:
- Nov 1, 2005, 3:07:25 PM (21 years ago)
- Location:
- trunk/psLib/test/astro
- Files:
-
- 5 edited
-
tst_psEarthOrientation.c (modified) (6 diffs)
-
tst_psSphereOps.c (modified) (3 diffs)
-
verified/tst_psEarthOrientation.stderr (modified) (2 diffs)
-
verified/tst_psEarthOrientation.stdout (modified) (1 diff)
-
verified/tst_psSphereOps.stderr (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astro/tst_psEarthOrientation.c
r5450 r5455 1 1 /** @file tst_psEarthOrientation.c 2 2 * 3 * @brief The code will go on ... 4 * 3 * @brief The code will perform earth orientation calculations and sphere rotations. 5 4 * 6 5 * @author d-Rob, MHPCC 7 6 * 8 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-1 0-28 02:25:22$7 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-11-02 01:07:25 $ 10 9 * 11 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 43 42 psS32 testAberration(void) 44 43 { 45 psSphere *a ctual= NULL;46 psSphere *a pparent= psSphereAlloc();44 psSphere *apparent = NULL; 45 psSphere *actual = psSphereAlloc(); 47 46 psSphere *direction = psSphereAlloc(); 48 47 psSphere *empty = NULL; 49 48 50 a pparent->r = 0.2;51 a pparent->d = 0.2;49 actual->r = 0.2; 50 actual->d = 0.2; 52 51 direction->r = 0.2035; 53 52 direction->d = 0.2035; 54 53 55 empty = psAberration(empty, a ctual, direction, 0.1);54 empty = psAberration(empty, apparent, direction, 0.1); 56 55 if (empty != NULL) { 57 56 psError(PS_ERR_BAD_PARAMETER_NULL, false, 58 "psAberration failed to return NULL for NULL a pparentinput.\n");57 "psAberration failed to return NULL for NULL actual input.\n"); 59 58 return 1; 60 59 } 61 empty = psAberration(empty, a pparent, actual, 0.1);60 empty = psAberration(empty, actual, apparent, 0.1); 62 61 if (empty != NULL) { 63 62 psError(PS_ERR_BAD_PARAMETER_NULL, false, … … 66 65 } 67 66 68 a ctual = psAberration(actual, apparent, direction, 0.4);69 printf("\na ctual = r,d = %.8g, %.8g\n", actual->r, actual->d);67 apparent = psAberration(apparent, actual, direction, 0.4); 68 printf("\napparent = r,d = %.8g, %.8g\n", apparent->r, apparent->d); 70 69 70 psFree(apparent); 71 71 psFree(actual); 72 psFree(apparent);73 72 psFree(direction); 74 73 … … 79 78 { 80 79 81 psSphere *actual = NULL;82 psSphere *apparent = psSphereAlloc();80 psSphere *actual = psSphereAlloc(); 81 psSphere *apparent = NULL; 83 82 psSphere *sun = psSphereAlloc(); 84 83 psSphere *empty = NULL; … … 86 85 sun->r = 0.2; 87 86 sun->d = 0.2; 88 a pparent->r = 0.2035;89 a pparent->d = 0.2035;87 actual->r = 0.2035; 88 actual->d = 0.2035; 90 89 91 empty = psGravityDeflection( empty, actual, sun);90 empty = psGravityDeflection(apparent, empty, sun); 92 91 if (empty != NULL) { 93 92 psError(PS_ERR_BAD_PARAMETER_NULL, true, 94 "psGravityDeflection Failed to return NULL for NULL a pparentinput sphere.\n");93 "psGravityDeflection Failed to return NULL for NULL actual input sphere.\n"); 95 94 return 1; 96 95 } 97 empty = psGravityDeflection( empty, apparent, actual);96 empty = psGravityDeflection(apparent, actual, empty); 98 97 if (empty != NULL) { 99 98 psError(PS_ERR_BAD_PARAMETER_NULL, true, … … 102 101 } 103 102 104 a ctual = psGravityDeflection(actual, apparent, sun);105 psSphere *result = psSphereSetOffset(a pparent, actual, PS_SPHERICAL, PS_RADIAN);106 printf("\nA pparent r,d = %.13g,%.13g Actualr,d = %.13g, %.13g \n",107 a pparent->r, apparent->d, result->r, result->d);103 apparent = psGravityDeflection(apparent, actual, sun); 104 psSphere *result = psSphereSetOffset(actual, apparent, PS_SPHERICAL, PS_RADIAN); 105 printf("\nActual r,d = %.13g,%.13g Apparent r,d = %.13g, %.13g \n", 106 actual->r, actual->d, result->r, result->d); 108 107 psFree(result); 109 108 psFree(actual); -
trunk/psLib/test/astro/tst_psSphereOps.c
r5450 r5455 1 1 /** @file tst_psSphereOps.c 2 2 * 3 * @brief The code will ..... Work .... 4 * 3 * @brief The code will perform sphere rotations and transformations. 5 4 * 6 5 * @author d-Rob, MHPCC 7 6 * 8 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-1 0-28 02:25:22$7 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-11-02 01:07:25 $ 10 9 * 11 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 14 13 #include "psTest.h" 15 14 #include "pslib_strict.h" 15 16 16 static psS32 testSphereRotAlloc(void); 17 17 static psS32 testSphereRotQuat(void); … … 275 275 RAD_TO_DEG(galactic->r),RAD_TO_DEG(galactic->d), 276 276 l[x], b[x]); 277 printf("togal- %lf,%lf,%lf,%lf fromgal- %lf,%lf,%lf,%lf\n",278 toGalactic->q0, toGalactic->q1, toGalactic->q2, toGalactic->q3,279 fromGalactic->q0, fromGalactic->q1, fromGalactic->q2, fromGalactic->q3);280 277 return 3; 281 278 } 282 if (fabs(RAD_TO_DEG(icrsFromGalactic->r) - alpha[x]) > TOLERANCE || 279 if ( (fabs(RAD_TO_DEG(icrsFromGalactic->r) - alpha[x]) > TOLERANCE && 280 fabs(RAD_TO_DEG(icrsFromGalactic->d) - 90.0) > TOLERANCE ) || 283 281 fabs(RAD_TO_DEG(icrsFromGalactic->d) - delta[x]) > TOLERANCE) { 284 282 psError(PS_ERR_UNKNOWN, false, -
trunk/psLib/test/astro/verified/tst_psEarthOrientation.stderr
r5450 r5455 6 6 7 7 <DATE><TIME>|<HOST>|E|psAberration (FILE:LINENO) 8 Unallowable operation: a pparentis NULL.8 Unallowable operation: actual is NULL. 9 9 <DATE><TIME>|<HOST>|E|psAberration (FILE:LINENO) 10 10 Unallowable operation: direction is NULL. … … 19 19 20 20 <DATE><TIME>|<HOST>|E|psGravityDeflection (FILE:LINENO) 21 Unallowable operation: a pparentis NULL.21 Unallowable operation: actual is NULL. 22 22 <DATE><TIME>|<HOST>|E|psGravityDeflection (FILE:LINENO) 23 23 Unallowable operation: sun is NULL. -
trunk/psLib/test/astro/verified/tst_psEarthOrientation.stdout
r5450 r5455 1 1 2 a ctual= r,d = 0.10218436, 0.102184362 apparent = r,d = 0.10218436, 0.10218436 3 3 4 A pparent r,d = 0.2035,0.2035 Actualr,d = 0.2035000000002, 0.20350000003914 Actual r,d = 0.2035,0.2035 Apparent r,d = 0.2035000000002, 0.2035000000391 -
trunk/psLib/test/astro/verified/tst_psSphereOps.stderr
r5437 r5455 1 1 /***************************** TESTPOINT ******************************************\ 2 2 * TestFile: tst_psSphereOps.c * 3 * TestPoint: ps Coord{psSphereRotAlloc()}*3 * TestPoint: psSphereOps{psSphereRotAlloc()} * 4 4 * TestType: Positive * 5 5 \**********************************************************************************/ 6 6 7 7 8 ---> TESTPOINT PASSED (ps Coord{psSphereRotAlloc()} | tst_psSphereOps.c)8 ---> TESTPOINT PASSED (psSphereOps{psSphereRotAlloc()} | tst_psSphereOps.c) 9 9 10 10 /***************************** TESTPOINT ******************************************\ 11 11 * TestFile: tst_psSphereOps.c * 12 * TestPoint: ps Coord{psSphereRotQuat()}*12 * TestPoint: psSphereOps{psSphereRotQuat()} * 13 13 * TestType: Positive * 14 14 \**********************************************************************************/ 15 15 16 16 17 ---> TESTPOINT PASSED (ps Coord{psSphereRotQuat()} | tst_psSphereOps.c)17 ---> TESTPOINT PASSED (psSphereOps{psSphereRotQuat()} | tst_psSphereOps.c) 18 18 19 19 /***************************** TESTPOINT ******************************************\ 20 20 * TestFile: tst_psSphereOps.c * 21 * TestPoint: ps Coord{psSphereRotApply()}*21 * TestPoint: psSphereOps{psSphereRotApply()} * 22 22 * TestType: Positive * 23 23 \**********************************************************************************/ … … 32 32 Unallowable operation: coord is NULL. 33 33 34 ---> TESTPOINT PASSED (ps Coord{psSphereRotApply()} | tst_psSphereOps.c)34 ---> TESTPOINT PASSED (psSphereOps{psSphereRotApply()} | tst_psSphereOps.c) 35 35 36 36 /***************************** TESTPOINT ******************************************\ 37 37 * TestFile: tst_psSphereOps.c * 38 * TestPoint: ps Coord{psSphereRotApplyCel()}*38 * TestPoint: psSphereOps{psSphereRotApplyCel()} * 39 39 * TestType: Positive * 40 40 \**********************************************************************************/ 41 41 42 <DATE><TIME>|<HOST>|E|testSphereRotApplyCelestial (FILE:LINENO)43 ICRS for Galactic tranformation incorrect. Result is (180,90), expected (0,90)44 42 45 ---> TESTPOINT PASSED (ps Coord{psSphereRotApplyCel()} | tst_psSphereOps.c)43 ---> TESTPOINT PASSED (psSphereOps{psSphereRotApplyCel()} | tst_psSphereOps.c) 46 44 47 45 /***************************** TESTPOINT ******************************************\ 48 46 * TestFile: tst_psSphereOps.c * 49 * TestPoint: ps Coord{psSphereRotPrecess()}*47 * TestPoint: psSphereOps{psSphereRotPrecess()} * 50 48 * TestType: Positive * 51 49 \**********************************************************************************/ … … 64 62 Unallowable operation: coords is NULL. 65 63 66 ---> TESTPOINT PASSED (ps Coord{psSphereRotPrecess()} | tst_psSphereOps.c)64 ---> TESTPOINT PASSED (psSphereOps{psSphereRotPrecess()} | tst_psSphereOps.c) 67 65 68 66 /***************************** TESTPOINT ******************************************\ 69 67 * TestFile: tst_psSphereOps.c * 70 * TestPoint: ps Coord{testSphereToFromCube()} *68 * TestPoint: psSphereOps{testSphereOffset()} * 71 69 * TestType: Positive * 72 70 \**********************************************************************************/ 73 71 72 <DATE><TIME>|<HOST>|E|psSphereSetOffset (FILE:LINENO) 73 Unallowable operation: position is NULL. 74 <DATE><TIME>|<HOST>|E|psSphereSetOffset (FILE:LINENO) 75 Unallowable operation: offset is NULL. 76 <DATE><TIME>|<HOST>|E|psSphereGetOffset (FILE:LINENO) 77 Unallowable operation: position1 is NULL. 78 <DATE><TIME>|<HOST>|E|psSphereGetOffset (FILE:LINENO) 79 Unallowable operation: position2 is NULL. 74 80 75 ---> TESTPOINT PASSED (ps Coord{testSphereToFromCube()} | tst_psSphereOps.c)81 ---> TESTPOINT PASSED (psSphereOps{testSphereOffset()} | tst_psSphereOps.c) 76 82 77 /***************************** TESTPOINT ******************************************\78 * TestFile: tst_psSphereOps.c *79 * TestPoint: psCoord{testSphereOffset()} *80 * TestType: Positive *81 \**********************************************************************************/82 83 84 ---> TESTPOINT PASSED (psCoord{testSphereOffset()} | tst_psSphereOps.c)85
Note:
See TracChangeset
for help on using the changeset viewer.
