In steering, the helmsman watches the mark for his course on the compass card, keeping it always opposite the lubber's line. A compass aboard a ship is affected by the magnetic force of the ship itself, which acts like a huge magnet. The effect of this magnetism on the compass is called deviation. It is measured by the angle between compass north and magnetic north. Variation and deviation together pull the compass away from true north by an amount called compass error.
Navigators remove most of the deviation by compensating the compass.
They take the ship to a range where they line it up with markers indicating the four cardinal points. They remove the deviation on each heading by placing counteracting magnets in the binnacle these magnets serve to cancel the magnetic effects of the metal in the ship. In an effort to develop a navigational instrument whose accuracy would be unaffected by stray magnetic fields, the gyrocompass , which does not use magnetism, was developed. Gyrocompasses are often used in modern navigation systems because they can be set to point to true north rather than to magnetic north. Today large ships carry both magnetic compasses and gyrocompasses.