Private
Public Access
1
0

routine to find shortest course completion

If rowing through start box more than 1 time, it checks for every
passing of the start box
This commit is contained in:
Sander Roosendaal
2018-06-01 09:16:24 +02:00
parent 45c406b621
commit 3998c7dded
3 changed files with 60 additions and 18 deletions

View File

@@ -33,7 +33,7 @@ from rowers.models import (
)
from utils import geo_distance
from rowers.courseutils import coursetime_paths, coursetime_first
from rowers.courseutils import coursetime_paths, coursetime_first,time_in_path
@@ -199,12 +199,16 @@ def get_time_course(ws,course):
rowdata = rowdata.resample('100ms',on='dt').mean()
rowdata = rowdata.interpolate()
# create path
polygons = GeoPolygon.objects.filter(course=course).order_by("order_in_course")
paths = []
for polygon in polygons:
path = polygon_to_path(polygon)
paths.append(path)
(
coursetimeseconds,
coursemeters,