← Back to the resumeAbstract macro photo of flowing, glowing bands in green and blue

Bachelor project · Aarhus University · Autumn 2017

CAPTAIN: an autonomous survey boat

CAPTAIN is a small boat that can sail to a point or cover an area on its own, controlled from a map in a web browser. It was my bachelor project in electronics engineering, built together with a fellow student.

The idea

Surveying the sea floor means sailing back and forth over an area, line after line. Autonomy makes that repeatable and removes the human error, so the surveyor can focus on the data instead of steering the boat.

We wanted a system where you draw an area on a map, press a button and the boat does the rest. The result was a working prototype on a model boat that passed all of its acceptance tests.

How it works

The system has four parts that have to work together:

  • A website with an interactive map (Bootstrap and Leaflet), with an offline map for use without a network. You click out a destination or a rectangle to cover.
  • A Node.js server that hosts the website and passes commands and status between the browser and the boat.
  • A controller in C++ on a Raspberry Pi 3B that plans the route, reads a GPS receiver and steers the rudder servo and the thruster motor with a PID loop each.
  • A model boat with a rudder, a thruster, a battery, motor driver, level shifter and step-down converters on a perfboard.

The model boat seen from above with the electronics exposed

All the hardware in the boat: Raspberry Pi, power electronics, motor driver and GPS receiver.

What it can do

  • Point to point: place a marker on the map, or type in coordinates, and the boat sails there. A stop button works at any time.
  • Rectangle coverage: select an area and the system calculates a path that covers it, using a tool width set in the parameters.
  • Live diagnostics: motors, GPS and connection status, plus the position and heading of the boat on the map.
  • Parameter profiles: a technician can change navigation and autopilot parameters, such as the rudder PID, while the boat is running.

The coverage page of the web interface, with a rectangle drawn on a map of Aarhus harbour

The coverage page: a rectangle is picked on the map and a path is calculated.

Technical choices

  • C++11 for the controller, with PiGpio for PWM, MiniPID for the PID loops, nlohmann/json for messages and GeographicLib for geodesy.
  • GPS data and autopilot messages follow the NMEA standard.
  • Routes use rhumb lines instead of great circles. They are straight lines on the Mercator map, so what the user sees matches what the boat sails, and over survey distances the difference is negligible.
  • The requirements were prioritised with MoSCoW. Polygon coverage was left out early on, since it is a large problem on its own.

Results and what I would do next

All the acceptance tests passed, covering profiles, diagnostics, point to point and rectangle coverage. The boat was never tested in the water, since we judged it too risky before the acceptance test was done, and it was a cold winter.

With more time I would add obstacle avoidance, a depth sensor, battery monitoring, RTK GPS for better precision, and the ability to save a path so a survey can be repeated exactly.

Read more