openSkiesFlight: An 'R6Class' object representing a specific flight

Description Usage Fields Methods Examples


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.





String with the ICAO 24-bit aicraft address associated to the aircraft in hexadecimal format


String with callsign under which the flight was performed


Object of class openSkiesStateVectorSet with field time_series = TRUE containing the state vectors received from the aircraft during the flight


String with the ICAO 4-letter code of the airport of origin


String with the ICAO 4-letter code of the destination airport


String with the date and time at which the aircraft took off


String with the date and time at which the aircraft arrived at its destination


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=TRUE and the retrieved vector will be the one with the closest timestamp, regardless of if this is earlier or later than the provided time. If includeFuture=FALSE, the closest earlier state vector will be retrieved.



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. If samplesAggregationMethod="concatenated", a vector of values indicating the distance between the flights at each point is returned. If samplesAggregationMethod="average", the average distance is returned. By default, method="euclidean" and euclidean distances are calculated. Other possible values of method are all values accepted by dist. 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 through additionalFields. The names should be valid names of fields of openSkiesStateVector objects.

detect_phases(time_window, use_baro_altitude = FALSE)

This method detects the phases of the flight, applying the findFlightPhases function. A time window will be applied to calculate mean values of altitude, vertical rate and speed. Its length is provided in seconds through the time_window argument. Setting this value to 1 effectively disables the usage of a time window. By default, use_baro_altitude=FALSE and geo altitude values will be used to calculate the flight phases. If use_baro_altitude=TRUE, barometric altitude values will be used instead.


# 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

test_flights <- getAirportArrivals(airport="EDDF", startTime="2018-01-29 12:00:00", 
endTime="2018-01-29 13:00:00", timeZone="Europe/Berlin")

openSkies documentation built on Dec. 19, 2021, 5:10 p.m.