Magnetic compass

Usually a gyrocompass is not available at a yacht. Instead one or more magnetic compasses serve for steering. The reading of this kind of compass must be corrected for variation and deviation.
OpenCPN uses true course over ground. The course to steer is calculated taking into account the wind, the current and the compass correction: magnetic variation + magnetic deviation:
 

Deviation curve of magnetic compass

An analytic method for obtaining the deviation curve of a magnetic compass allowing obtaining the value of the deviation for any course.
Magnetic deviation

Magnetic Variation

Magnetic variation, or magnetic declination, is shown on paper and raster charts, but can also be calculated using the World Magnetic Model. C source code for any platform is available at: http://www.ngdc.noaa.gov/geomag/WMM/soft.shtml

For Windows OS, compilations with a graphical user interface (GUI) are available at:
  1. http://www.ngdc.noaa.gov/geomag/WMM/wmm_gdownload.shtml and at
  2. http://sites.google.com/site/navigationalalgorithms/

A World Magnetic Data PlugIn is available for OpenCPN since 2011.04.03 (version 0.1) at:
http://www.cruisersforum.com/forums/f134/world-magnetic-model-plugin-58167.html#post658775

In the example hereunder (from GUI no. 2 above) the nautical translation of "Declinacion magnética y Variación anual" is: "Magnetic variation and annual change".