Jump to content

Why gravity is offseted in KSP ?


Recommended Posts

Hey all

I'm working with a student on KSP as a sandbox for controls because it's a rather complete simulator.
Though, I just discovered that the game was outputting a gravity of roughly 9.75 m²/s near the launch pad ( 5 - 6 meters above sea level).
Whereas, when I calculate the gravity at the same location, using the game's data of Kerbin, I will find roughly 9.80 m²/s.

Does anyone know why the gravity is lower than expected. It doesn't look like much but I need to be precise for something.
I could be reducing the mass or increasing the radius in the formula but I'm not sure why there is this offset.

g = KerbinGravParameter / (KerbinRadius + Altitude)²
Those are directly extracted from the Kerbin celestial object within the game, so I assume they are supposedly accurate.

I initially thought that this could maybe come from the centripetal acceleration but a quick computation shows me it would only be 0.0031 m²/s with Kerbin's dimensions, far from the 0.05 I'm looking for.
I also checked if it could be an influence of the Mun. But similarly, it would only account for 0.0004 m²/s in KSP.

Any idea would be nice to hear or if you know anything about that in the game.

Link to comment
Share on other sites

22 minutes ago, MaverickWoe said:

g = KerbinGravParameter / (KerbinRadius + Altitude)²

This formula checks out.

In the limit where one object is very much larger than the second, gravitational acceleration is given by the gravitational parameter GM (also called mu) divided by the radial distance from the centre of the parent object squared, in the radially inward direction.

And the radius of your position is Altitude plus Kerbin's Radius.

I also agree that this calculates at ~9.80, 9.81ish using Kerbin's gravitational parameter and mean sea level (altitude 0).

 

What might be happening is that apparent gravity at the equator is being reduced by the rotation of Kerbin. Give me as moment and I'll calculate that effect as well.

Link to comment
Share on other sites

Centripetal acceleration is radius multiplied by angular velocity squared.

Radius is 600,000m.

Sidereal rotational period is 5h 59m 9.4s.

Angular velocity is 0.0002914rad/s.

Centripetal acceleration is therefore ~0.051m/s/s at the equator.

Yup, that's the difference. The game is displaying "apparent gravity", not true gravity.

Edited by RCgothic
Link to comment
Share on other sites

you might find this graph interesting. I compared the theoretical g computation given g = KerbinGravParameter / (KerbinRadius + Altitude)²
with the one the game was outputing directly. And I absolutely cannot understand why there is such a complex difference...

Capture-d-cran-2021-07-07-200624.png

Why would the gravity in the game be affected my the behaviour of the rocket ?!

3 minutes ago, RCgothic said:

Sidereal rotational period is 5h 59m 9.4s.

Centripetal acceleration is therefore ~0.051m/s/s at the equator.

Oh, thanks for doing the computation again. I thought the days were 24h on Kerbin. Thanks for double checking.

Though, it still doesn't explain the weird graph above.  Why would apparent gravity change depending on the direction of fall or the thrust ?

Link to comment
Share on other sites

Hard to tell without seeing your complete flight.

As it's apparent gravity that the game states it will change depending on factors other than radial position, most notably tangential velocity.

I'm a little defeated by the reason for the step change around full throttle, but the rest of the plot doesn't look too unusual. Maybe someone else will have some idea.

Link to comment
Share on other sites

Quote

Though, it still doesn't explain the weird graph above.  Why would apparent gravity change depending on the direction of fall or the thrust ?

Oh ! I think I get it. Wouldn't  "g" be an expression of the gravity in the rotating frame of reference ? so that all coriolis, centripetal and Euler Forces would be inserted in this fake gravity coefficient ?
So you have m * angularVelocity² x radiusToAxis for the the centrifugal force you already mentioned RCgothic but also other terms like:
coriolis : m * 2 * angularVelocity x speed
Euler : m * angularAcceleration  x radiusToAxis
So all the silly variations I see must be Coriolis and Euler expressed into g, hence why g is a vector and may not point toward the center of Kerbin in the game.

Eureka :D

Nice

Edited by MaverickWoe
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...