get_velocity function

Get instantaneous velocity for subjects