Skip to content

Commit d8964e0

Browse files
authored
Merge pull request #174 from semuconsulting/RC-1.5.2
Rc 1.5.2
2 parents 537d48e + c4267b0 commit d8964e0

14 files changed

+62
-40
lines changed

.vscode/launch.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"configurations": [
77
{
88
"name": "Python: Module",
9-
"type": "python",
9+
"type": "debugpy",
1010
"request": "launch",
1111
"module": "pygpsclient"
1212
}

.vscode/settings.json

-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44
"editor.formatOnSave": true,
55
"modulename": "pygpsclient",
66
"distname": "pygpsclient",
7-
"moduleversion": "1.5.1",
87
"python.defaultInterpreterPath": "python3",
98
}

.vscode/tasks.json

+12-10
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,6 @@
153153
"type": "process",
154154
"command": "sphinx-apidoc",
155155
"args": [
156-
"--doc-project=${config:modulename}",
157-
"--doc-author=semuadmin",
158-
"--doc-version=${config:moduleversion}",
159-
"--doc-release=${config:moduleversion}",
160156
"--ext-autodoc",
161157
"--ext-viewcode",
162158
"--templatedir=docs",
@@ -205,29 +201,32 @@
205201
},
206202
{
207203
"label": "Install Wheel",
208-
"type": "process",
204+
"type": "shell",
209205
"command": "${config:python.defaultInterpreterPath}",
210206
"args": [
211207
"-m",
212208
"pip",
213209
"install",
214-
"${workspaceFolder}/dist/${config:distname}-${config:moduleversion}-py3-none-any.whl",
215210
"--user",
216-
"--force-reinstall"
211+
"--force-reinstall",
212+
"*.whl"
217213
],
214+
"options": {
215+
"cwd": "dist"
216+
},
218217
"problemMatcher": []
219218
},
220219
{
221220
"label": "Install Locally",
222-
"type": "process",
221+
"type": "shell",
223222
"command": "${config:python.defaultInterpreterPath}",
224223
"args": [
225224
"-m",
226225
"pip",
227226
"install",
228-
"${workspaceFolder}/dist/${config:distname}-${config:moduleversion}-py3-none-any.whl",
229227
"--user",
230-
"--force-reinstall"
228+
"--force-reinstall",
229+
"*.whl"
231230
],
232231
"dependsOrder": "sequence",
233232
"dependsOn": [
@@ -240,6 +239,9 @@
240239
"Build",
241240
"Sphinx HTML"
242241
],
242+
"options": {
243+
"cwd": "dist"
244+
},
243245
"problemMatcher": []
244246
}
245247
]

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ You will need to logout and login for the launcher to take effect.
240240

241241
1. To connect to a GNSS receiver via USB or UART port, select the device from the listbox, set the appropriate serial connection parameters and click
242242
![connect icon](https://github.com/semuconsulting/PyGPSClient/blob/master/src/pygpsclient/resources/usbport-1-24.png?raw=true). The application will endeavour to pre-select a recognised GNSS/GPS device but this is platform and device dependent. Press the ![refresh](https://github.com/semuconsulting/PyGPSClient/blob/master/src/pygpsclient/resources/iconmonstr-refresh-6-16.png?raw=true) button to refresh the list of connected devices at any point. `Rate bps` (baud rate) is typically the only setting that might need adjusting, but tweaking the `timeout` setting may improve performance on certain platforms. The `Msg Mode` parameter defaults to `GET` i.e., periodic or poll response messages *from* a receiver. If you wish to parse streams of command or poll messages being sent *to* a receiver, set the `Msg Mode` to `SET` or `POLL`. An optional serial or socket stream inactivity timeout can also be set (in seconds; 0 = no timeout).
243-
1. A custom user-defined serial port can also be passed via the json configuration file setting `"userport_s":`, via environment variable `PYGPSCLIENT_USERPORT` or as a command line argument `--userport`. A special userport value of "ubxsimulator" invokes the experimental [`pygnssutils.UBXSimulator`](https://github.com/semuconsulting/pygnssutils/blob/main/src/pygnssutils/ubxsimulator.py) utility to emulate a GNSS NMEA/UBX serial stream.
243+
1. A custom user-defined serial port can also be passed via the json configuration file setting `"userport_s":`, via environment variable `PYGPSCLIENT_USERPORT` or as a command line argument `--userport`. A special userport value of "ubxsimulator" invokes the experimental [`pyubxutils.UBXSimulator`](https://github.com/semuconsulting/pyubxutils/blob/main/src/pyubxutils/ubxsimulator.py) utility to emulate a GNSS NMEA/UBX serial stream.
244244
1. To connect to a TCP or UDP socket, enter the server URL and port, select the protocol (defaults to TCP) and click
245245
![connect socket icon](https://github.com/semuconsulting/PyGPSClient/blob/master/src/pygpsclient/resources/ethernet-1-24.png?raw=true).
246246
1. To stream from a previously-saved <a name="filestream">binary datalog file</a>, click
@@ -281,7 +281,7 @@ You will need to logout and login for the launcher to take effect.
281281
|![sysmon widget](https://github.com/semuconsulting/PyGPSClient/blob/master/images/sysmon_widget.png?raw=true)| System Monitor widget showing device cpu, memory and I/O utilisation (*GNSS receiver must be capable of outputting UBX MON-SYS and/or MON-COMMS messages*). Tick checkbox to toggle between actual (cumulative) I/O stats and pending I/O. |
282282
|![scatterplot widget](https://github.com/semuconsulting/PyGPSClient/blob/master/images/scatterplot_widget.png?raw=true)| Scatterplot widget showing variability in position reporting over time. (Optional) Enter fixed reference position. Select Average to center plot on dynamic average position (*displayed at top left*), or Fixed to center on fixed reference position (*if entered*). Check Autorange to set plot range automatically. Set the update interval (e.g. 4 = every 4th navigation solution). Use the range slider or mouse wheel to adjust plot range. Right-click to set fixed reference point to the current mouse cursor position. Double-click to clear the existing data. Settings may be saved to a json configuration file. |
283283
|![rover widget](https://github.com/semuconsulting/PyGPSClient/blob/master/images/rover_widget.png?raw=true) | Rover widget plots the relative 2D position, track and status information for the roving receiver in a fixed or moving base / rover RTK configuration. Can also display relative position of NTRIP mountpoint and receiver in a static RTK configuration. Double-click to clear existing plot. (*GNSS rover receiver must be capable of outputting UBX NAV-RELPOSNED messages.*) |
284-
|![chart view](https://github.com/semuconsulting/PyGPSClient/blob/master/images/chart_widget.png?raw=true) | Chart widget acts as a multi-channel "oscilloscope", allowing the user to plot a series of named numeric data attributes from any NMEA, UBX, RTCM or SPARTN data source, with configurable y (value) and x (time) axes. By default, the number of channels is set to 4, but this can be manually edited by the user via the json configuration file setting `chartsettings_d["numchn_n"]`. For each channel, user can select: (*optional*) identity of message source e.g. `NAV-PVT`; attribute name e.g. `hAcc`; scaling factor (divisor) e.g. 1000; y axis range e.g. 0 - 5. Wildcards are available for attribute groups - "\*" (average of group values), "+" (maximum of group values), "-" (minimum of group values) e.g. `cno*` will plot the average `cno` value for a group of satellites. Double-click to clear the existing data. Double-right-click to save the current chart data to the clipboard in CSV format. Settings may be saved to a json configuration file. |
284+
|![chart view](https://github.com/semuconsulting/PyGPSClient/blob/master/images/chart_widget.png?raw=true) | Chart widget acts as a multi-channel "plotter", allowing the user to plot a series of named numeric data attributes from any NMEA, UBX, RTCM or SPARTN data source, with configurable y (value) and x (time) axes. By default, the number of channels is set to 4, but this can be manually edited by the user via the json configuration file setting `chartsettings_d["numchn_n"]`. For each channel, user can select: (*optional*) identity of message source e.g. `NAV-PVT`; attribute name e.g. `hAcc`; scaling factor (divisor) e.g. 1000; y axis range e.g. 0 - 5. Wildcards are available for attribute groups - "\*" (average of group values), "+" (maximum of group values), "-" (minimum of group values) e.g. `cno*` will plot the average `cno` value for a group of satellites. Double-click to clear the existing data. Double-right-click to save the current chart data to the clipboard in CSV format. Settings may be saved to a json configuration file. |
285285
---
286286
## <a name="ubxconfig">UBX Configuration Facilities</a>
287287

@@ -443,7 +443,7 @@ Below is a illustrative SPARTN DGPS data log, showing:
443443
## <a name="socketserver">Socket Server / NTRIP Caster Facilities</a>
444444

445445
The Socket Server / NTRIP Caster facility is capable of operating in either of two modes;
446-
1. SOCKET SERVER - an open, unauthenticated TCP socket server available to any socket client including, for example, another instance of PyGPSClient or the [`gnssdump` CLI utility](https://github.com/semuconsulting/pygnssutils#gnssdump). In this mode it will broadcast the host's currently connected GNSS data stream (NMEA, UBX, RTCM3). The default port is 50012.
446+
1. SOCKET SERVER - an open, unauthenticated TCP socket server available to any socket client including, for example, another instance of PyGPSClient or the [`gnssstreamer` CLI utility](https://github.com/semuconsulting/pygnssutils#gnssstreamer). In this mode it will broadcast the host's currently connected GNSS data stream (NMEA, UBX, RTCM3). The default port is 50012.
447447
2. NTRIP CASTER - a simple implementation of an authenticated NTRIP caster available to any NTRIP client including, for example, u-blox's [legacy u-center NTRIP client](https://www.u-blox.com/en/product/u-center), BKG's [NTRIP Client (BNC)](https://igs.bkg.bund.de/ntrip/download), the PyGPSClient NTRIP Client facility or the [`gnssntripclient` CLI utility](https://github.com/semuconsulting/pygnssutils#gnssntripclient). Login credentials for the NTRIP caster are set via the `"ntripcasteruser_s":` and `"ntripcasterpassword_s":` settings in the *.json confirmation file (they can also be set via PyGPSClient command line arguments `--ntripcasteruser`, `--ntripcasterpassword`, or by setting environment variables `NTRIPCASTER_USER`, `NTRIPCASTER_PASSWORD`). Default settings are as follows: bind address: 0.0.0.0, port: 2101, mountpoint: pygnssutils, user: anon, password: password.
448448

449449
By default, the server/caster binds to the host address '0.0.0.0' (IPv4) or '::' (IPv6) i.e. all available IP addresses on the host machine. This can be overridden via the settings panel or a host environment variable `PYGPSCLIENT_BINDADDRESS`. A label on the settings panel indicates the number of connected clients, and the server/caster status is indicated in the topmost banner: running with no clients: ![transmit icon](https://github.com/semuconsulting/PyGPSClient/blob/master/src/pygpsclient/resources/iconmonstr-noclient-10-24.png?raw=true), running with clients: ![transmit icon](https://github.com/semuconsulting/PyGPSClient/blob/master/src/pygpsclient/resources/iconmonstr-transmit-10-24.png?raw=true).
@@ -564,18 +564,19 @@ Multiple commands can be concatenated on a single line. Illustrative examples ar
564564
---
565565
## <a name="cli">Command Line Utilities</a>
566566

567-
The `pygnssutils` library which underpins many of the functions in `PyGPSClient` also incorporates command line versions of these functions:
567+
The `pygnssutils` and `pyubxutils` libraries which underpin many of the functions in `PyGPSClient` also incorporate command line versions of these functions:
568568

569-
1. `gnssdump` CLI utility. This is essentially a configurable input/output wrapper around the [`pyubx2.UBXReader`](https://github.com/semuconsulting/pyubx2#reading) class with flexible message formatting and filtering options for NMEA, UBX and RTCM3 protocols.
569+
1. `gnssstreamer` CLI utility. This is essentially a configurable input/output wrapper around the [`pyubx2.UBXReader`](https://github.com/semuconsulting/pyubx2#reading) class with flexible message formatting and filtering options for NMEA, UBX and RTCM3 protocols.
570570
1. `gnssserver` CLI utility. This implements a TCP Socket Server for GNSS data streams which is also capable of being run as a simple NTRIP Server.
571571
1. `gnssntripclient` CLI utility. This implements a simple NTRIP Client which receives RTCM3 correction data from an NTRIP Server and (optionally) sends this to a
572572
designated output stream.
573573
1. `gnssmqttclient` CLI utility. This implements a simple SPARTN IP (MQTT) Client which receives SPARTN and UBX correction data from a SPARTN IP location service (e.g. u-blox / Thingstream PointPerfect) and (optionally) sends this to a designated output stream.
574574
1. <a name="ubxsave">`ubxsave` CLI utility</a>. 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.
575575
1. `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).
576576
1. `ubxsetrate` CLI utility. A simple utility which sets NMEA or UBX message rates on u-blox GNSS receivers.
577+
1. `ubxbase` CLI utility. This configures an RTK-compatible UBX receiver (e.g. the ZED-F9P) to operate in Base Station mode.
577578

578-
For further details, refer to the `pygnssutils` homepage at [https://github.com/semuconsulting/pygnssutils](https://github.com/semuconsulting/pygnssutils).
579+
For further details, refer to the `pygnssutils` homepage at [https://github.com/semuconsulting/pygnssutils](https://github.com/semuconsulting/pygnssutils) or `pyubxutils` homepage at [https://github.com/semuconsulting/pyubxutils](https://github.com/semuconsulting/pyubxutils).
579580

580581
--
581582
## <a name="knownissues">Known Issues</a>

RELEASE_NOTES.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# PyGPSClient Release Notes
22

3+
### RELEASE 1.5.2
4+
5+
1. Fix logpath setting in config file - Fixes [#171](https://github.com/semuconsulting/PyGPSClient/issues/171)
6+
1. Add support for pyubxutils.
7+
1. Minor updates to vscode task configurations.
8+
39
### RELEASE 1.5.1
410

511
1. Add new user-selectable and configurable "Chart" widget:

pygpsclient.json

+2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
"unusedsat_b": 0,
3333
"logformat_s": "Binary",
3434
"datalog_b": 0,
35+
"logpath_s": "",
3536
"recordtrack_b": 0,
37+
"trackpath_s": "",
3638
"bpsrate_n": 9600,
3739
"databits_n": 8,
3840
"stopbits_f": 1.0,

pyproject.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta:__legacy__"
44

55
[project]
66
name = "pygpsclient"
7+
dynamic = ["version"]
78
authors = [{ name = "semuadmin", email = "[email protected]" }]
89
maintainers = [{ name = "semuadmin", email = "[email protected]" }]
910
description = "GNSS Diagnostic and UBX Configuration GUI Application"
10-
version = "1.5.1"
1111
license = { file = "LICENSE" }
1212
keywords = [
1313
"PyGPSClient",
@@ -53,6 +53,7 @@ dependencies = [
5353
"requests>=2.28.0",
5454
"Pillow>=9.0.0",
5555
"pygnssutils>=1.1.9",
56+
"pyubxutils>=1.0.2",
5657
"pyserial>=3.5",
5758
]
5859

@@ -79,6 +80,9 @@ test = [
7980
"sphinx-rtd-theme",
8081
]
8182

83+
[tool.setuptools.dynamic]
84+
version = { attr = "pygpsclient._version.__version__" }
85+
8286
[tool.black]
8387
target-version = ['py39']
8488

src/pygpsclient/_version.py

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

11-
__version__ = "1.5.1"
11+
__version__ = "1.5.2"

src/pygpsclient/file_handler.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -202,16 +202,17 @@ def save_config(self, config: dict, filename: Path = CONFIGFILE) -> str:
202202
except (OSError, json.JSONDecodeError) as err:
203203
return str(err)
204204

205-
def set_logfile_path(self) -> Path:
205+
def set_logfile_path(self, initdir=HOME) -> Path:
206206
"""
207207
Set file path.
208208
209+
:param str initdir: initial directory (HOME)
209210
:return: file path
210211
:rtype: str
211212
"""
212213

213214
self._logpath = filedialog.askdirectory(
214-
title=SAVETITLE, initialdir=HOME, mustexist=True
215+
title=SAVETITLE, initialdir=initdir, mustexist=True
215216
)
216217
if self._logpath in ((), ""):
217218
return None # User cancelled
@@ -224,6 +225,7 @@ def open_logfile(self):
224225

225226
# pylint: disable=consider-using-with
226227

228+
self._logpath = self.__app.frm_settings.config.get("logpath_s", HOME)
227229
self._lines = 0
228230
_, self._logname = set_filename(self._logpath, "data", "log")
229231
self._logfile = open(self._logname, "a+b")
@@ -236,7 +238,7 @@ def write_logfile(self, raw_data, parsed_data):
236238
"""
237239

238240
if self._logfile is None:
239-
return
241+
self.open_logfile()
240242

241243
settings = self.__app.frm_settings.config
242244
lfm = settings["logformat_s"]
@@ -275,16 +277,17 @@ def close_logfile(self):
275277
except IOError:
276278
pass
277279

278-
def set_trackfile_path(self) -> Path:
280+
def set_trackfile_path(self, initdir=HOME) -> Path:
279281
"""
280282
Set track directory.
281283
284+
:param str initdir: initial directory (HOME)
282285
:return: file path
283286
:rtype: str
284287
"""
285288

286289
self._trackpath = filedialog.askdirectory(
287-
title=SAVETITLE, initialdir=HOME, mustexist=True
290+
title=SAVETITLE, initialdir=initdir, mustexist=True
288291
)
289292
if self._trackpath in ((), ""):
290293
return None # User cancelled

0 commit comments

Comments
 (0)