commonlib
GPSTime Class Reference

Public Member Functions

 GPSTime ()
 Constructs GPSTime with week and seconds equal to zero.
 
 GPSTime (int32_t week, double seconds)
 Constructs GPSTime at with week and seconds of week value. More...
 
int32_t getWeek () const
 Week since 06-Jan-1980 UTC. More...
 
double getSeconds () const
 Seconds of GPS week. More...
 

Static Public Member Functions

static double RelativeSecondsBetween (const GPSTime &start, const GPSTime &end)
 Calculates relative seconds between two GPS times. More...
 
static GPSTime IncrementSeconds (const GPSTime &time, double secondsIncrement)
 Returns a GPSTime incremented by seconds. More...
 

Constructor & Destructor Documentation

◆ GPSTime()

GPSTime::GPSTime ( int32_t  week,
double  seconds 
)

Constructs GPSTime at with week and seconds of week value.

Seconds can be negative or have an absolute value greater than number of seconds in week. The internal values are going to be corrected so that seconds are positive and less than seconds in week.

Parameters
weekinteger value of weeks since 06-Jan-1980 UTC
secondsdouble value of seconds from week

Member Function Documentation

◆ getSeconds()

double GPSTime::getSeconds ( ) const

Seconds of GPS week.

Returns
seconds of GPS week

◆ getWeek()

int32_t GPSTime::getWeek ( ) const

Week since 06-Jan-1980 UTC.

Returns
integer week since 06-Jan-1980 UTC

◆ IncrementSeconds()

static GPSTime GPSTime::IncrementSeconds ( const GPSTime &  time,
double  secondsIncrement 
)
static

Returns a GPSTime incremented by seconds.

Parameters
timeGPSTime value
secondsIncrementdouble seconds incremented to time
Returns
GPSTime equal to passed time incremented by secondsIncrement

◆ RelativeSecondsBetween()

static double GPSTime::RelativeSecondsBetween ( const GPSTime &  start,
const GPSTime &  end 
)
static

Calculates relative seconds between two GPS times.

Parameters
startGPSTime value
endGPSTime value
Returns
double relative seconds between two GPS times

The documentation for this class was generated from the following file: