The calculated distance also for position reports on the ground; the algorithm used is the one of distCosine.

cumulative_distance(positions)

Arguments

positions

the position reports for the flight

Value

a dataframe with a new cumulative_distance column (in km)

See also

Examples

if (FALSE) { cumulative_distance(poss) # calculate only the flown distance # NOTE: there is a gap in FR24 data between last ground position (if any) # and first in air one (typically at ~1500 ft). # The following code would certainly work better # would poss contain a position report for a very low altitude. cumulative_distance(poss %>% filter(altitude > 0)) }