The online racing simulator
Searching in All forums
(2 results)
Equer
Demo licensed
I just found it in InSim.txt doc,

struct OutSimPack
{
unsigned Time; // time in milliseconds (to check order)

Vector AngVel; // 3 floats, angular velocity vector
float Heading; // anticlockwise from above (Z)
float Pitch; // anticlockwise from right (X)
float Roll; // anticlockwise from front (Y)
Vector Accel; // 3 floats X, Y, Z
Vector Vel; // 3 floats X, Y, Z
Vec Pos; // 3 ints X, Y, Z (1m = 65536)

int ID; // optional - only if OutSim ID is specified
};

But what is the velocity format? km/h or miles per hour?
What are formats for other data?
OutSim - what is format of the data output?
Equer
Demo licensed
I'm using code from wiki:


import socket
import struct

# Create UDP socket.
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

# Bind to LFS.
sock.bind(('127.0.0.1', 30000))

while True:
# Receive data.
data = sock.recv(256)

if not data:
break # Lost connection

# Unpack the data.
outsim_pack = struct.unpack('I12f3i', data)
time = outsim_pack[0]
angvel = [outsim_pack[1], outsim_pack[2], outsim_pack[3]]
header = outsim_pack[4]
pitch = outsim_pack[5]
roll = outsim_pack[6]
accel = [outsim_pack[7], outsim_pack[8], outsim_pack[9]]
vel = [outsim_pack[10], outsim_pack[11], outsim_pack[12]]
pos = [outsim_pack[13], outsim_pack[14], outsim_pack[15]]

# Release the socket.
sock.close()

Is it written somewhere on wikipedia what is the format of the output data and the corresponding indexes for each piece of information?
For example:
- time - index 0,
.
.
.
- roll - index 6
etc.
I could not find anything.
FGED GREDG RDFGDR GSFDG