# LocationData

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/LocationData.kt+class:androidx.health.services.client.data.LocationData) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

*** ** * ** ***

<br />

```
class LocationData
```

<br />

*** ** * ** ***

Data representing one location point with direction.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationData#LocationData(kotlin.Double,kotlin.Double,kotlin.Double,kotlin.Double)( latitude: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = -90.0, to = 90.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html, longitude: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = -180.0, to = 180.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html, altitude: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html, bearing: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationData#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationData#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationData#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationData#altitude()` Altitude of location in meters or `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationData.Companion#ALTITUDE_UNAVAILABLE()` if not available. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationData#bearing()` Bearing in degrees within the range of 0.0 (inclusive), 360.0(exclusive) or `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationData.Companion#BEARING_UNAVAILABLE()` if not available. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = -90.0, to = 90.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationData#latitude()` Latitude of location. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = -180.0, to = 180.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationData#longitude()` Longitude of location. |

## Public constructors

### LocationData

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

```
LocationData(
    latitude: @FloatRange(from = -90.0, to = 90.0) Double,
    longitude: @FloatRange(from = -180.0, to = 180.0) Double,
    altitude: Double = ALTITUDE_UNAVAILABLE,
    bearing: Double = BEARING_UNAVAILABLE
)
```

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### altitude

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

```
val altitude: Double
```

Altitude of location in meters or `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationData.Companion#ALTITUDE_UNAVAILABLE()` if not available.

### bearing

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

```
val bearing: Double
```

Bearing in degrees within the range of 0.0 (inclusive), 360.0(exclusive) or `https://developer.android.com/reference/kotlin/androidx/health/services/client/data/LocationData.Companion#BEARING_UNAVAILABLE()` if not available.

### latitude

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

```
val latitude: @FloatRange(from = -90.0, to = 90.0) Double
```

Latitude of location. Range from -90.0 to = 90.0.

### longitude

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

```
val longitude: @FloatRange(from = -180.0, to = 180.0) Double
```

Longitude of location. Range from -180.0 to = 180.0.