mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-03 10:20:35 +08:00
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).
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user