| openSkiesFlight {openSkies} | R Documentation |
An R6Class object representing a specific flight
Description
R6Class object representing a specific flight performed by a
certain aircraft. Contains information about the aircraft that performed the
flight, the airports of origin and destination, the times of departure and
arrival and the callsign under which the flight was performed. New instances can be manually created by providing values for at least the fields ICAO24, departure_time and arrival_time.
Alternatively, getAircraftFlights, getAirportDepartures,
getAirportArrivals getIntervalFlights will all
return lists of openSkiesFlight objects corresponding to the flights
that match the query conditions.
Usage
openSkiesFlight
Fields
ICAO24String with the ICAO 24-bit aicraft address associated to the aircraft in hexadecimal format
call_signString with callsign under which the flight was performed
state_vectorsObject of class
openSkiesStateVectorSetwith fieldtime_series = TRUEcontaining the state vectors received from the aircraft during the flightorigin_airportString with the ICAO 4-letter code of the airport of origin
destination_airportString with the ICAO 4-letter code of the destination airport
departure_timeString with the date and time at which the aircraft took off
arrival_timeString with the date and time at which the aircraft arrived at its destination
Methods
-
get_moment_state_vector(time, includeFuture = TRUE) -
This method retrieves the state vector closest with the timestamp closest to the provided time, which must be supplied as a date-time string. In the default behaviour,
includeFuture=TRUEand the retrieved vector will be the one with the closest timestamp, regardless of if this is earlier or later than the provided time. IfincludeFuture=FALSE, the closest earlier state vector will be retrieved.
,
-
get_duration() -
This method returns the duration of the flight in seconds
,
-
distance_to_flight(flight, numberSamples=15, samplesAggregationMethod="concatenated", method="euclidean", additionalFields=NULL) -
This method calculates the distance to the provided flight, which must be another object of class openSkiesFlight. Both openSkiesFlight objects will be resampled to the number of points specified by
numberSamples. IfsamplesAggregationMethod="concatenated", a vector of values indicating the distance between the flights at each point is returned. IfsamplesAggregationMethod="average", the average distance is returned. By default,method="euclidean"and euclidean distances are calculated. Other possible values ofmethodare all values accepted bydist. By default,additionalFields=NULL, and only latitude and longitude values will be included in the features vectors used to calculate distances. Additional fields can be specified by providing their names as a character vector throughadditionalFields. The names should be valid names of fields ofopenSkiesStateVectorobjects. -
detect_phases(time_window, use_baro_altitude = FALSE) -
This method detects the phases of the flight, applying the
findFlightPhasesfunction. A time window will be applied to calculate mean values of altitude, vertical rate and speed. Its length is provided in seconds through thetime_windowargument. Setting this value to 1 effectively disables the usage of a time window. By default,use_baro_altitude=FALSEand geo altitude values will be used to calculate the flight phases. Ifuse_baro_altitude=TRUE, barometric altitude values will be used instead.
Examples
# Create a list of openSkiesFlight objects corresponding to all the flights that
# landed at Frankfurt International Airport on the 29th of January, 2018 between
# 12 PM and 1 PM
if(interactive()){
test_flights <- getAirportArrivals(airport="EDDF", startTime="2018-01-29 12:00:00",
endTime="2018-01-29 13:00:00", timeZone="Europe/Berlin")
test_flights
}