# Is it possible to calculate an angle of movement from the horizontal from accelerometer and magnetometer data?

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?