Function sbg::helpers::getUtcOffset

Function Documentation

int32_t sbg::helpers::getUtcOffset(bool first_valid_utc, uint32_t gps_tow, uint8_t sec)

Returns the GPS to UTC leap second offset: GPS_Time = UTC_Tme + utcOffset

WARNING: The leap second is computed from the latest received SbgUtcTime message if any. If no SbgUtcTime message has been received, a default driver current value is used.

Parameters:
  • first_valid_utc[in] First valid utc.

  • gps_tow[in] Current GPS time of the week.

  • sec[in] Current second.

Returns:

Offset in seconds to apply to UTC time to get GPS time.