# Closest point on Earth to a planet?

I'd like to be able to find the latitude and longitude on Earth (assuming a sphere is fine) which is closest to Pluto at the current time (or where Pluto is directly overhead).

Is this possible with PyEphem?

• As the Earth rotates this question does not mean much: the point that is closest changes all the time. Jan 18, 2016 at 21:15
• I feel compelled to at least comment since I'm the one who suggested you ask here. As @adrianmcmenamin notes, the point constantly changes. If you just need it at a given time, try something like stellarium. If you want to trace Pluto's path over the Earth, compute its right ascension and declination and plot them.
– user21
Jan 19, 2016 at 2:24
• The point moves at 100s of km /h, depending on latitude. I can't help wondering why you want to know this point though... Jan 19, 2016 at 4:56
• @adrianmcmenamin The user is looking for a method of finding this point, not a single answer for a given time. Apr 6, 2016 at 15:46

Your question is valid and is a common operation. When computing when an object will be visible, many observers want to be able to draw a globe or map that is marked with the position from which an object like Pluto is directly overhead. Such a position on the globe at a given instant (and you do say “at the current time”) is, all other things being equal, the best-situated place from which to observe the object.

Unfortunately, the “libastro” C library that PyEphem wraps seems to only provide one instance of this concept: Earth satellites have .sublat and .sublong attributes, because it is so common to want to draw the path of a satellite on a globe or map.

But libastro does not generalize the concept. From what I can see, there is no way to generate the point on the Earth that is directly below any other Solar System object. And since I have not been in the habit of trying to extend libastro, it is likely that PyEphem will not gain this ability.

However, I have been developing a replacement for PyEphem that is written in pure Python and that I will be free to extend, called Skyfield. I will hopefully have this concept working there soon, and when I do so I plan to make it work for all objects, and not limit it to Earth satellites!

(In the meantime, as pointed out in the comments: you could try asking PyEphem for the geocentric RA and dec and, if you could adjust RA by the Earth's current hour angle, then you could turn those into an approximate latitude and longitude.)

• Thanks! Do you mean "iterating until the altitude becomes very close to 90°"? Do I need to check the azimuth if I'm just interested in the point on Earth and not where to look up?
– Hugo
Jan 22, 2016 at 19:14
• Brandon, can't you use pyephem to compute the right ascension and declination of an object, and then use Greenwich mean sidereal time to compute where the object is overhead? While it's not a specific ability of pyephem, it seems easily computable without iteration?
– user21
Jan 23, 2016 at 19:14
• Unfortunately not, because the planet will have a different RA from a different location on Earth, because they are looking at it from a slightly different angle against the backdrop of stars. Jan 23, 2016 at 19:37
• But we're only looking for the single point where the object is overhead, no? And the geocentric RA/DEC should suffice to find that point, unless you're including the Earth's ellipsoidity.
– user21
Jan 26, 2016 at 15:55
• Oh! The geocentric RA and dec. Yes. Those coordinates would, if the RA were adjusted by the current Earth rotation angle, given an approximate position on the Earth if one approximates it as a sphere. Jan 27, 2016 at 0:02

The orbital speed of Earth around the Sun is 30,000 m/s, the highest mountain is about 9,000 m and the rotational speed of the surface around the polar axis is about 450 m/s. So this makes me conclude that topography such as height over the Sea has to be of little importance.

The polar axis around which the Earth turns is tilted by 23 degrees relative to the ecliptic plane of the planets' average. Pluto's orbit is 17 degrees tilted so every region on Earth between +40 and -40 degrees latitude should, sequentially in time, be the one spot on Earth's surface which is closest to Pluto. Spread out over looong times. That's about between New York and Sydney. For the least inclined planets the nearest point on Earth would be somewhere between Houston and Rio de Janeiro, i.e. every place on Earth within 24 degrees north or south of the equator (except very local depressions).

• Thank you, this is useful for sanity checking my calculations.
– Hugo
Jan 22, 2016 at 19:16
#!/usr/bin/python

import ephem, math
obs = ephem.Observer();
obs.long,obs.lat=0,0;
pl = ephem.Pluto(ephem.now())
print 180.*(pl.g_ra-obs.sidereal_time())/math.pi,180.*pl.g_dec/math.pi


To a good approximation, the code above will tell you the longitude and latitude (in that order) where Pluto is currently overhead. You can edit it for different planets/times.

• Thanks! This is the code I came up with based on @Brandon's answer: github.com/brandon-rhodes/pyephem/issues/… and for now gives lat=-20.94, lon=25.38. Your code gives very similar results: lat=-20.9443019471, lon=25.3799291351 .
– Hugo
Jan 27, 2016 at 9:06
• Great. I still think you don't need to do quite so extensive a search, and could maybe start with what I have above and tweak slightly to compensate for the Earth's ellipsoidity.
– user21
Jan 27, 2016 at 14:26
• Yes, your code is close enough for my purposes. Thanks again!
– Hugo
Jan 28, 2016 at 8:31
• "where Pluto is currently overhead" is not the closest point to Pluto though, if there are mountains nearby. Jan 21, 2019 at 21:39
• For calculating what point is truly closest to Pluto, the full reasoning from this question applies. Jan 21, 2019 at 21:47