fix
This commit is contained in:
@@ -135,10 +135,6 @@ export class LevelCalculator {
|
||||
metrics: Metrics,
|
||||
): Standard {
|
||||
const interpolateByWeight = (targetAge: number): Levels => {
|
||||
// check if this is a weight calibrated activity
|
||||
const standard = this.standards.byActivity(activity).getOne();
|
||||
if (standard.metrics.weight === -1) return standard.levels;
|
||||
|
||||
const { lower: lowerAgeWeightStandard, upper: upperAgeWeightStandard } = this.standards
|
||||
.byActivity(activity)
|
||||
.byGender(metrics.gender)
|
||||
@@ -163,9 +159,6 @@ export class LevelCalculator {
|
||||
const ageLower = lowerAgeStandard.metrics.age;
|
||||
const ageUpper = upperAgeStandard.metrics.age;
|
||||
|
||||
console.log(activity);
|
||||
console.log("AGES: ", ageLower, ageUpper);
|
||||
|
||||
// Interpolate by age and weight
|
||||
let ageRatio = ageUpper === ageLower ? 1 : (metrics.age - ageLower) / (ageUpper - ageLower);
|
||||
ageRatio = Math.max(0, Math.min(1, ageRatio));
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ const computedPerformances: ActivityPerformance[] = [
|
||||
// ENDURANCE
|
||||
{
|
||||
activity: activities.RUN,
|
||||
performance: minToMs(6) + secToMs(11),
|
||||
performance: minToMs(5) + secToMs(20),
|
||||
},
|
||||
// AGILITY
|
||||
{
|
||||
|
||||
+5814
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user