A guide for developing a digital compass application on Android. Accelerometer and magnetometer sensor data will be fused to obtain a tilt compensated heading. Moreover, a low-pass filter is used to obtain smoother sensor data, and magnetic declination is calculated to obtain true heading.