@sh.add_function(dsp, outputs=['drive_battery_state_of_charges'])
def calculate_drive_battery_state_of_charges(
drive_battery_capacity, initial_drive_battery_state_of_charge,
times, drive_battery_currents):
"""
Calculates the state of charge of the drive battery [%].
:param drive_battery_capacity:
Drive battery capacity [Ah].
:type drive_battery_capacity: float
:param initial_drive_battery_state_of_charge:
Initial state of charge of the drive battery [%].
:type initial_drive_battery_state_of_charge: float
:param times:
Time vector [s].
:type times: numpy.array
:param drive_battery_currents:
Drive battery current vector [A].
:type drive_battery_currents: numpy.array
:return:
State of charge of the drive battery [%].
:rtype: numpy.array
"""
from .service import calculate_service_battery_state_of_charges as func
return func(
drive_battery_capacity, initial_drive_battery_state_of_charge, times,
drive_battery_currents
)