# Speed

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/hardware/info/Speed.java+class:androidx.car.app.hardware.info.Speed) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

*** ** * ** ***


```
@CarProtocol
@RequiresCarApi(value = 3)
class Speed
```

<br />

*** ** * ** ***

Information about the current car speed.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/Speed.Builder` A builder of `https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/Speed`. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/Speed#equals(java.lang.Object)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarValue<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html!>` | `https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/Speed#getDisplaySpeedMetersPerSecond()()` Returns the display speed of the car in meters/second. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarValue<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html!>` | `https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/Speed#getRawSpeedMetersPerSecond()()` Returns the raw speed of the car in meters/second. |
| `https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarValue<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html!>` | `https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/Speed#getSpeedDisplayUnit()()` Returns the units used to display speed from the car settings. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/Speed#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/hardware/info/Speed#toString()()` |

## Public functions

### equals

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

### getDisplaySpeedMetersPerSecond

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

```
fun getDisplaySpeedMetersPerSecond(): CarValue<Float!>
```

Returns the display speed of the car in meters/second.

This is the value expected to be displayed on the speedometer.

Some cars may display a slightly higher speed than the actual speed.

The value is positive when the vehicle is moving forward, negative when moving backwards, and zero when stopped.

### getRawSpeedMetersPerSecond

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

```
fun getRawSpeedMetersPerSecond(): CarValue<Float!>
```

Returns the raw speed of the car in meters/second.

The value is positive when the vehicle is moving forward, negative when moving backwards and zero when stopped.

### getSpeedDisplayUnit

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.1.0)

```
fun getSpeedDisplayUnit(): CarValue<Int!>
```

Returns the units used to display speed from the car settings.

See `https://developer.android.com/reference/kotlin/androidx/car/app/hardware/common/CarUnit` for valid speed units.

### hashCode

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

### toString

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