diff options
author | Fred Wright <fw@fwright.net> | 2016-12-20 12:18:23 -0800 |
---|---|---|
committer | Fred Wright <fw@fwright.net> | 2016-12-20 12:18:23 -0800 |
commit | d1fd9ad44f320235b4d449988570ab5633f21bab (patch) | |
tree | f8bb030ac887db05db902fc8b865a1b969e1548b /driver_nmea0183.c | |
parent | a90375433424585e4a748f9b495eb8785f50a1fb (diff) | |
download | gpsd-d1fd9ad44f320235b4d449988570ab5633f21bab.tar.gz |
Fixes spurious GSV warning on multi-GNSS receivers.
This bug was intended to be fixed by commit 074499e16. The problem is
that the total satellite count in xxGSV sentences is per-talker rather
than global, but the sanity check only has the global total available
for comparison. The original change attempted to fix this by
suppressing the check whenever non-GPS talkers are detected (in the
current cycle), on the assumption that GPGSV blocks always come first.
Thus, the GPGSV total would be checked, but not the others. However,
the sense of the conditional was inverted, disabling the check for
GPGSV while causing it to produce bogus warnings in most multi-GNSS
cases. This change corrects that.
The proper fix for this would be to implement per-talker satellite
totals. There's now a FIXME to that effect.
TESTED:
All regression tests pass, and running gpsmon against a GPS/GLONASS
receiver no longer produces spurious warnings (when enabled).
Diffstat (limited to 'driver_nmea0183.c')
-rw-r--r-- | driver_nmea0183.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/driver_nmea0183.c b/driver_nmea0183.c index 337e90ca..494ec1f4 100644 --- a/driver_nmea0183.c +++ b/driver_nmea0183.c @@ -812,8 +812,10 @@ static gps_mask_t processGSV(int count, char *field[], * get a bad result on the second and later SV spans. Note, this code * assumes that if any of the special sat pics occur they come right * after a stock GPGSV one. + * + * FIXME: Add per-talker totals so we can do this check properly. */ - if (session->nmea.seen_glgsv || session->nmea.seen_bdgsv || session->nmea.seen_qzss) + if (!(session->nmea.seen_glgsv || session->nmea.seen_bdgsv || session->nmea.seen_qzss)) if (session->nmea.part == session->nmea.await && atoi(field[3]) != session->gpsdata.satellites_visible) gpsd_log(&session->context->errout, LOG_WARN, |