This commit is contained in:
Dominic Ferrando
2025-09-15 16:10:11 -04:00
parent 17cbdbbe5e
commit f2ec4cb5e5
3 changed files with 5815 additions and 8 deletions
-7
View File
@@ -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
View File
@@ -32,7 +32,7 @@ const computedPerformances: ActivityPerformance[] = [
// ENDURANCE
{
activity: activities.RUN,
performance: minToMs(6) + secToMs(11),
performance: minToMs(5) + secToMs(20),
},
// AGILITY
{
+5814
View File
File diff suppressed because it is too large Load Diff