File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -133,8 +133,10 @@ bool AP_Arming_Copter::barometer_checks(bool display_failure)
133
133
// that may differ from the baro height due to baro drift.
134
134
const auto &ahrs = AP::ahrs ();
135
135
const bool using_baro_ref = !ahrs.has_status (AP_AHRS::Status::PRED_HORIZ_POS_REL) && ahrs.has_status (AP_AHRS::Status::PRED_HORIZ_POS_ABS);
136
+ float pos_d_m = 0 ;
137
+ UNUSED_RESULT (AP::ahrs ().get_relative_position_D_origin_float (pos_d_m));
136
138
if (using_baro_ref) {
137
- if (fabsf (copter. inertial_nav . get_position_z_up_cm () - copter. baro_alt ) > PREARM_MAX_ALT_DISPARITY_CM) {
139
+ if (fabsf (pos_d_m ) > PREARM_MAX_ALT_DISPARITY_CM) {
138
140
check_failed (Check::BARO, display_failure, " Altitude disparity" );
139
141
ret = false ;
140
142
}
You can’t perform that action at this time.
0 commit comments