Skip to content

Pirate mode: --own-ship-follow MMSI CLI flag with first-fix wait policy #234

Description

@philliphoff

Background

Pirate mode (own-ship impersonates a live AIS target) can be engaged from the UI via the Take the helm button in the Pick Report, and re-armed at launch from persisted settings. There is currently no command-line entry point.

Scope

Add an --own-ship-follow MMSI CLI flag that engages pirate mode at startup against the given target, analogous to the existing --own-ship-pos / --own-ship-cog / --own-ship-sog flags.

Key design point: first-fix wait policy

When the AIS source is zoom-gated (DeferredAisFeatureSource) or simply hasn't reported the target yet, PirateModeController.Follow returns ArmedWaiting and own-ship shows the simulated Solent seed until the first fix arrives. For a headless/screenshot run this means the capture can happen before the AIS fix lands, showing the seed instead of the impersonated vessel.

The flag therefore needs a first-fix wait/timeout policy, e.g.:

  • wait up to N seconds for the followed target's first report before proceeding, and
  • a defined behaviour on timeout (fail, warn-and-continue with seed, or disengage).

Notes

  • Reuse PirateModeCoordinator.Engage / RestoreFromSettings.
  • Add tests for the wait/timeout policy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions