The Magnetic compass, as the name implies, relies on the earth's magnetic field and, because the true poles and the magnetic poles on the earth's surface do not coincide, there are various corrections that have to be applied. Magnetic compasses have been developed over hundreds of years and various means have been used to optimize their performance. Magnetic compasses are still retained because of their independence from electrical power. Nevertheless, for magnetic compasses required for emergency purposes there is a continuing need for regular compass adjustment and care in ensuring that metal objects are not placed in the vicinity of the compass, which would be adversely affect it.
Most larger ships carry a gyrocompass which relies on the gyroscopic effect in which a freely spinning body aligns itself at right angles to the direction of movement. The gyroscope senses the spinning movement of the earth and aligns its axis of spin north/south. The advantages of the gyroscope is that it does not require corrections of the magnetic compass but it does require a reliable source of electricity and also takes some time to start up.
On smaller vessels, fluxgate compasses have become very popular, but again they require a reliable electrical source although they do have digital capabilities.
As more electronic equipment has been introduced to the bridge of fishing vessels there has been a need to interface the compass with other instrumentation, such as navigation plotters and autopilots. Generally this is done in conformity with NMEA 0183 protocols which establish the method by which communication are established between two pieces of electronic equipment. Note that because a magnetic compass is not electronic, an electronic sensor must be linked to the compass to provide an electronic output of the vessel's heading.