Open MrCsabaToth opened 5 months ago
FTMS Treadmill Data doesn't have cadence, so it is provided by a separate Running Cadence sensor endpoint https://github.com/oesmith/gatt-xml/blob/master/org.bluetooth.characteristic.rsc_measurement.xml That data doesn't have any multiplier: "Unit is in 1/minute (or RPM) with a resolutions of 1 1/min (or 1 RPM)", and I can confirm while I'm running the cadence is in a sane range (160-180 range). It seems to double on Strava and even on Under Armour. Strava upload uses FIT format while Under Armour has it's specific JSON format. It'd be weird if both would double the cadence, so maybe the common exporter class does something. Maybe it's just with the total average SPM?
The TCX, JSON and CSV exports look fine Activity_12-6-2023_17-55-42.zip
I examined the code, the StatisticsAccumulator, and all the export code, and I don't have any evidence that I'd either divide or multiply cadences. One bug source could be if the accumulator doesn't divide the summation by the proper count, but that's also not the case.
Note that average calculation currently summates. I was wondering if overflow could occur, for example with a cycling avg power of 400-500W for a TdF cyclist after a long workout. But integer is 64 bit on mobile and desktop, and 53 bit on web, so it won't likely overflow. https://stackoverflow.com/questions/50429660/is-there-a-constant-for-max-min-int-double-value-in-dart
Closing for now and will reopen if needed
This still bothers me. Maybe it's that rpm can be interpreted differently: the number of steps could be double of the cadence - a full turnaround which would be two steps?
Screenshots later. I need to debug this.