-
-
Save pije76/793cfa25e1c2144cf7addd3cc32f6f40 to your computer and use it in GitHub Desktop.
This file contains hidden or 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