processSegments: clean up and add start/stop segments to a track tibble, add...

Description Usage Arguments Value See Also

View source: R/segments.R

Description

processSegments processes a gps track file to correct or add start/stop segment information like that generated by gps autopause. The sequence of processing is: eliminate stops that are too short, split segments where time between observations is too large, split segments where stopped for longer than threshold, then merge segments which are too small. Finally, all segment breaks too close to the start line are removed

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
processSegments(
  trackdf,
  segInitIdleAggSecs = 60,
  segInitIdleAggMeters = 20,
  segBreakTimeMin = 3,
  nonsegTimeGapMax = 30,
  segSplitTimeStop = 3,
  segMinObs = 4,
  segMinMeters = 20,
  segMinSecs = 20,
  ignoreSegInfo = FALSE,
  loud = FALSE,
  ...
)

Arguments

trackdf

data frame or tibble with gps track data

segInitIdleAggSecs

stops/restarts before this time has elapsed are discarded and the ride starts at the last start prior to this

segInitIdleAggMeters

stops/restarts within this distance of the initial start are discarded as above

segBreakTimeMin

(seconds) segments separated by less time than this are joined

nonsegTimeGapMax

(seconds) segemnts are split between datapoints separated by more time than this

segSplitTimeStop

segments are split at points where

segMinObs

segments smaller than this are joined to closest neighboring segment

segMinMeters

segments shorter than this are joined with predecessor

segMinSecs

(seconds) segments shorter than this are joined

ignoreSegInfo

wipe existing segment information and use nonsegTimeGapMax and segSplitTimeStop to reconstruct segments before merging short ones

loud

display summary of actions

...

parameters for repairHR, repairCadence, statsCadence, statsPower, statsHeartRate, statsGearing, statsGrade, statsSession, statsStops

Value

a tibble containing track data with start/stop segment data

See Also

read_ride, repairHR, repairCadence, statsCadence, statsPower, statsHeartRate, statsGearing, statsGrade, statsSession, statsStops


CraigMohn/rideReadGPS documentation built on March 20, 2021, 11:57 a.m.