From 064f3f86bcf651d580950b3aad47d74abffcfa0f Mon Sep 17 00:00:00 2001 From: alexklimaj Date: Wed, 5 Oct 2022 17:20:32 -0600 Subject: [PATCH] Increase mag calibration max_var_allowed --- .../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 c6b5ce97dd..494af2c2b6 100644 --- a/src/modules/sensors/vehicle_magnetometer/VehicleMagnetometer.cpp +++ b/src/modules/sensors/vehicle_magnetometer/VehicleMagnetometer.cpp @@ -254,7 +254,7 @@ void VehicleMagnetometer::UpdateMagCalibration() // Larger values cause a larger fraction of the learned biases to be used. static constexpr float magb_vref = 2.5e-7f; static constexpr float min_var_allowed = magb_vref * 0.01f; - static constexpr float max_var_allowed = magb_vref * 100.f; + static constexpr float max_var_allowed = magb_vref * 500.f; if (_armed) { static constexpr uint8_t mag_cal_size = sizeof(_mag_cal) / sizeof(_mag_cal[0]);