- GPS Receiver: Teltonika RUTX11 Router with enabled NMEA Forwarding (set to the IP of the Raspberry and TCP port 2948)
- GPS Antenna: TE Connectivity 2x2 MIMO 2G/3G/4G WLAN GPS/GNSS Antenna
- Collector: Raspberry Pi 4 2GB with latest Raspberry Pi OS
- gpsd, for interpreting the NMEA messages (
apt install gpsd
)- ncat, a much better/resilient netcat implementation (
apt install ncat
) - I had issues with the originalnc
and had to restart it frequently. - Also see the systemd service file
nmea_forwarding.service
, the gpsd systemd service is not used.
- ncat, a much better/resilient netcat implementation (
- Prometheus, time-series database for storing the GPS coordinates, speed and sat count (systemd service file
prometheus.service
)- gpsd exporter for storing the gpsd data (
pip install gpsd-prometheus-exporter
, systemd service filegpsd_exporter.service
)
- gpsd exporter for storing the gpsd data (
- Grafana, for the neat display of the Prometheus data (installation instructions)
- TrackMap panel for the map
- Dashboard config file: see
grafana-gps-dashboard.json
- The Raspberry receives NMEA messages on TCP port 2948
- So we listen via
ncat
on said port and pass it directly togpsd
stdin gpsd
parses the messages (usegpsmon
to see if it works)gpsd-exporter
reads from gpsd and writes to the Prometheus time-series database- We use Grafana to show the collected data in a nice way
That’s it. Seems simple, now that it works…
- Grafana: Show the distance driven for the current time frame. I know how to calculate the distance from coordinates, but not how to do it in Grafana and how to show the result in the best way possible. Any help appreciated.
- Grafana: Apparently the TrackMap panel "places a dot on the map at the current time as you mouse over other panels" but that doesn’t work for me