EarthOrientation.hpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 //==============================================================================
26 //
27 // This software was developed by Applied Research Laboratories at the
28 // University of Texas at Austin, under contract to an agency or agencies
29 // within the U.S. Department of Defense. The U.S. Government retains all
30 // rights to use, duplicate, distribute, disclose, or release this software.
31 //
32 // Pursuant to DoD Directive 523024
33 //
34 // DISTRIBUTION STATEMENT A: This software has been approved for public
35 // release, distribution is unlimited.
36 //
37 //==============================================================================
38 
46 #ifndef CLASS_EARTHORIENT_INCLUDE
47 #define CLASS_EARTHORIENT_INCLUDE
48 
49 //------------------------------------------------------------------------------------
50 // system includes
51 #include <iomanip>
52 #include <iostream>
53 #include <vector>
54 // GNSSTk
55 #include "Exception.hpp"
56 #include "Matrix.hpp"
57 #include "Position.hpp"
58 #include "Triple.hpp"
59 // geomatics
60 #include "EphTime.hpp"
61 #include "IERSConvention.hpp"
62 
63 //------------------------------------------------------------------------------------
64 namespace gnsstk
65 {
66 
94  {
95  public:
97  double xp;
98 
100  double yp;
101 
103  double UT1mUTC;
104 
107 
110  : xp(0), yp(0), UT1mUTC(0), convention(IERSConvention::Unknown)
111  {
112  }
113 
115  friend std::ostream& operator<<(std::ostream& s,
116  const EarthOrientation& );
117 
118  //------------------------------------------------------------------------------
119  // constants
120 
125  static const double JulianEpoch;
126 
131  static const int intJulianEpoch;
132 
134  static const double PI, TWOPI, HALFPI;
135 
137  static const double DEG_TO_RAD, RAD_TO_DEG;
138 
140  static const double ARCSEC_TO_RAD;
141 
143  static const double ARCSEC_PER_CIRCLE;
144 
145  //------------------------------------------------------------------------------
146  // interpolation of data from EOPStore to get EOPs
162  void interpolateEOP(const EphTime& ttag, const std::vector<double>& time,
163  const std::vector<double>& X,
164  const std::vector<double>& Y, std::vector<double>& dT,
165  const IERSConvention& conv);
166 
167  //------------------------------------------------------------------------------
177  static double coordTransTime(EphTime t);
178 
179  //------------------------------------------------------------------------------
187  static double Omega(double T);
188 
189  //------------------------------------------------------------------------------
197  static double Omega2003(double T);
198 
199  //------------------------------------------------------------------------------
207  static double F(double T);
208 
209  //------------------------------------------------------------------------------
217  static double D(double T);
218 
219  //------------------------------------------------------------------------------
227  static double L(double T);
228 
229  //------------------------------------------------------------------------------
237  static double Lp(double T);
238 
239  //------------------------------------------------------------------------------
246  static double LMe(double T);
247 
248  //------------------------------------------------------------------------------
255  static double LV(double T);
256 
257  //------------------------------------------------------------------------------
264  static double LE(double T);
265 
266  //------------------------------------------------------------------------------
273  static double LMa(double T);
274 
275  //------------------------------------------------------------------------------
282  static double LJ(double T);
283 
284  //------------------------------------------------------------------------------
291  static double LS(double T);
292 
293  //------------------------------------------------------------------------------
300  static double LU(double T);
301 
302  //------------------------------------------------------------------------------
309  static double LN(double T);
310 
311  //------------------------------------------------------------------------------
318  static double Pa(double T);
319 
320  //------------------------------------------------------------------------------
329  double obliquity(double T);
330 
331  //------------------------------------------------------------------------------
346  double GMST(const EphTime& t, bool reduced = false);
347 
348  //------------------------------------------------------------------------------
363  double GAST(const EphTime& t, bool reduced = false);
364 
365  //------------------------------------------------------------------------------
374 
375  //------------------------------------------------------------------------------
384 
385  //------------------------------------------------------------------------------
386  // Nutation of the obliquity (deps) and of the longitude (dpsi)
387  // @param T the coordinate transformation time at the time of interest
388  // @param deps nutation of the obliquity (output) in radians
389  // @param dpsi nutation of the longitude (output) in radians
390  // @throw Exception if convention is not defined
391  // void nutationAngles(double T, double& deps, double& dpsi)
392 
393  //------------------------------------------------------------------------------
401 
402  //------------------------------------------------------------------------------
413 
414  //------------------------------------------------------------------------------
429  Matrix<double> ECEFtoInertial(const EphTime& t, bool reduced = false);
430 
431  //------------------------------------------------------------------------------
439  Matrix<double> ECEFtoJ2000(const EphTime& t, bool reduced = false);
440 
441  private:
442  //------------------------------------------------------------------------------
456  static double S(double T, double& X, double& Y,
458 
459  //------------------------------------------------------------------------------
468  static double Sprime(double T);
469 
471  static double Sprime(EphTime t)
472  {
473  return Sprime(coordTransTime(t));
474  }
475 
476  //------------------------------------------------------------------------------
487  static void XYCIO(double& T, double& X, double& Y);
488 
489  //------------------------------------------------------------------------------
501  static double EarthRotationAngle(const EphTime& t, double& UT1mUTC);
502 
503  //------------------------------------------------------------------------------
512  static double equationOfEquinoxes2003(EphTime t);
513 
514  //------------------------------------------------------------------------------
524  static void UT1mUTCTidalCorrections(double T, double& UT1mUTR,
525  double& dlodR,
526  double& domegaR);
527 
528  //------------------------------------------------------------------------------
536  static double obliquity1996(double T);
537 
538  //------------------------------------------------------------------------------
545  static double obliquity2010(double T);
546 
547  //------------------------------------------------------------------------------
562  static double GMST1996(EphTime t, double UT1mUTC, bool reduced = false);
563 
564  //------------------------------------------------------------------------------
576  static double GMST2003(EphTime t, double UT1mUTC);
577 
578  //------------------------------------------------------------------------------
590  static double GMST2010(EphTime t, double UT1mUTC);
591 
592  //------------------------------------------------------------------------------
631  static double gast1996(EphTime t, double om, double eps, double dpsi,
632  double UT1mUTC);
633 
634  //------------------------------------------------------------------------------
645  static double GAST1996(EphTime t, double UT1mUTC, bool reduced = false);
646 
647  //------------------------------------------------------------------------------
658  static double GAST2003(EphTime t, double UT1mUTC);
659 
660  //------------------------------------------------------------------------------
671  static double GAST2010(EphTime t, double UT1mUTC);
672 
673  //------------------------------------------------------------------------------
681  static Matrix<double> polarMotionMatrix1996(double xp, double yp);
682 
683  //------------------------------------------------------------------------------
695  double yp);
696 
697  //------------------------------------------------------------------------------
703  static void FukushimaWilliams(double T, double& gamb, double& phib,
704  double& psib, double& eps);
705 
706  //------------------------------------------------------------------------------
727  static Matrix<double> FukushimaWilliams(double gamb, double phib,
728  double psib, double epsa);
729 
730  //------------------------------------------------------------------------------
740  static void nutationAngles1996(double T, double& deps, double& dpsi,
741  double& om);
742 
743  //------------------------------------------------------------------------------
751  static void nutationAngles2003(double T, double& deps,
752  double& dpsi);
753 
754  //------------------------------------------------------------------------------
762  static void nutationAngles2010(double T, double& deps,
763  double& dpsi);
764 
765  //------------------------------------------------------------------------------
773  static Matrix<double> nutationMatrix(double eps, double dpsi,
774  double deps);
775 
776  //------------------------------------------------------------------------------
782  static Matrix<double> nutationMatrix1996(double T);
783 
784  //------------------------------------------------------------------------------
791  static Matrix<double> nutationMatrix2003(double T);
792 
793  //------------------------------------------------------------------------------
800  static Matrix<double> nutationMatrix2010(double T);
801 
802  //------------------------------------------------------------------------------
808  static Matrix<double> precessionMatrix1996(double T);
809 
810  //------------------------------------------------------------------------------
817  static Matrix<double> precessionMatrix2003(double T);
818 
819  //------------------------------------------------------------------------------
825  static void precessionRateCorrections2003(double T, double& dpsi,
826  double& deps);
827 
828  //------------------------------------------------------------------------------
835 
836  //------------------------------------------------------------------------------
843  static Matrix<double> precessionMatrix2010(double T);
844 
845  //------------------------------------------------------------------------------
855  static Matrix<double> preciseEarthRotation2003(double T);
856 
857  //------------------------------------------------------------------------------
867  static Matrix<double> preciseEarthRotation2010(double T);
868 
869  //------------------------------------------------------------------------------
887  Matrix<double> ECEFtoInertial1996(EphTime t, double xp, double yp,
888  double UT1mUTC, bool reduced = false);
889 
890  //------------------------------------------------------------------------------
905  Matrix<double> ECEFtoInertial2003(EphTime t, double xp, double yp,
906  double UT1mUTC);
907 
908  //------------------------------------------------------------------------------
922  Matrix<double> ECEFtoInertial2010(EphTime t, double xp, double yp,
923  double UT1mUTC);
924 
925  }; // end class EarthOrientation
926 
927 } // end namespace gnsstk
928 
929 #endif // CLASS_EARTHORIENT_INCLUDE
gnsstk::EarthOrientation::S
static double S(double T, double &X, double &Y, IERSConvention which=IERSConvention::IERS2003)
Definition: EarthOrientation.cpp:1327
gnsstk::EarthOrientation::F
static double F(double T)
Definition: EarthOrientation.cpp:860
domegaR
domegaR
Definition: IERS1996UT1mUTCData.hpp:55
gnsstk::EarthOrientation::TWOPI
static const double TWOPI
Definition: EarthOrientation.hpp:134
gnsstk::EarthOrientation::ECEFtoInertial1996
Matrix< double > ECEFtoInertial1996(EphTime t, double xp, double yp, double UT1mUTC, bool reduced=false)
Definition: EarthOrientation.cpp:2854
gnsstk::EarthOrientation::LMa
static double LMa(double T)
Definition: EarthOrientation.cpp:947
gnsstk::EarthOrientation::EarthOrientation
EarthOrientation()
Constructor.
Definition: EarthOrientation.hpp:109
EphTime.hpp
gnsstk::EarthOrientation::GMST2003
static double GMST2003(EphTime t, double UT1mUTC)
Definition: EarthOrientation.cpp:2025
gnsstk::EarthOrientation::obliquity2010
static double obliquity2010(double T)
Definition: EarthOrientation.cpp:1938
gnsstk::EarthOrientation::XYCIO
static void XYCIO(double &T, double &X, double &Y)
Definition: EarthOrientation.cpp:1601
gnsstk::EarthOrientation::polarMotionMatrix2003
static Matrix< double > polarMotionMatrix2003(EphTime t, double xp, double yp)
Definition: EarthOrientation.cpp:2286
gnsstk::EarthOrientation::nutationMatrix2010
static Matrix< double > nutationMatrix2010(double T)
Definition: EarthOrientation.cpp:2630
gnsstk::EarthOrientation::nutationMatrix2003
static Matrix< double > nutationMatrix2003(double T)
Definition: EarthOrientation.cpp:2612
gnsstk::EarthOrientation::GAST2010
static double GAST2010(EphTime t, double UT1mUTC)
Definition: EarthOrientation.cpp:2218
gnsstk::EarthOrientation::Pa
static double Pa(double T)
Definition: EarthOrientation.cpp:1003
gnsstk::EarthOrientation::DEG_TO_RAD
static const double DEG_TO_RAD
convert degrees to radians and back
Definition: EarthOrientation.hpp:137
gnsstk::EarthOrientation::nutationAngles2003
static void nutationAngles2003(double T, double &deps, double &dpsi)
Definition: EarthOrientation.cpp:2447
gnsstk::EarthOrientation::gast1996
static double gast1996(EphTime t, double om, double eps, double dpsi, double UT1mUTC)
Definition: EarthOrientation.cpp:2089
Position.hpp
gnsstk::EarthOrientation::nutationMatrix1996
static Matrix< double > nutationMatrix1996(double T)
Definition: EarthOrientation.cpp:2599
gnsstk::EarthOrientation::HALFPI
static const double HALFPI
Definition: EarthOrientation.hpp:134
gnsstk::EarthOrientation::precessionMatrix
Matrix< double > precessionMatrix(const EphTime &t)
Definition: EarthOrientation.cpp:1136
gnsstk::EarthOrientation::LS
static double LS(double T)
Definition: EarthOrientation.cpp:969
gnsstk::EarthOrientation::ECEFtoInertial2010
Matrix< double > ECEFtoInertial2010(EphTime t, double xp, double yp, double UT1mUTC)
Definition: EarthOrientation.cpp:3002
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::IonexStoreStrategy::Unknown
@ Unknown
Unknown or uninitialized stategy value.
gnsstk::EarthOrientation::LJ
static double LJ(double T)
Definition: EarthOrientation.cpp:958
gnsstk::EarthOrientation::yp
double yp
Polar motion angle yp, in arcseconds.
Definition: EarthOrientation.hpp:100
gnsstk::EarthOrientation::GAST
double GAST(const EphTime &t, bool reduced=false)
Definition: EarthOrientation.cpp:1078
gnsstk::EarthOrientation::interpolateEOP
void interpolateEOP(const EphTime &ttag, const std::vector< double > &time, const std::vector< double > &X, const std::vector< double > &Y, std::vector< double > &dT, const IERSConvention &conv)
Definition: EarthOrientation.cpp:158
gnsstk::EarthOrientation::GMST2010
static double GMST2010(EphTime t, double UT1mUTC)
Definition: EarthOrientation.cpp:2054
gnsstk::EarthOrientation::Lp
static double Lp(double T)
Definition: EarthOrientation.cpp:901
gnsstk::EarthOrientation::ARCSEC_TO_RAD
static const double ARCSEC_TO_RAD
convert arc seconds to radians
Definition: EarthOrientation.hpp:140
gnsstk::EarthOrientation::preciseEarthRotation
Matrix< double > preciseEarthRotation(const EphTime &t)
Definition: EarthOrientation.cpp:1220
gnsstk::EarthOrientation::polarMotionMatrix1996
static Matrix< double > polarMotionMatrix1996(double xp, double yp)
Definition: EarthOrientation.cpp:2266
gnsstk::EarthOrientation::Omega
static double Omega(double T)
Definition: EarthOrientation.cpp:832
gnsstk::EarthOrientation::Omega2003
static double Omega2003(double T)
Definition: EarthOrientation.cpp:846
gnsstk::Matrix< double >
gnsstk::EarthOrientation::UT1mUTCTidalCorrections
static void UT1mUTCTidalCorrections(double T, double &UT1mUTR, double &dlodR, double &domegaR)
Definition: EarthOrientation.cpp:1903
example4.time
time
Definition: example4.py:103
gnsstk::EarthOrientation::nutationMatrix
Matrix< double > nutationMatrix(const EphTime &t)
Definition: EarthOrientation.cpp:1184
gnsstk::EarthOrientation::precessionRateCorrections2003
static void precessionRateCorrections2003(double T, double &dpsi, double &deps)
Definition: EarthOrientation.cpp:2752
gnsstk::EarthOrientation::nutationAngles2010
static void nutationAngles2010(double T, double &deps, double &dpsi)
Definition: EarthOrientation.cpp:2572
gnsstk::EarthOrientation::ECEFtoInertial2003
Matrix< double > ECEFtoInertial2003(EphTime t, double xp, double yp, double UT1mUTC)
Definition: EarthOrientation.cpp:2925
gnsstk::EarthOrientation::GAST2003
static double GAST2003(EphTime t, double UT1mUTC)
Definition: EarthOrientation.cpp:2178
gnsstk::EphTime
Definition: EphTime.hpp:67
gnsstk::EarthOrientation::precessionMatrix2003
static Matrix< double > precessionMatrix2003(double T)
Definition: EarthOrientation.cpp:2681
gnsstk::EarthOrientation::Sprime
static double Sprime(EphTime t)
Sprime with EphTime input; cf. Sprime(double T == coordTransTime(t))
Definition: EarthOrientation.hpp:471
gnsstk::EarthOrientation::JulianEpoch
static const double JulianEpoch
Definition: EarthOrientation.hpp:125
gnsstk::EarthOrientation::L
static double L(double T)
Definition: EarthOrientation.cpp:888
gnsstk::EarthOrientation::LU
static double LU(double T)
Definition: EarthOrientation.cpp:980
gnsstk::EarthOrientation::precessionMatrix1996
static Matrix< double > precessionMatrix1996(double T)
Definition: EarthOrientation.cpp:2659
gnsstk::EarthOrientation::obliquity1996
static double obliquity1996(double T)
Definition: EarthOrientation.cpp:1923
gnsstk::EarthOrientation::LE
static double LE(double T)
Definition: EarthOrientation.cpp:937
gnsstk::IERSConvention
IERSConvention
Definition: IERSConvention.hpp:69
gnsstk::EarthOrientation::Sprime
static double Sprime(double T)
Definition: EarthOrientation.cpp:1587
gnsstk::EarthOrientation::ECEFtoJ2000
Matrix< double > ECEFtoJ2000(const EphTime &t, bool reduced=false)
gnsstk::IERSConvention::IERS2003
@ IERS2003
gnsstk::EarthOrientation::GAST1996
static double GAST1996(EphTime t, double UT1mUTC, bool reduced=false)
Definition: EarthOrientation.cpp:2142
gnsstk::EarthOrientation::LMe
static double LMe(double T)
Definition: EarthOrientation.cpp:917
gnsstk::EarthOrientation::RAD_TO_DEG
static const double RAD_TO_DEG
Definition: EarthOrientation.hpp:137
gnsstk::EarthOrientation::FukushimaWilliams
static void FukushimaWilliams(double T, double &gamb, double &phib, double &psib, double &eps)
Definition: EarthOrientation.cpp:2305
gnsstk::EarthOrientation::PI
static const double PI
pi, 2*pi and pi/2
Definition: EarthOrientation.hpp:134
gnsstk::EarthOrientation::obliquity
double obliquity(double T)
Definition: EarthOrientation.cpp:1013
gnsstk::EarthOrientation::nutationAngles1996
static void nutationAngles1996(double T, double &deps, double &dpsi, double &om)
Definition: EarthOrientation.cpp:2372
gnsstk::EarthOrientation::precessionMatrix2010
static Matrix< double > precessionMatrix2010(double T)
Definition: EarthOrientation.cpp:2779
gnsstk::EarthOrientation::operator<<
friend std::ostream & operator<<(std::ostream &s, const EarthOrientation &)
append to output stream
IERSConvention.hpp
Exception.hpp
gnsstk::EarthOrientation::LN
static double LN(double T)
Definition: EarthOrientation.cpp:991
dlodR
dlodR
Definition: IERS1996UT1mUTCData.hpp:54
gnsstk::EarthOrientation::equationOfEquinoxes2003
static double equationOfEquinoxes2003(EphTime t)
Definition: EarthOrientation.cpp:1770
gnsstk::EarthOrientation::convention
IERSConvention convention
IERS convention appropriate for this data.
Definition: EarthOrientation.hpp:106
gnsstk::EarthOrientation::ECEFtoInertial
Matrix< double > ECEFtoInertial(const EphTime &t, bool reduced=false)
Definition: EarthOrientation.cpp:1247
Triple.hpp
gnsstk::EarthOrientation::preciseEarthRotation2003
static Matrix< double > preciseEarthRotation2003(double T)
Definition: EarthOrientation.cpp:2801
gnsstk::EarthOrientation::coordTransTime
static double coordTransTime(EphTime t)
Definition: EarthOrientation.cpp:805
Matrix.hpp
gnsstk::EarthOrientation::GMST
double GMST(const EphTime &t, bool reduced=false)
Definition: EarthOrientation.cpp:1042
gnsstk::EarthOrientation::EarthRotationAngle
static double EarthRotationAngle(const EphTime &t, double &UT1mUTC)
Definition: EarthOrientation.cpp:1719
gnsstk::EarthOrientation::biasMatrix2010
static Matrix< double > biasMatrix2010()
Definition: EarthOrientation.cpp:2764
gnsstk::EarthOrientation::D
static double D(double T)
Definition: EarthOrientation.cpp:874
gnsstk::EarthOrientation
Definition: EarthOrientation.hpp:93
gnsstk::EarthOrientation::GMST1996
static double GMST1996(EphTime t, double UT1mUTC, bool reduced=false)
Definition: EarthOrientation.cpp:1960
gnsstk::EarthOrientation::xp
double xp
Polar motion angle xp, in arcseconds.
Definition: EarthOrientation.hpp:97
gnsstk::EarthOrientation::preciseEarthRotation2010
static Matrix< double > preciseEarthRotation2010(double T)
Definition: EarthOrientation.cpp:2826
gnsstk::EarthOrientation::UT1mUTC
double UT1mUTC
Time offset UT1 minus UTC, in seconds.
Definition: EarthOrientation.hpp:103
gnsstk::EarthOrientation::ARCSEC_PER_CIRCLE
static const double ARCSEC_PER_CIRCLE
how many arcseconds in 360 degrees?
Definition: EarthOrientation.hpp:143
gnsstk::EarthOrientation::polarMotionMatrix
Matrix< double > polarMotionMatrix(const EphTime &t)
Definition: EarthOrientation.cpp:1111
gnsstk::EarthOrientation::intJulianEpoch
static const int intJulianEpoch
Definition: EarthOrientation.hpp:131
gnsstk::EarthOrientation::LV
static double LV(double T)
Definition: EarthOrientation.cpp:927


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:38