Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: other vessels data updating beyond timeout for their data #151

Merged
merged 3 commits into from
Feb 21, 2025

Conversation

tkurki
Copy link
Member

@tkurki tkurki commented Feb 20, 2025

This PR

  • moves the check for the age of the other vessel's position prior to calculating distanceToSelf, so that no distanceToSelf value is calculated and sent for vessels that have timed out
  • adds sending null values for paths closestApproach and distanceToSelf once for vessels that have timed out

Fixes #149

Extract secondsSinceVesselUpdate and add a check for timestamp
being there.
Move the check for other vessel's position earlier so
that no deltas are emitted if the position is stale.

Fixes #149.
Add logic that explicitly sets
- distanceToSelf
- closestApproach
to null if the other vessel's data has timed out.

Null is sent only once, so that we don't keep the vessel's
data updated and thus prevent server removing its data.
@tkurki tkurki merged commit 4ed947d into master Feb 21, 2025
3 of 4 checks passed
@tkurki tkurki deleted the fix-ais-targets-distanceToSelf-updating branch February 21, 2025 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin keeps lost AIS signals in data browser and overrides SK Server setting
2 participants