def _calculate_number_batteries(_power_usage_, _deployment_duration, _battery_capacity_, _battery_derate_, _battery_self_discharge_):
    """
    Calculate the number of batteries based off the power usage and deployment duration.  This will also take into
    account the derate of the battery.
    :param _power_usage_: Power usage for the deployment in watt/hr
    :param _deployment_duration: Length of the deployment in days.
    :param _battery_capacity_: Total battery capactiy for a single battery in watt/hr
    :param _battery_derate_: Derate of the battery in watt/hr
    :param _battery_self_discharge_: Self discharge of the battery over a year in watt/hr
    :return:
    """

    # Current battery power available from a single battery
    battery_pwr = _battery_capacity_ * _battery_derate_ - _battery_self_discharge_ * _deployment_duration / 365.0

    return _power_usage_ / battery_pwr