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, _usrFields inherited from interface org.deltava.beans.GeoLocation
ALL, DEGREE_FEET, DEGREE_MILES, FEET_MILES, LAT_DIRECTIONS, LATITUDE, LON_DIRECTIONS, LONGITUDE, RADIAN_MILES -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRouteEntry(GeoLocation loc, Instant dt) Creates a new ACARS Route Entry bean. -
Method Summary
Modifier and TypeMethodDescriptionintCompares two route entries by comparing their date/times.Returns the type of Airspace covering the current position.intReturns the aircraft's airspeed.intReturns the aircraft's atltiude above sea level.getDate()Returns the date/time of this entry.intgetFlags()Returns the ACARS flags for this entry.intReturns the amount of fuel remaining on the aircraft.intReturns the aircraft's ground speed.intReturns 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.doublegetMach()Returns the aircraft's Mach number.getPhase()Returns the flight phase.abstract intReturns the aircraft's altitude above ground level, if implemented.final ACARSMapEntry.EntryTypegetType()Returns the map entry type.abstract Collection<Warning> Returns the warning message.intReturns the ambient wind heading.intReturns the ambient wind speed.booleanisFlagSet(ACARSFlags flag) Returns if an ACARS flag was set.booleanMarks this route entry as having a notable flight parameter.voidSets the Airspace type covering the current position.voidsetAirSpeed(int speed) Updates the aircraft's airspeed.voidsetAltitude(int alt) Updates the aircraft's altitude above sea level.voidsetFlag(ACARSFlags flag, boolean isSet) Sets or clears an ACARS flag.voidsetFlags(int flags) Sets all ACARS flags for this entry.voidsetFuelRemaining(int fuel) Updates the amount of fuel remaining on the aircraft.voidsetGroundSpeed(int speed) Updates the aircraft's ground speed.voidsetHeading(int hdg) Updates the aircraft's heading.voidsetMach(double mach) Updates the aircraft's Mach number.voidsetPhase(FlightPhase phase) Updates the flight phase.voidsetWindHeading(int hdg) Sets the ambient wind heading.voidsetWindSpeed(int speed) Sets the ambient wind speed.Methods inherited from class org.deltava.beans.acars.ACARSMapEntry
getLatitude, getLocation, getLongitude, getPilot, isBusy, setBusy, setClientBuildMethods inherited from class org.deltava.beans.DatabaseBean
cacheKey, equals, getHexID, getID, hashCode, setID, validateID, validateIDMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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:
getAltitudein 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:
getDatein interfaceCalendarEntry- Specified by:
getDatein 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:
getFuelRemainingin 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:ACARSMapEntryReturns the map entry type.- Specified by:
getTypein classACARSMapEntry- Returns:
- the EntryType
-
isFlagSet
Returns if an ACARS flag was set.- Specified by:
isFlagSetin 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:
compareToin interfaceComparable<Object>- Overrides:
compareToin classDatabaseBean- See Also:
-
getIconColor
Description copied from interface:MarkerMapEntryReturns the icon color for this entry if displayed in a Google Map.- Specified by:
getIconColorin interfaceMarkerMapEntry- Returns:
- the icon color
-
getInfoBox
Description copied from interface:MapEntryReturns the text to display in this marker's infobox if displayed in a Google Map.- Specified by:
getInfoBoxin interfaceMapEntry- Returns:
- the infobox HTML text, or null if no infobox to be displayed
-