diff options
author | Gary E. Miller <gem@rellim.com> | 2019-03-19 12:57:47 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2019-03-19 12:58:55 -0700 |
commit | de6105431a4cc56f5c6bb38096c1f2dab37d55b4 (patch) | |
tree | 78d0ac80c7cfdbff2f249c9aea9a0305ad81bf9d /driver_nmea0183.c | |
parent | 39ad1201c6b3ad7df8d1d460db661aee22864645 (diff) | |
download | gpsd-de6105431a4cc56f5c6bb38096c1f2dab37d55b4.tar.gz |
driver_nmea0183: Have xxGNS report No FIX from FAA mode.
Also, ignore missing "nav status"
Diffstat (limited to 'driver_nmea0183.c')
-rw-r--r-- | driver_nmea0183.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/driver_nmea0183.c b/driver_nmea0183.c index 57907c21..27c7a6e0 100644 --- a/driver_nmea0183.c +++ b/driver_nmea0183.c @@ -604,13 +604,6 @@ static gps_mask_t processGNS(int count UNUSED, char *field[], int satellites_used; gps_mask_t mask = ONLINE_SET; - if ('\0' == field[6][0] || 'N' == field[6][0]) { - /* not valid, ignore */ - /* Yes, in 2019 a GLONASS only fix may be valid, but not worth - * the confusion */ - return mask; - } - if (field[1][0] != '\0') { if (0 == merge_hhmmss(field[1], session)) { register_fractional_time(field[0], field[1], session); @@ -624,11 +617,19 @@ static gps_mask_t processGNS(int count UNUSED, char *field[], } } - /* check navigation status, assume S=safe and C=caution are OK */ - if ('\0' == field[13][0] || /* missing */ - 'U' == field[13][0] || /* Unsafe */ + /* FAA mode: not valid, ignore + * Yes, in 2019 a GLONASS only fix may be valid, but not worth + * the confusion */ + if ('\0' == field[6][0] || /* FAA mode: missing */ + 'N' == field[6][0]) { /* FAA mode: not valid */ + session->newdata.mode = MODE_NO_FIX; + mask |= MODE_SET; + return mask; + } + /* navigation status, assume S=safe and C=caution are OK */ + /* can be missing on valid fix */ + if ('U' == field[13][0] || /* Unsafe */ 'V' == field[13][0]) { /* not valid */ - /* stop here */ return mask; } |