Understanding sensor orientations

#1

I am working on building a multirotor where I am being forced to mount the electronics at some odd angles, and have a few questions. Basically I have to mount the FC at a 15 degree “nose up” angle.

I found the correct SENS_BOARD_ROT for my build. I then set SENS_BOARD_Y_OFF to 15 degrees to get me where I want to be for the FC.

The code seems to indicate that external mag rotation is relative to the airframe and NOT the FC. Is there an equivalent to SENS_BOARD_Y_OFF I can apply to the external mag? Or do I need to define a new rotation in rotation.h? Or is it really relative to the FC like ardupilot is.

What is the rotation order and axis definition for the various orientation values? For example ROLL_90_YAW_90. Is this a 90 degrees roll about the X axis of the vehicle and FC (they should be considered inline before any rotation is applied, right?)? Is the yaw rotation then about the original FC Z axis, or the vehicle Z axis?

Is there an easy way to visualise sensor output so that I can ensure orthogonality between sensors?