5

I'm trying to write a launch into orbit program.

I could use wait until periapsis > x, but this seems inaccurate, because I can't start the burn at the exactly right time, because I don't know how much to burn.

How do I calculate necessary Delta-V for circularization burn?

6

So the only way to do this without just measuring the periapsis is with lots and lots of math. Luckily, Newton told us everything we need to know (at least for KSP), and Kepler helped out a bit too.

But first, a note on how MechJeb handles circularizing an orbit. Or at least used to handle it in version 1.x, since I think it changed after integrating with maneuver nodes. When performing an automated ascent, MechJeb would wait until the apoapsis, and then fire the engine(s) in such a way as to maintain a vertical velocity of 0m/s. Given sufficient thrust (more than 1g local), the ship could "drag" the apoapsis along with it while also raising the periapsis. All MechJeb had to do was maintain a vertical speed of 0m/s until the difference between the apoapsis and periapsis was a few metres. Other than the slightly less than efficient burn pattern, this is how it's done in practice.

But since you don't want to do it the easy way (really, the method described above is the easy way), the first thing you need to know is F=ma. That one equation governs everything in KSP. In english, the force acting on a body is equal to the mass of the body multiplied by the acceleration the body is under. But this equation is only the starting point, and actually isn't all that useful to us right now. More useful is a secondary form F=mvv/r, which relates the velocity to the radius of the orbit (as measured from the centre of the planet, not the surface, as is commonly displayed). However, we still have that pesky mass term in there, but if we forget about the force acting on the object, then we can relate the first equation to the second:
ar=vv
Now all we have to worry about is the acceleration, but we can calculate that, thanks to Newton's law of gravitation. First is the equation:
F=Gm1m2/rr
But we don't need to know all that, and can simplify it significantly:
arr=mu
Where μ is constant for each planetary body. We already know that a is 9.81m/s at the surface of Kerbin, and that the radius is 600km, so μ must equal 3.5316×1012 m3/s2, which is exactly what we find in the wiki. First sanity check complete.

Now, given a target altitude, we merely need to work backwards in order to determine the desired orbital velocity. As an example, we'll work through a 100km orbit. First, determine the acceleration due to gravity at 100km:
a=7.2
7.2m/s2 seems low, but we'll go with it. With that, we can calculate the velocity:
orbital velocity calc
2.25km/s closely agrees with what I've seen in game, so second sanity check complete.

Now this won't tell you how much delta-V you'll need to circularize from a sub-orbital trajectory, but it will give you a lower bound at any point in the ascent simply by subtracting the current velocity from the orbital velocity. You'll know the true value required is something larger than this calculated value.

However, this is all basically for nought. These calculations all assume perfectly circular orbits, which is never the case. If you just base your burns off of orbital velocity, your eccentricity could be wildly off, causing your spacecraft to plunge back into the atmosphere. You're better off using something similar to the approach MechJeb used in the older version.

2
  • 2
    How was this accepted as the answer??? This didn't answer the question at all!!... it was "blah blah bunch of math that won't tell you how much delta-v you need to circularize, so just use MechJeb"... The question was "How do I calculate necessary Delta-V for circularization burn?" and in the answer, he said "Now this won't tell you how much delta-V you'll need to circularize..." So, he didn't answer it! – Delorean Dec 5 '13 at 13:18
  • 2
    @XToro The point of the answer is that while you can calculate the necessary delta-V required, there's really no point since it gains you nothing, and could actually cost you by not producing the desired orbit. If you want, I do know of a way to improve the calculation and can put that in, but it's not going to add much to what's already there. – MBraedley Dec 5 '13 at 13:35
3

MechJeb's method (thrusting above prograde at apoapsis at the angle necessary to maintain a zero vertical velocity) is completely pragmatic. I wholeheartedly suggest that method. It is easy to implement in code, easy to execute manually, and, usually, only slightly inefficient.

However, for anyone who actually does want to calculate the delta-v required to circularize, all you need is the equation for precise orbital speed:

orbital speed

μ is the standard gravitational parameter for the planet (for Kerbin, μ equals 3.5316×1012 m3/s2; you can find values for the other bodies on the wiki).

r is the distance from the center of the planet to the orbiting vessel at that point in the orbit (i.e. the vessel's altitude plus the radius of the planet).

a is the semi-major axis of the orbit (the average of the apoapsis and periapsis altitudes, plus the radius of the planet).

To determine the delta-v needed to circularize, just calculate the orbital speed in two cases:

  1. When you reach apoapsis in your current orbit.
  2. For a vessel in a circular orbit at that same altitude.

Subtract the first one from the second one, and that's how much delta-v you need to apply at apoapsis.

Example 1.
You are in orbit around Kerbin with a periapsis of 75km and an apoapsis of 100km.
You want to circularize at 100km.

Your current orbit:

  • μ = 3.5316×1012 m3/s2
  • r = altitude (100000) + Kerbin's radius (600000) = 700000
  • a = the average of 75000 and 100000, plus 600000 = 687500
  • Your velocity at apoapsis = SQRT(μ * (2/r - 1/a) ) = 2225.62643 m/s

Your target orbit:

  • μ = 3.5316×1012 m3/s2
  • r = 700000
  • a = 700000
  • Velocity of a 100km circular orbit = SQRT(μ * (2/r - 1/a) ) = 2246.13955 m/s

The delta-v needed to circularize = 2246.13955 - 2225.62643 = 20.51312 m/s

Note that this method works even if your periapsis altitude is negative.

Example 2.
You are ascending from the surface of Kerbin.
You have an apoapsis of 75km and a periapsis of -250km.
You want to circularize at 75km.

Find your velocity at apoapsis:

  • μ = 3.5316×1012 m3/s2
  • r = 675000
  • a = 512500
  • SQRT(μ * (2/r - 1/a) ) = 1890.25744m/s

Find the velocity of a circular orbit at 75km altitude:

  • μ = 3.5316×1012 m3/s2
  • r = 675000
  • a = 675000
  • SQRT(μ * (2/r - 1/a) ) = 2287.35655 m/s

The delta-v needed to circularize = 2287.35655 - 1890.25744 = 397.0991 m/s

Of course, if you are still in the atmosphere, you will lose some velocity to drag before you reach your apoapsis. This will lower your apoapsis and periapsis, which means you will need to spend some additional delta-v to restore your apoapsis to 75km. If, after you do that, your periapsis is still lower than -250km, you will need a bit more delta-v than this calculation shows.
To be certain of the exact delta-v, wait until you reach 70km altitude before making the calculations.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.