Skip to content

OrbitGuard AI is an intelligent satellite monitoring agent that detects close encounters between satellites, calculates visibility from custom base stations, and visualizes orbits in interactive 2D and 3D maps using real-time TLE data from Space-Track.org.

Notifications You must be signed in to change notification settings

recepsuluker/OrbitGuardAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›°οΈ OrbitGuard AI

Advanced Satellite Tracking & Collision Detection System

Python Version License: MIT Streamlit Redis Rust

Real-time satellite tracking β€’ Conjunction detection β€’ Visibility predictions β€’ High-performance analytics

Features β€’ Installation β€’ Performance β€’ Usage β€’ Documentation


🌟 Highlights

OrbitGuard AI is a high-performance satellite tracking and monitoring platform with:

πŸš€ Real-time TLE Data - Automatic retrieval from Space-Track.org
⚠️ Collision Detection - Advanced proximity analysis between satellites
πŸ“‘ Visibility Predictions - Ground station pass forecasting
πŸ—ΊοΈ Interactive Visualization - 2D (Folium) and 3D (Plotly) globe views
πŸ“Š Performance Optimized - Redis caching, async processing, Rust engine
πŸ’Ύ Data Export - CSV and HTML reports for post-analysis


πŸš€ Features

Core Capabilities

Feature Description Status
πŸ›°οΈ TLE Retrieval Automatic satellite data fetching from Space-Track.org βœ… Active
⚠️ Conjunction Analysis Satellite-to-satellite close approach detection βœ… Active
πŸ“‘ Visibility Passes Ground station visibility predictions βœ… Active
πŸ—ΊοΈ 2D Visualization Interactive Folium maps with satellite tracks βœ… Active
🌍 3D Globe Three.js + Plotly 3D Earth visualization βœ… Active
πŸ“Š CSV/HTML Export Downloadable analysis reports βœ… Active
🎨 Theme System Nadir.space, Dracula, Solarized & Custom Builder βœ… NEW

πŸ”₯ Performance Optimization (Step 1) βœ…

Feature Improvement Technology
πŸ’Ύ Redis Caching 450x faster (cache hit) Redis + hiredis
⚑ Async Fetching 5-10x speedup aiohttp + asyncio
πŸ¦€ Rust Engine 100x faster computations PyO3 + Rayon
πŸ“ˆ Batch Processing Handle 1000+ satellites Multi-threaded

Performance Metrics:

  • 100 satellite analysis: 45s β†’ 5s (9x faster)
  • Cached queries: 45s β†’ 0.1s (450x faster)
  • 1000 satellite conjunction: timeout β†’ 30s (100x+ faster)

🌐 Web-First Architecture (Step 2) βœ…

Feature Description Technology
πŸš€ FastAPI Backend Modern REST API with auto-docs FastAPI + Uvicorn
πŸ“‘ WebSocket Support Real-time satellite updates WebSockets
πŸ” CORS Middleware Frontend integration ready CORS headers
πŸ“– Auto Documentation Interactive API docs at /api/docs OpenAPI/Swagger

API Endpoints:

  • GET /api/health - Service health check
  • POST /api/tle/fetch - Fetch TLE data
  • POST /api/analysis/conjunction - Conjunction analysis
  • GET /api/satellites/search - Search satellites
  • WS /ws/updates - Real-time updates

πŸ—„οΈ Full Catalog System (Step 3) βœ…

Feature Description Technology
πŸ“Š SQLite Database 66k+ satellite catalog storage SQLite3
πŸ”„ Auto-Sync Daily TLE updates (24h interval) APScheduler
πŸ” Advanced Search Search by name, NORAD ID, country SQL indexing
πŸ“ˆ Statistics Launch stats, country breakdowns Aggregate queries

Database Features:

  • Automatic TLE updates every 24 hours
  • Search and filtering (name, country, type)
  • Update history tracking
  • Performance indexing

οΏ½ Installation

Prerequisites

  • Python 3.8 or higher
  • Redis (optional, for caching)
  • Rust (optional, for Rust engine)

Quick Start

# 1. Clone the repository
git clone https://github.com/recepsuluker/OrbitGuardAI.git
cd OrbitGuardAI

# 2. Install Python dependencies
pip install -r requirements.txt

# 3. (Optional) Set up environment variables
cp .env.example .env
# Edit .env with your Space-Track credentials

# 4. Run the application
streamlit run app.py

Advanced Setup (Performance Optimization)

For maximum performance, enable Redis cache and Rust engine:

# Install Redis (Windows - Chocolatey)
choco install redis-64
redis-server

# OR use Redis Cloud (free tier)
# https://redis.com/try-free/

# Build Rust engine (optional)
cd rust_engine
pip install maturin
maturin develop --release
cd ..

πŸ“– Detailed setup guide: PERFORMANCE_OPTIMIZATION.md


πŸ–₯️ Usage

Basic Workflow

  1. Launch the app:

    streamlit run app.py
  2. Enter Space-Track credentials (free registration: https://www.space-track.org/auth/login)

  3. Input NORAD IDs (e.g., 25544,48274,52740,55012,56210)

  4. Set ground station location (latitude, longitude, elevation)

  5. Run analysis and view results:

    • πŸ“Š Conjunction warnings
    • πŸ“‘ Visibility passes
    • �️ 2D/3D visualizations
    • πŸ’Ύ Download CSV/HTML reports

Example NORAD IDs

25544  - ISS (ZARYA)
48274  - STARLINK-1007
52740  - STARLINK-2278
55012  - STARLINK-3038
56210  - STARLINK-3291

πŸ“ Project Structure

OrbitGuardAI/
β”‚
β”œβ”€β”€ 🎯 Core Application
β”‚   β”œβ”€β”€ app.py                      # Streamlit web interface
β”‚   β”œβ”€β”€ orbit_agent.py              # TLE fetching & Space-Track API
β”‚   β”œβ”€β”€ orbit_engine.py             # Orbital mechanics (Keplerian)
β”‚   β”œβ”€β”€ visualization.py            # 2D/3D plotting
β”‚   β”œβ”€β”€ globe_3d.py                 # Three.js integration
β”‚   β”œβ”€β”€ themes.py                   # UI theme system (Step 8)
β”‚   └── components.py               # Reusable UI components
β”‚
β”œβ”€β”€ ⚑ Performance Optimization (Step 1)
β”‚   β”œβ”€β”€ cache_manager.py            # Redis caching system
β”‚   β”œβ”€β”€ orbit_agent_async.py        # Async TLE fetcher
β”‚   β”œβ”€β”€ benchmark.py                # Performance testing
β”‚   └── rust_engine/                # Rust orbital calculations
β”‚
β”œβ”€β”€ 🌐 Web Backend (Step 2)
β”‚   β”œβ”€β”€ api_server.py               # FastAPI REST API
β”‚   └── (frontend/)                 # React frontend (future)
β”‚
β”œβ”€β”€ πŸ—„οΈ Database System (Step 3)
β”‚   β”œβ”€β”€ database_manager.py         # SQLite manager
β”‚   β”œβ”€β”€ auto_catalog_sync.py        # Auto-sync daemon
β”‚   └── orbitguard.db              # SQLite database
β”‚
β”œβ”€β”€ πŸ§ͺ Testing
β”‚   β”œβ”€β”€ tests/                      # Pytest suite
β”‚   β”œβ”€β”€ pytest.ini
β”‚   └── benchmark.py
β”‚
β”œβ”€β”€ πŸ“„ Configuration
β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”œβ”€β”€ .env.example
β”‚   └── .gitignore
β”‚
└── πŸ“š Documentation
    β”œβ”€β”€ README.md                   # This file
    └── PERFORMANCE_OPTIMIZATION.md # Setup guide

Output Files

File Description Format
conjunction-warning.csv Satellite close encounter report CSV
plan_s_satellite_passes.csv Ground station visibility passes CSV
satellite_track_2d.html Interactive 2D Folium map HTML
satellite_track_3d.html Interactive 3D Plotly globe HTML

πŸ§ͺ Testing & Benchmarking

# Run all tests
pytest tests/ -v

# Quick performance test
python benchmark.py --quick

# Full benchmark (10, 50, 100, 500 satellites)
python benchmark.py

Expected benchmark results:

Test Case         Python (s)    Rust (s)    Speedup
───────────────────────────────────────────────────
10 Satellites     0.234         0.018       13.0x
50 Satellites     5.823         0.465       12.5x
100 Satellites    23.451        1.892       12.4x
500 Satellites    582.123       47.235      12.3x

πŸ”§ Configuration

Create a .env file from .env.example:

# Space-Track.org Credentials
SPACETRACK_USERNAME=your_username
SPACETRACK_PASSWORD=your_password

# Redis Cache (optional)
REDIS_URL=redis://localhost:6379/0
CACHE_TTL_HOURS=24

# Performance Settings
USE_CACHE=true
USE_ASYNC=true
USE_RUST=false

πŸ“ˆ Performance Optimization & New Features

Step 1: Redis Cache

Reduce API calls by 95% with automatic TLE caching:

from cache_manager import TLECacheManager

cache = TLECacheManager()
tle_data = cache.get_tle_data([25544, 48274])

Step 1: Async Agent

Fetch multiple satellites concurrently (5-10x faster):

from orbit_agent_async import run_sync

tle_data = run_sync([25544, 48274, 52740], username, password)

Step 1: Rust Engine

Ultra-fast conjunction detection (100x+ improvement):

import orbit_core

conjunctions = orbit_core.find_conjunctions(satellites, threshold_km=10.0)

Step 2: FastAPI Backend

Modern REST API with WebSocket support:

# Start API server
python api_server.py

# API available at: http://localhost:8000
# Docs at: http://localhost:8000/api/docs

Example API Usage:

import requests

# Fetch TLE data
response = requests.post('http://localhost:8000/api/tle/fetch', json={
    'norad_ids': [25544, 48274],
    'use_cache': True
})

# Search satellites
response = requests.get('http://localhost:8000/api/satellites/search?query=ISS')

Step 3: Full Catalog System

Automatic satellite database with 66k+ satellites:

# Run manual sync
python auto_catalog_sync.py

# Or start daemon for automatic updates (24h interval)
# Edit auto_catalog_sync.py and uncomment sync_daemon.start()

Database Usage:

from database_manager import DatabaseManager

db = DatabaseManager()

# Search satellites
results = db.search_satellites(query='STARLINK', country='USA', limit=100)

# Get statistics
stats = db.get_statistics()
print(f"Total satellites: {stats['total_satellites']}")

Step 8: Advanced Theme System

Personalize your monitoring experience with multiple built-in themes or create your own:

  • Nadir.space: Exact Gruvbox palette transition.
  • Dracula: High-contrast cyberpunk aesthetic.
  • Solarized: Scientifically balanced light/dark modes.
  • Custom Builder: Full control over background, accent, and text colors.

Access these from the sidebar 🎨 Theme Settings section.

πŸ“– Full guide: PERFORMANCE_OPTIMIZATION.md


πŸ“Έ Screenshots

3D Globe Visualization

3D Globe

Conjunction Analysis Dashboard

Real-time satellite proximity warnings with risk scoring

Ground Station Visibility

Pass predictions with azimuth/elevation charts


πŸ›£οΈ Roadmap

v2.0 (Q1 2026)

  • FastAPI backend + React frontend
  • PostgreSQL database for TLE history
  • User authentication system
  • REST API for external integrations

v2.1 (Q2 2026)

  • Machine learning collision prediction
  • WebSocket real-time updates
  • Multi-station network support
  • Mobile app (React Native)

v3.0 (Q3 2026)

  • GPU-accelerated orbital propagation
  • Distributed caching (Redis Cluster)
  • Advanced analytics dashboard
  • Commercial API offering

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ‘¨β€πŸ’» Author

Recep Suluker

  • GitHub: @recepsuluker
  • Project: Real-time LEO traffic analysis with Plan-S constellation
  • Contact: Open an issue for questions/suggestions

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Free for commercial and personal use.


πŸ™ Acknowledgments

  • Space-Track.org - TLE data provider
  • Skyfield - Astronomical computations library
  • Plotly & Folium - Visualization frameworks
  • Streamlit - Web UI framework
  • Rust & PyO3 - High-performance computing

πŸ“ž Support

Found a bug? Have a feature request?


⭐ Star this repo if you find it useful!

Made with ❀️ by Recep Suluker

About

OrbitGuard AI is an intelligent satellite monitoring agent that detects close encounters between satellites, calculates visibility from custom base stations, and visualizes orbits in interactive 2D and 3D maps using real-time TLE data from Space-Track.org.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages