Struct lotus_script::vehicle::Axle
source · pub struct Axle { /* private fields */ }
Implementations§
source§impl Axle
impl Axle
pub fn get(bogie_index: usize, axle_index: usize) -> Result<Axle, VehicleError>
pub fn velocity_var_name(self) -> String
pub fn bogie(self) -> Bogie
sourcepub fn inverse_radius(self) -> f32
pub fn inverse_radius(self) -> f32
Gets the curvature of the track under the given axis. The curvature is the reciprocal of the radius (1/R), which has the advantage that the value does not tend to infinity in a straight line, but tends to 0. The values are very small due to this calculation: Even a radius of only 100m leads to a value of 0.01, larger radii lead to even smaller values. Positive = right, negative = left.
sourcepub fn surface_type(self) -> SurfaceType
pub fn surface_type(self) -> SurfaceType
Provides the type of the surface under the given axis.
sourcepub fn rail_quality(self) -> RailQuality
pub fn rail_quality(self) -> RailQuality
Provides the quality of the rails under the given axis.
sourcepub fn set_traction_force_newton(self, value: f32)
pub fn set_traction_force_newton(self, value: f32)
Sets the traction force in newton. This is the torque applied to the axle, already converted to the force acting on the running surface. This means that as long as the wheel does not slip or spin, this value is equal to the force exerted by the wheel on the rail. This force acts independently of the direction of travel. If it acts in the opposite direction to the travel, the vehicle will be braked, but it cannot hold the vehicle stationary.
sourcepub fn set_brake_force_newton(self, value: f32)
pub fn set_brake_force_newton(self, value: f32)
Sets the brake force in newton. This is the torque applied to the axle, already converted to the force acting on the running surface. This means that as long as the wheel does not slip or spin, this value is equal to the force exerted by the wheel on the rail. The difference to “traction_force_newton” is that brake_force_newton is always positive and always acts in the opposite direction to the travel. This means that brake_force_newton can also hold the vehicle stationary like a disc brake.