// OutSim full packet format // NOTES: // Types: // int : 4-byte integer // unsigned : unsigned integer // float : 4-byte float // Vec : 3 ints fixed point (1m = 65536) // Vector : 3 floats x, y, z // Axes: // X - right // Y - forward // Z - up offset offset description datatype (dec) (hex) ----------- -------- ----- ----- 0 0 L char 1 1 F char 2 2 S char 3 3 T char 4 4 ID; // OutSim ID from cfg.txt int 8 8 Time; // time in milliseconds (to check order) unsigned OutSimMain struct: AngVel; // 3 floats, angular velocity vector Vector --------- 12 C float 16 10 float 20 14 float 24 18 Heading; // anticlockwise from above (Z) float 28 1C Pitch; // anticlockwise from right (X) float 32 20 Roll; // anticlockwise from front (Y) float Accel; / 3 floats X, Y, Z Vector --------- 36 24 float 40 28 float 44 2C float Vel; / 3 floats X, Y, Z Vector --------- 48 30 float 52 34 float 56 38 float Pos; // 3 ints X, Y, Z (1m = 65536) Vec ------------ 60 3C int 64 40 int 68 44 int OutSimInputs struct: 72 48 Throttle; // 0 to 1 float 76 4C Brake; // 0 to 1 float 80 50 InputSteer; // radians float 84 54 Clutch; // 0 to 1 float 88 58 Handbrake; // 0 to 1 float 92 5C Gear; // 0=R, 1=N, 2=first gear byte 93 5D Sp1; // spare byte 94 5E Sp2; byte 95 5F Sp3; byte 96 60 EngineAngVel; // radians/s float 100 64 MaxTorqueAtVel; // Nm : output torque for throttle 1.0 float 104 68 CurrentLapDist; // m - travelled by car float 108 6C IndexedDistance; // m - track ruler measurement float OutSimWheel[4] array of structs: LR -------------------------------------------------------------------------- 112 70 SuspDeflect; // compression from unloaded float 116 74 Steer; // including Ackermann and toe float 120 78 XForce; // force right float 124 7C YForce; // force forward float 128 80 VerticalLoad; // perpendicular to surface float 132 84 AngVel; // radians/s float 136 88 LeanRelToRoad; // radians a-c viewed from rear float 140 8C AirTemp; // degrees C byte 141 8D SlipFraction; // (0 to 255 - see below) byte 142 8E Touching; // touching ground byte 143 8F Sp3; 144 90 SlipRatio; // slip ratio float 148 94 TanSlipAngle; // tangent of slip angle float RR -------------------------------------------------------------------------- 152 98 SuspDeflect; // compression from unloaded float 156 9C Steer; // including Ackermann and toe float 160 A0 XForce; // force right float 164 A4 YForce; // force forward float 168 A8 VerticalLoad; // perpendicular to surface float 172 AC AngVel; // radians/s float 176 B0 LeanRelToRoad; // radians a-c viewed from rear float 180 B4 AirTemp; // degrees C byte 181 B5 SlipFraction; // (0 to 255 - see below) byte 182 B6 Touching; // touching ground byte 183 B7 Sp3; 184 B8 SlipRatio; // slip ratio float 188 BC TanSlipAngle; // tangent of slip angle float LF -------------------------------------------------------------------------- 192 C0 SuspDeflect; // compression from unloaded float 196 C4 Steer; // including Ackermann and toe float 200 C8 XForce; // force right float 204 CC YForce; // force forward float 208 D0 VerticalLoad; // perpendicular to surface float 212 D4 AngVel; // radians/s float 216 D8 LeanRelToRoad; // radians a-c viewed from rear float 220 DC AirTemp; // degrees C byte 221 DD SlipFraction; // (0 to 255 - see below) byte 222 DE Touching; // touching ground byte 223 DF Sp3; 224 E0 SlipRatio; // slip ratio float 228 E4 TanSlipAngle; // tangent of slip angle float RF -------------------------------------------------------------------------- 232 E8 SuspDeflect; // compression from unloaded float 236 EC Steer; // including Ackermann and toe float 240 F0 XForce; // force right float 244 F4 YForce; // force forward float 248 F8 VerticalLoad; // perpendicular to surface float 252 FC AngVel; // radians/s float 256 100 LeanRelToRoad; // radians a-c viewed from rear float 260 104 AirTemp; // degrees C byte 261 105 SlipFraction; // (0 to 255 - see below) byte 262 106 Touching; // touching ground byte 263 107 Sp3; 264 108 SlipRatio; // slip ratio float 268 10C TanSlipAngle; // tangent of slip angle float