OpenWater Chartplotter

A simple, affordable chartplotter for cruising sailors.

From design docs to a working chartplotter

In my first post, OpenWater was a stack of design documents. Now it’s a working chartplotter that boots straight into the chart on a Raspberry Pi 4 with 2 GB of memory, a 7in or larger touch screen and a cheap USB GPS.

It shows official NOAA charts, follows the boat, warns about what’s ahead, and lets me plan and follow a route. This post covers what works, what surprised me, and what’s left before I call it a minimum viable product (MVP).

What works today

Everything below runs on the Pi, on a 10in panel PC, and on Windows, from one shared code base:

Charts without the chore

Getting charts is the part I most wanted to fix, because it’s where other plotters lose people. OpenWater downloads NOAA’s official electronic charts and converts them on the device itself into the vector tiles the map draws. I wrote my own reader for the chart format, and it matches the reference tool (GDAL) exactly on a Seattle harbor chart.

A few things I’m pleased with:

A chart that talks back

A paper chart expects you to know Chart No. 1 by heart. OpenWater explains itself instead.

Tap to explain. Tap a symbol and a panel lists everything under your finger, including symbols hidden to keep the map tidy. A green buoy says “Green port-side buoy. Heading in from sea, keep it on your left (port side)” and “flashes green every 4 seconds (Fl G 4s)”. A depth says what it’s measured from: “24 ft at average daily low tide (MLLW). Extra-low tides can result in water levels lower than indicated here.”

Dangers ahead. Every 2 seconds, the plotter checks a corridor along your course, 12 minutes long at your current speed. It uses the most detailed charts whatever the zoom, so a rock you’re zoomed out too far to see still counts. Hazards are circled in red, and a card says “Rock 0.4 nm ahead, slightly to port” with a countdown. Below 4 knots it stops warning about docks and the shore, because in a marina you’re supposed to head for the pier. Rocks, shallow water and anything the tide hides still count.

Will my mast fit? Enter your mast height once, and bridges and power lines carry their clearance on the chart. A tap says “Your mast (30 ft) fits, with 10 ft to spare”, and dangers ahead warns about anything without 3 ft to spare. For power lines it uses the safe clearance, because electricity can arc to a mast.

Routes, kept simple

There’s one route, made right on the chart. Tap a spot and choose Add waypoint. Each leg has a “+” in the middle: tap it to add a waypoint there, or drag it to place one. Drag a waypoint to move it.

Tap Follow and a bar shows the time, distance and bearing to the next waypoint, and the arrival time (ETA) at the end. The next waypoint is the nearest one the boat can head straight for. That rule came from testing in Hood Canal: from one arm of the canal, the nearest waypoint was in the other arm, across a peninsula. Now the plotter checks the line to each waypoint for land or drying ground and skips the ones behind it.

There’s no separate Navigate screen any more. The route lives on the chart, where you use it.

A name and a face

The project has a name now: OpenWater (the app is OpenWater Chartplotter), at openwaterplotter.com. It also has a logo: a round mark with two waves and a north line.

The logo is the first thing you see. On the panel PC it replaces the maker’s Android robot from the moment power is applied, and stays up until the chart appears. On the Pi, it replaces Raspberry Pi OS’s own boot screen. Getting there took more work than I expected; more on that below.

The hardware

The reference device is deliberately modest: a Raspberry Pi 4B with 2 GB of memory. If it runs well there, it runs well anywhere. The layout works on a 7in or larger touch screen, from 800×480 up to a 1080p monitor.

Measured on the Pi 4B 2 GB Result
Panning and zooming a harbor chart at 1080p 49 frames a second
Idle, boat at rest 0 % CPU, no redrawing
Following a moving boat about 8 % of one core
Memory over a session 255 MB at most, no swapping
Power-on to chart about 26 seconds (was 38)

The Pi starts the plotter at power-on and restarts it within 3 seconds if it ever crashes.

A second device: a 10in panel PC. I also picked up a 10in touch panel built for Android (an MSI XW9901 with a Rockchip RK3399 chip). Rather than port the app to Android early, I made it boot Debian from a microSD card and run the Pi version unchanged. Without the card, it starts Android as before. Getting there meant building a kernel, a Wi-Fi driver and a boot card for it, calibrating its touch screen, and teaching the app to turn its picture when the panel is rotated. Its built-in GPS turned out not to be fitted, so it uses the same USB GPS as the Pi. It goes from power-on to the chart in about 16 seconds.

What surprised me

A GPS standing still says it’s moving. My USB GPS, sitting on a desk indoors, reported speeds up to 2.7 knots. With a weak fix, its position crept far enough to read 9.4 knots on a steady course. Now the boat only counts as moving with a solid fix and a steady course, and speed is smoothed. Both recordings became tests.

Idle should mean idle. Following a moving boat once kept the Pi at 83 % of a core: every new position started a smooth camera glide, and the map redrew constantly. Stepping the camera instead, and drawing the boat as an overlay rather than map data, brought it down to about 8 %. A boat at rest now costs nothing.

Two GPS sources can take turns. On the panel PC, the USB GPS and my simulator’s network broadcast were both active, 4 km apart. With equal priority, the position jumped back and forth at every sentence, and the map redrew 40 times a second. Now the source in charge stays in charge until its data goes stale.

A wrong clock looks like no internet. The panel PC’s clock was six months behind after Android, so every chart download failed its security check. The error said “is the internet connected?”, which sent me looking in the wrong place. Now the device sets its clock from the internet, and the message says the date looks wrong. Setting the clock from GPS when there’s no internet is on the list.

A splash screen can draw where nobody can see it. On the Pi, the logo appeared only at the very end of the boot. It turned out the splash program started a moment before the real display driver, drew onto a temporary screen that wasn’t connected to the HDMI port, and never noticed the switch. With a stopwatch and the boot logs side by side, the fix was to make it wait for the real display, then to hold the logo until the chart’s first frame so there’s no black gap in between.

Pulling the plug can empty a file. Twice, a Pi boot setting file came back empty after I switched the Pi off right after changing it. The changes were still in memory when the power went. Every script that touches those files now writes them out at once. It’s also a reminder that on a boat, power gets cut without warning, so the final version will have to protect its own files.

Most of the boot isn’t Linux. The Pi spends about 12 of its 26 seconds in its firmware, before Linux even starts, mostly reading from a slow SD card. Skipping a file it didn’t need saved about 3.5 seconds. The rest is a job for a faster card.

What’s next

The features for the MVP are in. Before I call it done:

  1. A 7-day soak test on the Pi: a week without a restart or growing memory.
  2. Licence housekeeping: an About → Licences screen and the notices every open-source component needs.
  3. Automated builds and tests for Windows and the Pi.
  4. Faster chart updates: rebuild only the charts that changed, not the whole set.

Alongside that, I’m working on the problem from my first post: charts outside the US. NOAA’s charts are free, but most of the world’s official charts are sold, often encrypted, and only through licensed channels. Finding a seller who will license charts to a small project is now a priority alongside the MVP, because agreements take far longer than code.

After the MVP comes the Android app, sharing the same core and the same chart styles. Then the second release: tracks, NMEA 2000 and Signal K, AIS, alarms, a man-overboard button, and showing the chart on a tablet’s browser from the Pi. Further out, tides, currents and a weather overlay are now on the roadmap, all working offline once their data is on the device.

As always: OpenWater is not a certified navigation system. Don’t rely on it as your only means of navigation, and keep a lookout.