Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

How does one separate the acceleration due to gravity from other motion in accelerometer input?

share|improve this question

3 Answers 3

up vote 8 down vote accepted

When working on Wii titles, i found that a low pass filter on the accelerometer reading could be used as a reasonable approximation of the gravity vector component. Subtracting this from the real values then left me with a good basis stream for instantaneous gesture analysis. My low pass was around 1hz (just the average of enough packets of data) but tweaked dependent on the gesture being developed.

share|improve this answer
    
That sounds sensible enough. –  drxzcl Aug 17 '10 at 14:06

That really depends on what you are trying to do.

If you are planning to use the accelerometers for navigation (essentially building an inertial navigation device) you need to keep track of which way is down in your integration cycle. If you device is being accellerated with an accelleration equal to g in a lateral direction and you have no measurement history, you have no way of telling which is which.

If you are using the accelerometers as a sort of tilt sensor you can just assume your measurement is gravity, that is your local down vector. Decomposing it along the device's body will yield the orientation.

share|improve this answer

Several techniques only use the difference in acceleration, not the instantaneous value. In those situations, constant acceleration is removed for you.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.