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

5 views (last 30 days)
MathWorks Support Team on 27 Jun 2009
Answered: James Tursa on 9 May 2020
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.

MathWorks Support Team on 27 Jun 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.