TORSDAG
2026-07-30

Too many projects, too many ideas, too few hours — one learning a day anyway

Dev diary — 2026-07-16

Today was almost entirely about getting a boat to route itself safely around water.

The route planner got the biggest push by far — a couple thousand lines reworked. It started as a hand-drawn grid search and I tore that out mid-day, replacing it with a proper least-cost path over an occupancy grid. Two direction changes stand out: I dropped the old “soft attractor” waypoint idea in favor of a marks model — drop a few rough marks and a trip type, and the planner builds a real closed-loop cruise visiting actual anchorages and ports nearby. And the router itself got rebuilt from scratch. The reason was blunt: routes were crossing land. On the exported geometry I measured 7 of 20 segments cutting across the Samsø loop, 7 of 16 on a ports trip. That’s a correctness bug on a real boat, so it got fixed hard — down to 0 crossings — plus near-shore and canal routing so channels can override land.

The dashboard chart got a big build too. Routes now draw on the map, one at a time with a picker and click-through, since drawing all of them at once was a mess. I locked the chart north-up so a stray pinch stops tilting it, and finally killed a tab-swipe bug that turned out to be a Shadow DOM retargeting quirk. I also stood up a real headless test harness that renders the actual map with software WebGL and screenshots the live boat chart.

On the fuel side, the tank-level camera got a confidence gate: it now holds the last reading unless a new one clears move-quality, physical plausibility, and multi-frame consistency checks. Root cause was a gate accepting a bad downward move on the first trusted frame. Built, 94 tests passing, deployed and verified on the Pi.

Also touched foreman (my worker tooling), the ideas repo, maracaibo’s docs, and a nightly content commit on The Cloudy Brain.

Tonight: the boat routes land-free and the chart shows it, all live on the Pi.