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
Improved numeric robustness of angular distance calculation
As angular distance is composed of many floating point additions, it is changed in a increment counter followed by a multiplication to reduce floating point errors from escalating.
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
@@ -397,24 +398,32 @@ 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