# Gimbal Lock Problem

There is a special rotation configuration in 3D Transformations which is called the "Gimbal Lock". If the rotation definition is done with Eulerian Angles (rotation around the allready rotaded Axes; so for example rot x, rot y', rot z'') and the SECOND Rotation (around y') is 90° degree, the first Rotation (around x) and the third Rotation (around z'') are defined in the SAME Axis and it is not possible to calculate them sepparated. If the SECOND Rotation is close to 90° it causes a bad repeatability in the calculation of the first and third rotation.

See here the Wickipedia article regarding the Gimbal Lock: Gimbal Lock Wickipedia

It results in big standard deviations on rot x and rot z''. Once you change something on your calculation setup (f.e. deactivate a coordinate direction) you get big changes in rot x and rot z''.

This effect is bigger the closer rot y is to 90 degrees.

## What does TrafoStar in case of a dataset containing a gimbal lock?

If rot y is in the range of 89° < rot y < 91° TrafoStar prompts a Gimbal Lock message.

The solution is to fix either rot x or rot z'' to a fixed value (zero or any other).

Try it; use the following data (you can insert them to TrafoStar by the Clipboard Option easily):

Start System:

 pt1 10 20 30 pt2 -10 -22 -30 pt3 33 2 -20 pt4 22 33 -52 pt5 1 2 3

Target System

 pt1 24.9 26.1 10 pt2 -26.9 -25.7 -10 pt3 -1.5 -20 33 pt4 23.5 -56.9 22 pt5 2.5 2.6 1