Jump to content

Seeking help understanding the maths required to actually launch ships


Recommended Posts

So after deciding to get back into KSP I realised I was terrible at it and hadn't mysteriously improved after leaving it alone for so long, instead of just running away though I decided I would actually try to accomplish things in the game as It's rather addicting! Now the issue is I figured I'd try to learn how to actually calculate some of the maths needed rather than just trial and error on my poor kerbals but I'm struggling to make heads or tails of it, probably because I was never that good at maths in school but I dont want to use cheat sheets or mods to do the calculations for me.

Now anyone reading this might have figured why I'm hitting this brick wall then.

This is why I was hoping someone would take the time to walk me through the maths so I could get the most enjoyment (for me and the way I like to play games) from KSP. I have been following the Advanced rocketry on the wiki as well as doing large amounts of googling but still I'm struggling. So far I can calculate the Delta V of the specific stages of my ship, as well as the TWR. What I'm struggling with is calculating the Delta v needed to perform maneuvers, for instance working out the Delta v required to take off from the mun and going round it in an orbit of 20km above the surface, or the Delta v needed to change to a polar orbit.

What I'm hoping someone will do is explain how to make the calculations to actually know the Delta v needed to perform the moves as well as clearly explain to an idiot if you feel like now is the time for you to do some charity work for another KSP player =P Any help appreciated apart from using the delta v maps! Seen them trying to avoid them =P

Edited by SoulShaper2
Link to comment
Share on other sites

I have found the Vis-Viva equation immensely useful for manually calculating orbit size changes:

99141ee42424be2c2c2f9c3491ae67d5.png

For a Hohmann transfer, calculate the vessel's speed in the initial orbit then at Pe in the transfer orbit, subtracting gives the first burn delta-V. Calculate speed at Ap in the transfer orbit then speed in the final orbit, subtracting these gives the second burn delta-V. (For an outward Hohmann, for an inward one switch Ap and Pe.)

Link to comment
Share on other sites

Most players don't bother working out the delta-V for manoeuvres themselves. For orbital changes the game's manoeuvre node system gives that to us. For landings, takeoffs, and travel to other planets or moons we use "delta-V maps", there are lots available.

Link to comment
Share on other sites

So unfortunately what you're asking isnt particularly easy to calculate by hand. You know that old expression "Well, at least its not rocket science"? Well, this IS rocket science.

I admittedly am not a rocket scientist, but am pretty good at math and physics, so i'll give you a list of steps you would need to do to get a pretty decent approximation. Im not sure if this is the "right" way to do it, but this is what I would do, and if anyone believes this is incorrect please say so. I'll tell you what equations you need to use and you can google them.

For launching:

1) Figure out how much delta V you have. Use the Rocket equation for this. You will need to repeat for each stage.

2) Figure out how much horizontal delta V you need. Balance the force of gravity at a particular radius with centripetal force at that radius and solve for velocity. Make sure you account for the fact that the planet may be spinning (IIRC Kerbin spins at something like 200 m/s - this will reduce delta V needed for an equatorial orbit)

3) Figure out how much vertical delta V you need. This is tricky. Use gravitational potential energy to find out how much energy you need to get to a particular altitude. Convert this energy into kinetic energy to find out how much velocity you need. Use impulse-momentum theorem to determine actual delta V, corrected for gravity losses and based on TWR ratio. You will need to integrate this since mass is constantly changing on your ascent. Note that if atmosphere is present thrust also changes as a function of altitude. Note this disregards air resistance, so this would be more valid for ascents that dont approach terminal velocity. If you could figure out an approximate drag curve integrate it to get total drag and use this in the impulse momentum equation to get a better delta v estimate.

4) Combine vertical and horizontal delta V. Depending on ascent profile i think total delta v needed will be between (Vx + Vy) and sqrt (Vx^2 + Vy^2), though id imagine closer to (Vx + Vy). If you dont account for air resistance delta V will be more.

Change orbits (no plane change)

1) Figure out energy for initial and final orbit, and then change in energy (google energy in an elliptical orbit). This is change in potential energy.

2) Convert this change in potential energy to a change in kinetic energy. Note that delta V required for a certain change in kinetic energy depends on your current velocity - this is why it is more efficient to change orbits at certain points (most notably the periapsis (highest velocity) and apogee (lowest velocity))

Change Planes

1) Use trigonometry to find the change in velocity in the X direction and the Y direction (you can assume the X direction is in the same plane as your current orbit, and the Y direction is perpendicular to it). This will be based on your current velocity. Call these Vx and Vy

2) delta V is between (Vx + Vy) and sqrt (Vx^2 + Vy^2)

TL;DR manual calculations for plane changes and orbit changes are pretty easy, though the game provides these delta V values via maneuver nodes. Calculating a launch on a planet with no atmosphere is hard but doable (requires calculus). Calculating a launch on a planet with atmosphere is very hard, and you would be better off using a cheat sheet for that.

Edited by jkool702
Link to comment
Share on other sites

I started putting together a spreadsheet to do this here - https://docs.google.com/spreadsheets/d/1WaJEZKcyvqzXa0oAx1tEmOYDgXKqiiwEDDSF4xuW-3k/edit?usp=sharing

This should also show you the maths you need.

However, the launch / landing values should be taken with a pinch of salt (should get you within 10%) -- there's a big approximation there (as the above poster mentions, it really needs calculus to do properly).

Link to comment
Share on other sites

Okay trying to start basic, I'm trying to calculate the velocity of Ap at a 100km above Kerbin, I'm getting the number 2238.0453ms. The velocity of the Pe with an orbit of 90km is according to my numbers, 2270.486. This could all be terribly wrong but I am trying! =P

So then I need to for a contract achieve an orbit with Ap of 498km and Pe of 494km. So then I'm getting an Apv of 1575.5796ms and then one the Pe is achieved a velocity of 2507.2267ms. I'm struggling working out the Delta v however. Which numbers would I subtract from which to achieve the Delta V? Sorry I'm not a maths guy at heart this is the only things thats sparked an interest in it and now I'm really trying =P

Meant to be a reply to Red Iron Crown, Sorry. But also thanks everyone else for the suggestions! Bigcalm that spreadsheet looks great =) I'm slowly working through the replies suggestions!

Edited by SoulShaper2
Link to comment
Share on other sites

SoulShaper,

I can help you with this.

For an orbit of 90x100 km, your numbers are accurate. 2,238 m/sec at apoapsis and 2,270 at periapsis.

Transferring from the periapsis of the original to the apoapsis of the new orbit (oberth effect) also matches your numbers. I get 2507 and 1575.

Now... going from your transfer orbit to resetting your periapsis, your velocity at apoapsis will be 1791 m/sec.

So how you figure DV is by *literally* figuring the "delta vee" (change in velocity) and tallying it up.

Burn #1 You started at 2,270 m/sec and you ended at 2,507 m/sec. You therefore changed your velocity 237 m/sec.

Burn #2 You started at 1575 and ended at 1791. Your change in velocity is 216 m/sec.

The total DV of both maneuvers is 453 m/sec.

Shortcut:

Notice that the difference between velocities of the semi major axes of both orbits works out to almost exactly the same number?

in a 95x95 orbit, your velocity is 2254 m/sec.

in a 496x496 orbit, your velocity is 1795 m/sec.

The difference between them is 459 m/sec. I often use this shortcut when I'm feeling lazy.

This figure will always err to the cautious side. The reason you snuck 6 m/sec in on it is because you took advantage of the oberth effect in your burn.

Best,

-Slashy

Edited by GoSlash27
Link to comment
Share on other sites

Hey Slash, thanks so much for the response, I'm not trying to call you out on your maths as god knows I'm at the bottom of the pecking order when it comes to the numbers I'm just asking as I was leaning slightly differently with the Delta v and needed to clear it up in my own head =)

I would have though burn #1 would have been from Pe 2,270 to Ap, 1,575 as thats where your increasing to, with burn #2 going from the Ap of 1,575 to Pe 2,507 which gives me a total Delta v of 1627. I'm not saying your wrong It's just thats what I was thinking and Need to clear it up as to why thats wrong in my own head =)

Link to comment
Share on other sites

^ What mhoram said.

The changes in velocity occur at the points of the burns. I can't explain it any better in text than he has with a picture, but I'm happy to help if you need more clarification.

As an aside, you don't have to worry about me taking personal offense at your questioning things. I understand that you're trying to grasp a weird concept and besides... I could easily be mistaken in any post. :D

Best,

-Slashy

Link to comment
Share on other sites

Wow thank you so much!! That has really helped clear things up. I wasnt expecting a handy little drawing either xD Thanks again. I'll marked as answered! But if I have any other issues I'll post here and hope for the best! Now back to the tutorials =P

Link to comment
Share on other sites

Okay adding onto that (sorry I'm just double checking) I then need to do a plane change of 80 degrees. Now since I dont want to change my geometry I'm doing Dv^2 = 2v^2(1-cos(80)) With velocity being the Ap speed of 1575, giving me a Dv of 2025. Is this even vaguely correct? If so I might actually be able to get this dang thing into orbit.

Link to comment
Share on other sites

If you do an in-place inclination change, then yes your calculation is correct. But keep in mind that's just for this particular method. There exists other methods that costs less or a lot less dV to achieve inclined orbit, depending on the situation.

Link to comment
Share on other sites

The formula looks right. And the magnitude fits also.

Plane changes of that magnitude can be done more efficiently by

1) rising the apoapsis near the SOI

2) plane change at apoapsis

3) reducing apoapsis

This procedure takes however much more time.

Here you can find more details:

http://forum.kerbalspaceprogram.com/threads/69036

Link to comment
Share on other sites

Okay adding onto that ... I then need to do a plane change of 80 degrees ...

The huge question would be ... why not launch into the polar orbit in the first place?

Granted this is a mathematical exercise - for which, congratulations so far - but remember the mission objective (as my old Sergeant Major used to say, "There's no extra points for doing it the hard way").

Link to comment
Share on other sites

SoulShaper,

Apologies, I didn't check your math. I trust the others who have responded implicitly and I'm confident their answers are correct.

There is no earthly (kerbinly?) reason why you should ever launch into an orbit with an 80° inclination error. Inclination errors are expensive to fix at orbital velocity. Much better to launch into the orbital plane to start with (as Pecan said). 60° inclination error costs your entire orbital velocity if you fix it in orbit, but if you launch that way, it's free.

Best,

-Slashy

Link to comment
Share on other sites

Plane-changes in low-ish orbits are so expensive compared to other manoeuvres that's it worth saying you should try to avoid them whenever possible. Transfering from equatorial Kerbin LKO, say, to a Mun polar orbit don't establish an equatorial Mun orbit then plane-change. Instead, a tiny (anti)normal component of less than 1m/s in your transfer burn will be enough to go directly to a polar fly-by, at which you circularise directly into the required polar orbit. At worst transfer with anything that gets you an encounter, then establish the periapsis and inclination you want right out on the edge of the target planet/moon's SOI, as soon as you enter it - usually needing a burn of <10m/s (obviously depending on how far out your original transfer burn was in the first place).

All that said, of course, there are still times when you do need to plane-change in low orbit (such as landing somewhere far from a space-station's pre-existing orbit) so again I applaud your efforts to understand the maths behind it all :-)

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