Compass


@CarProtocol
@RequiresCarApi(value = 3)
class Compass


Information about car specific compass available from the car hardware.

Summary

Public constructors

Compass(orientations: CarValue<(Mutable)List<Float!>!>)

Creates an Compass with the given raw data.

Public functions

Boolean
equals(other: Any?)
CarValue<(Mutable)List<Float!>!>

Returns the raw compass data from the car sensor.

Int
String

Public constructors

Compass

Added in 1.1.0
Compass(orientations: CarValue<(Mutable)List<Float!>!>)

Creates an Compass with the given raw data.

Throws
java.lang.NullPointerException

if orientations is null

Public functions

equals

fun equals(other: Any?): Boolean

getOrientations

Added in 1.1.0
fun getOrientations(): CarValue<(Mutable)List<Float!>!>

Returns the raw compass data from the car sensor.

Individual values can be Float.Nan if not reported. The array values consist of:

  • [0]: Azimuth, angle between the magnetic north direction and the y-axis, around the z-axis (0 to 359). 0=North, 90=East, 180=South, 270=West
  • [1]: Pitch, rotation around y-axis (-90 to 90), where nose down is positive
  • [2]: Roll, rotation around x-axis (-180 to 180), where right door down is positive

hashCode

fun hashCode(): Int

toString

fun toString(): String