struct P1::ImageSdk::GpsDateTimeComponents

Overview

A Date & Time representation used by the GPS to provide sub-millisecond precision. More…

#include <P1ImageGpsImu.hpp>

struct GpsDateTimeComponents
{
    // fields

    bool hasDate;
    uint32_t year;
    uint32_t month;
    uint32_t day;
    int hours;
    int minutes;
    double seconds;
    bool isGpsTime;

    // methods

    std::string ToString() const;
};

Detailed Documentation

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.