title: Getting latitude and longitude of the Sun on a world map with PyEphem
body: <p>I'm trying to determine the latitude and longitude of say the Sun, the Moon and Mars. I need the result relative to the Earth's equator and the Prime Meridian in order to produce a result similar to <a href="http://www.timeanddate.com/worldclock/sunearth.html" rel="nofollow noreferrer">this map</a>.</p>
  
  <p>I believe that's also what the author of <a href="https://space.stackexchange.com/questions/5787/pyephem-sublat-and-sublong-equivalent-for-the-moon">this question</a> wanted, however the answer there doesn't add up for me (comparing with values from the first link).</p>
  
  <p>Expected result, obtained from the <a href="http://www.timeanddate.com/worldclock/sunearth.html?n=0&amp;day=1&amp;month=1&amp;year=2015&amp;hour=0&amp;min=0&amp;sec=0" rel="nofollow noreferrer">page linked to earlier</a>:</p>
  
  <blockquote>
    <p>On Thursday, 1 January 2015, 00:00:00 UTC the Sun is at its zenith at Latitude: <strong>23° 02' South</strong>, Longitude: <strong>179° 29' West</strong></p>
  </blockquote>
  
  <pre><code>&gt;&gt;&gt; import ephem; from math import degrees
  &gt;&gt;&gt; b = ephem.Sun(epoch='date'); b.compute('2015/1/1 00:00:00')
  &gt;&gt;&gt; print("{},{}".format(degrees(b.dec), degrees(b.ra)))
  -23.040580418272267,281.12827017399906
  </code></pre>
  
  <p>So the latitude/declination seems about right, but no 180° wraparound will fix that right ascension, probably because it starts at the Vernal Equinox.</p>
  
  <p>I have also unsuccessfully tried to use an observer at 0,0.</p>
  
  <p>Can this be done using PyEphem, Skyfield or astropy? It seems odd that artificial satellites in PyEphem have the convenient sublat and sublong attributes, but it's so hard for celestial bodies. </p>