From 79aa8c4a4ce3ac700a3675a2a2d80581d69042b5 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Fri, 19 Apr 2019 18:43:46 -0700 Subject: JSON: Add sigid to PRN in SKY. Update doc to match. Not used, yet. --- gpsd_json.c | 5 +++++ libgps_json.c | 1 + man/gpsd_json.xml | 21 +++++++++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/gpsd_json.c b/gpsd_json.c index 73aed7c7..d6fa2ee0 100644 --- a/gpsd_json.c +++ b/gpsd_json.c @@ -361,6 +361,11 @@ void json_sky_dump(const struct gps_data_t *datap, datap->skyview[i].gnssid, datap->skyview[i].svid); } + if (0 != datap->skyview[i].sigid) { + str_appendf(reply, replylen, + ",\"sigid\":%d", + datap->skyview[i].sigid); + } (void)strlcat(reply, "},", replylen); } } diff --git a/libgps_json.c b/libgps_json.c index 1738567a..02beabdb 100644 --- a/libgps_json.c +++ b/libgps_json.c @@ -215,6 +215,7 @@ static int json_sky_read(const char *buf, struct gps_data_t *gpsdata, {"used", t_boolean, STRUCTOBJECT(struct satellite_t, used)}, {"gnssid", t_ushort, STRUCTOBJECT(struct satellite_t, gnssid)}, {"svid", t_ushort, STRUCTOBJECT(struct satellite_t, svid)}, + {"sigid", t_ushort, STRUCTOBJECT(struct satellite_t, sigid)}, /* *INDENT-ON* */ {NULL}, }; diff --git a/man/gpsd_json.xml b/man/gpsd_json.xml index 59509c88..9dac8891 100644 --- a/man/gpsd_json.xml +++ b/man/gpsd_json.xml @@ -510,6 +510,27 @@ error modeling than the covariance calculation. may be flagged used if the solution has corrections from them, but not all drivers make this information available.) + + gnssid + No + numeric + The GNSS ID, as defined by u-blox, not NMEA. 0=GPS, + 2=Galileo, 3=Beidou, 5=QZSS, 6-GLONASS. + + + svid + no + numeric + The satellite ID within its constellation. As defined + by u-blox, not NMEA). + + + sigid + no + numeric + The signal ID of this signal. As defined by u-blox, not + NMEA. See u-blox doc for details. + -- cgit v1.2.1