# Historical Distance of Planets to Earth [duplicate]

I'm curious if there is a readily accessible tool available, or simply a reliable way to find out what the distance of the planets in the solar system were on a given date.

For example, if I am trying to determine how far:

1. The Sun
2. Mercury
3. Venus
4. Mars

were from Earth on May 3, 1954 ... how would I do that?

## Python

I see that you are quite active in Stack Overflow but have no posts tagged with python yet, so maybe it's time to give it a try!

1. Run pip install skyfield
2. read the simple documentation: https://rhodesmill.org/skyfield/
3. calculate x, y, z positions in the solar system's coordinates with a single line of Python; e.g. x, y, z = venus.at(time).position.km, or
4. use Topos to define a viewing location on Earth and the .altaz()` method to get the position of each in the sky.

## NASA JPL Horizions

This is the same basic source of information that Skyfield uses.

1. Go to the Horizons website at: https://ssd.jpl.nasa.gov/horizons.cgi