mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-13 09:40:34 +08:00
ekf2: integrate mag heading into mag 3D
This commit is contained in:
@@ -259,7 +259,6 @@ 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.02f)
|
||||
<< "estimated vel = " << estimated_horz_velocity(0);
|
||||
@@ -298,10 +297,11 @@ TEST_F(EkfFlowTest, yawMotionCorrectionWithFlowGyroData)
|
||||
|
||||
// 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
|
||||
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);
|
||||
_ekf->state().vector().print();
|
||||
_ekf->covariances().print();
|
||||
|
||||
Reference in New Issue
Block a user