Skip to content

Embedded & IoT

RTK-GPS cable documentation for construction machines

A machine-mounted system that records where cable goes into the ground, to the centimetre, while it is being laid. RTK-GPS and an IMU feed a C++ GPS library bridged into a Python and FastAPI service.

Client
Construction technology startup, Europe
Services
Embedded software, Python/C++ integration, Geospatial engineering, Back-end engineering
Timeline
July to October 2023
Compact loader laying cable into a trench, with an RTK-GPS antenna, IMU and Jetson unit; the lever arm runs from the antenna to the cable funnel and a point is recorded every metre

Our client builds surveying systems that run directly on construction machines. One of their customers lays cable into narrow trenches with compact loaders, and needed every metre of that cable documented without sending a survey crew in after the machine.

The challenge

Once a trench is backfilled, nobody can see where the cable went. Surveying it afterwards means a second crew and a second visit, and as-built records drawn up later are not precise enough. The position had to be captured while the cable went in, at the exact point it leaves the machine, by an operator whose hands are busy driving.

What we built

We built the software for a small unit mounted on the machine: an RTK-GPS receiver, an IMU and an NVIDIA Jetson. The GPS hardware is driven by a C++ library. We wrote Python bindings for it, so the low-level serial communication stays fast in C++ while the application logic lives in Python, where it is easy to change and test.

The antenna sits on the cab roof, but the point that matters is the funnel where the cable enters the trench, a couple of metres away. For every position fix, the service combines the RTK position, the machine's roll, pitch and heading from the IMU, and the measured antenna-to-funnel offset to work out where the funnel really is. Without that correction, a slope of a few degrees would shift the documented cable by more than ten centimetres.

While the machine lays cable, the service records one global point for every metre travelled and stores it in PostgreSQL on the device. A FastAPI service exposes a small REST API to set the project, start and stop capture, and read the live status. The Jetson hosts its own Wi-Fi hotspot, so the operator controls it from a phone without any site network. When capture stops, the finished route goes to the client's cloud API.

Everything runs in Docker on the Jetson, so every new unit is set up the same way.

  • Centimetre-level cable positions from RTK-GPS
  • Python bindings for a C++ GPS library: fast hardware I/O, flexible application code
  • Lever-arm correction from antenna to funnel using IMU roll, pitch and heading
  • One point per metre of cable laid, stored on the device in PostgreSQL
  • FastAPI control over the machine's own Wi-Fi hotspot
  • Route sent to the cloud automatically when capture stops
  • Dockerised deployment on NVIDIA Jetson
  • Lever-arm compensation diagram: plan and side views showing how IMU heading and pitch move the funnel position relative to the RTK antenna
  • Map of a captured cable route with 248 points spaced one metre apart, a zoomed inset and a table of easting, northing and height
  • System architecture on the NVIDIA Jetson: RTK-GNSS receiver, C++ GNSS library, Python bindings, IMU, capture service with FastAPI, PostgreSQL, Wi-Fi hotspot and cloud API
  • FastAPI docs for the cable capture API next to a terminal setting a project, starting capture, reading RTK status and stopping capture