Public Member Functions | Public Attributes | List of all members
gnsstk::StdNavTimeOffset Class Reference

Detailed Description

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>

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

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...
 
- Public Member Functions inherited from gnsstk::TimeOffsetData
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...
 
- Public Member Functions inherited from gnsstk::NavData
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...
 
- Public Attributes inherited from gnsstk::NavData
NavMessageID signal
 Source signal identification for this navigation message data. More...
 
CommonTime timeStamp
 
std::string weekFmt
 

Additional Inherited Members

- Static Public Member Functions inherited from gnsstk::NavData
static gnsstk::SatMetaDataStoregetSatMetaDataStore ()
 Accessor for python. More...
 
static void setSatMetaDataStore (gnsstk::SatMetaDataStore *smds)
 Accessor for python. More...
 
- Static Public Attributes inherited from gnsstk::NavData
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::SatMetaDataStoresatMetaDataStore = nullptr
 Set this to a valid store to get PRN->SVN translations in dump(). More...
 
- Protected Attributes inherited from gnsstk::NavData
double msgLenSec
 

Constructor & Destructor Documentation

◆ StdNavTimeOffset()

gnsstk::StdNavTimeOffset::StdNavTimeOffset ( )

Initialize all data to 0.

Definition at line 47 of file StdNavTimeOffset.cpp.

Member Function Documentation

◆ dump()

void gnsstk::StdNavTimeOffset::dump ( std::ostream &  s,
DumpDetail  dl 
) const
overridevirtual

Print the contents of this object in a human-readable format.

Parameters
[in,out]sThe stream to write the data to.
[in]dlThe level of detail the output should contain.
Todo:
maybe need to make this a dynamic label for systems that start at DN=0

Reimplemented from gnsstk::NavData.

Definition at line 97 of file StdNavTimeOffset.cpp.

◆ effEnd()

virtual double gnsstk::StdNavTimeOffset::effEnd ( ) const
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.

◆ effStart()

virtual double gnsstk::StdNavTimeOffset::effStart ( ) const
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.

◆ getConversions()

TimeCvtSet gnsstk::StdNavTimeOffset::getConversions ( ) const
overridevirtual

The set of time system conversions this class is capable of making.

Returns
a set of supported time system conversion to/from pairs.

Implements gnsstk::TimeOffsetData.

Definition at line 153 of file StdNavTimeOffset.cpp.

◆ getOffset()

bool gnsstk::StdNavTimeOffset::getOffset ( TimeSystem  fromSys,
TimeSystem  toSys,
const CommonTime when,
double &  offset 
) const
overridevirtual

Get the offset, in seconds, to apply to times when converting them from fromSys to toSys.

Parameters
[in]fromSysThe time system to convert from.
[in]toSysThe time system to convert to.
[in]whenThe time being converted, in the same time system as fromSys.
[out]offsetThe offset in seconds where when(toSys)=when(fromSys)-offset.
Exceptions
AssertionFailureif when's time system is not fromSys.
Returns
true if an offset is available, false if not.

Implements gnsstk::TimeOffsetData.

Definition at line 56 of file StdNavTimeOffset.cpp.

Member Data Documentation

◆ a0

double gnsstk::StdNavTimeOffset::a0

Bias coefficient of source time scale.

Definition at line 122 of file StdNavTimeOffset.hpp.

◆ a1

double gnsstk::StdNavTimeOffset::a1

Drift coefficient of source time scale.

Definition at line 123 of file StdNavTimeOffset.hpp.

◆ a2

double gnsstk::StdNavTimeOffset::a2

Drift rate coefficient of source time scale.

Definition at line 124 of file StdNavTimeOffset.hpp.

◆ deltatLS

double gnsstk::StdNavTimeOffset::deltatLS

Current or past leap second count (UTC only).

Definition at line 125 of file StdNavTimeOffset.hpp.

◆ deltatLSF

double gnsstk::StdNavTimeOffset::deltatLSF

Current or future leap second count (UTC only).

Definition at line 135 of file StdNavTimeOffset.hpp.

◆ dn

unsigned gnsstk::StdNavTimeOffset::dn

Leap second reference day number (UTC only).

Definition at line 134 of file StdNavTimeOffset.hpp.

◆ dnSun

unsigned gnsstk::StdNavTimeOffset::dnSun

dn value for Sunday.

Definition at line 136 of file StdNavTimeOffset.hpp.

◆ effTime

CommonTime gnsstk::StdNavTimeOffset::effTime

Effectivity time (wnLSF,dn).

Definition at line 127 of file StdNavTimeOffset.hpp.

◆ refTime

CommonTime gnsstk::StdNavTimeOffset::refTime

Reference time for computation.

Definition at line 126 of file StdNavTimeOffset.hpp.

◆ src

TimeSystem gnsstk::StdNavTimeOffset::src

Source time system.

Definition at line 120 of file StdNavTimeOffset.hpp.

◆ tgt

TimeSystem gnsstk::StdNavTimeOffset::tgt

Target time system.

Definition at line 121 of file StdNavTimeOffset.hpp.

◆ tot

double gnsstk::StdNavTimeOffset::tot

Time data reference time of week (storage only).

Definition at line 128 of file StdNavTimeOffset.hpp.

◆ wnLSF

unsigned gnsstk::StdNavTimeOffset::wnLSF

Leap second reference week number (UTC only).

Definition at line 133 of file StdNavTimeOffset.hpp.

◆ wnot

unsigned gnsstk::StdNavTimeOffset::wnot

Time data reference week number (storage only).

Definition at line 129 of file StdNavTimeOffset.hpp.


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


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