Abstract—In recent years, the micro-electro-mechanical systems
(MEMS)-based inertial sensors fabrication technology became
matured. The technology created inertial sensors greatly
enhance the stability, miniature the size, and reduce the cost
Therefore, smartphones or mobile phones are embed many
kinds of sensors. These sensors can provide many useful data,
enabling new applications in various domain such as pedestrian
navigation system, fall detection, and activity recognition. In
this paper, we focus on the MEMS-based magnetometer, which
can detect earth’s magnetic field and guide directions. However,
magnetometer is susceptible to interference resulted from ferrous
material. This study presents the implementation of magnetometer’s
measurements on Android-based platform, observes the
interference phenomenon by realistic measurements, and uses
the compensation algorithms to calibrate.