Giter Club home page Giter Club logo

s.t.a.r's Introduction

S.T.A.R

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

IAlt text

Two Line Element (TLE) Set

Orbit Prediction for any Earth-orbiting object is done using the Classical/Keplerian Orbital Elements. The orbital elements associated with an Earth-orbiting object generally comprise of six elements which describes the shape, size and orientation of its orbit.

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.

How it Works

  1. 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.
  2. Animate the rotation of the earth model to rotate about the z axis 360 degrees in 2 mins using keyframes.
  3. 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:
    1. Set the number of the particles equal to the number of satellites.
    2. Set gravity equal to 0 and change the lifetime to span across the complete animation. This ensures all the particles stay in the frame.
    3. 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.
  4. Copy the Starlink satellite TLE data from this link.
  5. Save the data in a "starlink.txt" file inside the data directory of the orbital_mechanics and execute the 2BodyProblem.py file.
  6. 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 timestep dt.
  7. 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.

  8. 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.
  9. 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.

Data Flow Diagram

Following is the Data Flow for project S.T.A.R:

Thanks to:

  1. Alfonso Gonzalez for amazing Youtube Playlist on orbital mechanics with python.
  2. European Space Agency and ONiRiXEL for their Space Debris movie for inspiration. Read the article here
  3. Member phonybone on blenderartists.org for their pointcache_doctor.py script. See the post here.

Developed By:

Jasmeet Singh

s.t.a.r's People

Contributors

jasmeet0915 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

s.t.a.r's Issues

2BodyProblem.py does not do any real time to sim time conversion for satellite animations

This issue was reported by a fellow user through mail. Apparently, when a geosynchronous satellite was simulated, it was not orbiting the earth in sync but extremely faster.

Upon further investigation of the code the following issues was found:

  • The code does not take into account the animation settings such as fps, rotation period of earth in simulation etc. Hence, the code does not do any real time to sim time conversion.
  • In the simulation, the earth completes a full rotation within 2 min (120 secs/2880 frames considering 24fps) while it takes 24hrs in real time. The 2BodyProblem.py did not take this into consideration while calculating the satellite state vectors for each frame. The script writes the location of particles for each frame in the particle cache. These locations are calculated for each time step about 450 real time seconds apart during the complete satellite orbit. So basically what this means is, the position of a satellite in to two consecutive frames are positions that are 450 real time seconds apart.
  • But 450 seconds in real time actually comes out to be equivalent to 15 frames in simulation time(this is calculated using the simulation fps and period of earth in sim time). So according to these calculations, the simulation of the geosynchronous satellites observed were running 15 times faster!

As a solution the script needs to account for the animation fps and sim earth rotation period settings and calculate the real time dt accordingly for each frame.

How can I find the main.py file?

Hi:

Many thanks for your awesome work!

After downloading the project, I did not find the main.py file which is introduced in the README.md. Did I miss something? How can I run this demo?

Thanks!

Best,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.