# Set Orientations

## Relevant Parameters

* `SENS_BOARD_ROT` : Defines the rotation of the FMU board relative to the [vehicle's body frame](#coordinate-systems)
* `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 \\

<div align="left"><figure><img src="/files/bP1f0DI9EWNrFPWldzKv" alt="" width="563"><figcaption></figcaption></figure></div>

* **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

![](/files/zEmvxPzhTy2p5Dnvne14)

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

{% hint style="warning" %}
After changing the orientation you will need to reboot the vehicle to apply the changes.
{% endhint %}

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.

<figure><img src="/files/6OfCDFgMpg7AxhH5QK7a" alt=""><figcaption></figcaption></figure>

2. 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.
3. 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`

{% hint style="info" %}
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`.
{% endhint %}

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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.auterion.com/hardware-integration/hardware-integration/sensors-setup/set-orientations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
