ldas-tools-al 2.6.7
|
GPS time class. More...
#include <gpstime.hh>
Public Types | |
enum | unit_type { UTC = 0 , GPS , UTC = 0 , GPS , UTC = 0 , GPS } |
Enumerated type to specify time format. More... | |
enum | unit_type { UTC = 0 , GPS , UTC = 0 , GPS , UTC = 0 , GPS } |
Enumerated type to specify time format. More... | |
enum | unit_type { UTC = 0 , GPS , UTC = 0 , GPS , UTC = 0 , GPS } |
Enumerated type to specify time format. More... | |
typedef INT_4U | seconds_type |
Type representing the second portion. More... | |
typedef INT_4U | nanoseconds_type |
Type representing the nanosecond portion. More... | |
typedef INT_8U | gpsnanoseconds_type |
Type represting the whole GPS time in nanoseconds. More... | |
typedef INT_4U | seconds_type |
Type representing the second portion. More... | |
typedef INT_4U | nanoseconds_type |
Type representing the nanosecond portion. More... | |
typedef INT_8U | gpsnanoseconds_type |
Type represting the whole GPS time in nanoseconds. More... | |
typedef INT_4U | seconds_type |
Type representing the second portion. More... | |
typedef INT_4U | nanoseconds_type |
Type representing the nanosecond portion. More... | |
typedef INT_8U | gpsnanoseconds_type |
Type represting the whole GPS time in nanoseconds. More... | |
Public Member Functions | |
GPSTime () | |
Constructor - default. More... | |
GPSTime (const GPSTime &) | |
Constructor - copy. More... | |
GPSTime (const seconds_type seconds, const nanoseconds_type nanoseconds, unit_type Units=DEFAULT_TIME_UNIT_TYPE) | |
Constructor. More... | |
~GPSTime () | |
Destructor. More... | |
seconds_type | GetSeconds () const |
Second portion of GPS time. More... | |
nanoseconds_type | GetSeconds (const unit_type Units) const |
Second portion of GPS time according to units. More... | |
nanoseconds_type | GetNanoseconds () const |
Nanosecond portion of GPS time. More... | |
REAL_8 | GetTime () const |
GPS as a floating point number. More... | |
INT_2U | GetLeapSeconds () const |
Retrieve the number of leap seconds for stored time. More... | |
gpsnanoseconds_type | GPSNanoseconds () const |
Return the time in nanosecond units. More... | |
void | Now () |
Sets the object to the current GPS time. More... | |
seconds_type | getSec () const |
nanoseconds_type | getNSec () const |
GPSTime & | operator= (const GPSTime &) |
Assignment operator. More... | |
GPSTime & | operator+= (const double &) |
Addition assignment. More... | |
GPSTime & | operator-= (const double &) |
Subtraction assignment. More... | |
GPSTime () | |
Constructor - default. More... | |
GPSTime (const GPSTime &) | |
Constructor - copy. More... | |
GPSTime (const seconds_type seconds, const nanoseconds_type nanoseconds, unit_type Units=DEFAULT_TIME_UNIT_TYPE) | |
Constructor. More... | |
~GPSTime () | |
Destructor. More... | |
seconds_type | GetSeconds () const |
Second portion of GPS time. More... | |
nanoseconds_type | GetSeconds (const unit_type Units) const |
Second portion of GPS time according to units. More... | |
nanoseconds_type | GetNanoseconds () const |
Nanosecond portion of GPS time. More... | |
REAL_8 | GetTime () const |
GPS as a floating point number. More... | |
INT_2U | GetLeapSeconds () const |
Retrieve the number of leap seconds for stored time. More... | |
gpsnanoseconds_type | GPSNanoseconds () const |
Return the time in nanosecond units. More... | |
void | Now () |
Sets the object to the current GPS time. More... | |
seconds_type | getSec () const |
nanoseconds_type | getNSec () const |
GPSTime & | operator= (const GPSTime &) |
Assignment operator. More... | |
GPSTime & | operator+= (const double &) |
Addition assignment. More... | |
GPSTime & | operator-= (const double &) |
Subtraction assignment. More... | |
GPSTime () | |
Constructor - default. More... | |
GPSTime (const GPSTime &) | |
Constructor - copy. More... | |
GPSTime (const seconds_type seconds, const nanoseconds_type nanoseconds, unit_type Units=DEFAULT_TIME_UNIT_TYPE) | |
Constructor. More... | |
~GPSTime () | |
Destructor. More... | |
seconds_type | GetSeconds () const |
Second portion of GPS time. More... | |
nanoseconds_type | GetSeconds (const unit_type Units) const |
Second portion of GPS time according to units. More... | |
nanoseconds_type | GetNanoseconds () const |
Nanosecond portion of GPS time. More... | |
REAL_8 | GetTime () const |
GPS as a floating point number. More... | |
INT_2U | GetLeapSeconds () const |
Retrieve the number of leap seconds for stored time. More... | |
gpsnanoseconds_type | GPSNanoseconds () const |
Return the time in nanosecond units. More... | |
void | Now () |
Sets the object to the current GPS time. More... | |
seconds_type | getSec () const |
nanoseconds_type | getNSec () const |
GPSTime & | operator= (const GPSTime &) |
Assignment operator. More... | |
GPSTime & | operator+= (const double &) |
Addition assignment. More... | |
GPSTime & | operator-= (const double &) |
Subtraction assignment. More... | |
Static Public Member Functions | |
static GPSTime | NowGPSTime () |
Returns the time "now" as a GPSTime. More... | |
static GPSTime | NowGPSTime () |
Returns the time "now" as a GPSTime. More... | |
static GPSTime | NowGPSTime () |
Returns the time "now" as a GPSTime. More... | |
Static Public Attributes | |
static const unit_type | DEFAULT_TIME_UNIT_TYPE = GPSTime::GPS |
The default time unit. More... | |
Static Protected Member Functions | |
static GPSTime | now () |
Returns the time "now" as a GPSTime. More... | |
static GPSTime | now () |
Returns the time "now" as a GPSTime. More... | |
static GPSTime | now () |
Returns the time "now" as a GPSTime. More... | |
Private Attributes | |
seconds_type | m_seconds |
nanoseconds_type | m_nanoseconds |
Friends | |
void | ErrorLog::operator() (state State, const char *Filename, const int Line, const std::string &Message, bool EOL) |
void | ErrorLog::operator() (state State, const char *Filename, const int Line, const std::string &Message, bool EOL) |
void | ErrorLog::operator() (state State, const char *Filename, const int Line, const std::string &Message, bool EOL) |
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.
Type represting the whole GPS time in nanoseconds.
Type represting the whole GPS time in nanoseconds.
Type represting the whole GPS time in nanoseconds.
Type representing the nanosecond portion.
Type representing the nanosecond portion.
Type representing the nanosecond portion.
Type representing the second portion.
Type representing the second portion.
Type representing the second portion.
LDASTools::AL::GPSTime::GPSTime | ( | ) |
Constructor - default.
LDASTools::AL::GPSTime::GPSTime | ( | const GPSTime & | argument | ) |
Constructor - copy.
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.
LDASTools::AL::GPSTime::~GPSTime | ( | ) |
Destructor.
LDASTools::AL::GPSTime::GPSTime | ( | ) |
Constructor - default.
LDASTools::AL::GPSTime::GPSTime | ( | const GPSTime & | ) |
Constructor - copy.
LDASTools::AL::GPSTime::GPSTime | ( | const seconds_type | seconds, |
const nanoseconds_type | nanoseconds, | ||
unit_type | Units = DEFAULT_TIME_UNIT_TYPE |
||
) |
Constructor.
LDASTools::AL::GPSTime::~GPSTime | ( | ) |
Destructor.
LDASTools::AL::GPSTime::GPSTime | ( | ) |
Constructor - default.
LDASTools::AL::GPSTime::GPSTime | ( | const GPSTime & | ) |
Constructor - copy.
LDASTools::AL::GPSTime::GPSTime | ( | const seconds_type | seconds, |
const nanoseconds_type | nanoseconds, | ||
unit_type | Units = DEFAULT_TIME_UNIT_TYPE |
||
) |
Constructor.
LDASTools::AL::GPSTime::~GPSTime | ( | ) |
Destructor.
INT_2U LDASTools::AL::GPSTime::GetLeapSeconds | ( | ) | const |
Retrieve the number of leap seconds for stored time.
INT_2U LDASTools::AL::GPSTime::GetLeapSeconds | ( | ) | const |
Retrieve the number of leap seconds for stored time.
INT_2U LDASTools::AL::GPSTime::GetLeapSeconds | ( | ) | const |
Retrieve the number of leap seconds for stored time.
|
inline |
Nanosecond portion of GPS time.
nanoseconds_type LDASTools::AL::GPSTime::GetNanoseconds | ( | ) | const |
Nanosecond portion of GPS time.
nanoseconds_type LDASTools::AL::GPSTime::GetNanoseconds | ( | ) | const |
Nanosecond portion of GPS time.
|
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
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
seconds_type LDASTools::AL::GPSTime::getSec | ( | ) | const |
Helper function to make it compatable with Time class of framecpp
|
inline |
Second portion of GPS time.
seconds_type LDASTools::AL::GPSTime::GetSeconds | ( | ) | const |
Second portion of GPS time.
seconds_type LDASTools::AL::GPSTime::GetSeconds | ( | ) | const |
Second portion of GPS time.
Second portion of GPS time according to units.
nanoseconds_type LDASTools::AL::GPSTime::GetSeconds | ( | const unit_type | Units | ) | const |
Second portion of GPS time according to units.
nanoseconds_type LDASTools::AL::GPSTime::GetSeconds | ( | const unit_type | Units | ) | const |
Second portion of GPS time according to units.
|
inline |
GPS as a floating point number.
REAL_8 LDASTools::AL::GPSTime::GetTime | ( | ) | const |
GPS as a floating point number.
REAL_8 LDASTools::AL::GPSTime::GetTime | ( | ) | const |
GPS as a floating point number.
|
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.
gpsnanoseconds_type LDASTools::AL::GPSTime::GPSNanoseconds | ( | ) | const |
Return the time in nanosecond units.
void LDASTools::AL::GPSTime::Now | ( | ) |
Sets the object to the current GPS time.
|
staticprotected |
void LDASTools::AL::GPSTime::Now | ( | ) |
Sets the object to the current GPS time.
|
staticprotected |
void LDASTools::AL::GPSTime::Now | ( | ) |
Sets the object to the current GPS time.
|
staticprotected |
|
static |
|
static |
|
static |
|
friend |
|
friend |
|
friend |
|
static |
The default time unit.
|
private |
|
private |