changeset 1157:173b7926734e

clarifying categorize method
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 21 Oct 2020 10:38:30 -0400
parents f7fbe624fff7
children 7eb972942f22
files trafficintelligence/events.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/trafficintelligence/events.py	Fri Sep 25 11:56:59 2020 -0400
+++ b/trafficintelligence/events.py	Wed Oct 21 10:38:30 2020 -0400
@@ -224,9 +224,12 @@
 
     def categorize(self, velocityAngleTolerance, parallelAngleTolerance, headonCollisionCourseAngleTolerance = None):
         '''Computes the interaction category by instant
-        velocityAngleTolerance and parallelAngleTolerance in radian
-        velocityAngleTolerance: indicates the angle threshold for rear and head on (180-velocityAngleTolerance), as well as the maximum collision course angle for head on
-        velocityAngleTolerance: indicates the angle between velocity vector (average for parallel) and position vector'''
+        all 3 angle arguments in radian
+        velocityAngleTolerance: indicates the angle threshold for rear and head on (180-velocityAngleTolerance), as well as the maximum collision course angle for head on (if headonCollisionCourseAngleTolerance is None)
+        parallelAngleTolerance: indicates the angle between velocity vector (average for parallel) and position vector
+
+        an instant may not be categorized if it matches the side definition (angle)
+        but the distance is growing (at least one user is probably past the point of trajectory crossing)'''
         parallelAngleToleranceCosine = np.cos(parallelAngleTolerance)
         if headonCollisionCourseAngleTolerance is None:
             headonCollisionCourseAngleTolerance = velocityAngleTolerance