diff options
author | Fred Wright <fw@fwright.net> | 2016-04-20 19:30:54 -0700 |
---|---|---|
committer | Fred Wright <fw@fwright.net> | 2016-04-21 15:32:09 -0700 |
commit | 1a82f23ce925d509a190b5f98ffaaaee3659d163 (patch) | |
tree | ed5ff4ba3c21220f11b128dd6f239d1f58e9225a /driver_nmea0183.c | |
parent | 8122d8643367a33f6169cc1b10f83405d51bd315 (diff) | |
download | gpsd-1a82f23ce925d509a190b5f98ffaaaee3659d163.tar.gz |
Fixes bug in filtering of ID 0 in satellite views.
Because the GSV processing invokes nmeaid_to_prn() before checking for
an apparent ID of zero, it was possible for zero (or blank) IDs for
non-GPS sentences to get offset to nonzero values and hence not
filtered out. This fix ensures that only nonzero values are adjusted.
Due to this bug, two of the regression tests had incorrect reference
results:
1) The nl2008u receiver includes the new signal ID field, though the
reported value is (incorrectly) zero. Due to another bug (to be fixed
separately), this is interpreted as an additional ID in each GSV
sentence. The zero-ID filter excluded this correctly for GPGSV, but
for GLGSV it saw phantom entries for "ID 37".
2) The sl869 receiver reports empty fields for unused satellite slots
in any GSV sentence. Again, this didn't hurt for GPGSV, and the GLGSV
test data happens to have a multiple of four satellites, but the QZGSV
sentences produced phantom "ID 193" entries.
TESTED:
Ran "scons build-all check", which passed after updating the two
regression cases noted above.
Diffstat (limited to 'driver_nmea0183.c')
-rw-r--r-- | driver_nmea0183.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/driver_nmea0183.c b/driver_nmea0183.c index 1488352a..5305806a 100644 --- a/driver_nmea0183.c +++ b/driver_nmea0183.c @@ -520,7 +520,7 @@ static int nmeaid_to_prn(char *talker, int satnum) // NMEA-ID (33..64) to SBAS PRN 120-151. if (satnum >= 33 && satnum <= 64) satnum += 87; - if (satnum < 32) { + if (satnum != 0 && satnum < 32) { /* map Beidou IDs */ if (talker[0] == 'B' && talker[1] == 'D') satnum += 200; |