small tweaks
This commit is contained in:
@@ -3,6 +3,11 @@
|
|||||||
"unit": "kg"
|
"unit": "kg"
|
||||||
},
|
},
|
||||||
"weights": [
|
"weights": [
|
||||||
|
{
|
||||||
|
"gender": "Male",
|
||||||
|
"age": 5,
|
||||||
|
"weight": 21.1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"gender": "Male",
|
"gender": "Male",
|
||||||
"age": 10,
|
"age": 10,
|
||||||
@@ -48,6 +53,11 @@
|
|||||||
"age": 80,
|
"age": 80,
|
||||||
"weight": 79.6
|
"weight": 79.6
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"gender": "Female",
|
||||||
|
"age": 5,
|
||||||
|
"weight": 21.0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"gender": "Female",
|
"gender": "Female",
|
||||||
"age": 10,
|
"age": 10,
|
||||||
|
|||||||
@@ -243,8 +243,8 @@ export class Standards {
|
|||||||
const ageStep = 10;
|
const ageStep = 10;
|
||||||
|
|
||||||
const medianAge = 50;
|
const medianAge = 50;
|
||||||
const minAge = medianAge - (4 * ageStep);
|
const minAge = Math.max(medianAge - (5 * ageStep), 0);
|
||||||
const maxAge = medianAge + (4 * ageStep);
|
const maxAge = medianAge + (5 * ageStep);
|
||||||
|
|
||||||
const referenceStandard = this
|
const referenceStandard = this
|
||||||
.byActivity(activity)
|
.byActivity(activity)
|
||||||
@@ -268,8 +268,8 @@ export class Standards {
|
|||||||
|
|
||||||
const s = this.cfg.activity[activity].ageModifier;
|
const s = this.cfg.activity[activity].ageModifier;
|
||||||
|
|
||||||
const youngFloor0 = 0.65;
|
const youngFloor0 = 0.5;
|
||||||
const oldFloor0 = 0.70;
|
const oldFloor0 = 0.5;
|
||||||
|
|
||||||
const youngFloor = 1 - (1 - youngFloor0) * s;
|
const youngFloor = 1 - (1 - youngFloor0) * s;
|
||||||
const oldFloor = 1 - (1 - oldFloor0) * s;
|
const oldFloor = 1 - (1 - oldFloor0) * s;
|
||||||
@@ -311,7 +311,7 @@ export class Standards {
|
|||||||
const weightStep = 12;
|
const weightStep = 12;
|
||||||
const referenceWeight = getAvgWeight(gender, age);
|
const referenceWeight = getAvgWeight(gender, age);
|
||||||
|
|
||||||
const minWeight = referenceWeight - (3 * weightStep);
|
const minWeight = Math.max(referenceWeight - (3 * weightStep), 1);
|
||||||
const maxWeight = referenceWeight + (3 * weightStep);
|
const maxWeight = referenceWeight + (3 * weightStep);
|
||||||
|
|
||||||
const referenceStandard = this
|
const referenceStandard = this
|
||||||
|
|||||||
Reference in New Issue
Block a user