# HG changeset patch # User Nicolas Saunier # Date 1424183549 -3600 # Node ID f410c8fb07b7c419eeb605bcf0e395b03c726f33 # Parent 2f1a583bfd2065071555452a8b2bf82173400934 minor function to export speed as temporal indicator for display diff -r 2f1a583bfd20 -r f410c8fb07b7 python/moving.py --- 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]