Search notes:

Python library: Skyfield

pip install skyfield

Calculate the position of mars

#!/usr/bin/env python3

from skyfield.api import load

planets = load('de421.bsp')
earth   = planets['earth' ]
mars    = planets['mars'  ]

t_now  = load.timescale().now()

ra, dec, distance = earth.at(t_now).observe(mars).radec()

print(ra, dec, distance)
Note that load('de421.bsp') creates a local file with this name.

See also

Astropy, PyEphem

Links

Skyfield python library

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:51 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(51): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(66): id_of(Object(PDO), 'uri', '/notes/developm...') #2 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1788517820, '216.73.217.21', 'Mozilla/5.0 App...', NULL) #3 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/Python/libraries/Skyfield(59): insert_webrequest() #4 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 51