@sh.add_function(
dsp, inputs=['motor_p4_front_rated_speed', 'motor_p4_front_maximum_torque'],
outputs=['motor_p4_front_maximum_power']
)
@sh.add_function(
dsp, inputs=['motor_p4_rear_rated_speed', 'motor_p4_rear_maximum_torque'],
outputs=['motor_p4_rear_maximum_power']
)
def calculate_motor_p4_maximum_power(
motor_p4_rated_speed, motor_p4_maximum_torque):
"""
Calculate the maximum power of motor P4 [kW].
:param motor_p4_rated_speed:
Rated speed of motor P4 [RPM].
:type motor_p4_rated_speed: float
:param motor_p4_maximum_torque:
Maximum torque of motor P4 [N*m].
:type motor_p4_maximum_torque: float
:return:
Maximum power of motor P4 [kW].
:rtype: float
"""
from ...wheels import calculate_wheel_powers as func
return func(motor_p4_maximum_torque, motor_p4_rated_speed)