Magnetic deviation

Slots for small magnets in a binnacle. The magnets are positioned to reduce the effect of the ship's permanent magnetization on the compass.

Magnetic deviation is the compass error caused by local magnetic fields generated by nearby ferrous materials or electrical equipment, which distort the Earth's magnetic field in the vicinity of the compass. It is a local effect: the amount and direction of deviation depend on the specific location of the compass within a vessel, aircraft, or vehicle, and can vary even within the same craft. If not corrected, deviation can lead to inaccurate bearings.

Magnetic declination (also called variation) is the angular difference between magnetic north and true north. It is a separate source of compass error from magnetic deviation.

The term magnetic deviation is sometimes used loosely to mean magnetic declination, but in navigation and engineering contexts it refers specifically to the local error described above.