Planetary Orbital Mechanics (Demo.html)

Well these tabs are still open in the browser, so I might as well organize and prepare this information for implementation as part of demo.html. The basic idea here is that celestial bodies, whether large or small, have kinetic trajectories determined by the Kepler equation and another mode is used for when a significant perturbation occurs.

For objects which are very small in mass compared to the source of the centrally acting gravity field, we can simply treat the large body as the cause effecting the much smaller body.

[1]: answered Jun 20, 2022 at 13:57

Spektre's user avatar

Spektre

“A time function is possible only if you use Kepler’s equation instead of a gravity simulation…

That is doable only if you have stable orbits and note it’s just approximation of the true trajectory.

See related:

You can do a hybrid approach where you use Kepler for stable orbits and once interaction is triggered (by close proximity of objects) you convert back to the gravity model, compute the interaction result and convert back to Kepler (I assume that is how KSP is doing it).

So you should have a list of Keplerian trajectories with their time duration for each body and then just use the correct one for queried time…

So when putting it all together, I would:

  1. compute initial Kepler trajectories so compute points on a single orbit and obtain orbital parameters from it
  2. compute close encountersso times when bodies are near each other (similar to intersection of ellipses) see similar (but easier) problem:Also this might greatly help with elliptic encounters computations:
  3. for each encounter recompute the gravity model and create a new Kepler trajectoryAdd it to list of body trajectories that will be valid after time of encounter…
  4. If any encounter up to some time limit found, go to #2

Now if you want to know where the body is at time t, just look to its list of Keplerian trajectories, use the one that has its valid time >= t while valid time is also smallest and just compute your position, speed or whatever you need…”

Alright then, well let’s find out what Kepler trajectories are and how to build them.

[2]:

Any Keplerian trajectory can be defined by six parameters. The motion of an object moving in three-dimensional space is characterized by a position vector and a velocity vector. Each vector has three components, so the total number of values needed to define a trajectory through space is six.


References:

  1. https://stackoverflow.com/questions/72686481/planet-position-by-time – Stack exchange “Planet position by time”
  2. https://en.wikipedia.org/wiki/Kepler_orbit#:~:text=Any%20Keplerian%20trajectory%20can%20be,trajectory%20through%20space%20is%20six. – Wikipedia article on Kepler orbit
  3. https://ket.pbslearningmedia.org/resource/npls12.sci.ess.eiu.keplerorbits/solar-system-dynamics-orbits-and-keplers-laws-nasa-planetary-sciences/ – PBS video on Kepler

Leave a Reply

Your email address will not be published. Required fields are marked *