|
|
|
@ -309,13 +309,20 @@ void Copter::startup_ground(bool force_gyro_cal)
@@ -309,13 +309,20 @@ void Copter::startup_ground(bool force_gyro_cal)
|
|
|
|
|
// position_ok - returns true if the horizontal absolute position is ok and home position is set
|
|
|
|
|
bool Copter::position_ok() |
|
|
|
|
{ |
|
|
|
|
if (!ahrs.have_inertial_nav()) { |
|
|
|
|
// do not allow navigation with dcm position
|
|
|
|
|
// return false if ekf failsafe has triggered
|
|
|
|
|
if (failsafe.ekf) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// return false if ekf failsafe has triggered
|
|
|
|
|
if (failsafe.ekf) { |
|
|
|
|
// check ekf position estimate
|
|
|
|
|
return ekf_position_ok(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// ekf_position_ok - returns true if the ekf claims it's horizontal absolute position estimate is ok and home position is set
|
|
|
|
|
bool Copter::ekf_position_ok() |
|
|
|
|
{ |
|
|
|
|
if (!ahrs.have_inertial_nav()) { |
|
|
|
|
// do not allow navigation with dcm position
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|