Jump to content

Does any one have the Excel muscle to make a Kerbol system orrery?


CommandantAce

Recommended Posts

How hard would it be to make the Kerbal Solar System in Universe Sandbox? I'm going to attempt it.

Easy, if a little tedious. Just copy in the orbital characteristics from the wiki with all the values unlocked (mostly because Kerbol isn't actually possible).

However, once you run the simulation it will very slowly fall apart; Universe Sandbox does not follow KSP's limited 2-body physics model. I think Tylo breaks things pretty spectacularly. The 7 planets should work fine though.

Link to comment
Share on other sites

Just so people know, the Kepler Problem refers to the restricted two body problem, which is the basis for all of the game's orbital mechanics. The primary body is the sole source of gravity that is considered when computing trajectories of any secondary or ship. With this simplification, there is a known solution to the trajectory. The solution is not in fully explicit form however, because of Kepler's Equation, which relates time to a body's position along the orbit. That equation is transcendental and must be solved iteratively. Luckily, it (in practice) almost always converges very quickly using a standard approach and a standard initial guess.

That iterative procedure is not necessarily impossible to do in Excel, but it does immediately mean that you're into the area of math where you ought to be using something better than Excel. Anything written in simple Matlab should be easy to make work in Octave, which is open-source. Ideally, you should be using a compiled language for this because of the indeterminate end conditions on the loops required when using a converging process, but they are often too tedious for anyone to sit down and do the coding. If I'm not mistaken, Julia is a new thing which is supposed to be like compiled Matlab, and may be ideal for this.

Link to comment
Share on other sites

... start Matlab, press play button... You said you didn't care if it was in Matlab, it's exactly what you asked for...

What exactly does "on rails" mean? I think a lot of people say that and don't really understand what it means. I interpret it to mean that KSP is not an N-body problem simulator. That is, the orbits the objects in the KSP system are not affected by the other bodies in the system (other than their parent object) but they still follow Keplers Laws.

You could simplify this by figuring out a single orbit (using the soln to Keplers problem) and simply have the animation follow that path with a given Orbital period. I guess that's how you could do it in Excel. But, that's just more work for me to give a less robust solution.

I have to admit I knew nothing of matlab when I responded. I assumed something else all together. Space Academy does not have matlab. I figure excel to be fairly ubiquitous so as anyone can use the orrery. Thanks for trying. Could you post a screenshot of it in action? I am interested to see how it looks.

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