Changeset 5447
- Timestamp:
- Oct 27, 2005, 10:38:19 AM (21 years ago)
- Location:
- trunk/psLib
- Files:
-
- 3 edited
-
src/astro/psEarthOrientation.c (modified) (5 diffs)
-
src/astro/psEarthOrientation.h (modified) (3 diffs)
-
test/astro/tst_psEarthOrientation.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psEarthOrientation.c
r5446 r5447 9 9 * @author Robert Daniel DeSonia, MHPCC 10 10 * 11 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-10-2 6 01:20:15$11 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-10-27 20:38:18 $ 13 13 * 14 14 * Copyright 2005 Maui High Performance Computing Center, University of Hawaii … … 158 158 } 159 159 160 psSphere *psAberration(psSphere *apparent, const psSphere *actual, const psSphere *direction, double speed) 161 { 162 163 164 return NULL; 165 } 166 167 psSphere *psGravityDeflection(psSphere *apparent, psSphere *actual, psSphere *sun) 160 psSphere *psAberration(psSphere *actual, 161 const psSphere *apparent, 162 const psSphere *direction, 163 double speed) 164 { 165 166 167 return NULL; 168 } 169 170 psSphere *psGravityDeflection(psSphere *actual, 171 psSphere *apparent, 172 psSphere *sun) 168 173 { 169 174 PS_ASSERT_PTR_NON_NULL(apparent, NULL); … … 223 228 224 229 225 double psEOC_ParallaxFactor(const psSphere *coords, const psTime *time) 230 double psEOC_ParallaxFactor(const psSphere *coords, 231 const psTime *time) 226 232 { 227 233 … … 373 379 374 380 375 psEarthPole *psEOC_PrecessionCorr(const psTime *time, psTimeBulletin bulletin) 381 psEarthPole *psEOC_PrecessionCorr(const psTime *time, 382 psTimeBulletin bulletin) 376 383 { 377 384 return NULL; … … 391 398 392 399 393 psEarthPole* psEOC_GetPolarMotion(const psTime *time, psTimeBulletin bulletin) 400 psEarthPole* psEOC_GetPolarMotion(const psTime *time, 401 psTimeBulletin bulletin) 394 402 { 395 403 return NULL; -
trunk/psLib/src/astro/psEarthOrientation.h
r5446 r5447 9 9 * @author Robert Daniel DeSonia, MHPCC 10 10 * 11 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-10-2 6 01:20:15$11 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-10-27 20:38:18 $ 13 13 * 14 14 * Copyright 2005 Maui High Performance Computing Center, University of Hawaii … … 22 22 #include "psSphereOps.h" 23 23 24 /** 25 * 26 * 27 */ 24 /** Structure for respresenting the Earth's pole at any moment or determine velocity 25 * at the pole. This structure carries the polar coordinate information. */ 28 26 typedef struct 29 27 { 30 double x; ///< 31 double y; ///< 32 double s; ///< 28 double x; ///< X component of the earth's pole 29 double y; ///< Y component of the earth's pole 30 double s; ///< s component of the earth's pole 33 31 } 34 32 psEarthPole; 35 33 36 /** 34 /** Method for spherical precession used to specify the level of detail used in 35 * calculation. 37 36 * 37 * @see psSpherePrecess 38 38 * 39 39 */ 40 40 typedef enum { 41 PS_PRECESS_ROUGH, ///< 42 PS_PRECESS_COMPLETE, ///< 43 PS_PRECESS_IAU2000A, ///< 41 PS_PRECESS_ROUGH, ///< roughest, lowest level of detail 42 PS_PRECESS_COMPLETE, ///< complete level of detail 43 PS_PRECESS_IAU2000A, ///< highest level of detail 44 44 } psPrecessMethod; 45 45 46 /** 46 /** Calculates the actual position of a star, given its apparent position and the 47 * velocity vector of the observer. 47 48 * 49 * The actual and apparent positions are represented as psSphere entries, as is the 50 * direction of motion. The speed in that direction is given in units of the speed 51 * of light. If the value of actual is NULL, a new psSphere is allocated, otherwise 52 * the point to actual is used for the result. 48 53 * 49 * 54 * @return psSphere*: the actual position of a star. 50 55 */ 51 56 psSphere *psAberration( 52 psSphere *a pparent, ///<53 const psSphere *a ctual, ///<54 const psSphere *direction, ///< 55 double speed ///< 57 psSphere *actual, ///< actual position of star 58 const psSphere *apparent, ///< apparent position of star 59 const psSphere *direction, ///< direction of motion of observer 60 double speed ///< speed of motion of observer 56 61 ); 57 62 … … 66 71 */ 67 72 psSphere *psGravityDeflection( 73 psSphere *actual, ///< actual position of star 68 74 psSphere *apparent, ///< apparent position of star 69 psSphere *actual, ///< actual position of star70 75 psSphere *sun ///< position of the sun 71 76 ); 72 77 73 /** 78 /** Calculate the parallax factor for the given position and time. 74 79 * 75 * 80 * @return double: the calculated parallax factor. 76 81 */ 77 82 double psEOC_ParallaxFactor( 78 const psSphere *coords, ///< 79 const psTime *time ///< 83 const psSphere *coords, ///< specified position 84 const psTime *time ///< specified time 80 85 ); 81 86 82 /** 87 /** Calculates the components of the rotation between the CEO and GCRS frames, X, Y, 88 * and s, using the IAU2000A precession & nutation model. 83 89 * 90 * The input time may be represented in any format other than UT1. This routine must 91 * give results identical to the IERS XYS2000A subroutine. 84 92 * 93 * @return psEarthPole*: the calculated components of the rotation. 85 94 */ 86 95 psEarthPole *psEOC_PrecessionModel( 87 const psTime *time ///< 96 const psTime *time ///< specified time 88 97 ); 89 98 90 /** 99 /** Provides interpolated corrections to the X and Y components of the polar 100 * coordinates from the tables provided by the IERS, just as it does for UT1 and 101 * polar motion. 91 102 * 92 * 103 * @return psEarthPole*: interpolated corrections to the precession components. 93 104 */ 94 105 psEarthPole *psEOC_PrecessionCorr( 95 const psTime *time, ///< 96 psTimeBulletin bulletin ///< 106 const psTime *time, ///< specified time 107 psTimeBulletin bulletin ///< IERS tables for polar coordinate components. 97 108 ); 98 109 99 /** 110 /** Constructs the spherical rotation for transforming from CEO to GCRS coordinates. 100 111 * 112 * The resulting psSphereRot may be used to determine the rotation from CIP/CEO to 113 * GCRS. This function must give results identical to the IERS BPN2000. 101 114 * 115 * @return psSphereRot*: spherical rotation for CEO to GCRS transformation. 102 116 */ 103 117 psSphereRot *psSphereRot_CEOtoGCRS( 104 const psEarthPole *pole ///< 118 const psEarthPole *pole ///< input coordinates to transform 105 119 ); 106 120 107 /** 121 /** Calculates the rotation of the Earth about the CIP. 108 122 * 109 * 123 * @return psSphereRot*: sphereical rotation 110 124 */ 111 125 psSphereRot *psSphereRot_TEOtoCEO( 112 const psTime *time ///< 126 const psTime *time ///< specified time 113 127 ); 114 128 115 /** 129 /** Provides interpolated values of the polar motion components extracted from the 130 * IERS tables. 116 131 * 117 * 132 * @return psEarthPole*: interpolated polar motion components. 118 133 */ 119 134 psEarthPole *psEOC_GetPolarMotion( 120 const psTime *time, ///< 121 psTimeBulletin bulletin ///< 135 const psTime *time, ///< specified time 136 psTimeBulletin bulletin ///< IERS tables for polar coordinate components. 122 137 ); 123 138 124 /** 139 /** Provides tidal corrections to the polar motion components using the Ray model 140 * of Simon et al. 125 141 * 126 * 142 * @return psEarthPole*: corrected polar motion components. 127 143 */ 128 144 psEarthPole *psEOC_PolarTideCorr( 129 const psTime *time ///< 145 const psTime *time ///< specified time 130 146 ); 131 147 132 /** 148 /** Provides the additional corrections due to nutation terms with periods less than 149 * or equal to two days, as well as the correction to the s-prime component of polar 150 * motion. 133 151 * 134 * 135 * 152 * @return psEarthPole*: corrected polar motion components. 136 153 */ 137 154 psEarthPole *psEOC_NutationCorr( 138 psTime *time ///< 155 psTime *time ///< specified time 139 156 ); 140 157 141 /** 158 /** Converts the polar motion corrections to a spherical rotation. 142 159 * 160 * This function should give identical results to the IERS POM2000 subroutine. 143 161 * 144 * 162 * @return psSphereRot*: ITRS to TEO sphere rotation. 145 163 */ 146 164 psSphereRot *psSphereRot_ITRStoTEO( 147 const psEarthPole *motion ///< 165 const psEarthPole *motion ///< corrected polar motion components 148 166 ); 149 167 -
trunk/psLib/test/astro/tst_psEarthOrientation.c
r5446 r5447 6 6 * @author d-Rob, MHPCC 7 7 * 8 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $9 * @date $Date: 2005-10-2 6 01:20:15$8 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2005-10-27 20:38:19 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 59 59 psSphere *apparent = psSphereAlloc(); 60 60 psSphere *sun = psSphereAlloc(); 61 psSphere *empty = NULL; 61 62 62 63 sun->r = 0.2; … … 65 66 apparent->d = 0.2035; 66 67 67 actual = psGravityDeflection(apparent, actual, sun); 68 empty = psGravityDeflection(empty, actual, sun); 69 if (empty != NULL) { 70 psError(PS_ERR_BAD_PARAMETER_NULL, true, 71 "psGravityDeflection Failed to return NULL for NULL apparent input sphere.\n"); 72 return 1; 73 } 74 empty = psGravityDeflection(empty, apparent, actual); 75 if (empty != NULL) { 76 psError(PS_ERR_BAD_PARAMETER_NULL, true, 77 "psGravityDeflection Failed to return NULL for NULL sun input sphere.\n"); 78 return 2; 79 } 80 81 82 actual = psGravityDeflection(actual, apparent, sun); 68 83 psSphere *result = psSphereSetOffset(apparent, actual, PS_SPHERICAL, PS_RADIAN); 69 84 printf("\nApparent r,d = %.13g,%.13g Actual r,d = %.13g, %.13g \n",
Note:
See TracChangeset
for help on using the changeset viewer.
