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
  • Constructor Details

    • PositionData

      public PositionData(Instant dt, GeoPosition pos)
      Initializes the bean with a date/time and a position.
      Parameters:
      dt - the date/time of the position entry
      pos - the position (not cloned)
  • Method Details

    • getAltitude

      public int getAltitude()
      Returns the aircraft's altitude.
      Specified by:
      getAltitude in interface GeospaceLocation
      Returns:
      the altitude in feet
    • getLatitude

      public double getLatitude()
      Returns the aircraft's latitude.
      Specified by:
      getLatitude in interface GeoLocation
      Returns:
      the latitude in degrees
    • getLongitude

      public double getLongitude()
      Returns the aircraft's longitude.
      Specified by:
      getLongitude in interface GeoLocation
      Returns:
      the longitude in degrees
    • getDate

      public Instant getDate()
      Returns the date/time of the position entry.
      Returns:
      the date/time in UTC
    • 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 degrees
      lng - the longitude in degrees
      alt - 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

      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
    • 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
    • compareTo

      public int compareTo(PositionData pd2)
      Specified by:
      compareTo in interface Comparable<PositionData>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object