Package 'eurocontrol'

Title: Helper functions for EUROCONTROL useRs
Description: The helper functions in this package are designed to make it easy, homogeneus and transparent to perform common tasks usually needed by data analysts and useRs in EUROCONTROL.
Authors: Enrico Spinielli [aut, cre] , EUROCONTROL [cph, fnd]
Maintainer: Enrico Spinielli <[email protected]>
License: MIT + file LICENSE
Version: 0.1.18
Built: 2024-11-09 05:53:48 UTC
Source: https://github.com/eurocontrol/eurocontrol

Help Index


ICAO's Manufacturer codes

Description

A data frame with the following fields

model_full_name

the model full name, e.g. "A-320neo".

manufacturer_code

the manufacturer's code, e.g. "AIRBUS".

designator

the model's designator, e.g. "A20N"

last_updated

the date when the data have been last updated, e.g. "2023-05-19".

Usage

aircraft_model

Format

An object of class tbl_df (inherits from tbl, data.frame) with 10438 rows and 4 columns.


ICAO's Aircraft types

Description

A data frame with the following fields

designator

the aircraft type designator, e.g. "A310".

aircraft_description

the aircraft description, e.g. "LandPlane".

description

the aircraft , e.g. "IT".

wtc

the aircraft wake turbulence category, e.g. "M".

engine_count

the number pf engines, e.g. "2". Note: this is not a number unfortunately, there is one model encoded C

engine_type

the engine type, e.g. "Jet".

last_updated

the date when the data have been last updated, e.g. "2023-05-19".

Usage

aircraft_type

Format

An object of class tbl_df (inherits from tbl, data.frame) with 2719 rows and 7 columns.


Return a reference to the Airlines table

Description

The returned dbplyr::tbl_dbi() is referencing the airlines table in PRISME. You can use dplyr/dbplyr verbs to filter, join, ... with other datasets.

Usage

airlines_tbl(conn = NULL)

Arguments

conn

Database connection or instantiate the default one.

Value

a dbplyr::tbl_dbi() referencing the Oracle table for airlines.

Note

You need to either provide a connection conn that has access to PRU_DEV.V_COVID_DIM_AO or go with the default which uses PRU_DEV to establish a db_connection().

Examples

## Not run: 
arl <- airlines_tbl()
# other operations on arl, i.e. filtering,
# followed by a collect() to retrieve the concrete data frame
arl_filtered <- arl |>
   dplyr::filter(AO_ISO_CTRY_CODE == "IT") |>
   collect()

# NOTE: you can reuse the connection for other API calls
conn <- arl$src$con

# other ops requiring conn
# ...

# IMPORTANT: close the DB connection
DBI::dbDisconnect(conn)

## End(Not run)

Airline info including group affiliation

Description

Airline info including group affiliation

Usage

airlines_tidy(conn = NULL)

Arguments

conn

Optional connection to the PRU_DEV schema.

Value

A dbplyr::tbl_dbi() with the following columns:

  • AO_CODE: the the ICAO Airline Designator, i.e. 'OAL'

  • AO_NAME: the airline's name, i.e. 'Olympic'

  • AO_GRP_CODE: the airline's affiliation group code, i.e. 'AEE_GRP'

  • AO_GRP_NAME: the airline's affiliation group, i.e. 'AEGEAN Group'

  • AO_ISO_CTRY_CODE: the ISO2C code of the airline's country, i.e. 'GR'

  • EU: (a character) whether the airlines is in a EUROCONTROL's Member State (full, comprehensive or transition plus Kosovo), i.e. 'TRUE'

Note

You need to either provide a connection conn that has access to PRUDEV.V_COVID_DIM_AO or go with the default which uses PRU_DEV to establish a db_connection().

Examples

## Not run: 
arls <- airlines_tidy()
# other operations on arls, i.e. filtering,
# followed by a collect() to retrieve the concrete data frame
arls_filtered <- arls |>
   filter(stringr::str_starts("A")) |>
   collect()

# NOTE: you can reuse the connection for other API calls
conn <- arls$src$con

# other ops requiring conn
# ...

# IMPORTANT: close the DB connection
DBI::dbDisconnect(conn)

## End(Not run)

retrieve latest airport list from OurAirports

Description

retrieve latest airport list from OurAirports

Usage

airports_oa()

Value

a data frame

Examples

## Not run: 
apts <- airports_oa()

## End(Not run)

Return a reference to the Airspace Profile table

Description

The returned dbplyr::tbl_dbi() is referencing the airspace profiles table in PRISME. You can use dplyr/dbplyr verbs to filter, join, ... with other datasets.

Usage

airspace_profile_tbl(conn = NULL)

Arguments

conn

Database connection or instantiate the default one.

Value

a dbplyr::tbl_dbi() referencing the Oracle table for airspace profiles.

Note

You need to either provide a connection conn that has access to FSD.ALL_FT_ASP_PROFILE or go with the default which uses PRU_DEV to establish a db_connection().

Examples

## Not run: 
pp <- airspace_profile_tbl()
# other operations on pp, i.e. filtering,
# followed by a collect() to retrieve the concrete data frame
# IMPORTANT: close the DB connection when done
DBI::dbDisconnect(pp$src$con)

# if you use a DB connection for many different APIs
conn <- eurocontrol::db_connection("PRU_DEV")
pp <- airspace_profile_tbl(conn = conn)

# ... do something else with conn
# ...
# then manually close the connection to the DB
DBI::dbDisconnect(conn)

## End(Not run)

Provide all airspace profile segments intersecting an interval of interest

Description

The returned dbplyr::tbl_dbi() includes segments for scheduled and non-scheduled flights temporally intersecting the right-opened interval ⁠[wef, til)⁠.

General aviation, State, military and sensitive flight are excluded.

Usage

airspace_profiles_tidy(
  conn = NULL,
  wef,
  til,
  airspace = "FIR",
  profile = "CTFM"
)

Arguments

conn

Database connection or instantiate the default one.

wef

With EFfect date (included) at Zulu time in a format recognized by lubridate::as_datetime()

til

unTILl date (excluded) at Zulu time in a format recognized by lubridate::as_datetime()

airspace

the type of airspace (default: 'FIR'), one of:

profile

the model of the trajectory profile (default: 'CTFM'), one of:

  • 'FTFM', Filed Tactical Flight Model

  • 'RTFM', Regulated Tactical Flight Model

  • 'CTFM', Current Tactical Flight Model

  • 'CPF', Correlated Position reports for a Flight

  • 'DCT', Direct route

  • 'SCR', Shortest Constrained Route

  • 'SRR', Shortest RAD restrictions applied Route

  • 'SUR', Shortest Unconstrained Route

Value

a dbplyr::tbl_dbi() with the following columns

  • ID: the so called ⁠SAM ID⁠, used internally by PRISME

  • SEQ_ID: the sequence number of the segment for the relevant airspace profile

  • ENTRY_TIME: the time of entry into the relevant airspace

  • ENTRY_LON: the longitude of entry into the relevant airspace

  • ENTRY_LAT: the latitude of entry into the relevant airspace

  • ENTRY_FL: the flight level of entry into the relevant airspace

  • EXIT_TIME: the time of exit out of the relevant airspace

  • EXIT_LON: the longitude of exit out of the relevant airspace

  • EXIT_LAT: the latitude of exit out of the relevant airspace

  • EXIT_FL: the flight level of exit out of the relevant airspace

  • AIRSPACE_ID: the airspace ID

  • AIRSPACE_TYPE: the airspace type as per airspace input parameter

  • MODEL_TYPE: the trajectory model as per profile input parameter

Note

You need to either provide a connection conn that has access to as noted in airspace_profile_tbl() and flights_tidy() or go with the default which uses PRU_DEV to establish a db_connection().

Examples

## Not run: 
ps <- airspace_profiles_tidy(wef = "2023-01-01", til = "2023-04-01")
# IMPORTANT: always close the DB connection when done
DBI::dbDisconnect(ps$src$con)

# if you re-use DB connections
conn <- eurocontrol::db_connection("PRU_DEV")
ps <- airspace_profiles_tidy(conn = conn)

# ... do something else with conn
# ...
# then manually close the connection to the DB
DBI::dbDisconnect(conn)

## End(Not run)

Return a reference to the Airport Operator Data Flow table

Description

The returned dbplyr::tbl_dbi() is referencing the airport operator data flow table in PRISME. You can use dplyr/dbplyr verbs to filter, join, ... with other datasets.

Usage

aodf_tbl(conn = NULL)

Arguments

conn

Database connection or instantiate the default one.

Value

a dbplyr::tbl_dbi() referencing the Oracle table for airport operator data flow.

Note

You need to either provide a connection conn that has access to SWH_FCT.FAC_APDS_FLIGHT_IR691 or go with the default which uses PRU_ATMAP to establish a db_connection().

Examples

## Not run: 
aodf <- aodf_tbl()
# ...
# IMPORTANT: close the DB connection when done with `aodf`
DBI::dbDisconnect(aodf$src$con)

## End(Not run)

Extract a clean airport operator data flow list in an interval

Description

The returned dbplyr::tbl_dbi() includes movements information in the interval ⁠[wef, til)⁠. NOTE: it can only cover ONE month at a time

Usage

aodf_tidy(conn = NULL, wef, til)

Arguments

conn

Database connection or instantiate the default one.

wef

With EFfect date (included) at Zulu time in a format recognized by lubridate::as_datetime()

til

unTILl date (excluded) at Zulu time in a format recognized by lubridate::as_datetime()

Value

A dbplyr::tbl_dbi() with the following columns:

  • APDS_ID: the airport operator dataflow unique record id.

  • ID: the so called ⁠SAM ID⁠, used internally by PRISME

  • AP_C_FLTID: flight identifier (aource Airport)

  • AP_C_FLTRUL: which sets of regulations the flight is operated under. Possible values are:

  • IFR for IFR

  • VFR for VFR

  • NA if unknown

  • AP_C_REG: the aircraft registration (with spaces, dashes, ... stripped), e.g. GEUUU.

  • ADEP_ICAO: (ICAO code of the) Aerodrome of DEParture (source airport).

  • ADES_ICAO: (ICAO code of the) Aerodrome of DEStination (source airport).

  • SRC_PHASE: flight phase. DEP=departure, ARR=arrival.

  • MVT_TIME_UTC: (best available) movement time (takeoff if SRC_PHASE = DEP, landing if SRC_PHASE = ARR).

  • BLOCK_TIME_UTC: Block time (off-block if SRC_PHASE = DEP, in-block if SRC_PHASE = ARR).

  • SCHED_TIME_UTC: scheduled time (of departure if SRC_PHASE = DEP, of arrival if SRC_PHASE = ARR; source airport).

  • ARCTYP: (best available) the ICAO code for the aircraft type, for example A21N for Airbus A321neo.

  • AP_C_RWY: Runway ID (of departure if SRC_PHASE = DEP, of arrival if SRC_PHASE = ARR; source airport).

  • AP_C_STND: Stand ID (of departure if SRC_PHASE = DEP, of arrival if SRC_PHASE = ARR; source airport).

  • C40_CROSS_TIME: time of first (last) crossing at 40 NM from ARP for departure (arrival).

  • C40_CROSS_LAT: latitude of first (last) crossing at 40 NM from ARP for departure (arrival).

  • C40_CROSS_LON: longitude of first (last) crossing at 40 NM from ARP for departure (arrival).

  • C40_CROSS_FL: flight level of first (last) crossing at 40 NM from ARP for departure (arrival).

  • C40_BEARING: bearing of first (last) crossing at 40 NM from ARP for departure (arrival).

  • C100_CROSS_TIME: time of first (last) crossing at 100 NM from ARP for departure (arrival).

  • C100_CROSS_LAT: latitude of first (last) crossing at 100 NM from ARP for departure (arrival).

  • C100_CROSS_LON: longitude of first (last) crossing at 100 NM from ARP for departure (arrival).

  • C100_CROSS_FL: flight level of first (last) crossing at 100 NM from ARP for departure (arrival).

  • C100_BEARING: bearing of first (last) crossing at 100 NM from ARP for departure (arrival).

Note

You need to either provide a connection conn that has access to SWH_FCT.FAC_APDS_FLIGHT_IR691, or go with the default which uses PRU_ATMAP to establish a db_connection().

Examples

## Not run: 
my_aodf <- aodf_tidy(wef = "2023-01-01", til = "2023-01-02")
# ...
DBI::dbDisconnect(my_aodf$src$con)

## End(Not run)

Provide a connection to the relevant Oracle database

Description

Provide a connection to the relevant Oracle database

Usage

db_connection(schema = "PRU_PROD")

Arguments

schema

the Oracle DB schema to connect to.

Value

A connection to a database (specifically an implementation of DBI::DBIConnection for an Oracle database.)

Note

The schema is in fact the prefix of the environment variables where the credentials are stored, like ⁠<schema>_USR⁠, ⁠<schema>_PWD⁠ and ⁠<schema>_DBNAME⁠. Possible values for schema are PRU_PROD, PRU_DEV, PRU_TEST, ...

Examples

## Not run: 
conn <- db_connection()
# ... perform other API operations re-using the same connection
# ...
DBI::dbDisconnect(conn)

## End(Not run)

Extract the flights list for the airspace profile segments intersecting an interval of interest

Description

The returned dbplyr::tbl_dbi() includes scheduled and non-scheduled flights whose airspace segments temporally intersecting the right-opened interval ⁠[wef, til)⁠. General aviation, State, military and sensitive flight are excluded.

Usage

flights_airspace_profiles_tidy(
  conn = NULL,
  wef,
  til,
  airspace = "FIR",
  profile = "CTFM"
)

Arguments

conn

Database connection or instantiate the default one.

wef

With EFfect date (included) at Zulu time in a format recognized by lubridate::as_datetime()

til

unTILl date (excluded) at Zulu time in a format recognized by lubridate::as_datetime()

airspace

the type of airspace (default: 'FIR'), one of:

profile

the model of the trajectory profile (default: 'CTFM'), one of:

  • 'FTFM', Filed Tactical Flight Model

  • 'RTFM', Regulated Tactical Flight Model

  • 'CTFM', Current Tactical Flight Model

  • 'CPF', Correlated Position reports for a Flight

  • 'DCT', Direct route

  • 'SCR', Shortest Constrained Route

  • 'SRR', Shortest RAD restrictions applied Route

  • 'SUR', Shortest Unconstrained Route

Value

a dbplyr::tbl_dbi() with the same columns as flights_tidy()

Note

You need to either provide a connection conn that has access to as noted in airspace_profile_tbl() and flights_tidy() or go with the default which uses PRU_DEV to establish a db_connection().

Examples

## Not run: 
aa <- flights_airspace_profiles_tidy(wef = "2023-01-01", til = "2023-04-01")

# if you re-use DB connections
conn <- eurocontrol::db_connection("PRU_DEV")
flights_airspace_profiles_tidy(conn = conn,
                               wef = "2023-01-01",
                               til = "2023-04-01")

# ... do something else with conn
# ...
# then manually close the connection to the DB
DBI::dbDisconnect(conn)

## End(Not run)

Return a reference to the Flights table

Description

The returned dbplyr::tbl_dbi() is referencing the flights table in PRISME. You can use dplyr/dbplyr verbs to filter, join, ... with other datasets.

Usage

flights_tbl(conn = NULL)

Arguments

conn

Database connection or instantiate the default one.

Value

a dbplyr::tbl_dbi() object referencing the Oracle table for flights.

Note

You need to either provide a connection conn that has access to SWH_FCT.V_FAC_FLIGHT_MS or go with the default which uses PRU_DEV to establish a db_connection(). Market Segment is not available before 2004.

Examples

## Not run: 
flt <- flights_tbl()
# other operations on flt, i.e. filtering,
# followed by a collect() to retrieve the concrete data frame
flt_filtered <- flt |>
   filter(TO_DATE("2023-06-01 10:00", "YYYY-MM-DD HH24:MI") <= IOBT,
                  IOBT < TO_DATE("2023-06-02 10:30", "YYYY-MM-DD HH24:MI")) |>
   collect()


# NOTE: you can reuse the connection for other API calls
conn <- flt$src$con

# other ops requiring conn
# ...

# IMPORTANT: close the DB connection
DBI::dbDisconnect(conn)

## End(Not run)

Extract a clean flights list in an interval

Description

The returned dbplyr::tbl_dbi() includes scheduled and non-scheduled flight departing in the right-opened interval ⁠[wef, til)⁠.

Defaults values will assure that General aviation, State, military and sensitive flight will excluded. They can be retrieved via the other function call arguments in case of need.

Usage

flights_tidy(
  conn = NULL,
  wef,
  til,
  icao_flt_types = c("S", "N"),
  ids = NULL,
  include_sensitive = FALSE,
  include_military = FALSE,
  include_head = FALSE
)

Arguments

conn

Database connection or instantiate the default one.

wef

With EFfect date (included) at Zulu time in a format recognized by lubridate::as_datetime()

til

unTILl date (excluded) at Zulu time in a format recognized by lubridate::as_datetime()

icao_flt_types

the types of flights as described below in ICAO_FLT_TYPE, default c('S', 'N'), NULL includes all notwithstanding other argument options. When including military via include_military you should either pass NULL or make sure 'M' is included

ids

list of IDs (aka ⁠SAM ID⁠) to return, default NULL for all flights

include_sensitive

include sensitive flights, default FALSE

include_military

include military flights, default FALSE

include_head

include Head of State flights, default FALSE

Value

A dbplyr::tbl_dbi() with the following columns (grouped here by flight details, aerodrome details, aircraft info, aircraft operator info and operational details):

Flight details

  • FLT_UID: flight unique id.

  • ID: the so called ⁠SAM ID⁠, used internally by PRISME

  • AIRCRAFT_ID: the callsign of the relevant flight, e.g. BAW6VB.

  • LOBT: Last received Off-Block Time.

  • IOBT: Initial Off-Block Time.

  • FLT_RULES (see FPL Item 8): which sets of regulations the flight is operated under. Possible values are:

    • I for IFR

    • V for VFR

    • Y first IFR thereafter VFR

    • Z first VFR thereafter IFR

  • ICAO_FLT_TYPE (see FPL Item 8): flight type. Possible values:

    • S for scheduled air service

    • N for non-scheduled air service

    • G for general aviation

    • M for military (note: filtered out)

    • X for other than the preceding categories

  • RULE_NAME: market segment type as defined on the Market Segment Rules, it can be:

    • “Mainline”

    • “Regional”

    • “Low-Cost”

    • “Business Aviation”

    • “All-Cargo”

    • “Charter” (Non-Scheduled)

    • “Military”

    • “Other”

    • "Not classified"

  • SENSITIVE: 'Y' if sensitive

  • SPECIAL_EXEMPT: reasons for special handling by ATS. One of:

    • "AEAP" ATFM exemption approved

    • "EMER" emergency

    • "FIRE" fire fighting

    • "HEAD" flights with Head of State status

    • "MEDE" medical evacuation

    • "NEXE" not exempted

    • "SERE" search & rescue

Aerodrome details

  • ADEP: ICAO code of the Aerodrome of DEParture

  • NAME_ADEP: the (AIU) name of the ADEP airport

  • COUNTRY_CODE_ADEP: the ISO 2-alpha country code for ADEP

  • COUNTRY_NAME_ADEP: the country name for ADEP

  • ADES: ICAO code of the Aerodrome of DEStination (different from ADES_FILED in case of diversion)

  • NAME_ADES: the (AIU) name of the ADES airport

  • COUNTRY_CODE_ADES: the ISO 2-alpha country code for ADES

  • COUNTRY_NAME_ADES: the country name for ADES

  • ADES_FILED: ICAO code of the Aerodrome of DEStination filed in the Flight Plan. Note: it can be different from ADES in case of diversion

  • NAME_ADES_FILED: the (AIU) name of the ADES_FILED airport

  • COUNTRY_CODE_ADES_FILED: the ISO 2-alpha country code for ADES_FILED

  • COUNTRY_NAME_ADES_FILED: the country name for ADES_FILED

Aircraft info

  • REGISTRATION: the aircraft registration (with spaces, dashes, ... stripped), e.g. GEUUU.

  • AIRCRAFT_ADDRESS: the ICAO 24-bit address of the airframe for ADS-B/Mode S broadcasting.

  • AIRCRAFT_TYPE_ICAO_ID: the ICAO code for the aircraft type, for example A30B for an Airbus A-300B2-200.

  • WK_TBL_CAT (see FPL Item 9): wake turbulence category, can be

    • L LIGHT, i.e. maximum certificated takeoff mass of 7000 kg (15_500 lbs) or less.

    • M MEDIUM, i.e maximum certificated takeoff mass less than 136_000 kg (300_000 lbs), but more than 7_000 kg (15_500 lbs)

    • H HEAVY, i.e. maximum certificated takeoff mass of 136_000 kg (300_000 lbs) or more (except those specified as J)

    • J SUPER, presently the only the AIRBUS A-380-800

Aircraft operator details

  • AIRCRAFT_OPERATOR: the ICAO Airline Designator, i.e. OAL for Olympic

  • AO_GRP_CODE: Aircraft Operator group (code), i.e. AEE_GRP

  • AO_GRP_NAME: : Aircraft Operator group (name), i.e. AEGEAN Group

  • AO_ISO_CTRY_CODE: ISO country code for AO

Operational details

  • EOBT_1: Estimated Off-Block Time for FPL-based (M1) trajectory

  • ARVT_1: ARriVal Time for FPL-based (M1) trajectory

  • TAXI_TIME_1: Taxi time for FPL-based (M1) trajectory

  • AOBT_3: Actual Off-Block Time for flown (M3) trajectory

  • ARVT_3: ARVival Time for flown (M3) trajectory

  • TAXI_TIME_3: Taxi time for flown (M3) trajectory

  • RTE_LEN_1: route length (in Nautical Miles) for FPL-based (M1) trajectory

  • RTE_LEN_3: route length (in Nautical Miles) for for flown (M3) trajectory

  • FLT_DUR_1: route duration (in minutes) for FPL-based (M1) trajectory

  • FLT_DUR_3: route length (in minutes) for flown (M3) trajectory

  • FLT_TOW: takeoff weight

Note

You need to either provide a connection conn that has access to SWH_FCT.DIM_FLIGHT_TYPE_RULE (for FLT_RULES), PRUDEV.V_COVID_DIM_AO (for aircraft and aircraft group info) and SWH_FCT.V_FAC_FLIGHT_MS (for market segment info) or go with the default which uses PRU_DEV to establish a db_connection().

Examples

## Not run: 
flts <- flights_tidy(wef = "2023-01-01", til = "2023-01-05")
# other operations on flts, i.e. filtering,
# followed by a collect() to retrieve the concrete data frame
flts_filtered <- flts |>
   filter(TO_DATE("2023-06-01 10:00", "YYYY-MM-DD HH24:MI") <= IOBT,
                  IOBT < TO_DATE("2023-01-02 10:30", "YYYY-MM-DD HH24:MI")) |>
   collect()

# NOTE: you can reuse the connection for other API calls
conn <- flts$src$con

# other ops requiring conn
# ...

# IMPORTANT: close the DB connection
DBI::dbDisconnect(conn)

## End(Not run)

Export trajectory profiles to SO6 format

Description

The data frame for point trajectories needs to have the following columns:

Name Description Type
FLIGHT_ID Flight ID int
TIME_OVER Time over point datetime
LONGITUDE Longitude (decimal degrees) double
LATITUDE Latitude (decimal degrees) double
FLIGHT_LEVEL Flight level int
POINT_ID Point ID or NO_POINT char
AIR_ROUTE Air route or NO_ROUTE char
LOBT Last Off-block Time datetime
SEQ_ID Positions' sequence number int
CALLSIGN Flight call sign char
REGISTRATION Aircraft registration char
MODEL_TYPE Aircraft model char
AIRCRAFT_TYPE Aircraft ICAO type char
AIRCRAFT_OPERATOR Aircraft operator char
ADEP Departing aerodrome (ICAO) ID char
ADES Destination aerodrome (ICAO) ID char

Usage

generate_so6(trajectory)

Arguments

trajectory

A data frame for point profile trajectories.

Value

A data frame for trajectories in SO6 format.

Examples

## Not run: 
conn <- eurocontrol::db_connection("PRU_DEV")
pf <- point_profiles_tidy(conn = conn,
                          wef = "2020-01-01",
                          til = "2020-01-10") |>
  generate_so6()

# ... do something else with conn
# ...
# then manually close the connection to the DB
DBI::dbDisconnect(conn)
generate_so6(trj)

## End(Not run)

Return the corresponding IATA season for a date

Description

Return the corresponding IATA season for a date

Usage

iata_season_for_date(date)

Arguments

date

a date

Value

the name of the IATA season in the form summer-yyyy

Examples

## Not run: 
season_iata("2024-04-01")

## End(Not run)

EUROCONTROL's Member States

Description

A data frame with the following fields

name

the country name, e.g. "Italy"

iso3c

the 3-letter ISO code, e.g. "ITA"

iso2c

the 2-letter ISO code, e.g. "IT"

icao

the 2-letter ICAO code, e.g. "LI"

iso3n

the 3-digits ISO code, e.g. "380"

date

the date of status code, e.g. 1996-04-01

status

the status code, e.g. "M" (M Member State, C Comprehensive Agreement State, T Transitional State, NA for Kosovo)

These are useful to grab the right spatial polygons in case of need.

Usage

member_state

Format

An object of class tbl_df (inherits from tbl, data.frame) with 45 rows and 7 columns.

Note

Kosovo is also included in the list.


Return a reference to the Point Profile table

Description

The returned dbplyr::tbl_dbi() is referencing the point profiles table in PRISME. You can use dplyr/dbplyr verbs to filter, join, ... with other datasets.

Usage

point_profile_tbl(conn = NULL)

Arguments

conn

Database connection or instantiate the default one.

Value

a dbplyr::tbl_dbi() referencing the Oracle table for point profiles.

Note

You need to either provide a connection conn that has access to FSD.ALL_FT_POINT_PROFILE or go with the default which uses PRU_DEV to establish a db_connection().

Examples

## Not run: 
pt <- point_profile_tbl()

# if you re-use DB connections
conn <- eurocontrol::db_connection("PRU_DEV")
pt <- point_profile_tbl(conn = conn)

# ... do something else with conn
# ...
# then manually close the connection to the DB
DBI::dbDisconnect(conn)

## End(Not run)

Export point profile from NM trajectories

Description

Extract NM point profile trajectories from PRISME database. When a bbox is defined, we return only the (full) point profiles for the flights flying thru the region.

Usage

point_profiles_tidy(
  conn = NULL,
  wef,
  til = lubridate::today(tzone = "UTC"),
  profile = "CTFM",
  bbox = NULL
)

Arguments

conn

Database connection or instantiate the default one.

wef

With EFfect date (included) at Zulu time in a format recognized by lubridate::as_datetime()

til

unTILl date (excluded) at Zulu time in a format recognized by lubridate::as_datetime()

profile

the model of the trajectory profile (default: 'CTFM'), one of:

  • 'FTFM', Filed Tactical Flight Model

  • 'RTFM', Regulated Tactical Flight Model

  • 'CTFM', Current Tactical Flight Model

  • 'CPF', Correlated Position reports for a Flight

  • 'DCT', Direct route

  • 'SCR', Shortest Constrained Route

  • 'SRR', Shortest RAD restrictions applied Route

  • 'SUR', Shortest Unconstrained Route

bbox

(Optional) axis aligned bounding box (xmin, ymin, xmax, ymax)

Value

a dataframe representing a flight trajectory with the following columns:

  • FLIGHT_ID: a unique identifier for the flight

  • TIME_OVER: the time over llon/lat

  • LONGITUDE: the longitude

  • LATITUDE: the latitude

  • FLIGHT_LEVEL: the flight level

  • POINT_ID: the published point ID ('NO_POINT' otherwise)

  • AIR_ROUTE: the air rout name ('DCT' otherwise)

  • LOBT: the last off-block time

  • SEQ_ID: the progressive sequence number in the trajectory points

  • CALLSIGN: the callsign of the flight

  • REGISTRATION: the aircraft registration

  • MODEL_TYPE: the trajectory model as per profile input parameter

  • AIRCRAFT_TYPE: the ICAO aircraft type

  • AIRCRAFT_OPERATOR: the flight operator

  • ICAO24: the ICAO 24-bit address of the aircraft

  • ADEP: the Aerodrom of Departure

  • ADES: the aerodrome of Destination

Note

You need to either provide a connection conn that has access to as noted in airspace_profile_tbl() and flights_tidy() or go with the default which uses PRU_DEV to establish a db_connection().

Examples

## Not run: 
# export 1 day of NM (planned) trajectories
pf1 <- point_profiles_tidy(wef = "2019-07-14",
                           til = "2019-07-15",
                           profile = "FTFM")

# export 2 hours of NM (flown) trajectories
pf2 <- point_profiles_tidy(wef = "2019-07-14 22:00",
                           til = "2019-07-15")

# export 1 day of NM (flown) trajectories
pf3 <- point_profiles_tidy(wef = "2019-07-14",
                           til = "2019-07-15",
                           profile = "CTFM")

# export all CTFM trajectories within a bounding box 40 NM around EDDF
bb <- c(xmin = 7.536746, xmax = 9.604390, ymin = 49.36732, ymax = 50.69920)
pf4 <- point_profiles_tidy(wef = "2019-01-01 00:00",
                           til = "2019-01-02 00:00",
                           bbox = bb)


# if you re-use DB connections
conn <- eurocontrol::db_connection("PRU_DEV")
pf <- point_profiles_tidy(conn = conn,
                          wef = "2020-01-01",
                          til = "2020-01-10")

# ... do something else with conn
# ...
# then manually close the connection to the DB
DBI::dbDisconnect(conn)

## End(Not run)

return the interval for an IATA season

Description

IATA summer season begins on the last Sunday of March and ends on the last Saturday of October. IATA winter season begins on the last Sunday of October and ends Saturday of before next year summer season.

Usage

season_iata(year, season = "summer")

Arguments

year

the year for the season definition

season

the (northern hemisphere) season, either "summer" (default) or "winter"

Value

an interval for the season definition, end/start dates are inclusive

Examples

## Not run: 
season_iata(2019)

## End(Not run)