Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a home made device (think baseball) with an accelerometer and a magnetometer embedded within it and would like to capture some details of an attempted 'throw' of the device.

All I need is the speed of the device at release, and the angle from the horizontal that it was released at. To be clear I'm not talking about the orientation of the device, but the angle of its movement relative to the horizontal.

I'm also not after particularly accurate results there can be a pretty large margin of error here. My data starts at the beginning of the throw and ends at the release, and is composed of x,y,z accelerometer data in m/s/s and azimuth, pitch, yaw data in degrees retrieved from the magnetometer and accelerometer data combined.

I've looked into this for a few days now but am afraid my maths is really rusty, and I have a horrible feeling that this isn't possible with just these two devices alone.

Am I right? Is this a lost cause without adding more accelerometers to my device?

Is the situation improved if I can guarantee that the device is not rotated by more than a 90 degrees around each axis during movement?

Any help you can offer would be much appreciated.

share|cite|improve this question
up vote 0 down vote accepted

Assuming you know the local field where the experiment is taking place, the magnetometer can only orient the ball in two axes. Rotating the ball around the field line will not change the reading at all. Imagine the case where z is along the field line-you would be able to know that and integrate the z accelerometer (if the ball doesn't rotate) to get z velocity and position. Again assuming the ball doesn't rotate, you could combine the x and y accelerometer readings to get perpendicular acceleration and integrate that to perpendicular velocity and position. But you wouldn't be able to find the azimuthal direction from your data. What you need is a starting measurement of azimuth and a rotational accelerometer if you want motion in 3 space.

share|cite|improve this answer
Thanks that makes a lot of sense. I'll see if I can get enough separation to add another accelerometer or a gyro in there. – Ben Jan 8 '11 at 13:04

Your Answer


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