SCRC v0.5.1 Scrc.SensorData View Source
SensorData provides the struct for SCRC sensor data.
Link to this section Summary
Functions
Clip values according to field specification
Parse binary according to field/prefix specification and return Struct
Create new Struct based on values. Apply post-processing (if needed)
Callback for postprocessing after creation from binary
Create binary from struct according to field/prefix specification
Update fields based on current and previous data
Link to this section Types
t() :: %Scrc.SensorData{ acceleration_x: :float, acceleration_y: :float, acceleration_z: :float, angle: :float, current_lap_time: :float, damage: :integer, distance_from_start: :float, distance_raced: :float, focus: {:float, :float, :float, :float, :float}, fuel: :float, gear: :integer, last_lap_time: :float, opponents: [:float], race_position: :integer, rpm: :integer, speed_x: :float, speed_y: :float, speed_z: :float, track: [:float], track_position: :float, wheel_spin_velocity: {:float, :float, :float, :float}, z: :float }
Link to this section Functions
Clip values according to field specification
Parse binary according to field/prefix specification and return Struct
Create new Struct based on values. Apply post-processing (if needed).
Callback for postprocessing after creation from binary.
By default simply return the passed data
Create binary from struct according to field/prefix specification.
update_deltas(Scrc.SensorData.t(), Scrc.SensorData.t()) :: Scrc.SensorData.t()
Update fields based on current and previous data