1

**Wiimote accelerometer & motions detecting projects / Re: Accelerometer Calculations**

« **on:**April 18, 2008, 08:22:20 AM »

After much digging and calculating I have come up with a formula for calculating Roll that seems to work fairly decently. Under the highest end accelerations it seems to lose some accuracy, but that is actually perfect for my game design.

RollX(t) = tan(aX(t)/sqrt(aY(t)^2 + aY(t)^2))

I also adjust mine by assuming that the initial roll is 0. Roll(t) - Roll(0)

I don't know if this formula is 100% accurate it just seems to hold true during all but the highest accelerations in my testing.

RollX(t) = tan(aX(t)/sqrt(aY(t)^2 + aY(t)^2))

I also adjust mine by assuming that the initial roll is 0. Roll(t) - Roll(0)

I don't know if this formula is 100% accurate it just seems to hold true during all but the highest accelerations in my testing.