How to Install and Configure the Compass for ArduPilot
1. Principles
1. Compass Function
The compass (magnetic compass) is a sensor that measures heading, capable of detecting magnetic direction and providing heading information to the flight controller. In a combined navigation system, heading is one of the core data of the aircraft's attitude, affecting functions such as automatic cruise, Return to Launch (RTL), and Loiter.
2. Why Calibration is Needed?
The compass is susceptible to interference from surrounding magnetic fields, such as motors, ESCs, metal parts, receivers, servo wires, etc. If not calibrated or calibrated improperly, it may lead to the following issues:
- Abnormal aircraft heading data, affecting navigation accuracy;
- Aircraft drift, making it difficult to distinguish direction;
- Automatic flight mode failure, such as the RTL mode potentially calculating the wrong return direction;
- In severe cases, it may lead to a crash.
2. Equipment Preparation
1) Flight Controller: Any of the SpeedyBee F405 WING APP / SpeedyBee F405 WING MINI / CoreWing F405 WING V2 flight controllers are applicable to this tutorial.
2) Compass: Beizheng BZ-251.
3) Connection Cable: 6-Pin Cable
4) Installation Tool: 3M Tape
5) Computer/Phone: Used to configure the ground station.
6) MissionPlanner Ground Station
3. Specific Operations
※When in use, please install with the antenna facing up
1. Compass Installation
Step 1: Select Installation Location
1) Selection of Installation Location: The compass should be installed near the flight controller board but avoid placing it together with devices that generate strong magnetic fields, such as motors, ESCs, batteries, etc.
2) Ideal Installation Location: An area without strong current or metal interference around the flight controller can be chosen for installation in the empty space next to the flight controller board.
3) Ensure Stable Installation: Use double-sided tape to secure the compass to ensure it is firmly installed and avoid the impact of vibration during flight.
Step 2: Connect the Compass
Insert the BZ-251 into the flight controller's GPS port.

2. Compass Calibration
Enter the MissionPlanner ground station and open the initial setup interface:
- Enter Initial Setup.
- Click on Compass.
- Check if module-related information is displayed; if not, please check the connection cable and module.
- Check Use Compass 1.
- Click Start to begin compass calibration.
- Shake the aircraft to fill the progress bar.
- Click OK after the popup appears.
- Click Reboot; the flight controller will restart automatically.
Important
Stay away from metal objects during calibration, such as cars, electric vehicles, and high-voltage transmission towers;
Calibrate outdoors when GPS signal is good (at least 8 satellites);
Try to use wireless tuning during calibration to avoid USB cable interference;
If the GPS/compass module is replaced or the flight controller installation position is adjusted, calibration must be performed again.


4. Q&A
Q: If the ground station reports an error "Check mag field", how to solve it?
A: Adjust the compass position and recalibrate the compass.
Q: If the progress bar keeps repeating, how to solve it?
A: Adjust the compass position (away from motors, magnets, and other magnetic devices), stay away from nearby metal devices (vehicles, etc.), and recalibrate the compass.
Technical Support QR Code
