You could calculate the velocity from one frame to the next using the following:
Code:
lastPos = [0,0,0]
def calculateVelocity():
global lastPos
pos = device.getPosition()
distance = vizmat.Distance(lastPos,pos)
velocity = distance/viz.getFrameElapsed()
lastPos = pos
vizact.onupdate(0,calculateVelocity)