I'm using the NXP fusion library with an 6DOF IMU. Unfortunately there is no reference to calibrate the built in gyro, e.g. with a magnetometer in that application.
I'm doing short measurements (1..10s) using the linear acceleration output of the fusion algo to detect the movement direction. The algo is continuus running also when not detecting movements.
Unfortunately due to the drift of the gyroscope over time the yaw angle changes. Worst case after some time by 180° which results in a sign reversal of the linear acceleration output.
I tried to solve this by resetting the algo using "fInitializeFusion(&sfg);". This works but depending on the acceleration at the time of resetting the algo it can take quite long (some 10 seconds)
until the output of the fusion lib stabilizes.
I'm looking for a way to "zero" the accumulated gyro error without fully resetting the algo.
Thanks!
Dirk
Thanks for your reply.
I found that tweaking the 6DOF_GY will help. I'm now emphasizing the accelerometer readings.
Concerning the gyro calibration I have a question:
>We recommend you to store gyro calibration offset measured during initialization and store in NVM (refer to "SaveGyroCalibrationToNVM" function).
When is the best time to do this? Leaving the unit stand still e.g. on the desk for some time? How long does the fusion algorithm need to calculate a reliable Gyro offset?
Thanks!
Dirk
Hi Dirk,
Glad to see that tweaking 6DOF_GY config macros helping you.
Regarding storing Gyro calibration offset to NVM: The offsets can be measured by first taking some readings while the unit is not moving, then you can save the measured offset values and apply when reading the gyro values in the future. The calibration offset measurement for 6DOF_GY should take no time.
Remember that the sensor calibration is unique to the sensor unit for which it is computed and the calibration values are stored in the MCU flash memory. If you move sensor unit from one MCU board to another you will need to erase previously stored calibrations in MCU flash. You can refer to "EraseGyroCalibrationFromNVM" function).
Regards,
Amit Purohit.
Hi Amit,
sorry for bugging you again
The calibration values can be found in sfg->SV_6DOF_GY_KALMAN.fbPl.
Does the library calculate those values during init or do I have to provide it? From the documentation of the library this is not clear to me.
Thanks!
Dirk
Hello Dirk,
Thank you for posting your question. Please share more details on your test setup, hardware used etc. This will help us answer you better.
Based on your question and details provided, please see our response below:
Let us know if this helps.
Amit Purohit.