Provides data from the various sensors of the host mobile device.
int ACCEL
Accelerometer.
int ATTITUDE
Attitude.
int GYRO
Gyroscope.
int HEADING
Compass heading.
int LOCATION
Geographic location.
int MAG
Magnetometer.
int NONE
No sensor type specified.
void close()
Stop generating input from all sensors.
void close(int type)
Stop generating input from the specified sensor.
int open(int type)
Start generating input from the specified sensor.
int recv(MotionMsg type)
Receive the next sample of sensor data.
[ top ]
Holds a single sample of sensor data.
float heading
Heading of this sample, in degrees clockwise from magnetic north. Valid for compass heading samples only.
float latitude
Latitude of this sample. Valid for location samples only.
float longitude
Longitude of this sample. Valid for location samples only.
time timestamp
Time corresponding to this sample.
int type
Type of the sensor data.
float x
x-coordinate of this sample. Valid for accelerometer, gyroscope, magnetometer, or attitude samples only.
float y
y-coordinate of this sample. Valid for accelerometer, gyroscope, magnetometer, or attitude samples only.
float z
z-coordinate of this sample. Valid for accelerometer, gyroscope, magnetometer, or attitude samples only.
[ top ]