Last active
July 14, 2021 20:11
-
-
Save annibuliful/9bdbcbb1accc03209cf9f2a12f6422ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from skyfield.api import load | |
from jdutil import * | |
planets = load('de432s.bsp') | |
earth, jupiter = planets['EARTH'], planets['JUPITER BARYCENTER'] | |
ts = load.timescale() | |
t = ts.now() | |
timenow = jd_to_datetime(float(t.tt)) | |
astrometric = earth.at(t).observe(jupiter) | |
ra, dec, distance = astrometric.radec() | |
print('โปรแกรมคำนวณระยะห่างจากโลกกับดาวพฤหัส') | |
print(timenow.strftime('%Y-%m-%d %H:%M:%S')) | |
print(ra) | |
print(dec) | |
print("ระยะห่าง %s" % distance) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment