From d858835fd07e2024bb0a6aaa08130218941ab710 Mon Sep 17 00:00:00 2001 From: bresch Date: Thu, 17 Dec 2020 15:49:51 +0100 Subject: [PATCH] mbe: initialize estimator with current measurement --- .../FieldSensorBiasEstimator/FieldSensorBiasEstimatorTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/magnetometer_bias_estimator/FieldSensorBiasEstimator/FieldSensorBiasEstimatorTest.cpp b/src/lib/magnetometer_bias_estimator/FieldSensorBiasEstimator/FieldSensorBiasEstimatorTest.cpp index 5f916dcef2..b1ed252558 100644 --- a/src/lib/magnetometer_bias_estimator/FieldSensorBiasEstimator/FieldSensorBiasEstimatorTest.cpp +++ b/src/lib/magnetometer_bias_estimator/FieldSensorBiasEstimator/FieldSensorBiasEstimatorTest.cpp @@ -44,8 +44,8 @@ TEST(MagnetometerBiasEstimatorTest, AllZeroCase) const Vector3f virtual_bias(0.2f, -0.4f, 0.5f); Vector3f virtual_mag = virtual_unbiased_mag + virtual_bias; - // field_sensor_bias_estimator.setField(virtual_mag); - // field_sensor_bias_estimator.setBias(virtual_bias); + // Initialize with the current measurement + field_sensor_bias_estimator.setField(virtual_mag); for (int i = 0; i <= 1000; i++) { float dt = .01f;