Mercurial > hg > nsaunier > traffic-intelligence
comparison python/extrapolation.py @ 270:05c9b0cb8202
updates for drawing
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Thu, 02 Aug 2012 05:35:57 -0400 |
| parents | a9988971aac8 |
| children |
comparison
equal
deleted
inserted
replaced
| 269:a9988971aac8 | 270:05c9b0cb8202 |
|---|---|
| 28 return moving.Trajectory.fromPointList(self.predictedPositions.values()) | 28 return moving.Trajectory.fromPointList(self.predictedPositions.values()) |
| 29 | 29 |
| 30 def getPredictedSpeeds(self): | 30 def getPredictedSpeeds(self): |
| 31 return [so.norm for so in self.predictedSpeedOrientations.values()] | 31 return [so.norm for so in self.predictedSpeedOrientations.values()] |
| 32 | 32 |
| 33 def draw(self, options = '', withOrigin = False, **kwargs): | 33 def draw(self, options = '', withOrigin = False, timeStep = 1, **kwargs): |
| 34 self.getPredictedTrajectory().draw(options, withOrigin, **kwargs) | 34 self.getPredictedTrajectory().draw(options, withOrigin, timeStep, **kwargs) |
| 35 | 35 |
| 36 class ExtrapolatedTrajectoryConstant(ExtrapolatedTrajectory): | 36 class ExtrapolatedTrajectoryConstant(ExtrapolatedTrajectory): |
| 37 '''Extrapolated trajectory at constant speed or acceleration | 37 '''Extrapolated trajectory at constant speed or acceleration |
| 38 TODO generalize by passing a series of velocities/accelerations''' | 38 TODO generalize by passing a series of velocities/accelerations''' |
| 39 | 39 |
