核心逻辑链
本计算器采用"%HRR 目标强度反推配速 + 环境与路面逐项修正"的方式工作:
输入参数 → 计算HRmax与储备心率 → 按%HRR确定目标强度 → 通过VO₂max估算公式计算基准配速 → 依次叠加【温度+露点修正】【云量/日照修正】【风修正】【气压+海拔修正】【爬升梯度修正】【路面修正】【身体素质修正】【呼吸/强度修正】 → 输出最终推荐配速与步频
最终配速计算公式(乘法叠加模型)
最终配速 = 基准配速 × (1+温湿修正%) × (1+风修正%) × (1+气压海拔修正%) × (1+爬升修正%) × (1+路面修正%) × (1+身体素质修正%) × 呼吸系数
公式组 A:最大心率与储备心率 (Gellish 2007)
HRmax = 208 − (0.7 × 年龄)
HRR = HRmax − 静息心率
目标心率 = 静息心率 + HRR × 目标强度%
公式组 B:VO₂max 估算 (Uth 2004)
VO₂max = 15.3 × (HRmax ÷ 静息心率) × 体重调整系数 × 身体素质系数 × 肺活量系数
公式组 C:温度+露点+云量修正
理想跑步温度约10°C。偏离越大,配速惩罚越大。云量遮阳等效降低体感温度。露点越高(越潮湿),汗蒸发越困难,散热越差。
温度偏差 = 温度 − 10°C − 云量遮阳等效降温
露点惩罚 = max(0, 露点 − 12°C) × 0.25%
公式组 D:气压+海拔修正
输入修正海压和海拔高度,计算当地实际气压。海拔升高→气压降低→含氧量降低→配速减慢。
公式组 E:爬升梯度修正
净爬升 = 总上升 − 总下降
梯度(%) = 净爬升 ÷ (距离×1000) × 100
上坡×4.5,下坡×2.5(非对称)
呼吸对应区间
仅呼吸 → 乳酸阈值区 (80-90% HRmax)
偶尔谈话 → 有氧耐力区 (70-80% HRmax)
总是谈话 → 恢复/燃脂区 (60-70% HRmax)
导出json的schema
如果你需要二次开发, 需要json参考, 那么下面的json schema可能对你有帮助. 请注意这个schema由ai直接生成, 不一定完全对应程序生成的内容.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "RunningPaceCalculation",
"description": "基于环境、生理和地形因素计算跑步配速与心率区间的结果模型",
"type": "object",
"required": ["config", "result"],
"properties": {
"config": {
"type": "object",
"required": [
"fitnessLevel",
"age",
"hrRest",
"weight",
"height",
"vitalCap",
"temperature",
"dewPoint",
"cloudCode",
"pressure",
"altitude",
"windSpeed",
"windDirection",
"heading",
"totalAscent",
"totalDescent",
"totalDistance",
"targetHRPercent",
"breathing",
"surface"
],
"properties": {
"fitnessLevel": {
"type": "string",
"description": "健身水平标签,例如 youngHealthy、trained、sedentary 等",
"examples": ["youngHealthy"]
},
"age": {
"type": "integer",
"description": "年龄(岁)",
"minimum": 10,
"maximum": 100
},
"hrRest": {
"type": "integer",
"description": "安静心率(bpm)",
"minimum": 30,
"maximum": 120
},
"weight": {
"type": "number",
"description": "体重(kg)",
"exclusiveMinimum": 0
},
"height": {
"type": "number",
"description": "身高(cm)",
"exclusiveMinimum": 0
},
"vitalCap": {
"type": "integer",
"description": "肺活量(mL)",
"minimum": 1000
},
"temperature": {
"type": "number",
"description": "气温(℃)"
},
"dewPoint": {
"type": "number",
"description": "露点温度(℃)"
},
"cloudCode": {
"type": "string",
"description": "云况代码,例如 clear、partlyCloudy、overcast 等",
"examples": ["overcast"]
},
"pressure": {
"type": "number",
"description": "大气压强(hPa)",
"minimum": 800,
"maximum": 1100
},
"altitude": {
"type": "number",
"description": "海拔高度(米)"
},
"windSpeed": {
"type": "number",
"description": "风速(m/s)",
"minimum": 0
},
"windDirection": {
"type": "number",
"description": "风向角度(°),0-360"
},
"heading": {
"type": "number",
"description": "运动方向角度(°),0-360"
},
"totalAscent": {
"type": "number",
"description": "总爬升高度(米)",
"minimum": 0
},
"totalDescent": {
"type": "number",
"description": "总下降高度(米)",
"minimum": 0
},
"totalDistance": {
"type": "number",
"description": "总距离(公里)",
"exclusiveMinimum": 0
},
"targetHRPercent": {
"type": "number",
"description": "目标心率储备百分比(%)",
"minimum": 0,
"maximum": 100
},
"breathing": {
"type": "string",
"description": "呼吸状态描述,例如 fewWords、conversational、labored 等",
"examples": ["fewWords"]
},
"surface": {
"type": "string",
"description": "路面类型,例如 cleanFlat、trail、sandy 等",
"examples": ["cleanFlat"]
}
},
"additionalProperties": false
},
"result": {
"type": "object",
"required": [
"basePace",
"finalPace",
"cadence",
"estStrideLen",
"hrZoneName",
"targetHRPercent",
"targetHR",
"HRmax",
"HRR",
"vo2max",
"adjustments",
"warnings"
],
"properties": {
"basePace": {
"type": "string",
"pattern": "^\\d+′\\d+″/km$",
"description": "基础配速,格式如 13′45″/km"
},
"finalPace": {
"type": "string",
"pattern": "^\\d+′\\d+″/km$",
"description": "最终调整配速"
},
"cadence": {
"type": "string",
"pattern": "^\\d+ 步/分钟$",
"description": "步频,如 81 步/分钟"
},
"estStrideLen": {
"type": "string",
"pattern": "^\\d+(\\.\\d+)? cm$",
"description": "估算步长,如 84.6 cm"
},
"hrZoneName": {
"type": "string",
"description": "心率区间名称"
},
"targetHRPercent": {
"type": "string",
"pattern": "^\\d+(\\.\\d+)?% HRR$",
"description": "目标心率储备百分比,含单位"
},
"targetHR": {
"type": "string",
"pattern": "^\\d+ bpm$",
"description": "目标心率值"
},
"HRmax": {
"type": "string",
"pattern": "^\\d+ bpm$",
"description": "最大心率"
},
"HRR": {
"type": "string",
"pattern": "^\\d+ bpm$",
"description": "心率储备"
},
"vo2max": {
"type": "string",
"pattern": "^\\d+(\\.\\d+)? mL/kg/min$",
"description": "最大摄氧量"
},
"adjustments": {
"type": "object",
"required": [
"heat",
"cloud",
"wind",
"pressure",
"gradient",
"surface",
"fitness",
"breathing",
"totalFactor"
],
"properties": {
"heat": {
"type": "string",
"pattern": "^[+-]\\d+(\\.\\d+)?%$",
"description": "温度调整百分比"
},
"cloud": {
"type": "string",
"pattern": "^[+-]\\d+(\\.\\d+)?%$"
},
"wind": {
"type": "string",
"pattern": "^[+-]\\d+(\\.\\d+)?%$"
},
"pressure": {
"type": "string",
"pattern": "^[+-]\\d+(\\.\\d+)?%$"
},
"gradient": {
"type": "string",
"pattern": "^[+-]\\d+(\\.\\d+)?%$"
},
"surface": {
"type": "string",
"pattern": "^[+-]\\d+(\\.\\d+)?%$"
},
"fitness": {
"type": "string",
"pattern": "^[+-]\\d+(\\.\\d+)?%$"
},
"breathing": {
"type": "string",
"pattern": "^[+-]\\d+(\\.\\d+)?%$"
},
"totalFactor": {
"type": "string",
"pattern": "^[+-]\\d+(\\.\\d+)?%$",
"description": "总调整因子"
}
},
"additionalProperties": false
},
"warnings": {
"type": "object",
"required": ["heatDanger", "lowIntensity", "speedCapped"],
"properties": {
"heatDanger": {
"type": "boolean",
"description": "高温危险警告"
},
"lowIntensity": {
"type": "boolean",
"description": "强度过低警告"
},
"speedCapped": {
"type": "boolean",
"description": "速度上限警告"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}