|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.system.MagnetometerData
public final class MagnetometerData
Encapsulates magnetometer sensor readings.
MagnetometerChannelConfig| Field Summary | ||
|---|---|---|
static int |
MAGNETOMETER_GET_DIRECTION_BACK
Used in getDirection() to specify you want top direction. |
|
static int |
MAGNETOMETER_GET_DIRECTION_BOTTOM
Used in getDirection() to specify you want bottom direction. |
|
static int |
MAGNETOMETER_GET_DIRECTION_FRONT
Used in getDirection() to specify you want front direction. |
|
static int |
MAGNETOMETER_GET_DIRECTION_LEFT
Used in getDirection() to specify you want left direction. |
|
static int |
MAGNETOMETER_GET_DIRECTION_RIGHT
Used in getDirection() to specify you want right direction. |
|
static int |
MAGNETOMETER_GET_DIRECTION_TOP
Used in getDirection() to specify you want top direction. |
|
static int |
MAGNETOMETER_HEADING_EAST
Represents east heading retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_HEADING_EAST_NORTH_EAST
Represents east-northeast heading retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_HEADING_EAST_SOUTH_EAST
Represents east-southeast heading retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_HEADING_NORTH
Represents north heading retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_HEADING_NORTH_EAST
Represents northeast heading retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_HEADING_NORTH_NORTH_EAST
Represents north-northeast retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_HEADING_NORTH_NORTH_WEST
Represents north-northwest heading retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_HEADING_NORTH_WEST
Represents northwest heading retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_HEADING_SOUTH
Represents south heading retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_HEADING_SOUTH_EAST
Represents southeast heading retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_HEADING_SOUTH_SOUTH_EAST
Represents south-southeast heading retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_HEADING_SOUTH_SOUTH_WEST
Represents south-southwest heading retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_HEADING_SOUTH_WEST
Represents southwest heading retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_HEADING_WEST
Represents west heading retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_HEADING_WEST_NORTH_WEST
Represents west-northwest heading retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_HEADING_WEST_SOUTH_WEST
Represents west-southwest heading retrieved by MagnetometerData.getHeading(float). |
|
static int |
MAGNETOMETER_QUALITY_HIGH
Represents high magnetometer quality, which is used by MagnetometerData.getCalibrationQuality(). |
|
static int |
MAGNETOMETER_QUALITY_LOW
Represents low magnetometer quality, which is used by MagnetometerData.getCalibrationQuality(). |
|
static int |
MAGNETOMETER_QUALITY_MEDIUM
Represents medium magnetometer quality, which is used by MagnetometerData.getCalibrationQuality(). |
|
static int |
MAGNETOMETER_QUALITY_UNRELIABLE
Represents unreliable magnetometer quality, which is used by MagnetometerData.getCalibrationQuality(). |
|
| Method Summary | ||
|---|---|---|
void |
getAccelerometerData(float[] xyz)
Provides raw accelerometer data. |
|
int |
getCalibrationQuality()
Retrieves the calibration quality. |
|
float |
getDirection(int side)
Retrieves the direction for the provided side. |
|
float |
getDirectionBack()
Retrieves the clockwise-positive angle between magnetic north and the front of the device (negative z axis), in degrees. |
|
float |
getDirectionBottom()
Retrieves the clockwise-positive angle between magnetic north and the bottom of the device (negative y axis), in degrees. |
|
float |
getDirectionFront()
Retrieves the clockwise-positive angle between magnetic north and the front of the device (positive z axis), in degrees. |
|
float |
getDirectionLeft()
Retrieves the clockwise-positive angle between magnetic north and the left of the device (negative x axis), in degrees. |
|
float |
getDirectionRight()
Retrieves the clockwise-positive angle between magnetic north and the right of the device (positive x axis), in degrees. |
|
float |
getDirectionTop()
Retrieves the clockwise-positive angle between magnetic north and the top of the device (positive y axis), in degrees. |
|
float |
getFieldStrength()
Retrieves the local magnetic field strength, the magnitude of the geomagnetic vector. |
|
static int |
getHeading(float angle)
Retrieves a rough estimate of the heading, based on an angle value in the range [0, 360). |
|
float |
getInclination()
Retrieves the angle between the x-y plane and the magnetic vector (dip angle). |
|
void |
getInclinationMatrix(float[] im)
A matrix representing the inclination returned from getInclination. |
|
void |
getMagnetometerData(float[] xyz)
Provides raw magnetometer data (in tesla). |
|
boolean |
getOrientation(float[] orientation)
Retrieves the device orientation. |
|
boolean |
getRotationMatrix(float[] rm)
Retrieves the rotation matrix. |
|
int |
getTimestamp()
Retrieves a timestamp that specifies when this data was captured. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAGNETOMETER_QUALITY_UNRELIABLE
MagnetometerData.getCalibrationQuality().
public static final int MAGNETOMETER_QUALITY_LOW
MagnetometerData.getCalibrationQuality().
public static final int MAGNETOMETER_QUALITY_MEDIUM
MagnetometerData.getCalibrationQuality().
public static final int MAGNETOMETER_QUALITY_HIGH
MagnetometerData.getCalibrationQuality().
public static final int MAGNETOMETER_HEADING_NORTH
MagnetometerData.getHeading(float).
This indicates a degree value [348.75, 11.25).
public static final int MAGNETOMETER_HEADING_NORTH_NORTH_EAST
MagnetometerData.getHeading(float).
This indicates a degree value [11.25, 33.75).
public static final int MAGNETOMETER_HEADING_NORTH_EAST
MagnetometerData.getHeading(float).
This indicates a degree value [33.75, 56.25).
public static final int MAGNETOMETER_HEADING_EAST_NORTH_EAST
MagnetometerData.getHeading(float).
This indicates a degree value [56.25, 78.75).
public static final int MAGNETOMETER_HEADING_EAST
MagnetometerData.getHeading(float).
This indicates a degree value [78.75, 101.25).
public static final int MAGNETOMETER_HEADING_EAST_SOUTH_EAST
MagnetometerData.getHeading(float).
This indicates a degree value [101.25, 123.75).
public static final int MAGNETOMETER_HEADING_SOUTH_EAST
MagnetometerData.getHeading(float).
This indicates a degree value [123.75, 146.25).
public static final int MAGNETOMETER_HEADING_SOUTH_SOUTH_EAST
MagnetometerData.getHeading(float).
This indicates a degree value [146.25, 168.75).
public static final int MAGNETOMETER_HEADING_SOUTH
MagnetometerData.getHeading(float).
This indicates a degree value [168.75, 191.25).
public static final int MAGNETOMETER_HEADING_SOUTH_SOUTH_WEST
MagnetometerData.getHeading(float).
This indicates a degree value [191.25, 213.75).
public static final int MAGNETOMETER_HEADING_SOUTH_WEST
MagnetometerData.getHeading(float).
This indicates a degree value [213.75, 236.25).
public static final int MAGNETOMETER_HEADING_WEST_SOUTH_WEST
MagnetometerData.getHeading(float).
This indicates a degree value [236.25, 258.75).
public static final int MAGNETOMETER_HEADING_WEST
MagnetometerData.getHeading(float).
This indicates a degree value [258.75, 281.25).
public static final int MAGNETOMETER_HEADING_WEST_NORTH_WEST
MagnetometerData.getHeading(float).
This indicates a degree value [281.25, 303.75).
public static final int MAGNETOMETER_HEADING_NORTH_WEST
MagnetometerData.getHeading(float).
This indicates a degree value [303.75, 326.25).
public static final int MAGNETOMETER_HEADING_NORTH_NORTH_WEST
MagnetometerData.getHeading(float).
This indicates a degree value [326.25, 348.75).
public static final int MAGNETOMETER_GET_DIRECTION_TOP
public static final int MAGNETOMETER_GET_DIRECTION_BOTTOM
public static final int MAGNETOMETER_GET_DIRECTION_LEFT
public static final int MAGNETOMETER_GET_DIRECTION_RIGHT
public static final int MAGNETOMETER_GET_DIRECTION_FRONT
public static final int MAGNETOMETER_GET_DIRECTION_BACK
| Method Detail |
|---|
public void getMagnetometerData(float[] xyz)
xyz - The array to store magnetometer data in. xyz should be of length 3.public void getAccelerometerData(float[] xyz)
xyz - The array to store accelerometer data in. xyz should be of length 3.public boolean getRotationMatrix(float[] rm)
rm - The rotation matrix, either length 9 or 16.
true if the rotation matrix is returned, false otherwise.for more details about this method.public boolean getOrientation(float[] orientation)
orientation - The device orientation.
true if the device orientation is returned, false otherwise.
IllegalArgumentException - if orientation is not length 3for more details about this method.public float getFieldStrength()
public float getDirection(int side)
side - side to return the direction for.
IllegalArgumentException - if side is invalidpublic float getDirectionTop()
public float getDirectionBottom()
public float getDirectionRight()
public float getDirectionLeft()
public float getDirectionFront()
public float getDirectionBack()
public float getInclination()
public void getInclinationMatrix(float[] im)
im - The inclination matrix, either length 9 or 16public int getTimestamp()
public static int getHeading(float angle)
angle - The specified angle value, which can be in the range of [0, 360).
MAGNETOMETER_HEADING_* constants.
IllegalArgumentException - if the angle is less than 0.public int getCalibrationQuality()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal