Skip to content

feat(runner): START_LAT/START_LON open-water cold-start seed - #1

Merged
navado merged 1 commit into
mainfrom
feat/start-position-env
Jun 21, 2026
Merged

feat(runner): START_LAT/START_LON open-water cold-start seed#1
navado merged 1 commit into
mainfrom
feat/start-position-env

Conversation

@navado

@navado navado commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Why

In RANDOM_PASSAGES mode 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 the
boat 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_LON env: 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 boat
doesn't teleport back to the seed mid-run.

  • engine/runner.py: _env_start_pos() helper + cold-start injection in pipeline()
    (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 tests
  • pytest 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

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>
@navado
navado merged commit 81aac43 into main Jun 21, 2026
3 checks passed
@navado
navado deleted the feat/start-position-env branch June 21, 2026 20:45
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