diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-04-19 20:32:53 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-04-19 20:32:53 -0400 |
commit | d1e75386f2e4f1120261620ceb968179f2f3ec15 (patch) | |
tree | f7f62d13eead97d74ab54e991f6d46656aa2ae28 /gpsd_json.c | |
parent | b444f1e23f3f4dfe62d4951a3efb98dce7430dc8 (diff) | |
download | gpsd-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.c | 6 |
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), |