diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-05-01 11:23:06 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-05-01 11:23:06 -0400 |
commit | 5432551d3e90f7c4827b795e7d1048581d4cb46e (patch) | |
tree | 3040d131351534bd27c9e5430469399133f6bab3 /libgps_json.c | |
parent | 8108a76644d3053bdb4e7c4a87359d65e262af81 (diff) | |
download | gpsd-5432551d3e90f7c4827b795e7d1048581d4cb46e.tar.gz |
Start on support for unpacking RTCM3 JSON.
Only the 1001 sentence so far, with two fields missing. Not usable
for production yet, but gets infrastructure in place.
Diffstat (limited to 'libgps_json.c')
-rw-r--r-- | libgps_json.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libgps_json.c b/libgps_json.c index 09141f76..8ffa3434 100644 --- a/libgps_json.c +++ b/libgps_json.c @@ -452,6 +452,17 @@ int libgps_json_unpack(const char *buf, } return status; #endif /* RTCM104V2_ENABLE */ +#ifdef RTCM104V3_ENABLE + } else if (STARTSWITH(classtag, "\"class\":\"RTCM3\"")) { + status = json_rtcm3_read(buf, + gpsdata->dev.path, sizeof(gpsdata->dev.path), + &gpsdata->rtcm3, end); + if (status == 0) { + gpsdata->set &= ~UNION_SET; + gpsdata->set |= RTCM3_SET; + } + return status; +#endif /* RTCM104V3_ENABLE */ #ifdef AIVDM_ENABLE } else if (STARTSWITH(classtag, "\"class\":\"AIS\"")) { status = json_ais_read(buf, |