Compass installation issue?

I’ve just installed a Matek M10Q-5883 GPS/compass module with my Matek F405 FC, and MP comes up with confusing information: The module is installed with the arrow facing forward, and what I believe to be right way up. MP’s compass calibration page shows it as an external compass with orientation Yaw 180, without any option to change that.

After I’d been through a successful compass calibration, MP indicated by both the compass and the map overlay on the Data page that the model was facing south when in fact it was facing north. I then did a ‘Large Vehicle MagCal’ and MP then showed it facing the correct way.

I note that COMPASS_AUTO_ROT is set to 2 by default, which says it should automatically check and fix the orientation. Should I change that to 0, physically turn the GPS unit round so that the arrow is facing backwards, or do something else?

Edit: I’ve also just noticed that COMPASS_ORIENT was set to 4. Setting it to 0 and rebooting, then doing a full compass calibration gives the same result as before.

Is the FC Board Orientation (parameter: AHRS_ORIENTATION) correct ?

Rolf

The FC board is laying flat, right side up, with the arrow facing forward, and AHRS_ORIENTATION = 0. So I believe that’s as it should be. The compass is in the GPS module though – there’s none in the FC.

After posting the edit in my first post I noticed when I went back into MP to check the parameters that COMPASS_ORIENT, which I had set to 0, had reverted back to 4. How does Arduplane ‘know’ how the cimpass is installed? This particular GPS/compass module has 6-pin connectors front and back – does it make a difference which one I use, other than from the point of view of cable management. The module is mounted behind the FC, so I’m using its front connector.

On the craft where I have the module mounted with the reference arrow not pointing forward Auto Rotation during cal has worked it out. Is there a problem?

You can check the compass orientation according to the method described there:
https://ardupilot.org/plane/docs/common-compass-setup-advanced.html#orientation
I don’t know the module. The arrow may also be wrong. In any case, the linked method is absolutely correct.

Rolf

I think I’ve basically followed the instructions in your link, but I’ll run through it again before turning the GPS/compass unit round by 180 degrees.

I’ve been through the process again. This time I changed the COMPASS_AUTO_ROT value from the default 2 (Check and fix) to 0, then set the COMPASS_ORIENT to 0, and managed to achieve a decent calibration. Previously, with COMPASS_AUTO_ROT set to 2, Arduplane was automatically changing COMPASS_ORIENT to 4 whenever I did the calibration.

So I think that problem is solved now. Thanks guys.

Just to be on the safe side: did you calibrate the acceleration sensors beforehand?

Rolf

Yes, I calibrated them before installing the FC. But I didn’t calibrate level because I assume that’s meant to be the attitude the plane will be at in normal flight, which may have a slightly inclined fuselage floor.