diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-09-03 10:16:43 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-09-03 10:16:43 +0000 |
commit | ff1a623dbdca3fa26de67d88739d9a039b8e39ea (patch) | |
tree | e5dd06d01abeba8e9210f65f79d4c19eeeb4cb94 /gpsd_json.c | |
parent | d5755a55b8681c04ee0de3dc683124e581e47a9b (diff) | |
download | gpsd-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 'gpsd_json.c')
-rw-r--r-- | gpsd_json.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gpsd_json.c b/gpsd_json.c index f6c0c610..e1edefda 100644 --- a/gpsd_json.c +++ b/gpsd_json.c @@ -80,11 +80,15 @@ void json_tpv_dump(struct gps_data_t *gpsdata, struct gps_fix_t *fixp, replylen-strlen(reply), "\"alt\":%.3f,", fixp->altitude); - if (isnan(fixp->eph)==0) + if (isnan(fixp->epx)==0 && isnan(fixp->epy)==0) + /* + * FIXME - mixing epx and epy back together so we can + * check that we're regression-compatible with old output. + */ (void)snprintf(reply+strlen(reply), replylen-strlen(reply), "\"eph\":%.3f,", - fixp->eph); + EMIX(fixp->epx, fixp->epy)); if (isnan(fixp->epv)==0) (void)snprintf(reply+strlen(reply), replylen-strlen(reply), |