aboutsummaryrefslogtreecommitdiff
path: root/astro/py-skyfield/files
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2021-02-27 18:28:18 +0000
committerThierry Thomas <thierry@FreeBSD.org>2021-02-27 18:28:18 +0000
commitec8caa80c93ea306d0613c884fe8bec1b8b21b74 (patch)
treea2514082275e230a15c78d10d54119766596cb68 /astro/py-skyfield/files
parent94dbf3b119a7fc3832364cfb53f3cdad777aa0b6 (diff)
Adding skyfield, a Python program for ephemerides computation and skyfield-data,
a minimal set of data files to work with py-skyfield.
Notes
Notes: svn path=/head/; revision=566727
Diffstat (limited to 'astro/py-skyfield/files')
-rw-r--r--astro/py-skyfield/files/test-skyfield.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/astro/py-skyfield/files/test-skyfield.py b/astro/py-skyfield/files/test-skyfield.py
new file mode 100644
index 000000000000..a0dea3dcb621
--- /dev/null
+++ b/astro/py-skyfield/files/test-skyfield.py
@@ -0,0 +1,13 @@
+from skyfield.api import load
+
+planets = load('de421.bsp')
+earth, mars = planets['earth'], planets['mars']
+
+ts = load.timescale()
+t = ts.now()
+position = earth.at(t).observe(mars)
+ra, dec, distance = position.radec()
+
+print(ra)
+print(dec)
+print(distance)