Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2018-02-25 09:18:13 +01:00
parent 57eee137ce
commit 38aedc02ca
2 changed files with 4 additions and 2 deletions

View File

@@ -72,6 +72,7 @@ def time_in_path(df,p,maxmin='max'):
else: else:
b = (~df['inpolygon']).shift(1)+df['inpolygon'] b = (~df['inpolygon']).shift(1)+df['inpolygon']
if len(df[b==2]): if len(df[b==2]):
return df[b==2]['time'].min(),df[b==2]['cum_dist'].min() return df[b==2]['time'].min(),df[b==2]['cum_dist'].min()
@@ -247,9 +248,10 @@ def get_time_course(ws,course):
rowdata = dataprep.getsmallrowdata_db( rowdata = dataprep.getsmallrowdata_db(
columns, columns,
ids = [w.id], ids = [w.id],
doclean=True, doclean=False,
workstrokesonly=False workstrokesonly=False
) )
rowdata.rename(columns = { rowdata.rename(columns = {
' latitude':'latitude', ' latitude':'latitude',
' longitude':'longitude', ' longitude':'longitude',

View File

@@ -12688,7 +12688,7 @@ def plannedsession_view(request,id=0,rowerid=0,
coursetimeseconds, coursetimeseconds,
coursemeters, coursemeters,
coursecompleted coursecompleted
) = courses.get_time_course(ws,ps.course) ) = courses.get_time_course([w],ps.course)
intsecs = int(coursetimeseconds) intsecs = int(coursetimeseconds)
microsecs = int(1.e6*(coursetimeseconds-intsecs)) microsecs = int(1.e6*(coursetimeseconds-intsecs))