Three norths, none agreeing.
There is true north, where the maps point; magnetic north, where the field points, offset by a variation that geography sets and slowly moves; and compass north, where your particular installation points after the aircraft itself has bent the field. The first two differences are printed on charts. The third one you built yourself, out of speaker magnets and wiring — and it is the subject of the calibration this article ends with.
A flight computer needs heading for exactly one luxury it cannot otherwise have: the instant wind. GPS gives track over the ground; the airspeed system gives speed through the air; heading is the missing angle that lets the wind triangle be solved continuously instead of waiting for circles. Which makes the question of whether the heading is honest worth eleven minutes.
The field points into the ground.
The geomagnetic field is not a horizontal arrow. At our latitudes it plunges downward at a dip angle of roughly 64° — which means only cos 64° ≈ 44% of the field strength carries any heading information at all. The dominant, vertical part says nothing about north and everything about down.
A perfectly level sensor never notices the vertical component. But bank the aircraft and the sensor's idea of "horizontal" tilts with the wing — and a slice of that big vertical vector leaks into the horizontal measurement. The classic whisky compass swinging wildly through a northerly turn, and the cheap electronic compass that goes fifteen degrees wrong the moment you bank: same physics, the northerly turning error.
Bank the glider, watch the compass lie.
Set 15° of bank on a northerly heading and the red needle walks off by nearly thirty degrees — then level the wings and it snaps back. The field never moved; the sensor's idea of horizontal did. Note the zero crossings: on east and west the tilt error vanishes, which is why the old swinging-compass rules were written per quadrant.
Tilt compensation, or why the AHRS is invited.
The cure is to measure the field in all three axes and stop pretending the sensor is level. A 3-axis magnetometer plus the attitude from an AHRS lets the firmware mathematically rotate the measured field vector back to the true horizontal before computing the heading — the vertical component is put back where it belongs, and the turning error cancels to the accuracy of the attitude itself.
That last clause is the honest limit: tilt compensation is only as good as the attitude source, so the errors that remain live exactly where an AHRS struggles — sustained accelerations, long steep turns. A magnetometer without an attitude source is a fair-weather instrument; fused with one, it becomes the quiet reference that lets a flight computer print the wind in seconds instead of circles.
Installation: the compass hates your radio.
The remaining enemies are on board. Hard iron — anything permanently magnetized: speaker magnets, magnetized steel fittings, the trim servo — adds a fixed offset vector that swings the deviation once per full circle. Soft iron — plain ferromagnetic material that bends the field without carrying its own — distorts the circle into an ellipse, twice per revolution. And direct current makes its own field: a wire carrying the transmit current of a radio is a temporary hard-iron source whose strength falls off with distance.
The cures are unglamorous: distance first — half a metre from speakers, current-carrying looms and the rudder pedals' steel; twisted supply pairs so the fields cancel; and then the calibration turn, which measures whatever contamination remains and models it out. Repeat the calibration after any panel change, and be suspicious of a heading that changes when you transmit.
In your cockpit.
If your system has a magnetometer, calibrate it where it flies — installed in the airframe, away from the hangar's steel, with the avionics powered and the engine running if you have one. The instrument's calibration page will report the fit quality; a poor number is an installation report, not a sensor defect. And if the wind estimate seems to change every time you key the microphone, you now know exactly which wire to move.
The attitude source that holds this whole construction level has its own article: how an AHRS knows which way is up.
A 3-axis magnetometer fused with the AHRS attitude and calibrated in place — heading that survives the turn.
A heading tape that stays honest in the turn, from the same sensor block as attitude and airspeed.
One compensated heading feeding the wind computation, the map and every tape on the bus.