@sh.add_function(dsp, outputs=['gear_box_ratios'])
def calculate_gear_box_ratios(
velocity_speed_ratios, final_drive_ratios, r_dynamic):
"""
Calculates gear box ratios [-].
:param velocity_speed_ratios:
Constant velocity speed ratios of the gear box [km/(h*RPM)].
:type velocity_speed_ratios: dict[int | float]
:param final_drive_ratios:
Final drive ratios [-].
:type final_drive_ratios: dict[int, float | int]
:param r_dynamic:
Dynamic radius of the wheels [m].
:type r_dynamic: float
:return:
Gear box ratios [-].
:rtype: dict
"""
c = 30 / (3.6 * math.pi * r_dynamic)
r = calculate_velocity_speed_ratios(velocity_speed_ratios)
return {k: v / (c * final_drive_ratios[k]) for k, v in r.items() if k != 0}