Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rc 1.0.19 #56

Merged
merged 7 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add experimental UBXSimulator utility
  • Loading branch information
semuadmin committed Feb 19, 2024
commit e4c58b5139d2365140f0d453346e614f551cb980
11 changes: 11 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# pygnssutils Release Notes

### RELEASE CANDIDATE 1.0.19

CHANGES:

semuadmin marked this conversation as resolved.
Show resolved Hide resolved
1. Update min pyubx2 version to 1.2.38.
1. Add support for pyubx2 SETPOLL msgmode (auto-detect input message mode SET or POLL)

ENHANCEMENTS:

1. Add experimental UBX Simulator.

### RELEASE 1.0.18

CHANGES:
Expand Down
8 changes: 8 additions & 0 deletions docs/pygnssutils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ pygnssutils.ubxsetrate module
:undoc-members:
:show-inheritance:

pygnssutils.ubxsimulator module
-------------------------------

.. automodule:: pygnssutils.ubxsimulator
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

Expand Down
260 changes: 260 additions & 0 deletions examples/ubxsimulator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
{
"interval": 1,
"timeout": 3,
"logfile": "/home/myuser/ubxsimulator.log",
"simVector": 1,
"global": {
"lat": 52.474715,
"lon": 13.403288,
"alt": 50.034,
"height": 47494,
"sep": 2.54,
"hMSL": 50034,
"NS": "N",
"EW": "E",
"spd": 26.0693,
"cog": 125,
"gSpeed": 13411,
"headMot": 125
},
"ubxmessages": [
{
"msgCls": 1,
"msgId": 7,
"rate": 1,
"attrs": {
"validDate": 1,
"validTime": 1,
"validMag": 1,
"fixType": 3,
"numSV": 12,
"gnssFixOk": 1,
"pDOP": 0.843,
"hAcc": 585,
"vAcc": 543
}
},
{
"msgCls": 1,
"msgId": 4,
"rate": 1,
"attrs": {
"gDOP": 0.45,
"pDOP": 0.356,
"tDOP": 0.3864,
"vDOP": 0.98733,
"hDOP": 0.96763,
"nDOP": 0.9873476,
"eDOP": 0.834
}
},
{
"msgCls": 1,
"msgId": 53,
"rate": 4,
"attrs": {
"version": 1,
"numSvs": 13,
"reserved0": 0,
"gnssId_01": 0,
"svId_01": 4,
"cno_01": 0,
"elev_01": 16,
"azim_01": 302,
"prRes_01": 0.0,
"qualityInd_01": 1,
"svUsed_01": 0,
"health_01": 1,
"diffCorr_01": 0,
"smoothed_01": 0,
"orbitSource_01": 2,
"ephAvail_01": 0,
"almAvail_01": 1,
"gnssId_02": 0,
"svId_02": 5,
"cno_02": 48,
"elev_02": 15,
"azim_02": 73,
"prRes_02": 0.0,
"qualityInd_02": 4,
"svUsed_02": 0,
"health_02": 1,
"diffCorr_02": 0,
"smoothed_02": 0,
"orbitSource_02": 2,
"ephAvail_02": 0,
"almAvail_02": 1,
"gnssId_03": 0,
"svId_03": 14,
"cno_03": 0,
"elev_03": -91,
"azim_03": 0,
"prRes_03": 0.0,
"qualityInd_03": 1,
"svUsed_03": 0,
"health_03": 1,
"diffCorr_03": 0,
"smoothed_03": 0,
"orbitSource_03": 0,
"gnssId_04": 0,
"svId_04": 18,
"cno_04": 50,
"elev_04": -91,
"azim_04": 0,
"prRes_04": 0.0,
"qualityInd_04": 4,
"svUsed_04": 0,
"health_04": 1,
"diffCorr_04": 0,
"smoothed_04": 0,
"orbitSource_04": 0,
"gnssId_05": 0,
"svId_05": 25,
"cno_05": 0,
"elev_05": 19,
"azim_05": 116,
"prRes_05": 0.0,
"qualityInd_05": 1,
"svUsed_05": 0,
"health_05": 1,
"diffCorr_05": 0,
"smoothed_05": 0,
"orbitSource_05": 1,
"ephAvail_05": 1,
"almAvail_05": 1,
"gnssId_06": 0,
"svId_06": 26,
"cno_06": 45,
"elev_06": 61,
"azim_06": 285,
"prRes_06": 3.5,
"qualityInd_06": 7,
"svUsed_06": 1,
"health_06": 1,
"diffCorr_06": 0,
"smoothed_06": 0,
"orbitSource_06": 1,
"ephAvail_06": 1,
"almAvail_06": 1,
"gnssId_07": 0,
"svId_07": 27,
"cno_07": 0,
"elev_07": 4,
"azim_07": 245,
"prRes_07": 0.0,
"qualityInd_07": 1,
"svUsed_07": 0,
"health_07": 1,
"diffCorr_07": 0,
"smoothed_07": 0,
"orbitSource_07": 2,
"ephAvail_07": 0,
"almAvail_07": 1,
"gnssId_08": 0,
"svId_08": 28,
"cno_08": 52,
"elev_08": 39,
"azim_08": 196,
"prRes_08": 2.1,
"qualityInd_08": 7,
"svUsed_08": 1,
"health_08": 1,
"diffCorr_08": 0,
"smoothed_08": 0,
"orbitSource_08": 1,
"ephAvail_08": 1,
"almAvail_08": 1,
"gnssId_09": 0,
"svId_09": 29,
"cno_09": 43,
"elev_09": 56,
"azim_09": 67,
"prRes_09": 1.8,
"qualityInd_09": 7,
"svUsed_09": 1,
"health_09": 1,
"diffCorr_09": 0,
"smoothed_09": 0,
"orbitSource_09": 1,
"ephAvail_09": 1,
"almAvail_09": 1,
"gnssId_10": 0,
"svId_10": 31,
"cno_10": 54,
"elev_10": 55,
"azim_10": 230,
"prRes_10": 0.3,
"qualityInd_10": 7,
"svUsed_10": 1,
"health_10": 1,
"diffCorr_10": 0,
"smoothed_10": 0,
"orbitSource_10": 1,
"ephAvail_10": 1,
"gnssId_11": 2,
"svId_11": 120,
"cno_11": 0,
"elev_11": 28,
"azim_11": 196,
"prRes_11": 0.0,
"qualityInd_11": 1,
"svUsed_11": 0,
"health_11": 0,
"diffCorr_11": 0,
"smoothed_11": 0,
"orbitSource_11": 7,
"gnssId_12": 2,
"svId_12": 123,
"cno_12": 0,
"elev_12": 22,
"azim_12": 140,
"prRes_12": 0.0,
"qualityInd_12": 1,
"svUsed_12": 0,
"health_12": 0,
"diffCorr_12": 0,
"smoothed_12": 0,
"orbitSource_12": 7,
"gnssId_13": 2,
"svId_13": 136,
"cno_13": 0,
"elev_13": 29,
"azim_13": 171,
"prRes_13": 0.0,
"qualityInd_13": 1,
"svUsed_13": 0,
"health_13": 0,
"diffCorr_13": 0,
"smoothed_13": 0,
"orbitSource_13": 7
}
}
],
"nmeamessages": [
{
"talker": "GN",
"msgId": "GGA",
"rate": 1,
"attrs": {
"status": "A",
"posMode": "A",
"navStatus": "V",
"sepUnit": "M",
"altUnit": "M",
"quality": 2,
"numSV": 12,
"HDOP": 0.9873476
}
},
{
"talker": "GN",
"msgId": "RMC",
"rate": 1,
"attrs": {
"status": "A",
"posMode": "A",
"navStatus": "V"
}
}
]
}
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "pygnssutils"
authors = [{ name = "semuadmin", email = "[email protected]" }]
maintainers = [{ name = "semuadmin", email = "[email protected]" }]
description = "GNSS Command Line Utilities"
version = "1.0.18"
version = "1.0.19"
license = { file = "LICENSE" }
readme = "README.md"
requires-python = ">=3.8"
Expand All @@ -34,10 +34,10 @@ classifiers = [
]

dependencies = [
"paho-mqtt>=1.6.1",
"paho-mqtt>=2.0.0",
"pyserial>=3.5",
"pyspartn>=0.2.0",
"pyubx2>=1.2.37",
"pyubx2>=1.2.38",
]

[project.scripts]
Expand All @@ -48,6 +48,7 @@ gnssmqttclient = "pygnssutils.gnssmqttclient:main"
ubxsetrate = "pygnssutils.ubxsetrate:main"
ubxsave = "pygnssutils.ubxsave:main"
ubxload = "pygnssutils.ubxload:main"
ubxsimulator = "pygnssutils.ubxsimulator:main"

[project.urls]
homepage = "https://github.com/semuconsulting/pygnssutils"
Expand Down Expand Up @@ -77,7 +78,7 @@ profile = "black"

[tool.bandit]
exclude_dirs = ["docs", "examples", "tests"]
skips = ["B104", "B307"] # bind 0.0.0.0; use of eval
skips = ["B104", "B307", "B311"] # bind 0.0.0.0; use of eval, random gen

[tool.pylint]
jobs = 0
Expand All @@ -100,7 +101,7 @@ disable = """

[tool.pytest.ini_options]
minversion = "7.0"
addopts = "--cov --cov-report term-missing --cov-fail-under 35"
addopts = "--cov --cov-report html --cov-fail-under 35"
pythonpath = ["src"]

[tool.coverage.run]
Expand Down
1 change: 1 addition & 0 deletions src/pygnssutils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
from pygnssutils.ubxload import UBXLoader
from pygnssutils.ubxsave import UBXSaver
from pygnssutils.ubxsetrate import UBXSetRate
from pygnssutils.ubxsimulator import UBXSimulator

version = __version__ # pylint: disable=invalid-name
6 changes: 3 additions & 3 deletions src/pygnssutils/gnssdump.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def __init__(self, **kwargs):
:param int baudrate: (kwarg) serial baud rate (9600)
:param int timeout: (kwarg) serial timeout in seconds (3)
:param int validate: (kwarg) 1 = validate checksums, 0 = do not validate (1)
:param int msgmode: (kwarg) 0 = GET, 1 = SET, 2 = POLL (0)
:param int msgmode: (kwarg) 0 = GET, 1 = SET, 2 = POLL, 3 = SETPOLL (0)
:param int parsebitfield: (kwarg) 1 = parse UBX 'X' attributes as bitfields, 0 = leave as bytes (1)
:param int format: (kwarg) output format 1 = parsed, 2 = raw, 4 = hex, 8 = tabulated hex, 16 = parsed as string, 32 = JSON (1) (can be OR'd)
:param int quitonerror: (kwarg) 0 = ignore errors, 1 = log errors and continue, 2 = (re)raise errors (1)
Expand Down Expand Up @@ -678,9 +678,9 @@ def main():
arp.add_argument(
"--msgmode",
required=False,
help="0 = GET, 1 = SET, 2 = POLL",
help="0 = GET, 1 = SET, 2 = POLL, 3 = SETPOLL",
type=int,
choices=[0, 1, 2],
choices=[0, 1, 2, 3],
default=0,
)
arp.add_argument(
Expand Down
Loading