Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib.pyplot as plt
- fname = 'Akatsuki Venus Osculating Elements daily horizons_results.txt'
- with open(fname, 'r') as infile:
- lines = infile.readlines()
- print(len(lines))
- iSOE = [i for i, line in enumerate(lines) if "$$SOE" in line][0]
- iEOE = [i for i, line in enumerate(lines) if "$$EOE" in line][0]
- istart = 7 + 13
- lines = [line.split(',') for line in lines[iSOE+1+istart:iEOE]]
- data = np.array([[float(thing) for thing in line[2:-1]]for line in lines])
- JD = np.array([float(line[0]) for line in lines])
- years = 2016 + (JD - 2457388.5)/365.2564
- EC, QR, IN, OM, W, Tp, N, MA, TA, A, AD, PR = data.T
- things = EC, IN, OM, W, A
- names = 'Ecc', 'Inc(°)', 'Ω(°)', 'ω(°)', 'a(km)'
- goodies = list(zip(things, names))
- fig, axes = plt.subplots(len(goodies), 1)
- for ax, (thing, name) in zip(axes, goodies):
- ax.plot(years, thing)
- ax.set_ylabel(name)
- plt.suptitle('Akatsuki osculating elements (JPL Horizons)')
- plt.show()
- """
- EC Eccentricity, e
- QR Periapsis distance, q (km)
- IN Inclination w.r.t X-Y plane, i (degrees)
- OM Longitude of Ascending Node, OMEGA, (degrees)
- W Argument of Perifocus, w (degrees)
- Tp Time of periapsis (Julian Day Number)
- N Mean motion, n (degrees/sec)
- MA Mean anomaly, M (degrees)
- TA True anomaly, nu (degrees)
- A Semi-major axis, a (km)
- AD Apoapsis distance (km)
- PR Sidereal orbit period (sec)
- """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement