“Learn how to make a compass by accurately estimating the heading angle from the MPU9250 magnetometer.
The MPU9250 is a compact and versatile motion tracking device that combines a 3-axis accelerometer, 3-axis gyroscope, and 3-axis magnetometer into a single package. Its on board magnetometer can be used to estimate the “heading” angle. Heading angle, also known as azimuth, refers to the direction in which an object or person is pointing or facing, relative to a reference direction, typically north. It is usually measured in degrees, with 0 degrees indicating a direction pointing towards true north, and 90 degrees, 180 degrees, and 270 degrees indicating east, south, and west, respectively. The heading angle or azimuth can be determined using readings from a magnetometer with other calibration techniques to accurately estimate which way the north pole is. This can be useful for navigation purposes. We will be showing how to get such a value in this tutorial, which can be translated to a direction (North, South, East, West, etc).”