summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver_geostar.c2
-rw-r--r--gps.h3
-rw-r--r--www/NMEA.txt24
3 files changed, 25 insertions, 4 deletions
diff --git a/driver_geostar.c b/driver_geostar.c
index 88cd7e6e..47150517 100644
--- a/driver_geostar.c
+++ b/driver_geostar.c
@@ -29,7 +29,7 @@
static int decode_channel_id (uint32_t ch_id) {
int num = 0;
num = (int)(ch_id & 0x1F); /* SV ID */
- if((ch_id & (1<<30)) == 0) num += GLONASS_PRN_MAP; /* GLONASS SV */
+ if((ch_id & (1<<30)) == 0) num += GLONASS_PRN_OFFSET; /* GLONASS SV */
else if (num == 0 ) num = 32; /* GPS SV */
return num;
}
diff --git a/gps.h b/gps.h
index 5d69154a..13a5d31f 100644
--- a/gps.h
+++ b/gps.h
@@ -110,8 +110,7 @@ struct gps_fix_t {
* it is a GPSD convention to map them to IDs 65..96.
* (some other programs push them to 33 and above).
*/
-#define GLONASS_PRN_MAP 64
-#define GLONASS_PRN(n) (((n) >= 1 + GLONASS_PRN_MAP) && ((n) <= 32 + GLONASS_PRN_MAP) /* GLONASS satellite */
+#define GLONASS_PRN_OFFSET 64
/*
* The structure describing the pseudorange errors (GPGST)
diff --git a/www/NMEA.txt b/www/NMEA.txt
index 5c607319..658ee7a9 100644
--- a/www/NMEA.txt
+++ b/www/NMEA.txt
@@ -1,6 +1,6 @@
= NMEA Revealed =
Eric S. Raymond <esr@thyrsus.com>
-v2.11, Mar 2012
+v2.12, Oct 2012
NMEA 0183 is a proprietary protocol issued by the National Marine
Electronics Association for use in boat navigation and control
@@ -364,6 +364,28 @@ Here is a table of NMEA-ID allocations above 32 as of March 2010:
In general, NMEA-ID = PRN - 87. Theoretically, all NMEA-emitting
devices should emit NMEA-IDs. In practice, some pass through PRNs.
+Documentation on IDs for GLONASS satellites is scanty and
+contradictory. The manual for one GLONASS-capable receiver has this to
+say (but it is not clear whether the "established convention"
+is obeyed by other devices, which may use different GLONASS offsets):
+
+To avoid possible confusion caused by repetition of satellite ID
+numbers when using multiple satellite systems, the following
+convention has been adopted:
+
+a. GPS satellites are identified by their PRN numbers, which range from 1 to 32.
+
+b. The numbers 33-64 are reserved for WAAS satellites. The WAAS system
+PRN numbers are 120-138. The offset from NMEA WAAS SV ID to WAAS PRN
+number is 87. A WAAS PRN number of 120 minus 87 yields the SV ID of
+33. The addition of 87 to the SV ID yields the WAAS PRN number.
+
+c. The numbers 65-96 are reserved for GLONASS satellites. GLONASS
+satellites are identified by 64+satellite slot number. The slot
+numbers are 1 through 24 for the full constellation of 24 satellites,
+this gives a range of 65 through 88. The numbers 89 through 96 are
+available if slot numbers above 24 are allocated to on-orbit spares.
+
== Obsolete sentences ==
The following NMEA sentences have been designated "obsolete" in a