There was an error while loading. Please reload this page.
2 parents 25db4da + c21368d commit 46a9087Copy full SHA for 46a9087
1 file changed
src/modules/src/kalman_core/mm_pose.c
@@ -40,7 +40,7 @@ void kalmanCoreUpdateWithPose(kalmanCoreData_t* this, poseMeasurement_t *pose)
40
// compute orientation error
41
struct quat const q_ekf = mkquat(this->q[1], this->q[2], this->q[3], this->q[0]);
42
struct quat const q_measured = mkquat(pose->quat.x, pose->quat.y, pose->quat.z, pose->quat.w);
43
- struct quat const q_residual = qqmul(qinv(q_ekf), q_measured);
+ struct quat const q_residual = qqmul(q_measured, qinv(q_ekf));
44
// small angle approximation, see eq. 141 in http://mars.cs.umn.edu/tr/reports/Trawny05b.pdf
45
struct vec const err_quat = vscl(2.0f / q_residual.w, quatimagpart(q_residual));
46
0 commit comments