Magnetic deviation

Because the latter depends on the orientation of the craft relative to the Earth's field, it can be difficult to analyze and correct for it.

[4] Magnetic compass adjustment and correction is one of the subjects in the examination curriculum for a shipmaster's certificate of competency.

Non-magnetic methods of taking bearings, such as with gyrocompass, astronomical observations, satellites (as GPS) or radio navigation, are not subject to magnetic deviation.

The explorer Joao de Castro was the first to report such an inconsistency, in 1538, and attributed it to the ship's gun.

Many other objects were found to be sources of deviation in ships, including iron particles in brass compass bowls; iron nails in a wooden compass box or binnacle; and metal parts of clothing.

[6] Archibald Smith in 1862 published Admiralty Manual for ascertaining and applying the Deviations of the Compass caused by the Iron in a Ship.

The key insight is that the deviation can be written as a Fourier series in the magnetic heading with terms up to the second frequency components.

Slots for small magnets in a binnacle. The magnets are positioned to reduce the effect of the ship's permanent magnetization on the compass.
Diagram of a 19th-century binnacle housing a compass. It has two soft iron spheres (Q) to correct for induced magnetization.
A sample compass correction card, showing the deviation correction for a given heading.