From 87a22795e433d4685d0826abb0116579ee782f8b Mon Sep 17 00:00:00 2001 From: Jaap van Ekris <82339657+JaapvanEkris@users.noreply.github.com> Date: Fri, 21 Apr 2023 19:27:32 +0200 Subject: [PATCH] Adoption to RowsAndAll timestamp spec change RowsAndAll changed the specification of the timestamp, which caused the total rowing time to be inaccurate. --- app/engine/WorkoutRecorder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/engine/WorkoutRecorder.js b/app/engine/WorkoutRecorder.js index b538f47..f8c83ee 100644 --- a/app/engine/WorkoutRecorder.js +++ b/app/engine/WorkoutRecorder.js @@ -78,7 +78,7 @@ function createWorkoutRecorder () { trackPointTime = new Date(startTime.getTime() + currentstroke.totalMovingTime * 1000) timestamp = trackPointTime.getTime() / 1000 - RowingData += `${currentstroke.totalNumberOfStrokes.toFixed(0)},${currentstroke.totalNumberOfStrokes.toFixed(0)},${currentstroke.totalNumberOfStrokes.toFixed(0)},${timestamp.toFixed(0)},` + + RowingData += `${currentstroke.totalNumberOfStrokes.toFixed(0)},${currentstroke.totalNumberOfStrokes.toFixed(0)},${currentstroke.totalNumberOfStrokes.toFixed(0)},${timestamp.toFixed(5)},` + `${currentstroke.totalMovingTime.toFixed(2)},${(currentstroke.heartrate > 30 ? currentstroke.heartrate.toFixed(0) : NaN)},${currentstroke.totalLinearDistance.toFixed(1)},` + `${currentstroke.cycleStrokeRate.toFixed(1)},${(currentstroke.totalNumberOfStrokes > 0 ? currentstroke.cyclePace.toFixed(2) : NaN)},${(currentstroke.totalNumberOfStrokes > 0 ? currentstroke.cyclePower.toFixed(0) : NaN)},` + `${currentstroke.cycleDistance.toFixed(2)},${(currentstroke.driveDuration * 1000).toFixed(0)},${(currentstroke.totalNumberOfStrokes > 0 ? currentstroke.driveLength.toFixed(2) : NaN)},${(currentstroke.recoveryDuration * 1000).toFixed(0)},` +