Calculate the cumulative time (in s).

cumulative_time(positions, offblock = NULL, inblock = NULL)

Arguments

positions

the position reports for the flight

offblock

optional, the timestamp for offblock if different from the first timestamp in the dataset. It is either an `int`eger (UNIX timestamp) or a date-time value

inblock

optional, the timestamp for inblock if different from the last timestamp in the dataset

Value

a dataframe with a new cumulative_time column (in min)

See also

Other positions enhancements functions: cumulative_distance

Examples

# NOT RUN {
cumulative_time(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_time(poss %>% filter(altitude > 0))
# }