summaryrefslogtreecommitdiff
path: root/driver_zodiac.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-04-20 22:32:55 -0400
committerEric S. Raymond <esr@thyrsus.com>2010-04-20 22:32:55 -0400
commitccdf4e5641f8847cd49ead381e21b3d28cd0bcc2 (patch)
tree9fac7198fa75a341fa7833222dc327c6852c3372 /driver_zodiac.c
parentd766ad888f1c7de697cbd4294c38aa3b06dddd85 (diff)
downloadgpsd-ccdf4e5641f8847cd49ead381e21b3d28cd0bcc2.tar.gz
Clear DOPs only when we get a skyview report.
This solves the disappearing epx/epy bug on SiRFs, but it was actually a systemic problem that affected several drivers. Navigation solution messages were clearing DOPs, making it impossible for the error modeller to compute estimates. New logic: Clear DOPs only when we get a skyview report. They'll be regenerated by our visibility-matrix calculation when the skyview sentence is analyzed. If a sentence from the device supplies a DOP between the time the visibility calculation is done and when the next fix is reported, it will override our computed value. This might change later! This change required a regression-test rebuild.
Diffstat (limited to 'driver_zodiac.c')
-rw-r--r--driver_zodiac.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/driver_zodiac.c b/driver_zodiac.c
index 50ac8d23..a96d8f65 100644
--- a/driver_zodiac.c
+++ b/driver_zodiac.c
@@ -262,9 +262,10 @@ static gps_mask_t handle1003(struct gps_device_t *session)
if ((n < 0) || (n > 12))
return 0;
+ gpsd_zero_satellites(&session->gpsdata);
+
/* ticks = getzlong(6); */
/* sequence = getzword(8); */
- clear_dop(&session->gpsdata.dop);
session->gpsdata.dop.gdop = (unsigned int)getzword(9) * 1e-2;
session->gpsdata.dop.pdop = (unsigned int)getzword(10) * 1e-2;
session->gpsdata.dop.hdop = (unsigned int)getzword(11) * 1e-2;