diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-10-01 07:28:34 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-10-01 07:28:34 -0400 |
commit | 8f990b3bc6dcdb62d6cae285fd61b64efdb20500 (patch) | |
tree | 9897b21033d7abbce2768dec8e1f88d5ae6cb9b4 /ais_json.c | |
parent | 10374a53fcef50b599ab83848df3eb61b0fb7df4 (diff) | |
download | gpsd-8f990b3bc6dcdb62d6cae285fd61b64efdb20500.tar.gz |
Support for Inland AIS ETA at lock/bridge/terminal.
Diffstat (limited to 'ais_json.c')
-rw-r--r-- | ais_json.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -224,6 +224,24 @@ int json_ais_read(const char *buf, imo = true; } } + else if (strstr(buf, "\"dac\":200,") != NULL) { + if (strstr(buf, "\"fid\":21,") != NULL) { + status = json_read_object(buf, json_ais6_fid21, endptr); + imo = true; + if (status == 0) { + ais->type6.dac200fid21.month = AIS_MONTH_NOT_AVAILABLE; + ais->type6.dac200fid21.day = AIS_DAY_NOT_AVAILABLE; + ais->type6.dac200fid21.hour = AIS_HOUR_NOT_AVAILABLE; + ais->type6.dac200fid21.minute = AIS_MINUTE_NOT_AVAILABLE; + // cppcheck-suppress uninitvar + (void)sscanf(start, "%02u-%02uT%02u:%02u", + &ais->type6.dac200fid21.month, + &ais->type6.dac200fid21.day, + &ais->type6.dac200fid21.hour, + &ais->type6.dac200fid21.minute); + } + } + } if (!imo) { status = json_read_object(buf, json_ais6, endptr); if (status == 0) |