summaryrefslogtreecommitdiff
path: root/driver_nmea0183.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-09-25 23:11:59 -0700
committerGary E. Miller <gem@rellim.com>2018-09-25 23:11:59 -0700
commit8a1c139d66969637b5a5ba33b637dd3b63c5e7e7 (patch)
treeadc21e594f3a3b334fe5987770f5e125c6bfadc0 /driver_nmea0183.c
parent1049ef59c8598587f07f0f5278762822c26c1bbb (diff)
downloadgpsd-8a1c139d66969637b5a5ba33b637dd3b63c5e7e7.tar.gz
driver_nmea0813: tweak to PRN decode.
Diffstat (limited to 'driver_nmea0183.c')
-rw-r--r--driver_nmea0183.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/driver_nmea0183.c b/driver_nmea0183.c
index 3d72dd2e..595ba7a6 100644
--- a/driver_nmea0183.c
+++ b/driver_nmea0183.c
@@ -604,13 +604,7 @@ static int nmeaid_to_prn(char *talker, int satnum, unsigned char *gnssid,
*/
*gnssid = 0; /* default to gnssid is GPS */
*svid = 0; /* default to unnknown svid */
- // NMEA-ID (33..64) to SBAS PRN 120-151.
- if ( 33 <= satnum && 64 >= satnum) {
- /* SBAS */
- satnum += 87;
- *gnssid = 1;
- *svid = satnum;
- } else if (0 != satnum && 32 >= satnum) {
+ if (0 != satnum && 32 >= satnum) {
*svid = satnum;
if (talker[0] == 'B' && talker[1] == 'D') {
/* map Beidou IDs */
@@ -634,6 +628,12 @@ static int nmeaid_to_prn(char *talker, int satnum, unsigned char *gnssid,
*gnssid = 2;
}
/* what about $GN? */
+ } else if ( 33 <= satnum && 64 >= satnum) {
+ // NMEA-ID (33..64) to SBAS PRN 120-151.
+ /* SBAS */
+ satnum += 87;
+ *gnssid = 1;
+ *svid = satnum;
} else if (65 <= satnum && 96 >= satnum) {
/* GLONASS */
*gnssid = 6;