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

Detailed Description

This class handles the week and seconds-of-week of the GAL TimeTag classes. The GAL week is specified by 12-bit ModWeek, rollover at 4096, bitmask 0xFFF and epoch GAL_EPOCH_MJD

Definition at line 56 of file GALWeekSecond.hpp.

#include <GALWeekSecond.hpp>

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

Public Member Functions

int bitmask (void) const
 Return the bitmask used to get the ModWeek from the full week. More...
 
 GALWeekSecond (const CommonTime &right)
 Constructor from CommonTime. More...
 
 GALWeekSecond (unsigned int w=0, double s=0., TimeSystem ts=TimeSystem::GAL) noexcept
 Constructor. More...
 
virtual std::string getDefaultFormat () const
 Return a string containing the default format to use in printing. More...
 
virtual std::string getPrintChars () const
 
long MJDEpoch (void) const
 Return the Modified Julian Date (MJD) of epoch for this system. More...
 
int Nbits (void) const
 
virtual std::string printError (const std::string &fmt) const
 
virtual std::string printf (const std::string &fmt) const
 
bool setFromInfo (const IdToValue &info)
 
GALWeekSecondweekRolloverAdj (const GALWeekSecond &refTime)
 
 ~GALWeekSecond () noexcept
 Destructor. More...
 
- Public Member Functions inherited from gnsstk::WeekSecond
 WeekSecond (unsigned int w=0, double s=0., TimeSystem ts=TimeSystem::Unknown)
 
 WeekSecond (const WeekSecond &right)
 
 WeekSecond (const TimeTag &right)
 
 WeekSecond (const CommonTime &right)
 
WeekSecondoperator= (const WeekSecond &right)
 
virtual ~WeekSecond ()
 Virtual Destructor. More...
 
virtual CommonTime convertToCommonTime () const
 
virtual void convertFromCommonTime (const CommonTime &ct)
 
virtual bool isValid () const
 Returns true if this object's members are valid, false otherwise. More...
 
virtual void reset ()
 Reset this object to the default state. More...
 
virtual unsigned int getDayOfWeek () const
 Force this interface on this classes descendants. More...
 
double getSOW () const
 
bool operator== (const WeekSecond &right) const
 
bool operator!= (const WeekSecond &right) const
 
bool operator< (const WeekSecond &right) const
 
bool operator> (const WeekSecond &right) const
 
bool operator<= (const WeekSecond &right) const
 
bool operator>= (const WeekSecond &right) const
 
- Public Member Functions inherited from gnsstk::Week
int MAXWEEK (void) const
 
Weekoperator= (const Week &right)
 Assignment Operator. More...
 
virtual int rollover (void) const
 
 Week (int w=0, TimeSystem ts=TimeSystem::Unknown)
 Constructor. More...
 
virtual ~Week ()
 Virtual Destructor. More...
 
bool operator== (const Week &right) const
 
bool operator!= (const Week &right) const
 
bool operator< (const Week &right) const
 
bool operator<= (const Week &right) const
 
bool operator> (const Week &right) const
 
bool operator>= (const Week &right) const
 
virtual unsigned int getWeek () const
 
virtual unsigned int getModWeek () const
 
virtual unsigned int getEpoch () const
 
virtual void getEpochModWeek (unsigned int &e, unsigned int &w) const
 
virtual void setEpoch (unsigned int e)
 
virtual void setModWeek (unsigned int w)
 
virtual void setEpochModWeek (unsigned int e, unsigned int w)
 
virtual void adjustToYear (unsigned int y)
 
- Public Member Functions inherited from gnsstk::TimeTag
virtual std::string asString () const
 
bool changeTimeSystem (TimeSystem timeSys)
 
bool changeTimeSystem (TimeSystem timeSys, TimeSystemConverter *conv)
 
TimeSystem getTimeSystem () const
 Obtain time system info (enum). More...
 
virtual operator CommonTime () const
 
virtual void scanf (const std::string &str, const std::string &fmt)
 
void setTimeSystem (const TimeSystem &timeSys)
 Set method for internal variable timeSystem (enum). More...
 
 TimeTag ()
 Default constructor. More...
 
 TimeTag (const TimeSystem &ts)
 Constructor. More...
 
virtual ~TimeTag ()
 Virtual Destructor. More...
 

Additional Inherited Members

- Public Types inherited from gnsstk::TimeTag
typedef std::map< char, std::string > IdToValue
 
- Static Public Member Functions inherited from gnsstk::TimeTag
static void checkTimeSystem (TimeSystem ts1, TimeSystem ts2)
 
static std::string getError ()
 This returns the default error string for the TimeTag classes. More...
 
static std::string getFormatPrefixFloat ()
 
static std::string getFormatPrefixInt ()
 
static void getInfo (const std::string &str, const std::string &fmt, IdToValue &info)
 
- Public Attributes inherited from gnsstk::WeekSecond
double sow
 
- Public Attributes inherited from gnsstk::Week
int week
 Full week number. More...
 
- Protected Attributes inherited from gnsstk::TimeTag
TimeSystem timeSystem
 time system (representation) of the data More...
 

Constructor & Destructor Documentation

◆ GALWeekSecond() [1/2]

gnsstk::GALWeekSecond::GALWeekSecond ( unsigned int  w = 0,
double  s = 0.,
TimeSystem  ts = TimeSystem::GAL 
)
inlinenoexcept

Constructor.

Definition at line 61 of file GALWeekSecond.hpp.

◆ GALWeekSecond() [2/2]

gnsstk::GALWeekSecond::GALWeekSecond ( const CommonTime right)
inline

Constructor from CommonTime.

Definition at line 68 of file GALWeekSecond.hpp.

◆ ~GALWeekSecond()

gnsstk::GALWeekSecond::~GALWeekSecond ( )
inlinenoexcept

Destructor.

Definition at line 74 of file GALWeekSecond.hpp.

Member Function Documentation

◆ bitmask()

int gnsstk::GALWeekSecond::bitmask ( void  ) const
inlinevirtual

Return the bitmask used to get the ModWeek from the full week.

Implements gnsstk::Week.

Definition at line 85 of file GALWeekSecond.hpp.

◆ getDefaultFormat()

virtual std::string gnsstk::GALWeekSecond::getDefaultFormat ( ) const
inlinevirtual

Return a string containing the default format to use in printing.

Reimplemented from gnsstk::Week.

Definition at line 106 of file GALWeekSecond.hpp.

◆ getPrintChars()

virtual std::string gnsstk::GALWeekSecond::getPrintChars ( ) const
inlinevirtual

Return a string containing the characters that this class understands when printing times.

Reimplemented from gnsstk::Week.

Definition at line 100 of file GALWeekSecond.hpp.

◆ MJDEpoch()

long gnsstk::GALWeekSecond::MJDEpoch ( void  ) const
inlinevirtual

Return the Modified Julian Date (MJD) of epoch for this system.

Implements gnsstk::Week.

Definition at line 92 of file GALWeekSecond.hpp.

◆ Nbits()

int gnsstk::GALWeekSecond::Nbits ( void  ) const
inlinevirtual

Return the number of bits in the bitmask used to get the ModWeek from the full week.

Implements gnsstk::Week.

Definition at line 78 of file GALWeekSecond.hpp.

◆ printError()

virtual std::string gnsstk::GALWeekSecond::printError ( const std::string &  fmt) const
inlinevirtual

This function works similarly to printf. Instead of filling the format with data, it fills with error messages.

Implements gnsstk::TimeTag.

Definition at line 139 of file GALWeekSecond.hpp.

◆ printf()

virtual std::string gnsstk::GALWeekSecond::printf ( const std::string &  fmt) const
inlinevirtual

This function formats this time to a string. The exceptions thrown would only be due to problems parsing the fmt string.

Implements gnsstk::TimeTag.

Definition at line 113 of file GALWeekSecond.hpp.

◆ setFromInfo()

bool gnsstk::GALWeekSecond::setFromInfo ( const IdToValue info)
inlinevirtual

Set this object using the information provided in info.

Parameters
[in]infothe IdToValue object to which this object shall be set.
Returns
true if this object was successfully set using the data in info, false if not.

Implements gnsstk::TimeTag.

Definition at line 168 of file GALWeekSecond.hpp.

◆ weekRolloverAdj()

GALWeekSecond& gnsstk::GALWeekSecond::weekRolloverAdj ( const GALWeekSecond refTime)
inline

This is, unfortunately, a duplication of what's in GPSWeekSecond. To make a polymorphic function in the parent class, WeekSecond, that worked for both GPS and Galileo would require a change of the API, and I don't want to do that right now.

Definition at line 210 of file GALWeekSecond.hpp.


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


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