-
Notifications
You must be signed in to change notification settings - Fork 0
/
score.py
30 lines (26 loc) · 951 Bytes
/
score.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class Score():
max = 675
def calculateAccel(self, tmin, time):
if (time > tmin * 1.5):
return 4.5
else:
return 191 * ((1.5 * tmin / time) - 1) + 4.5
def calculateSkidpad(self, tmin, time):
if (time > tmin * 1.5):
return 3.5
else:
return 71.5/(1.5**2 - 1) * ((1.5 * tmin / time)**2 - 1) + 3.5
def calculateAutocross(self, tmin, time):
if (time > tmin * 1.5):
return 6.5
else:
return 237 * ((1.5 * tmin / time) - 1) + 6.5
def calculateEndurance(self, tmin, time):
if (time > tmin * 1.5):
return 25
else:
return 500 * ((1.5 * tmin / time) - 1) + 25
def calculateEfficiency(self, co2min, efMax, co2, tmin, time):
efMin = (co2min / 1.45 * 60.06)
ef = (tmin * co2min / time * co2)
return 100 * ((efMin / ef) - 1) * ((efMin / efMax) - 1)