Hardware connection
Use a CAN cable to connect the RM3100 compass to the CAN interface of the OneRTK UM982, or directly connect it to any CAN interface of the flight controller.
Enable the compass.
Analysis of MissionPlanner Compass Settings
A: The magnetometer information column. For the OneCompass RM3100, the BUS type is UAVCAN, Externa (external).
B: You can adjust the compass sorting by clicking the up and down arrows. The first one in the sorting has the highest priority.
C: Select which magnetometers need to participate in the calibration (if not checked, they will not be used or participate in the calibration).
D: When the compass sorting has been adjusted, you need to click "Reboot" to restart the controller.
E: Click to start the compass calibration.

Compass calibration
Click the 【start】 button to start the calibration.
Rotate the aircraft in figure-eight patterns in multiple directions until the calibration is completed.
As shown in the figure below, the system will prompt that the calibration is completed.

Compass calibration requires the flight controller and the compass to be installed on the aircraft. Do not move them after the calibration is completed. For large aircraft, calibration can be carried out without installing the wings or fuselage arms, but the compass should be kept away from the wings or fuselage arms.
PX4 User Documentation
Open the QGroundControl ground station -> Vehicle setup -> Parameters interface and enter "UAVCAN" to set the following parameters:
UAVCAN_ENABLE = Sensors Automatic Config
UAVCAN_SUB_MAG = Enabled
Compass calibration
Enter the "Sensors>compass" interface. The image indicates calibration.

For compass calibration, the flight controller and the compass need to be installed on the aircraft. Do not move them after the calibration is completed. For large aircraft, calibration can be carried out without installing the wings or fuselage arms, but the compass should be kept away from the wings or fuselage arms.