Jump to content

What's the best way to calculate the gravity turn on an atmospheric ascent?


Recommended Posts

I've been messing about with mechjeb lately, and I've found that I can get my (rather heavy) craft into a 150km orbit with a gravity turn starting at 40km and ending at 80. Those are just semi-random values I plugged in and have had some luck with. However, I have a feeling this is because I gave myself a massive safety margin with fuel, and it's likely not the most efficient method. I've been using a slightly modified DualEva craft that I found on the forum, I've added more fuel for all stages, and a few long burn SRBs (from the KW pack) to the first stage. Takeoff weight is 495t.

I am assuming (coming from a background with very little in the way of physics or mathematics) that the optimal start/end height, as well as the shape of the turn, is dependent on a variety of factors (TWR, aerodynamics, acceleration, etc.) What formula/rule of thumb could I use to determine a more efficient gravity turn? If you need, I can try and provide you some more data about the craft in question, or I can try it on the unmodified DualEva craft, the .craft file for which is located on this forum (it also requires less addons, I believe). The entire reason I modified the craft in the first place is that I had insufficient fuel to execute a Trans-Munar Injection once I'd achieved my orbit, which led me to believe that my takeoff was inefficient.

Here are a couple of preconceptions that I have, please correct me if I am wrong:

-Higher TWR=greater acceleration.

-Lower acceleration demands a more vertical flight path (higher start for gravity burn) to minimize the amount of time spent in atmosphere.

-My current end-height for the gravity turn (80km) is not a terrible idea, as it is out of the atmosphere, and makes the trip to the apoapsis easier and drag-free.

-A steeper angle of ascent is better than a shallow one, especially for heavier craft/lower TWR.

-The highest TWR should be at launch, the further you are from the surface, the lower the effect of gravity/atmospheric resistance.

Ideally, I'd like to have a good number to plug into the ascent autopilot, as well as a usable formula to apply to future craft. This is the most stable design that I use right now (most of my other designs utilize a lot of fairings, and the later stages within them tend to torque a bit, vastly reducing efficiency, but they look way too cool to not build.) My later designs will hopefully be more stable.

Thanks in advance for your answers. I've found that this is one of the friendliest and most helpful game communities I've come across in many years.

Link to comment
Share on other sites

What I've found is that because of the quick falloff of atmospheric density, you can actually pitch over quite quickly and have a more efficient ascent, depending on your rocket; I typically start my turns at 5k, for example, and end the turn at 70k and 5 degrees above horizontal, which is typically much more efficient if you're going into an orbit above 150k. You can use the ascent stats to refine your profile; just start with the slider in the middle and run it toward one end a bit each time you launch; see what differences it makes.

Link to comment
Share on other sites

If I could piggyback on this gentleman's post, what are good ascent speeds and accelerations? Too slow and you're close to hovering and wasting fuel, but too fast and you're still wasting fuel but this time fighting air resistence. What's the happy medium? I've always gotten to orbit and moons well enough by lifting off at 1-2G on the ship's meter, but then I hear people talking about 6Gs and such, and I wonder if I'm doing it wastefully.

Link to comment
Share on other sites

This is a real can of worms. It's a system of 2 coupled differential equations, which are only numerically solvable. There's no way to find a reusable algorithm to solve for the ideal angle, each solution is going to be specific to a particular rocket.

Wikipedia has the two basic equations of motions listed on its Gravity Turn page. (I'm new here, what's the best way to write/post equations?) There's also a useful paper, "Universal Gravity Turn Trajectories," from 1957, that describes in detail how to do this, but...it's confusing. I think I'd be able to crack through the math, but that would be a project for next week.

One other thing: T:W ratio is actually lowest at launch. Both the mass of the rocket (due to losing fuel) and the gravitational acceleration drop off as altitude increases, losing to a drastic reduction in weight--thrust remains constant. It would probably be most efficient to pull back on the throttle as altitude increases, but since the fuel flow is currently bugged, this is 'cheating.' Anyway, the non-constant T:W ratio is the primary difficulty in solving the equations above.

Link to comment
Share on other sites

That's a nicely written article. It seems what we're doing in the game are not true gravity turns because the operator is changing attitude? I wonder if that could be done in the game? Leave SAS off and let the vehicle's balance do the steering? It would be quite a trick. It's also to this simulation's credit that I understand what the article is talking about from playing KSP.

Link to comment
Share on other sites

If I could piggyback on this gentleman's post, what are good ascent speeds and accelerations? Too slow and you're close to hovering and wasting fuel, but too fast and you're still wasting fuel but this time fighting air resistence. What's the happy medium? I've always gotten to orbit and moons well enough by lifting off at 1-2G on the ship's meter, but then I hear people talking about 6Gs and such, and I wonder if I'm doing it wastefully.

In an earlier post I had read, somebody had said that lifting off at 1.5 - 2.5 G's is good, higher than 2.5 and you'll reach the terminal velocity eventually.

Link to comment
Share on other sites

Does anyone know how exactly the simulation calculates drag? Calculating the optimal trajectory is a balance between the gravity turn--which should be initiated as early as possible--and the need to minimize atmospheric drag. So to do it mathematically (which I have still made 0 progress on) I need to get some idea of the drag forces in play.

The paper I mentioned earlier was a dead end, but I found something a little more promising on MIT Open Courseware. He covers the idealized case of a constant T:W ratio, which still turns out to be tremendously complicated. I guess they don't call it rocket science for nothing...

Link to comment
Share on other sites

Perhaps it is ship-dependent, but it just so happened with my test vessel that MechJeb's default settings (10km start, 70km end, 35-40% on the curve slider) wound up being most efficient. It's also wound up being most efficient for me to tell it to get in the biggest orbit possible and then just wait it out for the proper orbital injection point (eg. to go to the Mun, I do a 10km-70km default gravity turn targeting ~10Mm orbit).

Link to comment
Share on other sites

  • 9 months later...

anyone knows the formula by which KSP calculates drag? I heard it's the sum of the drag of individual parts, proportional to mass, to drag coefficient, atmosphere density which depends on h... and...? If anyone has the accurate formula I would make a calculator. I just was looking for a project for a fortran course i'm on :P maybe no the most web-friendly language but indeed the most scientific one.

Of course kerbins prefer the k++ language or kavascript.

***I mean an ascent delta-v calculator and possibly optimal trajectory finder.

Edited by dronkit
Link to comment
Share on other sites

What I've found is that because of the quick falloff of atmospheric density, you can actually pitch over quite quickly and have a more efficient ascent, depending on your rocket; I typically start my turns at 5k, for example, and end the turn at 70k and 5 degrees above horizontal, which is typically much more efficient if you're going into an orbit above 150k. You can use the ascent stats to refine your profile; just start with the slider in the middle and run it toward one end a bit each time you launch; see what differences it makes.

Yep, in my experience, this is on the money.

Small and light rockets: Up to 100Km. Start 5-8Km-End 60-65Km. Profile 34% [bONUS] If you airhog the crap out of space planes, you can run this profile off the strip after a nose up 60. Start at 3k and all you have to mind is the engine turn over.

Wide fat rockets: Up 100Km. Start 8-10Km-End 70-80Km. Profile 34% is still pretty close to accurate.

Obviously this isn't exact science on my part. It just what I have found works for typical ascent TWR of around 2.0.

Link to comment
Share on other sites

I start at 5km, end at 70km 0 degrees and use a 38% profile. You want a TWR of 1.8-2.2 on the launchpad for best results.

Use mechjeb's options to limit to terminal velocity and limit acceleration. I cap my accel at about 40m/s^2

Asparagus is your friend

Link to comment
Share on other sites

IDK if this is the case: I ran extensive (?) test with mechjeb in my hybrid SSTO which is strange, takes off vertically with jets, levels, gains speed and lifts out of the atmosphere, then circularizes, etc. The thing I found is that ascending straight up reduced my drag losses BIG TIME, like it saved 1000 m/s or so. The best was like, straight up til 15k, quick curve to 5º to gain horizontal speed until the jets give up, switch to rockets, raise apoapsis out of the atmosphere.

Link to comment
Share on other sites

IDK if this is the case: I ran extensive (?) test with mechjeb in my hybrid SSTO which is strange, takes off vertically with jets, levels, gains speed and lifts out of the atmosphere, then circularizes, etc. The thing I found is that ascending straight up reduced my drag losses BIG TIME, like it saved 1000 m/s or so. The best was like, straight up til 15k, quick curve to 5º to gain horizontal speed until the jets give up, switch to rockets, raise apoapsis out of the atmosphere.

Are you limiting to terminal velocity? Sounds like you are trying to punch a hole in dense air.

Link to comment
Share on other sites

Are you limiting to terminal velocity? Sounds like you are trying to punch a hole in dense air.

The vertical ascent was with auto-throttle, so i guess the answer is yes, mechjeb equals drag losses to gravity losses which is optimum in vertical ascent, and in my case throttles down a bit.

I suppose the results I had (vertical until 15k saves delta V) have to do with getting rid of the thicker atmosphere, yes. Maybe for a thin rocket that's different since my ship has wings and lots of things... oh wait, KSP's drag model doesn't account for overall slim shape. One point for using this approach on rockets. In the other hand, I turn sharply to almost horizontal to gain speed and in that part I rely on lift, which is free. So one point against using that approach on reockets, Rockets would have more gravity losses than a winged ship. It's a tie I guess (?)

Guys get me the drag formula and i'll give you the calculator and the ultimate answer. (obviously 42)

Link to comment
Share on other sites

I don't know how to calculate the most efficient way, but I belive there is a specific ratio between the current apoapsis, current altitude, and/or veloctiy. I'm sure you have noticed craft with a lower T/W ratio accelerate slower, so they need to make their gravity turn later and more gradualy so they still increace the apoapsis. So it varies craft to craft. You or I could probobly do some google/wiki research to figure it out, I'll get back to you.

Link to comment
Share on other sites

I do this for every rocket independed of weight:

-Throttle up and keep your rocket close to escape velocity (150 m/s)

-At 5 Km turn 22.5 degrees.

-At 10Km turn the remaining 22.5 degrees then throttle up.

-Once you leave Kerbin's atmosphere, turn and face prograde.

Link to comment
Share on other sites

There is no one right gravity turn. Each rocket has unique properties which change optimal ascent, and KSP's physics vary significantly from reality: drag is applied to all parts individually -- nosecones do nothing but increase drag and add weight, and fat, wide rockets have no drawbacks. I've also noticed my prograde marker jumping when reaching successive layers of the atmosphere, there is no continuous integration you can use for the ascent profile.

The heuristic I use is to start a gradual, constant curve towards the horizon, which starts a few kilometers up, (mechjeb ascent profile: start at 2-5km, with 70%+ curve at least) max throttle until you hit terminal velocity, at which point you want to control throttle to match the terminal velocity at your altitude.

Link to comment
Share on other sites

  • 7 months later...
I've also noticed my prograde marker jumping when reaching successive layers of the atmosphere, there is no continuous integration you can use for the ascent profile.

It's because it shifts automatically from the surface reference to the orbital reference, adding a vector facing east and 0 deg elevation that is Kerbin's rotational velocity at the equator, causing the "jump"

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...