Mercurial > hg > nsaunier > traffic-intelligence
comparison python/events.py @ 599:4b5fe2de1e8d
modify the name of collisionCourseCosines to collisionCourseAngles
| author | Mohamed Gomaa |
|---|---|
| date | Thu, 18 Apr 2013 15:46:21 -0400 |
| parents | d280b881e860 |
| children | 414b2e7cd873 |
comparison
equal
deleted
inserted
replaced
| 317:d280b881e860 | 599:4b5fe2de1e8d |
|---|---|
| 42 self.indicators[indicator.name] = indicator | 42 self.indicators[indicator.name] = indicator |
| 43 | 43 |
| 44 def computeIndicators(self): | 44 def computeIndicators(self): |
| 45 '''Computes the collision course cosine only if the cosine is positive''' | 45 '''Computes the collision course cosine only if the cosine is positive''' |
| 46 collisionCourseDotProducts = {}#[0]*int(self.timeInterval.length()) | 46 collisionCourseDotProducts = {}#[0]*int(self.timeInterval.length()) |
| 47 collisionCourseCosines = {} | 47 collisionCourseAngles = {} |
| 48 distances = {}#[0]*int(self.timeInterval.length()) | 48 distances = {}#[0]*int(self.timeInterval.length()) |
| 49 speedDifferentials = {} | 49 speedDifferentials = {} |
| 50 for instant in self.timeInterval: | 50 for instant in self.timeInterval: |
| 51 deltap = self.movingObject1.getPositionAtInstant(instant)-self.movingObject2.getPositionAtInstant(instant) | 51 deltap = self.movingObject1.getPositionAtInstant(instant)-self.movingObject2.getPositionAtInstant(instant) |
| 52 deltav = self.movingObject2.getVelocityAtInstant(instant)-self.movingObject1.getVelocityAtInstant(instant) | 52 deltav = self.movingObject2.getVelocityAtInstant(instant)-self.movingObject1.getVelocityAtInstant(instant) |
