changeset 1144:6a8fe3ed3bc6

bug correction
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 28 Apr 2020 01:01:14 -0400
parents 8ac52ebff5f7
children 66f063ca2d24
files trafficintelligence/events.py trafficintelligence/metadata.py
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/trafficintelligence/events.py	Tue Apr 21 00:55:02 2020 -0400
+++ b/trafficintelligence/events.py	Tue Apr 28 01:01:14 2020 -0400
@@ -49,7 +49,7 @@
     contains the indicators in a dictionary with the names as keys
     '''
 
-    categories = {'Head On': 0,
+    categories = {'headon': 0,
                   'rearend': 1,
                   'side': 2,
                   'parallel': 3}
@@ -216,6 +216,9 @@
                 minDistances[instant] = moving.MovingObject.minDistance(self.roadUser1, self.roadUser2, instant)
             self.addIndicator(indicators.SeverityIndicator(Interaction.indicatorNames[3], minDistances, mostSevereIsMax = False))
 
+    def categorize(self):
+        '''Computes the interaction category by instant '''
+
     def computeCrossingsCollisions(self, predictionParameters, collisionDistanceThreshold, timeHorizon, computeCZ = False, debug = False, timeInterval = None):
         '''Computes all crossing and collision points at each common instant for two road users. '''
         TTCs = {}
--- a/trafficintelligence/metadata.py	Tue Apr 21 00:55:02 2020 -0400
+++ b/trafficintelligence/metadata.py	Tue Apr 28 01:01:14 2020 -0400
@@ -224,7 +224,7 @@
 
     def getTrajectory(self):
         t = Trajectory()
-        for p in self.point:
+        for p in self.points:
             t.addPositionXY(p.x_coordinate, p.y_coordinate)
         return t