From de6105431a4cc56f5c6bb38096c1f2dab37d55b4 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Tue, 19 Mar 2019 12:57:47 -0700 Subject: driver_nmea0183: Have xxGNS report No FIX from FAA mode. Also, ignore missing "nav status" --- driver_nmea0183.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'driver_nmea0183.c') 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; } -- cgit v1.2.1