Distance and Gear constraints done.