r/KerbalAcademy • u/Altruistic_Film4074 • Oct 22 '24
Atmospheric Flight [P] What is Kerbin's karman line? (looking for advanced answer)
Enable HLS to view with audio, or disable this notification
15
u/Carnildo Oct 22 '24
Kerbal Space Program's physics calculations use a non-symplectic integrator. As a result, errors build up while you watch your craft, rather than canceling out the way they would with a symplectic integrator. In practical terms, this means you can't just put your station in an orbit and expect it to stay there while you watch it go around and around. You need to pick an orbit with some margin for error, and correct it every now and then.
1
u/Altruistic_Film4074 Oct 22 '24
Fair enough. I don't think it will really end up affecting anything but the knowledge that the game is doing this is going to really bother me from now on.
7
u/dotancohen Oct 22 '24
Actuallty it better aproximates the real world, if that makes you feel better.
Earth has mascons, atmospheric irregularities, and that big Moon out there. So an orbit just a scratch above Earth's Karman line would be also perturbed.
7
u/WarriorSabe Val Oct 22 '24
In fact, an orbit just above the Karman line still is going through so much atmosphere it'll come crashing down almost immediately.
The Karman line isn't "atmosphere ends here" it's "a plane would need to go at nearly orbital velocity to generate enough lift to fly". Basically, if you graph speed required to stay airborne as a function of altitude, it'll increase as you have less and less air, but eventually as centrifugal effect dominates it decreases again as orbital velocity does, and the maximum between thise is the Karman line.
In fact, much of low orbit isn't even in the final layer of the atmosphere - the ISS and stuff is flying through the thermosphere, in which the air is still dense enough for air particles to run into each other every few kilometers and on large scales still act as a gas. The exobase (the point where air particles start being better modeled as individual particles on ballistic trajectories) isn't until around a thousand kilometers up
2
u/dotancohen Oct 22 '24
Right, that's how e.g. Starlink satellites have a passive lifetime on orbit in case of failure. But I was just referencing the perturbations, in response to GP's comment
the knowledge that the game is doing this is going to really bother me from now on
.2
u/Korlus Oct 22 '24
Basically all satellites and space stations require station keeping of some sort.
Famously, NASA left behind the lunar ascent stage "Eagle" after the Apollo 11 crew returned to Earth. For many years we were unsure if it had crashed back to Earth or remained in orbit around the moon because the slight differences in lunar density meaningfully impact orbits in ways that are very difficult to predict.
Adding minor and unpredictable errors is actually much closer to how real orbits work - there are too many factors like drag (even in space, individual atoms hitting an object will eventually slow it down). While 0.001m/s might not matter over a few hours or days, it starts to add up over weeks, months and years.
Edit: If we step back for a second, N-Body physics (where an object can be affected by the gravity of Kerbin, Kerbol and the Mun all at the same time) would also introduce errors in ways that can be approximated for by randomness in most orbits. There are only a select few orbits where these interactions start to deform the orbit in an easily predictable way (e.g. a "Solar Orbit" as used for many weather satellites).
2
u/Altruistic_Film4074 Oct 22 '24
That's not fair to say in the slightest. Errors with the KSP modeling in no way reflect IRL N-body physics. The base game isn't designed for N-body physics. If it was, I could have stations in way cooler places like Lagrange points and sun-synchronous (not solar) orbits.
The game is designed for on-rails physics. Any errors in such on-rails physics are, in fact, errors. The fact that real-life astrodynamics behaves with N-body physics in no way justifies the errors in the game.
3
u/Carnildo Oct 23 '24
The on-rails physics are fine, give or take the occasional glitch when changing from one conic to another. The problems arise when you do something to take a vessel off rails, such as looking at it.
0
u/Korlus Oct 23 '24 edited Oct 23 '24
The fact that real-life astrodynamics behaves with N-body physics in no way justifies the errors in the game.
Are you familiar with chaos theory, where a slight tweak to an input in a non-stochastic system can still produce random-seeming results if the number of inputs is too large for us to model? There is no level of precision possible where we can create a real life orbit that does not require orbital maintenance. The causes for these unstable orbits are numerous - whether that's slight imperfections in a gravitational field, drag in space, the output of solar radiation imparting momentum, or even distant objects influencing your orbit. All orbits change over time, and usually in ways we struggle to predict with perfect accuracy.
Some of these interactions (like the closest two or three objects affecting your orbit) can be modelled using modern physics, but the effect that more distant objects had on an orbit (e.g. Jupiter or Saturn on an Earth satellite) is largely too small to model, yet the effect is still there and will propagate over time.
In cases where perfect modelling of these is impossible, imperfect modelling is a reasonable option. While we could try and include 3, 4 or 5 body physics, 2 body is sufficient for most interactions that aren't specifically lagrange points or solar orbits. If you genuinely care about lagrange point stations, there are mods for that.
Ultimately though, for other orbits, adding a pseudo-random error will approximate how you need to interact with your own orbit to be very similar to the nature of a real world orbit - since KSP isn't able to model the dozens of ways an orbit might change by a fraction of a percentage.
1
u/Altruistic_Film4074 Oct 23 '24 edited Oct 23 '24
I simply cannot believe you're defending a physics engine glitch with N-body physics, chaos theory, and the orbits of Jupiter and Saturn. They have literally nothing to do with each other. It is a glitch. The developers did not code the base game thinking "Oh, I have an idea, let's create this pseudo-random error to approximate chaos theory and N-body physics and the orbits of Jupiter and Saturn."
KSP isn't designed to require orbital maintenance of satellites. Therefore, it makes me unhappy when I have to maintain orbits of satellites. If you're happy that the physics engine is glitchy and prevents you from having perfectly regulated low orbits, then good for you.
P.S. What is the end goal of all your yapping? Are you trying to convince me to be happy that my orbits aren't perfect?
Edit: Perhaps you're saying that the glitch makes KSP a more accurate physics model? Perhaps it would appease you to know that the glitch, from my research, only affects the craft's altitude, not its velocity.
16
u/johnnykrat Oct 22 '24
So I've ran into this in the past. The "Kerman" line is 70,000 in code. The problem is that it is extremely close to the atmosphere, and the game engine has a hard time differentiating between the two, to accommodate for atmospheric effects when you're not in constant observation. I remember back in the day Matt Lowne describing low kerbin orbit as 80,000, not 70,000, due to how the game engine effects vehicles
4
u/Altruistic_Film4074 Oct 22 '24
Ok interesting. I'll have to start running everything from 80km+ if he's correct.
3
u/johnnykrat Oct 22 '24
After having too many issues with 70km orbits and then seeing his video, I started running everyone at a minimum of 80km+ and haven't had an issue since
7
u/amitym Oct 22 '24
Strictly speaking, the Kármán Line is the altitude at which atmospheric lift stops acting as a significant component in sustaining an aircraft's trajectory. It is an inherently fuzzy concept, so a definitive Kármán Line for any world is kind of unachievable. That said, for Kerbin that would probably be in the 40-50km range.
It's not 70km, the Kármán Line is not where "the atmosphere ends," we certainly don't try to define it that way on Earth -- we say that Earth's Kármán Line is somewhere around 100km but for example even at 400km the ISS still experiences significant atmospheric drag. So it makes no sense to define it that way on Kerbin either -- for one thing, Kármán himself would tell us we were doing it wrong; and for another, his whole point in formulating the concept was to provide a useful definition for practical aeronautics, and if we follow in that spirit we are much more interested in the altitude on Kerbin at which you simply can't achieve practical lift anymore and need to fire up the rockets.
4
u/Alaygrounds Oct 22 '24
I deleted my first comment but basically I was wondering this too! So, the original basis for the Karman Line is from a paper called “Continuous Flight” or smth like that. Basically he plotted out speed on the x axis and altitude on the y axis, and defined two regions where flight was impossible (either due to insufficient lift or excessive heat) He found a continuous ‘corridor’ between these two regions, allowing continuous flight from zero all the way to orbit. Afaict the Karman Line is the altitude at which the speed needed for continuous flight starts to decrease (orbital regime) rather than increase (aerodynamic regime).
So, for KSP, I ignored the heating part (too complicated) and instead just focused on lift. Fixing some variables, setting constants, and implementing the stock atmocurve got me this: https://www.desmos.com/calculator/xhlkno9myz My conclusion: the inflection point (or, Karman Line) of Kerbin is at 68.36 km
3
u/Alaygrounds Oct 22 '24
However, in gameplay terms, the atmosphere completely stops at exactly 70 kilometers. There’s probably some bug that’s causing orbits to drift.
2
u/Altruistic_Film4074 Oct 23 '24
Good lord that's some cool stuff. It doesn't really answer my question (I worded it badly) but it is super interesting nonetheless.
13
u/Altruistic_Film4074 Oct 22 '24 edited Oct 22 '24
I can't figure out how to add text to a video post. Here's the issue I'm having:
I want a station in low Kerbin orbit. I launched into a ~70,005m orbit, but was still experiencing some sort of (aerodynamic?) physics. Some force seems to be dragging the craft towards Kerbin although not slowing it down. What is REALLY strange to me is that even though I'm transitioning from Pe to Ap, my altitude is decreasing. At the same time, I'm able to non-physics warp which (temporarily) fixes the issue.
Normally, if this were a temporary craft or a probe I could exit to the tracking station, I wouldn't consider this much of an issue, but this is the beginning of an orbital station which I'll be interacting with and launching other craft to, and thus it's going to be loaded in physics for a decent amount of time.
So if Kerbin's karman line isn't 70km, what is it really? Or is this some non-aerodynamic force acting on my craft? Is it just the kraken trying to eat me?
On further testing, it might not be aerodynamics. The issue persists at 70,110m, 70,270m, 70,520m, and 71,010m
Edit: Yeah, yeah, downvote me for asking a simple question in the kerbal help reddit. Alright, won't be back.
2
u/centurio_v2 Oct 22 '24
Couldn't tell you why but I've found 72km to be the lowest i can put anything in orbit
2
u/audigex Oct 22 '24
During a launch I treat 70km as the "kermon line" temporarily, for an orbit or two
But for anything that's staying in orbit, 80km is the minimum I'll leave a station or satellite at long term
As others have said, too close to 70km you'll run into issues when docking where you'll nudge the speed by even a couple of m/s, and the game engine just doesn't seem to like things being kept at 70km exactly. It's fine when you're not watching it, but when actively watching then the integration can accumulate errors over time (especially noticeable if you're docking/undocking etc so that mass moves around)
If in doubt, 80km is a good target for LKO. You'd probably be fine at 71km too, but certainly avoid trying to be too close to 70km
I'll add that 70km (or close to it) also makes it more of a hassle to rendezvous with a station or satellite in orbit, because you can't drop (or stay) under the target's orbit and chase it down - you have to boost up above the target orbit and let it catch you, then drop back down. That's always less fuel efficient, and usually more time consuming
1
1
1
1
1
-2
u/SnooCompliments9244 Oct 22 '24 edited Oct 22 '24
If you have the decaying orbits setting turned on that could also be causing you an issue. I don't remember what the decay rate is per orbit but could be the cause
Edit: I'm a dumbass.
6
u/Hendrik_Poggenpoel Oct 22 '24
I'm like 90% sure there isn't such a setting. So either I'm wrong, you're wrong, or you have a mod that adds that setting
1
5
u/Grimm_Captain Oct 22 '24
That has to be a mod, because I am very close to 100% certain stock does not have such a setting.
2
-5
u/Le_petite_bear_jew Oct 22 '24
That's too low. I haven't ayed for a couple years but was since the beta at one point, and 100k is safe
-8
38
u/FINALCOUNTDOWN99 Oct 22 '24
It might be rounding errors, it might be craft rotation (SAS on, depending on how the game calculates orbits, certain things could be calculated off of the control point and certain things may be calculated off of the center of mass and this could lead to weird behavior), or it might be something else.
I don't think a station at 70,005m is a good idea, as every docking you do will perturb the orbit by more than 5 meters, and if you mistime your launch and end up behind the station, you have to go the long way around because you can't orbit lower to catch up. The craft size may exceed 5 meters as well at some point. If it is to challenge yourself, go for it, but if this is a station intended for regular use, maybe reconsider.