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.1 #4

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"python.defaultInterpreterPath": "python3",
"modulename": "${workspaceFolderBasename}",
"distname": "${workspaceFolderBasename}",
"moduleversion": "1.0.0"
"moduleversion": "1.0.1"
}
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
"Sort Imports",
"Format",
"Pylint",
//"Test",
"Test",
"Build",
"Sphinx HTML"
],
Expand Down
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ pyubxutils
[Current Status](#currentstatus) |
[Installation](#installation) |
[ubxsimulator](#ubxsimulator) |
[ubxsave CLI](#ubxsave) |
[ubxload CLI](#ubxload) |
[ubxbase CLI](#ubxbase) |
[ubxsetrate CLI](#ubxsetrate) |
[ubxcompare CLI](#ubxcompare) |
[Graphical Client](#gui) |
Expand All @@ -16,6 +19,7 @@ pyubxutils is an original series of Python u-blox ™ UBX © protocol utility cl
1. [`ubxsimulator`](#ubxsimulator) utility. This provides a basic simulation of a GNSS receiver serial stream by generating synthetic UBX or NMEA messages based on parameters defined in a json configuration file.
1. [`ubxsave`](#ubxsave) CLI utility. This saves a complete set of configuration data from any Generation 9+ u-blox device (e.g. NEO-M9N or ZED-F9P) to a file. The file can then be reloaded to any compatible device using the `ubxload` utility.
1. [`ubxload`](#ubxload) CLI utility. This reads a file containing binary configuration data and loads it into any compatible Generation 9+ u-blox device (e.g. NEO-M9N or ZED-F9P).
1. [`ubxbase`](#ubxbase) CLI utility. A utility which configures compatible u-blox GNSS receivers (e.g. ZED-F9P) as RTK base stations, using either Fixed or Survey-In timing modes.
1. [`ubxsetrate`](#ubxsetrate) CLI utility. A simple utility which sets NMEA or UBX message rates on u-blox GNSS receivers.
1. [`ubxcompare`](#ubxcompare) CLI utility. Utility for comparing two or more u-blox config files in either text (\*.txt) or binary (\*.ubx) format. Output files from the `ubxsave` utility can be used as input files.

Expand Down Expand Up @@ -118,7 +122,7 @@ Command line arguments can be stored in a configuration file and invoked using t
*GENERATION 9+ DEVICES ONLY (e.g. NEO-M9N or ZED-F9P)*

```
class pyubxutils.ubxconfig.UBXSaver(file, stream, **kwargs)
class pyubxutils.ubxsave.UBXSaver(file, stream, **kwargs)
```

CLI utility which saves Generation 9+ UBX device configuration data to a file. `ubxsave` polls configuration data via the device's serial port using a series of CFG-VALGET poll messages. It parses the responses to these polls, converts them to CFG-VALSET command messages and saves these to a binary file. This binary file can then be loaded into any compatible UBX device (e.g. via the `ubxload` utility) to restore the saved configuration.
Expand All @@ -145,7 +149,7 @@ ubxsave -h
*GENERATION 9+ DEVICES ONLY (e.g. NEO-M9N or ZED-F9P)*

```
class pyubxutils.ubxconfig.UBXLoader(file, stream, **kwargs)
class pyubxutils.ubxload.UBXLoader(file, stream, **kwargs)
```

CLI utility which loads UBX configuration (CFG-VALSET) data from a binary file (e.g. one created by the `ubxsave` utility) and loads it into the volatile memory (RAM) of a compatible Generation 9+ UBX device via its serial port. It then awaits acknowledgements to this data and reports any errors.
Expand All @@ -162,11 +166,34 @@ For help and full list of optional arguments, type:
ubxload -h
```

---
## <a name="ubxbase">ubxbase CLI</a>

*RTK-COMPATIBLE GENERATION 9+ DEVICES ONLY (e.g. ZED-F9P)*

```
class pyubxutils.ubxbase.UBXBase(file, stream, **kwargs)
```

CLI utility which configures a compatible u-blox receiver to RTK base station mode, using either Fixed or Survey-In timing modes.

### CLI Usage:

```shell
ubxbase -P /dev/ttyACM0 --timemode 2 --fixedpos 37.2334512,-115.8151357,18226.4 --postype 1 --acclimit 10 --waittime 5
```

For help and full list of optional arguments, type:

```shell
ubxbase -h
```

---
## <a name="ubxsetrate">ubxsetrate CLI</a>

```
class pyubxutils.ubxconfig.UBXSetRate(**kwargs)
class pyubxutils.ubxsetrate.UBXSetRate(**kwargs)
```

A simple CLI utility to set NMEA or UBX message rates on u-blox receivers via a serial port.
Expand Down
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# pyubxutils Release Notes

### RELEASE 1.0.1

ENHANCEMENTS:

1. Add `ubxbase` utility to configure compatible u-blox receiver (e.g. ZED-F9P) to Base Station mode. Type `ubxbase -h` for help.

### RELEASE 1.0.0

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

pyubxutils.ubxbase module
-------------------------

.. automodule:: pyubxutils.ubxbase
:members:
:undoc-members:
:show-inheritance:

pyubxutils.ubxcompare module
----------------------------

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "pyubxutils"
authors = [{ name = "semuadmin", email = "semuadmin@semuconsulting.com" }]
maintainers = [{ name = "semuadmin", email = "semuadmin@semuconsulting.com" }]
description = "UBX Protocol Command Line Utilities"
version = "1.0.0"
version = "1.0.1"
license = { file = "LICENSE" }
readme = "README.md"
requires-python = ">=3.9"
Expand Down Expand Up @@ -41,6 +41,7 @@ ubxsave = "pyubxutils.ubxsave:main"
ubxload = "pyubxutils.ubxload:main"
ubxsimulator = "pyubxutils.ubxsimulator_cli:main"
ubxcompare = "pyubxutils.ubxcompare:main"
ubxbase = "pyubxutils.ubxbase:main"

[project.urls]
homepage = "https://github.com/semuconsulting/pyubxutils"
Expand Down
2 changes: 1 addition & 1 deletion src/pyubxutils/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
:license: BSD 3-Clause
"""

__version__ = "1.0.0"
__version__ = "1.0.1"
33 changes: 33 additions & 0 deletions src/pyubxutils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import logging
import logging.handlers
from argparse import ArgumentParser
from math import trunc
from os import getenv

from pyubxutils.globals import (
Expand Down Expand Up @@ -172,3 +173,35 @@ def progbar(i: int, lim: int, inc: int = 50):
f"{int(pct*100/inc):02}% " + "\u2593" * pct + "\u2591" * (inc - pct),
end="\r",
)


def h2sphp(val: float) -> tuple:
"""
Split height in cm into standard (cm) and high (mm * 10)
precision components.

e.g. 123456.78 -> 123456, 78

:param val: decimal lat/lon value
:return: tuple of integers
:rtype: tuple
"""

sp = trunc(val)
hp = int(round((val - sp) * 100, 0))
return sp, hp


def ll2sphp(val: float) -> tuple:
"""
Split lat/lon into standard (1-7 dp) and high (8-9 dp)
precision components.

e.g. 51.123456789 -> 511234567, 89

:param val: decimal height value in cm
:return: tuple of integers
:rtype: tuple
"""

return h2sphp(val * 1e7)
Loading