summaryrefslogtreecommitdiff
path: root/driver_zodiac.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-09-03 10:16:43 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-09-03 10:16:43 +0000
commitff1a623dbdca3fa26de67d88739d9a039b8e39ea (patch)
treee5dd06d01abeba8e9210f65f79d4c19eeeb4cb94 /driver_zodiac.c
parentd5755a55b8681c04ee0de3dc683124e581e47a9b (diff)
downloadgpsd-ff1a623dbdca3fa26de67d88739d9a039b8e39ea.tar.gz
Split eph into epx and epy internally...
...but still report eph by re-mixing them in the JSON dumper. This was worth doing because all regression tests still pass, showing that visible behavior for old-protocol users gas not changed.
Diffstat (limited to 'driver_zodiac.c')
-rw-r--r--driver_zodiac.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/driver_zodiac.c b/driver_zodiac.c
index b4b07848..5a39ce8f 100644
--- a/driver_zodiac.c
+++ b/driver_zodiac.c
@@ -181,8 +181,11 @@ static gps_mask_t handle1000(struct gps_device_t *session)
session->mag_var = ((short)getzword(37)) * RAD_2_DEG * 1e-4;
session->gpsdata.fix.climb = ((short)getzword(38)) * 1e-2;
/* map_datum = getzword(39); */
- /* manual says these are 1-sigma */
- session->gpsdata.fix.eph = (int)getzlong(40) * 1e-2 * GPSD_CONFIDENCE;
+ /*
+ * The manual says these are 1-sigma. Device reports only eph, circular
+ * error; no harm in assigning it to both x and y components.
+ */
+ session->gpsdata.fix.epx = session->gpsdata.fix.epy = (int)getzlong(40) * 1e-2 * GPSD_CONFIDENCE;
session->gpsdata.fix.epv = (int)getzlong(42) * 1e-2 * GPSD_CONFIDENCE;
session->gpsdata.fix.ept = (int)getzlong(44) * 1e-2 * GPSD_CONFIDENCE;
session->gpsdata.fix.eps = (int)getzword(46) * 1e-2 * GPSD_CONFIDENCE;