Skip to content

Prevent rejected CPR positions from validating repeats - #204

Merged
junzis merged 2 commits into
mainfrom
rejected-cpr-position-history
Oct 16, 2026
Merged

junzis merged 2 commits into
mainfrom
rejected-cpr-position-history

Conversation

@paulmadejong

Copy link
Copy Markdown
Collaborator

Using PMS3 we found an issue with incorrectly decoded positions (e.g., above the oceans out of reach of receivers). The issue was found to be with PipeDecoder. PipeDecoder adds CPR positions to its position history even when the motion check rejects them. A repeated or duplicated receiver (from another receiver) message can then be accepted because it matches the previously rejected position. This reproduced the incorrect positions observed in the FMI and ADSB-SUP streams.

Proposed change:
Add a position to the trusted history only when the motion check accepts it. Update the existing test to verify that replaying the same rejected CPR pair is rejected again.

Consideration:
This changes the current behavior, which allows a sequence of rejected positions to contribute to the history. If recovery from such sequences is still needed, handle it through a separate candidate history with explicit confirmation. Rejected positions should not validate themselves.

@junzis
junzis merged commit eb3aa67 into main Oct 16, 2026
3 checks passed
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