ArduPlane: add failsafe auto variant which skips loops #28571
+24
−2
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.
Sometimes a mission is specifically crafted to avoid terrain and other obstacles.
In the event of a failsafe, it may be better for the vehicle to continue on the plotted course, but consider any loops to be satisfied. Naturally this may lead to the vehicle flying further in the case of a battery failsafe.
This PR adds a new failsafe type for Plane which pokes the AP_Mission library to indicate all loops should be satisfied.
A similar effect can be achieved by creating a "shadow" mission containing waypoints identical to the original mission and adding many
DO_LAND_START
mission items to ensure the correct next waypoint is chosen.I'm not 100% convinced this is the correct way to approach things. One obvious issue is that if an RTL is issues then we won't continue to follow the mission, rather jump straight to the
DO_LAND_START
.The original work was done on top of Plane-4.5, which was missing @IamPete1 's
DO_RETURN_PATH_START
code. It might be that we would be better-off adding an option into param 1 of that mission item type which specifies that all loop counters should be considered satisfied? Would also need to add support to Plane forDO_RETURN_PATH_START
.@MichelleRos