Change gain as function of speed and position