diff --git a/external/nmea/parse.c b/external/nmea/parse.c index a181f9a0ab5c..e137d2729852 100644 --- a/external/nmea/parse.c +++ b/external/nmea/parse.c @@ -415,14 +415,14 @@ int nmea_parse_GPRMC( const char *buff, int buff_sz, nmeaGPRMC *pack ) nmea_trace_buff( buff, buff_sz ); nsen = nmea_scanf( buff, buff_sz, - "$G%CRMC,%s,%C,%f,%C,%f,%C,%f,%f,%2d%2d%2d,%f,%C,%C*", + "$G%CRMC,%s,%C,%f,%C,%f,%C,%f,%f,%2d%2d%2d,%f,%C,%C,%C*", &( type ), &( time_buff[0] ), &( pack->status ), &( pack->lat ), &( pack->ns ), &( pack->lon ), &( pack->ew ), &( pack->speed ), &( pack->direction ), &( pack->utc.day ), &( pack->utc.mon ), &( pack->utc.year ), - &( pack->declination ), &( pack->declin_ew ), &( pack->mode ) ); + &( pack->declination ), &( pack->declin_ew ), &( pack->mode ), &( pack->navstatus ) ); - if ( nsen != 14 && nsen != 15 ) + if ( nsen < 14 || nsen > 16 ) { nmea_error( "G?RMC parse error!" ); return 0; diff --git a/external/nmea/sentence.h b/external/nmea/sentence.h index 1ed707f40a38..d007a3cdc0d3 100644 --- a/external/nmea/sentence.h +++ b/external/nmea/sentence.h @@ -118,7 +118,7 @@ typedef struct _nmeaGPRMC double declination; //!< Magnetic variation degrees (Easterly var. subtracts from true course) char declin_ew; //!< [E]ast or [W]est char mode; //!< Mode indicator of fix type (A = autonomous, D = differential, E = estimated, N = not valid, S = simulator) - + char navstatus; //!< NMEA v4.1 - Navigation Status type (S = Safe, C = Caution, U = Unsafe, V = Navigational status not valid) } nmeaGPRMC; /**