UG_Special Topics_Activity Processing - GoldenCheetah/GoldenCheetah GitHub Wiki

Special Topics: Activity Processing


GoldenCheetah provides a number of tools (Data Processors) to fix/adjust/correct activity data. The adjustments can either be executing manually for a specific activity, or automatically during import of activities.

The configuration of the available tools is done in 'Preferences' -> 'Data Fields'

  • If you set a tool to 'Manual' in the preferences, you have to run it manually per activity through Tools-><name of the tool>. The values set in preferences then are taken as defaults, which you can still override in the tool dialog box, before running the tool.

  • If you set a tool to 'Auto' in the preferences, the tool is executed with the parameter settings from 'Preferences' for each activity import you are doing. You can still run the tool manually with different parameters after the import is done.

Note: The fixes/changes are only done to the activity file stored in GoldenCheetah format (.json) - GoldenCheetah does not manipulate any of original data files.

General: Undo/Redo

Any changes to the activity data done by the tools explained below, are not immediately stored. There are basically three ways to 'Undo' the changes made by the processing tools:

  • 'Leave without Saving' - you can always end GoldenCheetah without saving your activity data - (depending on your settings GoldenCheetah will ask / or not, if you have done any changes). When going this way ALL changes done since last saving of the activity file is lost.

  • 'Revert to Saved version' - on the 'Side Bar' -> 'Activities' pane, the context menu changes when activity data has changed - it then also offers a 'Revert to saved version' function.

  • 'Undo/Redo' - in the 'Activities' view - 'Editor' chart, you have an explicit 'Undo/Redo' feature available. Every run of a tool is collected into an 'Undo' stack, which can then be used to get back to the version of data before running the tool. You can also 'Redo' the changes - which re-applies the changes (only if you did an 'Undo' before. See also Activities - Editor

Edit tool: Add Torque

Derive torque when power and cadence data is available.

  • No parameters.

Edit tool: Adjust Power

Adjusting power values allows you to uplift or degrade the power values by a percentage and/or a fix value. It takes two parameters:

  • Percent Adjustment - this defines percentage to modify values by. Negative values are supported.
  • Fix Adjustment - this defines an fix amount to modify values by. Negative values are supported.

If both parameters are given, first the relative adjustment takes place, then the fix value adjustment is applied on the result.

Edit tool: Adjust Torque

Adjusting torque values allows you to uplift or degrade the torque values when the calibration of your power meter was incorrect. It takes a single parameter:

  • Torque Adjust - this defines an absolute value in poinds per square inch or newton meters to modify values by. Negative values are supported. (e.g. enter "1.2 nm" or "-0.5 pi").

Edit tool: Estimate Distance Values

Derive distance based on ridefile's GPS locations

This process will populate distance information (and override existing distance information if present. The cubic splines processing estimates distance across polynomial curve, otherwise this feature will compute geometric arc distance between ride points.

  • No parameters.

Edit tool: Estimate Headwind Values

Use weather broadcasted data in FIT file to derive Headwind.

  • No parameters.

Edit tool: Estimate Power Values

Derive estimated power data based on speed/elevation/weight etc

Bike Weight parameter is added to athlete's weight to compound total mass, it should include apparel, shoes, etc

  • CRR parameter is the coefficient of rolling resistance, it depends on tires and surface
  • CdA parameter is the effective frontal area in m^2, it depends on position and equipment. If 0 estimated from anthropometric data
  • Draft Mult. parameter is the multiplier to adjust for drafting, 1 is no drafting and 0.7 seems legit for drafting in a group
  • wind speed shall be indicated in kph
  • wind direction (origin) unit is degrees from -179 to +180 (-90=W, 0=N, 90=E, 180=S)

Note: when the ride file already contain wind data it will be overridden if wind is entered manually

The activity has to be a Ride with Speed, Altitude and without Power data if running in automatic mode.

Warning: the accuracy of power estimation can be too low to be of practical use for power analysis of general outdoor rides using typical GPS data. A power meter is recommended.

Edit tool: Estimate Running Power

Derive estimated running power data based on speed/elevation/weight etc using di Prampero coefficcients

  • Equipment Weight parameter is added to athlete's weight to compound total mass, it should include apparel, shoes, etc
  • Draft Mult. parameter is the multiplier to adjust for drafting, 1 is no drafting and 0.7 seems legit for drafting in a group
  • wind speed shall be indicated in kph
  • wind direction (origin) unit is degrees from -179 to +180 (-90=W, 0=N, 90=E, 180=S)

Note: when the file already contain wind data it will be overridden if wind is entered

The activity has to be a Run with Speed, Altitude and without Power data if running in automatic mode.

Edit tool: Filter R-R Outliers

Filter R-R outliers (see "R-R flag" in HRV Xdata). Non outliers are marked "1".

It takes 4 parameters:

  • R-R min and maximum exclude samples outside (flag -1). Also excluded when filtering range.
  • Filter range of the average within a window (flag 0)
  • Filter window size distance on either side of the current interval
  • Set Rest HRV if checked the computed HRV metrics are set as Rest HRV Measures. This option is intended for interactive use only, it doesn’t apply if you configure this data processor to run automatically on import.

For more information see Heart Rate Variability (HRV)

Edit tool: Fix Elevation errors

Fix or add elevation data. If elevation data is present it will be removed and overwritten. Elevation data is obtained from MapQuest OpenElevation API: http://open.mapquestapi.com/elevation/

INTERNET CONNECTION REQUIRED.

In v3.6 it takes 1 parameter:

  • MapQuest API Key is optional, you can set a personal key to have your own transaction limits, you can get a free one from https::/developer/mapquest.com/

Note 1: The Web Site does not provide exact information which elevation source data is used. Some texts refer to SRTM data - so it's quite probably that this data is used. Accuracy of the service is not documented.

Note 2: The Web Service has limited free calls and this is the cause when you receive the error message Fix Elevation Data Not Possible - Monthly Free Plan Limit Exceeded. In v3.6 you can set your personal API Key to get your own quota. The alternative is to upload/download to/from an external website s.t. Strava or https://www.gpsvisualizer.com/elevation to fix altitude.

Edit tool: Fix Freewheeling Power/Cadence

ANT+ crank based power meters will send 3 duplicate values for power and cadence when the rider starts to freewheel. The duplicates should not be retained. This tool removes the duplicates.

  • No parameters.

Edit tool: Fix GPS errors

Remove GPS errors and interpolate positional data where the GPS device did not record any data, or the data that was recorded is invalid.

For v3.6 new facilities are being incorporated to smooth altitude and route data, a detailed description can be found at https://github.com/GoldenCheetah/GoldenCheetah/issues/3320

Edit tool: Fix Gaps in Recording

Many devices, especially wireless devices, will drop connections to the bike computer. This leads to lost samples in the resulting data, or so-called drops in recording. In order to calculate peak powers and averages, it is very helpful to remove these gaps, and either smooth the data where it is missing or just replace with zero value samples

This function performs this task, taking two parameters:

  • Tolerance - this defines the minimum size of a recording gap (in seconds) that will be processed. Any gap shorter than this will not be affected.
  • Stop - this defines the maximum size of gap (in seconds) that will have a smoothing algorithm applied. Where a gap is shorter than this value it will be filled with values interpolated from the values recorded before and after the gap. If it is longer than this value, it will be filled with zero values.

Edit tool: Fix HR Spikes

Occasionally heart rate sensors will erroneously report high values for heart rate or drop out (0). This function will look for spikes and dropouts in heart rate data and replace the erroneous data by interpolating the data from either side of the point in question

It takes a single parameter:

  • Absolute Max - this defines an absolute value for heart rates, and will smooth any values above this absolute value that have been identified as being anomalies (i.e. at odds with the data surrounding it).

Edit tool: Fix Lap Swim from Length Data

Occasionally swim watches can fail to detect a lap or add an extra one, the process to fix this has 2 steps:

  1. via Edit SWIM tab add or remove lengths and correct length TYPE/DURATION/STROKES, there is no need to fix the accumulated Time and Distance (columns 1 and 2) since the fix tool will recompute these, pause lengths (Type=0) are used to mark start/end of laps.
  2. run Edit->Fix Lap Swim from Length Data, Pool Length parameter can be left to 0 if Pool Length was correctly configured and imported, otherwise you can specify the value here, all second-by-second samples will be recreated based on length-by-length info and laps marked using pause lengths, all metrics will be automatically recomputed.

Edit tool: Set SmO2/tHb from Speed and Cadence

When recording from the Moxy in Speed and cadence mode the SmO2 and tHb data is sent as cadence and speed respectively. This tool will update the activity file to move the values from speed and cadence into the Moxy series.

  • No parameters.

Edit tool: Fix Power Spikes

Occasionally power meters will erroneously report high values for power. For crank based power meters such as SRM and Quarq this is caused by an erroneous cadence reading as a result of triggering a reed switch whilst pushing off. This function provides two algorithms that look for spikes/anomalies in power data and replace the erroneous data by:

i) Replacing the point in question with smoothed/interpolated data from either side of the point in question, it takes the following parameters:

  • Absolute Max - this defines an absolute value for watts, and will smooth any values above this absolute value that have been identified as being anomalies (i.e. at odds with the data surrounding it)
  • Variance (Watts) - This determines the threshold beyond which a data point will be smoothed/interpolated, if the difference between the data point value and the 30 second rolling average wattage prior to the spike exceeds this parameter.

ii) Replacing the point in question with the median value of a window centred upon the erroneous data point. This approach is robust to local outliers, and preserves sharp edges, it takes the following parameters:

  • Window Size - this defines the number of neighbouring points used to determine a median value; the window size is always odd to ensure we have a central median value.
  • Variance (Watts) - Determines the threshold beyond which a data point will be fixed, if the difference between the data point value and the median value exceeds this parameter.

Edit tool: Fix Running Cadence

Some file report cadence in steps per minutes. This tools convert to revolutions or cycles per minute

Edit tool: Fix SmO2 and/or tHb Anomaly

Occasionally SmO2 (%) and/or tHb (%) will erroneously report missing or high values (SmO2: 0% or >100% / tHb: 0% or > max. tHb parameter).

This function will look for those anomalies in SmO2 and tHb data and depending on the configuration replace the erroneous data by smoothing/interpolating the data from either side of the 3 points in question. It takes the following parameters:

  • Fix SmO2 - check to fix anomalies in SmO2 data
  • Fix tHb - check to fix anomalies in tHb data
  • Max. tHb - any tHb above is considered an outlier

Edit tool: Fix Speed from Distance

Some devices report sample speed not matching the change of distance, for example when using a footpod for speed and GPS for distance. This tool replaces the existing speed channel, or creates a new one if not present, based on travelled distance

It takes a single parameter:

  • Moving Average Seconds - allows to set the seconds of the Moving Average filter to smooth speed spikes

Edit tool: Set XData.CdA from HR

When recording with an iBike AeroPod (in HR mode) the CdA data is sent as HR. This tool will update the activity file to move the values from HR into the XData.CdA series.

Edit tool: Snippet Export

Dump metrics for the ride to Athlete_Home/Snippets

BACK: Special Topics: Overview
BACK: Table of contents