Struct F1PacketMotionEx

Source
#[non_exhaustive]
pub struct F1PacketMotionEx {
Show 25 fields pub suspension_position: [f32; 4], pub suspension_velocity: [f32; 4], pub suspension_acceleration: [f32; 4], pub wheel_speed: [f32; 4], pub wheel_slip_ratio: [f32; 4], pub wheel_slip_angle: [f32; 4], pub wheel_lat_force: [f32; 4], pub wheel_long_force: [f32; 4], pub height_of_cog_above_ground: f32, pub local_velocity_x: f32, pub local_velocity_y: f32, pub local_velocity_z: f32, pub angular_velocity_x: f32, pub angular_velocity_y: f32, pub angular_velocity_z: f32, pub angular_acceleration_x: f32, pub angular_acceleration_y: f32, pub angular_acceleration_z: f32, pub front_wheels_angle: f32, pub wheel_vert_force: [f32; 4], pub front_aero_height: f32, pub rear_aero_height: f32, pub front_roll_angle: f32, pub rear_roll_angle: f32, pub chassis_yaw: f32,
}
Expand description

Extended motion data for player’s car. Available as a:

  • part of F1PacketMotion in the 2022 format
  • standalone packet from the 2023 format onwards

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§suspension_position: [f32; 4]

Positions of suspension for each wheel. See wheel_index for wheel order.

§suspension_velocity: [f32; 4]

Velocity values of suspension for each wheel. See wheel_index for wheel order.

§suspension_acceleration: [f32; 4]

Acceleration values of suspension for each wheel. See wheel_index for wheel order.

§wheel_speed: [f32; 4]

Speed of each wheel. See wheel_index for wheel order.

§wheel_slip_ratio: [f32; 4]

Slip ratio for each wheel. See wheel_index for wheel order.

§wheel_slip_angle: [f32; 4]

Slip angles for each wheel. See wheel_index for wheel order. Available from the 2024 format onwards.

§wheel_lat_force: [f32; 4]

Lateral forces for each wheel. See wheel_index for wheel order. Available from the 2024 format onwards.

§wheel_long_force: [f32; 4]

Longitudinal forces for each wheel. See wheel_index for wheel order. Available from the 2024 format onwards.

§height_of_cog_above_ground: f32

Height of centre of gravity above ground. Available from the 2024 format onwards.

§local_velocity_x: f32

X velocity in local space.

§local_velocity_y: f32

Y velocity in local space.

§local_velocity_z: f32

Z velocity in local space.

§angular_velocity_x: f32

Angular velocity X component.

§angular_velocity_y: f32

Angular velocity Y component.

§angular_velocity_z: f32

Angular velocity Z component.

§angular_acceleration_x: f32

Angular acceleration X component.

§angular_acceleration_y: f32

Angular acceleration Y component.

§angular_acceleration_z: f32

Angular acceleration Z component.

§front_wheels_angle: f32

Current front wheels angle in radians.

§wheel_vert_force: [f32; 4]

Vertical forces for each wheel. See wheel_index for wheel order. Available from the 2023 format onwards.

§front_aero_height: f32

Front plank edge height above road surface. Available from the 2024 format onwards.

§rear_aero_height: f32

Rear plank edge height above road surface. Available from the 2024 format onwards.

§front_roll_angle: f32

Roll angle of the front suspension. Available from the 2024 format onwards.

§rear_roll_angle: f32

Roll angle of the rear suspension. Available from the 2024 format onwards.

§chassis_yaw: f32

Yaw angle of the chassis relative to the direction of motion - radians. Available from the 2024 format onwards.

Trait Implementations§

Source§

impl BinRead for F1PacketMotionEx

Source§

type Args<'__binrw_generated_args_lifetime> = (u16,)

The type used for the args parameter of read_args() and read_options(). Read more
Source§

fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>

Read Self from the reader using the given Endian and arguments. Read more
Source§

fn read<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self: ReadEndian, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments. Read more
Source§

fn read_be<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments and assuming big-endian byte order. Read more
Source§

fn read_le<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments and assuming little-endian byte order. Read more
Source§

fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read T from the reader assuming native-endian byte order. Read more
Source§

fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek, Self: ReadEndian,

Read Self from the reader using the given arguments. Read more
Source§

fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming big-endian byte order, using the given arguments. Read more
Source§

fn read_le_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming little-endian byte order, using the given arguments. Read more
Source§

fn read_ne_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read T from the reader, assuming native-endian byte order, using the given arguments. Read more
Source§

impl Clone for F1PacketMotionEx

Source§

fn clone(&self) -> F1PacketMotionEx

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for F1PacketMotionEx

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for F1PacketMotionEx

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for F1PacketMotionEx

Source§

fn eq(&self, other: &F1PacketMotionEx) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for F1PacketMotionEx

Source§

fn partial_cmp(&self, other: &F1PacketMotionEx) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl ReadEndian for F1PacketMotionEx

Source§

const ENDIAN: EndianKind

The endianness of the type.
Source§

impl Serialize for F1PacketMotionEx

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for F1PacketMotionEx

Source§

impl StructuralPartialEq for F1PacketMotionEx

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,