Calculate the cumulative time (in s).
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
See also
Other analysis:
cumulative_distance()
,
extract_segment()
,
filter_outlier()
,
smooth_positions()
Examples
if (FALSE) {
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))
}