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

Examples

All examples are available in C++, C, and Python (unless noted). Source code is in the examples/ directory.

Building Examples

C and C++ examples are built with the BUILD_EXAMPLES CMake flag:

mkdir -p build && cd build
cmake .. -DBUILD_EXAMPLES=ON
make

C++ binaries are symlinked into examples/bin/ for convenience (e.g. examples/bin/geofencing). C binaries are not symlinked — run them from the build tree, e.g. build/examples/c/geofencing/geofencing.

Python examples require the jimmypaputto module installed (see Installation).

Example Index

ExampleLanguagesHATDescription
Print NavigationC++, C, PythonAllBasic position, speed, time, fix info — Basic and Advanced (TUI dashboard) variants in C++
Print SatellitesC++, C, PythonAllPer-satellite table with signal quality — Basic and Advanced (color TUI) variants in C++
GeofencingC++, C, PythonL1, RTKConfigure and monitor geofences
Jamming DetectorC++, C, PythonAllRF interference monitoring
Hot StartC++, C, PythonAllCold vs hot start timing benchmark
Timepulse InterruptC++, C, PythonAllPPS synchronization
RTK Base, Rover & NTRIP ServerC++, C, PythonRTKRTK base station, rover, and pushing corrections to a remote NTRIP caster
Time BaseC++, C, PythonTIMETime base mode for improved time accuracy
Time MarkC++, C, PythonTIMEEXTINT event timestamping
Config from JSONPythonAllJSON-driven configuration
25 Hz BenchmarkPythonAllHigh-rate measurement performance
Note
Also see Tools and Services for the standalone gnsshat-rtk-base, gnsshat-info, and gnsshat-probe CLI tools, and GPSD Daemon / Time Server in Guides for the gpsd/chrony integration examples.