feat(own-ship): heading line, look-ahead, stale-GPS + Annapolis sim s…#22
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…cenarios
Implements the own-ship UX spec and fixes a pre-existing rendering bug.
Own-ship (web):
readyevent (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).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;
sailingtacks with a varying leeway so heading != COG;--drop-gps Nwithholds position fixes to exercise stale/lost.