PyGPSClient GNSS/GPS Graphical Client
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 ©.
Contributions and constructive feedback welcome.
- Supports both NMEA and UBX protocols. It uses the existing pynmea2 library for NMEA parsing and implements a new 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 messages to u-blox GNSS devices. This includes the facility to add user-defined messages or message sequences - see instructions under installation below.
How to Use
- To connect to a listed serial device, select the device from the listbox 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.
- Select which protocols to display via the Protocols Displayed setting (NB: this only changes the displayed protocols - to change the actual protocols output by the receiver, use the CFG-PRT command).
- Change the console display from parsed to raw (hexadecimal) format via the Console Display setting.
- Change the displayed degree and unit formats via the Degrees Format and Units settings.
- Change the web map scale via the Zoom setting (any change will take effect at the next map refresh, indicated by a small timer icon at the top left of the panel).
- Data logging (in binary format) can be turned on or off via the Enable Data Logging checkbox. You will be prompted to select the directory into which timestamped log files are saved.
- Track recording (in GPX format) can be turned on or off via the Record Track checkbox.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 commands:
- CFG-PRT sets baud rate and inbound/outbound protocols across all available ports (note that an active USB port may report a baud rate of 0 on some platforms).
- CFG-MSG sets message rates per port for NMEA protocol messages (standard & proprietary) and UBX protocol messages.
- 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 latest polled state of the displayed configuration (pending i.e. awaiting confirmation , confirmed or warning ).
- Command confirmation is not always 100% reliable as the UBX protocol does not support explicit command handshaking, and confirmation responses can occasionally get discarded or delayed at low baud rates. To ensure timely confirmation responses, try increasing the baud rate and/or temporarily minimising periodic inbound traffic using the preset commands provided.
- A warning icon (typically accompanied by an ACK-NAK response) is usually an indication that one or more of the messages sent is not supported by your receiver.
Glossary of Terms
- utc - coordinated universal time.
- siv - satellites in view.
- sip - satellites used in position solution.
- dop - dilution of precision (pdop - position, hdop - horizontal, vdop - vertical).
- 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.
In the following,
pip refer to the python3 executables. You may need to type
pip3, depending on your particular environment.
On Windows and MacOS, pip, tkinter and the necessary imaging libraries are generally packaged with Python. On some Linux distributions like Ubuntu 18+ and Raspberry Pi OS, they may need to be installed separately, e.g.:
sudo apt-get install python3-pip python3-tk python3-pil python3-pil.imagetk
The following python libraries are required (these will be installed automatically if using pip to install PyGPSClient):
python -m pip install pyubx2 pyserial pynmea2 Pillow requests
To access the serial port on most linux platforms, you will need to be a member of the
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 via pip:
python -m pip install --upgrade PyGPSClient
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
pip show PyGPSClient and look for the
Location: entry in the response, e.g.
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
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
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.
- ubx_class as a string e.g.
CFG(must be a valid class from pyubx2.UBX_CONFIG_CATEGORIES)
- ubx_id as a string e.g.
CFG-MSG(must be a valid id from pyubx2.UBX_CONFIG_MESSAGES)
- payload as a hexadecimal string e.g.
f004010100010100(leave blank for null payloads e.g. most POLL messages)
- mode as an integer (
Multiple commands can be concatenated on a single line. Illustrative examples are shown below:
CFG-MSG Enable RMC message, CFG, CFG-MSG, f004010100010100, 1 CFG-MSG Enable VTG message, CFG, CFG-MSG, f005010100010100, 1 CFG-MSG Enable UBX00 & UBX03 messages, CFG, CFG-MSG, f100010100010100, 1, CFG, CFG-MSG, f103010100010100, 1 CFG-GNSS Poll GNSS config, CFG, CFG-GNSS, , 2 CFG-GEOFENCE Poll GEOFENCE config, CFG, CFG-GEOFENCE, , 2 CFG-NAV5 Poll navigation mode, CFG, CFG-NAV5, , 2 CFG-NAVX5 Poll expert navigation mode, CFG, CFG-NAVX5, , 2 CFG-NMEA Poll NMEA configuration, CFG, CFG-NMEA, , 2 CFG-GNSS Set GNSS to GPS only, CFG, CFG-GNSS, 0020200700081000010001010101030000000101020408000000010103081000000001010400080000000103050003000000010506080E0000000101, 1 CFG-GNSS Set GNSS to GLONASS only, CFG, CFG-GNSS, 0020200700081000000001010101030000000101020408000000010103081000000001010400080000000103050003000000010506080E0001000101, 1 CFG-GNSS Set GNSS to ALL, CFG, CFG-GNSS, 0020200700081000010001010101030001000101020408000000010103081000000001010400080000000103050003000100010506080E0001000101, 1 CFG-RST FORCE COLD RESTART !*** Expect ClearCommError ***!, CFG, CFG-RST, ffff0100, 1
BSD 3-Clause License
Copyright (c) 2020, SEMU Consulting All rights reserved.
Application icons from iconmonstr ©.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size PyGPSClient-0.2.14-py3-none-any.whl (392.6 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size PyGPSClient-0.2.14.tar.gz (384.0 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for PyGPSClient-0.2.14-py3-none-any.whl