diff python/events.py @ 358:c41ff9f3c263

moved current method for collision points and crossing zones computation into prediction parameters (put expectedindicator in SafetyPoint)
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Thu, 11 Jul 2013 00:17:25 -0400
parents e5fe0e6d48a1
children 3805b9639647
line wrap: on
line diff
--- a/python/events.py	Thu Jul 11 00:07:47 2013 -0400
+++ b/python/events.py	Thu Jul 11 00:17:25 2013 -0400
@@ -117,9 +117,9 @@
         else:
             commonTimeInterval = self.timeInterval
         for i in list(commonTimeInterval)[:-1]: # do not look at the 1 last position/velocities, often with errors
-            self.collisionPoints[i], self.crossingZones[i] = prediction.computeCrossingsCollisionsAtInstant(i, self.roadUser1, self.roadUser2, predictionParameters, collisionDistanceThreshold, timeHorizon, computeCZ, debug)
+            self.collisionPoints[i], self.crossingZones[i] = predictionParameters.computeCrossingsCollisionsAtInstant(i, self.roadUser1, self.roadUser2, collisionDistanceThreshold, timeHorizon, computeCZ, debug)
             if len(self.collisionPoints[i]) > 0:
-                TTCs[i] = prediction.computeExpectedIndicator(self.collisionPoints[i])
+                TTCs[i] = prediction.SafetyPoint.computeExpectedIndicator(self.collisionPoints[i])
         # add probability of collision, and probability of successful evasive action
         self.addIndicator(indicators.SeverityIndicator('TTC', TTCs))
         
@@ -127,7 +127,7 @@
             pPETs = {}
             for i in list(commonTimeInterval)[:-1]:
                 if len(self.crossingZones[i]) > 0:
-                    pPETs[i] = prediction.computeExpectedIndicator(self.crossingZones[i])
+                    pPETs[i] = prediction.SafetyPoint.computeExpectedIndicator(self.crossingZones[i])
             self.addIndicator(indicators.SeverityIndicator('pPET', pPETs))
 
     def addVideoFilename(self,videoFilename):