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.
NoteUse it to quickly check whether a given feature suits your project before wiring it into your own C++, C, or Python application.
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.
The app ships as an example inside the GnssHat repository, so the library must be installed first:
- Install the GnssHat library — follow the Installation guide (build with
-DBUILD_PYTHON=ONfor native mode). - Install the app’s dependencies:
cd examples/visualization python3 -m venv --system-site-packages venv source venv/bin/activate pip install -r requirements.txt - Launch the app (native mode reads the module directly over SPI and needs root):
sudo venv/bin/python3 app.pyNoteUsesudo venv/bin/python3, notsudo python3—sudoresetsPATHby default, so a plainsudo python3 app.pyruns the system Python instead of the venv’s, and fails withModuleNotFoundError: No module named 'flask_socketio'(or similar) even though the package is installed. Callingvenv/bin/python3directly keeps root privileges while still using the venv’s installed packages. - Open it in a browser:
- On the Raspberry Pi:
http://localhost:5000 - From another device on the network:
http://<raspberry-pi-ip>:5000
- On the Raspberry Pi:
NoteTwo other data-source modes are available —external_tty(reads NMEA over a serial port) andros2(subscribes to ajp_gnss_hatROS 2 node) — run withpython3 app.py external_ttyorpython3 app.py ros2. Seeexamples/visualization/README.mdin the repository for details.