#include <GPSZcount.hpp>
A valid GPS week is in the following range: 0 <= week <= numerical_limits<short>::max() A valid GPS Z-count is in the following range: 0 <= zcount < 403200
In Z-count addition, if a specified Z-count value is above or below the given range of valid Z-counts, the appropriate number of GPS weeks-worth of Z-counts are added or subtracted from the given value so that it falls within the acceptable range. These extra weeks are then accounted for in the weeks data member. If the addition or subtraction of these additional weeks cause the GPS week value to go out-of-bounds, an InvalidRequest exception is thrown.
Definition at line 76 of file GPSZcount.hpp.
Public Member Functions | |
| GPSZcount (short inWeek, long inZcount) throw (gpstk::InvalidParameter) | |
| Separate Week and Z-count Constructor. | |
| GPSZcount (long inFullZcount=0) throw (gpstk::InvalidParameter) | |
| Full Z-count Constructor. | |
| ~GPSZcount () throw () | |
| Destructor. Does nothing. | |
| GPSZcount (const GPSZcount &right) throw () | |
| Copy Constructor. | |
| short | getWeek () const throw () |
| GPS week accessor. | |
| long | getZcount () const throw () |
| GPS Z-count accessor. | |
| long | getFullZcount () const throw () |
| Construct, from the data members, the Z-count which could have been broadcast from an SV. | |
| double | getTotalZcounts () const throw () |
| Calculate the total number of Z-counts in this object. | |
| GPSZcount & | setWeek (short inWeek) throw (gpstk::InvalidParameter) |
| Set the GPS week. | |
| GPSZcount & | setZcount (long inZcount) throw (gpstk::InvalidParameter) |
| Set the GPS Z-count. | |
| GPSZcount & | setFullZcount (long inZcount) throw (gpstk::InvalidParameter) |
| Set the GPS Week and Z-count using the value broadcast from an SV. | |
| GPSZcount & | addWeeks (short inWeeks) throw (gpstk::InvalidRequest) |
| Add the given number of weeks to the current value. | |
| GPSZcount & | addZcounts (long inZcounts) throw (gpstk::InvalidRequest) |
| Add the given number of Z-counts to the current value. | |
| GPSZcount | operator++ (int) throw (gpstk::InvalidRequest) |
| Postfix Increment the Z-count in this object (x++). | |
| GPSZcount & | operator++ () throw (gpstk::InvalidRequest) |
| Prefix Increment the Z-count in this object (++x). | |
| GPSZcount | operator-- (int) throw (gpstk::InvalidRequest) |
| Postfix Decrement the Z-count in this object (x--). | |
| GPSZcount & | operator-- () throw (gpstk::InvalidRequest) |
| Prefix Decrement the Z-count in this object (--x). | |
| GPSZcount | operator+ (long inZcounts) const throw (gpstk::InvalidRequest) |
| Add the given number of Z-counts to the current value. | |
| GPSZcount | operator- (long inZcounts) const throw (gpstk::InvalidRequest) |
| Subtract the given number of Z-counts from the current value. | |
| double | operator- (const GPSZcount &right) const throw () |
| Compute the time differenct between this object and right. | |
| long | operator% (const long right) const throw () |
| Compute the remainder of the ztime. | |
| GPSZcount & | operator+= (long inZcounts) throw (gpstk::InvalidRequest) |
| Add the given number of Z-counts to the current value. | |
| GPSZcount & | operator-= (long inZcounts) throw (gpstk::InvalidRequest) |
| Subtract the given number of Z-counts from the current value. | |
| GPSZcount & | operator= (const GPSZcount &right) throw () |
| Assignment operator. | |
| bool | operator< (const GPSZcount &right) const throw () |
| Comparison operator (less-than). | |
| bool | operator> (const GPSZcount &right) const throw () |
| Comparison operator (greater-than). | |
| bool | operator== (const GPSZcount &right) const throw () |
| Equality operator. | |
| bool | operator!= (const GPSZcount &right) const throw () |
| Inequality operator. | |
| bool | operator<= (const GPSZcount &right) const throw () |
| Comparison operator (less-than or equal-to). | |
| bool | operator>= (const GPSZcount &right) const throw () |
| Comparison operator (greater-than or equal-to). | |
| operator std::string () const throw () | |
| Convert this object to a string. | |
| bool | inSameTimeBlock (const GPSZcount &other, unsigned long inZcountBlock, unsigned long inZcountOffset=0) throw () |
| This is a test of whether or not this object and the given GPSZcount object are within the same time-block. | |
| void | dump (std::ostream &out, short level=0) const throw () |
| Dump the contents of this object to the given output stream. | |
Static Public Attributes | |
| const long | ZCOUNT_MINUTE = 40 |
| Z-counts per minute (40). | |
| const long | ZCOUNT_HOUR = 2400 |
| Z-counts per hour (2400). | |
| const long | ZCOUNT_DAY = 57600 |
| Z-counts per day (57600). | |
| const long | ZCOUNT_WEEK = 403200 |
| Z-counts per whole GPS week. (403200). | |
Static Protected Member Functions | |
| long | validZcount (long z) throw () |
| Check the validity of the given Z-count. | |
Protected Attributes | |
| short | week |
| GPS full week. (0 <= week). | |
| long | zcount |
| GPS Z-count. (0 <= zcount <= 403199). | |
|
||||||||||||
|
Separate Week and Z-count Constructor.
Definition at line 47 of file GPSZcount.cpp. References GPSTK_RETHROW. |
|
|
Full Z-count Constructor.
Definition at line 62 of file GPSZcount.cpp. References GPSTK_RETHROW. |
|
|
Destructor. Does nothing.
Definition at line 108 of file GPSZcount.hpp. |
|
|
Copy Constructor.
Definition at line 75 of file GPSZcount.cpp. |
|
|
Add the given number of weeks to the current value.
Definition at line 127 of file GPSZcount.cpp. References Exception::addText(), gpstk::StringUtils::asString(), and GPSTK_THROW. |
|
|
Add the given number of Z-counts to the current value. This may cause a roll-(over/under) of the Z-count and appropriate modification of the week.
Definition at line 148 of file GPSZcount.cpp. References Exception::addText(), gpstk::StringUtils::asString(), GPSTK_RETHROW, and GPSTK_THROW. Referenced by GPSZcount::operator+(), GPSZcount::operator++(), and GPSZcount::operator--(). |
|
||||||||||||
|
Dump the contents of this object to the given output stream.
Definition at line 367 of file GPSZcount.cpp. Referenced by main(), and gpstk::operator<<(). |
|
|
Construct, from the data members, the Z-count which could have been broadcast from an SV.
Definition at line 129 of file GPSZcount.hpp. |
|
|
Calculate the total number of Z-counts in this object.
Definition at line 136 of file GPSZcount.hpp. |
|
|
GPS week accessor.
Definition at line 117 of file GPSZcount.hpp. Referenced by main(). |
|
|
GPS Z-count accessor.
Definition at line 121 of file GPSZcount.hpp. Referenced by main(). |
|
||||||||||||||||
|
This is a test of whether or not this object and the given GPSZcount object are within the same time-block. Say you need to find out if the two GPSZcounts are: ... in the same day: inZcountBlock == ZCOUNT_DAY ... or the same minute: inZcountBlock == ZCOUNT_MINUTE etc. For inZcountBlock < ZCOUNT_WEEK, blocks start at the beginning of the week. For inZcountBlock >= ZCOUNT_WEEK, blocks start at the beginning of GPS Week 0. inZcountOffset allows checking of times off of the usual boundaries i.e. in the same day where a day is defined as starting at noon instead of at midnight, or in the same minute where a minute starts at 23 seconds instead of zero.
Definition at line 338 of file GPSZcount.cpp. |
|
|
Convert this object to a string.
Definition at line 332 of file GPSZcount.cpp. |
|
|
Inequality operator.
Definition at line 314 of file GPSZcount.cpp. References gpstk::operator==(). |
|
|
Compute the remainder of the ztime.
Definition at line 247 of file GPSZcount.cpp. |
|
|
Add the given number of Z-counts to the current value. This may cause a roll-(over/under) of the Z-count and appropriate modification of the week.
Definition at line 228 of file GPSZcount.cpp. References GPSZcount::addZcounts(). |
|
|
Prefix Increment the Z-count in this object (++x). This may also cause the roll-over of the Z-count and incrementing of the week.
Definition at line 208 of file GPSZcount.cpp. References GPSZcount::addZcounts(). |
|
|
Postfix Increment the Z-count in this object (x++). This may also cause the roll-over of the Z-count and incrementing of the week.
Definition at line 200 of file GPSZcount.cpp. |
|
|
Add the given number of Z-counts to the current value. This may cause a roll-(over/under) of the Z-count and appropriate modification of the week.
Definition at line 253 of file GPSZcount.cpp. |
|
|
Compute the time differenct between this object and right.
Definition at line 240 of file GPSZcount.cpp. |
|
|
Subtract the given number of Z-counts from the current value. This may cause a roll-(over/under) of the Z-count and appropriate modification of the week.
Definition at line 234 of file GPSZcount.cpp. References gpstk::operator+(). |
|
|
Prefix Decrement the Z-count in this object (--x). This may also cause the roll-under of the Z-count and decrementing of the week.
Definition at line 222 of file GPSZcount.cpp. References GPSZcount::addZcounts(). |
|
|
Postfix Decrement the Z-count in this object (x--). This may also cause the roll-under of the Z-count and decrementing of the week.
Definition at line 214 of file GPSZcount.cpp. |
|
|
Subtract the given number of Z-counts from the current value. This may cause a roll-(over/under) of the Z-count and appropriate modification of the week.
Definition at line 259 of file GPSZcount.cpp. |
|
|
Comparison operator (less-than).
Definition at line 273 of file GPSZcount.cpp. |
|
|
Comparison operator (less-than or equal-to).
Definition at line 320 of file GPSZcount.cpp. References gpstk::operator>(). |
|
|
Assignment operator.
Definition at line 265 of file GPSZcount.cpp. |
|
|
Equality operator.
Definition at line 303 of file GPSZcount.cpp. |
|
|
Comparison operator (greater-than).
Definition at line 288 of file GPSZcount.cpp. |
|
|
Comparison operator (greater-than or equal-to).
Definition at line 326 of file GPSZcount.cpp. References gpstk::operator<(). |
|
|
Set the GPS Week and Z-count using the value broadcast from an SV.
Definition at line 107 of file GPSZcount.cpp. References GPSTK_RETHROW. |
|
|
Set the GPS week.
Definition at line 81 of file GPSZcount.cpp. References GPSTK_THROW. Referenced by main(). |
|
|
Set the GPS Z-count.
Definition at line 94 of file GPSZcount.cpp. References GPSTK_THROW. Referenced by main(). |
|
|
Check the validity of the given Z-count.
Definition at line 384 of file GPSZcount.cpp. |
|
|
GPS full week. (0 <= week).
Definition at line 351 of file GPSZcount.hpp. |
|
|
GPS Z-count. (0 <= zcount <= 403199).
Definition at line 352 of file GPSZcount.hpp. |
|
|
Z-counts per day (57600).
Definition at line 44 of file GPSZcount.cpp. |
|
|
Z-counts per hour (2400).
Definition at line 43 of file GPSZcount.cpp. |
|
|
Z-counts per minute (40).
Definition at line 42 of file GPSZcount.cpp. |
|
|
Z-counts per whole GPS week. (403200).
Definition at line 45 of file GPSZcount.cpp. |
1.3.9.1