Adding a new board rotation

I just assembled a new multirotor that mounts the flight controller at 90 roll and 270 yaw which is not one of the options in qgroundcontrol. I made the orientation by adding a 35th orientation to rotation.cpp and rotation.h and manually entering 35 to the board orientation in parameters. The accel x, y, and z now read correctly in the analyze widget but I cannot do the accel calibration in qgroundcontrol without choosing a know board rotation. Is there something I can easily do to make the new rotation known? Otherwise is there a reason just changing one of the orientations I will never use to the values I want in rotation.cpp and rotation.h will fail elsewhere.

I was wondering if some existing rotation would end up in the same orientation that you need but couldn’t find it immediately.

You can workaround the limitation in QGC by setting the param SENS_BOARD_ROT manually.

So the manual entry is just selecting from a list of transformations and not like these bits are yaw and these are pitch.

100 is reserved for custom orientations, but your rotation is enumerated as 37 already.

https://mavlink.io/en/messages/common.html#MAV_SENSOR_ORIENTATION

Just in case, these are body rotations, not ground rotations, so this would be a final orientation of nose up, starboard forward. If you actually want nose left, port up that’s 33: roll 90 pitch 270.

I don’t personally know of any problem with redefining an existing rotation, but you you might also be able to calibrate with another GCS like Tower, Mission Planner, or APM Planner 2 that doesn’t ask you to overwrite the orientation, or through the nsh shell. Could also modify QGC to remove the check, allow skipping it, or offer manual entry.

I stole the 90 roll 135 yaw and changed the values for my board arrangement. The vehicle flies properly in all three modes now.