Why is the Euler Output of the Quaternion Block different than the Euler Angles block in the Aerospace Blockset?

1 visualización (últimos 30 días)
Why is the Euler Output of the Quaternion Block different than the Euler Angles block in the Aerospace Blockset?
In my model, both the blocks are fed by the same Forces and Moments, however the Euler output of the blocks is different.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 27 de Jun. de 2009
Yes, the output Euler of the 'Euler Angles' block is different than the output Euler of the 'Quaternions' block, especially the Pitch (Theta) component of Euler. Theta, from the Quaternion block, is actually limited in range from [-90, +90] degrees.
The difference occurs because of the way the Quaternions block determines the Pitch angle. If you look under the mask, you will see that the Quaternions block calculates the four parameters (e0,e1,e2,e3). These four quaternions are then converted into euler angles. The euler angle Theta (pitch) is caluclated by
theta = asin(e1*e3-e2*e0)
Where 'asin' is a MATLAB function which gives the arc sin or the sin inverse. The range of this function is [-pi/2, pi/2] radians. That is why you see the theta limited in a range from [-90 +90] degrees.
Therefore, the way in which you visualize the output pitch is diffferent.

Más respuestas (1)

James Tursa
James Tursa el 9 de Mayo de 2020
On a related note, the Aerospace Toolbox uses a different quaternion convention than the Robotics Toolbox. One is basically the conjugate of the other. The Aerospace Toolbox quaternion convention seems to be geared more towards quaternions used for coordinate system transformations, and the Robotics Toolbox quaternion convention seems to be geared more towards quaternions used for active vector rotations ... i.e., rotating a vector within the same frame. As a result, you will not see consistency between these two toolboxes ... often one result is opposite of the other. For more discussion on this see these links:

Categorías

Más información sobre Unit Conversions en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by