# LocationAccuracy

Artifact: [androidx.health:health-services-client](https://developer.android.com/jetpack/androidx/releases/health) [View Source](https://cs.android.com/search?q=file:androidx/health/services/client/data/LocationAccuracy.kt+class:androidx.health.services.client.data.LocationAccuracy) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

*** ** * ** ***


```
public final class LocationAccuracy extends DataPointAccuracy
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.health.services.client.data.DataPointAccuracy](https://developer.android.com/reference/androidx/health/services/client/data/DataPointAccuracy) ||
|   | ↳ | [androidx.health.services.client.data.LocationAccuracy](https://developer.android.com/reference/androidx/health/services/client/data/LocationAccuracy) |

*** ** * ** ***

Accuracy for a `https://developer.android.com/reference/androidx/health/services/client/data/DataType#LOCATION()` data point.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/health/services/client/data/LocationAccuracy#LocationAccuracy(kotlin.Double,kotlin.Double)( @https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0.0) double horizontalPositionErrorMeters, @https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0.0) double verticalPositionErrorMeters )` |

| ### Public methods |
|---|---|
| `final double` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationAccuracy#getHorizontalPositionErrorMeters()()` Represents the estimated horizontal accuracy of the location, radial, in meters. |
| `final double` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationAccuracy#getVerticalPositionErrorMeters()()` Represents the estimated vertical accuracy corresponding to the altitude of the location, radial, in meters, or it will be `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/-companion/-m-a-x_-v-a-l-u-e.html` if it cannot be provided. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationAccuracy#toString()()` |

## Public constructors

### LocationAccuracy

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

```
public LocationAccuracy(
    @FloatRange(from = 0.0) double horizontalPositionErrorMeters,
    @FloatRange(from = 0.0) double verticalPositionErrorMeters
)
```

## Public methods

### getHorizontalPositionErrorMeters

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

```
public final double getHorizontalPositionErrorMeters()
```

Represents the estimated horizontal accuracy of the location, radial, in meters. Range starting from 0.0.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/androidx/health/services/client/data/LocationAccuracy#(kotlin.Double,kotlin.Double)` is negative |

### getVerticalPositionErrorMeters

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

```
public final double getVerticalPositionErrorMeters()
```

Represents the estimated vertical accuracy corresponding to the altitude of the location, radial, in meters, or it will be `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/-companion/-m-a-x_-v-a-l-u-e.html` if it cannot be provided. Range starting from 0.0.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if `https://developer.android.com/reference/androidx/health/services/client/data/LocationAccuracy#(kotlin.Double,kotlin.Double)` is negative |

### toString

```
public @NonNull String toString()
```