mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
GyroCalibration: update sensor correction before using it
Otherwise, the thermal offset value can be outdated
This commit is contained in:
parent
4481c3bc1f
commit
beddb3969e
@ -153,6 +153,7 @@ void GyroCalibration::Run()
|
||||
}
|
||||
|
||||
if (_gyro_calibration[gyro].device_id() == sensor_gyro.device_id) {
|
||||
_gyro_calibration[gyro].SensorCorrectionsUpdate();
|
||||
const Vector3f val{Vector3f{sensor_gyro.x, sensor_gyro.y, sensor_gyro.z} - _gyro_calibration[gyro].thermal_offset()};
|
||||
_gyro_mean[gyro].update(val);
|
||||
_gyro_last_update[gyro] = sensor_gyro.timestamp;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user