I simulated an orbital insertion using Powered Explicit Guidance as used in the space shuttle.

The PEG algorithm works great. I hit all my targets: altitude, velocity, orbital inclination, longitude of ascending node.

But the algorithm does something I didn't expect: it causes the rocket to pitch down by >10 deg beginning maybe 30 seconds before orbital insertion (depending on altitude target, but generally a few tens of seconds).

Again, all my targets are hit. And if I try to stop the rocket from pitching down when it does, then I miss my targets. So the algorithm is clearly detecting that the rocket has to pitch down. It's doing its job, sort of.

But should the rocket be pitching down like this at orbital insertion? I thought it would be pointing at the horizon at the very end, but... no?

Just wondering if this is normal or (as I suspect) if I need to figure out what's wrong with the PEG algorithm (despite it working flawlessly otherwise, because it always always hits my targets, even when I change them mid-simulation).


  • $\begingroup$ I would have thought it’d be something about the TWR in your simulation- maybe it was too great and the downwards pitch was to counteract any vertical speed the stage still had. $\endgroup$
    – R. Hall
    Commented Mar 12, 2021 at 0:29
  • $\begingroup$ Thanks Reuben! Sorry but what do you mean by TWR? I do have a sizable vertical rate late in the launch and my first guess was that the algorithm was not properly estimating the altitude left to go—maybe because my effective gravity calculation was wrong—but everything I’ve tried to correct this has failed... the rocket might pitch down less but it still pitches down (or worse it stops working entirely)... $\endgroup$
    – user39728
    Commented Mar 12, 2021 at 0:55
  • 1
    $\begingroup$ I believe downward pitch at the end of an insertion isn't unusual -- I'll try and find real-world examples. It might indicate that the acceleration curve of the launcher isn't optimal (but that PEG is doing the best it can with what it's got) but I'm not sure. $\endgroup$ Commented Mar 12, 2021 at 0:57
  • $\begingroup$ @user39728 twr refers to thrust to weight, which relates to the acceleration curve, as mentioned by russel $\endgroup$
    – R. Hall
    Commented Mar 12, 2021 at 1:02
  • $\begingroup$ The pitch-down seems less severe if I raise my target altitude from the 225km I have now to 300 km, say... but even then, there is pitch down. Plus I can tell that at 225 km target, the rocket could well hit its targets without any pitch down. It’s just as if the algorithm is incorrectly estimating factoring in the altitude left to go or maybe the rate at which it’s getting there or both. But nothing I’ve tried to fix that has worked... $\endgroup$
    – user39728
    Commented Mar 12, 2021 at 1:04

4 Answers 4


This is a result of having low TWR on the orbital insertion stage, typically a characteristic of hydrolox. If you watch ULA streams, you'll see the DCSS & Centaur both do this as well. Basically, the problem is with such low thrust, you can't accelerate horizontally to orbital velocity fast enough; you'll fall back to earth before you get to orbit. As a result, the ascent profile is overlofted, throwing you above your target orbit & then you fall back down to it by the time you reach insertion. It's just to buy enough burn time without hitting the atmosphere again.

However, since you're curving around the earth as you go, some of that excess velocity turns into a minute orthogonal component that would make the orbit elliptical. The pitch down is to apply an opposing orthogonal component & return the orbit to circular by the time of insertion.

Yes, it's inefficient. But it's still (a very close approximation of; PEG isn't perfect) the most efficient way to get to space. It has to be inefficient because a low TWR is inefficient--the theoretical ideal for any kind of vacuum orbital maneuver are infinite TWR infinitesimal burns seperated by coasts; super low TW hydrolox is far from this ideal.

Still worth using, because the combustion efficiency gains from using hydrolox more than offset the guidance losses caused by the low thrust.

  • $\begingroup$ And note that a lower TWR means a smaller (lighter, cheaper) engine. $\endgroup$ Commented Jun 5, 2022 at 23:55
  • 1
    $\begingroup$ Note from reading the comments: this goes away when you're trying to reach a higher orbit; not only do you have more time to get there (& thus need less or no overlofting), you need less horizontal velocity to stay there. $\endgroup$ Commented Jun 6, 2022 at 4:37

This is normal. The algorithm that I wrote for MechJeb in KSP that uses Runge-Kutta and Calculus of Variations for vacuum-optimal-and-precise guidance still shows this behavior.

The problem is with high TWR rockets that have a short burntime to insertion (generally something like a Titan II or earlier rocketry). The best way that I can think of to explain the issue is that while MOST of the problem with getting to orbit is actually going horizontal very, very fast, you cannot neglect the vertical problem.

To hit a circular insertion orbit of something like 185km altitude you do need to acquire a fairly substantial vertical velocity and then lose it all pretty quickly. If you have enough burntime-to-orbit then you can rely more on gravity to do the work of slowing down your vertical velocity as you approach your insertion point. If you don't have enough time for gravity to act, though, you're going to have to do that work yourself and the rocket will point somewhat down to kill the vertical velocity it needed to gain in order to achieve the target insertion altitude.

There is no inefficiency or suboptimality in this, it is the optimal solution to the problem that you've given it, but one of the constraints you've given the optimizer is the parameters of your rocket and a single-burn-to-orbit, which constrains the burntime.

One way to fix this is what the shuttle does which is to include a coast and then a small insertion burn on OMS thrusters. That allows gravity time to act during the coast to kill the vertical velocity. But PEG cannot compute the optimal time of that coast, and you need an optimization model with aerodynamics to really solve it properly and avoid overly long coasts which either pass through the surface of the Earth or spend too much time going too fast too low which cause the rocket to burn up. But constraining the coast time to something around 600-1200 should produce reasonable results assuming your initial pitch program gets you out of the atmosphere reasonably enough.

You can't do that for e.g. a two stage Titan 2 though since the upper stage is not relightable and positioning the coast in between the two stages is very much not the optimal coast. You want to coast on a "transfer orbit" which is something like an elliptical orbit with the apoapsis at your insertion point and the periapsis something around 0km. You want to do an insertion burn of 300-1,000 m/s or so, which means you want to coast only after you've done some 8,000-ish m/s or more of work with the boosters. With a Titan 2 you get something more like 4,500 m/s out of the booster and 4,500 m/s out of the upper stage and you're not really going fast enough at stage separation. You can still use a coast there to more optimally hit some insertion targets (assuming an ahistorical Titan 2 which has some kind of attitude control added for the coast phase), but it still won't "look optimal" and will burn down at insertion.

Of course you can put a payload on the Titan 2, sufficient to make it so that the rocket only delivers around ~8,000 m/s to the payload, then separate and coast and do the insertion burn on the payload stage. Then you shouldn't see the payload stage burning down (much). Due to linear tangent steering though if your vgo is horizontal you will want to "sweep" from slightly over to slightly below horizontal.

TL;DR: The problem is [mostly] caused by needing to go up very quickly and then arrest your vertical velocity faster than gravity can help you out because of a short time-to-insertion.

  • $\begingroup$ How much of this issue comes from Kerbin's unusual features (tiny planet with a deep, thick atmosphere), and how much is inherent the launch process? $\endgroup$
    – Mark
    Commented May 23, 2023 at 21:29
  • $\begingroup$ Everything I wrote there really applies to KSP with the RO/RSS/RP-1 modset applied to it, not to stock KSP physics+planets, so I'm talking about real-scale Earth. $\endgroup$
    – lamont
    Commented May 24, 2023 at 22:56

This seems like a "SpaceX" style version of orbiting, a mirror image of how they land. Orbiting involves reaching a certain amount of tangential velocity at a certain altitude. Gravity does the rest.

Logically, one would not carry extra fuel (weight) to oppose gravity, indeed, night time lapse photography shows orbital launches as gentle "up and over" curves.

There may be a fuel savings by overshooting, then correcting, vertical velocity, perhaps by shortening burn time. It could be applied to a rocket that needs more horizontal velocity component but needs to decelerate its vertical velocity component.

It is logical, but sort of funny, the a higher orbit "remedies" pitch down, but only because orbital velocity is less and orbital radius of turn is greater! Computers are "dumb" this way.

Rather than just following the programming, one may go back 50 years, when "algorithm" meant talking through it before translating to computer language. Most rockets are "staged", with the final "push" much less than launch thrust.

Lacking air drag at altitude, a longer burn with less thrust may require less pitch correction, but may use more fuel.

  • $\begingroup$ It's an interesting point; one possible theoretical (but not very practical) powered trajectory to orbit is simply the time-reverse of a reentry; with instantaneous drag converted to instantaneous thrust. $\endgroup$
    – uhoh
    Commented Mar 12, 2021 at 10:47
  • $\begingroup$ Is that more practical when there's no atmosphere? $\endgroup$
    – Innovine
    Commented Feb 5, 2022 at 8:21
  • $\begingroup$ @Innovine in space "drag" can be created with a bit of opposite burn. $\endgroup$ Commented Feb 5, 2022 at 10:39
  • 1
    $\begingroup$ @uhoh On launch you climb above meaningful atmosphere before doing most of your horizontal burn, while re-entry wants that atmosphere and thus is lower. Also, the acceleration profiles are very different, a rocket can't efficiently match what happens in re-entry. Even on an airless body they don't match because the rocket isn't carrying the same amount of fuel. (If you had a magic zero-fuel drive and didn't mind a suicide burn the trajectories would be a perfect match.) $\endgroup$ Commented Jun 6, 2022 at 0:01

Think about just the vertical motion. The vehicle has a lot of upward velocity. What reduces that to the small or zero amount needed for orbit?

You could wait for gravity to do it, but at 10m/s^2 that’s going to take a long time.

You point the engine up to increase that downward acceleration and reduce the upward v to what the orbit requires.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.