mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-08 17:03:57 -04:00
Copter: Fence missing GPS 3D fix check
Fence was missing GPS 3D fix check before selecting recovery decision.
This commit is contained in:
parent
facd8fc89f
commit
24e1f074d0
@ -36,7 +36,7 @@ void fence_check()
|
|||||||
init_disarm_motors();
|
init_disarm_motors();
|
||||||
}else{
|
}else{
|
||||||
// if we have a GPS
|
// if we have a GPS
|
||||||
if( ap.home_is_set ) {
|
if( ap.home_is_set && g_gps->status() == GPS::GPS_OK_FIX_3D ) {
|
||||||
// if we are within 100m of the fence, RTL
|
// if we are within 100m of the fence, RTL
|
||||||
if( fence.get_breach_distance(new_breaches) <= AC_FENCE_GIVE_UP_DISTANCE) {
|
if( fence.get_breach_distance(new_breaches) <= AC_FENCE_GIVE_UP_DISTANCE) {
|
||||||
if(control_mode != RTL) {
|
if(control_mode != RTL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user