|
|
|
@ -259,11 +259,11 @@ bool Sub::ekf_position_ok()
@@ -259,11 +259,11 @@ bool Sub::ekf_position_ok()
|
|
|
|
|
// if disarmed we accept a predicted horizontal position
|
|
|
|
|
if (!motors.armed()) { |
|
|
|
|
return ((filt_status.flags.horiz_pos_abs || filt_status.flags.pred_horiz_pos_abs)); |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// once armed we require a good absolute position and EKF must not be in const_pos_mode
|
|
|
|
|
return (filt_status.flags.horiz_pos_abs && !filt_status.flags.const_pos_mode); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// optflow_position_ok - returns true if optical flow based position estimate is ok
|
|
|
|
|
bool Sub::optflow_position_ok() |
|
|
|
@ -282,9 +282,8 @@ bool Sub::optflow_position_ok()
@@ -282,9 +282,8 @@ bool Sub::optflow_position_ok()
|
|
|
|
|
// if disarmed we accept a predicted horizontal relative position
|
|
|
|
|
if (!motors.armed()) { |
|
|
|
|
return (filt_status.flags.pred_horiz_pos_rel); |
|
|
|
|
} else { |
|
|
|
|
return (filt_status.flags.horiz_pos_rel && !filt_status.flags.const_pos_mode); |
|
|
|
|
} |
|
|
|
|
return (filt_status.flags.horiz_pos_rel && !filt_status.flags.const_pos_mode); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|