Changed velocity calculation to average over 4 pulses