Juice cruise trajectory#

Example of interplanetary cruise trajectory.

import numpy as np

import matplotlib.pyplot as plt

from planetary_coverage import TourConfig
from planetary_coverage.ticks import AU, au_ticks, date_ticks, km_ticks

Compute the distance to Jupiter during the cruise phase#

tour = TourConfig(
    mk='5.1 150lb_23_1',
    version='v422',
    spacecraft='JUICE',
    target='JUPITER',
)

tour
<TourConfig> Spacecraft: JUICE | Target: JUPITER | Metakernel: juice_crema_5_1_150lb_23_1_v422_20230130_002 | SKD version: v422_20230130_002
traj = tour['2023-04-06': '2031-06-01': '1 day']

traj
<SpacecraftTrajectory> Observer: JUICE | Target: JUPITER
 - UTC start time: 2023-04-06T00:00:00.000
 - UTC stop time: 2031-06-01T00:00:00.000
 - Nb of pts: 2,979
fig = plt.figure(figsize=(12, 4))
ax = fig.add_subplot()

ax.plot(traj.utc, traj.dist)

ax.set_yscale('log')

ax.xaxis.set_major_formatter(date_ticks)
ax.yaxis.set_major_formatter(km_ticks)

ax.set_title('Juice distance to Jupiter')
Juice distance to Jupiter
Text(0.5, 1.0, 'Juice distance to Jupiter')

Add the main events to the plot#

EVENTS = [
    # date, description
    ('2023-04-14', 'Launch'),
    ('2024-08-20', 'Moon - Earth flyby'),
    ('2025-08-31', 'Venus flyby'),
    ('2026-09-28', '2nd Earth flyby'),
    ('2029-01-17', '3rd Earth flyby'),
    ('2031-06-01', 'Jupiter orbit insertion'),
]

The distance is now represented as astronomical units:

fig = plt.figure(figsize=(12, 4))
ax = fig.add_subplot()

ax.plot(traj.utc, traj.dist, color='tab:red')

for date, desc in EVENTS:
    ax.axvline(np.datetime64(date), color='gray', linestyle=':')
    ax.annotate(desc, (np.datetime64(date), 2.5 * AU),
                backgroundcolor='w', rotation=90, ha='center', va='center')

ax.xaxis.set_major_formatter(date_ticks)
ax.yaxis.set_major_formatter(au_ticks)

ax.set_ylim(0, 7 * AU)
ax.set_yticks([i * AU for i in range(8)])

ax.set_title('Juice distance to Jupiter')

plt.show()
Juice distance to Jupiter

Total running time of the script: ( 0 minutes 1.390 seconds)