numerical changes in get_gain for double integrator