Fix decoding fixed length arrays of struct in python sbp2json [AP-946] #1378
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
@swift-nav/devinfra
Alter the python decoding generated code so that fixed length arrays which contain structs (as opposed to primitive types) are properly decoded with the correct parser for the filled type.
Variable length arrays are already decoded properly in all cases, it's only fixed length arrays which are broken. Only the python binding are affected by this bug.
API compatibility
Sort of.
The output of the python version of
sbp2json
changes.Currently messages which contain a fixed length array of structs are decoded as byte arrays in the python version of sbp2json. This is misleading.
The rust version of sbp2json is able to decode these constructs properly. Therefore the output of the python and rust version of
sbp2json
can differ given identical inputs.In the current definition there are only 3 message types which suffer from this behaviour -
MsgTrackingIq
,MsgTrackingIqDepA
,MsgTrackingIqDepB
- all very rare and not really seen in the wild.Therefore compatibility risk is practically zero.
API compatibility plan
None required
JIRA Reference
https://swift-nav.atlassian.net/browse/AP-946