|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.location.GeomagneticField
public class GeomagneticField
Estimates the magnetic field at a given point on Earth, and calculates the magnetic declination from true north.
This class uses the current World Magnetic Model (WMM2010). For more information about the WMM, visit World Magnetic Model.
Constructor Summary | ||
---|---|---|
GeomagneticField(double lat,
double lon,
int alt)
Estimates the geomagnetic field for the location specified in World Geodetic System 1984 (WGS84) coordinates. |
Method Summary | ||
---|---|---|
float |
getDeclination()
Retrieves the declination (the angle between magnetic north and true north) of the geomagnetic field. |
|
float |
getFieldStrength()
Retrieves the total intensity of the geomagnetic field. |
|
float |
getHorizontalFieldStrength()
Retrieves the total horizontal intensity of the geomagnetic field. |
|
float |
getInclination()
Retrieves the inclination (the angle relative to the horizontal plane) of the geomagnetic field. |
|
float |
getX()
Retrieves the north component of the geomagnetic field. |
|
float |
getY()
Retrieves the east component of the geomagnetic field. |
|
float |
getZ()
Retrieves the vertical component (downwards) of the geomagnetic field. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GeomagneticField(double lat, double lon, int alt)
estimate
is called on this object's construction.
lat
- Represents latitude, -90 degrees (south) to approximately +90 degrees (north), centered at the equator.lon
- Represents longitude, -180 degrees (west) to +180 degrees (east), centered at the prime meridian.alt
- Represents altitude, measured in meters, above (positive) or below (negative).
IllegalArgumentException
- if lat < -90 or lat > 90
IllegalArgumentException
- if lon < -180 or lon > 180
IllegalStateException
- if MagnetometerSensor.isSupported() returns false
Method Detail |
---|
public float getDeclination()
Declination is positive when magnetic north is east of true north. Declination is negative when magnetic north is west of true north.
public float getInclination()
public float getFieldStrength()
public float getHorizontalFieldStrength()
public float getX()
public float getY()
public float getZ()
|
|||||||||
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