def get_winch_eff(eff_pump, eff_o, eff_i, eff_batt=0.95):
    """
    Calculate the total winch efficiency for a given pumping cycle.

    Parameters
    ----------
    eff_pump : Float
        Pumping efficiency: Total Energy divided by reel-out energy.
    eff_o : Float
        Generator efficiency for reel-out.
    eff_i : Float
        Generator efficiency for reel-in.
    eff_batt : Float, optional
        Battery efficiency, impacting the used power during reel-in.
        The default is 0.95.

    Returns
    -------
    eff : Float
        Total winch efficiency as defined in
        Fechner, Uwe & Schmehl, Roland. (2013). Model-Based Efficiency Analysis of Wind Power Conversion by a Pumping Kite Power System. 10.1007/978-3-642-39965-7_14.

    """
    eff = (eff_o * eff_i * eff_batt - 1 + eff_pump)/(
        eff_i * eff_batt * eff_pump)
    return eff