faa.tg.units
Class MagneticDeclination

java.lang.Object
  extended by faa.tg.units.AMeasure
      extended by faa.tg.units.Angle
          extended by faa.tg.units.MagneticDeclination
All Implemented Interfaces:
HasText, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<AMeasure>

public class MagneticDeclination
extends Angle

MagneticDeclination represents the angular measure of the Earth's magnetic Field with respect to true North. Clockwise offsets are positive. Generally seen as 10W (-10.0 degrees) or 12E (+12.0 degrees).

What is the Earth's magnetic field? The Earth acts like a great spherical magnet, in that it is surrounded by a magnetic field. The Earth's magnetic field resembles, in general, the field generated by a dipole magnet (i.e., a straight magnet with a north and south pole) located at the center of the Earth. The axis of the dipole is offset from the axis of the Earth's rotation by approximately 11 degrees. This means that the north and south geographic poles and the north and south magnetic poles are not located in the same place. At any point, the Earth's magnetic field is characterized by a direction and intensity which can be measured. Often the parameters measured are the magnetic declination, D, the horizontal intensity, H, and the vertical intensity, Z. From these these elements, all other parameters of the magnetic field can be calculated.

What are the magnetic elements? To measure the Earth's magnetism in any place, we must measure the direction and intensity of the field. The parameters describing the direction of the magnetic field are declination (D), inclination (I). D and I are measured in units of degrees. The intensity of the total field (F) is described by the horizontal component (H), vertical component (Z), and the north (X) and east (Y) components of the horizontal intensity. These components may be measured in units of Oersted (1 oersted=1gauss) but are generally reported in nanoTesla (1nT * 100,000 = 1 0ersted). The Earth's magnetic field intensity is roughly between 25,000 - 65,000 nT (.25 - .65 oersted). Magnetic declination is the angle between magnetic north and true north. D is considered positive when the angle measured is east of true north and negative when west. Magnetic inclination is the angle between the horizontal plane and the total field vector. In older liturature, the term 'magnetic elements' often refered to D, I, and H.

See the source:MagneticDeclination.java

Version:
$Id: MagneticDeclination.java,v 3.4 2008/08/04 15:04:16 lykensj Exp $
Author:
Dan Warburton, FAA/ACT-510
See Also:
AUnits, AMeasure, MagneticHeading, Units.radians, Serialized Form

Field Summary
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
(package private) static long serialVersionUID
           
static MagneticDeclination ZERO
           
 
Fields inherited from class faa.tg.units.Angle
D180_DIV_PI, DEG_1, DEG_180, DEG_270, DEG_30, DEG_330, DEG_5, DEG_60, DEG_90, DEG_NEG180, DEG_NEG270, DEG_NEG30, DEG_NEG5, DEG_NEG90, DEG_PER_RAD, NEG_NINETY_DEG, NEG_ONEEIGHTY_DEG, NINETY_DEG, ONEEIGHTY_DEG, PI, PI_DIV_180, PI_DIV_2, PI_DIV_4, PI_MUL_2, PI_MUL_4, RAD_PER_DEG, THIRTY_DEG, THREETHIRTY_DEG, TWOSEVENTY_DEG
 
Fields inherited from class faa.tg.units.AMeasure
DEC0, DEC0_, DEC00, DEC000, DEC1, DEC1_, DEC12, DEC12_, DEC1L, DEC1L_, DEC2, DEC2_, DEC3, DEC3_, DEC4, DEC4_, DEC5, DEC5_, DEC6, DEC6_, DEC7, DEC7_, DEC9, DEC9_, itsValue, TIME_FRACTION
 
Constructor Summary
MagneticDeclination(double theValue, AngleUnits theUnits)
          Constructor for the MagneticDeclination.
MagneticDeclination(java.lang.String degreeOffset)
          Constructor for the MagneticDeclination class.
 
Method Summary
 boolean eq(MagneticDeclination theMeasure)
          This method provides a test for equality.
 boolean ge(MagneticDeclination theMeasure)
          This method provides a test for greater than / equal to.
 MagneticHeading getMagneticHeading(TrueBearing trueBearing)
          Given a TrueBearing this method calculates a MagneticHeading from this MagneticDeclination.
 TrueHeading getTrueHeading(MagneticHeading magneticHeading)
          Given a MagneticHeading this method calculates a TrueHeading from this MagneticDeclination.
 boolean gt(MagneticDeclination theMeasure)
          This method provides a test for greater than.
 boolean le(MagneticDeclination theMeasure)
          This method provides a test for less than / equal to.
 boolean lt(MagneticDeclination theMeasure)
          This method provides a test for less than.
static void main(java.lang.String[] args)
          Test construction from string.
 double ratio(MagneticDeclination val)
          This division method produces a dimensionless ratio of like measures.
 java.lang.String toString()
          Returns the String representation of this object in the units used to create it.
 
Methods inherited from class faa.tg.units.Angle
abs, add, aeq, as, average, cos, diff, eq, ge, gt, isBetween, le, lt, parseDmsString, ratio, reciprocalAngle, removeDelimiters, sin, sub, tan, toDmsString, toRadialString, toText
 
Methods inherited from class faa.tg.units.AMeasure
absoluteValue, add, as, as, clone, compareTo, debug, div, eq, equals, ge, getAUnit, getCanonicalUnit, getCanonicalValue, getInitialUnit, getUnitClass, gt, hashCode, isBetween, le, lt, mul, ratio, sub, toAMeasure, toString, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

CVS_VERSION_ID

public static final java.lang.String CVS_VERSION_ID
The CVS Version ID

See Also:
Constant Field Values

ZERO

public static final MagneticDeclination ZERO
Constructor Detail

MagneticDeclination

public MagneticDeclination(double theValue,
                           AngleUnits theUnits)
Constructor for the MagneticDeclination.

Parameters:
theValue - the magnitude of MagneticDeclination as a double negative is West, positive for East Declinations.
theUnits - the units of the value that will be stored (ex: deg)

MagneticDeclination

public MagneticDeclination(java.lang.String degreeOffset)
                    throws java.lang.NumberFormatException
Constructor for the MagneticDeclination class.

Parameters:
degreeOffset - the number of degrees E or W of True North (i.e., 10W or 12E).
Throws:
java.lang.NumberFormatException
Method Detail

ratio

public double ratio(MagneticDeclination val)
This division method produces a dimensionless ratio of like measures.

Returns:
the ratio of the two measures

eq

public boolean eq(MagneticDeclination theMeasure)
This method provides a test for equality. It overrides the method in the superclass and checks for like AMeasures as well as doing the cast for you.

Returns:
Returns boolean indicating whether values are equal.

lt

public boolean lt(MagneticDeclination theMeasure)
This method provides a test for less than. It overrides the method in the superclass and checks for like AMeasures as well as doing the cast for you.

Returns:
Returns whether this value is less than the given value.

gt

public boolean gt(MagneticDeclination theMeasure)
This method provides a test for greater than. It overrides the method in the superclass and checks for like AMeasures as well as doing the cast for you.

Returns:
Returns whether this value is greater than the given value.

ge

public boolean ge(MagneticDeclination theMeasure)
This method provides a test for greater than / equal to. It overrides the method in the superclass and checks for like AMeasures as well as doing the cast for you.

Returns:
Returns result of test for greater than or equal to.

le

public boolean le(MagneticDeclination theMeasure)
This method provides a test for less than / equal to. It overrides the method in the superclass and checks for like AMeasures as well as doing the cast for you.

Returns:
Returns result of test for less than or equal to.

getMagneticHeading

public MagneticHeading getMagneticHeading(TrueBearing trueBearing)
Given a TrueBearing this method calculates a MagneticHeading from this MagneticDeclination.

Parameters:
trueBearing - The true bearing to convert to magnetic.

getTrueHeading

public TrueHeading getTrueHeading(MagneticHeading magneticHeading)
Given a MagneticHeading this method calculates a TrueHeading from this MagneticDeclination.

Parameters:
magneticHeading - The magnetic heading to convert to true.

toString

public java.lang.String toString()
Returns the String representation of this object in the units used to create it.

Overrides:
toString in class Angle
Returns:
A String representing the measure in the canonical unit.
See Also:
Units

main

public static void main(java.lang.String[] args)
Test construction from string.