diff scripts/dltrack.py @ 1306:4bc0651d91f9 default tip

bug corrected generating last velocity twice and saving it (not saved, duplicated at loading time
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Mon, 30 Mar 2026 15:31:34 -0400
parents f4d4bb9ec34f
children
line wrap: on
line diff
--- a/scripts/dltrack.py	Mon Jan 26 16:33:26 2026 -0500
+++ b/scripts/dltrack.py	Mon Mar 30 15:31:34 2026 -0400
@@ -258,7 +258,7 @@
     feature = moving.MovingObject(featureNum, obj.getTimeInterval(), moving.Trajectory(projected.tolist()))
     if smoothingHalfWidth is not None: # smoothing
         feature.smoothPositions(smoothingHalfWidth, replace = True)#f.positions = f.getPositions().filterMovingWindow(smoothingHalfWidth)
-    feature.computeVelocities()
+    feature.computeVelocities(duplicateLastVelocity = False)
     obj.features=[feature]
     obj.featureNumbers = [featureNum]
 #saving