repairCadence: clean up cadence data for a track

Description Usage Arguments Value See Also

View source: R/cadence.R

Description

repairCadence processes a gps track file to correct and summarize cadence data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
repairCadence(
  trackdf,
  cadNAtoZeroInit = "stopped",
  cadNAtoZeroMid = 3,
  cadNAtoZeroFinal = "downhill",
  fixCadence = TRUE,
  cadMax = 160,
  cadMin = 0,
  cadCorrectTooHigh = "smooth",
  cadCorrectNA = "zero",
  cadCorrectWindowSec = 7,
  cadStuckMax = 0,
  cadStuckRep = 4,
  cadStuckSpdDelta = 0.07,
  cadCorrectStopped = TRUE,
  loud = FALSE,
  ...
)

Arguments

trackdf

data frame or tibble with gps track data

cadNAtoZeroInit

either "all", "stopped","downhill" or "none" to specify when to replace inital missing cadence values with zero

cadNAtoZeroMid

an integer, set midride missing cadence values to zero if preceded by this many zeros

cadNAtoZeroFinal

either "all", "stopped","downhill" or "none" to specify when to replace final missing cadence values with zero

fixCadence

repair cadence errors

cadMax

max credible cadence value, larger values are errors

cadMin

min nonzero cadence value, smaller values set to 0

cadCorrectTooHigh

"smooth" to repair excessive cadence values using triangular-kernel-weighted average of the nearest nonmissing values in the same segment or "cap" to cap them at cadMax

cadCorrectNA

"smooth" to repair cadence missing values using triangular-kernel-weighted average of the nearest nonmissing values in the same segment or "zero" to set them to zero

cadCorrectWindowSec

window size for kernel smoothing of cadence

cadStuckMax

threshold cadence value for removing repeated low values, useful for some sensor/GPS combinations. 0 means no checking for this.

cadStuckRep

minimum length of runs of low cadence values to remove, useful for some sensor/GPS combinations

cadStuckSpdDelta

proportionate change from initial speed to remove useful for some sensor/GPS combinations

cadCorrectStopped

repair cadence by setting cadence to 0 when speed is zero. This is what would be appropriate if magnet parked near sensor was generating spurious clicks or if moving pedal while at stoplight

loud

display actions taken

...

parameters for processSegments, repairSensorDropOut, repairHR, repairPower, statsHeartRate, statsCadence, statsPower, statsGearing, statsGrade, statsSession, statsStops, statsTemp

Value

dataframe with cadence data repaired

See Also

read_ride, repairSensorDropOut, repairHR, repairPower, statsHeartRate, statsCadence, statsPower, statsGearing, statsGrade, statsSession, statsStops, statsTemp


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