# Extracting acceleration vector from rotated aircraft

Suppose we have an aircraft with accelerometer measuring accelerations along each axis. It is mounted in a way so it is perpendicular to the plane in all axes (that should be obvious). We also have gyrometer sensor mounted on the plane - it can tell us how is the plane currently aligned (rotated) in air.

1st case: Suppose we have an aircraft on the ground. Then we can get our desired acceleration component just by reading the accelerometer's Z axis reading (Z axis is pointing from sky to the center of the earth).

2nd case: The plane is in the air, doing some loops for example - now to get the desired reading as previously (acceleration towards earth) we would need to compensate the Z axis acceleration with current rotation and/or accelerations.

So, I have all the data but I don't know what physical/mathematical formulas I should use to extract the acceleration component pointing towards the earth. I would also be glad to see some tips about what literature I should read to be able to do this.

The accelerometers always tell you the 3 components of acceleration - including gravity.

If the aircraft is on the ground, and the Z accelerometer is truly vertical, it will have an output equal to the value of gravity at that point on the earth.

If you know the value of gravity at that point, and subtract that from the Z accelerometer output, the result is zero. The outputs from the other 2 accelerometers will be zero.

So, allowing for local gravity, we have an acceleration vector of zero, which is correct since the aircraft is not accelerating w.r.t. the earth.

When the aircraft takes off, you need to integrate up the gyro outputs to calculate the angular orientation of the aircraft at any time. This is not trivial!

You can then use the angular orientation to calculate the acceleration vector at any time - again allowing for the value of local gravity.

This acceleration vector would usually be calculated in a reference frame that has a vertical Z axis, and can be integrated up to give velocity in that frame and position with respect to the starting point. The Z component tells you what you wanted to know.

The most complicated part of this process is using the gyro outputs to get the instantaneous angular orientation of the aircraft.

All accelerometers and gyros have errors which will affect your results.

For further details, I suggest you look for information on Inertial Navigation Systems (INS) - here or by Googling. Any decent reference on INS will cover what you need, including the integration of the gyro outputs and the errors involved.

Using this picture as the standard for pitch, roll and yaw and let x be the forward direction, y be the side, and z be vertical, then geometrically, it looks like the true vertical acceleartion is $$a_{z}\left[\cos(Pitch)+\cos(Roll)\right]+a_{x}\sin(Pitch)+a_{y}\sin(Roll)$$

Didn't I just answer it for you yesterday at the math stack exchange?

https://math.stackexchange.com/questions/201644/aircraft-attitude-mathematical-tool-to-extract-acceleration/201647#201647

• Xiaowen, I am not sure why but I had no notification about your answer on Math.SE (or I merely missed it). Anyway, thank you very much, I will try this right now. Also, I suggest to delete the thread at Math.SE as Physics.SE seems to better fit. – Primož Kralj Sep 25 '12 at 6:36
• You are welcome. I think it's fine if you leave it there. This is just a geometry problem. – Xiaowen Li Sep 25 '12 at 6:37
• Also, you said you thought we have more sophisticated techniques - well we do, one of them is Extended Kalman Filtering but I think it has a lot of overhead for this problem. – Primož Kralj Sep 25 '12 at 6:38
• thanks that helps a lot. I just need to know some basic techniques first. – Xiaowen Li Sep 25 '12 at 6:43
• Also, me and my peer just figured out that this works only for static aircraft. If the plane moves, we have the same problem for a_{x}, because then it also incorporates the acceleration from movement - so this formula is a no-go :( – Primož Kralj Sep 25 '12 at 7:07