Skip to content

Fix repeated records in ANPP decoders - #22

Open
mark-lawrenson wants to merge 1 commit into
advanced-navigation:masterfrom
mark-lawrenson:codex/fix-anpp-repeated-record-decoding
Open

Fix repeated records in ANPP decoders#22
mark-lawrenson wants to merge 1 commit into
advanced-navigation:masterfrom
mark-lawrenson:codex/fix-anpp-repeated-record-decoding

Conversation

@mark-lawrenson

@mark-lawrenson mark-lawrenson commented Jul 22, 2026

Copy link
Copy Markdown

Problem

Several packet decoders initialise record lists using [Record()] * count. Every item then refers to the same object, so decoding overwrites the earlier records and returns the final record multiple times. This affects Packets 31, 60, 84, 181, and 202.

The existing Log.anpp fixture shows the problem: Packet 202 contains four different ports, but the current decoder returns four copies of the final port. Packet 181 does the same with its two period records.

Change

  • Create an independent object for each repeated record.
  • Accumulate all preceding Packet 60 frequency records when calculating the next satellite offset.

Tests

The regression tests cover each affected record list and Packet 60 satellite
data with frequency counts of 2, 1, and 2. All 290 tests pass.

@mark-lawrenson
mark-lawrenson force-pushed the codex/fix-anpp-repeated-record-decoding branch from 77ea7d4 to b90f9ae Compare July 22, 2026 11:00
@mark-lawrenson mark-lawrenson changed the title Fix repeated-record corruption in ANPP decoders Fix repeated records in ANPP decoders Jul 22, 2026
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