bug fix
This commit is contained in:
@@ -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',
|
||||||
|
|||||||
@@ -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))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user