summaryrefslogtreecommitdiff
path: root/libgps_json.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 /libgps_json.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 'libgps_json.c')
-rw-r--r--libgps_json.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libgps_json.c b/libgps_json.c
index 864ef2d5..8d6bdc5e 100644
--- a/libgps_json.c
+++ b/libgps_json.c
@@ -39,7 +39,9 @@ static int json_tpv_read(const char *buf,
.dflt.real = NAN},
{"alt", real, .addr.real = &gpsdata->fix.altitude,
.dflt.real = NAN},
- {"eph", real, .addr.real = &gpsdata->fix.eph,
+ {"epx", real, .addr.real = &gpsdata->fix.epx,
+ .dflt.real = NAN},
+ {"epy", real, .addr.real = &gpsdata->fix.epy,
.dflt.real = NAN},
{"epv", real, .addr.real = &gpsdata->fix.epv,
.dflt.real = NAN},
@@ -73,7 +75,7 @@ static int json_tpv_read(const char *buf,
gpsdata->set |= LATLON_SET;
if (isnan(gpsdata->fix.altitude) == 0)
gpsdata->set |= ALTITUDE_SET;
- if (isnan(gpsdata->fix.eph)==0)
+ if (isnan(gpsdata->fix.epx)==0 && isnan(gpsdata->fix.epy)==0)
gpsdata->set |= HERR_SET;
if (isnan(gpsdata->fix.epv)==0)
gpsdata->set |= VERR_SET;