API Referenceveprotocols
MotionSim Protocol
Module defined in `lua/vehicle/protocols/motionSim.lua`. Provides high-frequency telemetry data specifically designed for motion simulator platforms.
Module defined in lua/vehicle/protocols/motionSim.lua. Provides high-frequency telemetry data specifically designed for motion simulator platforms.
Exports
Functions
getAddress(), getPort(), getMaxUpdateRate() (callable)
-
Description: Retrieves UDP configuration from game settings.
-
Returns:
M
getStructDefinition() (callable)
- Description: Returns a C-style struct definition for the data packet.
- Packet Fields:
posX, posY, posZ: World position.velX, velY, velZ: Smoothed velocity.accX, accY, accZ: Smoothed acceleration (excluding gravity).upX, upY, upZ: Local Up vector.rollPos, pitchPos, yawPos: Orientation angles.rollVel, pitchVel, yawVel: Angular velocities.
fillStruct(o, dtSim) (callable)
- Arguments:
o(ffi-struct): The struct to fill.dtSim(number): Time step. - Description: Populates the packet using data from the
protocolsglobal.
isPhysicsStepUsed() (callable)
- Description: Returns
true. This protocol runs on the physics step (up to 2000Hz) for maximum fidelity.
Related
- Protocols Master: Dispatches data to this module.
module.reset()
- Description: Resets the module state.
- @context:
any| @performance:low
Protocols Directory
This directory contains implementations of specific communication standards for external hardware and software.
OutGauge Protocol
Module defined in `lua/vehicle/protocols/outgauge.lua`. Implements the industry-standard OutGauge protocol (originally from LiveForSpeed) for external dashboards and hardware gauges.