00001 #pragma ident "$Id: IERS.hpp 2957 2011-10-30 18:15:34Z yanweignss $"
00002
00008 #ifndef GPSTK_IERS_HPP
00009 #define GPSTK_IERS_HPP
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include <string>
00034 #include "IERSConventions.hpp"
00035 #include "PlanetEphemeris.hpp"
00036
00037 namespace gpstk
00038 {
00041
00045 class IERS
00046 {
00047 public:
00049 static const double PI;
00050
00052 static const double ARCSEC2RAD;
00053
00054
00056 static std::string version(){return "IERS1996";}
00057
00058
00059
00060
00061
00062
00064 static void loadIERSFile(const std::string& iersFile)
00065 throw(FileMissingException){ gpstk::LoadIERSFile(iersFile); }
00066
00068 static void loadIGSFile(const std::string& igsFile)
00069 throw(FileMissingException){ gpstk::LoadIGSFile(igsFile); }
00070
00072 static void loadSTKFile(const std::string& stkFile)
00073 throw(FileMissingException){ gpstk::LoadSTKFile(stkFile); }
00074
00075
00077 static EOPDataStore::EOPData eopData(const double& mjdUTC)
00078 throw(InvalidRequest){return gpstk::EOPData( DayTime(mjdUTC) );}
00079
00080 static EOPDataStore::EOPData eopData(const DayTime& UTC)
00081 throw(InvalidRequest){return gpstk::EOPData(UTC);}
00082
00086 static double xPole(const double& mjdUTC)
00087 throw (InvalidRequest){return gpstk::PolarMotionX( DayTime(mjdUTC) );}
00088
00089 static double xPole(const DayTime& UTC)
00090 throw (InvalidRequest){return gpstk::PolarMotionX(UTC);}
00091
00095 static double yPole(const double& mjdUTC)
00096 throw (InvalidRequest){ return gpstk::PolarMotionY( DayTime(mjdUTC) );}
00097
00098 static double yPole(const DayTime& UTC)
00099 throw (InvalidRequest){ return gpstk::PolarMotionY(UTC);}
00100
00104 static double UT1mUTC(const double& mjdUTC)
00105 throw (InvalidRequest) { return gpstk::UT1mUTC( DayTime(mjdUTC) ); }
00106
00107 static double UT1mUTC(const DayTime& UTC)
00108 throw (InvalidRequest) { return gpstk::UT1mUTC(UTC); }
00109
00113 static double dPsi(const double& mjdUTC)
00114 throw (InvalidRequest){return gpstk::NutationDPsi( DayTime(mjdUTC) );}
00115
00116 static double dPsi(const DayTime& UTC)
00117 throw (InvalidRequest){return gpstk::NutationDPsi(UTC);}
00118
00122 static double dEps(const double& mjdUTC)
00123 throw (InvalidRequest){return gpstk::NutationDEps( DayTime(mjdUTC) );}
00124
00125 static double dEps(const DayTime& UTC)
00126 throw (InvalidRequest){return gpstk::NutationDEps(UTC);}
00127
00137 static int TAImUTC(const double& mjdUTC)
00138 throw(InvalidRequest){return gpstk::TAImUTC( DayTime(mjdUTC) ); }
00139
00140 static int TAImUTC(const DayTime& UTC)
00141 throw(InvalidRequest){return gpstk::TAImUTC(UTC); }
00142
00143
00144 static double TTmTAI(){return gpstk::TTmTAI();}
00145
00146
00147 static double TAImGPST(){return gpstk::TAImGPST();}
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00167 static DayTime GPST2UTC(const DayTime& GPST){return gpstk::GPST2UTC(GPST);}
00168 static DayTime UTC2GPST(const DayTime& UTC){return gpstk::UTC2GPST(UTC);}
00169
00171 static DayTime UT12UTC(const DayTime& UT1){return gpstk::UT12UTC(UT1);}
00172 static DayTime UTC2UT1(const DayTime& UTC){return gpstk::UTC2UT1(UTC);}
00173
00174 static DayTime UT12UTC(const DayTime& UT1,double ut1mutc)
00175 {return gpstk::UT12UTC(UT1,ut1mutc);}
00176
00177 static DayTime UTC2UT1(const DayTime& UTC,double ut1mutc)
00178 {return gpstk::UTC2UT1(UTC,ut1mutc);}
00179
00181 static DayTime TT2UTC(const DayTime& TT){return gpstk::TT2UTC(TT);}
00182 static DayTime UTC2TT(const DayTime& UTC){return gpstk::UTC2TT(UTC);}
00183
00185 static DayTime TAI2UTC(const DayTime& TAI){return gpstk::TAI2UTC(TAI);}
00186 static DayTime UTC2TAI(const DayTime& UTC){return gpstk::UTC2TAI(UTC);}
00187
00189 static DayTime BDT2UTC(const DayTime& BDT){return gpstk::BDT2UTC(BDT);}
00190 static DayTime UTC2BDT(const DayTime& UTC){return gpstk::UTC2BDT(UTC);}
00191
00193 static DayTime ConvertTimeSystem(const DayTime& time,TimeSystem from,TimeSystem to)
00194 {return gpstk::ConvertTimeSystem(time,from,to);}
00195
00196
00197
00198
00199
00200
00201
00202
00204 static Matrix<double> J2kToECEFMatrix(const DayTime& UTC,const EOPDataStore::EOPData& ERP)
00205 throw(Exception) { return gpstk::J2kToECEFMatrix(UTC,ERP); }
00206
00208 static Vector<double> J2kPosToECEF(const DayTime& UTC, const Vector<double>& j2kPos)
00209 throw(Exception) {return gpstk::J2kPosToECEF(UTC,j2kPos);}
00210
00212 static Vector<double> ECEFPosToJ2k(const DayTime& UTC, const Vector<double>& ecefPos)
00213 throw(Exception){return gpstk::ECEFPosToJ2k(UTC,ecefPos);}
00214
00216 static Vector<double> J2kPosVelToECEF(const DayTime& UTC, const Vector<double>& j2kPosVel)
00217 throw(Exception){return gpstk::J2kPosVelToECEF(UTC,j2kPosVel);}
00218
00219
00221 static Vector<double> ECEFPosVelToJ2k(const DayTime& UTC, const Vector<double>& ecefPosVel)
00222 throw(Exception){return gpstk::ECEFPosVelToJ2k(UTC,ecefPosVel);}
00223
00224
00225
00226
00227
00228
00229
00230
00232 static void loadBinaryEphemeris(const std::string ephFile)
00233 throw(Exception);
00234
00242 static Vector<double> planetJ2kPosVel( const DayTime& TT,
00243 PlanetEphemeris::Planet entity,
00244 PlanetEphemeris::Planet center
00245 = PlanetEphemeris::Earth)
00246 throw(Exception);
00247
00249 static Vector<double> sunJ2kPosition(const DayTime& TT);
00250 static Vector<double> sunJ2kPosition(const DayTime& time,TimeSystem sys)
00251 { return sunJ2kPosition(ConvertTimeSystem(time,sys,TS_TT));}
00252
00254 static Vector<double> moonJ2kPosition(const DayTime& TT);
00255 static Vector<double> moonJ2kPosition(const DayTime& time,TimeSystem sys)
00256 { return moonJ2kPosition(ConvertTimeSystem(time,sys,TS_TT));}
00257
00259 static Vector<double> sunECEFPosition(const DayTime& TT);
00260 static Vector<double> sunECEFPosition(const DayTime& time,TimeSystem sys)
00261 { return sunECEFPosition(ConvertTimeSystem(time,sys,TS_TT));}
00262
00264 static Vector<double> moonECEFPosition(const DayTime& TT);
00265 static Vector<double> moonECEFPosition(const DayTime& time,TimeSystem sys)
00266 { return moonECEFPosition(ConvertTimeSystem(time,sys,TS_TT));}
00267
00268 protected:
00269 IERS() {}
00270 ~IERS() {}
00271
00272 static PlanetEphemeris jplEphemeris;
00273
00274 };
00275
00276
00277
00278 }
00279
00280 #endif // GPSTK_IERS_HPP
00281
00282