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