Set Orientations

Relevant Parameters

  • SENS_BOARD_ROT : Defines the rotation of the FMU board relative to the vehicle's body frame

  • SENS_BOARD_X_OFF / SENS_BOARD_Y_OFF / SENS_BOARD_Z_OFF: roll/pitch/yaw offsets (degrees) to compensate for small misalignments of the board orientation w.r.t SENS_BOARD_ROT

  • CAL_MAGx_ROT: Defines the external magnometer rotation relative to the vehicle's body frame

Vehicle Body Frame

The definition of a body frame depends on the type of vehicle (multicopter, fixed-wing, or VTOL). In all cases, the body frame is defined with its origin at the vehicle’s center of gravity (c.g.), and we follow the right-handed Front-Right-Down (FRD) convention.

  • Multicopters and VTOLs The x-axis is defined to point perpendicular to the hover thrust vector, typically aligned with the forward direction of the vehicle in hover mode. By the FRD convention:

    • The y-axis points to the right of the x-axis

    • The z-axis points down

  • Fixed-Wings The x-axis is defined to point out of the nose of the aircraft, aligned with the nominal forward flight direction. By the FRD convention:

    • The y-axis points to the right of the x-axis

    • The z-axis points down

As we follow a right-handed convention, clockwise rotations around each axis are defined as positive. The yaw, pitch and/or roll offsets are calculated relative to the FRD orientation (clock-wise rotation around the Z, Y and X axis, respectively). The default orientation is defined as SENS_BOARD_ROT = ROTATION_NONE and CAL_MAGx_ROT = ROTATION_NONE.

Setting Orientations in AMC

By default the flight controller and any external compass(es) should be placed on the frame top-side up, oriented so that the front of the controller (often indicated by an arrow) points towards the front of the vehicle. If the controller or any external compasses are mounted in any other orientation then you will need to update this setting.

A yaw rotation of 90 degrees clockwise around the z axis (so that the controller faces along the y-axis / over the wing) is ROTATION_YAW_90. A roll rotation of 180 degrees around the x axis (upside down) and yaw 90 degrees would be ROTATION_ROLL_180_YAW_90. These, and many other roll, yaw and pitch combinations may be selected.

To set orientations:

  1. Select the Vehicle Overview > Sensors > Set Orientations in the left sidebar.

  1. At this point a Menu on the right-hand side should appear. Set the orientation for both, "Autopilot orientation" and the "External Compass 1" by choosing the appropriate options from the dropdown menu.

  2. Press OK to finish.

Fine-Tuning the Board Orientation:

The "Autopilot orientation" in step 2 sets the SENS_BOARD_ROT parameter. To fine-tune any small misalignments in roll, pitch and/or yaw, you can set:

  • SENS_BOARD_X_OFF : for any roll offset w.r.t SENS_BOARD_ROT

  • SENS_BOARD_Y_OFF : for any pitch offset w.r.t SENS_BOARD_ROT

  • SENS_BOARD_Z_OFF : for any yaw offset w.r.t SENS_BOARD_ROT

For example, if SENS_BOARD_ROT is set to ROTATION_YAW_90, but the true orientation is 82 degree CW rotation about the Z axis, you can set SENS_BOARD_Z_OFF to -8.

Your Skynode should be placed as close to the vehicle's CG as the design permits. To fine-tune any small translations w.r.t the vehicle CG, you can set:

  • EKF2_IMU_POS_X : for any offset in x-direction (forward)

  • EKF2_IMU_POS_Y : for any offset in y-direction (right)

  • EKF2_IMU_POS_Z : for any offzet in z-direction (down)

All in the vehicle's body frame.

Last updated