8 Commits

Author SHA1 Message Date
eneller
c2700b16a2 refactor: switch API access
now using R bindings from eneller/openSkies instead of raw REST access
2026-01-19 12:37:35 +01:00
eneller
27813426ff begin slides 2026-01-19 10:42:12 +01:00
eneller
09783fd652 fix: add trajr 2026-01-19 09:35:58 +01:00
eneller
38a622a4cc build: add openSkies fork 2026-01-18 22:24:37 +01:00
eneller
b34213d8ec build: add trajr 2026-01-18 01:15:26 +01:00
eneller
73b4a52dd0 chore: cleanup
move to own github version of openSkies for new auth
2026-01-17 06:50:05 +01:00
eneller
526d1d06ed chore: src folder layout 2026-01-16 19:46:05 +01:00
eneller
172f7f8c27 Merge completed OpenSky access
Successfully implemented access to https://opensky-network.org, with
manual API auth

commit cb516d4dbd
Author: eneller <erikneller@gmx.de>
Date:   Fri Jan 16 19:36:08 2026 +0100

    chore: restore order

commit 3a73400ac8
Author: lukasadrion <lukas.adrion@uni-ulm.de>
Date:   Wed Jan 14 19:31:05 2026 +0100

    add oauth with openSkies api and plot one flight

commit bdf075353c
Author: lukasadrion <lukas.adrion@uni-ulm.de>
Date:   Mon Jan 5 14:17:16 2026 +0100

    update to flightV5

commit 09ca49ec99
Author: lukasadrion <lukas.adrion@uni-ulm.de>
Date:   Mon Jan 5 13:51:54 2026 +0100

    remove old csv file

commit c925a49c80
Author: lukasadrion <lukas.adrion@uni-ulm.de>
Date:   Mon Jan 5 13:49:56 2026 +0100

    download flight data and select flight BEL40V
2026-01-16 19:39:15 +01:00
7 changed files with 530 additions and 96 deletions

2
.gitignore vendored
View File

@@ -61,3 +61,5 @@ rsconnect/
*.pdf *.pdf
*.html *.html
bib bib
.env

View File

@@ -29,3 +29,5 @@ Use [renv](https://rstudio.github.io/renv/articles/renv.html) to install the cor
``` r ``` r
renv::restore() renv::restore()
``` ```
[OpenSky](https://opensky-network.org) access also requires credentials placed in a `.env` file, for which an example is provided in `.env.example`.

View File

@@ -1,15 +0,0 @@
---
title: "Topic 8"
output: html_document
date: "`r Sys.Date()`"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Download data
from OpenSky https://opensky-network.org/datasets/states/#flights/
```{r download}
library(openSkies)
```

506
renv.lock

File diff suppressed because it is too large Load Diff

2
src/.env.example Normal file
View File

@@ -0,0 +1,2 @@
OPENSKY_CLIENT_ID=changeme
OPENSKY_CLIENT_SECRET=changeme

66
src/main.Rmd Normal file
View File

@@ -0,0 +1,66 @@
---
title: "Topic 8"
output:
pdf_document: default
html_document: default
date: "`r Sys.Date()`"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r preamble, message=FALSE}
# Load Libraries
library(dplyr)
library(lubridate)
library(readr)
library(utils)
library(openSkies)
library(dotenv)
library(httr)
library(jsonlite)
library(trajr)
```
# Download flights
```{r opensky}
time_now <- Sys.time()
creds <- getCredentials(
client_id = Sys.getenv('OPENSKY_CLIENT_ID'),
client_secret = Sys.getenv('OPENSKY_CLIENT_SECRET'))
# get departures from Frankfurt airport
departures <- getAirportDepartures(airport = "EDDF", startTime = time_now - hours(1), endTime = time_now, credentials = creds )
getFlights <- function(icao, time, creds){
flights <-getAircraftFlights(icao, startTime = time - days(1), endTime = time, credentials = creds )
return(flights)
}
icao <- departures[[1]][["ICAO24"]]
flights <- getFlights(icao,Sys.time(), creds)
# TODO map from all available flights to tracks
query <- list(icao24= icao, time=as.numeric(flights[[1]][["departure_time"]]))
response <-makeAuthenticatedRequest('tracks/all',query, creds)
track_data <- fromJSON(content(response, as = "text", encoding = "UTF-8"))
if (!is.null(track_data$path) && length(track_data$path) > 0) {
route_df <- as.data.frame(track_data$path)
colnames(route_df) <- c("time", "lat", "lon", "alt", "heading", "on_ground")
message("Loading of route successfull! Points: ", nrow(route_df))
plot(route_df$lon, route_df$lat, type="o", pch=20, col="blue",
main=paste("Geographic route of", icao),
xlab="Longitude", ylab="Latitude")
plot(route_df$time, route_df$alt, type="l", col="red", lwd=2,
main=paste("Altitude profile of", icao),
xlab="Time (Unix)", ylab="Height (Meter)")
} else {
print("No path points from api")
}
```

33
src/slides.Rmd Normal file
View File

@@ -0,0 +1,33 @@
---
title: "Topic 8"
date: "`r Sys.Date()`"
output: beamer_presentation
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
# {cat, child="../README.md"}
```
## Task
Develop an R-based software, which will perform the following tasks:
1. download from the OpenSky Network online database the observations of the trajectory of a randomly selected aircraft on a randomly selected flight over at least five days, in uninterrupted continuity (1)
2. perform the selections in the graphical user interface (GUI) of your R script,
3. determine the characteristics of each trajectory according to the parameters: diffusion distance, straightness, duration of travel, mean travel velocity and fractal dimension (2),
4. using the R library trajr, (4) perform basic statistical analysis of the parameters of daily trajectories from (3): arithmetic mean, variance, quartiles, boxplot, estimate of the density function of the experimental statistical distribution, analyze and interpret them.
## Methodology
1. acquire data using the OpenSky API
2. use
## Contribution
- extended functionality of the `openSkies` R package and created a merge request