@sh.add_function(dsp, outputs=['maximum_velocity'], weight=10)
def calculate_maximum_velocity_v1(
r_dynamic, final_drive_ratios, engine_speed_at_max_velocity,
last_gear_box_ratio):
"""
Calculates the maximum velocity [km/h].
:param r_dynamic:
Dynamic radius of the wheels [m].
:type r_dynamic: float
:param final_drive_ratios:
Final drive ratios [-].
:type final_drive_ratios: dict[int, float | int]
:param engine_speed_at_max_velocity:
Engine speed at maximum velocity [RPM].
:type engine_speed_at_max_velocity: float
:param last_gear_box_ratio:
Gear box ratio of the last gear [-].
:type last_gear_box_ratio: float
:return:
Maximum velocity [km/h].
:return: float
"""
vel = calculate_last_gear_box_ratio(
r_dynamic, final_drive_ratios, engine_speed_at_max_velocity, 1
) / last_gear_box_ratio
return vel