This script provides a comprehensive tool for calculating and visualizing orbital transfers around Earth. It specifically focuses on the most energy-efficient method of transferring a spacecraft between two circular orbits using minimal propulsive maneuvers.
- Compute delta-v (velocity change) for departure and arrival burns.
- Calculate transfer orbit semi-major axis.
- Determine total transfer time.
- User-friendly input for initial and final orbit altitudes.
- Detailed printout of transfer orbit parameters.
- Graphical representation of Earth.
- Plotting of initial and final orbital trajectories.
- Visual understanding of the transfer orbit.
numpy
: Numerical computing library.matplotlib
: Plotting and visualization.scipy
: Scientific computing tools (specifically for constants).
The script leverages key celestial mechanics principles:
- Gravitational Parameter (μ): 398,600.4418 km³/s².
- Earth's Equatorial Radius: 6,378.137 km.
- Semi-major axis computation.
- Orbital velocity calculations.
- Delta-v budget analysis.
-
Ensure you have Python 3.x installed.
-
Install required dependencies:
pip install numpy matplotlib scipy
** Usage **
Run the script:
python hohmann_transfer.py
When prompted, input:
- Initial orbit altitude (in kilometers).
- Final orbit altitude (in kilometers).
The script will:
- Calculate transfer parameters.
- Display detailed transfer information.
- Generate a 3D orbit visualization.
Hohmann Transfer Orbit Details:
Initial Orbit Altitude: 500.00 km
Final Orbit Altitude: 35,786.00 km
Transfer Orbit Semi-Major Axis: 23,093.07 km
Delta-V (Departure Burn): 1.80 km/s
Delta-V (Arrival Burn): 2.44 km/s
Total Delta-V: 4.24 km/s
Transfer Time: 12.54 hours
The 3D plot will show:
- Earth's spherical representation.
- Initial orbit trajectory.
- Final orbit trajectory.
- Transfer orbit path.
- Currently supports transfers around Earth.
- Assumes circular orbits.
- Does not account for extremely complex gravitational interactions prior to insertion.
This project is open-sourced under the MIT License. See the LICENSE file for details.