A high-fidelity Python toolkit for interplanetary trajectory analysis, optimization, and mission design. This repository provides advanced tools ranging from N-body propagation to symbolic optimal control solvers and global launch window scans.
- N-Body Propagator: Full numerical integration using SPICE ephemeris data (Sun, Planets, Moon).
- Perturbations: Realistic force models including Solar Radiation Pressure (SRP), Atmospheric Drag, and J2 Zonal Harmonics.
- Note: J2 gravity requires SPICE kernels with specific body constants (e.g.,
J2Efor Earth).
- Note: J2 gravity requires SPICE kernels with specific body constants (e.g.,
- Variational Equations: Automatic State Transition Matrix (STM) propagation for navigation and optimization.
- B-Plane Targeting: Precise targeting of gravity assist flyby parameters (B·R, B·T).
- Lambert Solver: Robust solution of the two-body boundary value problem (Gauss method).
- Porkchop Plotter: Global launch window analysis identifying C3 energy and Time-of-Flight (TOF) optima.
- Tisserand Analysis: Visualizing gravity assist opportunities and energy changes between bodies.
This toolkit provides multiple pathways for solving trajectory optimization problems:
- Symbolic Indirect Methods: Transform Optimal Control Problems (OCP) into TPBVPs via Pontryagin's Minimum Principle with automated symbolic derivation.
- Numerical Shooting Methods:
- Single Shooting: Fast convergence for well-behaved boundary value problems.
- Multiple Shooting: Robust solving of sensitive trajectories by breaking them into segments (purely numerical implementation).
- Direct Collocation: Solving OCPs via Hermite-Simpson discretization of the state and control paths.
- Smoothing Homotopy: Robustly transitioning from Minimum Energy to Minimum Fuel problems using continuation methods.
git clone https://github.com/BatuhanAkkova/deep-space-mission-design-toolkit.git
cd deep-space-mission-design-toolkit
pip install -e .This toolkit requires SPICE kernels for high-fidelity planetary ephemeris.
Important
You must create a data/ directory in the repository root and place your .bsp, .tpc, and .tls files there. These files are not included in the repository due to size.
Required/Recommended kernels:
de440.bsp(Planetary Ephemeris)naif0012.tls(Leapseconds)pck00010.tpc(Planetary Constants)
You can download these from the NAIF Generic Kernels archive.
All calculations follow strict astrodynamics standards:
- Time System: Barycentric Dynamical Time (TDB) / Ephemeris Time (ET).
- Coordinate Frames:
ECLIPJ2000(Ecliptic) for interplanetary,J2000(Equatorial) for near-Earth. - Units: SI-based with Kilometers (km) and km/s as standard for SPICE compatibility.
- Assumptions: Patched-conic results are routinely validated against full N-body numerical integration.
The examples/ directory contains demonstration scripts. Key highlights:
| Method | Visualization |
|---|---|
| Indirect Optimization Solving Optimal Control Problems (OCP) using Pontryagin's Minimum Principle. |
![]() |
| Homotopy (Smoothing) Transitioning from Minimum Energy to Minimum Fuel problems. |
![]() |
- Navigation & GNC: Orbit Determination (EKF, Batch Least Squares), Covariance Analysis.
- Multiple Flybys: Generalized MGA (Multiple Gravity Assist) solver.
- Low Thrust: Continuous low-thrust trajectory optimization.
- Invariant Manifolds: Transfers using stable/unstable manifolds (CR3BP).
MIT License. See LICENSE for details.
Batuhan Akkova Email








