[−][src]Struct f1_api::packet::telemetry::Telemetry
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.
Methods
impl Telemetry
[src]
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
[src]
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
.
impl Telemetry
[src]
pub fn speed(&self) -> u16
[src]
Returns the speed of the car in kilometers per hour.
pub fn throttle(&self) -> f32
[src]
Returns the ratio of the applied throttle.
pub fn steering(&self) -> f32
[src]
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.
pub fn brake(&self) -> f32
[src]
Returns the ratio of brake applied.
pub fn clutch(&self) -> u8
[src]
Returns the percentage that the clutch has been applied.
pub fn gear(&self) -> Gear
[src]
Returns the gear the car is in.
pub fn engine_rpm(&self) -> u16
[src]
Returns the engine RPM.
pub fn drs(&self) -> bool
[src]
Returns whether the DRS is deployed.
pub fn rev_lights(&self) -> u8
[src]
Returns the percentage of how far the rev lights indicator is engaged.
pub fn engine_temperature(&self) -> u16
[src]
Returns the engine temperature in degrees celsius.
impl Telemetry
[src]
pub fn brake_temperature(&self) -> &CornerProperty<u16>
[src]
Returns the brake temperature at each corner of the in degrees celsius.
pub fn tyre_surface_temperature(&self) -> &CornerProperty<u16>
[src]
Returns the tyre surface temperature at each corner of the car in degrees celsius.
pub fn tyre_inner_temperature(&self) -> &CornerProperty<u16>
[src]
Returns the tyre inner temperature at each corner of the car in degrees celsius.
pub fn tyre_pressure(&self) -> &CornerProperty<f32>
[src]
Returns the tyre pressure at each corner of the car in psi.
pub fn surface_type(&self) -> &CornerProperty<Surface>
[src]
Returns the type of the surface each tyre fo the car has contact with.
Trait Implementations
impl Clone for Telemetry
[src]
impl Copy for Telemetry
[src]
impl Debug for Telemetry
[src]
impl Default for Telemetry
[src]
impl PartialEq<Telemetry> for Telemetry
[src]
impl PartialOrd<Telemetry> for Telemetry
[src]
fn partial_cmp(&self, other: &Telemetry) -> Option<Ordering>
[src]
fn lt(&self, other: &Telemetry) -> bool
[src]
fn le(&self, other: &Telemetry) -> bool
[src]
fn gt(&self, other: &Telemetry) -> bool
[src]
fn ge(&self, other: &Telemetry) -> bool
[src]
impl StructuralPartialEq for Telemetry
[src]
Auto Trait Implementations
impl RefUnwindSafe for Telemetry
impl Send for Telemetry
impl Sync for Telemetry
impl Unpin for Telemetry
impl UnwindSafe for Telemetry
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,