> For the complete documentation index, see [llms.txt](https://agamrobotics.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://agamrobotics.gitbook.io/docs/autopilots-flight-controller/quickstart/in-field-compass-calibration.md).

# In-Field Compass calibration

### First time Compass Calibration: <a href="#partial-quick-calibration" id="partial-quick-calibration"></a>

* Refer [Compass Calibration](https://docs.px4.io/main/en/config/compass.html#compass-calibration) under PX4 documentation.

{% hint style="info" %}
Choose a location away from large metal objects or magnetic fields. Metal objects are not always obvious!

Avoid calibrating on top of workspace, near computers or next to a vehicle.&#x20;
{% endhint %}

### Partial "Quick" Calibration[​](https://docs.px4.io/main/en/config/compass.html#partial-quick-calibration) <a href="#partial-quick-calibration" id="partial-quick-calibration"></a>

This calibration is similar to the well-known figure-8 compass calibration done on a smartphone:

1. Hold the vehicle in front of you and randomly perform partial rotations on all its axes. 2-3 oscillations of \~30 degrees in every direction is usually sufficient.
2. Wait for the heading estimate to stabilize and verify that the compass rose is pointing to the correct direction (this can take a couple of seconds).

## Note:

* There is no start/stop for this type of calibration (the algorithm runs continuously when the vehicle is disarmed).
* The calibration is immediately applied to the data (no reboot is required) but is saved to the calibration parameters after disarming the vehicle only (the calibration is lost if no arming/disarming sequence is performed between calibration and shutdown).
* The amplitude and the speed of the partial rotations done in step 1 can affect the calibration quality. Following the advice above is usually enough.


---

# 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, and the optional `goal` query parameter:

```
GET https://agamrobotics.gitbook.io/docs/autopilots-flight-controller/quickstart/in-field-compass-calibration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
