Abstract
This paper presents an efficient algorithm for using the two-axis magnetic compass in portable devices. The general magnetic compass module consists of a three-axis magnetic compass and a two-axis inclinometer to calculate tilt-compensated azimuth information. In this paper, the tilt error is compensated using just a two-axis magnetic compass and two-axis accelerometer. The third-axis data of the magnetic compass is estimated using coordinate information that includes the extended dip angle and tilt information. The extended dip angle is estimated during the normalization process. This algorithm can be used to provide the tilt-compensated heading information to small portable devices such as navigation systems, PDAs, cell phones, and so on.