Add max distance.
Rename xaccel/yaccel->vx/vy.