← Back to Portfolio

JPL-Integrated N-Body Orbital Simulator

A high-fidelity 3D orbital mechanics engine bridging NASA ephemeris data with custom physics.

Language: Python Framework: NASA JPL Horizons API Role: Lead Developer

Overview

This simulator serves as a bridge between theoretical 3D orbital mechanics and real-world mission planning. By integrating live data sources used by professional aerospace organizations, the engine allows for the visualization and planning of interplanetary transfers.

View Source Code on GitHub

Engineering Process

  • Data Pipeline: Programmatically retrieved state vectors (position and velocity) via the NASA JPL Horizons API.
  • Physics Architecture: Implemented a simultaneous N-body gravitational model, sum-totaling gravitational forces from all planetary masses.
  • Mission Control: Developed a Shooting Method for trajectory correction and B-Plane Targeting for planetary flybys.
  • Environment Management: Utilized Git for version control and requirements.txt for standardizing environment reproducibility.

Technical Struggles & Mitigations

1. Managing Numerical Drift

Initial Euler integration caused planets to drift from orbits as the math failed to account for the curvature of the path within a single time-step.

$$ \vec{r}_{n+1} = \vec{r}_n + \vec{v}_n \Delta t $$

Mitigation: Implemented variable precision logic to dynamically adjust the time-step (\(dt\)) based on proximity to planetary bodies.

2. Trajectory Targeting

A simple "aim-and-shoot" approach to Mars always failed because both objects move at tens of thousands of kilometers per hour.

Mitigation: Developed an iterative Shooting Method to measure "miss distance" and back-calculate the required \(\Delta V\) until intercept.

Conclusion & Key Outcomes

  • Technical Maturity: Demonstrates transition from physics theory to industry-standard code hygiene and numerical problem-solving.
  • Data Handling: Successfully managed unstructured data from external NASA industrial datasets.
  • Professional Workflow: Adopted a developer's mindset using .gitignore and professional file organization (src/ vs research/).
  • The "First" Milestone: Successfully intercepted Mars using a flight computer written entirely from scratch.
🚀