Closed ladislas closed 1 year ago
As stated in the README, "the gyroscope offset correction algorithm provides run-time calibration of the gyroscope offset to compensate for variations in temperature and fine-tune existing offset calibration that may already be in place". The inertial calibration model just subtracts whatever offset is specified by the user, usually a constant value.
In our project, we've implemented the Advanced example provided, that you can see here:
https://github.com/leka/LekaOS/blob/develop/spikes/lk_sensors_imu_lsm6dsox_fusion_calibration/main.cpp
We have followed the following protocol:
1. Calculate static accel + gyro offsets
2. Apply previously obtained offsets
Using then apply the offsets using
FusionCalibrationInertial
.As a side note, only using
FusionCalibrationInertial
reduces the yaw drift greatly.3. Apply runtime gyroscope offset correction
Using
FusionOffsetUpdate
we apply runtime calibration to the gyroscope, as explained hereDuring code review, one our team member tried using only
FusionOffsetUpdate
without usingFusionCalibrationInertial
.He said the effect seemed to be the same: reduce yaw drift to almost zero giving us stable values over time when the device is not moving.
He then asked the following question:
My answer was "trust the experts and follow the canonical example first, before trying to do things differently. Then we can experiment".
But I was not happy with my answer, so I'd like to add more information.
What would you say in that situation?