Skip to content

Commit

Permalink
#38: handle status for RMC and quality for GGA
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas committed Mar 23, 2022
1 parent 4ff5254 commit 324d3c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/nmea0183ton2k/NMEA0183DataToN2K.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,10 @@ class NMEA0183DataToN2KFunctions : public NMEA0183DataToN2K
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) &&
Expand Down Expand Up @@ -750,6 +754,10 @@ class NMEA0183DataToN2KFunctions : public NMEA0183DataToN2K
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;
Expand Down

0 comments on commit 324d3c4

Please sign in to comment.