knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of osn is to provide access to OpeSky Network historical data.
Once published, you will be able to install the released version of osn from CRAN with:
install.packages("osn")
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("espinielli/osn")
osn
uses the logger
package to write log messages to the console by default
with the following log level standards:
TRACE writes the query results in the file `query_output.txt`. DEBUG logs the Impala query being submitted. INFO currently not used WARN currently not used ERROR currently not used FATAL currently not used
If you want to update the default log level threshold,
use the package name for the namespace argument of log_threshold
from the logger
package, e.g. to enable all log messages:
library(logger) log_threshold(TRACE, namespace = 'osn')
The following example shows how to retrieve one hour worth of
State Vector data within a bounding box^[40 nautical miles around
EDDF's reference point at E8°34.23', N50°2.00'] around Frankfurt
airport for an hour interval, 09:00 - 10:00 UTC, on Jan 1, 2019
(we just pick a couple of aircraft, see icao24
):
library(osn) session <- osn_connect("youraccount") # EDDF state_vector( session, icao24 = c("3c6589", "3c6757"), wef = "2019-01-01 09:00:00", til = "2019-01-01 10:00:00", bbox = c(xmin = 7.553013, ymin = 49.378819, xmax = 9.585482, ymax = 50.688044) ) #> # A tibble: 108,470 x 17 time icao24 lat lon velocity heading vertrate callsign onground alert spi squawk <int> <fct> <dbl> <dbl> <dbl> <dbl> <dbl> <fct> <lgl> <lgl> <lgl> <fct> 1 1.55e9 06a063 50.4 7.56 272. 101. 0 QTR006 FALSE FALSE FALSE 4734 2 1.55e9 06a063 50.4 7.56 272. 101. 0 QTR006 FALSE FALSE FALSE 4734 3 1.55e9 06a063 50.4 7.56 272. 101. 0 QTR006 FALSE FALSE FALSE 4734 4 1.55e9 06a063 50.4 7.57 272. 101. 0 QTR006 FALSE FALSE FALSE 4734 # … with 108,466 more rows, and 5 more variables: baroaltitude <dbl>, geoaltitude <dbl>, # lastposupdate <dbl>, lastcontact <dbl>, hour <int>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.