AUTO_LAND: Require fully valid local position again #25280
+1
−1
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.
Solved Problem
The current mode requirements allow
FlightTaskAuto
to start with invalid local position. But regardless offailsafe_flags.local_position_invalid_relaxed
, FlightTask populates its_position
with NaN when it is invalid in the proper sense. This then leads to various problems such as:MPC_LAND_RADIUS
check returning NaNFlightModeManager::generateTrajectorySetpoint
due to another position validity check that does not know the concept oflocal_position_invalid_relaxed
Solution
This reverts the mode requirements to valid local position again. This causes the existing
FlightTaskDescend
to be engaged when position goes invalid, so that nudging inputs are still executed, even at the cost of losing any position stabilisation.This reverts commit 2f69f3f, PR #23917.
Longer term, the functionality aimed at in #23917 should probably be made available with a separate
FlightTask
that works with invalid position, but valid velocity estimates.