🚨🚨🚨 NEW
and MORE powerful version here: https://github.com/JMMonte/Reentry_v2
This is a Python-based web application that simulates the complex dynamics of a spacecraft orbiting around the Earth. It takes into account the Earth's rotation, J2 perturbations, atmospheric drag, and the Sun and Moon's gravity while predicting the spacecraft's trajectory.
The simulation uses the amazing poliastro library, as well as astropy and streamlit.
- User can define spacecraft initial state (position, velocity, azimuth, latitude, longitude, and altitude).
- User can set simulation parameters (start time, duration, and time step).
- Simulation results can be downloaded as CSV files.
- Visualization of spacecraft trajectory in 3D and ground track on a map.
- Displays altitude and velocity profiles over time.
- Detects and reports spacecraft reentry and impact.
- US Standard Atmosphere 1976 model is used to calculate atmospheric density.
- astropy
- base64
- cartopy
- coordinate_converter (custom library)
- datetime
- numpy
- pandas
- plotly
- poliastro (mostly removed all references to this library, but still required as it is used to get keplerian orbit preview, but is not used in the simulation)
- streamlit
- numba (high performance JIT compiler for python that makes the simulation run faster)
- Install the necessary dependencies by running
pip install -r requirements.txt
. - Run the application with
streamlit run app.py
. - Open the provided URL in a web browser to access the application.
- Plot orbital decay of a satellite.
- Plot the ground track of a satellite.
- Plot the orbital elements of a satellite.
- Plot orbital perturbations to high altitude satellites.
- Run the 'temperature_model.py' file to generate a new temperature model.
- You should see this dashboard in your browser:
- Install electron globally by typing
npm install -g electron
in a terminal window. - To run the electron app, open your terminal and run
./start.sh
. This will start the streamlit server and the electron app. - When you close electron it will kill the streamlit server.
- Make sure you have the port
8501
available before running the script.
- Open 'dist' folder
- Run the executable file: 'ReentrySim'.
You can modify the code to add more features or to change the existing behavior of the simulation. Some possible improvements include:
- Add support for different atmospheric models.
- Include more forces in the simulation, like solar radiation pressure or Earth's higher order gravitational harmonics.
- Implement a more accurate numerical integration method.
This project is free and open-source. You are allowed to use, modify, and distribute the code as long as you give appropriate credit to the original creator.