From 1047ab92040746ab9597ffcf57a2ced4aaffc07f Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Fri, 5 Apr 2019 17:30:44 -0700 Subject: gps.h: Add qErr to gps_fix_t. qErr, aka "sawtooth" correction, is the error in the PPS time. --- driver_ubx.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'driver_ubx.c') diff --git a/driver_ubx.c b/driver_ubx.c index 932d2680..4d396086 100644 --- a/driver_ubx.c +++ b/driver_ubx.c @@ -1135,6 +1135,12 @@ ubx_msg_tim_tp(struct gps_device_t *session, unsigned char *buf, flags = buf[14]; refInfo = buf[15]; + /* are we UTC, and no RAIM? */ + if ((3 == (flags & 0x03)) && + (8 != (flags & 0x0c))) { + /* good, get qErr */ + session->newdata.qErr = qErr; + } /* cast for 32 bit compatibility */ gpsd_log(&session->context->errout, LOG_DATA, "TIM_TP: towMS %lu, towSubMS %lu, qErr %ld week %u\n" -- cgit v1.2.1