Gimbal lock can occur in gyroscopes, telescopes and other devices that move in multiple directions, and is caused when the gimbals, or mounts, align in ways that prevent the device from moving in a desired direction. A gyroscope is a spinning wheel that is supported inside a series of cages or mounts, and is used in aircraft and ships to aid in navigation. Each cage provides movement in one of three directions, allowing the gyroscope to be mounted in a moving ship or aircraft while maintaining a level orientation.
Gyroscopes were first discussed in literature in the 18th century, and practical instruments for ships built in the 19th century. Elmer Sperry built the first gyroscope for aircraft autopilot control in the early 20th century. The benefit of using gyroscopes for navigation is that the spinning gyroscope wheel maintains a level orientation regardless of the movement of the ship or aircraft. Connecting the gyroscope to instruments can provide an "artificial horizon", or an instrument view of level even during storms at sea or aircraft turbulence.
All objects in space can be described by a combination of three angles that are defined by a mathematical formula called Euler angles. These three angles are often described by the terms x-, y-, and z-axis. A device is said to have three degrees of freedom when it can turn up or down, left or right, and in or out. Gyroscopes mounted in three cages, each rotating in one of the three angles, can in theory turn in any direction needed for navigation.
The effect of gimbal lock can be seen in a gyroscope, but can occur in less complicated devices. As an example, a viewer tracking a satellite overhead with a telescope will reach a point where the telescope is pointing straight up. At this point, the viewer turns the telescope 180°, and can continue to track the satellite as it moves toward the horizon in the opposite direction.
Gimbal lock occurs if the object being tracked, such as an aircraft, moves overhead and then changes direction 90° and moves away. At that point, the telescope cannot turn sideways, because the mounts or gimbals prevent movement in that direction. The instrument must be rotated, or turned on its base mount, to overcome the problem.
Humans can adapt to these situations, because they may recognize the telescope cannot continue to track the aircraft unless the telescope is turned 90°. The problem is that often the object tracking is lost until the viewer can find it again in the telescope eyepiece. This can also occur with radar antennas used to track aircraft that turn when located above the antenna. Computer software must be written to compensate for the loss of tracking due to gimbal lock.
In gyroscopes, there are several angles where gimbal lock can occur when cages line up, preventing the gyroscope from turning. Like the telescope example, the gyroscope is now prevented from freely moving, and is said to be "gyro locked". Aircraft that perform aerobatics, or turns and spins in unusual directions, can cause this behavior in their navigation instruments. Pilots performing these maneuvers will often manually lock the gyro instruments before aerobatics to prevent gimbal lock and stress on the gyroscopes.
Spacecraft navigation uses gyroscopes to maintain a known point of reference. There is no horizon in space, and position must be determined by its location relative to specific stars, a technique called celestial navigation. When a spacecraft tumbles or changes direction, the gyroscopes maintaining the "level" orientation can gimbal lock and cause a loss of reference.
Astronauts had to visually reference the navigation stars and reset the gyroscope to prevent navigation errors. One way the problem was solved was to add a fourth degree of freedom, another cage, which was mounted in a different orientation or angle from the other cages. This provided movement even if two cages were gimbal locked, thus allowing the instrument to continue navigating.