Skip to main content
GNSS HAT Library Documentation
Shop GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Visualisation App

A web-based companion app for the GNSS HAT library (Flask + Socket.IO), served from the Raspberry Pi and viewable from any device on the local network. It lets you explore most library features live — sky view, terrain map, geofencing, relative positioning, RTK (Base/Rover) and NTRIP corrections, and RF interference — without writing a single line of code or preparing your own test setup.

Note
Use it to quickly check whether a given feature suits your project before wiring it into your own C++, C, or Python application.

RTK & NTRIP

The NTRIP tab has its own sub-panels for every role: a Client panel to connect to a caster and apply RTK corrections (caster address, port, mountpoint, credentials, auto-reconnect, TLS), plus Caster and Server panels to broadcast the HAT’s own corrections locally or push them to a remote caster. The Configuration tab sets RTK mode (Base or Rover) and base configuration (Survey-In or Fixed Position ECEF/LLA) directly from the browser, live. Fix quality (2D/3D/RTK Float/RTK Fixed) is shown in the Navigation Data panel, and the Relative Map’s grid automatically tightens down to 1 cm once the fix reaches RTK Fixed — handy for visually confirming centimeter-level accuracy. In ROS 2 mode, the app can also publish/subscribe using NTRIP RTCM.

Quick Start

The app ships as an example inside the GnssHat repository, so the library must be installed first:

  1. Install the GnssHat library — follow the Installation guide (build with -DBUILD_PYTHON=ON for native mode).
  2. Install the app’s dependencies:
    cd examples/visualization
    python3 -m venv --system-site-packages venv
    source venv/bin/activate
    pip install -r requirements.txt
    
  3. Launch the app (native mode reads the module directly over SPI and needs root):
    sudo venv/bin/python3 app.py
    
    Note
    Use sudo venv/bin/python3, not sudo python3 — sudo resets PATH by default, so a plain sudo python3 app.py runs the system Python instead of the venv’s, and fails with ModuleNotFoundError: No module named 'flask_socketio' (or similar) even though the package is installed. Calling venv/bin/python3 directly keeps root privileges while still using the venv’s installed packages.
  4. Open it in a browser:
    • On the Raspberry Pi: http://localhost:5000
    • From another device on the network: http://<raspberry-pi-ip>:5000
Note
Two other data-source modes are available — external_tty (reads NMEA over a serial port) and ros2 (subscribes to a jp_gnss_hat ROS 2 node) — run with python3 app.py external_tty or python3 app.py ros2. See examples/visualization/README.md in the repository for details.

Screens

Relative Map
Geofencing
Altitude
Terrain Map
Sky View
RF Analyzer
System
Settings
Navigation Filters
NTRIP Client
NTRIP Caster / Server