Class Runway

All Implemented Interfaces:
Serializable, Cloneable, Comparable<NavigationDataBean>, ComboAlias, GeoLocation, IconMapEntry, MapEntry, MarkerMapEntry, Cacheable
Direct Known Subclasses:
RunwayDistance, RunwayUse

public class Runway extends NavigationFrequencyBean implements ComboAlias
A bean to store Runway information.
Since:
1.0
Version:
11.1
Author:
Luke
See Also:
  • Constructor Details

    • Runway

      public Runway(double lat, double lon)
      Creates a new Runway bean.
      Parameters:
      lat - the latitude of the start of the runway
      lon - the longitude of the start of the runway
  • Method Details

    • getLength

      public int getLength()
      Returns the length of the runway.
      Returns:
      the length in feet
      See Also:
    • getWidth

      public int getWidth()
      Returns the width of the runway.
      Returns:
      the width in feet
      See Also:
    • getHeading

      public int getHeading()
      Returns the runway heading.
      Returns:
      the heading in degrees
      See Also:
    • getThresholdLength

      public int getThresholdLength()
      Returns the length of the runway threshold.
      Returns:
      the length in feet
      See Also:
    • getThreshold

      public MapEntry getThreshold()
      Returns the postion of the displaced runway threshold, if any.
      Returns:
      the GeoLocation of the threshold
    • getSurface

      public Surface getSurface()
      Returns the runway surface type.
      Returns:
      the Surface
      See Also:
    • getMagVar

      public double getMagVar()
      Returns the magnetic variation at the runway location.
      Returns:
      the variation in degrees
      See Also:
    • getAlternateCode

      public String getAlternateCode()
      Returns the alternate code for this Runway.
      Returns:
      the alternet code, or null if none
      See Also:
    • isAltNew

      public boolean isAltNew()
      Returns if the alternate code is the newer code for the Runway.
      Returns:
      TRUE if the newer code, otherwise FALSE
    • getSimulator

      public Simulator getSimulator()
      Returns the simulator this runway exists in.
      Returns:
      a Simulator
      See Also:
    • setLength

      public void setLength(int len)
      Updates the length of the runway.
      Parameters:
      len - the length in feet
      See Also:
    • setWidth

      public void setWidth(int w)
      Updates the width of the runway.
      Parameters:
      w - the width in feet
      See Also:
    • setThresholdLength

      public void setThresholdLength(int len)
      Updates the length of the runway threshold.
      Parameters:
      len - the length in feet
      See Also:
    • setHeading

      public void setHeading(int hdg)
      Updates the runway heading.
      Parameters:
      hdg - the heading in degrees
      See Also:
    • setSurface

      public void setSurface(Surface s)
      Updates the runway surface type.
      Parameters:
      s - the Surface
      See Also:
    • setSimulator

      public void setSimulator(Simulator sim)
      Updates the Simulator which this runway exists in.
      Parameters:
      sim - a Simulator, or UNKNOWN for any
      See Also:
    • setMagVar

      public void setMagVar(double mv)
      Updates the magnetic variation at the runway location.
      Parameters:
      mv - the variation in degrees
      See Also:
    • setAlternateCode

      public void setAlternateCode(String altCode, boolean isNew)
      If this runway has been renumbered, the other runway code.
      Parameters:
      altCode - the previous runway code, or null if none
      isNew - TRUE if a newer code for the runway, otherwise FALSE
    • contains

      public boolean contains(GeoLocation loc)
      Returns if a particular point is on this runway.
      Parameters:
      loc - a GeoLocation
      Returns:
      TRUE if on the runway, otherwise FALSE
    • getIconColor

      public String getIconColor()
      Description copied from interface: MarkerMapEntry
      Returns the icon color for this entry if displayed in a Google Map.
      Specified by:
      getIconColor in interface MarkerMapEntry
      Returns:
      the icon color
    • getPaletteCode

      public int getPaletteCode()
      Description copied from interface: IconMapEntry
      Returns the Google Earth palette code.
      Specified by:
      getPaletteCode in interface IconMapEntry
      Returns:
      the palette code
    • getIconCode

      public int getIconCode()
      Description copied from interface: IconMapEntry
      Returns the Google Earth icon code.
      Specified by:
      getIconCode in interface IconMapEntry
      Returns:
      the icon code within the palette
    • equals

      public boolean equals(Runway r2)
      Compares two Runways by comparing their airport and runway codes.
      Parameters:
      r2 - the Runway
      Returns:
      TRUE if the airport and runway codes match, otherwise FALSE
    • matches

      public boolean matches(String rwCode)
      Returns whether a runway code matches the current or alternate codes used for this Runway.
      Parameters:
      rwCode - the runway code
      Returns:
      TRUE if the code matches the current code, alternate code or "ALL", otherwise FALSE
    • getInfoBox

      public String getInfoBox()
      Description copied from class: NavigationFrequencyBean
      Returns the default Google Maps infobox text.
      Specified by:
      getInfoBox in interface MapEntry
      Overrides:
      getInfoBox in class NavigationFrequencyBean
      Returns:
      an HTML String
    • getComboName

      public String getComboName()
      Description copied from interface: ComboAlias
      Returns the visible name to use in the HTML <OPTION> element.
      Specified by:
      getComboName in interface ComboAlias
      Returns:
      The visible name for this entry
    • getComboAlias

      public String getComboAlias()
      Description copied from interface: ComboAlias
      Returns the alias to use in the HTML <OPTION> element.
      Specified by:
      getComboAlias in interface ComboAlias
      Returns:
      The alias for this entry
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class NavigationDataBean
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class NavigationDataBean