From 1cbcb445abb21e69c5af2b590147b5c72601b823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Thu, 28 Nov 2019 18:20:35 +0100 Subject: [PATCH] gyro calibration: speedup from 20s to 1s It's not required to take that many samples, 1 second is enough. This is confirmed by looking at the standard deviation over 10 calibrations: it is in the same order as with 20 seconds (the effect of temperature increase has a bigger effect). --- src/modules/commander/gyro_calibration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/commander/gyro_calibration.cpp b/src/modules/commander/gyro_calibration.cpp index 1d28f5aad8..bef0e69a1a 100644 --- a/src/modules/commander/gyro_calibration.cpp +++ b/src/modules/commander/gyro_calibration.cpp @@ -78,7 +78,7 @@ static calibrate_return gyro_calibration_worker(int cancel_sub, void *data) { gyro_worker_data_t *worker_data = (gyro_worker_data_t *)(data); unsigned calibration_counter[max_gyros] = { 0 }, slow_count = 0; - const unsigned calibration_count = 5000; + const unsigned calibration_count = 250; sensor_gyro_s gyro_report; unsigned poll_errcount = 0;