Skip to Main Content
Magnetic compass is widely used to indicate the heading of vehicle by measuring the Earth's magnetic field. However, it suffers from local magnetic interferences; thus, the calibration of the magnetic compass is very essential before it is used. The traditional calibration methods require reference information and special requirements such as keeping the magnetic compass level during calibration, which is very difficult to manage outdoor. This paper presents an efficient method for calibrating the magnetic compass without the aforementioned traditional requirements. This method is based on the fact that the error model of magnetic compass is an ellipsoid, and a constraint least-square method is adopted to estimate the parameters of an ellipsoid by rotating the magnetic compass in various (random) orientations. This method can estimate all the parameters of the error model and compensate errors caused by sensor defects, hard-iron interferences, and soft-iron interferences. Although the calibration parameters are relative values, it does not have any influence on the heading calculated. The experimental results show that this method is effective in calibrating the magnetic compass, and the heading precision of the magnetic compass acquired after calibration is better than 0.4°.