fitness: add kcal estimation based on Lytle et al. (2019) regression model
Estimate strength workout energy expenditure using the Lytle et al. multiple linear regression model. Maps all 77 exercises to 7 studied categories with confidence levels. Shows kcal on stats page (cumulative), session cards, workout detail, and workout completion screen. Supports sex/height demographics via profile section on measure page. Includes info tooltip with DOI reference.
This commit is contained in:
@@ -3,7 +3,9 @@ import mongoose from 'mongoose';
|
||||
const FitnessGoalSchema = new mongoose.Schema(
|
||||
{
|
||||
username: { type: String, required: true, unique: true },
|
||||
weeklyWorkouts: { type: Number, required: true, default: 4, min: 1, max: 14 }
|
||||
weeklyWorkouts: { type: Number, required: true, default: 4, min: 1, max: 14 },
|
||||
sex: { type: String, enum: ['male', 'female'], default: 'male' },
|
||||
heightCm: { type: Number, min: 100, max: 250 }
|
||||
},
|
||||
{ timestamps: true }
|
||||
);
|
||||
@@ -11,6 +13,8 @@ const FitnessGoalSchema = new mongoose.Schema(
|
||||
interface IFitnessGoal {
|
||||
username: string;
|
||||
weeklyWorkouts: number;
|
||||
sex?: 'male' | 'female';
|
||||
heightCm?: number;
|
||||
}
|
||||
|
||||
let _model: mongoose.Model<IFitnessGoal>;
|
||||
|
||||
Reference in New Issue
Block a user