pub struct Telemetry { /* private fields */ }
Expand description
Telemetry data coming from a car
The telemetry data provided from the F1 games contains detailed, and quickly changing data on the inner mechanics of each car, e.g. its speed, engine RPMs, and temperatures.
Implementations§
Source§impl Telemetry
impl Telemetry
Sourcepub fn new(
speed: u16,
throttle: f32,
steering: f32,
brake: f32,
clutch: u8,
gear: Gear,
engine_rpm: u16,
drs: bool,
rev_lights: u8,
brake_temperature: CornerProperty<u16>,
tyre_surface_temperature: CornerProperty<u16>,
tyre_inner_temperature: CornerProperty<u16>,
engine_temperature: u16,
tyre_pressure: CornerProperty<f32>,
surface_type: CornerProperty<Surface>,
) -> Self
pub fn new( speed: u16, throttle: f32, steering: f32, brake: f32, clutch: u8, gear: Gear, engine_rpm: u16, drs: bool, rev_lights: u8, brake_temperature: CornerProperty<u16>, tyre_surface_temperature: CornerProperty<u16>, tyre_inner_temperature: CornerProperty<u16>, engine_temperature: u16, tyre_pressure: CornerProperty<f32>, surface_type: CornerProperty<Surface>, ) -> Self
Constructs a new Telemetry
.
Source§impl Telemetry
impl Telemetry
Sourcepub fn steering(&self) -> f32
pub fn steering(&self) -> f32
Returns the ratio of steering input.
The values range from -1.0 for a full lock left to 1.0 for a full lock right.
Sourcepub fn engine_rpm(&self) -> u16
pub fn engine_rpm(&self) -> u16
Returns the engine RPM.
Sourcepub fn rev_lights(&self) -> u8
pub fn rev_lights(&self) -> u8
Returns the percentage of how far the rev lights indicator is engaged.
Sourcepub fn engine_temperature(&self) -> u16
pub fn engine_temperature(&self) -> u16
Returns the engine temperature in degrees celsius.
Source§impl Telemetry
impl Telemetry
Sourcepub fn brake_temperature(&self) -> &CornerProperty<u16>
pub fn brake_temperature(&self) -> &CornerProperty<u16>
Returns the brake temperature at each corner of the in degrees celsius.
Sourcepub fn tyre_surface_temperature(&self) -> &CornerProperty<u16>
pub fn tyre_surface_temperature(&self) -> &CornerProperty<u16>
Returns the tyre surface temperature at each corner of the car in degrees celsius.
Sourcepub fn tyre_inner_temperature(&self) -> &CornerProperty<u16>
pub fn tyre_inner_temperature(&self) -> &CornerProperty<u16>
Returns the tyre inner temperature at each corner of the car in degrees celsius.
Sourcepub fn tyre_pressure(&self) -> &CornerProperty<f32>
pub fn tyre_pressure(&self) -> &CornerProperty<f32>
Returns the tyre pressure at each corner of the car in psi.
Sourcepub fn surface_type(&self) -> &CornerProperty<Surface>
pub fn surface_type(&self) -> &CornerProperty<Surface>
Returns the type of the surface each tyre fo the car has contact with.