Inspiration
With the increasing number of satellites and debris in low Earth orbit (LEO), the risk of collisions is constantly rising. We were inspired to build a tool that makes complex orbital mechanics accessible. Anticipating close approaches is crucial to avoid the Kessler Syndrome, and we wanted to bring that capability to a modern, accessible web interface.
What it does
OrbitGuard is a full-stack web application designed for satellite collision risk prediction. It simulates and predicts potential collision risks between two objects using TLE (Two-Line Element) tracking data and displays the results in an interactive 3D Earth visualization.
How we built it
We split the architecture into a robust backend and a dynamic frontend:
- Backend: Built with Python and FastAPI. It connects to the Celestrak API to pull TLE records and uses the
skyfieldlibrary to calculate satellite ephemerides. - Frontend: Built with React and Vite, utilizing CesiumJS for the 3D globe and vanilla CSS variables for a futuristic cyberpunk UI.
To calculate the risk, we evaluate the Euclidean distance ( d ) between two satellites. The minimum distance over a 24-hour simulation window is found using: $$d(t) = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2 + (z_2-z_1)^2}$$
Here is a simplified example of our endpoint logic:
@app.get("/predict/{id1}/{id2}")
def predict_collision(id1: str, id2: str):
# Fetch TLE and simulate 24-hour window
return {"cpa_distance_km": 1.5, "risk": "High"}
Challenges we ran into
Processing orbital mechanics at 1-minute intervals over a 24-hour window is computationally heavy. We had to optimize our loops to ensure the distance calculations were fast enough for a seamless web request. Additionally, mapping the geocentric coordinates accurately onto the 3D globe without lag was a major technical hurdle.
Accomplishments that we're proud of
We successfully built a dynamic risk display that not only computes the minimum approach distance and UTC time but also presents it in an aesthetic, glassmorphism-styled control panel. Creating a smooth bridge between complex Python astrodynamics and a React frontend is something we are very proud of.
What we learned
We learned a massive amount about orbital mechanics, specifically how to parse and utilize TLE data to project positions in a 3D space. We also deepened our full-stack knowledge, particularly in managing heavy 3D geospatial rendering in the browser.
What's next for OrbitGuard
We plan to implement Many-to-Many Collision Checking to evaluate an entire constellation against known space debris fragments instead of just binary satellite checks. We also want to add real-time push updates via websockets and predictive delta-V algorithms to suggest minimal maneuvers to avoid high-risk collisions.
Built With
- celestrak
- cesiumjs
- fastapi
- html
- javascript
- python
- react
- skyfield
- vite