def calc_speed_coefficient(thrust, total_mass):
    """ Calculate a ships maximum speed multipler for the server speed limit

    The maximum speed a ship can achieve on a server is a combination of the
    thrust:mass ratio of the ship and the server speed limit. This function
    returns a cofficient between 0.5 and 3.0 that when multiplied with the
    server's speed limit will give you the ships maximum speed.

    Args:
        thrust: A float that represents the thrust of a ship. See calc_thrust()

    Returns:
        A float between (inclusive) 0.5 and 3.0. The max speed cofficient
    """
    return min(thrust / total_mass, 2.5) + 0.5