Satellite Trajectory Animating & Rendering: Satellite Orbit Visualiser using Blender
This project shows how you can create cool looking yet 'Scientifically Correct Orbital Simulations' for any satellite you want
using Blender and Python.
Project Video: https://www.youtube.com/watch?v=Pl94gpMpK6M
A generalized data format known as the Two Line Element (TLE) Set is used to keep track of the orbital elements of individual satellites and are used by Organizations to keep track of the satellites and debris in space. TLE data for any satellite can be taken from this website.
- Create a model of the Earth in a new blender file using a UV sphere and applying the given texture to it. If you want to make the Holographic Earth shown above, follow this video.
- Animate the rotation of the earth model to rotate about the z axis 360 degrees in 2 mins using keyframes.
- Create a satellite model, which in this case was just another UV sphere with emission shader applied to it. Then create a particle system which refers to the satellite object with the following settings:
- Set the number of the particles equal to the number of satellites.
- Set gravity equal to 0 and change the lifetime to span across the complete animation. This ensures all the particles stay in the frame.
- Check the disk cache option in the cache section of the Particles and Bake the simulation to get the particle cache files saved in your project folder. These particle cache files will be later overwritten with the satellite location data.
- Set the number of the particles equal to the number of satellites.
- Copy the Starlink satellite TLE data from this link.
- Save the data in a "starlink.txt" file inside the data directory of the orbital_mechanics and execute the
2BodyProblem.py
file.
- This file extracts all the required orbital elements from the TLE data and passes it to
OrbitPropagator.py
which calculates the state vectors(position and velocity) for that satelliet at every timestepdt
.
- The
OrbitPropagator.py
script makes use of the Ordinary Differential Equation Solver from the scipy module and applies it to the differential equation obtained by considering a 2 Body Gravitational Inetraction between the Earth and the Satellite.
Note: There are a lot more factors that are to be considered while calculating orbit trajectories of satellites like Earth's oblate shape, atmospheric drag, gravity due to moon etc. Currently the code does not take these perturbations into account but I will try and include them in a future version of the project using a more advanced SGP4 perturbation model.
- The location data for each satellite for every timestep is stored in a list and then written to the blender's particle cache files for every frame using the
particlecahce.py
script.
- Now when you run the animation in blender it will animate the particles according to the location data written in the particle cache files by orbital_mechanics.
- Alfonso Gonzalez for amazing Youtube Playlist on orbital mechanics with python.
- European Space Agency and ONiRiXEL for their Space Debris movie for inspiration. Read the article here
- Member phonybone on blenderartists.org for their
pointcache_doctor.py
script. See the post here.
Jasmeet Singh