commonlib
gps_time.h File Reference

GPSTime and GPSTimeUTC are types representing absolute time from GPS start time in 06-Jan-1980 UTC. More...

#include "synchronization.h"
#include "utc_time.h"

Go to the source code of this file.

Classes

class  GPSTime
 
class  GPSTimeUTC
 

Detailed Description

GPSTime and GPSTimeUTC are types representing absolute time from GPS start time in 06-Jan-1980 UTC.

Author
Luka Jerman
Date
29/07/2019
Version
1.0

DESCRIPTION

Absolute time in Global Positioning System (GPS) is represented in week count and seconds of week since 6th of January 1980 at 00:00 Coordinated Universal Time (UTC). GPS time format is a common format used in the output of Global Navigation Satellite System (GNSS) receivers. There are no leap seconds in GPS time, to convert GPS time to (UTC) we need to subtract UTC leap seconds from GPS time. There is no model to determine UTC leap seconds from absolute time. They are set from measurements of Earth's rotation and are only known 6 months in advance. This information is sent through GNSS signals. Receivers either provide leap second information or direct UTC time.

To prevent the mix-up times are implemented as GPSTime and GPSTimeUTC. They both have functions to increment the time by seconds or calculate seconds between two times. GPSTimeUTC has functions for conversions to other UTC based absolute time formats. GPSTimeUTC can also be constructed from GPSTime with additional leap seconds.

On 29 July 2019 UTC time was 18 seconds behind GPSTime.