ahrs_orientation

My pixhawk is rotated 90 degrees to the right of the forwards direction on my quad. I tried setting AHRS_ORIENTATION to 6 (a rotation of 270 degrees). I set this, rebooted, recalibrated accelerometer, and then the pitch feedback I see on the Mission Planner GUI is inverted. I tilt the quad forwards (downwards), it displays an upwards tilt.

I tried also with AHRS_ORIENTATION set to 2 (a rotation of 90 degrees). Similar as initially except now the roll is inverted. Any ideas what I’m doing wrong?

You should be using 2 i.e. 90 degress if its rotated to the right 90 degrees.
Are you using an external 3DR GPS/Compass? You need to set the orientation of that as well. Note it is relative to the pixhawk. In other words if your pixhawk and external gps/compass are oriented the same way in your setup then AHRS_ORIENTATION is 2 and COMPASS_ORIENT is 0. If your pixhawk is rotated but your compass is pointing straight ahead on the quad then AHRS_ORIENTATION will still be 2 as you pixhawk hasn’t moved but COMPASS_ORIENT will be 6 because it is rotated 270 degress compared to the pixhawk.
Hope that helps.

Thanks, Grant.