new velocity detection code implemented, ready for anticipation logic to be added