@sh.add_function(dsp, outputs=['final_drive_powers_out'])
def calculate_final_drive_powers_out(
wheel_powers, motor_p4_front_powers, motor_p4_rear_powers):
"""
Calculate final drive power out [kW].
:param wheel_powers:
Power at the wheels [kW].
:type wheel_powers: numpy.array | float
:param motor_p4_front_powers:
Power at motor P4 front [kW].
:type motor_p4_front_powers: numpy.array | float
:param motor_p4_rear_powers:
Power at motor P4 rear [kW].
:type motor_p4_rear_powers: numpy.array | float
:return:
Final drive power out [kW].
:rtype: numpy.array | float
"""
return wheel_powers - motor_p4_front_powers - motor_p4_rear_powers