Skip to content

Share a self-reported position when no AIS transponder is available - #20

Merged
bkeepers merged 3 commits into
mainfrom
self-reported-position
Aug 24, 2026
Merged

Share a self-reported position when no AIS transponder is available#20
bkeepers merged 3 commits into
mainfrom
self-reported-position

Conversation

@bkeepers

Copy link
Copy Markdown
Member

A boat with only a GPS can now appear on aiscast. When no !AIVDO has been heard for 5 minutes, the plugin builds class B position reports from Signal K (every 60 s while the position changes) and static data (name, callsign, size, every 6 min), the same thing @signalk/aisreporter does for MarineTraffic, and publishes them as !AIVDO tagged s:self.

The server marks s:self events synthesized: true. That keeps them out of the AISHub feed, whose terms forbid synthesized data, and out of a station's feeder-tier accounting. Consumers can tell them apart from VHF receptions by the flag.

Settings

The Share section is three checkboxes, each explained below its label. Fallback to self-reported AIS position is checked by default when the config form is saved. Configs saved before the setting existed stay off until re-saved, so an upgrade never starts publishing on its own. Without an MMSI in Vessel settings the checkbox is disabled with a note (uiSchema is a function, so the check runs on each config-page load).

Nothing is sent without a fix or while the GPS sits at Null Island, and an unchanged position is not repeated. SOG, COG, and heading use the AIS "not available" sentinels when Signal K lacks them; heading falls back to magnetic plus variation.

The plugin builds class B position reports (60 s while the position
changes) and static data (6 min) from Signal K, like
@signalk/aisreporter, and publishes them as !AIVDO tagged s:self.
Synthesis pauses for 5 min after any real !AIVDO. The server marks
s:self events synthesized, keeping them out of the AISHub feed and
tier accounting.
Copilot AI lite review requested due to automatic review settings August 24, 2026 16:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a “self-reported own-ship” fallback so a Signal K instance with GPS but no AIS transponder can still publish AIS-like own-ship reports to aiscast, with server-side handling to mark these events as synthesized (synthesized: true) and keep them out of the AISHub feed and feeder-tier accounting.

Changes:

  • Signal K plugin: synthesize and publish own-ship Class B position/static reports from Signal K data when enabled, tagged s:self.
  • Server: treat s:self own-ship publishes as synthesized events; add coverage to prevent feeding to AISHub.
  • Docs/tests: add unit/integration tests and update user-facing documentation for the new Share setting and synthesized semantics.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
signalk-plugin/test/plugin.test.ts Adds an integration test asserting s:self-tagged !AIVDO publishes occur when the fallback is enabled.
signalk-plugin/test/ownship.test.ts Adds unit tests for synthesized own-ship AIS message construction and throttling rules.
signalk-plugin/src/ownship.ts Implements own-ship AIS synthesis from Signal K position/static data.
signalk-plugin/src/index.ts Wires new Share setting, dynamic uiSchema MMSI gating, and starts/stops own-ship synthesis.
signalk-plugin/src/downlink.ts Reuses shared own-position helper and adjusts loop-guard ordering for self echoes.
signalk-plugin/README.md Documents the new Share behavior and settings text.
signalk-plugin/CHANGELOG.md Notes the new fallback setting and UI improvements.
server/pipeline.go Marks s:self own-ship events as synthesized for downstream handling.
server/aishub_test.go Adds a test ensuring self-reported own-ship is synthesized and excluded from AISHub feeding.
README.md Updates top-level project docs to mention the plugin’s fallback behavior.
PLAN.md Updates design/behavior documentation for own-ship fallback and config semantics.
docs/API.md Extends synthesized semantics to include s:self own-ship GPS-built reports.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/API.md
Comment thread server/pipeline.go Outdated
@bkeepers
bkeepers merged commit c2ebf02 into main Aug 24, 2026
3 checks passed
@bkeepers
bkeepers deleted the self-reported-position branch August 24, 2026 16:40
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.

2 participants