diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-06-14 16:00:30 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-06-14 16:00:30 +0000 |
commit | caa40828bade0966e67e496a6550b62f01c8eac9 (patch) | |
tree | 13e2aadc8fd045747320295a3e572907f4ca8c29 /libgpsd_core.c | |
parent | 88cb95cb0948cb3e3f0e87cb7bc4ce8566ea146c (diff) | |
download | gpsd-caa40828bade0966e67e496a6550b62f01c8eac9.tar.gz |
Change the mode test before computing speed and climb errors...
...there was a SiRF-specific assumption in there.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r-- | libgpsd_core.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c index 8d2a2e85..560a333b 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -408,10 +408,10 @@ static gps_mask_t handle_packet(struct gps_device_t *session) * fact that NMEA devices ship altitude separately in GGA from most of * the rest of the fix information we want in RMC. * - * Thus, we never clear 2D or 3D position data here unless the mode - * has gone from 3D to 2D. But we do want to clear velocity data, - * because that's always shipped atomically if it's valid (in RMC - * or a binary packet) + * Thus, we never clear 2D or 3D position data here unless the + * mode has gone from 3D to 2D (or lower). But we do want to clear + * velocity data, because that's always shipped atomically if it's + * valid (in RMC or a binary packet) */ if ((session->gpsdata.set & MODE_SET)!=0 && session->gpsdata.fix.mode < MODE_3D) session->gpsdata.fix.altitude = ALTITUDE_NOT_VALID; @@ -457,7 +457,7 @@ static gps_mask_t handle_packet(struct gps_device_t *session) * FIXME: We need to compute track error here. */ session->gpsdata.fix.epd = UNCERTAINTY_NOT_VALID; - if (session->gpsdata.set & LATLON_SET) { + if (session->gpsdata.fix.mode >= MODE_2D) { if ((session->gpsdata.set & SPEEDERR_SET)==0 && session->gpsdata.fix.time > session->lastfix.time) { session->gpsdata.fix.eps = UNCERTAINTY_NOT_VALID; if (session->lastfix.mode > MODE_NO_FIX |