COMPASS2_ORIENT 6=Yaw270

I have a GPS/compass unit (mRo as it happens) that I installed with a 90-degree CCW rotation. Am I correct setting COMPASS2_ORIENT to 6=Yaw270? The offset is to try to get the magnetometer a little farther away from the battery cables.

Don’t bother setting it manually. If COMPASS_AUTO_ROT is set to 2, which is default, It will learn and save the orientation after compass calibration.

Thanks, @dkemxr. I tried that, and I get headings that are 90 degrees off.

So I tried setting the orientation manually, but none of the values I tried seem to change the 90 degree offset. I must be missing something very simple.

Well, you have 2 threads going now. End one.

They are separate issues that came up from the same task. You answered my question about the MP UI in the other thread; it looks like a bug in the UX.

Separately from my UI confusion, I’m still trying to configure the compass.

OK. If you set the orientation back to 0 and then perform a compass calibration with COMPASS_AUTO_ROT set to 2 what is the orientation set to after cal?

Calibration sets it to 10=Roll180Yaw90

This is a plausible orientation. The magnetometer chip is on the bottom of the board, so Roll180 makes sense, and then the yaw rotation would be 90 instead of 270.

But the compass reads North when the aircraft is facing West.

The FC is a Pixhawk 4 Mini. It has its own internal compass. If I enable just the internal compass or both, I get correct readings. But if I disable the internal one, I get the off-by-90-degrees error.

The FW version is plane 4.0.6

Auto rotation has worked for me before so I looked at the parameters from one of my planes where the Module was facing backwards. This module also has the magnetometer on the bottom, as almost all do, and the orientation was just Yaw180 So just 90 or 270, not sure which, may work for you. Disable the internal one while figuring it out.

Like I said, I tried different orientations and none seem to change the reported heading. I even tried Roll90 and Pitch90, with the same result. I physically unplug the battery after each of the changes.

Something odd about your compass screen. Both show up as I2C. What does your HW ID screen look like?

Here it is. What’s unusual about I2C magnetometers?

The flight controller is a Holybro Pixhawk 4 Mini. The external GPS/Compass is an mRo.

Nothing at all for external magnetometers. Internal magnetometers, on the IMU, are typically on the same SPI bus as the IMU.

Unless I hear otherwise, it sound like I need to file a bug.

Dont know if it helpes, I’m 100% sure my 1th compass is a I2C ( Holybro Pix32 GPS Module NEO-M8N ) and always has Yaw 270. Prio 2 is a pixhawk internal in my case.

I guess it got lost in the other thread. Here’s mine: