> For the complete documentation index, see [llms.txt](https://docs.ceruleansonar.com/c/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ceruleansonar.com/c/rov-locator/inertial-measurement-unit-imu/mk-ii-imu-modes-and-calibration.md).

# Mk II IMU Modes and Calibration

The Mk II IMU can operate in one of two modes: Nine-degree-of-freedom (NDOF) and Compass. The difference between the two is additional sensory input in NDOF mode, where the IMU's gyros are fused with both magnetometers and accelerometers to reduce jitter and increase magnetic transient immunity. In Compass mode, the gyros are ignored. In both modes, the accelerometers are used to find the gravity vector in order to project the magnetic field onto local level.

NDOF mode is best in typical magnetic environments where the magnetic field is usually not disturbed. The gyros allow the Mk II IMU to ignore transient magnetic anomalies such as driving under a steel bridge. However, if you were to park under a steel bridge in NDOF mode, eventually the IMU will decide the distorted magnetic field is really the normal field, and the estimate of north will drift to match the distortion. When exiting the bridge, the estimate of north will remain incorrect for some time, until the Mk II IMU recognizes the undistorted field as normal and the estimate of north drifts back to the expected angle.&#x20;

In compass mode, the Mk II IMU estimate of north directly tracks the magnetic field. Driving under the steel bridge will cause the estimate of north to shift, but as soon as the system exits the bridge the north estimate will return to normal.

In some cases, variations or nearby electrical currents or vibrations of certain frequencies applied to the Mk II IMU (e.g., via the receiver mounting) can confuse the gyros and cause the estimate of north to drift.&#x20;

NDOF is the default mode, and is usually more linear than Compass mode and should be used if possible. Compass mode should typically be used if there is unexpected heading drift when in NDOF mode.

See [T Command ](/c/rov-locator/communicating-with-the-rovl/messages-from-host-to-rovl/valid-commands-from-host-to-rovl.md)for how to set the Mk II IMU mode.

Whichever mode is used, the IMU needs calibrations as described in the following sections.


---

# 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://docs.ceruleansonar.com/c/rov-locator/inertial-measurement-unit-imu/mk-ii-imu-modes-and-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.
