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

# Return Order

> Sort dual-return lidar output by signal strength or range to match your application.

#### Overview

Rev 7 sensors can detect up to two returns from each target. This is a hardware-level capability, independent of the `udp_profile_lidar` selection — the sensor detects up to two returns in Single Return, Dual Return, and Low Data Rate modes.

Firmware 3.1 added the ability to sort those returns by user-selected criteria (signal strength or range), letting users tune sensor output to the needs of their application.

#### Sorting Returns

Regardless of the `udp_profile_lidar` selection (`Single Return`, `Dual Return`, or `Low Data Rate`), the sensor processes two returns internally. Configure the sort via `return_order` (see [`POST /api/v1/sensor/config`](/sensor-docs/firmware/api-reference#sensor-configuration) in the [API reference](/sensor-docs/firmware/api-reference#sensor-configuration) for the full schema). The setting applies across all profiles:

* RNG19_RFL8_SIG16_NIR16 (Single Return)
* RNG15_RFL8_NIR8 (Low Data Rate)
* RNG19_RFL8_SIG16_NIR16_DUAL (Dual Return)

The sensor returns the two strongest signals for each radial beam. The order of those two returns in the output depends on `return_order`:

* `STRONGEST_TO_WEAKEST` (**default**) — strongest signal first, then the next strongest. Prioritizes the most reflective or prominent objects. Useful when signal strength is the dominant criterion.
* `FARTHEST_TO_NEAREST` — sorts by range, farthest first. Useful when the spatial layout of the scene matters (e.g., mapping).
* `NEAREST_TO_FARTHEST` — sorts by range, nearest first. Useful for nearby obstacle detection.

> **Note**
>
> When `min_range_threshold_cm` is set to 30 cm or less, set `return_order` to `FARTHEST_TO_NEAREST`, especially when `udp_profile_lidar` is set to a single-return profile.

Choice of order depends on the application. For obstacle detection, `NEAREST_TO_FARTHEST` surfaces nearby targets first. For mapping, `FARTHEST_TO_NEAREST` better captures spatial layout.