QUATERNIONS IN EULER-CONSTRICTED ENVIRONMENTS
INTRODUCTION
Euler angles are pitch, roll, and yaw. They are simple and easy to understand. They describe how an aircraft rotates about it’s center of gravity as shown in the NASA diagram below.
THE PROBLEM
Unfortunately, Euler angles encounter a problem known as gimbal lock. Gimbal lock is where two or more of the axis rotate in such a way as to prohibit them from working correctly. The video below shows how scientists on the Apollo 13 encountered this issue and how they overcame it:
QUATERNIONS
To solve this issue graphics engines use a rotation system based in 4 dimensions, which are called quaternions. While it would be nice to use quaternions directly to control the movement of the space shuttle (or our flight simulator), this is not possible. We are constrained by movement in 3 dimensional space. Therefore, because we cannot rotate our flight simulator using Quaternions, it has to be converted back to Euler coordinates in order for the movement to be processed.
The space shuttle solved this problem by incorporating a 4th axis that was always driven 90-degrees out of phase with the other three to ensure that the entire gimbal can never lock. We’ve developed a framework for expressing quaternion rotations into Euler coordinates in software, specifically for a 2 DOF (Degree of Freedom) 360-degree capable motion platform. The source code is below:
RELATED PAPERS
We have a paper targeted for the IEEE Human-Machine Systems which is outlining our solution to this issue.