Skip to content


默认的飞行器(如果具有外部罗盘)应该向上安装在机架上部,箭头朝向飞行器的前方。 如果板载或外部罗盘被安装在其他方向,您需要在固件中配置。


ROLL, PITCH and/or YAW offsets of the flight controller are calculated relative to the vehicle around the forward (x), right (y), down (z) axes.


The axes to rotate around stay the same from one rotation step to the next one. So the frame to perform the rotation in stays fixed. This is also known as extrinsic rotation.

Vehicle orientation

For example, the vehicles shown below have rotations around the z-axis (i.e. yaw only) corresponding to: ROTATION_NONE, ROTATION_YAW_90,ROTATION_YAW_180,ROTATION_YAW_270.

Yaw 旋转

For a VTOL Tailsitter airframe set the vehicle orientation according to its multirotor configuration (i.e. relative to the vehicle during, takeoff, hovering, landing) for all sensor calibrations.

The axis are normally relative to the orientation of the vehicle during steady forward flight. For more information see Basic Concepts.


To set the orientations:

  1. Start QGroundControl and connect the vehicle.

  2. Select "Q" icon > Vehicle Setup > Sensors (sidebar) to open Sensor Setup.

  3. Select the Orientations button.

    Set sensor orientations

  4. Select the AutoPilot Orientation (as calculated above).

    Orientation options

  5. Press OK.

You can use Level Horizon Calibration to compensate for small miss-alignments in controller orientation and to level the horizon in flight view.


PX4 will automatically detect the compass orientation as part of compass calibration (by default) for any of the standard MAVLink orientations (upright and facing forward, or any multiple of 45° offset in any axis) .

You can confirm that auto detection worked by looking at the CAL_MAGn_ROT parameters.

If a non-standard orientation has been used you will need to set the CAL_MAGx_ROLL, CAL_MAGx_PITCH, and CAL_MAGx_YAW parameters for each compass to the angles that were used.

This will automatically set CAL_MAGn_ROT to "custom euler angle" and prevents automatic calibration for the selected compass (even if SENS_MAG_AUTOROT is set).