Author Topic: Accelerometer Calculations  (Read 21669 times)

Offline wiidiscgolf

  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
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)? 

« Last Edit: April 15, 2008, 10:44:25 AM by wiidiscgolf »



Offline Yozef

  • *
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Reply #1 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.



Offline wiidiscgolf

  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Reply #2 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.




Offline akshaysc

  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Reply #3 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



Offline jimmyspenser

  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Reply #4 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.