<p>You can get a position and velocity snapshot easily using the Python package <a href="http://rhodesmill.org/skyfield/" rel="nofollow noreferrer">Skyfield</a>. It downloads a JPL <a href="https://en.wikipedia.org/wiki/Jet_Propulsion_Laboratory_Development_Ephemeris" rel="nofollow noreferrer">Development Ephemeris</a> and then interpolates the positions for whatever time you choose for your snapshot.</p>

<p>You can also use <a href="https://ssd.jpl.nasa.gov/horizons.cgi" rel="nofollow noreferrer">JPL Horizons</a> to produce one or thousands of positions of solar system bodies.</p>

<p><a href="https://space.stackexchange.com/a/23409/12102">This answer</a> 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. </p>

CC BY-SA 3.0
2018-01-22T17:12:12.883Z
Thank you very much this is exactly what I was looking for.
Fl.pf.
CC BY-SA 3.0
2018-01-22T16:14:27.550Z
2018-01-22T20:41:19.797Z
2018-01-22T20:41:19.797Z
uhoh
<p>I am working on a little project where I want to simulate the solar system to teach myself working with python and OOP.</p>

<p>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). </p>

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

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

CC BY-SA 3.0
2018-01-22T12:42:09.920Z
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.
AtmosphericPrisonEscape
CC BY-SA 3.0
2018-01-22T12:50:56.120Z
@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.
Fl.pf.
CC BY-SA 3.0
2018-01-22T12:57:11.307Z
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.
AtmosphericPrisonEscape
CC BY-SA 3.0
2018-01-22T13:02:13.087Z
@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 ;)
Fl.pf.
CC BY-SA 3.0
2018-01-22T13:55:55.597Z
Perhaps you are able to "dismount" or better extract the data  from Cekestia free package. .. just an idea.
Alchimista
CC BY-SA 3.0
2018-01-22T14:26:10.670Z
@barrycarter Thanks, I will look into that.
Fl.pf.
CC BY-SA 3.0
2018-01-22T14:27:29.623Z
@Alchimista Do you mean Celestia? I could dive into the source code there, you are right, thanks!
Fl.pf.
<orbital-mechanics><eccentric-orbit>
snapshot of solar system
Fl.pf.
# snapshot of solar system

(Asked by: username_0 on 2018-01-22)

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?

**Tags:** orbital-mechanics, eccentric-orbit

> **Comments:**
> **username_1**: 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.  
> **username_0**: @username_1 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.  
> **username_1**: 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.  
> **username_0**: @username_1 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 ;)  
> **username_2**: Perhaps you are able to "dismount" or better extract the data  from Cekestia free package. .. just an idea.  
> **username_0**: @barrycarter Thanks, I will look into that.  
> **username_0**: @username_2 Do you mean Celestia? I could dive into the source code there, you are right, thanks!  

---

## 1 answers

### Answer by username_3 on 2018-01-22. Score: 2 | Accepted answer

You can get a position and velocity snapshot easily using the Python package [Skyfield](http://rhodesmill.org/skyfield/). It downloads a JPL [Development Ephemeris](https://en.wikipedia.org/wiki/Jet_Propulsion_Laboratory_Development_Ephemeris) and then interpolates the positions for whatever time you choose for your snapshot.

You can also use [JPL Horizons](https://ssd.jpl.nasa.gov/horizons.cgi) to produce one or thousands of positions of solar system bodies.

[This answer](https://space.stackexchange.com/a/23409/12102) 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.

> **Comments:**
> **username_0**: Thank you very much this is exactly what I was looking for.  

---

