packet

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TelemetryToDataFrame

func TelemetryToDataFrame(tf TelemetryFrame) *data.Frame

Types

type Quaternion

type Quaternion [4]float64

func QuatNorm

func QuatNorm(q Quaternion) Quaternion

QuatNorm normalizes a quaternion

type TelemetryFrame

type TelemetryFrame struct {
	PackageID         int32
	BestLap           int32
	LastLap           int32
	CurrentLap        int16
	CurrentGear       uint8
	SuggestedGear     uint8
	FuelCapacity      float32
	CurrentFuel       float32
	Boost             float32
	TyreDiameterFL    float32
	TyreDiameterFR    float32
	TyreDiameterRL    float32
	TyreDiameterRR    float32
	TyreSpeedFL       float32
	TyreSpeedFR       float32
	TyreSpeedRL       float32
	TyreSpeedRR       float32
	CarSpeed          float32
	TyreSlipRatioFL   float32
	TyreSlipRatioFR   float32
	TyreSlipRatioRL   float32
	TyreSlipRatioRR   float32
	TimeOnTrack       time.Duration
	TotalLaps         int16
	CurrentPosition   int16
	TotalPositions    int16
	CarID             int32
	Throttle          float32
	RPM               float32
	RPMRevWarning     uint16
	Brake             float32
	RPMRevLimiter     uint16
	EstimatedTopSpeed int16
	Clutch            float32
	ClutchEngaged     float32
	RPMAfterClutch    float32
	OilTemp           float32
	WaterTemp         float32
	OilPressure       float32
	RideHeight        float32
	TyreTempFL        float32
	TyreTempFR        float32
	TyreTempRL        float32
	TyreTempRR        float32
	SuspensionFL      float32
	SuspensionFR      float32
	SuspensionRL      float32
	SuspensionRR      float32
	Gear1             float32
	Gear2             float32
	Gear3             float32
	Gear4             float32
	Gear5             float32
	Gear6             float32
	Gear7             float32
	Gear8             float32
	PositionX         float32
	PositionY         float32
	PositionZ         float32
	VelocityX         float32
	VelocityY         float32
	VelocityZ         float32
	RotationPitch     float32
	RotationYaw       float32
	RotationRoll      float32
	QuaternionScalar  float32
	AngularVelocityX  float32
	AngularVelocityY  float32
	AngularVelocityZ  float32
	LocalVelocityX    float32
	LocalVelocityY    float32
	LocalVelocityZ    float32
	AccelerationX     float32
	AccelerationY     float32
	AccelerationZ     float32
	GForceX           float32
	GForceY           float32
	GForceZ           float32
	Roll              float32
	Pitch             float32
	Yaw               float32
	IsPaused          bool
	InRace            bool
}

func ReadPacket

func ReadPacket(b []byte) (*TelemetryFrame, error)

type Vector3

type Vector3 [3]float64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL