1
votes

I have a set of acceleration values along the x, y, z directions (sensor body frame). The sensor tilted and changed orientation many times during operation. Using the gyroscope, magnetometer and accelerometer, I was able to fuse and extract the Roll, Pitch and Yaw angles all in quaternion format ( cal it Q).

Now, to derotate the acceleration values into global X, Y, Z positions. Do I just simply 1. convert the acceleration values into quaternion by setting the scalar part to 0 (call it Acc) 2. Multiply the acceleration quaternion as follows : Qtranspose * Acc * Q??

Or is my conclusion wrong? how do we derotate the values?

thanks

1
Your approach looks right, but the best way to be sure is to test it with simulated values and make sure you get the expected result.Isaac

1 Answers

0
votes

If you already have an accurate quaternion orientation q, then the 'unrotated' vector of the accelerations is as you said:

Ag = q* A q

or

Ag = q A q*

depending on which convention you are using for quaternion multiplication. (just try both and see which one give you the right gravity vector).

NOTE that A and Ag are 'pure quaternions' - this is a quaternion with the scalar component as 0, and the axis component as your acceleration vector. In other words if your quaternion is q = [w x y z], then A = [0 ax ay az]. You can then discard the scalar component of Ag to get the unrotated vector. Make sure the order of the acceleration vector is consistent with your quaternion vector order.