adafruit-circuitpython-gps 3.10.16__tar.gz → 3.11.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/PKG-INFO +1 -1
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/adafruit_circuitpython_gps.egg-info/PKG-INFO +1 -1
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/adafruit_gps.py +39 -2
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/examples/gps_simpletest.py +4 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/pyproject.toml +1 -1
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/.coveragerc +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/.github/workflows/build.yml +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/.github/workflows/failure-help-text.yml +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/.github/workflows/release_gh.yml +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/.github/workflows/release_pypi.yml +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/.gitignore +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/.pre-commit-config.yaml +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/.pylintrc +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/.readthedocs.yaml +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/CODE_OF_CONDUCT.md +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/LICENSE +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/LICENSES/CC-BY-4.0.txt +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/LICENSES/MIT.txt +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/LICENSES/Unlicense.txt +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/README.rst +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/README.rst.license +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/adafruit_circuitpython_gps.egg-info/SOURCES.txt +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/adafruit_circuitpython_gps.egg-info/dependency_links.txt +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/adafruit_circuitpython_gps.egg-info/requires.txt +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/adafruit_circuitpython_gps.egg-info/top_level.txt +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/_static/favicon.ico +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/_static/favicon.ico.license +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/api.rst +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/api.rst.license +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/conf.py +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/details.rst +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/details.rst.license +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/examples.rst +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/examples.rst.license +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/index.rst +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/index.rst.license +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/requirements.txt +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/examples/gps_datalogging.py +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/examples/gps_displayio_simpletest.py +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/examples/gps_echotest.py +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/examples/gps_satellitefix.py +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/examples/gps_time_source.py +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/optional_requirements.txt +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/requirements.txt +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/setup.cfg +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/tests/__init__.py +0 -0
- {adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/tests/adafruit_gps_test.py +0 -0
|
@@ -37,7 +37,7 @@ try:
|
|
|
37
37
|
except ImportError:
|
|
38
38
|
pass
|
|
39
39
|
|
|
40
|
-
__version__ = "3.
|
|
40
|
+
__version__ = "3.11.0"
|
|
41
41
|
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_GPS.git"
|
|
42
42
|
|
|
43
43
|
|
|
@@ -53,8 +53,9 @@ _GSV11 = 6
|
|
|
53
53
|
_GSV15 = 7
|
|
54
54
|
_GSV19 = 8
|
|
55
55
|
_RMC_4_1 = 9
|
|
56
|
+
_VTG = 10
|
|
56
57
|
_ST_MIN = _GLL
|
|
57
|
-
_ST_MAX =
|
|
58
|
+
_ST_MAX = _VTG
|
|
58
59
|
|
|
59
60
|
_SENTENCE_PARAMS = (
|
|
60
61
|
# 0 - _GLL
|
|
@@ -77,6 +78,8 @@ _SENTENCE_PARAMS = (
|
|
|
77
78
|
"iiiiiiIiiiIiiiIiiiI",
|
|
78
79
|
# 9 - _RMC_4_1
|
|
79
80
|
"scdcdcffsDCCC",
|
|
81
|
+
# 10 - _VTG
|
|
82
|
+
"fcFCfcfcC",
|
|
80
83
|
)
|
|
81
84
|
|
|
82
85
|
|
|
@@ -202,6 +205,12 @@ def _parse_data(sentence_type: int, data: List[str]) -> Optional[List]:
|
|
|
202
205
|
elif pti == "f":
|
|
203
206
|
# A floating point number
|
|
204
207
|
params.append(_parse_float(dti))
|
|
208
|
+
elif pti == "F":
|
|
209
|
+
# A floating point number or Nothing
|
|
210
|
+
if nothing:
|
|
211
|
+
params.append(None)
|
|
212
|
+
else:
|
|
213
|
+
params.append(_parse_float(dti))
|
|
205
214
|
elif pti == "i":
|
|
206
215
|
# An integer
|
|
207
216
|
params.append(_parse_int(dti))
|
|
@@ -289,6 +298,8 @@ class GPS:
|
|
|
289
298
|
"""Geoidal separation relative to WGS 84"""
|
|
290
299
|
self.speed_knots = None
|
|
291
300
|
"""Ground speed in knots"""
|
|
301
|
+
self.speed_kmh = None
|
|
302
|
+
"""Ground speed in km/h"""
|
|
292
303
|
self.track_angle_deg = None
|
|
293
304
|
"""Track angle in degrees"""
|
|
294
305
|
self._sats = None # Temporary holder for information from GSV messages
|
|
@@ -368,6 +379,8 @@ class GPS:
|
|
|
368
379
|
result = self._parse_gsv(talker, args)
|
|
369
380
|
elif sentence_type == b"GSA": # GPS DOP and active satellites
|
|
370
381
|
result = self._parse_gsa(talker, args)
|
|
382
|
+
elif sentence_type == b"VTG": # Ground speed
|
|
383
|
+
result = self._parse_vtg(args)
|
|
371
384
|
|
|
372
385
|
return result
|
|
373
386
|
|
|
@@ -499,6 +512,30 @@ class GPS:
|
|
|
499
512
|
(year, month, day, hours, mins, secs, 0, 0, -1)
|
|
500
513
|
)
|
|
501
514
|
|
|
515
|
+
def _parse_vtg(self, data: List[str]) -> bool:
|
|
516
|
+
# VTG - Course Over Ground and Ground Speed
|
|
517
|
+
|
|
518
|
+
if data is None or len(data) != 9:
|
|
519
|
+
return False # Unexpected number of params
|
|
520
|
+
|
|
521
|
+
parsed_data = _parse_data(_VTG, data)
|
|
522
|
+
if parsed_data is None:
|
|
523
|
+
return False # Params didn't parse
|
|
524
|
+
|
|
525
|
+
# Track made good, degrees true
|
|
526
|
+
self.track_angle_deg = parsed_data[0]
|
|
527
|
+
|
|
528
|
+
# Speed over ground, knots
|
|
529
|
+
self.speed_knots = parsed_data[4]
|
|
530
|
+
|
|
531
|
+
# Speed over ground, kilometers / hour
|
|
532
|
+
self.speed_kmh = parsed_data[6]
|
|
533
|
+
|
|
534
|
+
# Parse FAA mode indicator
|
|
535
|
+
self._mode_indicator = parsed_data[8]
|
|
536
|
+
|
|
537
|
+
return True
|
|
538
|
+
|
|
502
539
|
def _parse_gll(self, data: List[str]) -> bool:
|
|
503
540
|
# GLL - Geographic Position - Latitude/Longitude
|
|
504
541
|
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/examples/gps_simpletest.py
RENAMED
|
@@ -36,6 +36,8 @@ gps = adafruit_gps.GPS(uart, debug=False) # Use UART/pyserial
|
|
|
36
36
|
|
|
37
37
|
# Turn on the basic GGA and RMC info (what you typically want)
|
|
38
38
|
gps.send_command(b"PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0")
|
|
39
|
+
# Turn on the basic GGA and RMC info + VTG for speed in km/h
|
|
40
|
+
# gps.send_command(b"PMTK314,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0")
|
|
39
41
|
# Turn on just minimum info (RMC only, location):
|
|
40
42
|
# gps.send_command(b'PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0')
|
|
41
43
|
# Turn off everything:
|
|
@@ -102,6 +104,8 @@ while True:
|
|
|
102
104
|
print("Altitude: {} meters".format(gps.altitude_m))
|
|
103
105
|
if gps.speed_knots is not None:
|
|
104
106
|
print("Speed: {} knots".format(gps.speed_knots))
|
|
107
|
+
if gps.speed_kmh is not None:
|
|
108
|
+
print("Speed: {} km/h".format(gps.speed_kmh))
|
|
105
109
|
if gps.track_angle_deg is not None:
|
|
106
110
|
print("Track angle: {} degrees".format(gps.track_angle_deg))
|
|
107
111
|
if gps.horizontal_dilution is not None:
|
|
@@ -12,7 +12,7 @@ requires = [
|
|
|
12
12
|
[project]
|
|
13
13
|
name = "adafruit-circuitpython-gps"
|
|
14
14
|
description = "CircuitPython library for GPS modules."
|
|
15
|
-
version = "3.
|
|
15
|
+
version = "3.11.0"
|
|
16
16
|
readme = "README.rst"
|
|
17
17
|
authors = [
|
|
18
18
|
{name = "Adafruit Industries", email = "circuitpython@adafruit.com"}
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/.github/workflows/build.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/.pre-commit-config.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/LICENSES/CC-BY-4.0.txt
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/LICENSES/Unlicense.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/_static/favicon.ico
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/api.rst.license
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/details.rst.license
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/examples.rst.license
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/index.rst.license
RENAMED
|
File without changes
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/docs/requirements.txt
RENAMED
|
File without changes
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/examples/gps_datalogging.py
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/examples/gps_echotest.py
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/examples/gps_time_source.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/optional_requirements.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_gps-3.10.16 → adafruit_circuitpython_gps-3.11.0}/tests/adafruit_gps_test.py
RENAMED
|
File without changes
|