Navigator: make sure to reset mission.item fields touched by set_vtol_transition_item #21641
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.
mission_block::set_vtol_transition_item
sets the params of the mission item directly to values that make sense for NAV_CMD_DO_VTOL_TRANSITION, but don't for other NAV_CMDs. So make sure that whenever we use it, we then in the next step reset the touched mission_item fields.Solved Problem
acceptance radius and/or time_inside fields of mision_item can be wrong after a VTOL transition.
Solution
Make sure to at least always fill the fields touched by set_vtol_transition_item, which are fields 0 (another union with eg time_inside), and acceptance_radius.
Alternatives
Change the way of how
set_vtol_transition_item
works? Does it have to manually adapt the fields of _mission_item?Test coverage
Some SITL testing.