Wiimote Project

Wiimote Projects => Wiimote accelerometer & motions detecting projects => Topic started by: wiidiscgolf on April 15, 2008, 10:41:59 AM

Title: Accelerometer Calculations
Post by: wiidiscgolf on April 15, 2008, 10:41:59 AM
Using just the accelerometer data (no IR) is it possible to calculate the angle the Wiimote is being held at while swinging it?  I have found various trig calculations on the net but they all seem to break down when the wiimote is in motion.  I am trying to determine the release angle of a simulated disc throw so that I can plug the angle and force values into my calculations for how far the disc should travel.  Maybe there is a better way to do this (without using IR tracking)? 

Title: Re: Accelerometer Calculations
Post by: Yozef on April 16, 2008, 12:29:42 AM
If you are using a Mac, I know of a few different programs that read the roll-pitch-yaw inputs and output them in a graph that is updated in real time.  http://www.iamas.ac.jp/~aka/max/#aka_wiiremote aka.wiiremote is one of them.  The output graphs help a lot when trying to determine how you want the wiimote to react at certain angles.
Title: Re: Accelerometer Calculations
Post by: wiidiscgolf 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.

Title: Re: Accelerometer Calculations
Post by: akshaysc on July 10, 2009, 07:31:11 PM
If you still need help, you should look at directional cosine matrices.
They deal with angles in the 3D
Title: Re: Accelerometer Calculations
Post by: jimmyspenser on July 21, 2014, 11:40:23 PM
Accelerometers are dynamic measurement devices. The piezoelectric elements create a charge when deformed. However, that charge is quickly dissipated due to voltage leakage. For eample, they are good for cyclic vibrations that induce sinusoidal accelerations (a vibrating piece of machinery), but they do not work under a continuous acceleration (like gravity).

Honestly, I think that the accelerations are going to be so small that your measured signal is going to get lost in the usual noise of a system. However, it's easy enough to set up. Give it a go.