1
$\begingroup$

I've been scouring the internet for a straightforward way to approximate the distance between Earth and Mars at a given time. I hope to achieve an accuracy of about 100km.

$\endgroup$
3
  • $\begingroup$ Try this: calsky.com/cs.cgi/Planets/5/1? $\endgroup$ – Dean Mar 18 '16 at 15:20
  • $\begingroup$ If you're willing to do small computations then jpl horizons is a good source ssd.jpl.nasa.gov/?horizons $\endgroup$ – Astroynamicist Mar 19 '16 at 9:29
  • $\begingroup$ If you're looking for a simple hand-calculable approximation and willing to assume circular orbits, I/we can provide one, but the accuracy will be nowhere near +- 100km. $\endgroup$ – user21 Mar 19 '16 at 13:45
3
$\begingroup$

Do not underestimate the astronomers! 100 km? That's absurd. Saturn('s center of mass) is located to within one mile's distance from the Sun. Mars is of course even much better located.

Here's a site I googled that seems to give current distance to Mars to within single kilometers. I don't know how that site makes up its numbers, but it is certainly possible to measure it like that. With mutual radio communication, there are really good opportunities for precis distance measuring. 135,834,832 km just now! Pretty close and that's why the ExoMars space probe was launched towards Mars a few days ago. And here is a table with the conunction distances just past and soon coming up.

$\endgroup$
2
  • $\begingroup$ According to the fairly well-sourced space.stackexchange.com/a/5894/7073 we know the orbit of Mars to within hundreds of meters, and the orbit of Saturn to within a few tens of kilometers. $\endgroup$ – user21 Mar 19 '16 at 13:44
  • $\begingroup$ +1 for Do not underestimate the astronomers! $\endgroup$ – uhoh Jan 12 '19 at 3:31
3
$\begingroup$

The python library, pyephem has this function.

import ephem
km = 149597871   # 1AU in km
m = ephem.Mars()
m.compute('2016/3/18')
print(m.earth_distance*km)

136729311.6250654
$\endgroup$
2
  • 1
    $\begingroup$ Note that the implied accuracy is well beyond what is realistic. This doesn't actually give the distance accurate to 1/10 mm! $\endgroup$ – James K Mar 19 '16 at 6:33
  • $\begingroup$ related: PyEphem under the hood - how does it calculate position of planets? As far as I can figure, starting in 2010 the VSOP models are fitted to ephemerides derived from numerical integration. Before that it may have been purely a perturbative model. The "new hotness" Python package Skyfield on the other hand will directly interpolate a JPL ephemeris of your choosing. Both are supported by the same person. $\endgroup$ – uhoh Jan 12 '19 at 3:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.