I've written a quick and dirty n-body simulator, but currently it requires initial positions and velocities. I've been looking for a way to convert Keplerian orbital elements to positions and velocities. I've searched the web, but I only seem to get conversion from orbital elements to positions and velocities in ECI coordinates, or to a system that orbits the Earth. Ideally, I am hoping that there is an easy conversion between orbital elements and position and velocities for an observer on Earth looking at this n-body system somewhere out in space. I'd appreciate any help in determining this conversion.

  • $\begingroup$ Did you read the euler angle part in en.wikipedia.org/wiki/Orbital_elements ? $\endgroup$
    – Gerald
    Commented Mar 2, 2014 at 13:44
  • $\begingroup$ Sounds to me that you have a 3D n-body model and you want to project images of objects in that model onto the 2D screen of a remote observer. That would be a computer graphics type problem. $\endgroup$
    – steveOw
    Commented Oct 26, 2014 at 11:33

2 Answers 2


Is this what you're looking for? When you say you want something defined for an observer on the earth looking at the system, do you mean you wish to set the origin of the system at the earth? This can be done, but I don't really see why you would do it unless the earth was intrinsic to the system.

  • $\begingroup$ Thanks! This is close. This will get me the position and velocity in the orbital plane, but then I need them in the plane of the sky. That's what I mean by "for an observer on Earth". I do not want the coordinate system centered on the observer. I need a coordinate system where some axis is pointing directly at the observer, with the center generally at the barycenter. $\endgroup$
    – ionick
    Commented Mar 3, 2014 at 17:48
  • $\begingroup$ Is [this]( en.m.wikipedia.org/wiki/Barycentric_coordinate_system) what you're looking for? See converting to Barycentric coordinates. I still don't really understand why, could you elaborate? What is the system modelling? $\endgroup$ Commented Mar 3, 2014 at 18:03

I wrote a similar N-body orbital program a few years ago. To obtain the initial velocities and positions for Solar System bodies I used a free program called PLANEPH. Download available at:- ftp://cdsarc.u-strasbg.fr/pub/cats/VI/87/

It can give you 3D xyz position and velocity of solar system bodies at a particular point in time with resolution of a few seconds of time as I remember.

The user interface is a bit old-fashioned (DOS-style) but it seems to work OK. I ran it on Windows 2000.

I used PLANEPH to extract Heliocentric Coordinates then I had to convert to Solar System Barycentre frame using data on planetary masses obtainable elsewhere (e.g. NASA).


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .