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.
Currently when you manually abort an auto-landing, the flaps retract immediately.
This is a problem because you can potentially be below the stall speed of a "clean" (flaps not extended wing). We saw several vehicles crash at MTOW like this.
This PR solves this by keeping flaps set to the landing flaps amount until the rotation airspeed is met.
Landing flap scale (FW_FLAPS_LND_SCL) was chosen rather than takeoff flaps as you may not use flaps on takeoff but are using them on landing.
Rotation speed (RWTO_ROT_AIRSPD) was chosen as that should be a comfortable airspeed at which you are getting ready to climb at the beginning of your mission, min speed didn't make sense given it could be much higher... Also, it is latching so you don't go slightly above rotation speed and then have the flaps retract and extend, I saw that in SITL testing early on.
Concerns would be climbing with flaps and hitting critical AoA of the flap, if that is an issue (or at least a valid concern) we can divide the landing flap value by 2 here to deploy half the flap amount or add a new param for abort flaps.
This was tested in SITL extensively on 1.14.x to not impact hold mode or scenarios where you were below rot speed and put it into hold, etc.
EDIT: updated airspeed to eas for main.
@sfuhrer