Class RouteEntry
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.acars.ACARSMapEntry
org.deltava.beans.acars.RouteEntry
- 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:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.deltava.beans.acars.ACARSMapEntry
ACARSMapEntry.EntryType
-
Field Summary
Fields inherited from class org.deltava.beans.acars.ACARSMapEntry
_betaBuild, _busy, _clientBuild, _pos, _usr
Fields inherited from interface org.deltava.beans.GeoLocation
ALL, DEGREE_FEET, DEGREE_MILES, FEET_MILES, LAT_DIRECTIONS, LATITUDE, LON_DIRECTIONS, LONGITUDE, RADIAN_MILES
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
RouteEntry
(GeoLocation loc, Instant dt) Creates a new ACARS Route Entry bean. -
Method Summary
Modifier and TypeMethodDescriptionint
Compares two route entries by comparing their date/times.Returns the type of Airspace covering the current position.int
Returns the aircraft's airspeed.int
Returns the aircraft's atltiude above sea level.getDate()
Returns the date/time of this entry.int
getFlags()
Returns the ACARS flags for this entry.int
Returns the amount of fuel remaining on the aircraft.int
Returns the aircraft's ground speed.int
Returns the aircraft's heading.Returns the icon color for this entry if displayed in a Google Map.Returns the text to display in this marker's infobox if displayed in a Google Map.double
getMach()
Returns the aircraft's Mach number.getPhase()
Returns the flight phase.abstract int
Returns the aircraft's altitude above ground level, if implemented.final ACARSMapEntry.EntryType
getType()
Returns the map entry type.abstract Collection
<Warning> Returns the warning message.int
Returns the ambient wind heading.int
Returns the ambient wind speed.boolean
isFlagSet
(ACARSFlags flag) Returns if an ACARS flag was set.boolean
Marks this route entry as having a notable flight parameter.void
Sets the Airspace type covering the current position.void
setAirSpeed
(int speed) Updates the aircraft's airspeed.void
setAltitude
(int alt) Updates the aircraft's altitude above sea level.void
setFlag
(ACARSFlags flag, boolean isSet) Sets or clears an ACARS flag.void
setFlags
(int flags) Sets all ACARS flags for this entry.void
setFuelRemaining
(int fuel) Updates the amount of fuel remaining on the aircraft.void
setGroundSpeed
(int speed) Updates the aircraft's ground speed.void
setHeading
(int hdg) Updates the aircraft's heading.void
setMach
(double mach) Updates the aircraft's Mach number.void
setPhase
(FlightPhase phase) Updates the flight phase.void
setWindHeading
(int hdg) Sets the ambient wind heading.void
setWindSpeed
(int speed) Sets the ambient wind speed.Methods inherited from class org.deltava.beans.acars.ACARSMapEntry
getLatitude, getLocation, getLongitude, getPilot, isBusy, setBusy, setClientBuild
Methods inherited from class org.deltava.beans.DatabaseBean
cacheKey, equals, getHexID, getID, hashCode, setID, validateID, validateID
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.deltava.beans.GeoLocation
distanceFeet, distanceTo, getLatitude, getLongitude
-
Constructor Details
-
RouteEntry
Creates a new ACARS Route Entry bean.- Parameters:
loc
- the aircraft's locationdt
- the date/time of this entry- See Also:
-
-
Method Details
-
getAltitude
public int getAltitude()Returns the aircraft's atltiude above sea level.- Specified by:
getAltitude
in interfaceGeospaceLocation
- 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
Returns the date/time of this entry.- Specified by:
getDate
in interfaceCalendarEntry
- Specified by:
getDate
in interfaceFuelChecker
- 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 interfaceFuelChecker
- Returns:
- the fuel in pounds
- See Also:
-
getPhase
-
getAirspace
Returns the type of Airspace covering the current position.- Returns:
- an AirspaceType enumeration
- See Also:
-
getType
Description copied from class:ACARSMapEntry
Returns the map entry type.- Specified by:
getType
in classACARSMapEntry
- Returns:
- the EntryType
-
isFlagSet
Returns if an ACARS flag was set.- Specified by:
isFlagSet
in interfaceFuelChecker
- 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
Updates the flight phase.- Parameters:
phase
- the FlightPhase- See Also:
-
setFlag
Sets or clears an ACARS flag.- Parameters:
flag
- the ACARSisSet
- 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:
-
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
-
compareTo
Compares two route entries by comparing their date/times.- Specified by:
compareTo
in interfaceComparable<Object>
- Overrides:
compareTo
in classDatabaseBean
- See Also:
-
getIconColor
Description copied from interface:MarkerMapEntry
Returns the icon color for this entry if displayed in a Google Map.- Specified by:
getIconColor
in interfaceMarkerMapEntry
- Returns:
- the icon color
-
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 interfaceMapEntry
- Returns:
- the infobox HTML text, or null if no infobox to be displayed
-