nasa / bplib

Apache License 2.0
27 stars 13 forks source link

fixes error in encoding of gaps in aggregate custody signals #106

Closed jpswinski closed 1 year ago

jpswinski commented 2 years ago

During PACE testing, it was discovered that the code that interprets aggregate custody signals (ACS) was misinterpreting the "gap" fields. The original code interpreted an ACS as containing a sequence of consecutive custody IDs received followed by consecutive custody IDs missed, and so forth. The new code interprets an ACS as containing a sequence of consecutive custody IDs received followed by the difference between the last received custody ID and the next received custody ID.

For example, if bundles with the following custody IDs were received:

1   3   5

Then the old code would have expected the ACS to be:

1   1   1   1   1

The new code will expect (correctly) the ACS to be:

1   2   1   2   1
jpswinski commented 2 years ago

@jphickey I used the cmake build system to verify that this patch compiles, but the old make system that ties into the self tests doesn't appear to be maintained, so I didn't test these changes in the new code base. They have been tested in the old code base.

jphickey commented 1 year ago

Reviewed during CCB held on 2022-10-05.

The current BP development team cannot really verify this change, as the current effort is focused on the BPv7 version. However it was agreed that it should be made available for any potential users who may observe the same issue.

Going forward we will create a "bpv6" branch for maintenance/sustaining items such as this one, and changes like this can be merged there.