Hi,
You should use much smaller values for the I-factor, think in the range of 0,1 to 0,001. The best way to find a suitable I-factor is to start with a series of data taken from stand still. You only correct on acceleration not on speed, but you examine speed when looking for a nice I-factor. The speed should oscillate around zero with a nice I-factor. Do not expect it to become stable at zero, it never will!
The resolution of your sensor is fine, as is the code (mind you, I do not speak matlab so I won't notice errors in control structures of variable declarations).
You use this algorithm independently on all the axes you need data from, but you can use the same I-factor for all three axes. But you should be aware that you need a different assumption for the Z-axis. You should also be aware that the assumptions are only valid for a non tilted accelerometer, if it is seriously tilted the assumptions are not true anymore and the algorithm will fail. Small variations in tilt are corrected for by the algorithm. To be honest, I suspect that variation in tilt is your biggest problem.
But be aware, this algorithm won't solve your problem, it will just make it a bit smaller.
accelerometer integration
Re: accelerometer integration
My blog: nxttime.wordpress.com
Who is online
Users browsing this forum: No registered users and 4 guests