Hi All,Looking at anomalies in the raw data, i see "Data spike candidate". Can you point me to the documentation or the calculation that causes this message?
Thanks Ale. It appears that the "Data spike candidate" is set based on the "Fix Power Spikes" settings tool. The default setting is 200 watts so anything over that is setting the anomaly flag.
Power meters will occasionally report erroneously 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 (Watts)- 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.
Thanks for the explanation Eric. To be honest, i'll have to dig into the math a bit more to better understand what is going on. Also, it sounds that you developed the tool for the different use case. In your case, you are trying to filter out power spikes due to noise. In my case, i'm trying to use it to filter out power spikes generated by the "Estimate Power Values..." tool. I'm not sure if that is a correct use case but here is why i was asking the questions.
WRT Estimate Power, I think it is not very useful in general riding conditions, mainly because aerodynamic resistance is a big component which cannot be reliably estimated.Anyway, the minimum requirements are good quality speed and altitude data and GPS data is crap for that, calibrated speed sensors and temperature compensated barometric altimeter may help, but again, I am not sure it is worth except in very special conditions.
I understand that
virtual power has many variables and will not be accurate based on physics and
I'm OK with an estimate. My challenge is the data. It appears that FIT files
provide the most data which is collected from an HR sensor, a speed sensor, a
cadence sensor and a Garmin 1030. Assuming lon, lat and elevation (barometric
altimeter) is OK, I'm looking at the slope included in the fit file and I have
no idea how it is calculated. Looking at the picture below (data in metric
system) you can see that the altitude doesn't change but the slope changes. The
biggest change at time 00:41:37 to 00:41:38 goes from 11% to 0% while the
altitude change is 0.19m and the distance is less than 5m. In addition, after
0041:38 the elevation doesn't change but the changes. I looked at Garmin fit
files from 3 different units and i see the same issues with the slope. Does
anyone else see this or is it just me? Or am I misinterpreting the data?
I understand that virtual power has many variables and will not be accurate based on physics and I'm OK with an estimate. My challenge is the data. It appears that FIT files provide the most data which is collected from an HR sensor, a speed sensor, a cadence sensor and a Garmin 1030. Assuming lon, lat and elevation (barometric altimeter) is OK, I'm looking at the slope included in the fit file and I have no idea how it is calculated. Looking at the picture below (data in metric system) you can see that the altitude doesn't change but the slope changes. The biggest change at time 00:41:37 to 00:41:38 goes from 11% to 0% while the altitude change is 0.19m and the distance is less than 5m. In addition, after 0041:38 the elevation doesn't change but the changes. I looked at Garmin fit files from 3 different units and i see the same issues with the slope. Does anyone else see this or is it just me? Or am I misinterpreting the data?
Thanks Ale, I like the second behavior. However, i have a question on the code: https://github.com/GoldenCheetah/GoldenCheetah/blob/f4630ea078366227e2f2427d8928e253fd2079be/src/FileIO/RideFile.cpp#L2543Why is deltaDistance multiplied by 10?

Thanks, I tried the second behavior and I'm not sure I understand the results.
After deleting the slope column and saving the ride I get the following.
If the altitude doesn't change, shouldn't the slope be zero?
Just FYI i imported a TCX file (there is no slope data in it) and i see the same result as the picture above. Is it possible that something else is changing the slope in the raw data view?
Thanks, that makes sense. I'll take a look at the smoothing. Is there any way to bypass any processing during import?