ekf2: use global definition of quaternion error

This commit is contained in:
bresch
2024-03-01 18:57:19 +01:00
committed by Daniel Agar
parent 3931379efe
commit 12fefbcfbd
23 changed files with 1345 additions and 1168 deletions
+4 -2
View File
@@ -258,10 +258,12 @@ TEST_F(EkfFlowTest, yawMotionCorrectionWithAutopilotGyroData)
// THEN: the flow due to the yaw rotation and the offsets is canceled
// and the velocity estimate stays 0
// FIXME: the estimate isn't perfect 0 mainly because the mag simulated measurement isn't rotating
// and this creates an incorrect Z gyro bias which is used to compensate for the apparent flow
const Vector2f estimated_horz_velocity = Vector2f(_ekf->getVelocity());
EXPECT_NEAR(estimated_horz_velocity(0), 0.f, 0.01f)
EXPECT_NEAR(estimated_horz_velocity(0), 0.f, 0.02f)
<< "estimated vel = " << estimated_horz_velocity(0);
EXPECT_NEAR(estimated_horz_velocity(1), 0.f, 0.01f)
EXPECT_NEAR(estimated_horz_velocity(1), 0.f, 0.02f)
<< "estimated vel = " << estimated_horz_velocity(1);
}