diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-09-18 07:41:36 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-09-18 07:41:36 -0400 |
commit | e11a617ab0943bfad775f051a1b256010132a420 (patch) | |
tree | 894addb33e13c13f2a10ed4a38bc489a20eb0973 /gps.h | |
parent | 5398d10dc20ef7433818f422396b80475b6a8b22 (diff) | |
download | gpsd-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 'gps.h')
-rw-r--r-- | gps.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -96,6 +96,17 @@ struct gps_fix_t { double epc; /* Vertical speed uncertainty */ }; +/* + * Satellite ID classes. + * U.S. GPS authorities reserve PRNs 1-64 for GPS satellites. + * GLONASS birds reuse GPS PRNs; it is a GPSD convention to map them to + * IDs 64 and above (some other programs push them to 33 and above). + * All SBAS/WAAS/EGNOS birds have PRNs above 100. + */ +#define GNSS_PRN(n) (((n) >= 1) && ((n) <= 63)) /* GNSS satellite */ +#define GLONASS_PRN(n) (((n) >= 64) && ((n) <= 96)) /* GLONASS satellite */ +#define DGPS_PRN(n) ((n) >= 100) + /* * The structure describing the pseudorange errors (GPGST) */ |