The online racing simulator
LFS OutSim - which acceleration values?
I'm at work to program a vb6 apllication for motion control, but i can't find any infos about the x, y and z acceleration or velocity values from the lfs outsim packet. In which unit are they expressed? meter per second? g-force? or what ever... And what are the max. possible values +/- (I need this info to convert the values to percent from max/min).

Could anybody tell me more?

Thanks for your help in advance!

Greetings from Bavaria, Germany!


Andreas
Vector Accel; // 3 floats X, Y, Z
Vector Vel; // 3 floats X, Y, Z
Vec Pos; // 3 ints X, Y, Z (1m = 65536)

I think it should be

MetersPerSecondX = Vel.X / 65536;
MetersPerSecondY = Vel.Y / 65536;
MetersPerSecondZ = Vel.Z / 65536;

However, I could be completely wrong.
The easiest way to find out is to make a small program to display the data received, and check them against the values given within LFS.

IIRC, Accel is m/s/s and Vel is m/s. There may be a multiplier (like 65536) but I don't think so.
#4 - amp88
If you're looking to get G force:

When I was looking for this information I believe this was the thread I used.

Java code:

float accelX = Float.intBitsToFloat(outSimResponse.getAcceleration().getX()), accelY = Float.intBitsToFloat(outSimResponse.getAcceleration().getY());
float heading = outSimResponse.getHeading();

double latGs = ((Math.cos(heading) * accelX) + (Math.sin(heading) * accelY)) / 9.81;
double lonGs = ((-Math.sin(heading) * accelX) + (Math.cos(heading) * accelY)) / 9.81;

Short test video.
Thank you for your answers!

But for example, for acceleration y i need to convert the value to percent from maximum. but what is the maximum? when i make a full break with the XRGT then the value will go to 10 or 11. with a formula car it goes up to 20 or more.
#6 - amp88
Quote from halde82 :Thank you for your answers!

But for example, for acceleration y i need to convert the value to percent from maximum. but what is the maximum? when i make a full break with the XRGT then the value will go to 10 or 11. with a formula car it goes up to 20 or more.

I'm not aware of maximum values being used (hit a wall at 200mph and see what the instantaneous G is, for example). As you point out, the values you see will depend on the type of car, so you may want to define maximums for yourself. For example, in normal driving with the BF1 5 Gs might be a sensible maximum value to display. On occasion it may deliver peak G force higher than 5 G, but for the vast majority of the time it will be below 5 Gs. For the XRT it might be more like 1.5 or 2 Gs.
Quote from amp88 :hit a wall at 200mph and see what the instantaneous G is, for example

That's right! So i must get the transmitted acceleration value to my pneumatik cylinder. The acc-value is m/s². And when this value is higher then the tech speed of the cylinder, the motion simulator is at his limit.

so on, a lot of work!

Thank's again for all your help!
#8 - amp88
Quote from halde82 :That's right! So i must get the transmitted acceleration value to my pneumatik cylinder. The acc-value is m/s². And when this value is higher then the tech speed of the cylinder, the motion simulator is at his limit.

so on, a lot of work!

Thank's again for all your help!

Well, if you supply a value that's higher than the limit it won't cause any problems, will it? If you're worried about it you could do an operation similar to the Java Math.min function. It takes two inputs (i.e. the calculated G value and your specified maximum G value) and returns the smaller of the two. Or you could just have an if branch which will re-set the calculated G value to the maximum if it's too high.

FGED GREDG RDFGDR GSFDG