def ServosToFlaps(servos):
  """Convert servo limits to flap limits."""
  flaps = {}
  for servo, servo_range in servos.iteritems():
    if servo.startswith('A'):
      flaps[servo] = servo_range
  flaps['Elevator'] = (0.5 * (servos['E1'][0] + servos['E2'][0]),
                       0.5 * (servos['E1'][1] + servos['E2'][1]))
  flaps['Rudder'] = (
      _RudderServoToFlap(0.5 * (servos['R1'][0] + servos['R2'][0])),
      _RudderServoToFlap(0.5 * (servos['R1'][1] + servos['R2'][1])))
  return flaps