Skip to main content

PyGPSClient GPS Client

Reason this release was yanked:

https://www.semuconsulting.com/

Project description

PyGPSClient

PyGPSClient is a graphical GNSS/GPS testing and diagnostic client application written entirely in Python and tkinter.

full app screenshot

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, in addition to providing a small but useful subset of the configuration functionality in u-blox's Windows-only u-center tool.

This is a personal project and I have no affiliation whatsoever with u-blox ©.

Features:

  1. Supports both NMEA and UBX protocols. It uses the existing pynmea2 library for NMEA parsing and implements a new pyubx2 library for UBX parsing.
  2. Configurable GUI with selectable and resizeable widgets.
  3. Expandable banner widget showing key navigation information.
  4. Serial console widget showing either raw or parsed data stream.
  5. Skyview widget showing current satellite visibility and position (elevation / azimuth).
  6. Graphview widget showing current satellite reception (signal-to-noise ratio).
  7. 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).
  8. 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 preset configuration messages - see instructions under installation below.

sats & mercator widget screenshot

UBX Configuration Facilities

ubxconfig widget screenshot

The UBX Configuration Dialog currently supports the following UBX configuration commands:

  1. CFG-PRT sets baudrate and inbound/outbound protocols across all available ports (note that an active USB port will always report a baudrate of 0).
  2. CFG-MSG sets message rates per port for NMEA protocol messages (standard & proprietary) and UBX protocol messages.
  3. 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, confirmed or warning). NB this is not a 100% reliable indication as the UBX protocol does not support explicit command handshaking, and confirmation responses can occasionally get lost or delayed in heavy inbound traffic. To ensure timely confirmation responses, try temporarily disabling periodic inbound traffic using the preset commands provided.

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)

Current Status

Release Release Date Last Commit Contributors Open Issues

Alpha. Main application and widgets are fully functional for both NMEA and UBX protocols.

Known Issues:

  1. Application menu options can occasionally become momentarily unresponsive in heavy inbound traffic due to serial read blocking. This is in hand.

Constructive feedback welcome.

Installation

Python version

In the following, python refers to the python3 executable. You may need to type python3, depending on your particular environment.

Dependencies

See requirements.txt.

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

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

PyPI version PyPI downloads

The easiest way to install PyGPSClient is via pip:

python -m pip install PyGPSClient

To run the appliation, 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.

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.1.6, run:

python -m /path_to_folder/PyGPSClient-0.1.6/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.

User Defined Presets

The UBX Configuration Dialog includes the facility to add user-defined preset UBX configuration messages. 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.

  1. ubx_class as a string e.g. CFG (must be a valid class from pyubx2.UBX_CONFIG_CATEGORIES)
  2. ubx_id as a string e.g. CFG-MSG (must be a valid id from pyubx2.UBX_CONFIG_MESSAGES)
  3. payload as a hexadecimal string e.g. f004010100010100
  4. mode as an integer (1 = SET, 2 = POLL)

Multiple commands can be concatenated on a single line. An illustrative example is given 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

License

License

BSD 3-Clause License

Copyright (c) 2020, SEMU Consulting All rights reserved.

Application icons from iconmonstr ©.

Author Information

semuadmin@semuconsulting.com

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

PyGPSClient-0.2.0.tar.gz (375.4 kB view hashes)

Uploaded Source

Built Distribution

PyGPSClient-0.2.0-py3-none-any.whl (383.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page