0
$\begingroup$

I use a gyroscope and an accelerometer to measure the rotation of my drone and now I would like to measure it's acceleration along the Z (Vertical) axis. Problem is I need this relative to the ground and not relative to the drone's current rotation.

How could I calculate vertical acceleration from the x and y rotation and the relative xyz accelerations?

A guy in the Math stack exchange suggested using rotation matrices to rotate back the acceleration vector. The problem is that the order of rotations matters and we couldn't figure out whether to start with x or y since they both changed at the same time as the drone rotated.

Also if we make it work should I subtract gravity from the value when working with it?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.