Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Copter: ensure we have a position estimate before arming in Loiter, PosHold, etc #12928
This PR resolves issue #11435 which was a serious safety hazard because users could attempt to fly in a mode that requires a position estimate without actually having one by either setting ARMING_CHECK = 0 or using the new "arm throttle force" feature.
To highlight the danger, in SITL I was able set GPS_TYPE = 0 and then arm and fly in Loiter mode. The result was the vehicle pitched over at 45degrees and would barely respond to user input.
This has been tested in SITL by doing the following:
The vehicle refused to arm and instead displayed the message "PreArm: EKF2 still initialising". This is not a great message but compared to Copter-3.6 which simply displays, "PreArm:" (with no message) this is an improvement.
The same behaviour was observed with this similar test:
Also to ensure the vehicle could still be armed in non-GPS modes the following test was done:
As expected the vehicle could be armed.