Retrieve the edges in a graph corresponding to the flight transition defined by a path. These
edges can be useful to extract flight information specific to a path.
Value
Data.frame of the edge containing:
j: index of the path (1ifpathhas nojcolumn).s: index in 3D (lat-lon-stap) of the origin (source).t: index in 3D (lat-lon-stap) of the destination (target).lat_s: latitude of the origin (source).lat_t: latitude of the destination (target).lon_s: longitude of the origin (source).lon_t: longitude of the destination (target).stap_s: stationary period of the origin (source).stap_t: stationary period of the destination (target).distance: Distance (in km) of the flight.start: start of the flight.end: end of the flight.duration: duration of the flight.n: number of flights.bearing: Angle of the flight in degree (0° = North, 90° = East).gs: groundspeed vector expressed as a complex number. You can compute the groundspeed value (km/h) withabs(gs), the W-E and S-N component of the flight withRe(gs)andIm(gs), and the angle/direction withArg(gs). If graph provided.ws: windspeed vector (km/h) expressed as a complex number, in the same format asgs. Only if graph provided and computed withgraph_add_wind(). Airspeed is computed withas = gs - wsin complex number to keep the vectorial additive properties.
See also
Other path:
path2elevation(),
path2twilight(),
plot_path(),
tag2path()
Examples
withr::with_dir(system.file("extdata", package = "GeoPressureR"), {
tag <- load_interim("18LX", var = "tag")
path <- load_interim("18LX", var = "path_most_likely")
})
edge <- path2edge(path, tag)
head(edge)
#> stap_s stap_t j s t lat_s lat_t lon_s lon_t start
#> 1 1 2 1 6603 14306 48.90 47.25 17.05 16.75 2017-08-04 19:47:30
#> 2 2 3 1 14306 21712 47.25 44.25 16.75 14.75 2017-08-05 19:27:30
#> 3 3 4 1 21712 29718 44.25 41.25 14.75 15.75 2017-08-06 19:12:30
#> 4 4 5 1 29718 36918 41.25 41.25 15.75 12.75 2017-08-07 19:12:30
#> end duration n distance bearing gs
#> 1 2017-08-04 23:17:30 3.500000 1 185.0271 187.0384 -6.477772-52.4665160i
#> 2 2017-08-06 02:52:30 7.416667 1 368.2925 205.6689 -21.510066-44.7568493i
#> 3 2017-08-07 03:12:30 8.000000 1 343.8094 165.9045 10.466340-41.6822161i
#> 4 2017-08-08 00:12:30 5.000000 1 251.0708 270.9891 -50.206678+ 0.8668473i
