Skip to content
Public template

About

AstroShield is a space debris detection and collision-prevention simulator built for HackPHS 2026, using Python, gravitational physics, and trajectory prediction to identify potential spacecraft collisions and calculate debris interception paths.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🚀AstroShield — Debris Field Simulator🚀

Watch AstroShield Demo

A sensor simulator seen from a rocket: debris flies through a field bent by the gravity of nearby planets, and you write the code that predicts each piece's trajectory from the sensor readings.

Our Inspiration :

As space exploration continues to grow, one of the most escalating threats is posed by space debris and the potential danger it has on future space missions. This inspired us to create a system called AstroShield, which could detect incoming debris and actively prevent collisions with a spacecraft.

What It Does :

AstroShield utilizes real-time space debris tracking data generated by a realistic simulation to analyze the trajectory of the orbital debris. When a potential collision is detected, the system deploys a kinetic impactor projectile (tungsten ball) to alter the debris trajectory and reduce the risk of collision with the spacecraft.

How We Built It :

We started by building the base of the simulation for AstroShield using Claude to help us write the code. This allowed us to get realistic data from the simulation that we could use to calculate a formula for the general trajectory of space debris. We then created an alternate equation that calculated when to deploy the kinetic impactor projectile, which for us was a tungsten ball, so that it could intercept the orbital debris threatening to collide with the spacecraft. Afterwards, we coded the equations and sensors that we used to detect the space debris in VSCode using Python. By attaching the VSCode document to the simulation, we created a working model of AstroShield, which allows the spacecraft to shoot tungsten balls at space debris that pose a collisional threat.

Challenges We Ran Into :

One of the major challenges we encountered during the process of designing AstroShield was finding a reliable way to predict the trajectory of the debris that could collide with the rocket. There are thousands upon thousands of floating space debris which pose a massive threat in the atmosphere, and trying to calculate the trajectory of each one would be near impossible. To solve this, we found a general equation which represents the trajectory of all space debris through fillable variables :

a(deb_r,t) = Σᵢ((G·M·(π(t)-deb_r))/(|π(t)-deb_r|³).

Accomplishments That We're Proud Of :

For most of our team, this was our first hackathon, so building a fully functional project when we barely knew each other in the start felt like a huge success. We’re proud of the fact that we put together the amazing simulation of AstroShield using many different skills and languages such as python with countless hours and lines of code.

What We Learned :

Through AstroShield, we learned how to use a combination of math, physics, and programming to model the movement of space debris. We learned how to apply gravitational equations in Python to predict debris trajectories and determine whether an object could collide with a spacecraft. We also explored how to calculate the timing and trajectory needed for a kinetic impactor to intercept dangerous debris. Combining our mathematical models with a live simulation taught us how to make AstroShield.

What's Next For AstroShield :

The next step with AstroShield is improving the accuracy of the debris-tracking algorithms so that it could successfully collide with the space debris 100% of the time. We also want to develop a more advanced hardware system that could be used to better organize and simulate a realistic physical 3D model. This would include the sensors used to spot the debris, and the system used to shoot the tungsten balls at a realistic space debris machine. Ultimately, we would like to evolve AstroShield into a more sophisticated simulation that demonstrates how predictive modeling can make space exploration safer.

Run it

Install the Python dependency once:

python3 -m pip install -r requirements.txt

Start the Python API in one terminal:

python3 src/api.py

Start the browser app in a second terminal:

npm install
npm run dev      # /api requests are proxied to Python
npm run build    # production build in dist/

Where things live

src/
  trajectory.py     Python interception solver
  api.py            HTTP endpoint that calls the solver
  config.js         default settings (the sliders edit these live)
  state.js          shared UI state (paused, selection, visibility toggles)
  main.js           wires everything together and runs the frame loop
  sim/              physics + sensor, no drawing
    simulator.js    debris spawning, stepping, sensor scans ("INTERCEPTOR" hooks)
    bodies.js       sun/planet definitions, orbits, gravity
    math.js         rounding and seeded RNG
  render/           three.js scene
    stage.js        renderer, camera, controls, sky, lights
    rocket.js  planets.js  debris.js  overlays.js  textures.js
  ui/               DOM panels
    hud.js          top bar, sensor feed, detail panel, planet tables
    controls.js     sliders, toggles, buttons, click-to-select
    notify.js       toasts and impact flash
    format.js       number/unit formatting
  styles/           base (tokens), layout, panels, view

window.sim and window.CONFIG are exposed for poking around in the browser console.

About

AstroShield is a space debris detection and collision-prevention simulator built for HackPHS 2026, using Python, gravitational physics, and trajectory prediction to identify potential spacecraft collisions and calculate debris interception paths.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages