Skip to content
Snippets Groups Projects
Commit cf9052d9 authored by arno gay-bauer's avatar arno gay-bauer
Browse files

:bug: Fixed the smoother activation on the wrong frames

parent 08ed5343
Branches
No related tags found
No related merge requests found
Pipeline #
...@@ -302,7 +302,9 @@ def handleAllPoint(trajData,geoData): ...@@ -302,7 +302,9 @@ def handleAllPoint(trajData,geoData):
smooth_order = 3 smooth_order = 3
for index,inputs in enumerate(new_trajectories): for index,inputs in enumerate(new_trajectories):
if (smooth_order < int(inputs[1]) and index < len(new_trajectories)-smooth_order and new_trajectories[index + smooth_order][0] == new_trajectories[index][0]): if (smooth_order < index and index < len(new_trajectories)-smooth_order
and new_trajectories[index + smooth_order][0] == new_trajectories[index][0]
and new_trajectories[index - smooth_order][0] == new_trajectories[index][0]):
new_x,new_y = smoothPoint(new_trajectories[index - smooth_order : index + smooth_order]) new_x,new_y = smoothPoint(new_trajectories[index - smooth_order : index + smooth_order])
new_trajectories[index] = [inputs[0],inputs[1],floatToString(new_x),floatToString(new_y),inputs[4]] new_trajectories[index] = [inputs[0],inputs[1],floatToString(new_x),floatToString(new_y),inputs[4]]
if (math.fmod(index,10000) == 0): if (math.fmod(index,10000) == 0):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment