Struct f1_api::packet::motion::MotionPacket[][src]

pub struct MotionPacket { /* fields omitted */ }
Expand description

Packet containing data about the movement and position of all cars in the session

The F1 games publish motion data for all cars in the session. This data is restricted to publicly observable properties for most cars, e.g. the position and movement of a car. For the player’s car, additional motion data is published, e.g. various physical forces on the car and its suspension.

Implementations

Constructs a new MotionPacket.

Returns the current angle of the front wheels in radians.

Returns the packet header prefixing the motion packet.

Returns the publicly observable motion data for all 20 cars in the session.

Returns the position of the suspension at each corner of the car.

Returns the velocity of the suspension at each corner of the car.

Returns the acceleration of the suspension at each corner of the car.

Returns the wheel speed at each corner of the car.

Returns the wheel slip at each corner of the car.

Returns the velocity in local space on each axis.

Returns the angular velocity on each axis.

Returns the angular acceleration on each axis.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.