#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 64 of file GPSWeek.hpp.
Public Member Functions | |
| GPSWeek (int w=0) 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 () |
| bool | operator< (const GPSWeek &right) const throw () |
| bool | operator<= (const GPSWeek &right) const throw () |
| bool | operator> (const GPSWeek &right) const throw () |
| bool | operator>= (const GPSWeek &right) const throw () |
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 75 of file GPSWeek.hpp. |
|
|
Virtual Destructor.
Definition at line 81 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 202 of file GPSWeek.hpp. |
|
|
Definition at line 131 of file GPSWeek.hpp. |
|
||||||||||||
|
Definition at line 143 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 195 of file GPSWeek.hpp. |
|
|
Definition at line 137 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 208 of file GPSWeek.hpp. |
|
|
Definition at line 97 of file GPSWeek.hpp. |
|
|
Definition at line 103 of file GPSWeek.hpp. |
|
|
Definition at line 109 of file GPSWeek.hpp. |
|
|
Assignment Operator.
Definition at line 32 of file GPSWeek.cpp. |
|
|
Definition at line 91 of file GPSWeek.hpp. |
|
|
Definition at line 115 of file GPSWeek.hpp. |
|
|
Definition at line 121 of file GPSWeek.hpp. |
|
|
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 61 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 39 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 214 of file GPSWeek.hpp. |
|
|
Definition at line 151 of file GPSWeek.hpp. Referenced by gpstk::mixedScanTime(), and Epoch::set(). |
|
||||||||||||
|
Definition at line 165 of file GPSWeek.hpp. |
|
|
Set this object using the information provided in info.
Implements TimeTag. Reimplemented in GPSWeekSecond, and GPSWeekZcount. Definition at line 89 of file GPSWeek.cpp. References gpstk::StringUtils::asInt(). |
|
|
Definition at line 158 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 69 of file GPSWeek.hpp. |
|
|
This is the greatest week value for which a conversion to or from CommonTime would work.
Definition at line 30 of file GPSWeek.cpp. |
|
|
Definition at line 224 of file GPSWeek.hpp. Referenced by gpstk::mixedScanTime(), Epoch::operator GPSZcount(), and Epoch::set(). |
1.3.9.1