Class Pilot
java.lang.Object
org.deltava.beans.servinfo.NetworkUser
org.deltava.beans.servinfo.ConnectedUser
org.deltava.beans.servinfo.Pilot
- All Implemented Interfaces:
Serializable, Comparable<NetworkUser>, GeoLocation, GeospaceLocation, MapEntry, MarkerMapEntry, RoutePair, ViewEntry
A bean to store online Pilot information.
- Since:
- 1.0
- Version:
- 12.3
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class NetworkUser
NetworkUser.TypeNested classes/interfaces inherited from interface RoutePair
RoutePair.RoutePairImplModifier and TypeInterfaceDescriptionstatic classHelper class when all you need is a naked RoutePair. -
Field Summary
Fields inherited from class ConnectedUser
_positionFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a point to the collection of waypoints.voidAdds multiple waypoints to the collection of waypoints.Returns the arrival Airport.Returns the departure Airport.intReturns the altitude of the location above MSL.Returns the User's Flight Plan comments.Returns the User's equipment code.intReturns the User's ground speed.intReturns the Pilot'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.final RatingReturns the Controller's rating.getRoute()Returns the Pilot's filed route.final NetworkUser.TypegetType()Returns the user type.Returns the flight waypoints.booleanReturns if this Pilot should be highlighted.booleanReturns whether both airports are populated.booleanReturns if the waypoint collection has been populated.voidsetAirportA(Airport aa) Updates the destination Airport.voidsetAirportD(Airport ad) Updates the origin Airport.voidsetAltitude(int alt) Updates the Pilot's altitude.voidsetComments(String comments) Updates the Pilot's flight plan comments.voidsetEquipmentCode(String eqCode) Updates the Pilot's equipment code.voidsetGroundSpeed(int gSpeed) Updates the Pilot's ground speed.voidsetHeading(int hdg) Updates the Pilot's heading.voidsetHighlighted(boolean isHighlighted) Marks this online Pilot as highlighted.final voidSets the Users's rating.voidUpdates the Pilot's filed waypoints.Methods inherited from class ConnectedUser
getCallsign, getLatitude, getLoginTime, getLongitude, getPosition, getServer, hasLocation, setCallsign, setLoginTime, setPosition, setServerModifier and TypeMethodDescriptionReturns the user's callsign.final doubleReturns the latitude of this location.Returns the date/time of the user's connection.final doubleReturns the longitude of this location.Returns the User's current position.Returns the FSD Server this user is connected to.booleanReturns if the User has a location set.voidsetCallsign(String cs) Updates the user's callsign.voidsetLoginTime(Instant dt) Updates the date/time of the user's last connection.voidsetPosition(double lat, double lon) Updates the User's position.voidUpdates the FSD Server this user is connected to.Methods inherited from class NetworkUser
compareTo, equals, getFirstName, getID, getLastName, getName, getNetwork, getPilotID, getRowClassName, hashCode, setFirstName, setLastName, setName, setPilotID, toStringModifier and TypeMethodDescriptionintcompareTo(NetworkUser usr2) booleanReturns the user's first name.intgetID()Returns the user's network ID.Returns the user's last name.getName()Returns the user's full name.Returns the Online Network for this user.intReturns the Database ID of this network user.Returns the CSS class for this object if rendered in a view table.inthashCode()voidsetFirstName(String fName) Updates the user's first name.voidsetLastName(String lName) Updates the user's last name.voidUpdates the network user's name, stripping off the home airport.voidsetPilotID(int id) Updates the database ID of this User.toString()Methods inherited from interface GeoLocation
distanceFeet, distanceToModifier and TypeMethodDescriptiondefault intCalculates the distance between two points in feet.default intCalculates the distance between two GeoLocations.Methods inherited from interface RoutePair
createKey, getAirports, getDistance, getFlightType, includes, matches, midPointModifier and TypeMethodDescriptiondefault StringReturns a key that describes the route pair.Returns the airports in this Route Pair.default intReturns the distance between the Airports.default FlightTypeReturns the flight type for customs/gate purposes.default booleanReturns whether this RoutePair includes a particular IATA or ICAO code.default booleanReturns whether this RoutePair matches a particular Route Pair.default GeoLocationmidPoint()Returns the midpoint between the two Airports on a Great Circle route.
-
Constructor Details
-
Pilot
Initializes the bean with a given user ID.- Parameters:
id- the user IDnet- the OnlineNetwork
-
-
Method Details
-
getAirportA
Description copied from interface:RoutePairReturns the arrival Airport.- Specified by:
getAirportAin interfaceRoutePair- Returns:
- the arrival Airport
-
getAirportD
Description copied from interface:RoutePairReturns the departure Airport.- Specified by:
getAirportDin interfaceRoutePair- Returns:
- the departure Airport
-
getAltitude
public int getAltitude()Description copied from interface:GeospaceLocationReturns the altitude of the location above MSL.- Specified by:
getAltitudein interfaceGeospaceLocation- Returns:
- the altitude in feet
-
isPopulated
public boolean isPopulated()Description copied from interface:RoutePairReturns whether both airports are populated.- Specified by:
isPopulatedin interfaceRoutePair- Returns:
- TRUE if both Airports are set, otherwise FALSE
-
getComments
Returns the User's Flight Plan comments.- Returns:
- the comments
- See Also:
-
getEquipmentCode
Returns the User's equipment code.- Returns:
- the equipment code
- See Also:
-
getGroundSpeed
public int getGroundSpeed()Returns the User's ground speed.- Returns:
- the ground speed in knots
- See Also:
-
getHeading
public int getHeading()Returns the Pilot's heading.- Returns:
- the heading in degrees
- See Also:
-
getType
Description copied from class:NetworkUserReturns the user type.- Specified by:
getTypein classNetworkUser- Returns:
- the Type
-
getRating
Description copied from class:NetworkUserReturns the Controller's rating.- Overrides:
getRatingin classNetworkUser- Returns:
- the Rating
- See Also:
-
getRoute
-
isRoutePopulated
public boolean isRoutePopulated()Returns if the waypoint collection has been populated.- Returns:
- TRUE if the waypoints have been loaded, otherwise FALSE
-
isHighlighted
public boolean isHighlighted()Returns if this Pilot should be highlighted.- Returns:
- TRUE if the Pilot is highlighted, otherwise FALSE
- See Also:
-
setAltitude
public void setAltitude(int alt) Updates the Pilot's altitude.- Parameters:
alt- the altitude in feet above Mean Sea Level- See Also:
-
setAirportA
Updates the destination Airport.- Parameters:
aa- the destination Airport- See Also:
-
setAirportD
Updates the origin Airport.- Parameters:
ad- the origin Airport- See Also:
-
setComments
Updates the Pilot's flight plan comments.- Parameters:
comments- the flight plan comments- See Also:
-
setEquipmentCode
Updates the Pilot's equipment code.- Parameters:
eqCode- the equipment code- See Also:
-
setGroundSpeed
public void setGroundSpeed(int gSpeed) Updates the Pilot's ground speed.- Parameters:
gSpeed- the ground speed in knots- See Also:
-
setHeading
public void setHeading(int hdg) Updates the Pilot's heading.- Parameters:
hdg- the heading in degrees- See Also:
-
setRoute
Updates the Pilot's filed waypoints.- Parameters:
route- a space-delimited string- Throws:
NullPointerException- if route is null- See Also:
-
addWaypoints
Adds multiple waypoints to the collection of waypoints.- Parameters:
nds- a Collection of NavigationDataBeans
-
setHighlighted
public void setHighlighted(boolean isHighlighted) Marks this online Pilot as highlighted.- Parameters:
isHighlighted- TRUE if the Pilot is highlighted, otherwise FALSE- See Also:
-
setRating
Description copied from class:NetworkUserSets the Users's rating.- Overrides:
setRatingin classNetworkUser- Parameters:
r- the Rating- See Also:
-
getWaypoints
Returns the flight waypoints.- Returns:
- a List of GeoLocations
-
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
-