From 78122b20a630fb418b9b73ae67eb5a5897d1fd1b Mon Sep 17 00:00:00 2001 From: CarlOlsson Date: Fri, 8 Mar 2019 14:34:17 +0100 Subject: [PATCH] EKF: fix the rotation direction of the buffered attitude solutions in alignOutputFilter() Signed-off-by: CarlOlsson --- EKF/ekf_helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EKF/ekf_helper.cpp b/EKF/ekf_helper.cpp index a30b5eb090..837bd82976 100644 --- a/EKF/ekf_helper.cpp +++ b/EKF/ekf_helper.cpp @@ -379,7 +379,7 @@ void Ekf::resetHeight() void Ekf::alignOutputFilter() { // calculate the quaternion delta between the output and EKF quaternions at the EKF fusion time horizon - Quatf q_delta = _state.quat_nominal.inversed() * _output_sample_delayed.quat_nominal; + Quatf q_delta = _state.quat_nominal * _output_sample_delayed.quat_nominal.inversed(); q_delta.normalize(); // calculate the velocity and posiiton deltas between the output and EKF at the EKF fusion time horizon