Gyrocompass is a mechanical device that determines direction. It
is used in navigating all major commercial and naval ships, and
some aircraft and land vehicles. A gyrocompass is more accurate
than a magnetic compass, which relies on the earth's magnetic field
to indicate magnetic north. A gyrocompass points to true north, or
geographic north. It is not affected by magnetic forces or by the
rolling and pitching of the vehicle.
(http://reference.howstuffworks.com/gyrocompass-encyclopedia.html)
Here is a picture: http://www.navis.gr/navaids/images/gyro2.jpg