From 8c55e36ca93d6a85645abc035cc0cb5fa9328542 Mon Sep 17 00:00:00 2001 From: Paul Riseborough Date: Tue, 12 Apr 2016 07:56:06 +1000 Subject: [PATCH] EKF: use common value for gravity --- EKF/ekf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EKF/ekf.cpp b/EKF/ekf.cpp index 06d490aa7e..1f8e8ea88c 100644 --- a/EKF/ekf.cpp +++ b/EKF/ekf.cpp @@ -628,7 +628,7 @@ void Ekf::calculateOutputStates() Vector3f delta_vel_NED = _R_to_earth_now * delta_vel + _delta_vel_corr; // corrrect for measured accceleration due to gravity - delta_vel_NED(2) += 9.81f * imu_new.delta_vel_dt; + delta_vel_NED(2) += _gravity_mss * imu_new.delta_vel_dt; // save the previous velocity so we can use trapezidal integration Vector3f vel_last = _output_new.vel;