4
$\begingroup$

I am working on a little project where I want to simulate the solar system to teach myself working with python and OOP.

I want to calculate the orbits "real", from tangential velocities and gravitational accelerations. For this, in order to not only get circular orbits, but the real, eccentric orbits, I need kind of a snapshot of the solar system with positions and tangential velocities at those positions of the planets (and their moons, but I highly doubt that exists).

EDIT: I think something like the velocities at the Apoapsis should be enough to derive a reasonably right orbit from it, right?

I don't even know if something like that exists, or where to get it from. Does anybody happen to know something of this?

$\endgroup$
  • $\begingroup$ If your goal is to focus on the programing, then using high precision data from some NASA database might be severe overkill. You'll end up wasting more time to read in the snapshot than to learn what you've set out to do. Just take a bunch of ellipses with ellipticities and orientations from wikipedia and start the planets on a random angle on those orbits. $\endgroup$ – AtmosphericPrisonEscape Jan 22 '18 at 12:42
  • $\begingroup$ @AtmosphericPrisonEscape Hm, with the Peri- and Apoapsis known and the average orbital velocity, I should probably be able to calculate an initial startpoint with velocity to an acceptable accuracy. $\endgroup$ – Fl.pf. Jan 22 '18 at 12:50
  • $\begingroup$ Well, there are other things to consider. Namely the time integration method of the orbits. If you don't want to go into the theory of ordinary differential equations, then you'll probably use a solver at very low order, and then all accuracy goes down the toilet after the first time step. Think of it as a literal chain of methods you're using: The weakest accuracy determines the overall accuracy. So if you don't want to improve all the science at once, you might as well stay with everything being very simple. $\endgroup$ – AtmosphericPrisonEscape Jan 22 '18 at 12:57
  • $\begingroup$ @AtmosphericPrisonEscape Yeah I know what you mean, but the corrections to the numerical errors due to the step-size is a problem I will tackle after I know where to start from. I have no problem with working with differential equations ;) $\endgroup$ – Fl.pf. Jan 22 '18 at 13:02
  • $\begingroup$ Perhaps you are able to "dismount" or better extract the data from Cekestia free package. .. just an idea. $\endgroup$ – Alchimista Jan 22 '18 at 13:55
2
$\begingroup$

You can get a position and velocity snapshot easily using the Python package Skyfield. It downloads a JPL Development Ephemeris and then interpolates the positions for whatever time you choose for your snapshot.

You can also use JPL Horizons to produce one or thousands of positions of solar system bodies.

This answer describes how to set up Horizons to save positions to your computer, and includes a script that can read the format of the saved tables. It also happens to be a simulator that does what you are talking about - statrs with a given position and propagates the orbits.

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ Thank you very much this is exactly what I was looking for. $\endgroup$ – Fl.pf. Jan 22 '18 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.