Calculating the positions of celestial bodies is a pursuit that has been undertaken for more than 2,000 years. The ancient Babylonians in the 7th and 8th centuries B.C. began, for the 1st time, to develop an empirical and mathematical approach to astronomy. But not until 1609 that Johannes Kepler's Astronomia nova presented that the plans resembling ours today were introduced, with Kepler's three laws and the key insight that the orbits of the planets are ellipses with the Sun at a focus. Kepler than began the long process of preparing an ephemeris - a table of positions at a series of times-for some of the planets.
The basic concepts are as follows. A circular orbit for the object is assumed, and the longitude of the hypothetical mean planet is calculated, for a given time, in reference to the perihelion (the longitude of closest approach to the Sun of the same planet in it actual orbit) is calculated. Then given this and the eccentricity of the orbit the position of the body in its elliptical orbit is calculated. Then, given the inclination of the orbital to a reference plane-usually that of the Earth- the latitude is derived. Here corrections to the positions due to perturbations of other planets are sometimes made. If the position of the planet in reference to the center of the Earth is desired, the same calculations are made for the Earth and a transformation of coordinates is made. If the position as seen from the surface of the Earth is required, then more figures are are needed, involving time and the rotation of the Earth about its axis and its inclination to the orbital plane to the orbit. Sometimes allowances for the finite speed of light are made.
Many things makes the computations more complicated than the above explanation would lead one to believe. One of them is that the orientations and dimensions of the elliptical orbits are always changing, and so is the inclination of the axis of the Earth (the obliquity of the ecliptic). That, in addition to the normal transformations and corrections require many different longitudes-apparent, geometrical, heliocentric, true, topocentric, mean and true of each kind, and so on. Theories of planetary motions have been developed, with very detailed calculations of perturbations. Are involved.
This approach is known at the analytic method. The landmark classic in the field is Astronomical Algorithms, by Jean Meeus, first published in 1991. It was the first book not dependent on formulas developed before 1920. It uses modification of the leading planetary theories developed by the Bureau des Longitides in Paris. Algorithms here, of modifications of them, are the key to all of the planetarium programs available to the masses, such as Skyview Cafe or Starry Night.
The other main approach, numerical analysis, is based on a dynamical model of the Solar System. In this approach, the calculations begin with the positions and velocity of the planets of at some chosen instant. The positions of the planets are recalculated after an arbitrary time interval, as if the net forces acting on it by the other planets and the Sun are constant. It is capable of higher accuracy than the analytic methods, and is the only way to generate high accuracy predictions tens of thousands of years from present accurately. The calculations take more time than those of the analytic ones, and demand more computer memory.
Another approach applies interpolation formulas to highly accurate ephemerides stored in files. In fact, this is what JPL provides. Their work is the gold standard, and theories and programs are calibrated against them.

