Electronic magnetic compass is a kind of navigation device through measure ambient magnetic field strength and vector acceleration to determine direction, has the advantages of convenient use, small occupied space, low manufacturing cost, simple structure, low power consumption, etc, is often used in navigation, aerospace, aviation, space probe, vehicle positioning and intelligent equipment of navigation and positioning etc, has broad application prospects. Today the smart phone is used widely, magnetic sensors and acceleration sensors have been integrated in the smart devices, therefore, one of the effective ways to improve the accuracy of the electronic compass is optimizing its algorithm. In this paper, the heading azimuth angle algorithm with tilt compensation function for the three-dimensional electronic compass is proposed, electronic compass is fitting algorithm and error model is established,and the related analysis and calculation, the final design of a 3D electronic compass Android application, and the use of intelligent equipment in the magnetoresistive sensor and accelerometer data for heading azimuth angle calculation.Firstly, this paper describes the research background, through a lot of literature, the significance of the research on electronic compass are introduced, the current magnetic sensing technology at home and abroad development situation is analyzed, and the measurement principle of the magnetoresistive sensor is analyzed; secondly, detailed introduced the characteristics of geomagnetic field, according to the working principle of the relevant characteristics of the geomagnetic field and three-dimensional electronic magnetic compass, principle of magnetic heading measurement azimuth angle are analyzed, and establishes a mathematical model of the geomagnetic angle, and the design of the 3D magnetic electronic compass heading azimuth angle of angle compensation algorithm; then,electronic magnetic compass error during installation, manufacturing error, carrier magnetic field error were analyzed, the corresponding error compensation model is established,twelve-position calibrating method without north, based on least squares ellipse fitting algorithm and ellipse fitting algorithm three compensation algorithm is proposed; finally, the related electronic components in smart devices are introduced, and design of the electronic compass Android program, the output value of measurement error were compensated, and the results were analyzed.Through the comprehensive test of the program. The results show that the design of three-dimensional electronic compass Android application can realize the dynamic measurement of heading azimuth angle, under the existence of angle device has the obvious compensation effect. It has a broad application prospect. |