View Full Version : Interpreting Accelerometer Data

01-24-2011, 01:36 AM
I'm trying to detect when a wiimote is thrown from one person to another. Once I can define this "throw" event I will be using a game of catch to trigger events - with the goal being to keep as many wiimotes in the air at once, moving from person to person. Unfortunately my physics knowledge is rudimentary at best. Here's what I've tried so far:

I'm using MAX/MSP and I've scaled the X,Y,Z data to match the 1=1g convention in most of the resources I can find online to make translating easier for me. So X,Y,Z now range from -5 to 5.

Thinking at first that relative direction would not matter I used the expression sqrt(X^2+Y^2+Z^2) to get a positive value for absolute acceleration. I then set up a free fall detector to trigger a bang whenever absolute acceleration approaches 0. This works whenever the wiimote is thrown with a high arc, but doesn't work (of course) when thrown with a shallow arc. It might not be totally useless, because I'll probably want to filter out when someone is throwing the wiimote up and down by themselves, rather than to someone else. But, to accomplish my main goal I still need more.

Do I need to detect rapid successive changes in acceleration with a small period of near rest in between? Has anyone here done something like this? Am I thinking about this the correct way even?

Many thanks,


01-24-2011, 11:30 AM
Hi Yosemite,

The composite acceleration expression (sqrt(...)) is built-in OSCulator.
When you use the /wii/1/accel/pry message, it is the fourth argument.

About the free fall: I think you have the right approach.
By looking at the graph it gives when a Wiimote is in the air, I think that perhaps you should check that Wiimote has been thrown first, then goes in free fall. I would try to use a Schmitt Trigger to detect the correct first impulse and then the free fall stage. You could use the 2thresattack~ object from the CNMAT (http://cnmat.berkeley.edu/downloads).