Note: This viewer is for educational use only. Please read the "About/Help" section for more info.

Provide your students the opportunity to discover for themselves the wandering stars. Create a custom solar system and allow your students the chance to interrogate the heavens (SAMPLE). Will they postulate a heliocentric universe or discover the law of ellipses? By working with hypothetical solar system data, you can guarantee that students don't take the expedient route to "finishing" their assignments.

Adapt the planet viewer to teach any of a number of topics in observational astronomy.


If you've been assigned to observe your own private solar system, just type in the login given to you by your instructor, and click "login."


Place today's sky on your webpage. Link here with one of these dynamic astronomy banners. Banner coding and instructions.

How to Calculate the Positions of the Planets: An Overview

This brief explanation describes the methods used in the simulation above to determine the Right Ascension (RA) and Declination (Dec) of the Sun, Mercury, Venus, Mars, Jupiter, and Saturn. It assumes some background in astronomy. However, there is a reasonably verbose glossary linked to what may be unfamiliar terms. In truth, this explanation is more for those wishing to know exactly what assumptions underlie the above simulation. However, this explanation does serve as a good case study in how to determine the planets' positions.

The simulation overlays the RA and Dec of the five planets visible to the naked eye and the sun atop an cylindrical projection of the Earth's sky. The name planet roughly translates to "wanderer." Knowing the geocentric model held for so long, many of my students simply assume the planets move about the sky in much the same manner as the moon or sun--steadily creeping eastward. They do not, and I developed this simulation to illustrate their true wandering nature.

Solving Kepler's Equation & Calculating Ephemerides

When first approaching this problem, I knew that I would need to solve Kepler's Equation and have a little fun with reference frames. I was surprised by the explanations available on the web. Most of them fell short of what I was looking for. They were either strictly qualitative or, if quantitative, unnecessarily opaque. This resulted mostly from having too few or poorly executed diagrams and illustrations. There were a few notable exceptions, and I have cited them in the references section. As I never formally studied celestial mechanics, these sources were my teachers and greatly helped acquaint me with the problem and its solutions. What I've attempted to do here is to weave together a relatively cogent "How to" on the solving of Kepler's Equation and the calculation of planetary positions in the Earth's sky.

Johannes Kepler (1571-1630) was a mathematician, astronomer, and Copernican. He believed that the Sun, not the Earth, lay at the center of the universe. He refined Copernicus's view of a heliocentric (Sun-centered) universe, making it into more than simply a competing theory for the geocentric (Earth-centered) model. Under Kepler it would become the superior predictive model. In his work Kepler formulated three laws of planetary motion first set down together in Harmonice Mundi (Harmonies of the World), 1618, and here they are.

    Kepler's Laws:

    1. The planets orbit about the Sun in elliptical orbits with the sun centered at one of the ellipse's two foci (Figure 1).

    Figure 1: Planet X on its elliptical orbit about the Sun.

    2. An imaginary line connecting the sun and a planet sweeps out equal areas in equal times as the planet moves through its orbit. A consequence of this is that a planet moves fastest when closest to the Sun. Newton will have something to say about this.

    3. The square of the period of a planet's orbit is proportional to its distance from the Sun cubed. When the units used for distance are Astronomical Units (AU) and time is measured in years, this relationship can be written explicitly as an equation relating the planet's period P and the semi-major axis of its orbit a (eq.1).

P^2=a^3 (Eq.1)

Kepler's Laws meant that given only a handful of orbital parameters, one could say where a planet had been and would be. To state this explicitly, astronomers make use of Kepler's Equation (eq.2).

M=E-e*sinE (Eq.2)

Kepler's equation is a transcendental equation. This means there is no general solution. So to find the location of a planet at a time t, we must solve for that time using some numerical method. First let us work with what we have. NOTE: You may find it helpful to reference Figure 2 (pop-up) to help visualize some of the variables referenced here.

Only e is time independent. So we consult our orbital parameters for its value and then solve for the mean anomaly (eq.3), M in Kepler's Equation (eq.2). The mean anomaly is just the angle with the perihelion that the planet would have if the orbit was an ellipse with eccentricity = 0, i.e., a circle. We call the imaginary planet moving along such an orbit the mean planet. In such a case the planet would move with a velocity V = (2*PI)/Period .

M=(2*PI*(t-T))/P (Eq. 3)

As you can see, the mean anomaly is just the mean planet's velocity times the time elapsed since it was last at the perihelion.

We can now find the eccentric anomaly using some numerical method. This simulation makes use of successive approximation. Once we have a value for E with which we are happy, we can find the true anomaly (eq.4). The true anomaly is the ACTUAL angle between the perihelion and the planet.

v=2*atan(sqrt((1+e)/(1-e))*tan(E/2)) (Eq. 4)

From here it is a simple matter to find the planet's radial distance (eq.5) from the sun.

r=(a(1-e^2))/(1+e*cosv) (Eq. 5)

We now have the planet's polar coordinates (r, v) within the plane of its orbit such that the X axis points from the Sun towards the Perihelion, point P.

Figure 2: Planet X's orbit as it intersects with the plane of the Sun's equator.

Now we find the Heliocentric Ecliptic coordinates (x, y, z) for the planet by converting from polar to cartesian coordinates and rotating the frame such that the X axis points towards the first point of Aries.

We then rotate the coordinates into Heliocentric Equatorial coordinates (X, Y, Z), making use the matrix below.

However, our display shows the positions of the planets from the Earth. So we need to switch our vantage point to that of a geocentric system. To do this we first repeat the above process, solving for the Earth's Heliocentric Equatorial coordinates. We want to know the Sun's Geocentric coordinates. So here we will approximate this as the inverse of Earth's heliocentric coordinates. This is the same method used to find the Sun's location for display. It is important to note, however, that this is just an approximation, as what we really find is not the location of the Earth but rather that of the Earth-Moon system's barycenter. This simplification is responsible for limiting the simulation's accuracy. Note: This is not an issue for the Build Your Own Solar System simulation for teachers as the hypothetical "Earth" has no moon in that simulation. We then add the Sun's geocentric coordinates to those of the heliocentric coordinates of our planet. This shifts the coordinates, giving us the Geocentric equatorial coordinates (xp, yp, zp) for the planet.

Having the planet's Geocentric coordinates, it is a simple matter to convert them into Right Ascension and Declination. Note: Watch you signs here; if you're not careful, it WILL get messy.

That's it. We can now solve for many discreet times and collect the data into tables to construct ephemerides. If you are interested in finding more accurate calculations for the planets' positions, consider buying a copy of the Astronomical Almanac from the US Naval Observatory or making use of JPL's Horizons system.

  • Astronomical Almanac (ordering info)
  • JPL's Horizons system

    References & Further Reading:

    1. To anyone interested in why it is the orbits of the planets are elliptical, I suggest finding a copy of D. & J. Goodstein's Feynman's Lost Lecture: The Motion of Planets Around the Sun. W. W. Norton & Company. New York, NY. 1996.

    2. A copy of Kepler's Harmonice Mundi (Harmonies of the World) as well as many other ground breaking texts in astronomy have been compiled into one tome: Stephen Hawking's On The Shoulders of Giants: The Great Works of Physics and Astronomy.

    3. For what I found to be the most rigorous on-line handling of this material, try Dr. J. B. Tatum's Celestial Mechanics: (Link current as of April 2004).

    4. The orbital parameters used here came from the JPL Solar System Dynamics Group's "Planetary Orbital Elements," JPL Solar System Dynamics: (Link current as of April 2004).

    Glossary of Terms

    Ascending node: The point of intersection between a planet's orbit and the plane of the Sun's equator, where the planet is moving northward ("upward") across the plane of the Sun's equator.

    Astronomical Units (AU): A measure of distance where one AU is just about equal to the average distance of the Earth from the Sun, 1.49597870691 x 108 (± 3) kilometers.

    Barycenter: The center of mass for a multi-body system of mutually orbiting bodies. The system orbits about the barycenter.

    Celestial sphere: A gigantic imaginary sphere surrounding a stationary Earth upon which the stars are affixed. It was once believed that the celestial sphere was real. However, it is now regarded solely as a convenient descriptive tool.

    Celestial equator: The projection of the Earth's equator onto the celestial sphere.

    Copernican: One who subscribes to the Copernican world view of a heliocentric universe, i.e., one who believes that the Earth orbits around a fixed Sun.

    Declination (DEC): A heavenly object's position in the sky as measured along a meridian in degrees (0 to 90 degrees) north (+) or south (-) from the equator.

    Descending node: The point of intersection between a planet's orbit and the plane of the Sun's equator, where the planet is moving southward ("downward") across the plane of the Sun's equator.

    Eccentric Anomaly: a time dependent term in Kepler's equation which must be solved for in order to calculate a planet's position on its orbit.

    Eccentricity: A measure of how "elliptical" an eclipse is (measured from 0 to 1). For example, a circle has an eccentricity of zero, not very elliptical. A relationship can be stated mathematically between the semi-major axis a, the semi-minor axis b and the eccentricity e where:

    Above are four ellipses with varying eccentricities. The first is a circle.

    Ecliptic: As seen from the Earth the ecliptic is the Sun's annual path across the sky.

    Ephemerides: plural of ephemeris. Tables containing the calculated positions (usually RA and DEC) of celestial objects for different times, usually at regular intervals.

    Ellipse: One of the conic sections, those shapes which are the intersection of a cone and plane. The ellipse is a geometric shape that looks like a squashed circle. You can easily make an ellipse with two thumb tacks and a loop of string. Place the two tacks into a paper and loop the string around them. Place a pencil in the loop of string and move it outwards until the loop becomes taut. Move the pencil around the tacks always keeping the slack out of the loop. The figure drawn is an ellipse. The points where the thumbtacks lie are the foci of the ellipse (singular focus).

    Elliptical: Shaped like an ellipse.

    First point of Aries: The position against the background stars of the Earth's descending node as seen from the Sun.

    Foci: Plural of focus. See ellipse.

    Geocentric: Earth centered.

    Geocentric equatorial coordinates: An X,Y,Z coordinate system centered on the Earth in which the Earth's equator lies in the X-Y plane.

    Heliocentric: Sun centered.

    Heliocentric ecliptic cartesian coordinates: An X,Y,Z coordinate system centered on the Sun in which the ecliptic lies in the X-Y plane.

    Heliocentric equatorial cartesian coordinates: An X,Y,Z coordinate system centered on the Sun in which the Sun's equator lies in the X-Y plane.

    Kepler's Equation: An equation derived from Kepler's Laws whose solution can specify the position of a planet in its orbit for a specified time given a set of orbital parameters.

    Mean anomaly: The angle between the perihelion and the mean planet as measured in the plane of its orbit.

    Mean planet: An imaginary planet which moves at a constant velocity around a circular orbit with a radius equal to the semi-major axis of the actual planet's orbit.

    Numerical method: A method for solving mathematics problems, usually by computer, through the repeated use of simple arithmetic operations.

    Orbital parameters: A set of physical parameters for the orbit of a planet sufficient to predict the position of the planet at a given time t. The orbital parameters used in the simulation above can be found at: (valid as of June 2004).

    Perihelion: The closest point on a planet's orbit to the Sun.

    Period (of a planet): The length of time it takes a planet to return to the same place in its orbit.

    PI (): The ratio of a circle's circumference C to its diameter D.

    Polar Coordinates: A means of denoting a point's location by use of its radial distance from the origin and the angle it is from the x axis.

    Radial distance: How far something is from the coordinate axes as measured directly out from the axes.

    Retrograde Motion: The westward motion of the planets against the background stars. In order to maintain the Earth's central location and a commitment to perfect circular motion, geocentrists devised a set of epicycles (orbits within orbits) upon which the planets would rotate. The motion of the planet about its epicycle allowed for the presence of retrograde motion. However, heliocentrists' Sun-centered model had no need for epicycles as retrograde motion could bee seen as one planet simply overtaking another as they raced about the Sun. See Animation.

    Right Ascension (RA): A heavenly object's position in the sky as measured in hours:minutes:seconds east (+) or west (-) from the vernal equinox.

    Semi-major axis: See ellipse.

    Semi-minor axis: See ellipse.

    Sidereal period: A planet's sidereal period is what many often think of as the planet's year--the time it takes to make one full revolution about its orbit. See Animation.

    Sol: our sun.

    Successive approximation: A numerical method by which a solution is found to an equation by substituting in guesses for the answer on both sides of the equation. The sides are evaluated and the first guess that produces a difference between the sides of less than a pre-defined tolerance is taken to be the answer.

    Synodic Period: A planet's synodic period id the time between two identical configurations in the sky as seen from Earth (e.g., the time between two oppositions). See Animation.

    Transcendental equation: An equation for which a general solution cannot be found algebraically as it contains transcendental (non-algebraic) functions.

    True Anomaly: The angle between the perihelion and the planet as measured in the plane of its orbit.

    Vector: A quantity consisting of both direction and magnitude (e.g., velocity).

    Velocity: A measure of an object's motion that includes both the object's speed and direction.

    Vernal equinox: Both the date (around March 21st) on which the Sun crosses the celestial equator moving northward and the point against the background stars where this occurs.

  • ← Do you like flowcharts? →

       DISCLAIMER   |   youtube    tumblr    twitter    facebook    google+   |   art portfolio   |   email - phone