bug fix
This commit is contained in:
@@ -206,9 +206,16 @@ def summaryfromsplitdata(splitdata,data,filename,sep='|'):
|
||||
maxhr = data['heart_rate']['max']
|
||||
except KeyError:
|
||||
maxhr = 0
|
||||
|
||||
avgpace = 500.*totaltime/totaldist
|
||||
restpace = 500.*resttime/restdistance
|
||||
|
||||
try:
|
||||
avgpace = 500.*totaltime/totaldist
|
||||
except (ZeroDivisionError,OverflowError):
|
||||
avgpace = 0.
|
||||
|
||||
try:
|
||||
restpace = 500.*resttime/restdistance
|
||||
except (ZeroDivisionError,OverflowError):
|
||||
restpace = 0.
|
||||
|
||||
velo = totaldist/totaltime
|
||||
avgpower = 2.8*velo**(3.0)
|
||||
|
||||
Reference in New Issue
Block a user