From 9ebfed010f570b60f02c479e0cbdf0dfedcddc84 Mon Sep 17 00:00:00 2001 From: bresch Date: Thu, 6 Jul 2023 15:07:29 +0200 Subject: [PATCH] mag_cal: increase uncertainty of calibration parameters in air bias estimation is usually really accurate and should be weighted more heavily compared to the calibration parameters that are often more approximate given the worse magnetic environment near the ground. --- .../sensors/vehicle_magnetometer/VehicleMagnetometer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/sensors/vehicle_magnetometer/VehicleMagnetometer.cpp b/src/modules/sensors/vehicle_magnetometer/VehicleMagnetometer.cpp index 8c76d69b81..0021f9f3b9 100644 --- a/src/modules/sensors/vehicle_magnetometer/VehicleMagnetometer.cpp +++ b/src/modules/sensors/vehicle_magnetometer/VehicleMagnetometer.cpp @@ -259,7 +259,7 @@ void VehicleMagnetometer::UpdateMagCalibration() // State variance assumed for magnetometer bias storage. // This is a reference variance used to calculate the fraction of learned magnetometer bias that will be used to update the stored value. // Larger values cause a larger fraction of the learned biases to be used. - static constexpr float magb_vref = 2.5e-7f; + static constexpr float magb_vref = 2.5e-6f; static constexpr float min_var_allowed = magb_vref * 0.01f; static constexpr float max_var_allowed = magb_vref * 500.f;