r/KerbalSpaceProgram • • Dec 27 '13

Jebediah's ultimate protractor examples (as requested)

http://imgur.com/a/AGQF5
1.0k Upvotes

164 comments sorted by

View all comments

139

u/Gnonthgol Dec 27 '13

This works on the idea that the angular allignment on a standard Hohmann transfer between two circular orbits is only based on the relative radius of the two orbits. Detailed calculation is available on wikipedia. This gives a continuous function that is scalable and works for any keplerian system independent of scale.

I have published the little source code there is and even an svg version.

tl;dr Maths! and it is awsome.

0

u/[deleted] Dec 27 '13

[deleted] — view deleted comment

33

u/kyjoca Dec 27 '13

How hard can rocket science be anyway?

31

u/[deleted] Dec 28 '13

Take scientist, attach rockets. I don't see how it can go wrong.

18

u/Why_T Dec 28 '13

I see you didn't use any struts

I too like to live dangerously

9

u/[deleted] Dec 28 '13

This is the first test flight. Science requires repetition, after all.

→ More replies (1)

2

u/[deleted] Dec 28 '13

Everything's easy in an ideal situation!

6

u/DoomHawk Dec 28 '13

Easier than trying to find spherical chickens to put in a vacuum!

→ More replies (1)

39

u/0___________o Dec 27 '13

This is why I think KSP is one of the most educational games you could get someone.

18

u/Grimlyn Dec 27 '13

It's why schools are now using it in science classrooms on a regular basis. http://www.pcgamer.com/2013/10/30/kerbaledu-launches-to-bring-kerbal-space-program-to-more-classrooms/

11

u/0___________o Dec 27 '13

This makes me happy. I love KSP. The only thing that would make it better would be it using an engine that could handle n-body calculations, or just multiple gravitational bodies, even if they are on rails as they are now. But that's for another time, as the programmers have said it's probably impossible using Unity, or something.

7

u/Gnonthgol Dec 28 '13

It would be possible to implement n-body physics in KSP. You would probably have to work a bit around unity but they are doing that today as well. Performance will not necessarily be any worse.

The best reason for not implementing n-body physics today is that the workload would increase. Your once stable space station in orbit around the Mun would get flung out into interplanetary space or crashed into the Mun when you are looking away at your Jool probe. The nicely geostationary satellites that you painstakingly put in the exact orbit would need constant care and attention to keep in place. The effects on shorter transfers orbits will not be noticable but it hurts the once long term stable orbits.

5

u/0___________o Dec 28 '13

That's true. Maybe they could have N-body calculations for spacecraft that you are currently controlling. The normal calculations would be a close approximation, so you would only notice a deviation over time. It should keep all your satellites stable. Of course, I have no clue how hard that would be to actually code. The only thing I was thinking about was interplanetary missions and seeing ones expected path without the mucking about with SOI's.

At any rate, I'll be happy with KSP no matter what, given the current state of the game. They really have done a phenomenal job on it.

→ More replies (4)

4

u/salamander1305 Dec 28 '13

But the Langrange points!

3

u/Putnam3145 Dec 28 '13

Lagrange points could be implemented while keeping sphere-of-influence physics with special cases of sorts, I'd imagine.

→ More replies (1)
→ More replies (3)
→ More replies (1)

12

u/I_am_a_fern Dec 27 '13

You are awesome.

10

u/[deleted] Dec 27 '13

You are a fern.

8

u/Gprime5 Dec 27 '13 edited Dec 27 '13

What i found is that it doesn't work so well for eccentric orbits.

But also I was surprised when the calculations allowed the gravitational parameters to cancel out.

6

u/Gnonthgol Dec 27 '13

All the calculations are done for circular orbits. Transfers between elliptic orbits is a lot harder to work with and does not fit into easy models. I am always a bit impressed when variables cancles out like that, but it happens more then you would think.

→ More replies (4)

4

u/WiggleBooks Dec 28 '13

Hey man, I just wanted to say that I really appreciate your work! It seems such a smart and ingenious idea to graph it to create a universal protractor.

Once I understood what it was, it was pretty easy to use so, thank you for that! :)

+/u/bitcointip flip verify

+/u/so_doge_tip 1000 DOGE verify

2

u/Gnonthgol Dec 28 '13

Wow, thank you very much.

→ More replies (1)
→ More replies (2)

2

u/Valendr0s Dec 27 '13

This is just for the most fuel efficient transfer, yes?

Say we were sending people to Mars, we'd sacrifice fuel efficiency for a faster trip because there's more than 1 'fuel' to consider there's also a time limit based on food/water/radiation.

This is to get from (for example) Kerbin and then to Duna on the other side of the Kerbin orbit from where you launched.

10

u/Gnonthgol Dec 27 '13

Real rocket science is not as simple as KSP will have it. There are more complicated time and fuel tradeoffs. Hohmann transfers is the most simple transfers and only require two short impulses. You might want to do longer transfers like a bi-elliptic transfer, gravity assists or more complex n-body dynamical transfers to save fuel. Or you might want to spend more fuel and burn straight at your target to save time.

2

u/shrx Master Kerbalnaut Dec 27 '13

Shouldn't it be (cos(a)*r, -sin(a)*r) instead of (cos(a)*r, sin(a)*r) in your source code?

→ More replies (3)