Fixed Ranking distances
This commit is contained in:
@@ -66,6 +66,7 @@ import mailprocessing
|
||||
from io import BytesIO
|
||||
from scipy.special import lambertw
|
||||
|
||||
from dataprep import timedeltaconv
|
||||
|
||||
LOCALTIMEZONE = tz('Etc/UTC')
|
||||
USER_LANGUAGE = 'en-US'
|
||||
@@ -1617,8 +1618,8 @@ def rankings_view(request,theuser=0,
|
||||
t = rankingdistance/velo
|
||||
pwr = 2.8*(velo**3)
|
||||
a = {'distance':rankingdistance,
|
||||
'duration':get_datetimes([t])[0],
|
||||
'pace':get_datetimes([p])[0],
|
||||
'duration':timedeltaconv(t),
|
||||
'pace':timedeltaconv(p),
|
||||
'power':int(pwr)}
|
||||
predictions.append(a)
|
||||
|
||||
@@ -1650,8 +1651,8 @@ def rankings_view(request,theuser=0,
|
||||
p3 = 500./velo3
|
||||
|
||||
a = {'distance':rankingdistance,
|
||||
'duration':get_datetimes([t3])[0],
|
||||
'pace':get_datetimes([p3])[0],
|
||||
'duration':timedeltaconv(t3),
|
||||
'pace':timedeltaconv(p3),
|
||||
'power':int(pwr3)}
|
||||
cpredictions.append(a)
|
||||
|
||||
@@ -1677,8 +1678,8 @@ def rankings_view(request,theuser=0,
|
||||
p = 500./velo
|
||||
pwr = 2.8*(velo**3)
|
||||
a = {'distance':int(d),
|
||||
'duration':get_datetimes([t])[0],
|
||||
'pace':get_datetimes([p])[0],
|
||||
'duration':timedeltaconv(t),
|
||||
'pace':timedeltaconv(p),
|
||||
'power':int(pwr)}
|
||||
predictions.append(a)
|
||||
|
||||
@@ -1697,8 +1698,8 @@ def rankings_view(request,theuser=0,
|
||||
d = t*velo
|
||||
p = 500./velo
|
||||
a = {'distance':int(d),
|
||||
'duration':get_datetimes([t])[0],
|
||||
'pace':get_datetimes([p])[0],
|
||||
'duration':timedeltaconv(t),
|
||||
'pace':timedeltaconv(p),
|
||||
'power':int(pwr)}
|
||||
cpredictions.append(a)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user