faa.tg.nas.fix
Class Fix

java.lang.Object
  extended by faa.tg.nas.fix.Fix
All Implemented Interfaces:
DraStorable, HasTextXY, TextWritable, HasName, HasPosition, Filterable, Recordable, ManagedObject, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Airport, DME, EramFix, FixRadialDistance, GroundFix, Intersection, LatLongFix, NDB, SimFix, TACAN, VOR, VORDME, VORTAC, Waypoint

public abstract class Fix
extends java.lang.Object
implements HasName, HasPosition, TextWritable, HasTextXY, DraStorable

 Fix is an abstract class representing a National Airspace System (NAS)
 fix for designating a navigational position.
 
See the source: AbstractFix.java

Version:
$Id: Fix.java,v 3.8 2008/10/20 16:23:13 lykensj Exp $
Author:
Dan Warburton, FAA/ACT-510
See Also:
Fix, Serialized Form

Field Summary
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
private  java.lang.String icaoCode
          The ico code for this fix
protected  MagneticDeclination magDec
           
private  java.lang.String name
          The identifier for the fix.
private  Position position
          Position marks the three dimensional location of the fix.
private  HoldingPattern publishedHold
           
(package private) static long serialVersionUID
           
 
Constructor Summary
Fix(java.lang.String name, Position position)
          Creates a Fix object from a name and a Position (magnetic declination is set to null).
Fix(java.lang.String name, Position position, MagneticDeclination magDec)
          Creates a Fix object from a name, position, and magnetic declination.
 
Method Summary
 Fix clone()
          Return a clone of this fix.
 boolean equals(java.lang.Object other)
           
 java.lang.String getIcaoCode()
           
 MagneticDeclination getMagneticDeclination()
           
 java.lang.String getName()
          Represents a unique instance of a class: objects should either be the only object of a class with that name, or should replace obsolete objects of that name.
 Position getPosition()
           
 HoldingPattern getPublishedHoldIfApplicable()
          returns the published hold, or null if there is none
 VorNavAid getVorNavAid()
           
 int hashCode()
           
 void setIcaoCode(java.lang.String icaoCode)
           
 void setPublishedHold(HoldingPattern hold)
           
 java.lang.String toDraText()
          Prints Fix information to a String.
 java.lang.String toDraText(MapProjection projection, DistanceUnits dUnits)
          Returns the DistSecond information as a DR&A text String: if the parameter passed is TRUE, then text contains xy-coordinates to describe the location instead of latitude/longitude.
 java.lang.String toString()
          Returns the Fix information as a String.
 
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

name

private final java.lang.String name
The identifier for the fix.


icaoCode

private java.lang.String icaoCode
The ico code for this fix


position

private final Position position
Position marks the three dimensional location of the fix.


magDec

protected MagneticDeclination magDec

publishedHold

private HoldingPattern publishedHold
Constructor Detail

Fix

public Fix(java.lang.String name,
           Position position)
Creates a Fix object from a name and a Position (magnetic declination is set to null).

Parameters:
name - The name of the fix.
position - The location of the fix.

Fix

public Fix(java.lang.String name,
           Position position,
           MagneticDeclination magDec)
Creates a Fix object from a name, position, and magnetic declination.

Parameters:
name - The name of the fix.
position - The location of the fix.
magDec - The magnetic declination of the fix.
Method Detail

setPublishedHold

public void setPublishedHold(HoldingPattern hold)

getPublishedHoldIfApplicable

public HoldingPattern getPublishedHoldIfApplicable()
returns the published hold, or null if there is none


getName

public java.lang.String getName()
Description copied from interface: ManagedObject
Represents a unique instance of a class: objects should either be the only object of a class with that name, or should replace obsolete objects of that name.

Specified by:
getName in interface DraStorable
Specified by:
getName in interface ManagedObject
Returns:
Returns the name of the object.

getPosition

public Position getPosition()
Specified by:
getPosition in interface HasPosition
Returns:
Returns the position of the object.

getMagneticDeclination

public MagneticDeclination getMagneticDeclination()
                                           throws NoMagneticDeclinationException
Throws:
NoMagneticDeclinationException

getVorNavAid

public VorNavAid getVorNavAid()

clone

public Fix clone()
Return a clone of this fix.

Specified by:
clone in interface DraStorable
Overrides:
clone in class java.lang.Object
Returns:
Returns a clone of the object.

toDraText

public java.lang.String toDraText(MapProjection projection,
                                  DistanceUnits dUnits)
Returns the DistSecond information as a DR&A text String: if the parameter passed is TRUE, then text contains xy-coordinates to describe the location instead of latitude/longitude.

Specified by:
toDraText in interface HasTextXY
Parameters:
projection - Projection to use if writing location in xy-coords.
dUnits - DistanceUnits to use if writing location in xy-coords.
Returns:
Returns the AircraftState information in TextWritable format.

toDraText

public java.lang.String toDraText()
Prints Fix information to a String.

Specified by:
toDraText in interface TextWritable
Returns:
Returns the DR&A information in string format.

toString

public java.lang.String toString()
Returns the Fix information as a String.

Overrides:
toString in class java.lang.Object

getIcaoCode

public java.lang.String getIcaoCode()

setIcaoCode

public void setIcaoCode(java.lang.String icaoCode)

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object