Changeset 5455 for trunk/psLib/test/astro/tst_psEarthOrientation.c
- Timestamp:
- Nov 1, 2005, 3:07:25 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
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);
Note:
See TracChangeset
for help on using the changeset viewer.
