00001 /** @file psEarthOrientation.h 00002 * 00003 * @brief earth orientation calculations and transformation 00004 * 00005 * @author Josh Hoblitt, IfA 00006 * @author Ed Pier, IfA 00007 * @author Eugene Magnier, IfA 00008 * @author Robert Daniel DeSonia, MHPCC 00009 * 00010 * @version $Revision: 1.17 $ $Name: $ 00011 * @date $Date: 2007/01/23 22:47:22 $ 00012 * 00013 * Copyright 2005 Maui High Performance Computing Center, University of Hawaii 00014 */ 00015 00016 #ifndef PS_EARTH_ORIENTATION 00017 #define PS_EARTH_ORIENTATION 00018 00019 /// @addtogroup Astro Astronomy 00020 /// @{ 00021 00022 #include "psCoord.h" 00023 #include "psTime.h" 00024 #include "psSphereOps.h" 00025 00026 /** Structure for respresenting the Earth's pole at any moment or determine velocity 00027 * at the pole. This structure carries the polar coordinate information. */ 00028 typedef struct 00029 { 00030 double x; ///< X component of the earth's pole 00031 double y; ///< Y component of the earth's pole 00032 double s; ///< s component of the earth's pole 00033 } 00034 psEarthPole; 00035 00036 /** Method for spherical precession used to specify the level of detail used in 00037 * calculation. 00038 * 00039 * @see psSpherePrecess 00040 * 00041 */ 00042 typedef enum { 00043 PS_PRECESS_ROUGH, ///< roughest, lowest level of detail 00044 PS_PRECESS_COMPLETE_A, ///< complete level of detail using IERS A 00045 PS_PRECESS_COMPLETE_B, ///< complete level of detail using IERS B 00046 PS_PRECESS_IAU2000A ///< highest level of detail 00047 } 00048 psPrecessMethod; 00049 00050 /** Initialize EOC. 00051 * 00052 * Parses IERS table data and creates the polynomials used by certain EOC functions. 00053 * 00054 * @return bool: True if successful, otherwise false. 00055 */ 00056 bool p_psEOCInit(void); 00057 00058 /** Finalize EOC after using functions that make calls to eocInit for time table data 00059 * 00060 * @return bool: True if successful, otherwise false. 00061 */ 00062 bool p_psEOCFinalize(void); 00063 00064 /** Allocates a new psEarthPole structure. */ 00065 psEarthPole *psEarthPoleAlloc(void); 00066 00067 /** Calculates the apparent position of a star, given its actual position and the 00068 * velocity vector of the observer. 00069 * 00070 * The actual and apparent positions are represented as psSphere entries, as is the 00071 * direction of motion. The speed in that direction is given in units of the speed 00072 * of light. If the value of apparent is NULL, a new psSphere is allocated, otherwise 00073 * the point to apparent is used for the result. 00074 * 00075 * @return psSphere*: the actual position of a star. 00076 */ 00077 psSphere *psAberration( 00078 psSphere *apparent, ///< apparent position of star 00079 const psSphere *actual, ///< actual position of star 00080 const psSphere *direction, ///< direction of motion of observer 00081 double speed ///< speed of motion of observer 00082 ); 00083 00084 /** Calculates the apparent position of a star, given its actual position and the 00085 * position of the sun. 00086 * 00087 * The actual and apparent positions are represented as psSphere entries, as is 00088 * position of the sun. If the value of apparent is NULL, a new psSphere is allocated, 00089 * otherwise the point to apparent is used for the result. 00090 * 00091 * @return psSphere*: the apparent position of a star. 00092 */ 00093 psSphere *psGravityDeflection( 00094 psSphere *apparent, ///< apparent position of star 00095 psSphere *actual, ///< actual position of star 00096 psSphere *sun ///< position of the sun 00097 ); 00098 00099 /** Calculates the components of the rotation between the CEO and GCRS frames, X, Y, 00100 * and s, using the IAU2000A precession & nutation model. 00101 * 00102 * The input time may be represented in any format other than UT1. This routine must 00103 * give results identical to the IERS XYS2000A subroutine. 00104 * 00105 * @return psEarthPole*: the calculated components of the rotation. 00106 */ 00107 psEarthPole *psEOC_PrecessionModel( 00108 const psTime *time ///< specified time 00109 ); 00110 00111 /** Provides interpolated corrections to the X and Y components of the polar 00112 * coordinates from the tables provided by the IERS, just as it does for UT1 and 00113 * polar motion. 00114 * 00115 * @return psEarthPole*: interpolated corrections to the precession components. 00116 */ 00117 psEarthPole *psEOC_PrecessionCorr( 00118 const psTime *time, ///< specified time 00119 psTimeBulletin bulletin ///< IERS tables for polar coordinate components. 00120 ); 00121 00122 /** Constructs the spherical rotation for transforming from CEO to GCRS coordinates. 00123 * 00124 * The resulting psSphereRot may be used to determine the rotation from CIP/CEO to 00125 * GCRS. This function must give results identical to the IERS BPN2000. 00126 * 00127 * @return psSphereRot*: spherical rotation for CEO to GCRS transformation. 00128 */ 00129 psSphereRot *psSphereRot_CEOtoGCRS( 00130 const psEarthPole *pole ///< input coordinates to transform 00131 ); 00132 00133 /** Calculates the rotation of the Earth about the CIP. 00134 * 00135 * If tidalCorr is non-NULL, use the S-component to provide tidal corrections to the 00136 * UT1 time. If tidalCorr is NULL, no corrections are made & this step is skipped. 00137 * 00138 * @return psSphereRot*: spherical rotation of the Earth about the CIP. 00139 */ 00140 psSphereRot *psSphereRot_TEOtoCEO( 00141 const psTime *time, ///< specified time 00142 psEarthPole *tidalCorr ///< UT1 polar tide correction or NULL 00143 ); 00144 00145 /** Provides interpolated values of the polar motion components extracted from the 00146 * IERS tables. 00147 * 00148 * @return psEarthPole*: interpolated polar motion components. 00149 */ 00150 psEarthPole *psEOC_GetPolarMotion( 00151 const psTime *time, ///< specified time 00152 psTimeBulletin bulletin ///< IERS tables for polar coordinate components. 00153 ); 00154 00155 /** Provides tidal corrections to the polar motion components using the Ray model 00156 * of Simon et al. 00157 * 00158 * @return psEarthPole*: corrected polar motion components. 00159 */ 00160 psEarthPole *psEOC_PolarTideCorr( 00161 const psTime *time ///< specified time 00162 ); 00163 00164 /** Provides the additional corrections due to nutation terms with periods less than 00165 * or equal to two days, as well as the correction to the s-prime component of polar 00166 * motion. 00167 * 00168 * @return psEarthPole*: corrected polar motion components. 00169 */ 00170 psEarthPole *psEOC_NutationCorr( 00171 psTime *time ///< specified time 00172 ); 00173 00174 /** Converts the polar motion corrections to a spherical rotation. 00175 * 00176 * This function should give identical results to the IERS POM2000 subroutine. 00177 * 00178 * @return psSphereRot*: ITRS to TEO sphere rotation. 00179 */ 00180 psSphereRot *psSphereRot_ITRStoTEO( 00181 const psEarthPole *motion ///< corrected polar motion components 00182 ); 00183 00184 /** Generates the complete spherical rotation to account for precession 00185 * between two times. The equinoxes shall be Julian equinoxes. 00186 * 00187 * If NULL is provided for either time, it is assumed to have the reference 00188 * equinox value of J2000. The mode argument is used to specify the level of 00189 * detail used in the calculation. 00190 * 00191 * @return psSphere*: the resulting spherical rotation 00192 */ 00193 psSphereRot* psSpherePrecess( 00194 const psTime *fromTime, ///< equinox of coords input 00195 const psTime *toTime, ///< equinox of coords output 00196 psPrecessMethod mode ///< level of detail to use 00197 ); 00198 00199 00200 /// @} 00201 #endif // #ifndef PS_EARTH_ORIENTATION
1.5.1