feat(runner): START_LAT/START_LON open-water cold-start seed - #1
Merged
Conversation
Random-passage mode autoroutes from the boat's current position; if the persisted/default start is inshore (e.g. the Venice lagoon route origin), a coarse-grid A* can't route out and the boat sits drawing unreachable destinations. START_LAT/START_LON override the SignalK-resume / route-origin cold-start position so the demo can seed open water. A live hot-restart position (controller-supplied) still wins, so the boat does not teleport back to the seed mid-run. Documented in deploy/DEPLOYMENT.md; unit-tested in tests/test_start_pos.py. 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.
Why
In
RANDOM_PASSAGESmode the sim autoroutes from the boat's current position.If the persisted/default start is inshore — e.g. the route origin Venice Porto Lido
(lagoon) — a coarse bathymetry grid (
BATHY_STRIDE=5, ~2 km) can't route out, so theboat sits drawing destinations it can never reach.
Observed live on the yey.boats demo after deploying this image:
1 passage laid, 149 "no clear destination" failures, position pinned at(45.41, 12.38).What
Add
START_LAT/START_LONenv: a fixed open-water cold-start seed (decimal deg)that overrides the SignalK-resume / route-origin start. A live caller-supplied
start_pos(hot restart with the last reported position) still wins, so the boatdoesn't teleport back to the seed mid-run.
engine/runner.py:_env_start_pos()helper + cold-start injection inpipeline()(consistent with how
RANDOM_PASSAGES/PASSAGE_*are read there).deploy/DEPLOYMENT.md: documented in the env table + reference compose (44.7,13.1,open N-Adriatic W of Istria, ~−39 m).
tests/test_start_pos.py: unit tests (both set / partial / invalid / unset).Validation
ruff check src testspytest tests/test_start_pos.py+ adjacent regressions (passage/control/cli/driver_wiring)Consumed by the yey.boats demo (navigator-tg-bot) via
START_LAT=44.7 START_LON=13.1.🤖 Generated with Claude Code