Leon Steenkamp

Building small satellites on the tip of Africa. My other ride is a CubeSat.


Open water swim tracker - internal monitoring and logging

This post is part of the series detailing the Open water swim tracker project - more info here.

The tracker hardware is placed on the boat that accompanies the swimmer and periodically sends GPS data over its LTE link to the project server.

This section gives more detail on the internal monitoring of the tracker hardware. Parameters that are not shown on the main tracking web page, such as the performance of the GPS receiver and LTE modem, can be monitored remotely.

Software components/technologies:

  • Python
  • InfluxDB and Grafana
  • Mosh
  • Tailscale
  • Raspberry Pi
  • Docker Compose

The operation of the swim tracker can be monitored remotely using a dashboard created in Grafana. The data for the dashboard is pulled from an InfluxDB database. Both Grafana and InfluxDB run as Docker containers using Docker Compose from a Raspberry Pi on my LAN and can be accessed remotely using Tailscale. If the tracker LTE connection allows, a user can log into the tracker hardware remotely using Mosh over Tailscale. This is useful for occasional remote debugging.

image
Grafana monitoring dashboard overview

The dashboard shows information on the operation of the GPS receiver, such as the GPS fix mode (no fix, 2D or 3D fix), number of GPS satellites used, speed and position. For quick reference, the positions reported by the tracker are plotted on a map on the dashboard. The dashboard also shows information on the operation of the LTE modem, such as various signal strength indicators, connection speed and session data use.

image
Dashboard GPS snippet

The data for the dashboard is written into InfluxDB using a Python script that runs on the tracker hardware. The script writes to the database over a Tailscale connection and therefore none of the devices are directly Internet facing. The Python script on the tracker retrieves GPS data from gpsd and reads LTE information from the modem using the created LTE library.

The figures below show graphs of the various signal strenght values reported by the LTE modem. The “LTE - Signal Strength / Conn. State” graph below is analogous to the bar signal strength indicator on a mobile phone, with five being full bars.

image
Dashboard LTE snippet
image
Dashboard LTE snippet

The Python InfluxDB logging script is started at boot using a systemd service.

  1. Open water swim tracker - project overview - Link
  2. Tracker hardware - Link
  3. Tracker embedded software - Link
  4. Software for internal monitoring and logging - Link
  5. End user web application - Coming soon
  6. Other hardware options and future developments - Coming soon
  7. Open water swim tracker testing - Coming soon
  8. End goal tracker - Coming soon