Compass conversion (true, magnetic, compass)
Converts a heading or bearing among true, magnetic, and compass with variation and deviation (east and west as Bowditch signs them), the compass error, a deviation table interpolated by magnetic heading, and the relative bearing.
Planning and education aid. Not for primary navigation. Full disclaimer
Experimental: not yet fully verified. How results are checked
The chain gives TH 215.0°, MH 222.0°, CH 223.5°, CE 8.5° W; bearing TB 298.0°, MB 305.0°, CB 306.5°, relative 083.0°.
- True heading
- Magnetic heading
- Compass heading
- Deviation
- Compass error
- True bearing
Provenance
- Computed by
- navigation.piloting.compass-conversion 1.0.0, core 0.1.0
- Model
- True − variation = magnetic; magnetic − deviation = compass (east positive), the deviation read from the table at the magnetic heading by the function the aviation heading chain uses (gp_geo::compass); compass to true by fixed-point iteration on the table; a bearing takes the ship's heading's deviation (Bowditch Vol. II §402)
- Accuracy
- Exact arithmetic; a deviation table is interpolated linearly between its rows
- Notes
- 1 shown with the answer
- Cites
- National Geospatial-Intelligence Agency, The American Practical Navigator (Bowditch), NGA Pub. No. 9, Volume II
Something look off?
How we got thisFormula, worked example, sources, and proof
Model: True − variation = magnetic; magnetic − deviation = compass (east positive), the deviation read from the table at the magnetic heading by the function the aviation heading chain uses (gp_geo::compass); compass to true by fixed-point iteration on the table; a bearing takes the ship's heading's deviation (Bowditch Vol. II §402)
Show your work
Variation
T − V = M (east positive)215.0° − 7.0° W= 222.0°Deviation
222.0° − 1.5° W= TH 215.0°, MH 222.0°, CH 223.5°, CE 8.5° W; bearing TB 298.0°, MB 305.0°, CB 306.5°, relative 083.0°
The same steps an agent gets from the MCP server with explain: true.
Accuracy: Exact arithmetic; a deviation table is interpolated linearly between its rows
When to use this: Use this for the TVMDC chain: turning a true course into the compass course to steer, or a compass bearing of a light into a true bearing to plot. Enter the variation from the chart and the deviation for the heading, or paste the ship's deviation table.
Limitations: Deviation belongs to the ship's heading, so a bearing uses the heading's deviation, not the bearing's. A deviation table is good only for the compass and the ship it was swung for, and only with degaussing as noted. Variation changes with place and year; use the chart's value or the magnetic tools.
Worked example: True heading 215°, variation 7° W, deviation 1.5° W; a light at 306.5° by compass. Source: Bowditch 2024 Vol. II §402: magnetic heading 222°, compass heading 223.5°, compass error 8.5° W; the light 305° magnetic, 298° true, 083° relative. It is golden test vector v001, and every build checks the tool still gives its answer within its tolerance.
You enter
- Bearing
- 306.5 deg
- Bearing is
- compass
- Deviation
- 1.5 W
- Ship's heading
- 215 deg
- Variation
- 7 W
You get
- Answer
- TH 215.0°, MH 222.0°, CH 223.5°, CE 8.5° W; bearing TB 298.0°, MB 305.0°, CB 306.5°, relative 083.0°
- True heading
- 215°
- Magnetic heading
- 222°
- Compass heading
- 223.5°
- Deviation
- 1.5° W
- Compass error
- 8.5° W
- True bearing
- 298°
- Magnetic bearing
- 305°
- Compass bearing
- 306.5°
- Relative bearing
- 83°
Review: Not yet independently reviewed by a geodesist.
Last verified: 2026-09-19, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.
Status: version 1.0.0, core 0.1.0. See this tool in the verification report.
Checked against: 21 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.
Sources
- The American Practical Navigator (Bowditch), NGA Pub. No. 9, Volume II, National Geospatial-Intelligence Agency, 2024 edition. Chapter 4, Compass Error (§402, correcting and uncorrecting).
Experimental means this tool has not yet met the stable bar: at least 20 golden vectors, differential tests, and an independent worked example.