adafruit / Adafruit_CircuitPython_GPS

GPS parsing module for CircuitPython. Meant to parse NMEA data from serial GPS modules.
MIT License
75 stars 58 forks source link

_parse_rmc method failed to parse NMEA 0183 ver. 4.1 compliant RMC sentence #65

Closed lyusupov closed 2 years ago

lyusupov commented 2 years ago

NMEA 0183 ver. 4.1 compliant RMC sentence has 13 parameters.

Format:

$<TalkerID>RMC,<Timestamp>,<Status>,<Lat>,<N/S>,<Long>,<E/W>,<SOG>,<COG>,<Date>,<MagVa
r>,<MagVarDir>,<mode>,<NavStatus>*<checksum><CR><LF>

Example:

$GNRMC,060512.00,A,3150.788156,N,11711.922383,E,0.0,,311019,,,A,V*1B

However, current Adafruit_CircuitPython_GPS RMC parser rejects the sentence processing entirely.

First filter takes place here

        if data is None or len(data) != 12:
            return False  # Unexpected number of params.

and the second one is there

    if len(param_types) != len(data):
        # The expected number does not match the number of data items
        return None