Skip to content

Commit 8e3d3c5

Browse files
committed
2 parents df2c371 + 9dc8fc0 commit 8e3d3c5

File tree

14 files changed

+158
-61
lines changed

14 files changed

+158
-61
lines changed

.github/workflows/checkpr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: [3.9, "3.10", "3.11", "3.12", "3.13","3.14.0-rc.2"]
11+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1212

1313
steps:
1414
- uses: actions/checkout@v4

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python-version: [3.9, "3.10", "3.11", "3.12", "3.13", "3.14.0-rc.2"]
13+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1414

1515
steps:
1616
- uses: actions/checkout@v4

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
"python.analysis.addHoverSummaries": false,
2323
"python-envs.defaultEnvManager": "ms-python.python:venv",
2424
"python-envs.pythonProjects": [],
25-
"python.defaultInterpreterPath": "${userHome}/pygpsclient/bin/python3"
25+
"python.defaultInterpreterPath": "${userHome}/pygpsclient/bin/python3",
26+
"python.testing.unittestEnabled": false
2627
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ b'\xb5b\x06\x01\x08\x00\xf0\x01\x00\x01\x00\x01\x00\x00\x022'
289289

290290
**CFG-VALSET, CFG-VALDEL and CFG-VALGET message types**
291291

292-
Generation 9 of the UBX protocol (*23.01 or greater, e.g. NEO-M9N, ZED-F9P*) introduced the concept of a device configuration interface with configurable parameters being set or unset (del) in the designated memory layer(s) via the CFG-VALSET and CFG-VALDEL message types, or queried via the CFG-VALGET message type. *Legacy CFG configuration message types continue to be supported but are now deprecated on Generation 9+ devices*.
292+
Generation 9 of the UBX protocol (*23.01 or greater, e.g. NEO-M9N, ZED-F9P*) introduced the concept of a device configuration interface with configurable parameters being set or unset (del) in the designated memory layer(s) via the CFG-VALSET and CFG-VALDEL message types, or queried via the CFG-VALGET message type. *Legacy CFG configuration message types continue to be supported in earlier devices but are deprecated on Generation 9 devices and removed altogether on Generation 10 (ZED-X20P, etc.)*.
293293

294294
Optionally, batches of CFG-VALSET and CFG-VALDEL messages can be applied transactionally, with the combined configuration only being committed at the end of the transaction.
295295

RELEASE_NOTES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# pyubx2 Release Notes
22

3+
### RELEASE 1.2.59
4+
5+
1. Add additional E6/L6 SIGID decodes.
6+
1. Update `str()` method to decode sigId where possible e.g. `L1_C/A`, `E1_C`.
7+
1. Minor updates to static configuration database methods `config_set`, `config_get` & `config_del` to tolerate hyphens in configuration database key names e.g. “CFG-MSGOUT-UBX_RXM_RAWX_UART1” is treated as "CFG_MSGOUT_UBX_RXM_RAWX_UART1".
8+
39
### RELEASE 1.2.58
410

511
1. Minimum pynmeagps version updated to 1.0.54 - incorporates additional support for proprietary Quectel NMEA sentences.

pyproject.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description = "UBX protocol parser and generator"
1111
license = "BSD-3-Clause"
1212
license-files = ["LICENSE"]
1313
readme = "README.md"
14-
requires-python = ">=3.9"
14+
requires-python = ">=3.10"
1515
classifiers = [
1616
"Operating System :: OS Independent",
1717
"Development Status :: 5 - Production/Stable",
@@ -23,7 +23,6 @@ classifiers = [
2323
"Intended Audience :: Science/Research",
2424
"Intended Audience :: End Users/Desktop",
2525
"Programming Language :: Python :: 3",
26-
"Programming Language :: Python :: 3.9",
2726
"Programming Language :: Python :: 3.10",
2827
"Programming Language :: Python :: 3.11",
2928
"Programming Language :: Python :: 3.12",
@@ -34,7 +33,7 @@ classifiers = [
3433
"Topic :: Scientific/Engineering :: GIS",
3534
]
3635

37-
dependencies = ["pynmeagps >= 1.0.54", "pyrtcm >= 1.1.9"]
36+
dependencies = ["pynmeagps >= 1.0.55", "pyrtcm >= 1.1.9"]
3837

3938
[project.urls]
4039
homepage = "https://github.com/semuconsulting/pyubx2"
@@ -68,10 +67,10 @@ deploy = [{ include-group = "build" }, { include-group = "test" }]
6867
version = { attr = "pyubx2._version.__version__" }
6968

7069
[tool.black]
71-
target-version = ['py39']
70+
target-version = ['py310']
7271

7372
[tool.isort]
74-
py_version = 39
73+
py_version = 310
7574
profile = "black"
7675

7776
[tool.bandit]
@@ -82,7 +81,7 @@ skips = []
8281
jobs = 0
8382
reports = "y"
8483
recursive = "y"
85-
py-version = "3.9"
84+
py-version = "3.10"
8685
fail-under = "9.8"
8786
fail-on = "E,F"
8887
clear-cache-post-run = "y"

src/pyubx2/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
:license: BSD 3-Clause
99
"""
1010

11-
__version__ = "1.2.58"
11+
__version__ = "1.2.59"

src/pyubx2/ubxhelpers.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
UBX_HDR,
2828
UBX_PROTOCOL,
2929
)
30-
from pyubx2.ubxtypes_decodes import FIXTYPE, GNSSLIST
30+
from pyubx2.ubxtypes_decodes import FIXTYPE, GNSSLIST, SIGID
3131

3232
EPOCH0 = datetime(1980, 1, 6) # EPOCH start date
3333
LEAPOFFSET = 18 # leap year offset in seconds, valid as from 1/1/2017
@@ -204,12 +204,17 @@ def cfgname2key(name: str) -> tuple:
204204
Return hexadecimal key and data type for given
205205
configuration database key name.
206206
207+
NB: UBX_CONFIG_DATABASE uses underscores in key names,
208+
whereas UBX documentation uses a mixture of hyphens
209+
and underscores.
210+
207211
:param str name: config key as string e.g. "CFG_NMEA_PROTVER"
208212
:return: tuple of (key, type)
209213
:rtype: tuple: (int, str)
210214
:raises: UBXMessageError
211-
212215
"""
216+
217+
name = name.replace("-", "_")
213218
try:
214219
return ubcdb.UBX_CONFIG_DATABASE[name]
215220
except KeyError as err:
@@ -554,6 +559,23 @@ def protocol(raw: bytes) -> int:
554559
return 0
555560

556561

562+
def sigid2str(gnss_id: int, sig_id: int) -> str:
563+
"""
564+
Convert GNSS ID and Signal ID to descriptive string
565+
('GPS L1C/A', etc.).
566+
567+
:param int gnss_id: GNSS identifier as integer (0-6)
568+
:param int sig_id: Signal identifier as integer
569+
:return: GNSS identifier as string
570+
:rtype: str
571+
"""
572+
573+
try:
574+
return SIGID[(gnss_id, sig_id)]
575+
except KeyError:
576+
return str(sig_id)
577+
578+
557579
def utc2itow(utc: datetime, leaps: int = LEAPOFFSET) -> tuple:
558580
"""
559581
Convert UTC datetime to GPS Week Number, Time Of Week

src/pyubx2/ubxmessage.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
msgclass2bytes,
2828
msgstr2bytes,
2929
nomval,
30+
sigid2str,
3031
val2bytes,
3132
)
3233
from pyubx2.ubxtypes_core import (
@@ -536,6 +537,12 @@ def __str__(self) -> str:
536537
val = escapeall(val)
537538
if att[0:6] == "gnssId": # attribute is a GNSS ID
538539
val = gnss2str(val) # get string representation e.g. 'GPS'
540+
if att[0:5] == "sigId": # attribute is a Signal ID
541+
idx = att.split("_", 1) # check for group index
542+
idxs = f"_{idx[1]}" if len(idx) > 1 else ""
543+
if hasattr(self, f"gnssId{idxs}"):
544+
# get string representation e.g. 'L1_C/A'
545+
val = sigid2str(getattr(self, f"gnssId{idxs}"), val)
539546
if att == "iTOW": # attribute is a GPS Time of Week
540547
val = itow2utc(val) # show time in UTC format
541548
# if it's an ACK, we show what it's acknowledging in plain text

src/pyubx2/ubxtypes_decodes.py

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -446,33 +446,40 @@
446446

447447
# key is (gnssId, sigId)
448448
SIGID = {
449-
(0, 0): "GPS L1C/A",
450-
(0, 3): "GPS L2 CL",
451-
(0, 4): "GPS L2 CM",
452-
(0, 6): "GPS L5 I",
453-
(0, 7): "GPS L5 Q",
454-
(1, 0): "SBAS L1C/A",
455-
(2, 0): "Galileo E1 C",
456-
(2, 1): "Galileo E1 B",
457-
(2, 3): "Galileo E5 al",
458-
(2, 4): "Galileo E5 aQ",
459-
(2, 5): "Galileo E5 bI",
460-
(2, 6): "Galileo E5 bQ",
461-
(3, 0): "BeiDou B1I D1",
462-
(3, 1): "BeiDou B1I D2",
463-
(3, 2): "BeiDou B2I D1",
464-
(3, 3): "BeiDou B2I D2",
465-
(3, 5): "BeiDou B1C",
466-
(3, 7): "BeiDou B2a",
467-
(5, 0): "QZSS L1C/A",
468-
(5, 1): "QZSS L1S",
469-
(5, 4): "QZSS L2 CM",
470-
(5, 5): "QZSS L2 CL",
471-
(5, 8): "QZSS L5 I",
472-
(5, 9): "QZSS L5 Q",
473-
(6, 0): "GLONASS L1 OF",
474-
(6, 2): "GLONASS L2 OF",
475-
(7, 0): "NavIC L5 A",
449+
(0, 0): "L1_C/A",
450+
(0, 3): "L2_CL",
451+
(0, 4): "L2_CM",
452+
(0, 6): "L5_I",
453+
(0, 7): "L5_Q",
454+
(1, 0): "L1_C/A",
455+
(2, 0): "E1_C",
456+
(2, 1): "E1_B",
457+
(2, 3): "E5_al",
458+
(2, 4): "E5_aQ",
459+
(2, 5): "E5_bI",
460+
(2, 6): "E5_bQ",
461+
(2, 8): "E6_B",
462+
(2, 9): "E6_C",
463+
(3, 0): "B1_ID1",
464+
(3, 1): "B1I_D2",
465+
(3, 2): "B2I_D1",
466+
(3, 3): "B2I_D2",
467+
(3, 4): "B3I_D1",
468+
(3, 5): "B1_Cp",
469+
(3, 6): "B1_Cd",
470+
(3, 7): "B2_ap",
471+
(3, 8): "B2_ad",
472+
(3, 10): "B3I_D2",
473+
(5, 0): "L1_C/A",
474+
(5, 1): "L1_S",
475+
(5, 4): "L2_CM",
476+
(5, 5): "L2_CL",
477+
(5, 8): "L5_I",
478+
(5, 9): "L5_Q",
479+
(5, 12): "L1_CB",
480+
(6, 0): "L1_OF",
481+
(6, 2): "L2_OF",
482+
(7, 0): "L5_A",
476483
}
477484
"""
478485
GNSS, Signal ID from UBX-NAV-SIG

0 commit comments

Comments
 (0)