Mercurial > hg > nsaunier > traffic-intelligence
comparison python/moving.py @ 268:0c0b92f621f6
reorganized to compute evasive action for multiple positions
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Sat, 28 Jul 2012 02:58:47 -0400 |
| parents | 8ab76b95ee72 |
| children | 05c9b0cb8202 |
comparison
equal
deleted
inserted
replaced
| 267:32e88b513f5c | 268:0c0b92f621f6 |
|---|---|
| 542 return self.positions | 542 return self.positions |
| 543 | 543 |
| 544 def getVelocities(self): | 544 def getVelocities(self): |
| 545 return self.velocities | 545 return self.velocities |
| 546 | 546 |
| 547 def setFeatures(self, features): | |
| 548 self.features = [features[i] for i in self.featureNumbers] | |
| 549 | |
| 547 def getSpeeds(self): | 550 def getSpeeds(self): |
| 548 return self.getVelocities().norm() | 551 return self.getVelocities().norm() |
| 549 | 552 |
| 550 def getPositionAt(self, i): | 553 def getPositionAt(self, i): |
| 551 return self.positions[i] | 554 return self.positions[i] |
