For a given IMU vector, identify temporally adjacent bursts and merge them into a single burst. Bursts that end at the same time as the start time of the next burst are considered adjacent. Bursts with different frequencies or axes will not be merged.
Arguments
- x
An IMU vector (e.g.
acc,mag,gyro).- ids
Vector indicating groups to which the elements in
xbelong. If provided, bursts inxwill not be merged across different values of this vector, even if their timestamps and frequencies align.- drop
Logical indicating whether to drop entries that have been merged into other bursts. If
drop = FALSE(default), the output will have the same length as the inputx, withNAvalues at positions where bursts were merged into a preceding burst. This is useful for retaining index matching between the input and output vectors.