How satheeshrock16-ship-it/leo_autonomus-planner works
Purpose and Entry Points
This is a Python prototype for autonomous low-Earth-orbit conjunction screening and collision-avoidance maneuvers, with an optional React/Cesium visualization and Arduino thrust-vector output. Primary execution is pipeline/run_full_pipeline.py; synthetic scenario runners provide deterministic demonstrations. The HTTP boundary is api/main.py, with a legacy/top-level API entry in backend_api.py.
Orbital Data Ingestion and State Preparation
The system starts with satellite/debris TLE catalogs, fetched from Space-Track and transformed into ECI state vectors for downstream propagation. Bundled JSON catalogs support offline operation.
• data/fetch_tle.py
• data/tle_to_eci.py
• data/satellite/satellite_tles.json
• data/debris/debris_tles.json
Collision-Screening Physics
Physics modules own the numerical domain boundary: two-body/Clohessy-Wiltshire propagation, encounter/intersection determination, refined time of closest approach, and collision probability from relative state and covariance/Mahalanobis distance. The pipeline consumes these domain outputs rather than embedding orbital mathematics.
• physics/two_body_propagation.py
• physics/cw_equation.py
• physics/tca_refinement.py
• physics/collision_probability_3d.py
• physics/orbit_intersection.py
Decision and Maneuver Planning
A conjunction assessment feeds AI-assisted validation, uncertainty estimation, and a burn/no-burn decision layer. When action is required, maneuver modules compute avoidance delta-v, optimize the maneuver, and model avoidance plus return-burn mechanics. A saved LightGBM delta-v artifact is available, with fallback behavior noted when LightGBM is absent.
• ai/pinn_model.py
• ai/bnn_model.py
• ai/lightgbm_model.py
• ai/delta_v_regressor.py
• physics/maneuver_optimizer.py
• physics/burn_physics.py
• models/delta_v_model.txt
Autonomous Pipeline and Replanning
Pipeline orchestration composes fetch, preprocessing, collision check, planning, and optional replanning into an execution flow. It is the main control-flow owner and separates nominal execution from synthetic safe/critical/strong encounter scenarios.
• pipeline/run_full_pipeline.py
• pipeline/fetch_data.py
• pipeline/preprocess.py
• pipeline/collision_check.py
• pipeline/replan.py
• pipeline/synthetic_case_engine.py
External Interfaces and Runtime Boundaries
The Python runtime depends materially on SGP4 for TLE propagation, requests for Space-Track access, and pyserial for physical command delivery. Maneuver results cross a command boundary as thrust-vector/duration data: Python serializes and sends it, while Arduino firmware maps it to three servo gimbal commands. Configuration is shared through root-level Python/YAML files.
• pipeline/propulsion_interface.py
• hardware/propulsion_controller.py
• hardware/arduino/thrust_vector_servo.ino
• config.py
• config.yaml
API, State, and Visualization
FastAPI-style routes expose object, collision, and maneuver operations over an engine/state/wrapper service layer, likely adapting pipeline results for clients. The separate JavaScript webapp calls this API and renders orbital data using Cesium assets; it is a presentation boundary, not the primary autonomy engine.
• api/main.py
• api/services/engine.py
• api/services/state.py
• api/routes/collisions.py
• webapp/src/api.js
• webapp/src/components/EarthViewer.js
Main entry points: run_full_pipeline.py Full autonomy pipeline · fetch_tle.py TLE fetcher · maneuver_optimizer.py Maneuver planning · tle_to_eci.py TLE to ECI
Components 19
Orbital data
- Space-Track · Live TLE source.
- Bundled TLE catalogs · Satellite and debris JSON catalogs.
data/satellite/satellite_tles.json - TLE fetcher
data/fetch_tle.py - TLE to ECI
data/tle_to_eci.py
Screening physics
- Orbit propagation · Two-body and Clohessy-Wiltshire propagation.
physics/two_body_propagation.py - Encounter analysis · Intersection detection and refined closest approach.
physics/orbit_intersection.py - Collision probability · Computes covariance-based collision risk.
physics/collision_probability_3d.py
Autonomy pipeline
- AI validation & uncertainty · PINN and Bayesian validation support assessment.
ai/pinn_model.py - Burn decision · Selects burn or no-burn from assessed conjunctions.
pipeline/collision_check.py - Maneuver planning · Computes and optimizes avoidance and return burns.
physics/maneuver_optimizer.py - Delta-v regressor · LightGBM-backed delta-v estimate with fallback.
models/delta_v_model.txt - Replanning · Adjusts planned action when needed.
pipeline/replan.py - Full autonomy pipeline · Primary execution flow for fetch, screening, planning, and replanning.
pipeline/run_full_pipeline.py - Synthetic scenarios · Deterministic safe, critical, and strong encounters.
pipeline/synthetic_case_engine.py
Interfaces
- API engine & state · Adapts autonomy results for API operations.
api/services/engine.py - HTTP API · Exposes object, collision, and maneuver operations.
api/main.py - Cesium webapp · Renders orbital data and calls the API.
webapp/src/components/EarthViewer.js - Propulsion command · Serializes thrust-vector and duration commands.
pipeline/propulsion_interface.py - Arduino gimbal firmware · Maps thrust vectors to three servo commands.
hardware/arduino/thrust_vector_servo.ino
Connections 22
- Space-Track → TLE fetcher: live TLEs
- Bundled TLE catalogs → TLE fetcher: offline fallback
- TLE fetcher → TLE to ECI: TLE catalog
- TLE to ECI → Orbit propagation: ECI states
- Orbit propagation → Encounter analysis: trajectories
- Encounter analysis → Collision probability: relative encounter
- Collision probability → AI validation & uncertainty: risk assessment
- AI validation & uncertainty → Burn decision: validated risk
- Burn decision → Maneuver planning: burn required
- Delta-v regressor → Maneuver planning: delta-v estimate
- Maneuver planning → Replanning: planned maneuver
- Replanning → Propulsion command: approved command
- Propulsion command → Arduino gimbal firmware: serial thrust vector
- Full autonomy pipeline → TLE fetcher: orchestrates
- Full autonomy pipeline → TLE to ECI: orchestrates
- Full autonomy pipeline → Burn decision: orchestrates
- Full autonomy pipeline → Maneuver planning: orchestrates
- Full autonomy pipeline → Replanning: optional loop
- Synthetic scenarios → Full autonomy pipeline: scenario inputs
- Full autonomy pipeline → API engine & state: results
- API engine & state → HTTP API: operations
- Cesium webapp → HTTP API: API calls