diff python/moving.py @ 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 2d1d33ae1c69
children 6ae68383071e
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]