# HG changeset patch # User Nicolas Saunier # Date 1603291110 14400 # Node ID 173b7926734e64dd73bd662f3ffa53fd14c0efe2 # Parent f7fbe624fff72b488b4356f00792b96edbe5be72 clarifying categorize method diff -r f7fbe624fff7 -r 173b7926734e trafficintelligence/events.py --- 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