# How to calculate a planet's current position within the solar system

I'm making an application that needs to calculate a planet's current position within the solar system - I don't want to calculate its position in the sky.

For example, what I want to do is exactly what this website does:

http://www.theplanetstoday.com/

I want to create an overhead view of all the planet's positions in the solar system.

Where do I start? Is there a latitude/longitude coordinate system for the solar system? Everything I've found seems to calculate a planet's position in the sky from the observer's point on earth.

• As the page you mention itself notes, ssd.jpl.nasa.gov/horizons.cgi (HORIZONS) has all the data you need. If you want to make your own computations, NASA publishes formulas that describe planets' positions to within a few hundred meters.
– user21
Commented Jul 13, 2015 at 13:51
• Thanks barry, this is exactly what I needed. By using the vector ephemeris type HORIZONS calculates the x, y, and z coordinates of planetary bodies relative to the sun. If I need to dig deeper into it I'll use Gerard's answer, but for now this should do. Commented Jul 14, 2015 at 2:28

Buy Astronomical Algorithms 2nd ed. by Jean Meeus. It is published by Willmann-Bell Inc. If you buy it direct from the publisher, you will get a corrected printing with all errata up to August 10, 2009. There are a number of systems for describing the location of a planet. This book provides a method to find the heliocentric longitude, latitude, and distance from the Sun. It also explains the different coordinate systems and how to transform from one to another.

The method you use depends on how accurate you need to be. If you state your needed accuracy some of us might be able to suggest other alternatives.

• Can you describe the relevant information? Commented Jul 12, 2015 at 15:35
• The book has 58 pages of coefficients, and an explanation of how to combine the coefficients to find the positions. There are other sources that are shorter but less accurate, or (much) longer but less accurate. Commented Jul 13, 2015 at 16:58

(DISCLAIMER) I am not an expert on this subject, and I only hope that my answer will attract better, and more complete ones.

The Meeus book that @Gerard Ashton mentioned is a great resource for amateurs, but I am worried whether it is accurate enough for, let's say, eclipse or transit predictions. Also I glanced at the site linked in the question and saw something like "A live view of Plutonian system". To be honest I don't think that the Meeus book can enable you to do that kind of thing.

As far as I know, serious calculations of planetary positions are done today with the help of dynamical ephemerides developed and maintained by specialized agencies, such as VSOP87 by the Bureau des Longitudes in France, and DE431 by Jet propulsion laboratory of NASA. The NASA Horizons system is an online interface from which you can get the planets' positions. (It's powered by some version of the DE ephemeris, I think.) It is well documented, so feel free to check out their documentation if you want to have a go.

• Meeus used a truncated version of VSOP87... Explanation on its usage is here: caglow.com/info/compute/vsop87 ... Also, there is a source code generator for it (C/C++, Java, PHP, Basic, VB.Net) : neoprogrammics.com/vsop87/source_code_generator_tool Current version is VSOP2013... Personally I am using VSOP2000 because it is the only one has the moon positions... Commented Dec 9, 2016 at 22:36