summaryrefslogtreecommitdiff
path: root/driver_ubx.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2019-05-08 15:54:30 -0700
committerGary E. Miller <gem@rellim.com>2019-05-08 15:54:30 -0700
commit18da56a1ffe7065598de48a222f0fc900fb0074d (patch)
treef36307889e02fb11709e4044afd5fd5c283c2efb /driver_ubx.c
parent34c947e486a7d89bea9cac4e168a11f86b0ed50f (diff)
downloadgpsd-18da56a1ffe7065598de48a222f0fc900fb0074d.tar.gz
driver_ubx: Another attempt to untangle sigId's.
The RINEX and u-blox names do not line up in any obvious fashion.
Diffstat (limited to 'driver_ubx.c')
-rw-r--r--driver_ubx.c36
1 files changed, 23 insertions, 13 deletions
diff --git a/driver_ubx.c b/driver_ubx.c
index a39f1490..95c61ab5 100644
--- a/driver_ubx.c
+++ b/driver_ubx.c
@@ -1281,21 +1281,22 @@ static gps_mask_t ubx_rxm_rawx(struct gps_device_t *session,
session->gpsdata.raw.meas[i].gnssid = gnssId;
session->gpsdata.raw.meas[i].sigid = sigId;
- /* some of these are guesses as the u-blox codes to not match RINEX coded */
+ /* some of these are GUESSES as the u-blox codes do not
+ * match RINEX codes */
switch (gnssId) {
case 0: /* GPS */
- switch (gnssId) {
+ switch (sigId) {
default:
/* let PPP figure it out */
/* FALLTHROUGH */
case 0: /* L1C/A */
obs_code = "L1C";
break;
- case 3: /* L2CL */
- obs_code = "L2L";
+ case 3: /* L2 CL */
+ obs_code = "L2C";
break;
- case 4: /* L2CM */
- obs_code = "L2M";
+ case 4: /* L2 CM */
+ obs_code = "L2X";
break;
}
break;
@@ -1303,11 +1304,20 @@ static gps_mask_t ubx_rxm_rawx(struct gps_device_t *session,
/* sigId added on protVer 27, and SBAS gone in protVer 27
* so must be L1C/A */
svId -= 100; /* adjust for RINEX 3 svid */
- /* all SBAS are L1C? */
+
+ /* SBAS can do L5I, but the code? */
+ switch (sigId) {
+ default:
+ /* let PPP figure it out */
+ /* FALLTHROUGH */
+ case 0: /* L1C/A */
+ obs_code = "L1C";
+ break;
+ }
obs_code = "L1C"; /* u-blox calls this L1C/A */
break;
case 2: /* GALILEO */
- switch (gnssId) {
+ switch (sigId) {
default:
/* let PPP figure it out */
/* FALLTHROUGH */
@@ -1326,7 +1336,7 @@ static gps_mask_t ubx_rxm_rawx(struct gps_device_t *session,
}
break;
case 3: /* BeiDou */
- switch (gnssId) {
+ switch (sigId) {
default:
/* let PPP figure it out */
/* FALLTHROUGH */
@@ -1349,7 +1359,7 @@ static gps_mask_t ubx_rxm_rawx(struct gps_device_t *session,
obs_code = ""; /* u-blox calls this L1 */
break;
case 5: /* QZSS */
- switch (gnssId) {
+ switch (sigId) {
default:
/* let PPP figure it out */
/* FALLTHROUGH */
@@ -1357,15 +1367,15 @@ static gps_mask_t ubx_rxm_rawx(struct gps_device_t *session,
obs_code = "L1C"; /* u-blox calls this L1C/A */
break;
case 4: /* */
- obs_code = "L1C"; /* u-blox calls this L2CM */
+ obs_code = "L2S"; /* u-blox calls this L2CM */
break;
case 5: /* */
- obs_code = "L1C"; /* u-blox calls this L2CL*/
+ obs_code = "L2L"; /* u-blox calls this L2CL*/
break;
}
break;
case 6: /* GLONASS */
- switch (gnssId) {
+ switch (sigId) {
default:
/* let PPP figure it out */
/* FALLTHROUGH */