Fine tune magnetometer
Cyclops performance may benefit from an extended magnetometer calibration if there are issues with heading. Please use this guide to run the extended calibration.
Step 1: Standard compass calibration
First, calibrate the compass using the standard calibration tool in Mission Planner or QGC. This will create a baseline calibration that our software will use for the extended calibration.
Step 2: Compass extrinsics
After standard calibration, reboot the flight controller. Then connect to your Cyclops device over Ethernet via SSH.
ssh pi@192.168.218.100Run the following two commands to start the extended mag cal tool.
source /opt/vns-sdk/venv/bin/activate
python3 /lib/vns-sdk/scripts/calibrate_compass_extrinsics.pyThe script will prompt you to slowly rotate your airframe two times while connected, first with the wings level, and then with the nose down. This will output three values for your compass' custom rotation.
Once you have these values, connect to your flight controller and set the following ArduPilot params:
CUST_ROT_ENABLE
1
Enables custom rotations
COMPASS_ORIENT
101
Applies custom rotation values to Compass 1
CUST_ROT1_PITCH
(value from script)
Custom pitch value
CUST_ROT1_ROLL
(value from script)
Custom roll value
CUST_ROT1_YAW
(value from script)
Custom yaw value
Step 3: Final compass calibration
After these parameters are set, run a final compass calibration using the same standard calibration tool as in Step 1. This will use the new compass extrinsics to do a more refined calibration. Reboot the flight controller when finished.
Your compass is precisely calibrated with custom rotation values.
Last updated
