Compass headings are calculated by adjusting the true bearing for winds, magnetic variation and the variation caused by objects around the compass. The compass heading indicates the direction in which the vessel should proceed.
The true north pole is a fixed point on Earth where it rotates around its axis. The magnetic pole is moving along with Earth's magnetic fields. Current navigational charts can provide the values to be used for wind correction and for magnetic variation for a given location. Calculating true heading and magnetic heading allows for the final calculation of compass heading.
True heading is calculated by allowing for current wind conditions. Take the wind variation and add or subtract it from the desired direction coordinates.
Magnetic heading calculation allows for the magnetic variation. If the deviation is to the east, subtract it from the true heading value and if the deviation is to the west, add it to the true heading.
Compass heading then allows for the known magnetic variation caused by objects, which may be in proximity of the compass. Take this known variation and add or subtract it from the magnetic heading to arrive at the compass heading. In commercial airlines or shipping, technicians often label objects around the compass indicating their magnetic variation. If the specific magnetic variation is not known, it can be estimated by taking a hand compass and measuring the variation of the given object in different parts of the vessel and comparing the results.