Skip to content

feat(own-ship): heading line, look-ahead, stale-GPS + Annapolis sim s…#22

Merged
beetlebugorg merged 1 commit into
mainfrom
feature/own-ship-ux
Jun 26, 2026
Merged

feat(own-ship): heading line, look-ahead, stale-GPS + Annapolis sim s…#22
beetlebugorg merged 1 commit into
mainfrom
feature/own-ship-ux

Conversation

@beetlebugorg

Copy link
Copy Markdown
Owner

…cenarios

Implements the own-ship UX spec and fixes a pre-existing rendering bug.

Own-ship (web):

  • Self-heal vector layers each fix. The plugin is built on the canvas ready event (after the initial style.load) and the chart rebuilds its style with setStyle({diff:false}), which drops plugin layers — so _ensureLayers never effectively ran and the COG predictor never drew. The DOM Marker survived, masking it. Now _ensureLayers() runs at the top of each _update (~1 Hz).
  • Heading line: solid HDT line distinct from the dashed COG vector; the gap between them shows leeway/set. Short fixed line at rest.
  • Stale/lost GPS: a watchdog ages the last fresh fix (moved, or RMC/ZDA clock advanced) into live -> stale (>6s, greyed, vectors dropped, amber pill) -> lost (>20s, red pill). The boat freezes at the last fix, never vanishes.
  • Rotate breaks follow like pan (guarded on originalEvent so our own bearing holds don't self-break); pinch/wheel keeps follow.

Camera (chart-canvas): look-ahead offset — in course-/head-up the vessel sits 1/3 up from the bottom; north-up stays centred.

Simulator: named Annapolis scenarios (harbor, bay-crossing, bay-bridge, anchorage, collision, river, sailing) with own-ship route-following; sailing tacks with a varying leeway so heading != COG; --drop-gps N withholds position fixes to exercise stale/lost.

…cenarios

Implements the own-ship UX spec and fixes a pre-existing rendering bug.

Own-ship (web):
- Self-heal vector layers each fix. The plugin is built on the canvas `ready`
  event (after the initial style.load) and the chart rebuilds its style with
  setStyle({diff:false}), which drops plugin layers — so _ensureLayers never
  effectively ran and the COG predictor never drew. The DOM Marker survived,
  masking it. Now _ensureLayers() runs at the top of each _update (~1 Hz).
- Heading line: solid HDT line distinct from the dashed COG vector; the gap
  between them shows leeway/set. Short fixed line at rest.
- Stale/lost GPS: a watchdog ages the last fresh fix (moved, or RMC/ZDA clock
  advanced) into live -> stale (>6s, greyed, vectors dropped, amber pill) ->
  lost (>20s, red pill). The boat freezes at the last fix, never vanishes.
- Rotate breaks follow like pan (guarded on originalEvent so our own bearing
  holds don't self-break); pinch/wheel keeps follow.

Camera (chart-canvas): look-ahead offset — in course-/head-up the vessel sits
1/3 up from the bottom; north-up stays centred.

Simulator: named Annapolis scenarios (harbor, bay-crossing, bay-bridge,
anchorage, collision, river, sailing) with own-ship route-following; `sailing`
tacks with a varying leeway so heading != COG; `--drop-gps N` withholds position
fixes to exercise stale/lost.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@beetlebugorg beetlebugorg merged commit 2acaa83 into main Jun 26, 2026
4 checks passed
@beetlebugorg beetlebugorg deleted the feature/own-ship-ux branch June 26, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant