# Earth’s orbit (JPL Horizon system)

I’m was under the impression that over the course of a year (365,25 days) the earth will orbit the solar system’s barycenter in an nearly perfect elliptic orbit with the barycenter as the focus point.

I have tried to use Nasa’s Horizon system to output earth’s position over a year. After 365,25 days I end up with a difference of more than 400000 kilometers. What am I doing wrong? (I understand over a longer time span the barycenter itself will move and that the outer planets will cause Perturbations of the orbit)

What have I done: Go to https://ssd.jpl.nasa.gov/horizons/app.html#/ Select ‘Web Interface’, then apply these settings: Ephemeris Type: VECTORS Target Body: EARTH Coordinate Origin: Solar System Barycenter (SSB) [500@0]

• 10000km is less than an Earth diameter. A year lasts slightly less than 365.25 days.Orbital speed is like 30km/s.you might need to use more accurate inputs Commented Jul 30 at 20:05
• The diff is actually in the range of 500000 kilometers even with the highest precision the tool allows for. I used the time span 2023-01-01 00:00 to 2024-01-01 06:09 Commented Jul 30 at 21:16
• You'll also likley get a closer match if you use the Earth-Moon Barycenter as the target. But the concept of an orbit is just a simplification of the n-body problem and won't be an exact match. (The ephemeris Horizons uses is from an n-body simulation.) Commented Jul 30 at 22:00

The Solar System as a whole orbits the SSB (Solar System Barycentre), but it's not actually the focus of the orbit of any individual planet.

Instead, each planet orbits the point which is the barycentre of itself and the centre of the Sun (roughly speaking), since the Sun's mass is ~99.9% of the total Solar System mass. The other planets perturb that motion from an ideal Kepler ellipse. The Sun-Jupiter barycentre is a significant distance from the centre of the Sun (and it's the major component of the SSB), but the Sun-Earth barycentre is only a few hundred kilometres from the centre of the Sun.

As Greg Miller mentions in a comment, to analyse the Earth's motion, we really need to look at the orbit of the EMB (Earth-Moon barycentre), which orbits the Sun-EMB barycentre.

Over the years, the SSB moves quite far from the centre of the Sun, as I show in https://astronomy.stackexchange.com/a/44903/16685 and https://astronomy.stackexchange.com/a/28036/16685

Here's a Horizons graph from my answer https://astronomy.stackexchange.com/a/51898/16685 of the distance from the Earth to Sun and to the SSB for one year.

We can see that the Earth's distance to the Sun at the end of the year is virtually the same as it was at the start of the year, but that's not true of its distances to the SSB.

Here's a graph showing the distance of the Sun-EMB barycentre from the centre of the Sun.

The mean distance is ~455 km, and it only varies by about ±8 km.

• Using the Earth-Moon barycenter as target orbiting the center of the Sun (as the best available approximation of the Sun-Earth barycenter) yielded the precision I was looking for. Commented Aug 1 at 15:26
• @Steen The script that made my last graph uses position vectors from Horizons with GM values for Sun, Earth, and Moon from ssd.jpl.nasa.gov/astro_par.html to calculate the position of the barycentre. Commented Aug 1 at 17:01
• @Steen I think you are right. Without the magic of post-processing scripts, the closest you can come to getting a "repeat performance" (i.e. something returning to nearly the same place after each year - roughly 365.2564 days - is as you say; track the E-M barycenter's motion around the Sun. But in practice, I also did something similar to PM2Ring - I would extract trajectories of all relevant positions from Horizons using SS barycenter as only a starting point, then I'd generate my own barycenters and whatnot in a Python script. I found doing it that way much more satisfying and educational.
– uhoh
Commented Aug 4 at 4:05

Well for a start, the orbital period of the Earth isn't 365.25 days; one sidereal year is 365.256 days and at about 30km/s 0.006 days (or 500 seconds) the Earth travels 15000km, so that is enough to account for the difference.

Other small differences will be due to the gravitational perturbation of the Moon, Jupiter, Venus, and the non-spherical shape of the Sun. These will cause the actual position of the Earth to be different from that predicted from a perfect Keplarian ellipse.

What am I doing wrong?

Lots and lots of things.

You assumed that the Earth will orbit the solar system’s barycenter in a nearly perfect elliptic orbit with the barycenter as the focus point.

That is a bad assumption. I'll look at Venus.

Source: Self-generated using data retrieved from JPL Horizons. This plot is a replica of my answer to Do the planets really orbit the Sun? in the physics stackexchange.

From the perspective of modeling orbits as Keplerian orbits, inner planets are best represented as orbiting the Sun.

You assumed that the Earth will orbit the solar system’s barycenter in 365.25 days.

That, too, is a bad assumption and leads to a secular error. A sidereal year is 365.256363 days long. An anomalistic year is 365.259636 days long. The difference of 4 minutes and 42.8 seconds is due to the way other planets perturb the orbits of the Earth and the Moon. You will eventually see discrepancy between modeling the orbits as Keplerian versus results from a more sophisticated model such as that used by JPL Horizons.

You assumed that the Earth will orbit the solar system’s barycenter.

Once again, a bad assumption. The Earth has a rather large moon. It is the Earth-Moon system that orbits the Sun. Omitting the Moon will result in large errors.