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