@sh.add_function(
dsp, inputs=['motor_p4_front_powers', 'motor_p4_front_torques'],
outputs=['motor_p4_front_speeds']
)
@sh.add_function(
dsp, inputs=['motor_p4_rear_powers', 'motor_p4_rear_torques'],
outputs=['motor_p4_rear_speeds']
)
def calculate_motor_p4_speeds_v1(motor_p4_powers, motor_p4_torques):
"""
Calculates rotating speed of motor P4 [RPM].
:param motor_p4_powers:
Power at motor P4 [kW].
:type motor_p4_powers: numpy.array | float
:param motor_p4_torques:
Torque at motor P4 [N*m].
:type motor_p4_torques: numpy.array | float
:return:
Rotating speed of motor P4 [RPM].
:rtype: numpy.array | float
"""
from ...wheels import calculate_wheel_torques
return calculate_wheel_torques(motor_p4_powers, motor_p4_torques)