summaryrefslogtreecommitdiff
path: root/driver_ubx.c
diff options
context:
space:
mode:
authorMichael Tatarinov <kukabu@gmail.com>2011-10-06 11:29:14 +0400
committerEric S. Raymond <esr@thyrsus.com>2011-10-06 03:37:07 -0400
commitafad78bd808e2ca0197b6c0fcde9b3b3430ce316 (patch)
tree0719feac1417bbd4824e7fdf5f3fe3e28f1bc389 /driver_ubx.c
parent84b3bdee653eeef09a99e47cf93e1f67bf170170 (diff)
downloadgpsd-afad78bd808e2ca0197b6c0fcde9b3b3430ce316.tar.gz
SiRF driver. Bug fix in code to set used flags on SBAS satellites.
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Diffstat (limited to 'driver_ubx.c')
-rw-r--r--driver_ubx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/driver_ubx.c b/driver_ubx.c
index 493b3d6f..e53d0bdb 100644
--- a/driver_ubx.c
+++ b/driver_ubx.c
@@ -230,7 +230,9 @@ ubx_msg_nav_svinfo(struct gps_device_t *session, unsigned char *buf,
/* mark SBAS sats in use if SBAS was in use as of the last MID 27 */
for (i = 0; i < j; i++) {
int prn = session->gpsdata.PRN[i];
- if (DGPS_PRN(prn) && session->driver.sirf.sbas != 0)
+ if (DGPS_PRN(prn) \
+ && session->gpsdata.status == STATUS_DGPS_FIX \
+ && session->driver.sirf.dgps_source == SIRF_DGPS_SOURCE_SBAS)
session->gpsdata.used[session->gpsdata.satellites_used++] = prn;
}
session->gpsdata.skyview_time = NAN;