Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigator: make sure to reset mission.item fields touched by set_vtol_transition_item #21641

Merged
merged 1 commit into from Jun 2, 2023

Conversation

sfuhrer
Copy link
Contributor

@sfuhrer sfuhrer commented May 26, 2023

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.

…_transition_item

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.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
@sfuhrer sfuhrer requested a review from RomanBapst May 26, 2023 12:10
@sfuhrer
Copy link
Contributor Author

sfuhrer commented May 31, 2023

Flight tested on multiple VTOLs, LGTM.

@sfuhrer sfuhrer merged commit a1167d6 into main Jun 2, 2023
82 of 86 checks passed
@sfuhrer sfuhrer deleted the pr-navitagor-reset-mission-item-vtol-fields-main branch June 2, 2023 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants