Mercurial Hosting > traffic-intelligence
changeset 633:f410c8fb07b7
minor function to export speed as temporal indicator for display
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Tue, 17 Feb 2015 15:32:29 +0100 |
parents | 2f1a583bfd20 |
children | b61b309cb9da |
files | python/moving.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/python/moving.py Tue Feb 17 11:02:18 2015 +0100 +++ b/python/moving.py Tue Feb 17 15:32:29 2015 +0100 @@ -1082,6 +1082,10 @@ def getSpeeds(self): return self.getVelocities().norm() + def getSpeedIndicator(self): + from indicators import SeverityIndicator + return SeverityIndicator('Speed', {t:self.getVelocityAtInstant(t).norm2() for t in self.getTimeInterval()}) + def getPositionAt(self, i): return self.positions[i]