From cdd64fc43df76f352c138f8e22097f59067fa097 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Sat, 1 Aug 2015 17:19:26 +0900 Subject: [PATCH] AHRS_NavEKF: fix blended accel to use primary accel --- libraries/AP_AHRS/AP_AHRS_NavEKF.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp index f3ed619634..7feaba56da 100644 --- a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp +++ b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp @@ -138,7 +138,7 @@ void AP_AHRS_NavEKF::update(void) EKF.getIMU1Weighting(IMU1_weighting); _accel_ef_ekf_blended = _accel_ef_ekf[0] * IMU1_weighting + _accel_ef_ekf[1] * (1.0f-IMU1_weighting); } else { - _accel_ef_ekf_blended = _accel_ef_ekf[0]; + _accel_ef_ekf_blended = _accel_ef_ekf[_ins.get_primary_accel()]; } } }