Freescale Semiconductor Application Note Document Number: AN4248 Rev. 4.0, 11/2015 © 2013, 2015 Freescale Semiconductor, Inc. All rights reserved. 1 Introduction This technical note provides the mathematics, reference source code and guidance for engineers implementing a tilt-compensated electronic compass (eCompass). The eCompass uses a three-axis accelerometer and three- axis magnetometer. The a