comparison trafficintelligence/events.py @ 1147:8c0ec7e1eb8e

minor
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 06 May 2020 00:58:21 -0400
parents b219d5a1bb55
children eb88d2984637
comparison
equal deleted inserted replaced
1146:b219d5a1bb55 1147:8c0ec7e1eb8e
217 minDistances={} 217 minDistances={}
218 for instant in self.timeInterval: 218 for instant in self.timeInterval:
219 minDistances[instant] = moving.MovingObject.minDistance(self.roadUser1, self.roadUser2, instant) 219 minDistances[instant] = moving.MovingObject.minDistance(self.roadUser1, self.roadUser2, instant)
220 self.addIndicator(indicators.SeverityIndicator(Interaction.indicatorNames[3], minDistances, mostSevereIsMax = False)) 220 self.addIndicator(indicators.SeverityIndicator(Interaction.indicatorNames[3], minDistances, mostSevereIsMax = False))
221 221
222 # categories = {'headon': 0,
223 # 'rearend': 1,
224 # 'side': 2,
225 # 'parallel': 3}
226
227 def categorize(self, velocityAngleTolerance, parallelAngleTolerance): 222 def categorize(self, velocityAngleTolerance, parallelAngleTolerance):
228 '''Computes the interaction category by instant 223 '''Computes the interaction category by instant
229 velocityAngleTolerance and parallelAngleTolerance in radian''' 224 velocityAngleTolerance and parallelAngleTolerance in radian'''
230 parallelAngleToleranceCosine = np.cos(parallelAngleTolerance) 225 parallelAngleToleranceCosine = np.cos(parallelAngleTolerance)
231 self.categories = {} 226 self.categories = {}