> For the complete documentation index, see [llms.txt](https://spaceandtech-engineerings.gitbook.io/space-and-tech-engineerings-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://spaceandtech-engineerings.gitbook.io/space-and-tech-engineerings-docs/flight-controller/aazmuth/basic-configuration-and-calibration/compass-calibration.md).

# Compass Calibration

This article explains how to perform basic compass calibration. It assumes that you have at least one compass, either internally or externally in the system, and it has been enabled.

{% hint style="warning" %} <mark style="color:red;">**Warning**</mark>

It is important that when compass calibration is done, the vehicle have a good 3D gps lock, in order to assure the best setup. If necessary, move outdoors in order to get a good 3D gps lock before doing the compass calibration.
{% endhint %}

{% hint style="info" %}
**Note**

Compass calibration cannot be performed while vehicle is armed.
{% endhint %}

### Calibration first steps

{% hint style="warning" %} <mark style="color:red;background-color:red;">**Warning**</mark>

Do not calibrate the compasses near any metallic or magnetic field producing object (computers, cell phones, metal desks, power supplies, etc.) or incorrect calibration will occur.
{% endhint %}

* Under **SETUP| Mandatory Hardware** select **Compass**.

<figure><img src="/files/DV8ZyV8kEWsTkScKMTK8" alt=""><figcaption></figcaption></figure>

### Compass Ordering

At the top of the page, you can change the priority of the attached compasses, if desired.

### Onboard Calibration

**Onboard Calibration** is an automated calibration process that operates on Aazmuth. This approach delivers superior accuracy compared to the traditional **Offboard Calibration** (also called **Live Calibration**), which executes on the ground station. The key advantage is that Onboard Calibration automatically calculates not only offset corrections but also scaling factors and device orientation parameters, resulting in a more complete and precise calibration

{% hint style="info" %}
**Note**

Calibration could fail for the compasses integrated into the Aazmuth, if any, if the board orientation parameter is not correct.
{% endhint %}

To perform the onboard calibration of all compasses:

* If Aazmuth has a buzzer connected, it will play one initial tone followed by a short beep about once per second.​
* Hold the vehicle in the air and slowly rotate it so that each face (front, back, left, right, top, and bottom) points down toward the ground for a few seconds in sequence; this usually means about six full rotations, with extra rotations if the calibration needs to be confirmed or repeated.​
* During rotation, the green progress bars on the screen will extend further to the right until the calibration finishes.
* When calibration completes successfully, Aazmuth will emit three rising tones and a “Please reboot” message will appear; power-cycle or otherwise reboot Aazmuth before attempting to arm the vehicle.

If calibration fails:

* You may hear a failure or “unhappy” tone, the green bars may jump back to the left, and the calibration process may restart depending on the ground station; in Mission Planner, it will automatically retry, so keep rotating the vehicle as described earlier.
* If a compass refuses to calibrate, move to a different location away from magnetic interference and remove electronic devices from your pockets.
* If the compass still does not pass after several attempts, click “Cancel,” set the “Fitness” drop-down to a more relaxed option, and start the calibration again.
* If calibration continues to fail, increase the COMPASS\_OFFS\_MAX parameter from 850 up to 2000, or even 3000 if needed.
* If one particular compass still will not calibrate and the others are working correctly, disable that single compass.

### Large Vehicle MagCal

Large or heavy vehicles cannot practically be rotated on all axes. This onboard calibration feature enables accurate results when GPS lock is active on Aazmuth and the vehicle's true heading is known—either by referencing landmarks on the Mission Planner map or using a secondary compass like a cell phone to determine and input the heading.

{% hint style="warning" %} <mark style="color:red;">**Warning**</mark>

The proper orientation of the compass must also be set in order for this method to give a good result. If orientation is incorrect this procedure will appear to succeed while leaving the compass calibration in a very bad state.
{% endhint %}

{% hint style="info" %}
**Note**

The heading entered should be TRUE, not MAGNETIC. Using a phone’s compass app will usually required adding the local declination value to the reading in order to obtain the TRUE geographic heading which should be entered.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://spaceandtech-engineerings.gitbook.io/space-and-tech-engineerings-docs/flight-controller/aazmuth/basic-configuration-and-calibration/compass-calibration.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.
