Class PositionData
java.lang.Object
org.deltava.beans.servinfo.PositionData
- All Implemented Interfaces:
Comparable<PositionData>, GeoLocation, GeospaceLocation, MapEntry, MarkerMapEntry
public class PositionData
extends Object
implements GeospaceLocation, MarkerMapEntry, Comparable<PositionData>
A bean to store ServInfo data for historical purposes.
- Since:
- 2.4
- Version:
- 12.3
- Author:
- Luke
-
Field Summary
Fields inherited from interface GeoLocation
ALL, DEGREE_FEET, DEGREE_MILES, FEET_MILES, LAT_DIRECTIONS, LATITUDE, LON_DIRECTIONS, LONGITUDE, RADIAN_MILESModifier and TypeFieldDescriptionstatic final intFormat the Longitude and Latitude.static final doubleSize of a degree in feet.static final doubleSize of a degree in miles.static final intSize of a mile in feet.static final String[]Latitude directions.static final intFormat the Latitude only.static final String[]Longitude directions.static final intFormat the Longitude only.static final intRadius of the Earth in miles.Fields inherited from interface MapEntry
BLUE, BROWN, COLORS, GREEN, GREY, ORANGE, PURPLE, RED, WHITE, YELLOWModifier and TypeFieldDescriptionstatic final StringBlue Google Maps icon, displayed as $static/img/maps/point_blue.pngstatic final StringBrown Google Maps icon, displayed as $static/img/maps/point_brown.pngstatic final String[]All Google Maps icon colors.static final StringGreen Google Maps icon, displayed as $static/img/maps/point_green.pngstatic final StringGrey Google Maps icon, displayed as $static/img/maps/point_grey.pngstatic final StringOrange Google Maps icon, displayed as $static/img/maps/point_orange.pngstatic final StringPurple Google Maps icon, displayed as $static/img/maps/point_purple.pngstatic final StringRed Google Maps icon, displayed as $static/img/maps/point_red.pngstatic final StringWhite Google Maps icon, displayed as $static/img/maps/point_white.pngstatic final StringYellow Google Maps icon, displayed as $static/img/maps/point_yellow.png -
Constructor Summary
ConstructorsConstructorDescriptionPositionData(Instant dt, GeoPosition pos) Initializes the bean with a date/time and a position. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(PositionData pd2) booleanintReturns the aircraft's airspeed.intReturns the aircraft's altitude.getDate()Returns the date/time of the position entry.intReturns the Flight Report ID for this entry.intReturns the aircraft 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.doubleReturns the aircraft's latitude.doubleReturns the aircraft's longitude.intReturns the Pilot ID.inthashCode()voidsetAirSpeed(int aSpeed) Updates the aircraft's airspeed.voidsetFlightID(int id) Sets the Flight Report ID for this entry.voidsetHeading(int hdg) Updates the aircraft's heading.voidsetPilotID(int id) Sets the Pilot ID for this entry.voidsetPosition(double lat, double lng, int alt) Sets the position for this entry.Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GeoLocation
distanceFeet, distanceToModifier and TypeMethodDescriptiondefault intCalculates the distance between two points in feet.default intCalculates the distance between two GeoLocations.
-
Constructor Details
-
PositionData
Initializes the bean with a date/time and a position.- Parameters:
dt- the date/time of the position entrypos- the position (not cloned)
-
-
Method Details
-
getAltitude
public int getAltitude()Returns the aircraft's altitude.- Specified by:
getAltitudein interfaceGeospaceLocation- Returns:
- the altitude in feet
-
getLatitude
public double getLatitude()Returns the aircraft's latitude.- Specified by:
getLatitudein interfaceGeoLocation- Returns:
- the latitude in degrees
-
getLongitude
public double getLongitude()Returns the aircraft's longitude.- Specified by:
getLongitudein interfaceGeoLocation- Returns:
- the longitude in degrees
-
getDate
-
getHeading
public int getHeading()Returns the aircraft heading.- Returns:
- the heading in degrees
-
getAirSpeed
public int getAirSpeed()Returns the aircraft's airspeed.- Returns:
- the airspeed in knots
-
getPilotID
public int getPilotID()Returns the Pilot ID.- Returns:
- the Pilot's database ID
-
getFlightID
public int getFlightID()Returns the Flight Report ID for this entry.- Returns:
- the Flight Report database ID, or zero if none
-
setPosition
public void setPosition(double lat, double lng, int alt) Sets the position for this entry.- Parameters:
lat- the latitude in degreeslng- the longitude in degreesalt- the altitude in feet MSL
-
setHeading
public void setHeading(int hdg) Updates the aircraft's heading.- Parameters:
hdg- the heading in degrees.
-
setAirSpeed
public void setAirSpeed(int aSpeed) Updates the aircraft's airspeed.- Parameters:
aSpeed- the airspeed in knots
-
setPilotID
public void setPilotID(int id) Sets the Pilot ID for this entry.- Parameters:
id- the Pilot's database ID
-
setFlightID
public void setFlightID(int id) Sets the Flight Report ID for this entry.- Parameters:
id- the Flight Report's database ID
-
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
-
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
-
compareTo
- Specified by:
compareToin interfaceComparable<PositionData>
-
hashCode
-
equals
-