The online racing simulator
Gravity in LFS
(74 posts, started )
It's really frightening, that there are so many people in the RSC forum talking about things they don't seem to understand. If you don't know what you are talking about, let it be or take a look at a physics book first. Gravity on earth is just g = 9,81 m/s². To calculate the gravity for a car you take it's mass and multiply it with g to get the downwards force. Nothing complicated, just simple math: F = m * g.

I can't really understand how you can program gravity wrong.


Edit: Thanks for the correction Frank.
I just did a test and the values LFS shows in the g-meter and in the raf file are a bit strange: When rolling the car to it's side, you would expect the lateral acceleration to show exactly 1 g. But it doesn't, it just shows 0 g. Did you make similar experiences?

My guess is, that LFS removes the gravity acceleration from the g-meter and raf outputs. Maybe Scawen can confirm this?
GPFlo,
1) gravity force can be calculated from absolute acceleration (a = F/m). We can obtain the acceleration quite enough precisely as the 2nd derivative of position. From the difference of positions of a car in 2 moments we get it's speed, from the differences of speeds - the acceleration. No need for extra data bytes.

You just need to jump from a ramp and get the vertical acceleration.

2) Gravity constant is there in the memory, search for "-9.81".
See. Look at that. Somebody who is clever. I like clever people. More cleverness please. Bring on the Cleverness. More people who know about physics and science and stuff please. I like reading about clever stuff like that. Because I havn't a hope in hell of understanding any of it but it makes me feel cleverer just reading it . . . .

Big cheer for the clever people.
Quote from detail :1) gravity force can be calculated from absolute acceleration (a = F*m).

I think you mean a = F/m. I've just tested it. The tyre load on all 4 tyres is 6,3 kN according to F1PerfView. With a mass of m = 678 kg I get g = 9,3. Something's wrong there

Quote from detail :
2) Gravity constant is there in the memory, search for "-9.81".

That answers Tristan's question

Quote from Funnybear :See. Look at that. Somebody who is clever. I like clever people. More cleverness please. Bring on the Cleverness. More people who know about physics and science and stuff please. I like reading about clever stuff like that. Because I havn't a hope in hell of understanding any of it but it makes me feel cleverer just reading it . . . .

Big cheer for the clever people.

If there is something you don't understand, feel free to ask. But please don't post comments like this. It's not our fault when you missed the physics class at school
Mate, that was slightly unfair. I love reading shit like this. I love finding our about the science behind everything. I'm not dissing you and wasn't even trying to derogate any of you discussing this aspect of LFS. I am actually following it in a fairly well eduacated manner, I may not have a PHD paper on advancing the weak force in String theory but for a layman I try very hard. I will tone down my humour, obviously some of it is escaping your monumentous intellect.

Please carry on with the science. I shall just watch and learn. Last thing I want is to hijack an interesting thread and turn it into a petty arguement about . . . . . random stuff.
Quote from Funnybear :Mate, that was slightly unfair. I love reading shit like this. I love finding our about the science behind everything. I'm not dissing you and wasn't even trying to derogate any of you discussing this aspect of LFS. I am actually following it in a fairly well eduacated manner, I may not have a PHD paper on advancing the weak force in String theory but for a layman I try very hard. I will tone down my humour, obviously some of it is escaping your monumentous intellect.

Please carry on with the science. I shall just watch and learn. Last thing I want is to hijack an interesting thread and turn it into a petty arguement about . . . . . random stuff.

Ok, sorry for the harsh words. I was just a bit dissed, because there are so many people around who talk about things they don't understand (just read the comments over at RSC à la "you would have to program gravity for each situation" or "gravity isn't important for a racing game". Then when there is someone like detail who knows what he is talking about and actually does some research about the subject, a comment like yours follows.

I mean this is just plain simple physics. Nothing complicated like "string theory", not even Einstein's theory of relativity is important here. We are talking about things Galileo Galilei has found about 400 years ago.
Quote from Ball Bearing Turbo :... Just downloaded your videos, I have just one comment:

What the hell kind of a "sim" is that? People compare that to LFS? I never tried rF, and after watching that it's not a likely occurance, I can tell you that... LOL

edit: and the download speed was great for me, 400kb/sec took no time

That was just a some weird dune buggy mod with a stunt track. And that Porsche was taken from another mod... just to clarify this to you.
Quote from GP4Flo :It's really frightening, that there are so many people in the RSC forum talking about things they don't seem to understand. If you don't know what you are talking about, let it be or take a look at a physics book first. Gravity on earth is just g = 9,81 m/s². To calculate the gravity for a car you take it's weight and multiply it with g to get the downwards force. Nothing complicated, just simple math: F = m * g.

I can't really understand how you can program gravity wrong.

Weight = downward force
You take the mass and multiply it with g to get the downward force.
If the car is floating (downloading the video) the problem is not about gravity when the car is on the track, it's a problem with the gravity when the car doesn't touch the ground. There was also one post at RSC which made me really think wtf.: check it. Is it a value defined in the mod or is he actually suggesting what I fear he is...?

Before you can actually show any scientific stuff about accelerations and velocities in any sim you need to know how and what values are being calculated and combined in that value you are looking at. Example: the acceleration value. Does it only include the x and y components or is the z component also in it? What about accelerations caused by car/wheel rotation?

So instead of simple
a = sqr((ax)2 + (ay)2)

it can be:
a = sqr((ax)2 + (ay)2 + (az)2) + (v2 / r)

Where:
sqr = square root (hope I'm using the right terms...)
(ax)2 = acceleration to x(/y/z)-direction without the acceleration caused by rotation
v = 2 * PI * n * r = velocity of the point which is rotating around a center point, at the distance of an r.
n = rotations per second (the car...) You can also have the three (x,y,z) vectors here, but it just makes it more complicated without showing anything new or interesting. (the car rotates around the axles, around x-axle, around y... and these would be summed in similar way as the accelerations above.
v2 = v * v = velocity * velocity

(all vectors)

I need to look at the F1perf's values...

EDIT: after looking at those videos it just seems that the aero model does only care about the forces that point directly against the car's nose (drag). And the gravity doesn't accelerate the car when it's dropping down, the velocity seems to be constant. Which it isn't. I expected much worse, like the cars sliding in the air or something (phew).
Quote from GP4Flo :I think you mean a = F/m. I've just tested it. The tyre load on all 4 tyres is 6,3 kN according to F1PerfView. With a mass of m = 678 kg I get g = 9,3. Something's wrong there

That force you see in F1PerfView (from the RAF file) is the force supporting the car body. It excludes the unsprung mass (wheels etc). So that should explain the error you see.
Quote from GP4Flo :I just did a test and the values LFS shows in the g-meter and in the raf file are a bit strange: When rolling the car to it's side, you would expect the lateral acceleration to show exactly 1 g. But it doesn't, it just shows 0 g. Did you make similar experiences?

My guess is, that LFS removes the gravity acceleration from the g-meter and raf outputs. Maybe Scawen can confirm this?

Well, MY guess is that the LFS g-meter shows acceleration forces,
not the force exerted by gravity. Once the car is on it's side and not
moving (lying on the ground), it's not accelerating. An immobile object
isn't accelerating. However, if you were to drop the car from the air while
it's on it's side, it should (and im sure it would) reach 9.8m/s² of acceleration.

Oh, and i'm pretty positive LFS uses a fixed constant around 9.81 to
simulate gravity. Also, since the 'worlds' are relatively small, the gravity
is applied linearly, downwards, not towards a virtual center.
Quote from GP4Flo :Ok, sorry for the harsh words. I was just a bit dissed, because they are so many people around who talk about things they don't understand (just read the comments over at RSC à la "you would have to program gravity for each situation" or "gravity isn't important for a racing game".

Indeed, I browsed that link CP had to the RSC rF "discussion", and I was a bit shocked at the attitude there TBH (call me naive or what!) I think at least we are lucky to have some very learned individuals (and the odd BRAINlien (brain alien)) who can enlighten us laymen to some great thoughts. I actually laughed out loud for real in that forum, and they call US "fanboys" over here, LOL. illepall
Ha! Now we have someone to blame for being hated by the rFactor community


I have to agree though - as I read those posts on RSC I was literally like "illepall" and ":doh:"
#65 - J.B.
Quote from AndroidXP :
I have to agree though - as I read those posts on RSC I was literally like "illepall" and ":doh:"

Indeed. Made me realize that the LFS community is actually quite a nice place. Nobody goes mental here when someone makes a valid critisism of physics.
Quote from J.B. :Nobody goes mental here when someone makes a valid critisism of physics.

That's because we've got some in the first place to criticise.


/runs
Good one bob
:iagree:
Quote from AndroidXP :Besides that, did you notice that LFS even simulates the rotation forces generated by the engine? When you rev up, you see the car nudge to the side a little bit.

So does rFactor, RevItUp.wmv.

Don't shoot me, I think both LFS and rFactor are superb, however I'm enjoying rFactor more at the moment. When S2 comes out of alpha I'm sure LFS will get plenty more of my time.

I've spent a lot of time tweaking my forcefeedback and controller settings in rFactor and I can assure you that when configured the way I've got mine the "automatic" countersteering effect is very much in effect (I run a DFP @ 900 degrees of rotation), and in no way is it a case of "oversteer = oh dear".
Yes, but in LFS this effect is archieved by putting a force on the car body, which in return compresses the suspension, so the whole thing does also work while airborne.

In rF I guess* it's just one of the other numerous canned effects, that either just moves the view or artifically compresses the suspension, so I'm not quite sure if it even has an influence on the physics calculations respectively if it would change the roll of the car whilst revving up midair (which I don't really think looking at the obviously flawed gravity).

But whatever, no reason to have an argument over it. For me, rFactor or any other current sim will never come close to LFS and for some people it might be the exact opposite. No amount of arguing is going to change that.

* I'd actually research it if the rFactor guys bothered to put out a demo
I guess it would be easier to just simulate a force, rather then creating some code that allowes you to artificially move the cockpit, while it actually isnt moving etc.. If you are able to simulate 4 tyres and downforce, it shouldnt be too hard to apply a moment somewhere on the car that is proportional to the rotational speed of the engine.
Quote from AndroidXP :Yes, but in LFS this effect is archieved by putting a force on the car body, which in return compresses the suspension, so the whole thing does also work while airborne.

In rF I guess* it's just one of the other numerous canned effects, that either just moves the view or artifically compresses the suspension, so I'm not quite sure if it even has an influence on the physics calculations respectively if it would change the roll of the car whilst revving up midair (which I don't really think looking at the obviously flawed gravity).

My guess would be that it's not a canned effect, but I don't have any evidence either way, all I'm going on is how it feels to me, and it sure doesn't feel like a canned effect. I'm not quite sure what this has to do with whether or not rF gravity is borked, or if you've been following the gravity thread over at RSC, but it seems to have been proved that the gravity is not flawed. ["Seems" - once again I've done no research of my own, so I'm not really in a position to comment]

Quote from AndroidXP :But whatever, no reason to have an argument over it.

Totally agree, however nowt wrong with a reasoned discussion

Quote from AndroidXP :For me, rFactor or any other current sim will never come close to LFS and for some people it might be the exact opposite. No amount of arguing is going to change that.

Fair enough, but I reckon you'd be pleasantly surprised if you came and had a few laps on my rFactor setup.

Quote from AndroidXP :* I'd actually research it if the rFactor guys bothered to put out a demo

Yup, there really should be one I agree, although at the rate they're adding new features to the core I guess a demo isn't top of the priority list.

Sorry if I'm coming over as argumentative, I'm not meaning to be. I dream of the day when rF'ers and LFS'ers can co-exist in perfect harmony, just like they co-exist on my hard drive
Engine torque reaction on the chassis is about as hard to do as gravity I doubt it's canned anywhere nowadays. It's much easier just to do it properly instead.
Quote from Frankmd :I guess it would be easier to just simulate a force, rather then creating some code that allowes you to artificially move the cockpit, while it actually isnt moving etc..
...

If you have the forces to simulate

I think it is possible to create a fairly good simulation using only canned effects but in the end you can't write every aspect of racing in this "if -> do" way. If you create realistic physics that do the right calculations even if the car is upside down you don't need to code the "car upside down" part anymore. Using canned effects is by far easier because you don't need to understand what is really goin on. Just set the variables so that the car acts like you feel it should. While it does so in some predefined cases in some cases it may acts totally unrealiscally, like car upside down could be "falling towards the sky" because the gravity is very simple made

So when using canned effects you can never be sure that the outcome is realistic if one of the variables change unexpectedly, like the car lifts one of its rear wheels in turning or the car hits a bump when the car is sliding upside down after an accident.

Gravity in LFS
(74 posts, started )
FGED GREDG RDFGDR GSFDG