Class RouteEntry

java.lang.Object
All Implemented Interfaces:
Serializable, Comparable<Object>, FuelChecker, CalendarEntry, GeoLocation, GeospaceLocation, IDBean, MapEntry, MarkerMapEntry, Cacheable
Direct Known Subclasses:
ACARSRouteEntry, XARouteEntry

public abstract class RouteEntry extends ACARSMapEntry implements GeospaceLocation, CalendarEntry, FuelChecker
A bean to store a snapshot of an ACARS-logged flight.
Since:
1.0
Version:
8.5
Author:
Luke
See Also:
  • Constructor Details

  • Method Details

    • getAltitude

      public int getAltitude()
      Returns the aircraft's atltiude above sea level.
      Specified by:
      getAltitude in interface GeospaceLocation
      Returns:
      the altitude in feet MSL
      See Also:
    • getHeading

      public int getHeading()
      Returns the aircraft's heading.
      Returns:
      the heading in degrees
      See Also:
    • getRadarAltitude

      public abstract int getRadarAltitude()
      Returns the aircraft's altitude above ground level, if implemented. Subclasses that do not implement this may return a negative number.
      Returns:
      the altitude in feet AGL, or a negative number
    • getFlags

      public int getFlags()
      Returns the ACARS flags for this entry.
      Returns:
      the flags
      See Also:
    • getDate

      public Instant getDate()
      Returns the date/time of this entry.
      Specified by:
      getDate in interface CalendarEntry
      Specified by:
      getDate in interface FuelChecker
      Returns:
      the date/time of this entry
      See Also:
    • getMach

      public double getMach()
      Returns the aircraft's Mach number.
      Returns:
      the Mach number
      See Also:
    • getWindSpeed

      public int getWindSpeed()
      Returns the ambient wind speed.
      Returns:
      the speed in knots
    • getWindHeading

      public int getWindHeading()
      Returns the ambient wind heading.
      Returns:
      the wind heading in degrees
    • getAirSpeed

      public int getAirSpeed()
      Returns the aircraft's airspeed.
      Returns:
      the airspeed in knots
      See Also:
    • getGroundSpeed

      public int getGroundSpeed()
      Returns the aircraft's ground speed.
      Returns:
      the ground speed in knots
      See Also:
    • getFuelRemaining

      public int getFuelRemaining()
      Returns the amount of fuel remaining on the aircraft.
      Specified by:
      getFuelRemaining in interface FuelChecker
      Returns:
      the fuel in pounds
      See Also:
    • getPhase

      public FlightPhase getPhase()
      Returns the flight phase.
      Returns:
      the phase code
      See Also:
    • getAirspace

      public AirspaceType getAirspace()
      Returns the type of Airspace covering the current position.
      Returns:
      an AirspaceType enumeration
      See Also:
    • getType

      public final ACARSMapEntry.EntryType getType()
      Description copied from class: ACARSMapEntry
      Returns the map entry type.
      Specified by:
      getType in class ACARSMapEntry
      Returns:
      the EntryType
    • isFlagSet

      public boolean isFlagSet(ACARSFlags flag)
      Returns if an ACARS flag was set.
      Specified by:
      isFlagSet in interface FuelChecker
      Parameters:
      flag - the ACARSFlag
      Returns:
      TRUE if the flag(s) were set, otherwise FALSE
      See Also:
    • setAltitude

      public void setAltitude(int alt)
      Updates the aircraft's altitude above sea level.
      Parameters:
      alt - the altitude in feet MSL
      Throws:
      IllegalArgumentException - if alt invalid input: '<' -300 or alt > 120000
      See Also:
    • setHeading

      public void setHeading(int hdg)
      Updates the aircraft's heading.
      Parameters:
      hdg - the heading in degrees
      Throws:
      IllegalArgumentException - if hdg invalid input: '<' 0 or hdg > 360
      See Also:
    • setAirSpeed

      public void setAirSpeed(int speed)
      Updates the aircraft's airspeed.
      Parameters:
      speed - the speed in knots
      Throws:
      IllegalArgumentException - if speed invalid input: '<' -20 or speed > 700
      See Also:
    • setGroundSpeed

      public void setGroundSpeed(int speed)
      Updates the aircraft's ground speed.
      Parameters:
      speed - the speed in knots
      Throws:
      IllegalArgumentException - if speed invalid input: '<' -5 or speed > 1600
      See Also:
    • setMach

      public void setMach(double mach)
      Updates the aircraft's Mach number.
      Parameters:
      mach - the Mach number
      Throws:
      IllegalArgumentException - if mach > 5.0
      See Also:
    • setFuelRemaining

      public void setFuelRemaining(int fuel)
      Updates the amount of fuel remaining on the aircraft.
      Parameters:
      fuel - the amount of fuel in pounds
      See Also:
    • setPhase

      public void setPhase(FlightPhase phase)
      Updates the flight phase.
      Parameters:
      phase - the FlightPhase
      See Also:
    • setFlag

      public void setFlag(ACARSFlags flag, boolean isSet)
      Sets or clears an ACARS flag.
      Parameters:
      flag - the ACARS
      isSet - TRUE if the flag is set, FALSE if it is cleared
      See Also:
    • setFlags

      public void setFlags(int flags)
      Sets all ACARS flags for this entry.
      Parameters:
      flags - the flags
      See Also:
    • setWindSpeed

      public void setWindSpeed(int speed)
      Sets the ambient wind speed.
      Parameters:
      speed - the speed in knots
      See Also:
    • setWindHeading

      public void setWindHeading(int hdg)
      Sets the ambient wind heading.
      Parameters:
      hdg - the heading in degrees
      See Also:
    • setAirspace

      public void setAirspace(AirspaceType at)
      Sets the Airspace type covering the current position.
      Parameters:
      at - the AirspaceType
      See Also:
    • isWarning

      public boolean isWarning()
      Marks this route entry as having a notable flight parameter.
      Returns:
      TRUE if the entry should be noted, otherwise FALSE
    • getWarnings

      public abstract Collection<Warning> getWarnings()
      Returns the warning message.
      Returns:
      the warning
    • compareTo

      public int compareTo(Object o2)
      Compares two route entries by comparing their date/times.
      Specified by:
      compareTo in interface Comparable<Object>
      Overrides:
      compareTo in class DatabaseBean
      See Also:
    • 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
    • getInfoBox

      public String getInfoBox()
      Description copied from interface: MapEntry
      Returns the text to display in this marker's infobox if displayed in a Google Map.
      Specified by:
      getInfoBox in interface MapEntry
      Returns:
      the infobox HTML text, or null if no infobox to be displayed