bolderflight / invensense-imu

Arduino and CMake library for communicating with the InvenSense MPU-6500, MPU-9250 and MPU-9255 nine-axis IMUs.
MIT License
508 stars 213 forks source link

calibrateAccel #29

Closed lxzrv closed 6 years ago

lxzrv commented 6 years ago

Is it works? It's every time show me that bias is 0, and scale is 1. But i can read peak 10.7mss on X and min -9.0 or another => real bias ~ -0.9. I checked sourses, but i can't find something wrong.

flybrianfly commented 6 years ago

Yes, make sure that you are running calibrateAccel 6 times total, once in each axis (+/-). The method is using the gravity vector as input to compute scale factor, which is why this is necessary.

lxzrv commented 6 years ago

Thank you so much, my English don't pretty good and I looked once again at the code and understood, that it should be run at least 6 times to calculate all biases, I wrote some useful lines in your code (it helped me) to print values of measuring when pass the loop with (_numSamples). In my opinion your library is the most understandable, easy, but powerful. Thanks.