from poliastro.plotting.porkchop import porkchop
from poliastro.bodies import Earth, Mars, Venus
from poliastro.util import time_range
# The current Mars launch window (whole window)
launch_mars = time_range("2020-03-01", end="2021-12-15")
arrival_mars = time_range("2020-09-01", end="2023-12-30")
dv_launch, dev_dpt, c3dpt, c3arr, tof = porkchop(Earth, Mars, launch_mars, arrival_mars, tfl=False, vhp=False)
# The current Mars launch window (zoom in)
launch_mars = time_range("2020-04-01", end="2020-09-15")
arrival_mars = time_range("2020-12-01", end="2021-07-30")
dv_launch, dev_dpt, c3dpt, c3arr, tof = porkchop(Earth, Mars, launch_mars, arrival_mars, tfl=False, vhp=False)
# Next transfer window for Venus (whole window)
launch_venus = time_range("2021-04-01", end="2022-04-30")
arrival_venus = time_range("2021-10-01", end="2022-09-30")
dv_launch, dev_dpt, c3dpt, c3arr, tof = porkchop(Earth, Venus, launch_venus, arrival_venus, tfl=False, vhp=False)
# The next transfer window for Venus (zoom in)
launch_venus = time_range("2021-10-01", end="2021-12-01")
arrival_venus = time_range("2022-03-01", end="2022-05-01")
dv_launch, dev_dpt, c3dpt, c3arr, tof = porkchop(Earth, Venus, launch_venus, arrival_venus, tfl=False, vhp=False)