You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -72,11 +75,8 @@ export function createFlywheel (rowerSettings) {
72
75
let_torqueBeforeFlank
73
76
letinRecoveryPhase
74
77
letmaintainMetrics
75
-
lettotalNumberOfImpulses
76
-
lettotalTimeSpinning
77
-
let_totalWork
78
78
reset()
79
-
79
+
80
80
/**
81
81
* @param {float} dataPoint - The lenght of the impuls (currentDt) in seconds
82
82
* @description This function is called from Rower.js each time the sensor detected an impulse. It transforms this (via the buffers) into a robust flywheel position, speed and acceleration.
@@ -112,40 +112,41 @@ export function createFlywheel (rowerSettings) {
112
112
// value before the shift is certain to be part of a specific rowing phase (i.e. Drive or Recovery), once the buffer is filled completely
// Process a value in the systematic error filter buffer. We need to do this slowly to prevent radical changes which might disturbe the force curve etc.
log.debug(`*** Calculated recovery slope: ${recoveryDeltaTime.slope().toFixed(6)}, Goodness of Fit: ${recoveryDeltaTime.goodnessOfFit().toFixed(4)}`)
194
+
log.trace(`*** Calculated recovery slope: ${recoveryDeltaTime.slope().toFixed(6)}, Goodness of Fit: ${recoveryDeltaTime.goodnessOfFit().toFixed(4)}`)
194
195
}else{
195
196
// We aren't allowed to adjust the slope, let's report the slope to help help the user configure it
196
-
log.debug(`*** Calculated recovery slope: ${recoveryDeltaTime.slope().toFixed(6)}, Goodness of Fit: ${recoveryDeltaTime.goodnessOfFit().toFixed(4)}, not used as autoAdjustRecoverySlope isn't set to true`)
197
+
log.trace(`*** Calculated recovery slope: ${recoveryDeltaTime.slope().toFixed(6)}, Goodness of Fit: ${recoveryDeltaTime.goodnessOfFit().toFixed(4)}, not used as autoAdjustRecoverySlope isn't set to true`)
197
198
}
198
199
}else{
199
200
// As the drag calculation is considered unreliable, we must skip updating the systematic error filter that depends on it
@@ -225,7 +226,7 @@ export function createFlywheel (rowerSettings) {
225
226
* @returns {float} the current DeltaTime BEFORE the flank
226
227
*/
227
228
functiondeltaTime(){
228
-
return_deltaTimeBeforeFlank
229
+
return_deltaTimeBeforeFlank.clean
229
230
}
230
231
231
232
/**
@@ -397,27 +398,35 @@ export function createFlywheel (rowerSettings) {
397
398
}
398
399
}
399
400
401
+
/**
402
+
* @param {float} slope - Recovery slope to be converted
403
+
* @returns {float} Dragfactor to be used in all calculations
404
+
* @description Helper function to convert a recovery slope into a dragfactor
0 commit comments