TRIMP working
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from utils import lbstoN
|
||||
import numpy as np
|
||||
|
||||
rowingmetrics = (
|
||||
('time',{
|
||||
@@ -301,3 +302,17 @@ dropping to 8m for race pace in the single.""",
|
||||
This value should be fairly constant across all stroke rates.""",
|
||||
},
|
||||
)
|
||||
|
||||
def calc_trimp(df,sex,hrmax,hrmin):
|
||||
if sex == 'male':
|
||||
f = 1.92
|
||||
else:
|
||||
f = 1.67
|
||||
|
||||
dt = df['time'].diff()/6.e4
|
||||
|
||||
hrr = (df['hr']-hrmin)/(hrmax-hrmin)
|
||||
trimpdata = dt*hrr*0.64*np.exp(f*hrr)
|
||||
trimp = trimpdata.sum()
|
||||
|
||||
return trimp
|
||||
|
||||
Reference in New Issue
Block a user