small tweaks

This commit is contained in:
Dominic Ferrando
2025-10-17 19:37:57 -04:00
parent bd87791ed9
commit fadae8e7bc
2 changed files with 15 additions and 5 deletions
+10
View File
@@ -3,6 +3,11 @@
"unit": "kg"
},
"weights": [
{
"gender": "Male",
"age": 5,
"weight": 21.1
},
{
"gender": "Male",
"age": 10,
@@ -48,6 +53,11 @@
"age": 80,
"weight": 79.6
},
{
"gender": "Female",
"age": 5,
"weight": 21.0
},
{
"gender": "Female",
"age": 10,
+5 -5
View File
@@ -243,8 +243,8 @@ export class Standards {
const ageStep = 10;
const medianAge = 50;
const minAge = medianAge - (4 * ageStep);
const maxAge = medianAge + (4 * ageStep);
const minAge = Math.max(medianAge - (5 * ageStep), 0);
const maxAge = medianAge + (5 * ageStep);
const referenceStandard = this
.byActivity(activity)
@@ -268,8 +268,8 @@ export class Standards {
const s = this.cfg.activity[activity].ageModifier;
const youngFloor0 = 0.65;
const oldFloor0 = 0.70;
const youngFloor0 = 0.5;
const oldFloor0 = 0.5;
const youngFloor = 1 - (1 - youngFloor0) * s;
const oldFloor = 1 - (1 - oldFloor0) * s;
@@ -311,7 +311,7 @@ export class Standards {
const weightStep = 12;
const referenceWeight = getAvgWeight(gender, age);
const minWeight = referenceWeight - (3 * weightStep);
const minWeight = Math.max(referenceWeight - (3 * weightStep), 1);
const maxWeight = referenceWeight + (3 * weightStep);
const referenceStandard = this