Skip to content
Snippets Groups Projects
Commit 0efb34a4 authored by Dinesh Atchuthan's avatar Dinesh Atchuthan
Browse files

[WIP] check_covariance test_f

parent 287316f5
No related branches found
No related tags found
No related merge requests found
...@@ -161,6 +161,26 @@ TEST_F(ProcessorIMU, acc_z) ...@@ -161,6 +161,26 @@ TEST_F(ProcessorIMU, acc_z)
ASSERT_TRUE((problem->getCurrentState() - x).isMuchSmallerThan(1, wolf::Constants::EPS_SMALL)); ASSERT_TRUE((problem->getCurrentState() - x).isMuchSmallerThan(1, wolf::Constants::EPS_SMALL));
} }
TEST_F(ProcessorIMU, check_Covariance)
{
t.set(0); // clock in 0,1 ms ticks
x0 << 0,0,0, 0,0,0,1, 0,0,0, 0,0,0, 0,0,0; // Try some non-zero biases
problem->getProcessorMotionPtr()->setOrigin(x0, t);
data << 2, 0, 9.8, 0, 0, 0; // only acc_x, but measure gravity!
cap_imu_ptr->setData(data);
cap_imu_ptr->setTimeStamp(0.1);
sensor_ptr->process(cap_imu_ptr);
Eigen::VectorXs delta_preint(problem->getProcessorMotionPtr()->getMotion().delta_integr_);
Eigen::Matrix<wolf::Scalar,9,9> delta_preint_cov = problem->getProcessorMotionPtr()->getCurrentDeltaPreintCov();
ASSERT_FALSE(delta_preint.isMuchSmallerThan(1, wolf::Constants::EPS_SMALL));
ASSERT_FALSE(delta_preint_cov.isMuchSmallerThan(1, wolf::Constants::EPS_SMALL));
}
TEST_F(ProcessorIMU, Covariances) TEST_F(ProcessorIMU, Covariances)
{ {
data_cov.topLeftCorner(3,3) *= 0.01; // acc variance data_cov.topLeftCorner(3,3) *= 0.01; // acc variance
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment