External MAG physical Offset

Is there a way to enter a external MAG physical position offset relative to the on board IMU? I have a unique application where the external MAG is not on the same plane as the on board IMU.

You can set the external mag orientation, but only in steps of 90 deg. You can’t set the mag position relative to the IMU, but why would it matter?

From looking at the EKF (correct me if I’m wrong) the yaw solution also takes into account vehicle attitude. I did some testing and found that if the external mag is not on the same plane as the gyro/accel (0 pitch, 0 roll) when calibrated then you get bad yaw solutions during flight. I was able to make a mount for the external mag to be on the same plane (0 pitch, 0 roll) as the IMU and the yaw solution was near perfect.

Yes you are completely right that the external mag orientation relative to the IMU is important. I am glad it helped to correct for the tilt error :slight_smile: You wrote above “physical position offset” so I thought you were talking about the distance from the IMU to the mag, which should not have any effect. Here is the documentation for the filter if you haven’t seen it yet :slight_smile: