Measuring time accurately is essential for most measuring/surveying tasks, whether it is for measuring the runtime of a laser pulse for a distance measurement, or the falling time and hence speed of a mass in an absolute gravimeter. Time signals and time stamps are also essential for synchronizing sensors. A typical case is in mobile mapping, where navigation data, laser data, and camera images are brought together in post-processing. These time are often retained in the resulting data, as they may be required in further processing steps, such as relative matching of point clouds. For example, most point record formats of the LAS standard have a field for time stamps.
GPS vs UTC time
The time reference that is usually used is GPS time as, thanks to the use of GPS receivers for positioning, we do have the very accurate time of the GPS network available. GPS time is different from Coordinated Universal Time (UTC). UTC is used as standard time reference in most of the world, with other times zones being defined as UTC + an offset, such as UTC+2 hours for Middle-European Summer Time. On January 6th of 1980, GPS time and UTC time were equal. Since then, UTC has been subject to leap seconds to keep UTC close to “solar” time (UT1) and account for the slowdown of Earth’s rotation.
Leap seconds are undesirable in time references that are used for timing purposes, as they require a lot of effort to deal with properly. That’s why GPS time, like TAI, does not apply leap seconds.This means that there is now a 18-second offset between GPS and UTC, with GPS being 18 seconds ahead. This needs to be taken into account when GPS time has to be converted into local time, and vice versa.
GPS week seconds
Internally, GPS uses seconds of the week and keeps track of the current GPS week. This is why GPS time starts on January 6th 1980 – this was the first Sunday in 1980, and in American fashion, GPS weeks start on midnight of Sunday. Using week seconds leads to nice small timestamps. The big disadvantage is that week second timestamps are ambiguous, and weird stuff can happen when processing data that was acquired in a night from Saturday to Sunday, if the processing software does not properly deal with timestamps suddenly jumping to 0. To avoid ambiguity, one needs to keep track of the GPS week as well.
A funny side effect is caused by GPS using a 10-bit counter for the GPS week, meaning that the maximum GPS week number is 1023 (approx. 19.6 years). GPS receivers that have no means of correction for this don’t know whether they are in 2025, 2005, or 1985. I own a car manufactured in 2006 that still has its original navigation unit and thus is convinced that it’s 2005…
GPS absolute and adjusted seconds
The ambiguity of GPS week seconds can be dealt with by using absolute GPS seconds since January 6th 1980, i.e. GPS week * 7 * 86400 + GPS week second. This does however result in rather large numbers. This can cause issues with insufficient resolution for very small time increments. The LAS format for point clouds addresses this by introducing adjusted GPS time, with 1 billion (1e9) subtracted. This provides some extra precision, but needs to be taken into account when doing conversions. Adjusted GPS seconds are the recommended way to keep track of time in mobile mapping data.
Unix timestamps
Somewhat similar to GPS absolute time are Unix timestamps. These are the seconds elapsed since January 1st 1970 and used internally by Unix-like operating systems like Linux. I’ve seen at least one vendor use them as timestamps in LAS point clouds, but this is not covered by the LAS standard, which only allows for GPS week and adjusted seconds. Anyways, Unix timestamps are even larger than absolute GPS timestamps (as they start approx. 10 years earlier), so loss of resolution is also a possible issue here.
Online resources
- UTC/GPS Time converter – converts between UTC and absolute GPS seconds. Simply add or subtract 1000000000 when dealing with adjusted GPS seconds.
- GPS Time Calculator – this one also deals with timestamps in GPS week seconds.
- GPS Calendar – you can look up the GPS week for a given date here.