diff options
author | Gary E. Miller <gem@rellim.com> | 2018-11-05 17:01:47 -0800 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-11-05 18:16:51 -0800 |
commit | 0efea9b5b4e0ef0de100532630e8d10f2ef5eaaf (patch) | |
tree | 4aad58f2fa0186c7a67e8f1cc02a46b814eea191 /driver_ubx.c | |
parent | abf833f9cca0a0e4f1cff0fc424f9a5960f3be5c (diff) | |
download | gpsd-0efea9b5b4e0ef0de100532630e8d10f2ef5eaaf.tar.gz |
driver_ubx: Save leap seconds from RAWX.
If valid.
Diffstat (limited to 'driver_ubx.c')
-rw-r--r-- | driver_ubx.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/driver_ubx.c b/driver_ubx.c index 1fb4435e..4441b956 100644 --- a/driver_ubx.c +++ b/driver_ubx.c @@ -832,6 +832,11 @@ static gps_mask_t ubx_rxm_rawx(struct gps_device_t *session, "UBX_RXM_RAWX: rcvTow %f week %u leapS %d numMeas %u recStat %d\n", rcvTow, week, leapS, numMeas, recStat); + if (recStat & 1) { + /* Valid leap seconds */ + session->context->leap_seconds = -leapS; + session->context->valid |= LEAP_SECOND_VALID; + } /* covert GPS weeks and TOW to UTC */ session->newdata.time = gpsd_gpstime_resolve(session, week, rcvTow); session->gpsdata.raw.mtime.tv_nsec = |