Porkchops with poliastro¶
Porkchops are also known as mission design curves since they show different parameters used to design the ballistic trajectories for the targetting problem such us:
Time of flight (TFL)
Launch energy (C3L)
Arrival velocity (VHP)
For the moment, poliastro is only capable of creating these mission plots between
poliastro.bodies objects. However, it is intended for future versions to make it able for plotting porkchops between NEOs also.
For creating a porkchop plot with poliastro, we need to import the
porkchop function from the
poliastro.plotting.porkchop module. Also, two
poliastro.bodies are necessary for computing the targetting problem associated. Finally by making use of
time_range, a very useful function available at
poliastro.utils it is possible to define a span of launching and arrival dates for the problem.
import astropy.units as u from poliastro.plotting.porkchop import porkchop from poliastro.bodies import Earth, Mars from poliastro.util import time_range launch_span = time_range("2005-04-30", end="2005-10-07") arrival_span = time_range("2005-11-16", end="2006-12-21")
Plot that porkchop!¶
All that we must do is pass the two bodies, the two time spans and some extra plotting parameters realted to different information along the figure such us:
If we want poliastro to plot time of flight lines:
If we want poliastro to plot arrival velocity:
The maximum value for C3 to be ploted:
max_c3=45 * u.km**2 / u.s**2(by default)
dv_dpt, dv_arr, c3dpt, c3arr, tof = porkchop(Earth, Mars, launch_span, arrival_span)
/home/juanlu/.miniconda36/envs/poliastro37/lib/python3.7/site-packages/pandas/plotting/_converter.py:129: FutureWarning: Using an implicitly registered datetime converter for a matplotlib plotting method. The converter was registered by pandas on import. Future versions of pandas will require you to explicitly register matplotlib converters. To register the converters: >>> from pandas.plotting import register_matplotlib_converters >>> register_matplotlib_converters()
NASA’s same porkchop¶
We can compare previous porkchop with the ones made by NASA for those years.