Main data source: Guo & Farquhar "New Horizons Mission Design" http://www.boulder.swri.edu/pkb/ssr/ssr-mission-design.pdf
%matplotlib inline
import matplotlib
matplotlib.style.use('pybonacci') # https://gist.github.com/Juanlu001/edb2bf7b583e7d56468a
import matplotlib.pyplot as plt
from astropy import time
from astropy import units as u
from poliastro.bodies import Sun, Earth
from poliastro.twobody import State
from poliastro.plotting import plot, OrbitPlotter
from poliastro import iod
from poliastro import ephem
from poliastro.util import norm
Quoting from "New Horizons Mission Design":
It was first inserted into an elliptical Earth parking orbit
of perigee altitude 165 km and apogee altitude 215 km. [Emphasis mine]
r_p = Earth.R + 165 * u.km
r_a = Earth.R + 215 * u.km
a_parking = (r_p + r_a) / 2
ecc_parking = 1 - r_p / a_parking
parking = State.from_classical(Earth, a_parking, ecc_parking,
0 * u.deg, 0 * u.deg, 0 * u.deg, 0 * u.deg, # We don't mind
time.Time("2006-01-19", scale='utc'))
plot(parking)
parking.v
Hyperbolic excess velocity:
$$ v_{\infty}^2 = \frac{\mu}{-a} = 2 \varepsilon = C_3 $$Relation between orbital velocity $v$, local escape velocity $v_e$ and hyperbolic excess velocity $v_{\infty}$:
$$ v^2 = v_e^2 + v_{\infty}^2 $$C_3_A = 157.6561 * u.km**2 / u.s**2 # Designed
a_exit = -(Earth.k / C_3_A).to(u.km)
ecc_exit = 1 - r_p / a_exit
exit = State.from_classical(Earth, a_exit, ecc_exit,
0 * u.deg, 0 * u.deg, 0 * u.deg, 0 * u.deg, # We don't mind
time.Time("2006-01-19", scale='utc'))
norm(exit.v).to(u.km / u.s)
Quoting "New Horizons Mission Design":
After a short coast in the parking orbit, the spacecraft was then injected into
the desired heliocentric orbit by the Centaur second stage and Star 48B third stage. At the Star 48B burnout, the New Horizons spacecraft reached the highest Earth departure speed, estimated at 16.2 km/s, becoming the fastest spacecraft ever launched from Earth. [Emphasis mine]
v_estimated = 16.2 * u.km / u.s
print("Relative error of {:.2f} %".format((norm(exit.v) - v_estimated) / v_estimated * 100))
Relative error of 3.20 %
So it stays within the same order of magnitude. Which is reasonable, because real life burns are not instantaneous.
op = OrbitPlotter()
op.plot(parking)
op.plot(exit)
plt.xlim(-8000, 8000)
plt.ylim(-20000, 20000)
plt.gcf().autofmt_xdate()
According to Wikipedia, the closest approach occurred at 05:43:40 UTC. We can use this data to compute the solution of the Lambert problem between the Earth and Jupiter.
nh_date = time.Time("2006-01-19 19:00", scale='utc')
nh_flyby_date = time.Time("2007-02-28 05:43:40", scale='utc')
nh_tof = nh_flyby_date - nh_date
nh_r_0, v_earth = ephem.planet_ephem(ephem.EARTH, nh_date)
nh_r_f, v_jup = ephem.planet_ephem(ephem.JUPITER, nh_flyby_date)
nh_v_0, nh_v_f = iod.lambert(Sun.k, nh_r_0, nh_r_f, nh_tof)
The hyperbolic excess velocity is measured with respect to the Earth:
C_3_lambert = (norm(nh_v_0 - v_earth)).to(u.km / u.s)**2
C_3_lambert
print("Relative error of {:.2f} %".format((C_3_lambert - C_3_A) / C_3_A * 100))
Relative error of 0.42 %
Which again, stays within the same order of magnitude of the figure given to the Guo & Farquhar report.
from poliastro.plotting import BODY_COLORS
nh_earth = State.from_vectors(Sun, nh_r_0.to(u.km), v_earth.to(u.km / u.s), nh_date)
nh_jup = State.from_vectors(Sun, nh_r_f.to(u.km), v_jup.to(u.km / u.s), nh_flyby_date)
nh = State.from_vectors(Sun, nh_r_0.to(u.km), nh_v_0.to(u.km / u.s), nh_date)
op = OrbitPlotter(num_points=1000)
for ll in op.plot(nh_jup, label="Jupiter"):
ll.set_color(BODY_COLORS["Jupiter"])
plt.gca().set_autoscale_on(False)
for ll in op.plot(nh_earth, label="Earth"):
ll.set_color(BODY_COLORS["Earth"])
for ll in op.plot(nh, label="New Horizons"):
ll.set_color("0")
leg = plt.legend()
leg.get_frame().set_facecolor('#fafafa')