GpsDateTimeComponents Struct

Definition

Namespace: P1.ImageSdk

A date & time representation used by the GPS to provide sub-millisecond precision More…

public struct GpsDateTimeComponents

Remarks

A date & time representation used by the GPS to provide sub-millisecond precision

Note that the date part might not be present. (The presence depends on the GPS module used) See HasDate to check you date fields contains something meaningful.

The timezone is always GMT/UTC. However, the clock used (or time scale) might not be UTC.

GPS uses its own timescale (or clock) called GPS Time. It branched out from UTC in 1980, and has since lept ahead of UTC. The reason is that GPS Time does not account for the leap seconds added to UTC (since 1980).

The field IsGpsTime tells you if the timestamp is in GPS Time and not UTC. By January 1st, 2017, the differnce between GPS Time and UTC is: GPS - UTC = +18 seconds.

Members

HasDate

True if a date value has been supplied by the GPS device

Year

Year with 4 digits

Month

Month of year, 1-12

Day

Day of month, 1-31

Hours

Hours, 0-23

Minutes

Minutes, 0-59

Seconds

Number of seconds 0-59, with decimals

IsGpsTime

If true, then time is provided in GPS Time. If false, time is UTC.

Methods

ToTimeSpan()

Get a TimeSpan representation. However, precision is lost - since TimeSpan resolution is milliseconds

ToDateTime()

Get a DateTime from the GPS date-time stamp (in UTC). Some GPS devices might not supply a date value. If so, this method returns NULL.

ToString()

Get as a human readable string representation