The mission-design question

How much does a departure date change the cost of reaching an asteroid? For this astronautics project, I implemented fundamental two-body tools and combined them into a preliminary mission analysis for near-Earth asteroid 65803 Didymos.

The assignment first specified a 400-day transfer, leaving Earth at t_ref + 12 days and reaching Didymos at t_ref + 412 days. I then searched a wider departure-and-arrival window to identify lower-cost opportunities.

Build the tools, then connect them

  • State conversion: rv2kep and kep2rv convert between six-component Cartesian states and Keplerian elements.
  • Anomaly conversion: ta2ma and ma2ta connect true and mean anomaly.
  • Propagation: propagate_elliptical_ta advances anomaly over a time of flight; propagate_elliptical returns a propagated Cartesian state.
  • Transfer solving: stumpff evaluates the universal-variable functions, while lambert_universal calculates departure and arrival velocities for given endpoints and flight time.

The problem4_analysis script ties these components together, evaluates maneuver costs, and produces the three mission-analysis figures.

Numerical decisions in the code

The Lambert implementation selects the transfer direction using endpoint geometry, clamps the cosine used for the transfer angle, and checks that the universal-variable geometry remains valid. It expands a search interval to bracket the time-of-flight root and uses fzero once a bracket is available; a Newton-style fallback is included when bracketing fails.

The script precomputes Earth and Didymos states at candidate epochs before evaluating the transfer grid. It records solver residuals alongside ΔV values and marks caught failures as missing data. For the 3D plots, it integrates the selected transfer using ode113 with relative and absolute tolerances set to 10⁻¹².

The fixed-date baseline

The assigned transfer produced a departure cost of 5.141295 km/s and arrival cost of 14.886435 km/s, for 20.027729 km/s total. Most of the cost occurred at arrival, where the transfer velocity was poorly matched to Didymos.

Fixed-date 400-day Earth-to-Didymos transfer with total delta-v of 20.027729 kilometers per second
Report Figure 1: the fixed-date baseline.

Searching the launch window

I evaluated departure and arrival epochs from day 0 through day 1000 relative to t_ref, using 5-day increments and prograde transfers. Flight times of 100 days or less were excluded, as required by the assignment. Total cost combines departure and arrival velocity matching under a zero-sphere-of-influence approximation:

DeltaV_total = norm(v1 - v_Earth) + norm(v2 - v_Didymos)
Porkchop contour plot mapping total delta-v against departure and arrival dates for Earth-to-Didymos transfers
Report Figure 2: the porkchop plot makes the sensitivity to timing visible.

Results: same flight time, lower cost

Reported maneuver costs and transfer dates
MeasureAssigned datesBest sampled point
Departure, days after t_ref12600
Arrival, days after t_ref4121000
Flight time, days400400
Departure ΔV, km/s5.1412953.474620
Arrival ΔV, km/s14.8864354.385135
Total ΔV, km/s20.0277297.859756

The reported reduction is 12.167973 km/s, or approximately 60.8%. Both transfers last 400 days; the difference comes from the departure-and-arrival geometry rather than a longer flight.

What this work demonstrates

  • Translating astrodynamics equations into modular numerical functions with defined input and output interfaces.
  • Connecting propagation and boundary-value solving into an end-to-end mission-analysis workflow.
  • Using a parameter sweep and visualizations to compare engineering alternatives quantitatively.
  • Documenting results in a report and packaging reusable MATLAB source files.

Scope & next steps

The model assumes heliocentric two-body motion, elliptical propagation, prograde transfers, and zero spheres of influence at Earth and Didymos. The minimum occurs at the upper arrival-date boundary of the search window, so it is a sampled-grid result rather than evidence of a global optimum.

A next iteration would extend the date window, refine the promising region, enforce explicit convergence acceptance criteria, and compare against an independent trajectory reference before adding more detailed mission constraints.