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:
- 11.1
- Author:
- Luke
-
Field Summary
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
ConstructorsConstructorDescriptionPositionData
(Instant dt, GeoPosition pos) Initializes the bean with a date/time and a position. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(PositionData pd2) boolean
int
Returns the aircraft's airspeed.int
Returns the aircraft's altitude.getDate()
Returns the date/time of the position entry.int
Returns the Flight Report ID for this entry.int
Returns 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.double
Returns the aircraft's latitude.double
Returns the aircraft's longitude.int
Returns the Pilot ID.int
hashCode()
void
setAirSpeed
(int aSpeed) Updates the aircraft's airspeed.void
setFlightID
(int id) Sets the Flight Report ID for this entry.void
setHeading
(int hdg) Updates the aircraft's heading.void
setPilotID
(int id) Sets the Pilot ID for this entry.void
setPosition
(double lat, double lng, int alt) Sets the position for this entry.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
-
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:
getAltitude
in interfaceGeospaceLocation
- Returns:
- the altitude in feet
-
getLatitude
public double getLatitude()Returns the aircraft's latitude.- Specified by:
getLatitude
in interfaceGeoLocation
- Returns:
- the latitude in degrees
-
getLongitude
public double getLongitude()Returns the aircraft's longitude.- Specified by:
getLongitude
in 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: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
-
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
-
compareTo
- Specified by:
compareTo
in interfaceComparable<PositionData>
-
hashCode
-
equals
-