Hello! This Is my first post on the official SimpleRockets 2 website. I have been playing SimpleRockets for a long time, and I am a huge fan of all physics games (like SimpleRockets and SimplePlanes) !

For my first post, I want to show you the complicated equations that SimpleRockets 2 will be solving every single game frame, just to let you know where your precious little rocket currently is. This should be a small introduction to all our SimplePlanes friends, to show them a bit of our lives!

To do that we are first gonna look at the three keplerian laws of orbital motion (please read this quotes in an ancient german accent):
-The orbit of a planet is an ellipse with the Sun at one of the two foci.
-A line segment joining the planet and the Sun sweeps out equal areas during equal intervals of time.
-The square of the orbital period of the planet is proportional to the cube of the semi-major-axis of its orbit.

If you see this for the first time you're probably thinking, what the hell does that even mean? And also why would this be true? Well... obviously it's true because some old clever guy said it, so let's leave that question there.

Now I would like to break down theese rules for you:

'The orbit of a planet is an ellipse with the Sun at one of the two foci.'
The Ellipse
The shape you see here is an ellipse. The planet will be orbiting at this along this blue line. And the position of the sun is one of the two foci(F1 or F2). In this Image you can already see two of the keplerian elements. They will be relevant later:
-a, the Semi-Major-Axis
-e, the Eccentricity of the orbit
This law already tells you what the exact path of your orbit is gonna be. (SideNote: When I am talking a lot about planets orbiting the sun, but this can also be applied for rockets orbiting a planet!)

'A line segment joining the planet and the Sun sweeps out equal areas during equal intervals of time.'
The 2nd Law
This is probably the most confusing law of the three. It basically says that both A1 and A2 have the same area. Following the law this means that the time it took the planet to travel through area A1 is the same amount of time it took it to cross area A2. This law is also the reason why the planet is travelling faster when it is closer to the sun. This is especially obvious for comets.

'The square of the orbital period of the planet is proportional to the cube of the semi-major-axis of its orbit.'
This is pretty simple. Basically there is always a constant ratio between the square of the orbital period (time it takes the planet to revolve around the sun once) and the cube of the Semi-Major-Axis.

Some more important terms:
Keplerian Elements
The only important variable in this image is v, the true anomaly. All other parameters only define the orientation of the orbit in 3D - Space. The True Anomaly v is the angle from the planet to the sun and its point of closest approach to the sun(Periapsis). This is the angle we want to figure out to then get our position in space.

Eccentric Anomaly
Point F is the sun. Point C is the center of the ellipse. The red point P is our planet. The red line is our orbital path. The blue line is the auxiliary circle containing the ellipse. The next important angle is E, the Eccentric Anomaly. In this picture you can see how it is constructed.

Mean Anomaly
Like The Eccentric Anomaly but this angle increases at a constant rate. And because with keplers third law we can easily figure out the orbital period, we can easily know how much we have to increase this angle for every time interval.

Bringing it all together:

Now It's time to dive into the equations:
The Kepler Equation
We first have to calculate the Eccentric Anomaly E, with the mean Anomaly M and the orbits eccentricity e. This equation is really hard to solve, since we need E, but we can't just use algebra to get an equation just for E, but there are a few ways around it. (I might show this next time)

Now that we have E, all we need is the True Anomaly and the distance to the sun, and then we have our exact position!
For the True Anomaly there is a simple equation:
True Anomaly Equation

Now we know at which angle we are as seen from the planet at an given time. How about the distance. If we multiply the distance by the unit vector pointing in this direction we have our position.
I dont have a picture here but this is the equation:
'r = a(1-ecos(E))^2'
Where a is the Semi-Major-Axis, e the eccentricity of the orbit and E our Eccentric Anomaly.

Pretty simple right?

If you like this kind of post please let me know and I may do some more!

Tags
Off Topic

14 Comments

  • Log in to leave a comment
  • Profile image
    328 MrTaco

    So much maths... my head!😖

    +1 6.2 years ago
  • Profile image

    @MiceOnADice Just add more struts and flex tape

    6.2 years ago
  • Profile image

    Rocket science is always easy
    How?
    Add more boosters.

    +1 6.2 years ago
  • Profile image
    150 GR00G0

    @Jetspeed1001 this is true. But the center of mass of pretty much every planet is almost at the center of the planet. However sinplerockets is only dealing with 2-Body-Problems resulting in ellipses and hyperbola. Where as in reality every single object attracts every other object.

    +2 6.2 years ago
  • Profile image

    In real life an object does not technically orbit another object, but rather the center of mass. ex: every planet in our solar system "orbits the sun", technically this is not true, the sun has 99% of our solar system's mass, due to this, all the planets orbit what is almost the center of the sun. the sun orbit's the Milky Way's center of mass, and the Milky Way galaxy and the Andromeda galaxy orbit a center of mass that is not around another object, but in the emptiness of space (because they are similar in size) this point the 2 orbit is where the Milky Way and Andromeda galaxy will collide with each other in some 4 billion years. The Milky Way and Andromeda galaxy orbits larger structures too, and so on

    +2 6.2 years ago
  • Profile image
    326 ShakzDar

    I have to get back into those ! Really forgot sometings from my license lol.

    But don't worry, you'll not need all of these for SR2 as the main word is Simple :)

    +3 6.2 years ago
  • Profile image

    @GR00G0 Yay MOAR HIGH QUALITY POSTS

    6.2 years ago
  • Profile image
    150 GR00G0

    @mjdfx150529 Yeah. It was a real challenge for me to get all of this in a single understandable post that wouldn’t be as long as the bible. I did as good as I could hopefully it’s enough. Next time I might cover the newtonian physics in simplerockets.

    +3 6.2 years ago
  • Profile image
    563 MyMessage

    WOOOOOW

    @GR00G0

    +2 6.2 years ago
  • Profile image
    563 MyMessage

    Yeah same here @mjdfx150529

    6.2 years ago
  • Profile image

    Dude this is awesome (Even though it might take some time for me to understand it)

    6.2 years ago
  • Profile image
    150 GR00G0

    @Bmcclory I am using unity, altough I have done tests for terrain rendering and physics with processing. I am currently working the terrain in unity. But there are soe many things you. Need to consider, for example floating point accuracy.

    6.2 years ago
  • Profile image
    150 GR00G0

    @Bmcclory I decided not to make any more simplerockets videos but I will make SR2 videos. Probably a career mode playthrough. And if I have any interesting missions or crafts to show I will show it. Lately I have ben programming a lot and I am currently working on a little rocket simulator myself. I also thought anout making some programming videos...if people are interested.

    +2 6.2 years ago
  • Profile image
    150 GR00G0

    Also if i made any english mistakes, I am sorry, it's not my native language.

    +1 6.2 years ago

22 Upvotes

Log in in to upvote this post.