when we are disarmed or we are not in fence breach and we are not
flying then reset the previous mode fence reason state so that a new
flight will get the correct fence breach action behaviour
when a quadplane touches down in an auto throttle mode the pilot may
use rudder to disarm. The check for rudder disarm was only active in
modes without auto-throttle. This expands it to all modes if the
throttle has hit the lower limit
So instead of updating plane.guided_WP_loc and then calling
set_guided_WP(void) to copy that state into plane.next_WP_loc we pass
the new location in the call to set_guided_WP(const Location &loc).
avoidance was the only place which was not entirely over-writing
plane.guided_WP_loc. However, plane.next_WP_loc was updated to be the
current location when we entered guided mode. If we update the
horizontal/vertical avoidance now it is relative to the current
location, not the guided wp location, which could be quite important.
Send a "Geofence breach" message to the Ground Control Station. Without this when the fence is breached and if anything happens as a result, such as RTL, it will happen silently.
ArduPlane: Remove some geofence logic from ArduPlane
ArduPlane: Refactor action and mode return implementation
ArduPlane: Use polyfence to find the return point.