> This page is for Firmware, version 3.2.
> For other versions, use one of these documentation indexes:
> - 4.0 (default): https://docs.ouster.com/sensor-docs/firmware/4.0/llms.txt
> - 3.2: https://docs.ouster.com/sensor-docs/firmware/3.2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ouster.com/sensor-docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ouster.com/sensor-docs/_mcp/server.

# IMU Data Legacy

> LEGACY udp_profile_imu packet format reference for Ouster sensors.

> **Note**
>
> The `LEGACY` IMU profile preserves the original IMU behavior from firmware versions prior to v3.2. Use `ACCEL32_GYRO32_NMEA` for new integrations.

Set `udp_profile_imu` to `LEGACY` to activate the legacy IMU packet format.

## Overview

Legacy IMU packets do not include the configurable packet header or packet footer. Each legacy IMU data block is 48 bytes and contains separate timestamps for diagnostic, accelerometer, and gyroscope readout time.

## IMU Data Block

Each `LEGACY` IMU data block contains:

* **IMU Diagnostic Time** \[64 bit unsigned int] — Timestamp of monotonic system time since boot in nanoseconds.
* **Accelerometer Read Time** \[64 bit unsigned int] — Timestamp for accelerometer time relative to `timestamp_mode` in nanoseconds.
* **Gyroscope Read Time** \[64 bit unsigned int] — Timestamp for gyroscope time relative to `timestamp_mode` in nanoseconds.
* **Acceleration in X-axis** \[32 bit float] — Acceleration in g.
* **Acceleration in Y-axis** \[32 bit float] — Acceleration in g.
* **Acceleration in Z-axis** \[32 bit float] — Acceleration in g.
* **Angular Velocity about X-axis** \[32 bit float] — Angular velocity in deg per sec.
* **Angular Velocity about Y-axis** \[32 bit float] — Angular velocity in deg per sec.
* **Angular Velocity about Z-axis** \[32 bit float] — Angular velocity in deg per sec.

The first timestamp (Words 0–1) is for diagnostics only and is rarely needed. The second and third timestamps (Words 2–3 and 4–5) share the same clock as the lidar data and should be used for most applications. Ouster provides separate gyro and accelerometer timestamps for low-level access; for most use cases, averaging the two is sufficient.

```mermaid
packet-beta
+32: "Timestamp L"
+32: "Timestamp H"
+32: "Accel Time L"
+32: "Accel Time H"
+32: "Gyro Time L"
+32: "Gyro Time H"
+32: "Accel X"
+32: "Accel Y"
+32: "Accel Z"
+32: "Gyro X"
+32: "Gyro Y"
+32: "Gyro Z"
```

| Word |       Bits | Field                        | Description                                          |
| :--: | ---------: | ---------------------------- | ---------------------------------------------------- |
|   0  |    \[31:0] | Timestamp Low                | Low 32 bits of diagnostic timestamp                  |
|   1  |   \[63:32] | Timestamp High               | Upper 32 bits of diagnostic timestamp                |
|   2  |   \[95:64] | Accelerometer Read Time Low  | Low 32 bits of accelerometer read timestamp          |
|   3  |  \[127:96] | Accelerometer Read Time High | Upper 32 bits of accelerometer read timestamp        |
|   4  | \[159:128] | Gyroscope Read Time Low      | Low 32 bits of gyroscope read timestamp              |
|   5  | \[191:160] | Gyroscope Read Time High     | Upper 32 bits of gyroscope read timestamp            |
|   6  | \[223:192] | Accel X                      | Acceleration in X-axis, in g                         |
|   7  | \[255:224] | Accel Y                      | Acceleration in Y-axis, in g                         |
|   8  | \[287:256] | Accel Z                      | Acceleration in Z-axis, in g                         |
|   9  | \[319:288] | Gyro X                       | Angular velocity about X-axis, in degrees per second |
|  10  | \[351:320] | Gyro Y                       | Angular velocity about Y-axis, in degrees per second |
|  11  | \[383:352] | Gyro Z                       | Angular velocity about Z-axis, in degrees per second |

## Data Rate Reference

| Product                   | IMU Packet Size (Bytes) | IMU Packets per Second |
| ------------------------- | ----------------------: | ---------------------: |
| OS1-16                    |                      48 |                    100 |
| OS0-32, OS1-32, OS2-32    |                      48 |                    100 |
| OS0-64, OS1-64, OS2-64    |                      48 |                    100 |
| OS0-128, OS1-128, OS2-128 |                      48 |                    100 |