Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
gnsstk::TimeSystemCorrection Class Reference

Detailed Description

Time System Corrections as defined in the RINEX version 3 Navigation header.

Definition at line 60 of file TimeSystemCorr.hpp.

#include <TimeSystemCorr.hpp>

Inheritance diagram for gnsstk::TimeSystemCorrection:
Inheritance graph
[legend]

Public Types

enum  CorrType {
  Unknown =0, GPUT, GAUT, SBUT,
  GLUT, GPGA, GAGP, GLGP,
  QZGP, QZUT, BDUT, BDGP,
  IRUT, IRGP
}
 Supported time system correction types, cf. RINEX version 3 spec. More...
 

Public Member Functions

std::string asString () const
 Return readable string version of CorrType. More...
 
std::string asString4 () const
 Return 4-char string version of CorrType. More...
 
double Correction (const CommonTime &ct) const
 
void dump (std::ostream &s) const
 dump More...
 
void fixTimeSystem ()
 
void fromString (const std::string &str)
 
void init ()
 
bool isConverterFor (const TimeSystem &ts1, const TimeSystem &ts2) const
 
bool operator< (const TimeSystemCorrection &tc) const
 
bool operator== (const TimeSystemCorrection &tc) const
 
 TimeSystemCorrection ()
 Empty constructor. More...
 
 TimeSystemCorrection (std::string str)
 Constructor from string. More...
 

Static Public Member Functions

static bool convertTimeSystemToCorrType (TimeSystem src, TimeSystem tgt, TimeSystemCorrection::CorrType &ct)
 

Public Attributes

double A0
 
double A1
 
TimeSystem frTS
 
std::string geoProvider
 string 'EGNOS' 'WAAS' or 'MSAS' More...
 
int geoUTCid
 
CommonTime refTime
 reference time for polynominal More...
 
TimeSystem toTS
 
CorrType type
 

Member Enumeration Documentation

◆ CorrType

Supported time system correction types, cf. RINEX version 3 spec.

Enumerator
Unknown 
GPUT 

GPS to UTC using A0, A1.

GAUT 

GAL to UTC using A0, A1.

SBUT 

SBAS to UTC using A0, A1, incl. provider and UTC ID.

GLUT 

GLO to UTC using A0 = -TauC , A1 = 0.

GPGA 

GPS to GAL using A0 = A0G , A1 = A1G.

GAGP 

GPS to GAL using A0 = A0G , A1 = A1G.

GLGP 

GLO to GPS using A0 = TauGPS, A1 = 0.

QZGP 

QZS to GPS using A0, A1.

QZUT 

QZS to UTC using A0, A1.

BDUT 

BDT to UTC using A0, A1.

BDGP 

BDT to GPS using A0, A1 !! not in RINEX.

IRUT 

IRN to UTC using A0, A1.

IRGP 

IRN to GPS using A0, A1.

Definition at line 64 of file TimeSystemCorr.hpp.

Constructor & Destructor Documentation

◆ TimeSystemCorrection() [1/2]

gnsstk::TimeSystemCorrection::TimeSystemCorrection ( )

Empty constructor.

Definition at line 45 of file TimeSystemCorr.cpp.

◆ TimeSystemCorrection() [2/2]

gnsstk::TimeSystemCorrection::TimeSystemCorrection ( std::string  str)

Constructor from string.

Definition at line 53 of file TimeSystemCorr.cpp.

Member Function Documentation

◆ asString()

std::string gnsstk::TimeSystemCorrection::asString ( ) const

Return readable string version of CorrType.

Definition at line 248 of file TimeSystemCorr.cpp.

◆ asString4()

std::string gnsstk::TimeSystemCorrection::asString4 ( ) const

Return 4-char string version of CorrType.

Definition at line 270 of file TimeSystemCorr.cpp.

◆ convertTimeSystemToCorrType()

bool gnsstk::TimeSystemCorrection::convertTimeSystemToCorrType ( TimeSystem  src,
TimeSystem  tgt,
TimeSystemCorrection::CorrType ct 
)
static

Convert a pair of TimeSystem enums to a CorrType enum.

Parameters
[in]srcThe source time system for the conversion.
[in]tgtThe target time system for the conversion.
[out]ctThe source/target time system paired enum.
Returns
false if src/tgt aren't available as a CorrType pair.

Definition at line 156 of file TimeSystemCorr.cpp.

◆ Correction()

double gnsstk::TimeSystemCorrection::Correction ( const CommonTime ct) const

Compute the conversion (in seconds) at the given time for this object (TimeSystemCorrection). The caller must ensure that the input time has the appropriate TimeSystem, it will determine the sign of the correction; it is such that it should ALWAYS be ADDED to the input time. For example, suppose this object is a "GPUT" (GPS=>UTC) correction. Then ct(GPS) + Correction(ct) will yield ct(UTC), and ct(UTC) + Correction(ct) will yield ct(GPS). [That is, Correction(ct) in the two cases differ in sign]

Parameters
[in]ctthe time at which to compute the correction; the TimeSystem of ct will determine the sign of the correction.
Returns
the correction (sec) to be added to ct to change its TimeSystem.
Exceptions
Exceptionif the input TimeSystem matches neither system in this object.

Definition at line 388 of file TimeSystemCorr.cpp.

◆ dump()

void gnsstk::TimeSystemCorrection::dump ( std::ostream &  s) const

dump

Definition at line 291 of file TimeSystemCorr.cpp.

◆ fixTimeSystem()

void gnsstk::TimeSystemCorrection::fixTimeSystem ( )

Set the time system of refTime to the appropriate value based on type (CorrType).

< GPS to UTC using A0, A1

< GLO to UTC using A0 = -TauC , A1 = 0

< GAL to UTC using A0, A1

< BDT to UTC using A0, A1

< QZS to UTC using A0, A1

< IRN to UTC using A0, A1

< SBAS to UTC using A0, A1, incl. provider and UTC ID

< GLO to GPS using A0 = TauGPS, A1 = 0

< GAL to GPS using A0 = A0G , A1 = A1G

< QZS to GPS using A0, A1

< IRN to GPS using A0, A1

< GPS to GAL using A0 = A0G , A1 = A1G, RINEX 3.03

< BDT to GPS using A0, A1 !! not in RINEX

Definition at line 580 of file TimeSystemCorr.cpp.

◆ fromString()

void gnsstk::TimeSystemCorrection::fromString ( const std::string &  str)

Definition at line 71 of file TimeSystemCorr.cpp.

◆ init()

void gnsstk::TimeSystemCorrection::init ( )

Definition at line 61 of file TimeSystemCorr.cpp.

◆ isConverterFor()

bool gnsstk::TimeSystemCorrection::isConverterFor ( const TimeSystem ts1,
const TimeSystem ts2 
) const

Return true if this object provides the correction necessary to convert between the two given time systems.

Parameters
ts1,ts2TimeSystems of interest
Returns
true if this object will convert ts1 <=> ts2
Exceptions
Exceptionif either TimeSystem is Unknown, or if they are identical.

Definition at line 367 of file TimeSystemCorr.cpp.

◆ operator<()

bool gnsstk::TimeSystemCorrection::operator< ( const TimeSystemCorrection tc) const
inline

Less than operator - required for map.find()

Warning
Only tests type, not the full set of fields

Definition at line 117 of file TimeSystemCorr.hpp.

◆ operator==()

bool gnsstk::TimeSystemCorrection::operator== ( const TimeSystemCorrection tc) const
inline

Equal operator.

Warning
Only tests type, not the full set of fields

Definition at line 112 of file TimeSystemCorr.hpp.

Member Data Documentation

◆ A0

double gnsstk::TimeSystemCorrection::A0

Definition at line 166 of file TimeSystemCorr.hpp.

◆ A1

double gnsstk::TimeSystemCorrection::A1

Definition at line 166 of file TimeSystemCorr.hpp.

◆ frTS

TimeSystem gnsstk::TimeSystemCorrection::frTS

Definition at line 165 of file TimeSystemCorr.hpp.

◆ geoProvider

std::string gnsstk::TimeSystemCorrection::geoProvider

string 'EGNOS' 'WAAS' or 'MSAS'

Definition at line 168 of file TimeSystemCorr.hpp.

◆ geoUTCid

int gnsstk::TimeSystemCorrection::geoUTCid

UTC Identifier [0 unknown, 1=UTC(NIST), 2=UTC(USNO), 3=UTC(SU), 4=UTC(BIPM), 5=UTC(Europe), 6=UTC(CRL)]

Definition at line 169 of file TimeSystemCorr.hpp.

◆ refTime

CommonTime gnsstk::TimeSystemCorrection::refTime

reference time for polynominal

Definition at line 167 of file TimeSystemCorr.hpp.

◆ toTS

TimeSystem gnsstk::TimeSystemCorrection::toTS

Definition at line 165 of file TimeSystemCorr.hpp.

◆ type

CorrType gnsstk::TimeSystemCorrection::type

Member data NOTE: User is responsible for setting the following parameters after instantiation of a TimeSystemCorrection object and prior to calling Correction( ) refWeek - must be in GPS full weeks (regardless of what GNSS is being considered.) refSOW A0 - A0utc or A0gps for most system. For GLONASS GLUT corection supply -1.0 * tau_sub_c. This convention is selected in order to maintain consistency with the RINEX documentation in Table A5. A1

Definition at line 164 of file TimeSystemCorr.hpp.


The documentation for this class was generated from the following files:


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