Hi,
I am trying to use fusion library based K64F and Multi2-B to calculate the pitch and roll based on the reference of 0 YAW to see if the real measurement pitch and roll are accurate enough?
ex. I have pitch=30 degrees, roll=50 degrees @YAW=0, then, I want to calculate pitch & roll @ yaw=75 degrees. Is it possible to call any function in library to get these angles?
Thanks,
Christie
Solved! Go to Solution.
Assuming the Aerospace coordinate system, the sequence of Euler angle rotations is:
First, the yaw rotation which is about the vertical z axis
Second, the pitch rotation iabout the y axis
Third, the roll rotation about x axis.
I think you're referring to performing a fourth rotation about the z axis. The z axis was the yaw axis at the start of the rotation sequence but it's no longer the yaw axis as a result of the roll and pitch rotations.
To perform a fourth rotation about the z axis by angle psi, pre-multiply your orientation matrix R by the z axis rotation matrix Rz)psi) (equation 3 in AN5017) to obtain a new orientation matrix Rz.R:
Rz(psi)={cos(psi), sin(psi), 0}
{-sin(psi), cos(psi), 0}
{0, 0, 0}
From the new rotation matrix Rz.R you can extract the new Euler angles with a call to: fNEDAnglesDegFromRotationMatrix
Mark
Hi Mark,
Thanks.
Christie
There's a small typo in my reply: the z axis rotation matrix obviously has a 1 and not a 0 in the [z][z] position.
The correct matrix is:
Rz(psi)={cos(psi), sin(psi), 0}
{-sin(psi), cos(psi), 0}
{0, 0, 1}
The yaw rotation occurs first in all three coordinate systems that are supported in the software. Changing the yaw angle therefore has no effect on roll and pitch angles. Any initial yaw rotation has no effect on the accelerometer measurement since all accelerometers are insensitive to rotation about the vertical axis.
Hi Mark,
It should be changed on pitch & roll on tilted surface when I turn YAW only?
Ex. You have pitch=30 roll=50 and turn YAW 180 degrees on tilted surface, after turn, pitch will be -30 degree, roll will change as well, right?
Can I use any function in fusion library to get pitch & roll?
Thanks,
Christie
Assuming the Aerospace coordinate system, the sequence of Euler angle rotations is:
First, the yaw rotation which is about the vertical z axis
Second, the pitch rotation iabout the y axis
Third, the roll rotation about x axis.
I think you're referring to performing a fourth rotation about the z axis. The z axis was the yaw axis at the start of the rotation sequence but it's no longer the yaw axis as a result of the roll and pitch rotations.
To perform a fourth rotation about the z axis by angle psi, pre-multiply your orientation matrix R by the z axis rotation matrix Rz)psi) (equation 3 in AN5017) to obtain a new orientation matrix Rz.R:
Rz(psi)={cos(psi), sin(psi), 0}
{-sin(psi), cos(psi), 0}
{0, 0, 0}
From the new rotation matrix Rz.R you can extract the new Euler angles with a call to: fNEDAnglesDegFromRotationMatrix
Mark
Thanks, Mark.