#include <GPSWeek.hpp>
Inheritance diagram for GPSWeek:


It is abstract because it does not fulfill the abstract methods imposed by the TimeTag class. It handles the week portion of the GPS TimeTag classes.
All of the GPS time classes can be boiled down to just two basic types: GPSWeekZcount and GPSWeekSecond. GPSWeekZcount consists of an integer week and integer zcount. GPSWeekSecond consists of an integer week and double second.
The GPSWeek class inherits from TimeTag and handles the epoch and 10-bit week special cases: getEpoch() returns week / 1024, getWeek10() returns week 1024, getEpochWeek10(int& e, int& w) e = getEpoch(); w = getWeek10(); setEpoch(int e) sets week = (week & 0x3FF) | (e << 10); setWeek10(int w) sets week = (week & ~0x3FF) | (w & 0x3FF); setEpochWeek10(int e, int w) calls setEpoch(e); setWeek(w);
GPSWeekZcount inherits from GPSWeek and covers all Zcount-related special cases: getZcount29() returns (getWeek10() << 19) | getZcount() getZcount32() returns (getWeek() << 19) | getZcount()
setZcount29(int z) sets week = (z >> 19) & 0x3FF; zcount = z & 0x7FFFF; setZcount32(int z) sets week = z >> 19; zcount = z & 07FFFF;
GPSWeekSecond inherits from GPSWeek. I don't know of any special cases related to second-of-week.
Definition at line 78 of file GPSWeek.hpp.
Public Member Functions | |
| GPSWeek (int w=0, TimeSystem ts=TimeSystem::Unknown) throw () | |
| Constructor. | |
| virtual | ~GPSWeek () throw () |
| Virtual Destructor. | |
| GPSWeek & | operator= (const GPSWeek &right) throw () |
| Assignment Operator. | |
| virtual std::string | printf (const std::string &fmt) const throw ( gpstk::StringUtils::StringException ) |
| This function formats this time to a string. | |
| virtual std::string | printError (const std::string &fmt) const throw ( gpstk::StringUtils::StringException ) |
| This function works similarly to printf. | |
| virtual bool | setFromInfo (const IdToValue &info) throw () |
| Set this object using the information provided in info. | |
| virtual std::string | getPrintChars () const throw () |
| Return a string containing the characters that this class understands when printing times. | |
| virtual std::string | getDefaultFormat () const throw () |
| Return a string containing the default format to use in printing. | |
| virtual bool | isValid () const throw () |
| Returns true if this object's members are valid, false otherwise. | |
| virtual void | reset () throw () |
| Reset this object to the default state. | |
| virtual unsigned int | getDayOfWeek () const =0 throw () |
| Force this interface on this classes descendants. | |
Comparison Operators. | |
| bool | operator== (const GPSWeek &right) const throw () |
| bool | operator!= (const GPSWeek &right) const throw ( gpstk::InvalidRequest ) |
| bool | operator< (const GPSWeek &right) const throw ( gpstk::InvalidRequest ) |
| bool | operator<= (const GPSWeek &right) const throw ( gpstk::InvalidRequest ) |
| bool | operator> (const GPSWeek &right) const throw ( gpstk::InvalidRequest ) |
| bool | operator>= (const GPSWeek &right) const throw ( gpstk::InvalidRequest ) |
Special Epoch and 10-bit Week Methods. | |
| virtual unsigned int | getEpoch () const throw () |
| virtual unsigned int | getWeek10 () const throw () |
| virtual void | getEpochWeek10 (unsigned int &e, unsigned int &w) const throw () |
| virtual void | setEpoch (unsigned int e) throw () |
| virtual void | setWeek10 (unsigned int w) throw () |
| virtual void | setEpochWeek10 (unsigned int e, unsigned int w) throw () |
Public Attributes | |
| int | week |
Static Public Attributes | |
| const int | bits10 = 0x3FF |
| This is a 10-bit mask used in the several special Epoch and 10-bit Week methods. | |
| const int | MAX_WEEK = (CommonTime::END_LIMIT_JDAY - GPS_EPOCH_JDAY)/7 |
| This is the greatest week value for which a conversion to or from CommonTime would work. | |
|
||||||||||||
|
Constructor.
Definition at line 89 of file GPSWeek.hpp. |
|
|
Virtual Destructor.
Definition at line 96 of file GPSWeek.hpp. |
|
|
Force this interface on this classes descendants.
Implemented in GPSWeekSecond, and GPSWeekZcount. |
|
|
Return a string containing the default format to use in printing.
Implements TimeTag. Reimplemented in GPSWeekSecond, and GPSWeekZcount. Definition at line 268 of file GPSWeek.hpp. |
|
|
Definition at line 197 of file GPSWeek.hpp. |
|
||||||||||||
|
Definition at line 209 of file GPSWeek.hpp. |
|
|
Return a string containing the characters that this class understands when printing times.
Implements TimeTag. Reimplemented in GPSWeekSecond, and GPSWeekZcount. Definition at line 261 of file GPSWeek.hpp. |
|
|
Definition at line 203 of file GPSWeek.hpp. Referenced by Epoch::set(). |
|
|
Returns true if this object's members are valid, false otherwise.
Implements TimeTag. Reimplemented in GPSWeekSecond, and GPSWeekZcount. Definition at line 274 of file GPSWeek.hpp. |
|
|
Any (wildcard) type exception allowed, otherwise must be same time systems Definition at line 118 of file GPSWeek.hpp. References GPSTK_THROW. |
|
|
Any (wildcard) type exception allowed, otherwise must be same time systems Definition at line 133 of file GPSWeek.hpp. References GPSTK_THROW. |
|
|
Any (wildcard) type exception allowed, otherwise must be same time systems Definition at line 148 of file GPSWeek.hpp. References GPSTK_THROW. |
|
|
Assignment Operator.
Definition at line 46 of file GPSWeek.cpp. |
|
|
Any (wildcard) type exception allowed, otherwise must be same time systems Definition at line 106 of file GPSWeek.hpp. |
|
|
Any (wildcard) type exception allowed, otherwise must be same time systems Definition at line 163 of file GPSWeek.hpp. References GPSTK_THROW. |
|
|
Any (wildcard) type exception allowed, otherwise must be same time systems Definition at line 178 of file GPSWeek.hpp. References GPSTK_THROW. |
|
|
This function works similarly to printf. Instead of filling the format with data, it fills with error messages. Implements TimeTag. Reimplemented in GPSWeekSecond, and GPSWeekZcount. Definition at line 78 of file GPSWeek.cpp. References gpstk::StringUtils::formattedPrint(), and GPSTK_RETHROW. |
|
|
This function formats this time to a string. The exceptions thrown would only be due to problems parsing the fmt string. Implements TimeTag. Reimplemented in GPSWeekSecond, and GPSWeekZcount. Definition at line 54 of file GPSWeek.cpp. References gpstk::StringUtils::formattedPrint(), and GPSTK_RETHROW. |
|
|
Reset this object to the default state.
Implements TimeTag. Reimplemented in GPSWeekSecond, and GPSWeekZcount. Definition at line 280 of file GPSWeek.hpp. |
|
|
Definition at line 217 of file GPSWeek.hpp. Referenced by gpstk::mixedScanTime(), and Epoch::set(). |
|
||||||||||||
|
Definition at line 231 of file GPSWeek.hpp. |
|
|
Set this object using the information provided in info.
Implements TimeTag. Reimplemented in GPSWeekSecond, and GPSWeekZcount. Definition at line 108 of file GPSWeek.cpp. References gpstk::StringUtils::asInt(). |
|
|
Definition at line 224 of file GPSWeek.hpp. Referenced by gpstk::mixedScanTime(). |
|
|
This is a 10-bit mask used in the several special Epoch and 10-bit Week methods.
Definition at line 83 of file GPSWeek.hpp. |
|
|
This is the greatest week value for which a conversion to or from CommonTime would work.
Definition at line 44 of file GPSWeek.cpp. |
|
|
Definition at line 290 of file GPSWeek.hpp. Referenced by BrcKeplerOrbit::getFullWeek(), BrcClockCorrection::getFullWeek(), gpstk::mixedScanTime(), Epoch::operator GPSZcount(), PRSolution2::RAIMCompute(), Epoch::set(), and OrbElem::timeDisplay(). |
1.3.9.1