GeomagneticField
public class GeomagneticField
extends Object
估计地球上给定点的磁场,特别是从真北方计算磁偏角。
这使用由美国国家地理空间情报局制作的世界磁性模型。 有关该模型的更多细节可在http://www.ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml找到。 此课程目前使用的WMM-2010在2015年之前有效,但在此之后的几年内应该会产生可接受的结果。 未来的Android版本可能会使用更新版本的模型。
Summary
Public constructors |
GeomagneticField(float gdLatitudeDeg, float gdLongitudeDeg, float altitudeMeters, long timeMillis) 估计给定点和时间的磁场。 |
Public constructors
GeomagneticField
GeomagneticField (float gdLatitudeDeg,
float gdLongitudeDeg,
float altitudeMeters,
long timeMillis)
估计给定点和时间的磁场。
Parameters |
gdLatitudeDeg |
float : Latitude in WGS84 geodetic coordinates -- positive is east. |
gdLongitudeDeg |
float : Longitude in WGS84 geodetic coordinates -- positive is north. |
altitudeMeters |
float : Altitude in WGS84 geodetic coordinates, in meters. |
timeMillis |
long : Time at which to evaluate the declination, in milliseconds since January 1, 1970. (approximate is fine -- the declination changes very slowly). |
Public methods
getDeclination
float getDeclination ()
Returns |
float |
The declination of the horizontal component of the magnetic field from true north, in degrees (i.e. positive means the magnetic field is rotated east that much from true north). |
getFieldStrength
float getFieldStrength ()
Returns |
float |
Total field strength in nanoteslas. |
getHorizontalStrength
float getHorizontalStrength ()
Returns |
float |
Horizontal component of the field strength in nonoteslas. |
getInclination
float getInclination ()
Returns |
float |
The inclination of the magnetic field in degrees -- positive means the magnetic field is rotated downwards. |
getX
float getX ()
Returns |
float |
The X (northward) component of the magnetic field in nanoteslas. |
getY
float getY ()
Returns |
float |
The Y (eastward) component of the magnetic field in nanoteslas. |
getZ
float getZ ()
Returns |
float |
The Z (downward) component of the magnetic field in nanoteslas. |