Skip to contents

Extract NM point profile trajectories from PRISME database

Usage

export_model_trajectory(
  wef,
  til,
  model = "CTFM",
  bbox = NULL,
  lobt_buffer = c(before = 28, after = 24),
  timeover_buffer = NULL
)

Arguments

wef

(UTC) timestamp of LOBT With Effect From (included). Liberal format, i.e. "2019-07-14", "2019-07-14 10:21" "2019-07-14T10:21:23Z"

til

(UTC) timestamp of LOBT TILl instant (excluded)

model

the model of the profile: one of CPF, CTFM, DCT, FTFM, SCR, SRR, SUR [default: "CFTM"].

bbox

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

lobt_buffer

(Optional) number of (portion of) hours buffer for LOBT before/after wef and til (before, after). This is to cater for flights crossing wef and til. For example c(before = 24, after = 2.25) allows to retrieve flights with LOBT 24H before wef and 1H15M after til and then potentially crossing the interval.

timeover_buffer

(Optional) number of (portion of) hours buffer for time_over before/after wef and til (before, after). This is to cater for flights crossing wef and til. For example c(before = 2, after = 0.25) allows to retrieve points 2H before wef and 15M after til.

Value

a dataframe with trajectory data

Details

You need to store your credentials to access the PRU tables in the following environment variables:

  • PRU_DEV_USR for the user id

  • PRU_DEV_PWD for the password

  • PRU_DEV_DBNAME for the database name

Examples

if (FALSE) {
# export 1 day worth of NM (planned) trajectories
export_model_trajectory("2019-07-14", "2019-07-15", model = "FTFM")

# export 2 hours of NM (flown) trajectories
export_model_trajectory("2019-07-14 22:00", "2019-07-15")

# export 1 day of NM (flown) trajectories
export_model_trajectory("2019-07-14", "2019-07-15", lobt_buffer = c(before = 24, after = 1.25))

# 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)
export_model_trajectory("2019-01-01 00:00", "2019-01-02 00:00", bbox = bb)
}