From ef1ab51b9684719078840ce210a9ee2b8c0db1ab Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Tue, 30 Apr 2019 20:22:01 -0700 Subject: 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). --- driver_nmea0183.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'driver_nmea0183.c') 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 -- cgit v1.2.1