@sh.add_function(dsp, outputs=['first_gear_box_ratio'], weight=100)
def calculate_first_gear_box_ratio(
f0, r_dynamic, engine_max_torque, maximum_vehicle_laden_mass,
final_drive_ratios):
"""
Calculates the gear box ratio of the first gear.
:param f0:
Rolling resistance force [N] when angle_slope == 0.
:type f0: float
:param r_dynamic:
Dynamic radius of the wheels [m].
:type r_dynamic: float
:param engine_max_torque:
Engine Max Torque [N*m].
:type engine_max_torque: float
:param maximum_vehicle_laden_mass:
Technically permissible maximum laden mass [kg].
:type maximum_vehicle_laden_mass: float
:param final_drive_ratios:
Final drive ratios [-].
:type final_drive_ratios: dict[int, float | int]
:return:
Gear box ratio of the first gear [-].
:return: float
"""
d = dfl.functions.calculate_first_gear_box_ratio
max_torque = engine_max_torque * d.MAX_TORQUE_PERCENTAGE
slope = np.arctan(d.STARTING_SLOPE)
ratio = f0 * np.cos(slope)
ratio += maximum_vehicle_laden_mass * 9.81 * np.sin(slope)
ratio /= (max_torque * final_drive_ratios[1]) / r_dynamic
return ratio