summaryrefslogtreecommitdiff
path: root/driver_nmea0183.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-03-30 18:49:36 -0700
committerGary E. Miller <gem@rellim.com>2016-03-30 18:49:36 -0700
commitbca94a916a8341b5d98915328839661946d8833a (patch)
tree38e8e4b1a1d49a76c2745e573617c6f025caab71 /driver_nmea0183.c
parente7f2ee5166d77d9a364a398b0a415e218e72573f (diff)
downloadgpsd-bca94a916a8341b5d98915328839661946d8833a.tar.gz
GPGST time was always 1970-01-03Txxxx. Fixed.
The time in the packet was seconds in the day. It needed to be merged with the known date. rergressions updated. The chk files clearly show it is better now.
Diffstat (limited to 'driver_nmea0183.c')
-rw-r--r--driver_nmea0183.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/driver_nmea0183.c b/driver_nmea0183.c
index 5bdd7ec2..b4d44bce 100644
--- a/driver_nmea0183.c
+++ b/driver_nmea0183.c
@@ -440,6 +440,10 @@ static gps_mask_t processGST(int count, char *field[], struct gps_device_t *sess
}
#define PARSE_FIELD(n) (*field[n]!='\0' ? safe_atof(field[n]) : NAN)
+ /* note this is not full UTC, just HHMMSS.ss */
+ /* this is not the current time,
+ * it references another GPA of the same stamp. So do not set
+ * any time stamps with it */
session->gpsdata.gst.utctime = PARSE_FIELD(1);
session->gpsdata.gst.rms_deviation = PARSE_FIELD(2);
session->gpsdata.gst.smajor_deviation = PARSE_FIELD(3);
@@ -449,7 +453,9 @@ static gps_mask_t processGST(int count, char *field[], struct gps_device_t *sess
session->gpsdata.gst.lon_err_deviation = PARSE_FIELD(7);
session->gpsdata.gst.alt_err_deviation = PARSE_FIELD(8);
#undef PARSE_FIELD
- register_fractional_time(field[0], field[1], session);
+ /* add in the time of start of today */
+ /* since it is NOT current time, do not register_fractional_time() */
+ session->gpsdata.gst.utctime += mkgmtime(&session->nmea.date);
gpsd_log(&session->context->errout, LOG_DATA,
"GST: utc = %.3f, rms = %.2f, maj = %.2f, min = %.2f, ori = %.2f, lat = %.2f, lon = %.2f, alt = %.2f\n",