diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-05-04 05:20:09 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-05-04 05:20:09 -0400 |
commit | 8a2dfdb4992763b2aee83453d014133553f08447 (patch) | |
tree | 9c8acf22c37736d843a91e2cb4f3c171056cf76d /gpsd_json.c | |
parent | be1322ed7650164813daec7b923385557311c087 (diff) | |
download | gpsd-8a2dfdb4992763b2aee83453d014133553f08447.tar.gz |
In AIS, support for IMO236 type 8 DAC = 1 FID = 13.
Diffstat (limited to 'gpsd_json.c')
-rw-r--r-- | gpsd_json.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gpsd_json.c b/gpsd_json.c index d3fd5d75..367d9f07 100644 --- a/gpsd_json.c +++ b/gpsd_json.c @@ -2079,6 +2079,25 @@ void json_aivdm_dump(const struct ais_t *ais, imo = true; break; case 13: /* IMO236 - Fairway closed */ + (void)snprintf(buf + strlen(buf), buflen - strlen(buf), + "\"reason\":\"%s\",\"closefrom\":\"%s\"," + "\"closeto\":\"%s\",\"radius\":%u," + "\"extunit\":%u," + "\"from\":\"%02u-%02uT%02u:%02u\"," + "\"to\":\"%02u-%02uT%02u:%02u\"}\r\n", + ais->type8.dac1fid13.reason, + ais->type8.dac1fid13.closefrom, + ais->type8.dac1fid13.closeto, + ais->type8.dac1fid13.radius, + ais->type8.dac1fid13.extunit, + ais->type8.dac1fid13.fmonth, + ais->type8.dac1fid13.fday, + ais->type8.dac1fid13.fhour, + ais->type8.dac1fid13.fminute, + ais->type8.dac1fid13.tmonth, + ais->type8.dac1fid13.tday, + ais->type8.dac1fid13.thour, + ais->type8.dac1fid13.tminute); break; case 15: /* IMO236 - Extended ship and voyage */ break; |