|
ldas-tools-al 2.6.7
|
GPS time class. More...
#include <gpstime.hh>
Public Types | |
| enum | unit_type { UTC = 0 , GPS , UTC = 0 , GPS } |
| Enumerated type to specify time format. More... | |
| enum | unit_type { UTC = 0 , GPS , UTC = 0 , GPS } |
| Enumerated type to specify time format. More... | |
| typedef INT_4U | seconds_type |
| Type representing the second portion. | |
| typedef INT_4U | seconds_type |
| Type representing the second portion. | |
| typedef INT_4U | nanoseconds_type |
| Type representing the nanosecond portion. | |
| typedef INT_4U | nanoseconds_type |
| Type representing the nanosecond portion. | |
| typedef INT_8U | gpsnanoseconds_type |
| Type represting the whole GPS time in nanoseconds. | |
| typedef INT_8U | gpsnanoseconds_type |
| Type represting the whole GPS time in nanoseconds. | |
Public Member Functions | |
| GPSTime () | |
| Constructor - default. | |
| GPSTime (const GPSTime &) | |
| Constructor - copy. | |
| GPSTime (const seconds_type seconds, const nanoseconds_type nanoseconds, unit_type Units=DEFAULT_TIME_UNIT_TYPE) | |
| Constructor. | |
| GPSTime () | |
| Constructor - default. | |
| GPSTime (const GPSTime &) | |
| Constructor - copy. | |
| GPSTime (const seconds_type seconds, const nanoseconds_type nanoseconds, unit_type Units=DEFAULT_TIME_UNIT_TYPE) | |
| Constructor. | |
| ~GPSTime () | |
| Destructor. | |
| ~GPSTime () | |
| Destructor. | |
| seconds_type | GetSeconds () const |
| Second portion of GPS time. | |
| nanoseconds_type | GetSeconds (const unit_type Units) const |
| Second portion of GPS time according to units. | |
| seconds_type | GetSeconds () const |
| Second portion of GPS time. | |
| nanoseconds_type | GetSeconds (const unit_type Units) const |
| Second portion of GPS time according to units. | |
| nanoseconds_type | GetNanoseconds () const |
| Nanosecond portion of GPS time. | |
| nanoseconds_type | GetNanoseconds () const |
| Nanosecond portion of GPS time. | |
| REAL_8 | GetTime () const |
| GPS as a floating point number. | |
| REAL_8 | GetTime () const |
| GPS as a floating point number. | |
| INT_2U | GetLeapSeconds () const |
| Retrieve the number of leap seconds for stored time. | |
| INT_2U | GetLeapSeconds () const |
| Retrieve the number of leap seconds for stored time. | |
| gpsnanoseconds_type | GPSNanoseconds () const |
| Return the time in nanosecond units. | |
| gpsnanoseconds_type | GPSNanoseconds () const |
| Return the time in nanosecond units. | |
| void | Now () |
| Sets the object to the current GPS time. | |
| void | Now () |
| Sets the object to the current GPS time. | |
| seconds_type | getSec () const |
| seconds_type | getSec () const |
| nanoseconds_type | getNSec () const |
| nanoseconds_type | getNSec () const |
| GPSTime & | operator= (const GPSTime &) |
| Assignment operator. | |
| GPSTime & | operator= (const GPSTime &) |
| Assignment operator. | |
| GPSTime & | operator+= (const double &) |
| Addition assignment. | |
| GPSTime & | operator+= (const double &) |
| Addition assignment. | |
| GPSTime & | operator-= (const double &) |
| Subtraction assignment. | |
| GPSTime & | operator-= (const double &) |
| Subtraction assignment. | |
Static Public Member Functions | |
| static GPSTime | NowGPSTime () |
| Returns the time "now" as a GPSTime. | |
| static GPSTime | NowGPSTime () |
| Returns the time "now" as a GPSTime. | |
Static Public Attributes | |
| static const unit_type | DEFAULT_TIME_UNIT_TYPE = GPSTime::GPS |
| The default time unit. | |
Static Protected Member Functions | |
| static GPSTime | now () |
| Returns the time "now" as a GPSTime. | |
| static GPSTime | now () |
| Returns the time "now" as a GPSTime. | |
GPS time class.
This class is designed to maintain GPS time information. A UTC time can be used to seed the value.
Example source http://maia.usno.navy.mil/ser7/tai-utc.dat
The environment variable GPS_LEAPSECOND_FILE can be set to specify a local GPS leap second data file.
If a data file exists, it is checked perioticly for updates.
The class is only valid for times on or after January 1st, 1970 at 00:00 GMT.
| LDASTools::AL::GPSTime::GPSTime | ( | const seconds_type | seconds, |
| const nanoseconds_type | nanoseconds, | ||
| unit_type | Units = DEFAULT_TIME_UNIT_TYPE ) |
Constructor.
Do nothing for the time in in the proper order.
|
inline |
Helper function to make it compatable with Time class of framecpp
| nanoseconds_type LDASTools::AL::GPSTime::getNSec | ( | ) | const |
Helper function to make it compatable with Time class of framecpp
|
inline |
Helper function to make it compatable with Time class of framecpp
| seconds_type LDASTools::AL::GPSTime::getSec | ( | ) | const |
Helper function to make it compatable with Time class of framecpp
|
inline |
Return the time in nanosecond units.
This routine returns the time value as the number of nanoseconds that have elapsed since the start of GPS time.
| gpsnanoseconds_type LDASTools::AL::GPSTime::GPSNanoseconds | ( | ) | const |
Return the time in nanosecond units.
|
staticprotected |
|
staticprotected |
|
static |
|
static |