Optimize: only calculate veloc(ts) once.