diff --git a/adafruit_gps.py b/adafruit_gps.py index 6341ed1..04e16aa 100644 --- a/adafruit_gps.py +++ b/adafruit_gps.py @@ -44,8 +44,9 @@ _GSV11 = 6 _GSV15 = 7 _GSV19 = 8 +_RMC_4_1 = 9 _ST_MIN = _GLL -_ST_MAX = _GSV19 +_ST_MAX = _RMC_4_1 _SENTENCE_PARAMS = ( # 0 - _GLL @@ -66,6 +67,8 @@ "iiiiiiIiiiIiiiI", # 8 - _GSV19 "iiiiiiIiiiIiiiIiiiI", + # 9 - _RMC_4_1 + "fcdcdcffiDCCC", ) @@ -439,9 +442,9 @@ def _parse_gll(self, data): def _parse_rmc(self, data): # RMC - Recommended Minimum Navigation Information - if data is None or len(data) != 12: + if data is None or len(data) not in (12, 13): return False # Unexpected number of params. - data = _parse_data(_RMC, data) + data = _parse_data({12: _RMC, 13: _RMC_4_1}[len(data)], data) if data is None: return False # Params didn't parse diff --git a/examples/gps_simpletest.py b/examples/gps_simpletest.py index fb93283..4e41a8d 100644 --- a/examples/gps_simpletest.py +++ b/examples/gps_simpletest.py @@ -96,4 +96,4 @@ if gps.horizontal_dilution is not None: print("Horizontal dilution: {}".format(gps.horizontal_dilution)) if gps.height_geoid is not None: - print("Height geo ID: {} meters".format(gps.height_geoid)) + print("Height geoid: {} meters".format(gps.height_geoid))