summaryrefslogtreecommitdiff
path: root/gpsd_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-04-19 20:32:53 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-04-19 20:32:53 -0400
commitd1e75386f2e4f1120261620ceb968179f2f3ec15 (patch)
treef7f62d13eead97d74ab54e991f6d46656aa2ae28 /gpsd_json.c
parentb444f1e23f3f4dfe62d4951a3efb98dce7430dc8 (diff)
downloadgpsd-d1e75386f2e4f1120261620ceb968179f2f3ec15.tar.gz
Correctly handle the visibility-greater-than bit in AIS type 8 FID 31.
Diffstat (limited to 'gpsd_json.c')
-rw-r--r--gpsd_json.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gpsd_json.c b/gpsd_json.c
index 8469dc84..9715ab65 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -1845,11 +1845,13 @@ void json_aivdm_dump(const struct ais_t *ais,
else
(void)snprintf(buf + strlen(buf), buflen - strlen(buf),
"\"airtemp\":%d,\"dewpoint\":%d,"
- "\"pressure\":%u,\"pressuretend\":%u,",
+ "\"pressure\":%u,\"pressuretend\":%u,"
+ "\"visgreater\":%s,",
ais->type8.dac1fid31.airtemp,
ais->type8.dac1fid31.dewpoint,
ais->type8.dac1fid31.pressure,
- ais->type8.dac1fid31.pressuretend);
+ ais->type8.dac1fid31.pressuretend,
+ JSON_BOOL(ais->type8.dac1fid31.visgreater));
if (scaled)
(void)snprintf(buf + strlen(buf), buflen - strlen(buf),