Manual Entry working
This commit is contained in:
@@ -1655,24 +1655,25 @@ def getfatigues(
|
||||
ws = Workout.objects.filter(user=user.rower,date=date,duplicate=False)
|
||||
weight = 0
|
||||
for w in ws:
|
||||
weight += factor*getattr(w,metricchoice)
|
||||
if getattr(w,metricchoice) > 0:
|
||||
weight += factor*getattr(w,metricchoice)
|
||||
if getattr(w,metricchoice) <= 0:
|
||||
if metricchoice == 'rscore' and w.hrtss > 0:
|
||||
weight+= factor*w.hrtss
|
||||
else:
|
||||
elif metricchoice == 'rscore' and w.hrtss <= 0:
|
||||
trimp,hrtss = dataprep.workout_trimp(w)
|
||||
rscore,normp = dataprep.workout_rscore(w)
|
||||
if w.rpe and w.rpe > 0:
|
||||
dd = 3600*w.duration.hour+60*w.duration.minute+w.duration.second
|
||||
dd = dd/3600
|
||||
weight += factor*rpetotss[w.rpe]*dd
|
||||
if metricchoice == 'trimp' and w.trimp <= 0:
|
||||
elif metricchoice == 'trimp' and w.trimp <= 0:
|
||||
trimp,hrtss = dataprep.workout_trimp(w)
|
||||
rscore,normp = dataprep.workout_rscore(w)
|
||||
if w.rpe and w.rpe > 0:
|
||||
dd = 3600*w.duration.hour+60*w.duration.minute+w.duration.second
|
||||
dd = dd/3600
|
||||
weight += factor*rpetotss[w.rpe]*dd
|
||||
weight += 2*rpetotss[w.rpe]*dd
|
||||
|
||||
impulses.append(weight)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user