adding gold medal durations
This commit is contained in:
@@ -1561,7 +1561,7 @@ def performancemanager_view(request,userid=0,mode='rower',
|
||||
fitnesstest = 20
|
||||
metricchoice = 'trimp'
|
||||
modelchoice = 'tsb'
|
||||
usefitscore = False
|
||||
usegoldmedalstandard = False
|
||||
doform = therower.showfresh
|
||||
dofatigue = therower.showfit
|
||||
|
||||
@@ -1647,7 +1647,7 @@ def fitness_from_cp_view(request,userid=0,mode='rower',
|
||||
fitnesstest = 20
|
||||
metricchoice = 'trimp'
|
||||
modelchoice = 'tsb'
|
||||
usefitscore = False
|
||||
usegoldmedalstandard = False
|
||||
|
||||
# temp fit parameters
|
||||
k1 = 1
|
||||
@@ -1669,7 +1669,7 @@ def fitness_from_cp_view(request,userid=0,mode='rower',
|
||||
k2 = form.cleaned_data['k2']
|
||||
p0 = form.cleaned_data['p0']
|
||||
modelchoice = form.cleaned_data['modelchoice']
|
||||
usefitscore = form.cleaned_data['usefitscore']
|
||||
usegoldmedalstandard = form.cleaned_data['usegoldmedalstandard']
|
||||
else:
|
||||
form = FitnessFitForm()
|
||||
|
||||
@@ -1694,7 +1694,7 @@ def fitness_from_cp_view(request,userid=0,mode='rower',
|
||||
metricchoice=metricchoice,
|
||||
k1=k1,k2=k2,p0=p0,
|
||||
modelchoice=modelchoice,
|
||||
usefitscore=usefitscore,
|
||||
usegoldmedalstandard=usegoldmedalstandard,
|
||||
)
|
||||
|
||||
breadcrumbs = [
|
||||
|
||||
@@ -12,6 +12,7 @@ import rowers.mytypes as mytypes
|
||||
import numpy
|
||||
from rowers.mailprocessing import send_confirm
|
||||
import rowers.uploads as uploads
|
||||
import rowers.utils as utils
|
||||
|
||||
from urllib.parse import urlparse, parse_qs
|
||||
from json.decoder import JSONDecodeError
|
||||
@@ -3497,8 +3498,8 @@ def workout_stats_view(request,id=0,message="",successmessage=""):
|
||||
|
||||
# Normalized power & TSS
|
||||
tss,normp = dataprep.workout_rscore(w)
|
||||
goldmedalstandard = dataprep.workout_goldmedalstandard(w)
|
||||
|
||||
goldmedalstandard,goldmedalseconds = dataprep.workout_goldmedalstandard(w)
|
||||
|
||||
|
||||
if not np.isnan(goldmedalstandard) and goldmedalstandard > 0:
|
||||
otherstats['goldmedalstandard'] = {
|
||||
@@ -3507,6 +3508,13 @@ def workout_stats_view(request,id=0,message="",successmessage=""):
|
||||
'unit': '%',
|
||||
}
|
||||
|
||||
if not np.isnan(goldmedalseconds) and goldmedalseconds > 0:
|
||||
otherstats['goldmedalseconds'] = {
|
||||
'verbose_name': 'Gold Medal Standard Duration',
|
||||
'value': utils.totaltime_sec_to_string(goldmedalseconds,shorten=True),
|
||||
'unit': '',
|
||||
}
|
||||
|
||||
|
||||
if not np.isnan(tss) and tss != 0:
|
||||
otherstats['tss'] = {
|
||||
|
||||
Reference in New Issue
Block a user