Compass
@CarProtocol
@RequiresCarApi(value = 3)
public final class Compass
Information about car specific compass available from the car hardware.
Summary
Public constructors |
|---|
|
Creates an |
Public methods |
|
|---|---|
boolean |
|
@NonNull CarValue<List<Float>> |
Returns the raw compass data from the car sensor. |
int |
hashCode() |
@NonNull String |
toString() |
Public constructors
Public methods
getOrientations
Added in 1.1.0
public @NonNull CarValue<List<Float>> getOrientations()
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