| Title: | Estimate impact of space debris reentries on aviation |
|---|---|
| Description: | Functions to help prepare the data and plots for the DASC 2025 paper "Preparing for Potential Closure of European Airspaces due to Re-entering Space Objects". |
| Authors: | Enrico Spinielli [aut, cre] (ORCID: <https://orcid.org/0000-0001-8584-9131>), EUROCONTROL [cph, fnd] |
| Maintainer: | Enrico Spinielli <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.3.0 |
| Built: | 2026-12-06 09:12:49 UTC |
| Source: | https://github.com/euctrl-pru/aviodebris |
Aircraft type info
aircraft_typesaircraft_types
A data frame with 322 rows and 15 columns:
icao: the ICAO aircraft type code.
name: the aircraft type name.
manufacturer: the manufacturer.
type: the type, i.e. L2J for Landplane 2 Jet engines craft
wtc: Wake Turbulence Category
...: the rest
Approximate bounding box for NM area
bbox_nm()bbox_nm()
bounding box for NM area
Return the bounding box of the H3 hexagons covering a user bounding box.
bbox_of_hexes_for_bbox_at_res(bbox, resolution)bbox_of_hexes_for_bbox_at_res(bbox, resolution)
bbox |
the user bounding box |
resolution |
the resolution of the H3 hexagons covering |
the bounding box containing the H3 hexagons covering bbox
The additional orbital elements provide calculations for perfectly circular and equatorial orbits.
coe2rv( p, ecc, incl, raan, argp, nu = 0, arglat = 0, truelon = 0, lonper = 0, mu = GRAVITATIONAL_CONSTANT_EARTH )coe2rv( p, ecc, incl, raan, argp, nu = 0, arglat = 0, truelon = 0, lonper = 0, mu = GRAVITATIONAL_CONSTANT_EARTH )
p |
semilatus rectum, |
ecc |
eccentricity, |
incl |
inclination, |
raan |
right ascension of ascending node, i.e. the longitude of
the ascending node, |
argp |
argument of perigee, |
nu |
true anomaly, |
arglat |
argument of latitude (for circular inclined orbit),
|
truelon |
true longitude (for circular equatorial orbit),
|
lonper |
longitude of periapsis (for elliptical equatorial orbit),
|
mu |
gravitational parameter, default to Earth's, [km^3/s^2] |
a list with r [km] and v [km/s]. For a single orbit these are
named vectors (i, j, k and vi, vj, vk); when any element has
length n > 1 they are n x 3 matrices with those column names.
All elements are recycled to a common length (1 or n).
## Not run: p <- 11067.790 # km ecc <- 0.83285 incl <- 87.87 * pi / 180 # rad raan <- 227.89 * pi / 180 # rad argp <- 53.38 * pi / 180 nu <- 92.335 * pi / 180 coe2rv(p, ecc, incl, raan, argp, nu) ## End(Not run)## Not run: p <- 11067.790 # km ecc <- 0.83285 incl <- 87.87 * pi / 180 # rad raan <- 227.89 * pi / 180 # rad argp <- 53.38 * pi / 180 nu <- 92.335 * pi / 180 coe2rv(p, ecc, incl, raan, argp, nu) ## End(Not run)
Calculate hourly collision and casualty risk expectation
collision_and_casualty_risk_expectation_hourly(day, resolution = 3L)collision_and_casualty_risk_expectation_hourly(day, resolution = 3L)
day |
date to calculate for |
resolution |
H3 hex resolution |
(invisibly) a data frame with hourly collision_expectation and
casualty_risk per cell. Called for its side effect of writing
data/collision_and_casualty_<YYYY-MM-DD>_res_<resolution>_hourly.parquet.
Determine the type of orbit based on eccentricity and inclination
determine_orbit_type(ecc, incl, tol = SMALL)determine_orbit_type(ecc, incl, tol = SMALL)
ecc |
the eccentricity of the orbit |
incl |
the inclination of the orbit [rad] |
tol |
SMALL value for tolerance |
a type of orbit such as - "circular_equatorial" - "circular_inclined" - "eph_equatorial" (elliptical, parabolic, hyperbolic equatorial) - "eph_inclined" (elliptical, parabolic, hyperbolic inclined)
This function finds both geodetic and geocentric latitude.
ecef2ll(r)ecef2ll(r)
r |
ECEF (I, J, K) position vector [km] |
a list of the following named values
* latgc: geocentric latitude of satellite, [rad]
* latgd: geodetic latitude of satellite, [rad]
* lon: longitude of satellite, [rad]
* hellp: height above the ellipsoid, [km]
## Not run: r <- c( i = 6524.834, j = 6862.875, k = 6448.296 ) res <- ecef2ll(r) ## End(Not run)## Not run: r <- c( i = 6524.834, j = 6862.875, k = 6448.296 ) res <- ecef2ll(r) ## End(Not run)
This function finds both geodetic and geocentric latitude. Algorithm by Borkowski, K. M. 1989. "Accurate Algorithms to Transform Geocentric to Geodetic Coordinates." Bulletin Geodesique Vol. 63: 50-56.
ecef2llb(r)ecef2llb(r)
r |
ECEF (I, J, K) position vector [km] |
a list of the following named values
* latgc: geocentric latitude of satellite, [rad]
* latgd: geodetic latitude of satellite, [rad]
* lon: longitude of satellite, [rad]
* hellp: height above the ellipsoid, [km]
## Not run: r <- c( i = 6524.834, j = 6862.875, k = 6448.296 ) # km res <- ecef2llb(r) ## End(Not run)## Not run: r <- c( i = 6524.834, j = 6862.875, k = 6448.296 ) # km res <- ecef2llb(r) ## End(Not run)
Effective Exposed Area
effective_exposed_areaeffective_exposed_area
A data frame with columns:
icao: the ICAO aircraft type code.
eea: the effective exposed area.
pax: the max number of passengers.
Keep only portions in the BBOX of the study
hexagonize_traffic( day, resolution = 3L, interval = 30L, bbox = c(xmin = -40.01297, ymin = 16.99059, xmax = 46.76206, ymax = 82.00901) )hexagonize_traffic( day, resolution = 3L, interval = 30L, bbox = c(xmin = -40.01297, ymin = 16.99059, xmax = 46.76206, ymax = 82.00901) )
day |
the date for the trajectories, it refers to the relevant
parquet file in |
resolution |
the H3 resolution |
interval |
resampling interval |
bbox |
a bounding box with names |
(invisibly) the trajectory points within bbox with added cell
and h3_resolution columns. Called for its side effect of writing
data/trajectories_<YYYY-MM-DD>_resampled_<interval>s_bbox_res_<resolution>.parquet.
H3 hexagons covering a bounding box.
hexes_for_bbox_at_res(bbox, resolution)hexes_for_bbox_at_res(bbox, resolution)
bbox |
bounding box to be covered by H3 hexagons |
resolution |
H3 hexagons' resolution |
simple features of H3 hexagons polygons and relevant addresses
convert from orbital elements to Cartesian coordinates
kepler_to_cartesian(nu, a, e, i, Omega, w, M = 5.9722e+24, m = 0)kepler_to_cartesian(nu, a, e, i, Omega, w, M = 5.9722e+24, m = 0)
nu |
the true anomaly, i.e. the angular displacement measured from periapsis to the position vector along the direction of motion [radians] |
a |
the semi-major axis of the orbit [m] |
e |
the eccentricity of the orbit |
i |
the inclination of the orbit [radians] |
Omega |
the Right ascension of the ascending node [radians] |
w |
the argument of perigee \[radians\] |
M |
the mass of the first body (more massive one), i.e. Earth, [kg] |
m |
the mass of the orbiting body (less massive), i.e. satellite, [kg]. In the case of m << M, m can be passed as 0 |
a vector with I, J, K, Vi, Vj, Vk of the values of position and velocity in a geocentric-equatorial reference system
## Not run: rE <- 6378e3 # Earth equatorial radius alt <- 550e3 # altitude of satellite, i.e. 500 km for LEO ecc <- 0 # circular orbit, i.e. when uncontrolled reentry of debris m <- 0 # mass of debris/satellite << mass Earth, so it can be 0 o <- 0 w <- 0 i <- 10 kepler_to_cartesian( nu = 0.5, a = rE + alt, e = ecc, i = i, Omega = o, w = w, m = m) ## End(Not run)## Not run: rE <- 6378e3 # Earth equatorial radius alt <- 550e3 # altitude of satellite, i.e. 500 km for LEO ecc <- 0 # circular orbit, i.e. when uncontrolled reentry of debris m <- 0 # mass of debris/satellite << mass Earth, so it can be 0 o <- 0 w <- 0 i <- 10 kepler_to_cartesian( nu = 0.5, a = rE + alt, e = ecc, i = i, Omega = o, w = w, m = m) ## End(Not run)
latitude weight for a space object circularly orbiting at 'inclination'
latitude_weights(delta_lat, altitude, inclination_deg, n = 10001L)latitude_weights(delta_lat, altitude, inclination_deg, n = 10001L)
delta_lat |
delta altitude [decimal degrees] |
altitude |
altitude of the orbiting space object [m] |
inclination_deg |
inclination [decimal degrees], in [0, 180] (values above 90 are retrograde) |
n |
number of samples of the orbit |
a tibble of latitudes and values for the density
## Not run: rE <- 6378e3 # Earth equatorial radius alt <- 550e3 # altitude of satellite, i.e. 500 km for LEO latitude_weights(0.5, rE + alt, 50) ## End(Not run)## Not run: rE <- 6378e3 # Earth equatorial radius alt <- 550e3 # altitude of satellite, i.e. 500 km for LEO latitude_weights(0.5, rE + alt, 50) ## End(Not run)
This function solves Kepler's equation when the true anomaly is known. The mean and eccentric, parabolic, or hyperbolic anomaly is also found. The default parabolic limit at 168 deg is arbitrary. The hyperbolic anomaly is also limited. The hyperbolic sine is used because it's not double-valued.
newtonnu(ecc, nu, parabolic_lim_deg = 168)newtonnu(ecc, nu, parabolic_lim_deg = 168)
ecc |
eccentricity of the orbit (vectorised with |
nu |
true anomaly [rad] |
parabolic_lim_deg |
paraboloic limit [deg], default is 168 |
References: Vallado: 2022, p. 78, Algorithm 5
list(e0, m)
* e0 = eccentric anomaly [rad]
* 'm“ = mean anomaly [rad]
Plot H3 hex map
plot_hexes_map(resolution)plot_hexes_map(resolution)
resolution |
cells resolution |
a plot
## Not run: plot_hexes_map(2L) ## End(Not run)## Not run: plot_hexes_map(2L) ## End(Not run)
A subset of data from the following catalogues
satcat Standard Satellite Catalog (S) Objects from the US Satellite Catalog
auxcat Auxiliary Satellite Catalog (A) Objects omitted from the US catalog
tmpcat Temporary Catalog (T) Objects expected to receive an S catalog number soon
consisting of only reentries occurred in the 25 years from
2000-01-01 (included) till 2025-01-01 (excluded)
satcat, auxcat and tmpcat from
J. C. McDowell, “General Catalog of Artificial Space Objects.” 2020.
reentries_gcatreentries_gcat
A data frame with 1968 rows and 6 columns:
jcat: A space object tag; a single prefix letter followed by a sequence
number with 5 digits.
Possible prefixes are:
A for auxcat (Auxiliary catalog)
S for stdcat (Standard catalog)
T for tmpcat (Temporary catalog)
piece: The piece designation for the object
type: This field tells you something about what kind of object:
R1–R5: Stage number for launch vehicle stage.
C..[A|M]: a component, i.e. a functional part of the spacecraft or
rocket that is deliberately or accidentally ejected.
inclination: the orbit inclination in degrees, in the [0, 180] interval
(values above 90 are retrograde orbits).
reentry_date: the date of reentry in "vague date" format.
dry_mass: the (poosibly estimated) dry mass.
https://planet4589.org/space/gcat
resample a day of trajectories at interval
resample_traffic(day, interval = 30L)resample_traffic(day, interval = 30L)
day |
the date for the trajectories, it refers to the relevant parquet file in 'data-raw/trjs/trjs_<YYYY-MM-DD>.parquet' |
interval |
number of seconds between samples [30] |
(invisibly) a data frame of resampled points. Called for its side effect of writing 'data/trajectories_<YYYY-MM-DD>_resampled_<interval>s.parquet'
Rotate a vector about the 1st axis
rot1(vec, theta)rot1(vec, theta)
vec |
a 3D vector, or an n x 3 matrix with one vector per row |
theta |
the angle of rotation [rad], length 1 or n |
an n x 3 matrix of rotated vectors (one row per input vector)
## Not run: c(0, 1, 0) |> rot1(pi/2) ## End(Not run)## Not run: c(0, 1, 0) |> rot1(pi/2) ## End(Not run)
Rotate a vector about the 3rd axis
rot3(vec, theta)rot3(vec, theta)
vec |
a 3D vector, or an n x 3 matrix with one vector per row |
theta |
the angle of rotation [rad], length 1 or n |
an n x 3 matrix of rotated vectors (one row per input vector)
## Not run: c(0, 1, 0) |> rot3(-pi/2) ## End(Not run)## Not run: c(0, 1, 0) |> rot3(-pi/2) ## End(Not run)
From Vallado, Algorithm 9
rv2coe(r, v, mu = GRAVITATIONAL_CONSTANT_EARTH)rv2coe(r, v, mu = GRAVITATIONAL_CONSTANT_EARTH)
r |
Position vector [km]: a 3-vector, or an n x 3 matrix (one per row) |
v |
Velocity vector [km/s]: same shape as |
mu |
gravitational parameter, default to Earth's, [km^3/s^2] |
a list of named length-n vectors (n = number of state vectors),
(p, a, ecc, incl, raan, argp,
nu, m, arglat, truelon, lonper, orbit_type), where
* p = semilatus rectum [km]
* a = semimajor axis [km]
* ecc = eccentricity
* incl = inclination [rad (0—2π)]
* raan = right ascension of the ascending node [rad (0—2π)]
* argp = argument of perigee [rad (0—2π)]
* nu = true anomaly [rad (0—2π)]
* m = mean anomaly [rad (0—2π)]
* arglat = argument of latitude [rad (0—2π)]
* truelon = true longitude [rad (0—2π)]
* lonper = longitude of periapsis [rad (0—2π)]
* orbit_type = type of orbit such as
- "circular_equatorial"
- "circular_inclined"
- "eph_equatorial" (elliptical, parabolic, hyperbolic equatorial)
- "eph_inclined" (elliptical, parabolic, hyperbolic inclined)
## Not run: # Vallado, 2022, Ex. 2-5 # Position and velocity in km and km/s r = c(6524.834, 6862.875, 6448.296) v = c(4.901327, 5.533756, -1.976341) rv2coe(r = r, v = v) ## End(Not run)## Not run: # Vallado, 2022, Ex. 2-5 # Position and velocity in km and km/s r = c(6524.834, 6862.875, 6448.296) v = c(4.901327, 5.533756, -1.976341) rv2coe(r = r, v = v) ## End(Not run)
doc8643.com's Aircraft infoScraper for doc8643.com's Aircraft info
scrape_aircraft_type_info_doc8643(ac_type, session)scrape_aircraft_type_info_doc8643(ac_type, session)
ac_type |
ICAO aircraft type |
session |
|
a dataframe of aircraft info
## Not run: host <- "https://doc8643.com/" session <- polite::bow(host, force = TRUE) scraper <- purrr::partial(scrape_aircraft_type_info_doc8643, session = session) ac_types |> map(.f = scraper) |> bind_rows() |> # fix some data mutate( type = case_when( icao == "C700" ~ "L2J", icao == "C68A" ~ "L2J", .default = .data$type ) ) |> separate_wider_delim( manufacturer, " ", names = c("manufacturer", "other"), too_many = "drop" ) |> # fix some data mutate( manufacturer = case_when( manufacturer == "AIR" ~ str_c(manufacturer, other, sep = " "), manufacturer == "AVIONES" ~ str_c(manufacturer, other, sep = " "), manufacturer == "GULFSTREAM" ~ str_c(manufacturer, other, sep = " "), other == "HELICOPTERS" & manufacturer == "AIRBUS" ~ str_c(manufacturer, other, sep = " "), other == "GRUMMAN" & manufacturer == "NORTHROP" ~ str_c(manufacturer, other, sep = " "), other == "MARTIN" & manufacturer == "LOCKHEED" ~ str_c(manufacturer, other, sep = " "), .default = manufacturer ) ) |> select(-other) ## End(Not run)## Not run: host <- "https://doc8643.com/" session <- polite::bow(host, force = TRUE) scraper <- purrr::partial(scrape_aircraft_type_info_doc8643, session = session) ac_types |> map(.f = scraper) |> bind_rows() |> # fix some data mutate( type = case_when( icao == "C700" ~ "L2J", icao == "C68A" ~ "L2J", .default = .data$type ) ) |> separate_wider_delim( manufacturer, " ", names = c("manufacturer", "other"), too_many = "drop" ) |> # fix some data mutate( manufacturer = case_when( manufacturer == "AIR" ~ str_c(manufacturer, other, sep = " "), manufacturer == "AVIONES" ~ str_c(manufacturer, other, sep = " "), manufacturer == "GULFSTREAM" ~ str_c(manufacturer, other, sep = " "), other == "HELICOPTERS" & manufacturer == "AIRBUS" ~ str_c(manufacturer, other, sep = " "), other == "GRUMMAN" & manufacturer == "NORTHROP" ~ str_c(manufacturer, other, sep = " "), other == "MARTIN" & manufacturer == "LOCKHEED" ~ str_c(manufacturer, other, sep = " "), .default = manufacturer ) ) |> select(-other) ## End(Not run)
Scraper for EUROCONTROL's Aircraft Performance DB
scrape_aircraft_type_info_perfdb(ac_type, session)scrape_aircraft_type_info_perfdb(ac_type, session)
ac_type |
ICAO aircraft type |
session |
|
a dataframe of aircraft info
## Not run: host <- "https://learningzone.eurocontrol.int/ilp/customs/ATCPFDB/details.aspx" session <- polite::bow(host, force = TRUE) scraper <- purrr::partial(scrape_aircraft_type_info_perfdb, session = session) ac_types |> map(.f = scraper) |> bind_rows() ## End(Not run)## Not run: host <- "https://learningzone.eurocontrol.int/ilp/customs/ATCPFDB/details.aspx" session <- polite::bow(host, force = TRUE) scraper <- purrr::partial(scrape_aircraft_type_info_perfdb, session = session) ac_types |> map(.f = scraper) |> bind_rows() ## End(Not run)
Scraper for EUROCONTROL's Skybrary aircraft info
scrape_aircraft_type_info_skybrary(ac_type, session)scrape_aircraft_type_info_skybrary(ac_type, session)
ac_type |
ICAO aircraft type |
session |
|
a dataframe of aircraft info
## Not run: host <- "https://skybrary.aero/" session <- polite::bow(host, force = TRUE) scraper <- purrr::partial(scrape_aircraft_type_info_skybrary, session = session) ac_types |> map(.f = scraper) |> bind_rows() ## End(Not run)## Not run: host <- "https://skybrary.aero/" session <- polite::bow(host, force = TRUE) scraper <- purrr::partial(scrape_aircraft_type_info_skybrary, session = session) ac_types |> map(.f = scraper) |> bind_rows() ## End(Not run)
Calculated the hourly traffic density per aircraft type
traffic_density_hourly(day, resolution = 3L, interval = 30L)traffic_density_hourly(day, resolution = 3L, interval = 30L)
day |
the date to calculate the traffic density for;
it refers to the file
|
resolution |
the resolution of the H3 hexagonal cells |
interval |
resampling interval |
(invisibly) a data frame of hourly occupancy and density_m2
per cell and aircraft type. Called for its side effect of writing
data/traffic_density_<YYYY-MM-DD>_res_<resolution>_hourly.parquet
Hourly weighting functions for reentered debris in 25 years from 2000-01-01 till 2025-01-01 (excluded), for H3 cells at resolution 3.
weightings_h3_resolution_3_hourlyweightings_h3_resolution_3_hourly
A data frame with 360 * 720 rows and 1 column:
h3_resolution_3: the H3 cell id
w: the value of the hourly weighting function.
Hourly weighting functions for reentered debris in 25 years from 2000-01-01 till 2025-01-01 (excluded), at half degree resolution worldwide.
weightings_half_degree_hourlyweightings_half_degree_hourly
A data frame with 360 * 720 rows and 3 columns:
lon: the longitude.
lat: the latitude.
val: the value of the hourly weighting function.
weighting functions for reentered debris in 25 years from 2000-01-01 till 2025-01-01 (excluded), at half degree resolution.
weightings_half_degree_latitudeweightings_half_degree_latitude
A data frame with 360 rows (latitude from -90 to 90 at half degree) and 2 columns:
lat: the latitude.
val: the value of the weighting function.