An Implementation of a Tilt-Compensated eCompass

  • Martin SyselEmail author
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 466)


This paper describes implementation of an electronic compass and calibration method. Firstly describes used hardware and then focus on the method of sensor calibration parameters. The eCompass uses a three-axis accelerometer and three-axis magnetometer. The compass heading is a function of all three accelerometer readings and all three magnetometer readings. The accelerometer measures the components of the earth gravity and provide pitch and roll angle information which is used to correct the magnetometer data. The magnetometer measures the components of earth’s magnetic field (called geomagnetic field) to determine the heading angle to the magnetic north.


eCompass MEMS Accelerometer Magnetometer Calibration 


  1. 1.
    Scouts New Zealand, Compass Basics, New Zealand (2012)Google Scholar
  2. 2.
    NOAA, Wandering of the Geomagnetic poles, National Oceanic And Atmospheric Administration.
  3. 3.
    STMicroelectronics, AN3192 Application note: using LSM303DLH for a tilt compensated electronic compass, 34p. (2010).
  4. 4.
    Ozyagcilar, T.: AN4248 Application note: Implementing a Tilt-Compensated eCompass using Accelerometer and Magnetometer Sensors (2013).
  5. 5.
    Ganssle, J.: A Designer’s Guide to MEMS Sensors (2012).
  6. 6.
    Cacchione, F.: Mechanical Characterisation and simulation of fracture processes in polysilicon MEMS, PhD Thesis. Politecnicio di Milano (2007).
  7. 7.
    Pedley, M.: AN3461 Application note: Tilt Sensing Using a Three-Axis Accelerometer (2013).
  8. 8.
    Stančin, S., Tomažič, S.: Time-and computation-efficient calibration of MEMS 3D accelerometers and gyroscopes. Sensors 14.8, 14885–14915 (2014). Scholar
  9. 9.
    Fang, B., Chou, W., Ding, L.: An optimal calibration method for a MEMS inertial measurement unit. Int. J. Adv. Robot. Syst. 11.14, 57516 (2014). Scholar
  10. 10.
    Pedley, M.: AN4399 Application note: High Precision Calibration of a Three-Axis Accelerometer (2013).
  11. 11.
    Skula, D.: New Method for Magnetometer Offset Compensation, Annals of DAAAM for 2010 and proceedings, Zadar (2010) ISBN 978-3-901509-73-5Google Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Open Access This chapter is licensed under the terms of the Creative Commons Attribution-NonCommercial 2.5 International License (, which permits any noncommercial use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

Authors and Affiliations

  1. 1.Faculty of Applied InformaticsTomas Bata University in ZlínZlínCzech Republic

Personalised recommendations