Test Problem 2 (Conversion From Euler Angles To Quaternion)
Previous Top Next

Verification Test 2 is a test of the conversion calculations between the Euler angles and the quaternion.  These calculations are done by the rotation GUI (Figure 1) and the conversion GUI (Figure 5).   The test objectives are to verify the correctness of the conversion calculations from Euler angles to quaternion as well as from quaternion to Euler angles. 
The verification is done by comparing QuatView results against the results from a Matlab quaternion script that have already been verified via the Matlab aerospace toolbox. 

Given:

1.  A set of Euler angles (33,44,55) with rotation sequence 123. 

Find:

1.  The quaternion that corresponds to the given Euler angles.
2.  Convert the computed quaternion back to Euler angles.
3.  Repeat 1 and 2 with all of the other possible eleven rotation sequences: 
123,231,312, 213,132,  121,323,212,313,131,232.  Put all the results into a single table for comparison against similar results from the  Matlab script.    

Solution:

Table C2-1 lists the QuatView results for rotation order 123 as well as the other eleven possible rotation orders.   These results were generated using the Rotation tab to compute the quaternion and then using the Conversion tab along with the copy/paste capability to convert the quaternion back to Euler angles.  In every case, the quaternion conversion produced the exact same Euler angles that were used to start with.  This verifies that the Euler angle to quaternion and the quaternion to Euler angle calculations are the inverse of each other.  
Once the QuatView results were generated, then the validated Matlab script was run 12 times to produce the results listed in Table C2-2.   Comparison of the QuatView and Matlab results shows them to be the same.  This verifies that the Euler angle to quaternion and the quaternion to Euler angle calculations in QuatView are correct. Figure C2-1 and C2-2 show the QuatView results for the 121 rotation order. 





Table C2-1.  Verification Test 2,  QuatView Results

Rotation Order
q0
q1
q2
q3
123
0.7394
0.3994
0.1970
0.5049
231
0.7394
0.3994
0.4402
0.3161
312
0.7394
0.0677
0.4402
0.5049
321
0.8377
0.0677
0.4402
0.3161
213
0.8377
0.3994
0.1970
0.3161
132
0.8377
0.0677
0.1970
0.5049
121
0.6670
0.6441
0.3677
-0.0715
131
0.6670
0.6441
0.0715
0.3677
212
0.6670
0.3677
0.6441
0.0715
232
0.6670
-0.0715
0.6441
0.3677
313
0.6670
0.3677
-0.0715
0.6441
323
0.6670
0.0715
0.3677
0.6441



Table C2-2.  Verification Test 2,  Matlab Results

Rotation Order
q0
q1
q2
q3
QuatView Match
123
0.7394
0.3994
0.1970
0.5049
Y
231
0.7394
0.3994
0.4402
0.3161
Y
312
0.7394
0.0677
0.4402
0.5049
Y
321
0.8377
0.0677
0.4402
0.3161
Y
213
0.8377
0.3994
0.1970
0.3161
Y
132
0.8377
0.0677
0.1970
0.5049
Y
121
0.6670
0.6441
0.3677
-0.0715
Y
131
0.6670
0.6441
0.0715
0.3677
Y
212
0.6670
0.3677
0.6441
0.0715
Y
232
0.6670
-0.0715
0.6441
0.3677
Y
313
0.6670
0.3677
-0.0715
0.6441
Y
323
0.6670
0.0715
0.3677
0.6441
Y


graphic
Figure C2-1.  QuatView Results For Rotation Order 121 (EA to Q)



graphic
Figure C2-2.  QuatView Results For Rotation Order 121 (Q to EA)