diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2014-08-26 04:50:23 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-08-26 04:50:23 -0400 |
commit | 2bb008e94b1999c81506a45eb4473770f37029c1 (patch) | |
tree | d3f5e54896d28bb02f2d7df7de529f4e50c5fe3e /driver_nmea0183.c | |
parent | cfaf8e2d205a004ca21ccb1841847732db0ff6d3 (diff) | |
download | gpsd-2bb008e94b1999c81506a45eb4473770f37029c1.tar.gz |
GNSS and GLOSS SKY reoport are now merged
Fixes Savannah bug #42407: wrong interpretation of NMEA messages for mixed
GPS/GLONASS recievers.
Diffstat (limited to 'driver_nmea0183.c')
-rw-r--r-- | driver_nmea0183.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/driver_nmea0183.c b/driver_nmea0183.c index a7ef0d0b..27fe1abb 100644 --- a/driver_nmea0183.c +++ b/driver_nmea0183.c @@ -530,6 +530,7 @@ static gps_mask_t processGSV(int count, char *field[], struct gps_device_t *session) /* GPS Satellites in View */ { +#define GSV_TALKER field[0][1] /* * GSV,2,1,08,01,40,083,46,02,17,308,41,12,07,344,39,14,22,228,45*75 * 2 Number of sentences for full data @@ -571,10 +572,13 @@ static gps_mask_t processGSV(int count, char *field[], return ONLINE_SET; } else if (session->nmea.part == 1) { /* might have gone from GPGSV to GLGSV, in which case accumulate */ - if (session->nmea.last_gsv_talker == '\0' || field[0][3] == session->nmea.last_gsv_talker) { + if (session->nmea.last_gsv_talker == '\0' || GSV_TALKER == session->nmea.last_gsv_talker) { gpsd_zero_satellites(&session->gpsdata); } - session->nmea.last_gsv_talker = field[0][2]; + session->nmea.last_gsv_talker = GSV_TALKER; + if (session->nmea.last_gsv_talker == 'L') { + session->nmea.seen_glgsv = true; + } } for (fldnum = 4; fldnum < count;) { @@ -640,7 +644,12 @@ static gps_mask_t processGSV(int count, char *field[], gpsd_report(session->context->debug, LOG_DATA, "GSV: Satellite data OK (%d of %d).\n", session->nmea.part, session->nmea.await); + + /* assumes the GLGSV group, if present, is emitted after the GPGSV */ + if (session->nmea.seen_glgsv && GSV_TALKER == 'P') + return ONLINE_SET; return SATELLITE_SET; +#undef GSV_TALKER } static gps_mask_t processPGRME(int c UNUSED, char *field[], |