public class Compass
extends java.lang.Object
This class represents the compass sensor values. It can be used to dispatch the sensor updates to the creative.
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
direction |
float |
heading |
boolean |
headingAccuracy |
int |
trueHeading |
int |
watchID |
| Constructor and Description |
|---|
Compass(float heading,
java.lang.String direction,
int trueHeading,
boolean headingAccuracy,
int watchID)
Constructs a new instance of sensor object with the given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDirection() |
float |
getHeading() |
boolean |
getHeadingAccuracy() |
int |
getTrueHeading() |
int |
getWatchID() |
public float heading
public java.lang.String direction
public int trueHeading
public boolean headingAccuracy
public int watchID
public Compass(float heading,
java.lang.String direction,
int trueHeading,
boolean headingAccuracy,
int watchID)
heading - An 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.direction - The geographic direction.trueHeading - The true heading value (e.g. 3°E)headingAccuracy - true If heading value is accurate.
false otherwise.watchID - A watch identifier which defined by a creative command.public float getHeading()
public java.lang.String getDirection()
public int getTrueHeading()
public boolean getHeadingAccuracy()
true If heading value is accurate.
false otherwise.public int getWatchID()