What I did so far is added new orientation to
sensor_params.c. And now as I'm selecting my new custom orientation number for
SENS_BOARD_ROT parameter I'm seeing HUD shows irrelevant orientation. Also plane position during calibration is shown incorrect.
In order to nail down the problem I'm just copied the code from
ROTATION_ROLL_270_YAW_270 to my newly created orientation. And still see some irrelevant orientation which is nether orthogonal to ground fixed frame.
I tested the same in
sitl_gazebo. Modified orientation of IMU to be consistent with
ROTATION_ROLL_270_YAW_270, ensured proper HUD readings. Then as I change
SENS_BOARD_ROT to my custom number (which uses the same exactly code copy pasted from
ROTATION_ROLL_270_YAW_270) I starting seeing HUD drifts to some irrelevant position.
Any hints? What have I missed?