diff --git a/lib/nmea0183ton2k/NMEA0183DataToN2K.cpp b/lib/nmea0183ton2k/NMEA0183DataToN2K.cpp index e83731f..bc0f468 100644 --- a/lib/nmea0183ton2k/NMEA0183DataToN2K.cpp +++ b/lib/nmea0183ton2k/NMEA0183DataToN2K.cpp @@ -350,6 +350,10 @@ private: LOG_DEBUG(GwLog::DEBUG, "failed to parse RMC %s", msg.line); return; } + if (status != 'A' && status != 'a'){ + LOG_DEBUG(GwLog::DEBUG, "invalid status %c for RMC %s",status, msg.line); + return; + } tN2kMsg n2kMsg; if ( UD(GPST) && @@ -750,6 +754,10 @@ private: LOG_DEBUG(GwLog::DEBUG, "failed to parse GGA %s", msg.line); return; } + if (GPSQualityIndicator == 0){ + LOG_DEBUG(GwLog::DEBUG, "quality 0 (no fix) for GGA %s", msg.line); + return; + } if (! updateDouble(boatData->GPST,GPSTime,msg.sourceId)) return; if (! updateDouble(boatData->LAT,Latitude,msg.sourceId)) return; if (! updateDouble(boatData->LON,Longitude,msg.sourceId)) return; diff --git a/platformio.ini b/platformio.ini index decf238..e5e42be 100644 --- a/platformio.ini +++ b/platformio.ini @@ -20,12 +20,11 @@ extra_configs= platform = espressif32 framework = arduino lib_deps = - ttlappalainen/NMEA2000-library @ ^4.17.2 - #ttlappalainen/NMEA2000_esp32 @ ^1.0.3 - ttlappalainen/NMEA0183 @ ^1.7.1 - bblanchon/ArduinoJson@^6.18.5 - ottowinter/ESPAsyncWebServer-esphome@^2.0.1 - fastled/FastLED @ ^3.4.0 + ttlappalainen/NMEA2000-library @ 4.17.2 + ttlappalainen/NMEA0183 @ 1.7.1 + bblanchon/ArduinoJson@6.18.5 + ottowinter/ESPAsyncWebServer-esphome@2.0.1 + fastled/FastLED @ 3.4.0 board_build.embed_files = lib/generated/index.html.gz lib/generated/index.js.gz