IERSConventions.hpp

Go to the documentation of this file.
00001 #pragma ident "$Id: IERSConventions.hpp 2957 2011-10-30 18:15:34Z yanweignss $"
00002 
00008 #ifndef GPSTK_IERSCONVENTIONS_HPP
00009 #define GPSTK_IERSCONVENTIONS_HPP
00010 
00011 //============================================================================
00012 //
00013 //  This file is part of GPSTk, the GPS Toolkit.
00014 //
00015 //  The GPSTk is free software; you can redistribute it and/or modify
00016 //  it under the terms of the GNU Lesser General Public License as published
00017 //  by the Free Software Foundation; either version 2.1 of the License, or
00018 //  any later version.
00019 //
00020 //  The GPSTk is distributed in the hope that it will be useful,
00021 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 //  GNU Lesser General Public License for more details.
00024 //
00025 //  You should have received a copy of the GNU Lesser General Public
00026 //  License along with GPSTk; if not, write to the Free Software Foundation,
00027 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00028 //
00029 //  Wei Yan - Chinese Academy of Sciences . 2011
00030 //
00031 //============================================================================
00032 
00033 #include <iostream>
00034 #include <cmath>
00035 #include <string>
00036 #include <map>
00037 
00038 #include "DayTime.hpp"
00039 #include "Triple.hpp"
00040 #include "Matrix.hpp"
00041 #include "EOPDataStore.hpp"
00042 
00043 namespace gpstk
00044 {
00047 
00070    // IERS Data Handling
00071    //--------------------------------------------------------------------------
00072    
00074    void LoadIERSFile(const std::string& fileName);
00075    
00077    void LoadIGSFile(const std::string& fileName);
00078 
00080    void LoadSTKFile(const std::string& fileName);
00081 
00083    EOPDataStore::EOPData EOPData(const DayTime& UTC)
00084       throw(InvalidRequest);
00085    
00087    double PolarMotionX(const DayTime& UTC);
00088 
00090    double PolarMotionY(const DayTime& UTC);
00091 
00093    double UT1mUTC(const DayTime& UTC);
00094 
00096    double NutationDPsi(const DayTime& UTC);
00097 
00099    double NutationDEps(const DayTime& UTC);
00100 
00101 
00103    int TAImUTC(DayTime UTC)
00104       throw(InvalidRequest);
00105 
00106 
00107    double TTmTAI();
00108 
00109 
00110    double TAImGPST();
00111 
00112 
00113    // Time System Handling
00114    //--------------------------------------------------------------------------
00115    enum TimeSystem
00116    {
00117       TS_Unknown = 0,
00118       TS_UTC,
00119       TS_UT1,
00120       TS_GPST,
00121       TS_TAI,
00122       TS_TT
00123    };
00124    
00125    DayTime ConvertTimeSystem(const DayTime& time, TimeSystem from, TimeSystem to);
00126 
00127    DayTime GPST2UTC(const DayTime& GPST);
00128    DayTime UTC2GPST(const DayTime& UTC);
00129 
00130    DayTime UT12UTC(const DayTime& UT1);
00131    DayTime UTC2UT1(const DayTime& UTC);
00132 
00133    DayTime UT12UTC(const DayTime& UT1,double ut1mutc);
00134    DayTime UTC2UT1(const DayTime& UTC,double ut1mutc);
00135 
00136    DayTime TT2UTC(const DayTime& TT);
00137    DayTime UTC2TT(const DayTime& UTC);
00138 
00139    DayTime TAI2UTC(const DayTime& TAI);
00140    DayTime UTC2TAI(const DayTime& UTC);
00141 
00142    DayTime BDT2UTC(const DayTime& BDT);
00143    DayTime UTC2BDT(const DayTime& UTC);
00144    
00145    // Reference System Handling
00146    //--------------------------------------------------------------------------
00147 
00149    Matrix<double> Rx(const double& angle);
00150 
00152    Matrix<double> Ry(const double& angle);
00153 
00155    Matrix<double> Rz(const double& angle);
00156 
00158    Matrix<double> iauPmat76(const DayTime& TT);
00159 
00160 
00161    static double iauNut80Args(const DayTime& TT,double& eps, double& dpsi,double& deps)
00162       throw(Exception);
00163 
00164 
00165    // IAU1976/1980 model (IERS conventions 1996)
00166    void J2kToECEFMatrix(const DayTime& UTC, 
00167                         const EOPDataStore::EOPData& ERP,
00168                         Matrix<double>& POM, 
00169                         Matrix<double>& Theta, 
00170                         Matrix<double>& NP)
00171       throw(Exception);
00172 
00174    Triple J2kPosToECEF(const Triple& j2kPos, const DayTime& time, TimeSystem sys = TS_GPST);
00175 
00177    Triple ECEFPosToJ2k(const Triple& ecefPos, const DayTime& time, TimeSystem sys = TS_GPST);
00178 
00180    Matrix<double> J2kToECEFMatrix(const DayTime& UTC,const EOPDataStore::EOPData& ERP);
00181       
00182 
00184    Vector<double> J2kPosToECEF(const DayTime& UTC, const Vector<double>& j2kPos)
00185       throw(Exception);
00186 
00187 
00189    Vector<double> ECEFPosToJ2k(const DayTime& UTC, const Vector<double>& ecefPos)
00190       throw(Exception);   
00191 
00192 
00194    Vector<double> J2kPosVelToECEF(const DayTime& UTC, const Vector<double>& j2kPosVel)
00195       throw(Exception);
00196 
00197 
00199    Vector<double> ECEFPosVelToJ2k(const DayTime& UTC, const Vector<double>& ecefPosVel)
00200       throw(Exception);   
00201  
00202  
00204    Vector<double> sunJ2kPosition(const DayTime& TT);
00205       
00206 
00208    Vector<double> moonJ2kPosition(const DayTime& TT);
00209 
00210       
00212 
00214    double normalizeAngle(double a);
00215    
00216 
00218    void nutationAngles(DayTime TT, double& dpsi, double& deps);
00219 
00221    double meanObliquity(DayTime TT);
00222 
00224    double iauEqeq94(DayTime TT,double eps, double dPsi);
00225 
00227    double iauGmst82(DayTime UT1);
00228 
00229 
00231    Matrix<double> iauNmat(const double& epsa, 
00232                           const double& dpsi, 
00233                           const double& deps);
00234 
00236    double earthRotationAngle(DayTime UT1);
00237 
00242    double earthRotationAngleRate1(DayTime TT);
00243 
00244 
00246    
00247 } // namespace gpstk
00248 
00249 #endif  // GPSTK_IERSCONVENTIONS2003_HPP
00250 
00251 

Generated on Tue May 22 03:30:58 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1