We demonstrate how to measure in-situ for heading errors of optically pumped
magnetometers in geomagnetic fields. For this, we implement microwave-driven
Rabi oscillations and Ramsey interferometry on hyperfine transitions as two
independent methods to detect scalar systematics of free induction decay (FID)
signals. We showcase the wide applicability of this technique by operating in
the challenging parameter regime of compact vapor cells with imperfect pumping
and high buffer gas pressure. In this system, we achieve suppression of large
inaccuracies arising from nonlinear Zeeman (NLZ) shifts by up to a factor of 10
to levels below 0.6 nT. In the Ramsey method we accomplish this, even in
arbitrary magnetic field directions, by employing a hyper-Ramsey protocol and
optical pumping with adiabatic power ramps. For the Rabi technique, this level
of accuracy is reached, despite associated drive-dependent shifts, by
referencing Rabi frequency measurements to a complete atom-microwave coupling
model that incorporates the microwave polarization structure.Comment: 6 pages, 4 figures + supplementary 16 pages, 10 figure