summaryrefslogtreecommitdiff
path: root/driver_nmea0183.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2019-04-30 20:22:01 -0700
committerGary E. Miller <gem@rellim.com>2019-04-30 20:22:01 -0700
commitef1ab51b9684719078840ce210a9ee2b8c0db1ab (patch)
tree79b5910a78b4e43a240055618bea9c31afb0b772 /driver_nmea0183.c
parent08a1b9e1fc8408584fa167611e23c88f3d951650 (diff)
downloadgpsd-ef1ab51b9684719078840ce210a9ee2b8c0db1ab.tar.gz
driver_nmea0183: DOn't mark sat as used if ss==0
NMEA 4.10 tells us which sats a are used, but not which signal (L1, L2, etc).
Diffstat (limited to 'driver_nmea0183.c')
-rw-r--r--driver_nmea0183.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/driver_nmea0183.c b/driver_nmea0183.c
index 7317bfe4..dec17894 100644
--- a/driver_nmea0183.c
+++ b/driver_nmea0183.c
@@ -1449,12 +1449,16 @@ static gps_mask_t processGSV(int count, char *field[],
sp->ss = (float)atoi(field[fldnum++]);
sp->used = false;
sp->sigid = ubx_sigid;
- if (sp->PRN > 0)
+
+ /* sadly NMEA 4.1 does not tell us which sigid (L1, L2) is
+ * used. So if the ss is zero, do not mark used */
+ if (0 < sp->PRN && 0 < sp->ss) {
for (n = 0; n < MAXCHANNELS; n++)
if (session->nmea.sats_used[n] == (unsigned short)sp->PRN) {
sp->used = true;
break;
}
+ }
/*
* Incrementing this unconditionally falls afoul of chipsets like
* the Motorola Oncore GT+ that emit empty fields at the end of the