mirror of
https://github.com/cosinekitty/astronomy.git
synced 2025-12-26 00:59:08 -05:00
I am working on adding aphelion/perihelion functionality for planets. I ran into complicated behavior with the orbit of Neptune. Its orbit is so circular, and its movement so slow, that wobbling of the Sun around the Solar System Barycenter (SSB) causes there to be 3 consecutive zero-slope points near the true perihelion. I still need to resolve this.
20 lines
436 B
Python
Executable File
20 lines
436 B
Python
Executable File
#!/usr/bin/env python3
|
|
#
|
|
# utdate.py - Don Cross - 2020-01-03
|
|
#
|
|
# Convert J2000 UT day number to UTC date/time.
|
|
# Also displays Terrestrial Time (TT).
|
|
#
|
|
import sys
|
|
import astronomy
|
|
|
|
if __name__ == '__main__':
|
|
if len(sys.argv) != 2:
|
|
print('USAGE: utdate.py ut')
|
|
sys.exit(1)
|
|
ut = float(sys.argv[1])
|
|
time = astronomy.Time(ut)
|
|
print(time)
|
|
print('TT = {:0.16f}'.format(time.tt))
|
|
sys.exit(0)
|