# SensorFusionResult

Artifact: [androidx.core.uwb:uwb](https://developer.android.com/jetpack/androidx/releases/core-uwb) [View Source](https://cs.android.com/search?q=file:androidx/core/uwb/SensorFusionResult.kt+class:androidx.core.uwb.SensorFusionResult) Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

*** ** * ** ***


```
sealed interface SensorFusionResult
```

<br />

Known direct subclasses [RangingResult](https://developer.android.com/reference/kotlin/androidx/core/uwb/RangingResult), [SensorFusionResult.Estimate](https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.Estimate), [SensorFusionResult.SensorFusionFallback](https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.SensorFusionFallback)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/uwb/RangingResult` | Class for UWB ranging result update. |
| `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.Estimate` | An estimate of the peer device's position produced from the sensor fusion algorithm. |
| `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.SensorFusionFallback` | Sensor fusion failed to start and the session will fall back to UWB ranging. |

Known indirect subclasses [RangingResult.RangingResultFailure](https://developer.android.com/reference/kotlin/androidx/core/uwb/RangingResult.RangingResultFailure), [RangingResult.RangingResultInitialized](https://developer.android.com/reference/kotlin/androidx/core/uwb/RangingResult.RangingResultInitialized), [RangingResult.RangingResultPeerDisconnected](https://developer.android.com/reference/kotlin/androidx/core/uwb/RangingResult.RangingResultPeerDisconnected), [RangingResult.RangingResultPosition](https://developer.android.com/reference/kotlin/androidx/core/uwb/RangingResult.RangingResultPosition), [SensorFusionResult.DriftingEstimate](https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.DriftingEstimate), [SensorFusionResult.ImpreciseEstimate](https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.ImpreciseEstimate), [SensorFusionResult.PreciseEstimate](https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.PreciseEstimate)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/uwb/RangingResult.RangingResultFailure` | A ranging result indicating failure or suspension of a ranging session. |
| `https://developer.android.com/reference/kotlin/androidx/core/uwb/RangingResult.RangingResultInitialized` | A ranging result when a ranging session is initialized with peer device. |
| `https://developer.android.com/reference/kotlin/androidx/core/uwb/RangingResult.RangingResultPeerDisconnected` | A ranging result with peer disconnected status update. |
| `https://developer.android.com/reference/kotlin/androidx/core/uwb/RangingResult.RangingResultPosition` | A ranging result with the device position update. |
| `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.DriftingEstimate` | An `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.Estimate` backed by odometry data only because raw UWB range has failed. |
| `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.ImpreciseEstimate` | An `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.Estimate` backed by raw UWB range only because the odometry sensor has failed. |
| `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.PreciseEstimate` | An `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.Estimate` backed by both odometry data and range data. |

*** ** * ** ***

An asynchronous update from a sensor fusion session.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.DriftingEstimate : https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.Estimate` An `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.Estimate` backed by odometry data only because raw UWB range has failed. |
| `sealed interface https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.Estimate : https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult` An estimate of the peer device's position produced from the sensor fusion algorithm. |
| `class https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.ImpreciseEstimate : https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.Estimate` An `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.Estimate` backed by raw UWB range only because the odometry sensor has failed. |
| `class https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.PreciseEstimate : https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.Estimate` An `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.Estimate` backed by both odometry data and range data. |
| `class https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult.SensorFusionFallback : https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult` Sensor fusion failed to start and the session will fall back to UWB ranging. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult#ESTIMATE_FAILURE_REASON_BAD_STATE() = 8` Failed because the sensor fusion algorithm reached a bad state. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult#ESTIMATE_FAILURE_REASON_CAMERA_UNAVAILABLE() = 5` ARCore failed because the camera is in use by another application. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult#ESTIMATE_FAILURE_REASON_EXCESSIVE_MOTION() = 3` ARCore failed due to excessive motion. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult#ESTIMATE_FAILURE_REASON_INCONCLUSIVE_RESULT() = 7` Failed because the algorithm produced a bimodal or otherwise inconclusive result. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult#ESTIMATE_FAILURE_REASON_INSUFFICIENT_FEATURES() = 4` ARCore failed due to insufficient visual features. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult#ESTIMATE_FAILURE_REASON_INSUFFICIENT_LIGHT() = 2` ARCore failed due to poor lighting conditions. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult#ESTIMATE_FAILURE_REASON_NOT_AVAILABLE() = 1` Failed because angle of arrival is transiently unavailable for an expected reason, such as during initialization. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult#ESTIMATE_FAILURE_REASON_PEER_MOVING() = 6` Failed because excessive peer motion was detected. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult#FALLBACK_REASON_ARCORE_CAMERA_NOT_AVAILABLE() = 2` ARCore failed to start because the camera is in use by another app or process. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult#FALLBACK_REASON_ARCORE_DEVICE_NOT_COMPATIBLE() = 4` The device is not compatible with ARCore. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult#FALLBACK_REASON_ARCORE_MISSING_GL_CONTEXT() = 5` ARCore failed to start because the necessary `https://developer.android.com/reference/android/opengl/EGLContext.html` is not available on the polling thread. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult#FALLBACK_REASON_ARCORE_SDK_TOO_OLD() = 3` The ARCore SDK that the client was built with is too old and is no longer supported by the installed ARCore APK. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult#FALLBACK_REASON_HARDWARE_AOA_PRECEDENCE() = 1` This device supports hardware angle of arrival measurement, which will be used instead of sensor fusion. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult#FALLBACK_REASON_NOT_AVAILABLE() = 0` Sensor fusion is not available on this device. |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/uwb/UwbDevice` | `https://developer.android.com/reference/kotlin/androidx/core/uwb/SensorFusionResult#device()` The peer UWB device that this result applies to. |

## Constants

### ESTIMATE_FAILURE_REASON_BAD_STATE

Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

```
const val ESTIMATE_FAILURE_REASON_BAD_STATE = 8: Int
```

Failed because the sensor fusion algorithm reached a bad state. No user action is likely to fix this, consider restarting the session.

### ESTIMATE_FAILURE_REASON_CAMERA_UNAVAILABLE

Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

```
const val ESTIMATE_FAILURE_REASON_CAMERA_UNAVAILABLE = 5: Int
```

ARCore failed because the camera is in use by another application. Odometry will resume once this app regains priority, or once all apps with higher priority have stopped using the camera.

### ESTIMATE_FAILURE_REASON_EXCESSIVE_MOTION

Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

```
const val ESTIMATE_FAILURE_REASON_EXCESSIVE_MOTION = 3: Int
```

ARCore failed due to excessive motion. Ask the user to move the device more slowly.

### ESTIMATE_FAILURE_REASON_INCONCLUSIVE_RESULT

Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

```
const val ESTIMATE_FAILURE_REASON_INCONCLUSIVE_RESULT = 7: Int
```

Failed because the algorithm produced a bimodal or otherwise inconclusive result. Ask the user to move in a different direction than was done previously to help the algorithm converge.

### ESTIMATE_FAILURE_REASON_INSUFFICIENT_FEATURES

Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

```
const val ESTIMATE_FAILURE_REASON_INSUFFICIENT_FEATURES = 4: Int
```

ARCore failed due to insufficient visual features. Ask the user to move to a different area and to avoid blank walls and surfaces without detail.

### ESTIMATE_FAILURE_REASON_INSUFFICIENT_LIGHT

Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

```
const val ESTIMATE_FAILURE_REASON_INSUFFICIENT_LIGHT = 2: Int
```

ARCore failed due to poor lighting conditions. Ask the user to move to a more brightly lit area.

### ESTIMATE_FAILURE_REASON_NOT_AVAILABLE

Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

```
const val ESTIMATE_FAILURE_REASON_NOT_AVAILABLE = 1: Int
```

Failed because angle of arrival is transiently unavailable for an expected reason, such as during initialization. This should resolve itself soon.

### ESTIMATE_FAILURE_REASON_PEER_MOVING

Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

```
const val ESTIMATE_FAILURE_REASON_PEER_MOVING = 6: Int
```

Failed because excessive peer motion was detected. The algorithm works best when the peer is stationary.

### FALLBACK_REASON_ARCORE_CAMERA_NOT_AVAILABLE

Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

```
const val FALLBACK_REASON_ARCORE_CAMERA_NOT_AVAILABLE = 2: Int
```

ARCore failed to start because the camera is in use by another app or process.

### FALLBACK_REASON_ARCORE_DEVICE_NOT_COMPATIBLE

Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

```
const val FALLBACK_REASON_ARCORE_DEVICE_NOT_COMPATIBLE = 4: Int
```

The device is not compatible with ARCore. If encountered after completing the [installation steps](https://developers.google.com/ar/develop/java/enable-arcore), this usually indicates that ARCore has been side-loaded onto an incompatible device.

### FALLBACK_REASON_ARCORE_MISSING_GL_CONTEXT

Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

```
const val FALLBACK_REASON_ARCORE_MISSING_GL_CONTEXT = 5: Int
```

ARCore failed to start because the necessary `https://developer.android.com/reference/android/opengl/EGLContext.html` is not available on the polling thread.

**NOTE:** This should never occur unless there has been an internal failure. The ARCore session and necessary context object is managed within the UWB stack.

### FALLBACK_REASON_ARCORE_SDK_TOO_OLD

Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

```
const val FALLBACK_REASON_ARCORE_SDK_TOO_OLD = 3: Int
```

The ARCore SDK that the client was built with is too old and is no longer supported by the installed ARCore APK.

### FALLBACK_REASON_HARDWARE_AOA_PRECEDENCE

Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

```
const val FALLBACK_REASON_HARDWARE_AOA_PRECEDENCE = 1: Int
```

This device supports hardware angle of arrival measurement, which will be used instead of sensor fusion.

To use sensor fusion even when hardware angle of arrival is supported, configure the session with `https://developer.android.com/reference/kotlin/androidx/core/uwb/RangingParameters#isAoaDisabled()` set to `true`.

### FALLBACK_REASON_NOT_AVAILABLE

Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

```
const val FALLBACK_REASON_NOT_AVAILABLE = 0: Int
```

Sensor fusion is not available on this device.

## Public properties

### device

Added in [1.1.0-alpha03](https://developer.android.com/jetpack/androidx/releases/core-uwb#1.1.0-alpha03)

```
val device: UwbDevice
```

The peer UWB device that this result applies to.