| Electronics > Projects, Designs, and Technical Stuff |
| Absolute angle calculation from gyro and accelerometer |
| (1/1) |
| Amper:
Hi! I hope this is the right category for this post since its not really an electronics question. Im working on a segway project and have toknow the absolute angle. This works beautifully via two accelerometer axis but this only works in static applications. As soon as there is a linear motion to the sensor, the angle is changing according to the total acceleration vector. Is there a simple way to correct for it or does newton say no? |
| Rerouter:
It is usually called "sensor fusion" there are tons of libraries out on the internet for it, basically it is subtracting the effect of one from the other, in your case it would be subtracting the acceleration of the motor * the calculated angle of the gyro from the accelerometer output. The libraries basically put the accelerometer axis and the gyros rotation in the same space, so that rotation on the gyro rotates the output of the accelerometer to the same orientation, keeping things consistent over rotation, then when you have acceleration with no rotation it can be summed out, (a magnetometer would usually be added to provide a way to fight the drift of the gyro) |
| Navigation |
| Message Index |