Level Horizon Reversed

I am using a Pixhawk 4 on a fixed-wing airframe but we are having issues correcting the Level Horizon shown in QGC. During flight, we were able to control it manually by swapping the aileron controls from the RC transmitter but when we switched to other flight modes the plane flipped completely upside down. In ‘Flight View’ on QGC I can see that the artificial level horizon reading is inverted in the roll dimension (I should mention that in pitch it is still correct).

I have already tried recalibrated and rebooting the plane and enabling the PWM_AUX_REV1 parameters but none had an impact.

How can I correct the level horizon reading of the PixHawk 4?

Hi Sam. Can you check your orientation settings? The calibrations are only intended to compensate for small deviations.

https://docs.px4.io/v1.9.0/en/config/flight_controller_orientation.html

Are you sure it’s reversed on the artificial horizon? People are often confused by those because it is supposed to tilt in the opposite direction as the aircraft (because it’s the HORIZON, not the aircraft. When you bank right the horizon appears to tilt left)

Also, if your plane flips upside down but then flies fine like that it means that you’ve got your aileron direction reversed in stabilize/auto mode. That should have been checked on the ground before you flew!