PyGPSClient GNSS/GPS Graphical Client
Reason this release was yanked:
obsolete
Project description
PyGPSClient
PyGPSClient is a graphical GNSS/GPS testing and diagnostic client application written entirely in Python and tkinter.
The application runs on any platform which supports a Python3 interpreter (>=3.6) and tkinter (>=8.6) GUI framework, including Windows, MacOS, Linux and Raspberry Pi OS. It displays location and diagnostic data from any NMEA or UBX (u-blox) compatible GNSS/GPS device over a standard serial (UART) or USB port, or from a previously-saved datalog file, in addition to providing a small but useful subset of the configuration functionality in u-blox's Windows-only u-center tool.
This is an independent project and we have no affiliation whatsoever with u-blox.
Current Status
Sphinx API Documentation in HTML format is available at http://www.semuconsulting.com/pygpsclient.
Contributions welcome - please refer to CONTRIBUTING.MD.
Features
- Supports both NMEA and UBX protocols. It uses the pynmeagps library for NMEA parsing and the pyubx2 library for UBX parsing.
- Capable of reading from serial/USB port or previously-saved binary datalog file.
- Configurable GUI with selectable and resizeable widgets.
- Expandable banner widget showing key navigation information.
- Serial console widget showing either raw or parsed data stream.
- Skyview widget showing current satellite visibility and position (elevation / azimuth).
- Graphview widget showing current satellite reception (signal-to-noise ratio).
- Mapview widget with location marker, showing either a static Mercator world map, or an optional dynamic web-based map downloaded via a MapQuest API (requires an Internet connection and free MapQuest API Key).
- Data logging.
- Track recording in GPX format.
- UBX Configuration Dialog, with the ability to send a variety of UBX configuration commands to u-blox GNSS devices. This includes the facility to add user-defined commands or command sequences - see instructions under installation below.
How to Use
- To connect to a listed serial device, select the device from the listbox, set the appropriate serial connection parameters (Rate bps is typically the only setting that might need adjusting, but tweaking the timeout setting may improve performance on certain platforms) and click . The application will endeavour to pre-select a recognised GNSS/GPS device but this is platform and device dependent.
- To stream from a previously-saved binary datalog file (pygpsdata-*.log, or any binary dump of an NMEA or UBX GNSS device output), click and select the file.
- To disconnect from a serial device or datalog file, click .
- To display the UBX Configuration Dialog (only available when connected to a UBX serial device), click , or go to Menu..Options.
- To show or hide the various widgets, go to Menu..View and click on the relevant hide/show option.
- Protocols Displayed - Select which protocols to display (NB: this only changes the displayed protocols - to change the actual protocols output by the receiver, use the CFG-PRT command).
- Console Display - Change the console display from parsed to raw (hexadecimal) format.
- Degrees Format and Units - Change the displayed degree and unit formats.
- Zoom - Change the web map scale (any change will take effect at the next map refresh, indicated by a small timer icon at the top left of the panel).
- Show Legend - Turn the graph legend on or off.
- Show Zero Signal - Include or exclude satellites with zero signal level in the graph and sky view panels.
- Enable Data Logging - Turn Data logging (in binary format) on or off. You will be prompted to select the directory into which timestamped log files are saved.
- Record Track - Turn track recording (in GPX format) on or off. You will be prompted to select the directory into which timestamped track files are saved.
- Widgets (and their associated fonts) are fully resizeable.
UBX Configuration Facilities
The UBX Configuration Dialog currently supports the following UBX configuration 'widgets':
- Shows current device hardware/firmware versions via MON-VER and MON-HW polls. Clicking anywhere in the widget background will refresh the displayed information with the current configuration.
- CFG-PRT sets baud rate and inbound/outbound protocols across all available ports.
- CFG-RATE sets navigation solution interval in ms (e.g. 1000 = 1/second) and measurement ratio (ratio between the number of measurements and the number of navigation solutions, e.g. 5 = five measurements per navigation solution).
- CFG-MSG sets message rates per port for UBX and NMEA messages. Message rate is relative to navigation solution frequency e.g. a message rate of '4' means 'every 4th navigation solution'.
- CFG-VALSET, CFG-VALDEL and CFG-VALGET configuration (for Generation 9+ devices).
- PRESET commands support a variety of preset and user-defined commands - see user defined presets
An icon to the right of each 'SEND' button indicates the confirmation status of the configuration command; (pending i.e. awaiting confirmation , confirmed or warning ).
Note:
- Confirmation responses can take several seconds at high message transmission rates, or be discarded altogether if the device's transmit buffer is full (txbuff-alloc error - not uncommon with budget receivers at high message rates). To ensure timely confirmation responses, try increasing the baud rate and/or temporarily reducing transmitted message rates using the configuration commands provided.
- A warning icon (typically accompanied by an ACK-NAK response) is usually an indication that one or more of the commands sent is not supported by your receiver.
Installation
In the following, python
& pip
refer to the Python3 executables. You may need to type
python3
or pip3
, depending on your particular environment.
Dependencies
See requirements.txt.
On Windows and MacOS, pip and tkinter are generally packaged with Python3. On some Linux distributions like Ubuntu 18+ and Raspberry Pi OS, they may need to be installed separately, e.g.:
sudo apt install python3-pip python3-tk
The following python libraries are required (these will be installed automatically if using pip to install PyGPSClient):
python -m pip install pyubx2 pynmeagps pyserial Pillow requests
User Privileges
To access the serial port on most linux platforms, you will need to be a member of the
tty
and dialout
groups. Other than this, no special privileges are required.
1. Install using pip
The easiest way to install the latest version of PyGPSClient
is with
pip:
python -m pip install --upgrade PyGPSClient
If required, PyGPSClient
can also be installed using virtualenv, e.g.:
python -m pip install --user --upgrade virtualenv
python -m virtualenv env
source env/bin/activate (or env\Scripts\activate on Windows)
(env) python -m pip install --upgrade PyGPSClient
...
deactivate
To run the application, if the python3 site_packages are in your PATH, simply type python -m pygpsclient
.
If not, type python -m \full_path_to_site_packages\pygpsclient
.
Tip: to find the site_packages location, type python -m pip show PyGPSClient
and look for the Location:
entry in the response, e.g.
- Linux:
Location: /home/username/.local/lib/python3.8/site-packages
- MacOS:
Location: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages
- Windows:
Location: c:\users\username\appdata\roaming\python\python38\lib\site-packages
2. Manual installation
To install manually, download and unzip this repository and run:
python -m /path_to_folder/foldername/pygpsclient
e.g. if you downloaded and unzipped to a folder named PyGPSClient-0.2.0
, run:
python -m /path_to_folder/PyGPSClient-0.2.0/pygpsclient
MapQuest API Key
To use the optional dynamic web-based mapview facility, you need to request and install a MapQuest API key. The free edition of this API allows for up to 15,000 transactions/month (roughly 500/day) on a non-commercial basis. For this reason, the map refresh rate is intentionally limited to 1/minute* to avoid exceeding the free transaction limit under normal use. NB: this facility is not intended to be used for real time navigational purposes.
Once you have received the API key (a 32-character alphanumeric string), copy it to a file named mqapikey
(lower case,
no extension) and place this file in the user's home directory.
*The web map refresh rate can be amended if required by changing the MAP_UPDATE_INTERVAL constant in globals.py
.
User Defined Presets
The UBX Configuration Dialog includes the facility to send user-defined UBX configuration messages or message sequences to the receiver. These can be set up by adding
appropriate comma-delimited message descriptions and payload definitions to a file named ubxpresets
(lower case, no extension), and then placing this file in the user's home directory. The message definition comprises a free-format text description (avoid embedded commas)
followed by one or more pyubx2 UBXMessage constructors, i.e.
- message class as a string e.g.
CFG
(must be a valid class from pyubx2.UBX_CLASSES) - message id as a string e.g.
CFG-MSG
(must be a valid id from pyubx2.UBX_MSGIDS) - payload as a hexadecimal string e.g.
f004010100010100
(leave blank for null payloads e.g. most POLL messages) - mode as an integer (
1
= SET,2
= POLL)
Multiple commands can be concatenated on a single line. Illustrative examples are shown below:
Stop GNSS, CFG, CFG-RST, 00000800, 1
Start GNSS, CFG, CFG-RST, 00000900, 1
Enable NMEA UBX00 & UBX03 sentences (legacy), CFG, CFG-MSG, f100010100010100, 1, CFG, CFG-MSG, f103010100010100, 1
Poll UART1/2 baud rates (modern), CFG, CFG-VALGET, 000000000100524001005340, 2
Poll Message Rates (modern), CFG, CFG-VALGET, 00000000ffff9120, 2, CFG, CFG-VALGET, 00004000ffff9120, 2, CFG, CFG-VALGET, 00008000ffff9120, 2
Use Extended NMEA SV Numbering (modern), CFG, CFG-VALSET, 000000000700932001, 1
Set NAV Solution Rate to 5 Hz (modern), CFG, CFG-VALSET, 0001000001002130c800, 1
Set NAV Solution Rate to 10 Hz (legacy), CFG, CFG-RATE, 640001000000, 1
Poll Receiver Software Version, MON, MON-VER, , 2
Poll Datum, CFG, CFG-DAT, , 2
Poll GNSS config, CFG, CFG-GNSS, , 2
Poll NMEA config, CFG, CFG-NMEA, , 2
Poll Satellite-based Augmentation, CFG, CFG-SBAS, , 2
Poll Receiver Management, CFG, CFG-RXM, , 2
Poll Navigation Mode, CFG, CFG-NAV5, , 2
Poll Expert Navigation mode, CFG, CFG-NAVX5, , 2
Poll Geofencing, CFG, CFG-GEOFENCE, , 2
Limit NMEA GNSS to GPS only (legacy), CFG, CFG-NMEA, 0040000272000000000000010000000000000000, 1
Limit NMEA GNSS to GLONASS only (legacy), CFG, CFG-NMEA, 0040000253000000000000010000000000000000, 1
Set NMEA GNSS to ALL (legacy), CFG, CFG-NMEA, 0040000200000000000000010000000000000000, 1
Limit UBX GNSS to GPS only (legacy), CFG, CFG-GNSS, 0020200700081000010001010101030000000101020408000000010103081000000001010400080000000103050003000000010506080E0000000101, 1
Limit UBX GNSS to GLONASS only (legacy), CFG, CFG-GNSS, 0020200700081000000001010101030000000101020408000000010103081000000001010400080000000103050003000000010506080E0001000101, 1
Set UBX GNSS to ALL (legacy), CFG, CFG-GNSS, 0020200700081000010001010101030001000101020408000000010103081000000001010400080000000103050003000100010506080E0001000101, 1
FORCE COLD RESTART !*** Expect ClearCommError ***!, CFG, CFG-RST, ffff0100, 1
Glossary of Terms
- ACC - accuracy of location in real units (hacc - horizontal, vacc - vertical). Note that location accuracy is not directly provided via the standard NMEA message set, but is available via some proprietary NMEA messages e.g. UBX00.
- BEI - BeiDou Navigation Satellite System.
- DOP - dilution of precision (pdop - overall position, hdop - horizontal, vdop - vertical).
- GAL - [Galileo](https://en.wikipedia.org/wiki/Galileo_(satellite_navigation%29).
- GLO - GLONASS, Global Navigation Satellite System.
- GNSS - global navigation satellite system.
- GPS - Global Positioning System.
- IME - IMES, Indoor MEssaging System
- PRN - pseudo-random noise number (code that each satellite transmits to differentiate itself from other satellites in the active constellation).
- QZS - QZSS, Quasi-Zenith Satellite System.
- SBA - SBAS, Satellite-based Augmentation System.
- SIP - satellites used in position solution.
- SIV - satellites in view.
- SV(N) - space vehicle number (serial number assigned to each satellite).
- UTC - coordinated universal time.
License
BSD 3-Clause License
Copyright (c) 2020, SEMU Consulting All rights reserved.
Application icons from iconmonstr ©.
Author Information
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file PyGPSClient-1.0.2.tar.gz
.
File metadata
- Download URL: PyGPSClient-1.0.2.tar.gz
- Upload date:
- Size: 394.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cd123082eaaa651025b7a656bd5228fde4a84d697a75cd9df69d7833baf9fd1 |
|
MD5 | ed5984aa048fce7b1a506fafb1803871 |
|
BLAKE2b-256 | cfefaa182acc7a6a57e88069ccfcf486683fd5369a3da1a41312139ed455afc9 |
File details
Details for the file PyGPSClient-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: PyGPSClient-1.0.2-py3-none-any.whl
- Upload date:
- Size: 412.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d16802d8fd0deead5830c97a564bcfd71c0ab91da0474dae228ed8b820aba08c |
|
MD5 | 414a3fe951085df4a50f7d7ab447e6eb |
|
BLAKE2b-256 | 490ccd5cb13027fdab1cd19e42c6180ff043dea59775772cd13b10e2d8350fc8 |