cumulative_time: Calculate the cumulative time (in s).

View source: R/cumulative.R

cumulative_timeR Documentation

Calculate the cumulative time (in s).

Description

Calculate the cumulative time (in s).

Usage

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 integer (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 analysis: cumulative_distance(), extract_segment(), filter_outlier(), smooth_positions()

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))

## End(Not run)

euctrl-pru/trrrj documentation built on March 10, 2024, 1:12 p.m.