inav icon indicating copy to clipboard operation
inav copied to clipboard

Apply custom gyro scale factor

Open shota3527 opened this issue 3 years ago • 1 comments

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 looks https://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

shota3527 avatar Oct 24 '22 04:10 shota3527

I think you have another open PR (or two?) that are similar. Does the other one supersede this one?

sensei-hacker avatar May 26 '25 18:05 sensei-hacker