JPL-Integrated N-Body Orbital Simulator
A high-fidelity 3D orbital mechanics engine bridging NASA ephemeris data with custom physics.
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.
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.txtfor 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.
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
.gitignoreand professional file organization (src/vsresearch/). - The "First" Milestone: Successfully intercepted Mars using a flight computer written entirely from scratch.