Adds corrections to enabling fence using aux function.
Correctly test fences statically. Only uploaded fences can be checked using a fence file, so we check those first. Then we add steps to check tin can, max and minm all set the fence as present, as expected.
Plane will support MAV_PROTOCOL_CAPABILITY_MISSION_FENCE, so we assert that it does support it.
To test ceiling and floor, leverage some existing functions for takeoff, change altitude and land. Check for respective breach.
Add a floor breach check to copter.
Autotest: Remove ties to mavlink FENCE_ACTION
Autotest: Add ArduPlane autotest to test ceiling and floor
Adds a test to ensure the vehicle reverts to RTL when breaching a ceiling or floor.
Autotest: Progress the test once we reach takeoff complete and fence enable
Autotest: Use RC_OPTION for Aux Switch functionality
Autotest: Enable fence last
AP_Arming: Use auto enable flag to arm fence only when armed (as per enum)
AP_Arming: Config defines are not available in AP_Arming
Since config definitions are not available in AP_Arming, we can still rely on singleton access of the AC_Fence object.
AP_Arming: Perform fence checks for all vehicles
AC_Fence: Add fence floor breach checks and calculations
AC_Fence: Add event logging to enable/disable of fence floor
AC_Fence: Adjust sys_status reporting to look at total fence count
AC_Fence: Make retrieving of the return point accessible
AC_Fence: Check whether fence is enabled or autoenable is set for arming checks
Checks whether the fence is currently enabled OR if the fence is intended to be enabled automatically.
These checks are used to find out enabled fences, or prearm checks
ArduPlane: Remove some geofence logic from ArduPlane
ArduPlane: Refactor action and mode return implementation
ArduPlane: Use polyfence to find the return point.
This improves protection against a condition where if all yaw hypothesis filers have very large innovations, the weights of Gaussian densities can underflow leading to failure of the weights to converge.
Enable default airspeed variance to be specified externally
Improve control of sideslip fusion
Don't modify non wind states unnecessarily when using synthesised air data measurements