diff trafficintelligence/moving.py @ 1180:dc28364f34b9

minor cleanup
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Sun, 27 Mar 2022 00:54:12 -0400
parents 2039df59c47b
children b3b1a5dfa17c
line wrap: on
line diff
--- a/trafficintelligence/moving.py	Sun Mar 27 00:20:24 2022 -0400
+++ b/trafficintelligence/moving.py	Sun Mar 27 00:54:12 2022 -0400
@@ -1326,8 +1326,8 @@
         else:
             newNum = num
         commonTimeInterval = obj1.commonTimeInterval(obj2)
-        emptyInterval = TimeInterval(min(obj1.getLastInstant(),obj2.getLastInstant()), max(obj1.getFirstInstant(),obj2.getFirstInstant()))
-        if commonTimeInterval.empty() and emptyInterval.length() >= 2: # 2 to include situations successive positions, but issues with missing last velocity and reloading
+        if commonTimeInterval.empty(): # and emptyInterval.length() >= 2: not needed 2 to include situations successive positions, but issues with missing last velocity and reloading
+            emptyInterval = TimeInterval(min(obj1.getLastInstant(),obj2.getLastInstant()), max(obj1.getFirstInstant(),obj2.getFirstInstant()))
             if newFeatureNum is None:
                 print('Not merging objects {} and {}, missing new feature number'.format(obj1.getNum(),obj2.getNum()))
                 return None, None