I have my Pixhawk mounted transversely pointing to the right. My external compass is mounted pointing straight ahead to the front of the aircraft.
The instructions, both in Advanced Compass Setup and also in Mission Planner | Full Parameters say clearly that the compass orientation should be set with respect to the autopilot board. So I set AHRS_ORIENTATION = 2 (Yaw90) and COMPASS_ORIENT = 6 (Yaw270). I did a calibration which worked ok.
But the compass heading of the aircraft on the Flight Data screen was off by 90 degrees. It indicated South when the aircraft was pointing East.
So I redid the calibration this time with COMPASS_ORIENT _ 0 (None). Again it calibrated ok, and now the compass reading in the Flight Data screen is correct.
Question: Has something changed in Plane 1.3.37? Are the instructions now incorrect? I note a post from bisenberger (May '16) who also thought there was a yaw issue.
Having the exact same issue here. Pixhawk mounted in reverse, AHRS_ORIENTATION=4, and COMPASS_ORIENT=4 to match as the compass/GPS is pointed forward. Heading always drifts to about 90 degrees off, and compass variance and EKF warnings when maneuvering the aircraft by hand. The AHRS orientation seems right because the pitch and roll of the plane seems accurate. Compass orientation seems right because mag_z reads positive and mag_x increases with forward pitch and mag_y increases with right roll (USA, northern hemisphere). But I’ve tried all compass orientations and can’t find one that works for accurate heading. COMPASS_ORIENT=4 seems to work “best” in terms of fewer compass variance and EKF errors, but still off by about 90 degrees.
About to load an old firmware and see if I can find a workaround.
I eventually found the cause of mine. The Pixhawk kit I bought apparently had an improper marking for the external compass orientation. Through a more thorough assessment of the compass readings, I found that the rotation was 45 degrees off from what was marked on the case. Sometimes you just have to get methodical about tracking things down.