diff options
author | Gary E. Miller <gem@rellim.com> | 2019-03-07 18:30:53 -0800 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2019-03-07 18:30:53 -0800 |
commit | f9621160cc83851ca8e8c8672c7df46dad5505f1 (patch) | |
tree | d644033415895e7dcd65d6c479a1406ee499874c /gpsd_json.c | |
parent | 05671b42d51a81f36a6e62a605817019be134ef3 (diff) | |
download | gpsd-f9621160cc83851ca8e8c8672c7df46dad5505f1.tar.gz |
Change NMEA mode setting, thus major changes in gpsd_error_model().
The start of this overly large patch was to simply move the test
for MODE_2D/3D flipping, which only affect NMEA 183, back into
driver_nmea0813.c
But that was intertwined with how gpsd_error_model() computes
derived variables, which required major changes to how NMEA 183
mode_2D/3D are set.
This ultimatly led to major regression test results. Almost all for
the better.
I tried to break it up, but moving from one paradigm to another
needed one big jump...
Diffstat (limited to 'gpsd_json.c')
-rw-r--r-- | gpsd_json.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gpsd_json.c b/gpsd_json.c index 41f42cc9..0bb42705 100644 --- a/gpsd_json.c +++ b/gpsd_json.c @@ -184,7 +184,7 @@ void json_tpv_dump(const struct gps_device_t *session, if (isfinite(gpsdata->fix.longitude) != 0) str_appendf(reply, replylen, "\"lon\":%.9f,", gpsdata->fix.longitude); - if (gpsdata->fix.mode >= MODE_3D && isfinite(gpsdata->fix.altitude) != 0) + if (0 != isfinite(gpsdata->fix.altitude)) str_appendf(reply, replylen, "\"alt\":%.3f,", gpsdata->fix.altitude); if (isfinite(gpsdata->fix.epx) != 0) |