summaryrefslogtreecommitdiff
path: root/driver_sirf.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-09-18 07:41:36 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-09-18 07:41:36 -0400
commite11a617ab0943bfad775f051a1b256010132a420 (patch)
tree894addb33e13c13f2a10ed4a38bc489a20eb0973 /driver_sirf.c
parent5398d10dc20ef7433818f422396b80475b6a8b22 (diff)
downloadgpsd-e11a617ab0943bfad775f051a1b256010132a420.tar.gz
Sort out some issues with PRN handling.
Add macros for classifying PRNs into GPS, GLONASS, DGPS. Document the PRN ranges on the gps_json manual page. It turns out that U.S. GPS authorities reserve 1-64 for GPS birds, not just 1-32. So the way we map GLONASS PRNs had to change. This required a regression-test rebuild for the geostar driver.
Diffstat (limited to 'driver_sirf.c')
-rw-r--r--driver_sirf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/driver_sirf.c b/driver_sirf.c
index 3503408a..d6638369 100644
--- a/driver_sirf.c
+++ b/driver_sirf.c
@@ -2,7 +2,8 @@
* This is the gpsd driver for SiRF GPSes operating in binary mode.
* It also handles uBlox, a SiRF derivative.
*
- * The advantage: Reports climb/sink rate (raw-mode clients won't see this).
+ * The advantages: Reports climb/sink rate (raw-mode clients won't see this).
+ * Also, we can flag DGPS satellites used in the skyview when SBAS is in use.
* The disadvantages: Doesn't return PDOP or VDOP, just HDOP.
*
* Chris Kuethe, our SiRF expert, tells us:
@@ -511,7 +512,7 @@ static gps_mask_t sirf_msg_svinfo(struct gps_device_t *session,
session->gpsdata.satellites_visible = st;
/* mark SBAS sats in use if SBAS was in use as of the last MID 27 */
for (i = 0; i < st; i++)
- if (session->gpsdata.PRN[i] > 100 && session->driver.sirf.sbas != 0)
+ if (DGPS_PRN(session->gpsdata.PRN[i]) && session->driver.sirf.sbas != 0)
session->gpsdata.used[i] = true;
#ifdef NTPSHM_ENABLE
if (st < 3) {