TimeSystemCorr.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 GNSSTK_TIMESYSTEMCORRECTION_INCLUDE
47 #define GNSSTK_TIMESYSTEMCORRECTION_INCLUDE
48 
49 #include "GNSSconstants.hpp"
50 #include "CommonTime.hpp"
51 #include "GPSWeekSecond.hpp"
52 #include "IRNWeekSecond.hpp"
53 #include "CivilTime.hpp"
54 
55 namespace gnsstk
56 {
57 
61  {
62  public:
64  enum CorrType
65  {
67  GPUT,
68  GAUT,
69  SBUT,
70  GLUT,
71  GPGA,
72  GAGP,
73  GLGP,
74  QZGP,
75  QZUT,
76  BDUT,
77  BDGP,
78  IRUT,
80  };
81 
84 
86  TimeSystemCorrection(std::string str);
87 
89  void init();
90 
91  void fromString(const std::string& str);
92 
98  static bool convertTimeSystemToCorrType(
100 
102  std::string asString() const;
103 
105  std::string asString4() const;
106 
108  void dump(std::ostream& s) const;
109 
112  inline bool operator==(const TimeSystemCorrection& tc) const
113  { return type == tc.type; }
114 
117  inline bool operator<(const TimeSystemCorrection& tc) const
118  { return type < tc.type; }
119 
127  bool isConverterFor(const TimeSystem& ts1, const TimeSystem& ts2) const;
128 
146  double Correction(const CommonTime& ct) const;
147 
150  void fixTimeSystem();
151 
166  double A0, A1;
168  std::string geoProvider;
169  int geoUTCid;
170 
173  }; // End of class 'TimeSystemCorrection'
174 
175 }; // end namespace
176 
177 #endif // GNSSTK_TIMESYSTEMCORRECTION_INCLUDE
gnsstk::TimeSystemCorrection::GPGA
@ GPGA
GPS to GAL using A0 = A0G , A1 = A1G.
Definition: TimeSystemCorr.hpp:71
gnsstk::TimeSystemCorrection
Definition: TimeSystemCorr.hpp:60
gnsstk::TimeSystemCorrection::dump
void dump(std::ostream &s) const
dump
Definition: TimeSystemCorr.cpp:291
gnsstk::TimeSystemCorrection::SBUT
@ SBUT
SBAS to UTC using A0, A1, incl. provider and UTC ID.
Definition: TimeSystemCorr.hpp:69
IRNWeekSecond.hpp
gnsstk::TimeSystemCorrection::GLGP
@ GLGP
GLO to GPS using A0 = TauGPS, A1 = 0.
Definition: TimeSystemCorr.hpp:73
gnsstk::TimeSystemCorrection::type
CorrType type
Definition: TimeSystemCorr.hpp:164
gnsstk::TimeSystemCorrection::A1
double A1
Definition: TimeSystemCorr.hpp:166
gnsstk::TimeSystemCorrection::refTime
CommonTime refTime
reference time for polynominal
Definition: TimeSystemCorr.hpp:167
gnsstk::TimeSystemCorrection::A0
double A0
Definition: TimeSystemCorr.hpp:166
GNSSconstants.hpp
gnsstk::TimeSystemCorrection::IRUT
@ IRUT
IRN to UTC using A0, A1.
Definition: TimeSystemCorr.hpp:78
gnsstk::TimeSystemCorrection::fromString
void fromString(const std::string &str)
Definition: TimeSystemCorr.cpp:71
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::TimeSystemCorrection::isConverterFor
bool isConverterFor(const TimeSystem &ts1, const TimeSystem &ts2) const
Definition: TimeSystemCorr.cpp:367
gnsstk::TimeSystemCorrection::CorrType
CorrType
Supported time system correction types, cf. RINEX version 3 spec.
Definition: TimeSystemCorr.hpp:64
gnsstk::TimeSystemCorrection::TimeSystemCorrection
TimeSystemCorrection()
Empty constructor.
Definition: TimeSystemCorr.cpp:45
gnsstk::TimeSystemCorrection::Unknown
@ Unknown
Definition: TimeSystemCorr.hpp:66
gnsstk::TimeSystemCorrection::asString4
std::string asString4() const
Return 4-char string version of CorrType.
Definition: TimeSystemCorr.cpp:270
gnsstk::TimeSystemCorrection::geoUTCid
int geoUTCid
Definition: TimeSystemCorr.hpp:169
gnsstk::TimeSystemCorrection::IRGP
@ IRGP
IRN to GPS using A0, A1.
Definition: TimeSystemCorr.hpp:79
gnsstk::TimeSystemCorrection::QZGP
@ QZGP
QZS to GPS using A0, A1.
Definition: TimeSystemCorr.hpp:74
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::TimeSystemCorrection::toTS
TimeSystem toTS
Definition: TimeSystemCorr.hpp:165
gnsstk::TimeSystemCorrection::GPUT
@ GPUT
GPS to UTC using A0, A1.
Definition: TimeSystemCorr.hpp:67
gnsstk::TimeSystem
TimeSystem
Definition of various time systems.
Definition: TimeSystem.hpp:51
CivilTime.hpp
gnsstk::TimeSystemCorrection::operator==
bool operator==(const TimeSystemCorrection &tc) const
Definition: TimeSystemCorr.hpp:112
gnsstk::TimeSystemCorrection::convertTimeSystemToCorrType
static bool convertTimeSystemToCorrType(TimeSystem src, TimeSystem tgt, TimeSystemCorrection::CorrType &ct)
Definition: TimeSystemCorr.cpp:156
gnsstk::TimeSystemCorrection::QZUT
@ QZUT
QZS to UTC using A0, A1.
Definition: TimeSystemCorr.hpp:75
GPSWeekSecond.hpp
CommonTime.hpp
gnsstk::TimeSystemCorrection::GAGP
@ GAGP
GPS to GAL using A0 = A0G , A1 = A1G.
Definition: TimeSystemCorr.hpp:72
gnsstk::TimeSystemCorrection::Correction
double Correction(const CommonTime &ct) const
Definition: TimeSystemCorr.cpp:388
gnsstk::TimeSystemCorrection::BDGP
@ BDGP
BDT to GPS using A0, A1 !! not in RINEX.
Definition: TimeSystemCorr.hpp:77
gnsstk::TimeSystemCorrection::operator<
bool operator<(const TimeSystemCorrection &tc) const
Definition: TimeSystemCorr.hpp:117
gnsstk::TimeSystemCorrection::init
void init()
Definition: TimeSystemCorr.cpp:61
gnsstk::TimeSystemCorrection::frTS
TimeSystem frTS
Definition: TimeSystemCorr.hpp:165
gnsstk::TimeSystemCorrection::BDUT
@ BDUT
BDT to UTC using A0, A1.
Definition: TimeSystemCorr.hpp:76
gnsstk::TimeSystemCorrection::geoProvider
std::string geoProvider
string 'EGNOS' 'WAAS' or 'MSAS'
Definition: TimeSystemCorr.hpp:168
gnsstk::TimeSystemCorrection::GLUT
@ GLUT
GLO to UTC using A0 = -TauC , A1 = 0.
Definition: TimeSystemCorr.hpp:70
gnsstk::TimeSystemCorrection::fixTimeSystem
void fixTimeSystem()
Definition: TimeSystemCorr.cpp:580
gnsstk::TimeSystemCorrection::GAUT
@ GAUT
GAL to UTC using A0, A1.
Definition: TimeSystemCorr.hpp:68
gnsstk::TimeSystemCorrection::asString
std::string asString() const
Return readable string version of CorrType.
Definition: TimeSystemCorr.cpp:248


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