getIntervalFlights: Retrieve all flights registered during a time interval

Description Usage Arguments Value References Examples

View source: R/openSkies_getFlightsFunctions.R

Description

Retrieves the list of all flights registered for any aircraft during a given time interval. Beginning and end times must be specified as date-time strings in any format that can be unambiguously converted to POSIXct (such as YYYY-MM-DD HH:MM:SS).

Usage

1
2
3
4
getIntervalFlights(startTime, endTime, timeZone=Sys.timezone(), username=NULL, 
                   password=NULL, includeStateVectors=FALSE, 
                   timeResolution=NULL, useImpalaShell=FALSE, 
                   includeAirportsMetadata=FALSE)

Arguments

startTime

date-time string indicating the starting time of the interval for which flights should be retrieved. Must be in a format that can be unambiguously converted into POSIXct time. Valid examples are \"2011-03-27 01:30:00\" and \"2011/03/27 01:30:00\".

endTime

date-time string indicating the ending time of the interval for which flights should be retrieved. Must be in a format that can be unambiguously converted into POSIXct time. Valid examples are \"2011-03-28 01:30:00\" and \"2011/03/28 01:30:00\".

timeZone

string with the name of the time zone for startTime and endTime. For details on supported time zones, see help(timezones). By default, the system time zone is used.

username

optional string with the username to use for authentication for the OpenSky API. By default, no authentication is performed.

password

optional string with the password to use for authentication for the OpenSky API. By default, no authentication is performed.

includeStateVectors

logical indicating if the set of state vectors for each flight should also be retrieved. By default, state vectors are not retrieved.

timeResolution

time resolution in seconds with which state vectors should be retrieved if includeStateVectors=TRUE.

useImpalaShell

logical indicating whether or not to use the OpenSky impala shell instead of the API to retrieve state vectors if includeStateVectors=TRUE. If used, the provided username and password are used for the ssh connection. By default, the impala shell is not used.

includeAirportsMetadata

logical indicating if the data about the origin and destination airports of each flight should also be retrieved. If not, only the ICAO24 code of the airports will be included.

Value

A list of objects of class openSkiesFlight, where each object represents a flight that was registered during the specified time interval. See the openSkiesFlight documentation for details on the fields for the class.

References

https://opensky-network.org/apidoc/rest.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Obtain a list with information for all the flights registered during the 16th
# of November, 2019 between 9 AM and 10 AM, London time.

if(interactive()){
flights <- getIntervalFlights(startTime="2019-11-16 09:00:00", 
endTime="2019-11-16 10:00:00", timeZone="Europe/London")

# Count the number of registered flights.

length(flights)
}

openSkies documentation built on April 17, 2021, 9:06 a.m.