I am trying to improve the accuracy of the accelerometer and gyro readings from BMI160 by using the FOC.
For the accelerometer, I noticed that the offsets change depending on the orientation: I tried g on x axis, g on y axis and then g on z axis.
Is there an explanation to this?
Solved! Go to Solution.
I don't know your application with BMI160. For static offset calibration, our common suggestion is save value in your flash but not BMI160's NVM, because NVM have wirte times limitation.
If you could check that accel static offset will not change along with product liftime, you can save value in NVM. It's decided by your application.
I am struggling with the offsets.
I did as you suggested saving the offsets given by bmi160_start_foc() in my local flash then applied them to the raw data - this didn't work for me.
I tried to learn the offset myself. I put the device on a flat surface, g is on z axis, I read the raw data on x and y for X time (I did 5 to 10 seconds). The avergare over this period of time is the offset. I've been appliying it as follows: a = ((a_raw - offset)*g)/sensitivty. This method didn't work for me either.
The only way for me to get sensible results is to use the FOC. I am not sure what I am missing here?
Can you please help me?