The online racing simulator
Shock Travel Data
Is it possible to parse shock travel data from the sim to an insim application? Basically I'm trying to measure "air-time" when you jump a ramp.
#2 - w126
Yes, look at the OutSimPack.txt file in LFS docs directory.

struct OutSimWheel // 10 ints
{
float SuspDeflect; // compression from unloaded
float Steer; // including Ackermann and toe
float XForce; // force right
float YForce; // force forward
float VerticalLoad; // perpendicular to surface
float AngVel; // radians/s
float LeanRelToRoad; // radians a-c viewed from rear

byte AirTemp; // degrees C
byte SlipFraction; // (0 to 255 - see below)
byte Touching; // touching ground
byte Sp3;

float SlipRatio; // slip ratio
float TanSlipAngle; // tangent of slip angle
};

You could use the "Touching" property too and measure the time when none of the wheels are touching the ground.
Quote from Flame CZE :You could use the "Touching" property too and measure the time when none of the...

Does the touching property recognize concrete objects (ramps, etc) as the ground? Also, I don't see that in here:

struct CompCar // Car info in 28 bytes - there is an array of these in the MCI (below)
{
word Node; // current path node
word Lap; // current lap
byte PLID; // player's unique id
byte Position; // current race position: 0 = unknown, 1 = leader, etc...
byte Info; // flags and other info - see below
byte Sp3;
int X; // X map (65536 = 1 metre)
int Y; // Y map (65536 = 1 metre)
int Z; // Z alt (65536 = 1 metre)
word Speed; // speed (32768 = 100 m/s)
word Direction; // car's motion if Speed > 0: 0 = world y direction, 32768 = 180 deg
word Heading; // direction of forward axis: 0 = world y direction, 32768 = 180 deg
short AngVel; // signed, rate of change of heading: (16384 = 360 deg/s)
};

Am I missing something?
Quote from w126 :Yes, look at the OutSimPack.txt file in LFS docs directory...

Can I use outsim data in the insim? I can't figure out how.
InSim and OutSim are different protocols. OutSim packets will only be sent to the currently viewed car from cockpit view.

To set up OutSim, edit these lines in cfg.txt:

OutSim Mode 0 :0-off 1-driving 2-driving+replay
OutSim Delay 1 :minimum delay between packets (100ths of a sec)
OutSim IP 0.0.0.0 :IP address to send the UDP packet (127.0.0.1 for local host)
OutSim Port 0 :IP port
OutSim ID 0 :if not zero, adds an identifier to the packet
OutSim Opts 0 : a hexadecimal number to send various OutSim data - see docs/OutSimPack.txt

Then the library you're using must support receiving OutSim data from a given port.
Quote from johnstonkarting :Can I use outsim data in the insim? I can't figure out how.

Similar to insim, you can listen for packets on a specified port.

You have to enable sending data though:

-> lfs/cfg.txt and somewhere at the bottom:
OutSim Mode 2 // set to 2 for game and replay, 1 for game
OutSim Delay 1
OutSim IP 127.0.0.1
OutSim Port 29998 /29999 is insim Standard, but select any
OutSim ID 0
OutSim Opts 0 // set this to which packets you want -> all are "1ff"


Check your files: lfs/docs/OutSimPack.txt and lfs/docs/insim.txt for more info.


Hope that helps Smile

Shock Travel Data
(7 posts, started )
FGED GREDG RDFGDR GSFDG