Defines a base class that provide the ability to convert between time systems, using data extracted from GNSS navigation messages. The algorithm and parameters are largely the same across systems, so this is basically the TimeOffset equivalent of OrbitDataKepler, in that it contains data and algorithms to use it.
Section 20.3.3.5.2.4, paragraph b of IS-GPS-200 goes into details about how the future leap seconds (ΔtLSF) are handled. This text makes assumptions about the tying of time representation (seconds of day) and the time system (UTC) which are not true for gnsstk. Specifically, the IS allows for the leap second to be represented as 86400+ seconds of day, which the gnsstk currently rejects as an error. These leap seconds are currently not representable in the gnsstk, but the offset can still be used the rest of the time. This means that an attempt to display UTC time during the period of a leap second will be incorrect, but for now we're chosing to ignore this inconsistency rather than completely refactor the time classes again for 1 second every few years in UTC only.
Definition at line 72 of file StdNavTimeOffset.hpp.
#include <StdNavTimeOffset.hpp>
Public Member Functions | |
void | dump (std::ostream &s, DumpDetail dl) const override |
virtual double | effEnd () const |
virtual double | effStart () const |
TimeCvtSet | getConversions () const override |
bool | getOffset (TimeSystem fromSys, TimeSystem toSys, const CommonTime &when, double &offset) const override |
StdNavTimeOffset () | |
Initialize all data to 0. More... | |
![]() | |
std::list< std::string > | compare (const NavDataPtr &right) const override |
CommonTime | getNearTime () const override |
bool | isSameData (const NavDataPtr &right) const override |
TimeOffsetData () | |
Set the messageType. More... | |
virtual | ~TimeOffsetData () |
Obligatory virtual destructor. More... | |
![]() | |
virtual NavDataPtr | clone () const =0 |
Create a deep copy of this object, whatever it truly is. More... | |
virtual std::string | getClassName () const |
std::string | getDumpTime (DumpDetail dl, const CommonTime &t) const |
std::string | getDumpTimeHdr (DumpDetail dl) const |
std::string | getSignalString () const |
bool | getSVN (const SatID &sat, const gnsstk::CommonTime &when, std::string &svn) const |
virtual CommonTime | getUserTime () const |
NavData () | |
Initialize internal data fields. More... | |
virtual bool | validate () const =0 |
Public Attributes | |
double | a0 |
Bias coefficient of source time scale. More... | |
double | a1 |
Drift coefficient of source time scale. More... | |
double | a2 |
Drift rate coefficient of source time scale. More... | |
double | deltatLS |
Current or past leap second count (UTC only). More... | |
double | deltatLSF |
Current or future leap second count (UTC only). More... | |
unsigned | dn |
Leap second reference day number (UTC only). More... | |
unsigned | dnSun |
dn value for Sunday. More... | |
CommonTime | effTime |
Effectivity time (wnLSF,dn). More... | |
CommonTime | refTime |
Reference time for computation. More... | |
TimeSystem | src |
Source time system. More... | |
TimeSystem | tgt |
Target time system. More... | |
double | tot |
Time data reference time of week (storage only). More... | |
unsigned | wnLSF |
Leap second reference week number (UTC only). More... | |
unsigned | wnot |
Time data reference week number (storage only). More... | |
![]() | |
NavMessageID | signal |
Source signal identification for this navigation message data. More... | |
CommonTime | timeStamp |
std::string | weekFmt |
Additional Inherited Members | |
![]() | |
static gnsstk::SatMetaDataStore * | getSatMetaDataStore () |
Accessor for python. More... | |
static void | setSatMetaDataStore (gnsstk::SatMetaDataStore *smds) |
Accessor for python. More... | |
![]() | |
static const GNSSTK_EXPORT std::string | dumpTimeFmt |
Time format used for the dump method (Full). More... | |
static const GNSSTK_EXPORT std::string | dumpTimeFmtBrief |
Time format used for the dump method (Brief). More... | |
static GNSSTK_EXPORT gnsstk::SatMetaDataStore * | satMetaDataStore = nullptr |
Set this to a valid store to get PRN->SVN translations in dump(). More... | |
![]() | |
double | msgLenSec |
gnsstk::StdNavTimeOffset::StdNavTimeOffset | ( | ) |
Initialize all data to 0.
Definition at line 47 of file StdNavTimeOffset.cpp.
|
overridevirtual |
Print the contents of this object in a human-readable format.
[in,out] | s | The stream to write the data to. |
[in] | dl | The level of detail the output should contain. |
Reimplemented from gnsstk::NavData.
Definition at line 97 of file StdNavTimeOffset.cpp.
|
inlinevirtual |
Return the number of seconds after the effectivity time during which the standard delta t formula is used.
Reimplemented in gnsstk::BDSD1NavTimeOffset, and gnsstk::BDSD2NavTimeOffset.
Definition at line 108 of file StdNavTimeOffset.hpp.
|
inlinevirtual |
Return the number of seconds prior to the effectivity time during which the standard delta t formula is used.
Reimplemented in gnsstk::BDSD1NavTimeOffset, and gnsstk::BDSD2NavTimeOffset.
Definition at line 104 of file StdNavTimeOffset.hpp.
|
overridevirtual |
The set of time system conversions this class is capable of making.
Implements gnsstk::TimeOffsetData.
Definition at line 153 of file StdNavTimeOffset.cpp.
|
overridevirtual |
Get the offset, in seconds, to apply to times when converting them from fromSys to toSys.
[in] | fromSys | The time system to convert from. |
[in] | toSys | The time system to convert to. |
[in] | when | The time being converted, in the same time system as fromSys. |
[out] | offset | The offset in seconds where when(toSys)=when(fromSys)-offset. |
AssertionFailure | if when's time system is not fromSys. |
Implements gnsstk::TimeOffsetData.
Definition at line 56 of file StdNavTimeOffset.cpp.
double gnsstk::StdNavTimeOffset::a0 |
Bias coefficient of source time scale.
Definition at line 122 of file StdNavTimeOffset.hpp.
double gnsstk::StdNavTimeOffset::a1 |
Drift coefficient of source time scale.
Definition at line 123 of file StdNavTimeOffset.hpp.
double gnsstk::StdNavTimeOffset::a2 |
Drift rate coefficient of source time scale.
Definition at line 124 of file StdNavTimeOffset.hpp.
double gnsstk::StdNavTimeOffset::deltatLS |
Current or past leap second count (UTC only).
Definition at line 125 of file StdNavTimeOffset.hpp.
double gnsstk::StdNavTimeOffset::deltatLSF |
Current or future leap second count (UTC only).
Definition at line 135 of file StdNavTimeOffset.hpp.
unsigned gnsstk::StdNavTimeOffset::dn |
Leap second reference day number (UTC only).
Definition at line 134 of file StdNavTimeOffset.hpp.
unsigned gnsstk::StdNavTimeOffset::dnSun |
dn value for Sunday.
Definition at line 136 of file StdNavTimeOffset.hpp.
CommonTime gnsstk::StdNavTimeOffset::effTime |
Effectivity time (wnLSF,dn).
Definition at line 127 of file StdNavTimeOffset.hpp.
CommonTime gnsstk::StdNavTimeOffset::refTime |
Reference time for computation.
Definition at line 126 of file StdNavTimeOffset.hpp.
TimeSystem gnsstk::StdNavTimeOffset::src |
Source time system.
Definition at line 120 of file StdNavTimeOffset.hpp.
TimeSystem gnsstk::StdNavTimeOffset::tgt |
Target time system.
Definition at line 121 of file StdNavTimeOffset.hpp.
double gnsstk::StdNavTimeOffset::tot |
Time data reference time of week (storage only).
Definition at line 128 of file StdNavTimeOffset.hpp.
unsigned gnsstk::StdNavTimeOffset::wnLSF |
Leap second reference week number (UTC only).
Definition at line 133 of file StdNavTimeOffset.hpp.
unsigned gnsstk::StdNavTimeOffset::wnot |
Time data reference week number (storage only).
Definition at line 129 of file StdNavTimeOffset.hpp.