Kakute H7 - weird external compass orientation

Hello! I have a small 5in drone, running Kakute H7 1.3 with PX4 v1.13.2.
I connected an external GPS with magnetometer - Holybro M8N.

I have aligned the arrow on the GPS and on Kakute, they both point forwards.
I have calibrated all the sensors, and I got unusable Position control mode, with lots of whirpooling etc.

So I did a little bit of investigation, and it seems that with the default rotation parameters: ACC_ROT and GYRO_ROT are Internal, MAG0_ROT is no_rotation, the compass is very much misaligned.

I did some testing and comparisons with working compass on my phone, and I figured that if I set CAL_MAG0_ROT to: Pitch 180°, Yaw 270°, the compass is aligned, I can fly in Position mode normally with no issues or whirpooling.

Why is that? I use the same M8N with other drones running Pixhawk 6C/6X with the same FW version, and none have this issue.

2 Likes

Thanks for the post.
We don’t have any clear answer, but we encountered the same problem with the Kakute H7 v1.3, PX4 1.14.3, and the Holybro M10 Micro GPS (with the IST8310 magnetometer).

Both the flight controller and GPS sensor were aligned, but the heading was unstable(and wrong).

Setting CAL_MAG0_ROT to Pitch 180° and Yaw 270° solved the problem.