Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pr allows applying gyro scale factor in inav firmware
what is gyro scale factor error
Rotation_speed=gyro_scale_factor *gyro_raw_reading
Similar to the accelerometer, gyro_scale_factor needs calibration due to manufacturing error
without calibration it will read angular speed incorrectly, which will result in AHI drift in rolls or flips, the internal state in ahrs always rotates more/less that actual rotation
You can
set imu_dcm_kp = 50
to have a look on pure gyro data to see if you have this problem, This is how it lookshttps://www.youtube.com/watch?v=hnNc33QCbM8
Fortunately, some gyros already have factory scale factor calibration, such as mpu6000 or icm-20689
But BMI270 do not have a factory scale factor calibration , and it seems like it has some serious errors(as high as 7deg per 360deg) without calibration,This will cause fatal AHI error just after a few rolls or flips
MoreInfo
BMI270 gyro can perform motionless SENS error compensation (CRT) and store them into Non-volatile memory, The calibrated scale factor can be applied automatically on startup. But it is kind of risky and complicate process. And i found manual applying gyro scale with this pr will achieve better accuracy