Connecting a RM3100 magnetometer to Pixhawk cube

Your rm3100 is already set as primary compass…, in MP in compass parameter just unselected the second and third compass.

I have done that, and also turned off the compasses in Compass_typemask parameter. Still when I turn the autopilot alone the heading turns.
Also the heading is 25 degrees wrong and I have tried all compass orientations.

This will happen with no compass enabled from the Z-axis Gyro.

But, compass is enabled. why is it using the Z-axis Gyro?
I still dont believe that the internal compasses are disabled.

I went for a test run last week and the compass worked really well, however, I needed to turn the compass and autopilot system 180 degrees around for it to go towards the waypoint (It was going 180 degrees away from the waypoint). Why did it do that? Can it be the compass calibration or something else?

I was replying to this situation you cited. With no compass present the heading will still turn in the HUD from the Z-axis Gyro. Many that don’t understand this believe there is a compass active.

I see. It should not use the Z-axis Gyro as I have only enabled the RM3100 compass in the Compass_typemask parameter. If it does, then it has not recognized the RM3100 compass, and uses the Z-axis gyro. What do you think?

On power up is the HUD always showing it pointing North regardless of the orientation of the craft? If so, this is from the Gyro. If it’s pointing in another direction it’s probably from the compass.

If you have COMPASS_AUTO_ROT set to 2 (which is default) it should set the proper orientation and save it during the compass calibration. You should not have to manually set this.

No, the compass is pointing towards its direction, not north.

I will have to check, but thank you. I will give an update on how it goes.