How can I calculate current position of planet in sky from earth's point of view. I want to calculate based on given DATETIME and Location

For example, if I see current position of planets on "23 Jan 2024 22:46:28" From Location India, Sun Capricorn 08° 59' 37" and Saturn Aquarius 11° 19' 11"

I tried to search online but unable to understand if am referring to the correct content. Are there any algorithms which I can learn and implement that in Python scripting.

  • $\begingroup$ It's a lot of work if you want high precision, especially for the Moon. But a good place to start is stjarnhimlen.se/comp/ppcomp.html which has algorithms & a turorial. Also see ssd.jpl.nasa.gov/planets/approx_pos.html $\endgroup$
    – PM 2Ring
    Jan 23 at 22:51
  • $\begingroup$ You have to look for ephemeris calculation (plural ephemerides). There are entire books on that. Looking for python code, start with astropy. $\endgroup$ Jan 23 at 22:53
  • $\begingroup$ Is there some reason you don't want to use existing code, or some online service? BTW, it looks like you're using Indian ecliptic coordinates, which are roughly 23° behind Western coordinates. But that's just a minor issue. $\endgroup$
    – PM 2Ring
    Jan 23 at 22:54
  • 1
    $\begingroup$ One popular algorithm is VSOP87, implementations in multiple languages are here: github.com/gmiller123456/vsop87-multilang $\endgroup$ Jan 24 at 2:44
  • $\begingroup$ Paul Schlyter has also updated webpage with worked examples: stjarnhimlen.se/comp/tutorial.html $\endgroup$
    – Leos Ondra
    Jan 24 at 8:36


You must log in to answer this question.

Browse other questions tagged .