An open API service indexing awesome lists of open source software.

https://github.com/vitalcheffe/aegis

Autonomous kinetic interceptor swarm. 50Hz hard-real-time logic, UKF state estimation, and BFT sensor fusion. Inverting the air defense cost-curve.
https://github.com/vitalcheffe/aegis

aerospace autonomous-drones defense embedded-systems kalman-filter osint robotics swarm-intelligence systems-engineering

Last synced: 3 months ago
JSON representation

Autonomous kinetic interceptor swarm. 50Hz hard-real-time logic, UKF state estimation, and BFT sensor fusion. Inverting the air defense cost-curve.

Awesome Lists containing this project

README

          

# πŸ›‘οΈ AEGIS

### _Autonomous Kinetic Interceptor Swarm._

**500 drones. $4,200 each. Against $4M missiles.**



















---

> [!IMPORTANT]
> **A $4,200 drone vs a $4,000,000 missile. That is the entire point.**
>
> Armies spend millions to shoot down things that cost thousands. The math doesn't work.
> **AEGIS flips it.**

---

## πŸš€ The Problem

A Shahed-136 costs **$20,000**. The missile used to intercept it costs **$2,000,000**. That's a 100:1 cost ratio β€” and the attacker always wins the economics.

Current air defense was designed for expensive threats: fighter jets, cruise missiles, ballistic missiles. Against cheap, mass-produced drones and loitering munitions, it collapses. You can't afford to shoot a Patriot at every $20K drone.

**AEGIS inverts the cost curve.** A swarm of autonomous interceptor drones at **$4,200 per unit** β€” with distributed sensor fusion, autonomous target assignment, and energy-aware routing.

---

## πŸ’° The Economics

| Threat | Cost | Current Intercept | Intercept Cost | Ratio | **AEGIS Cost** | **AEGIS Ratio** |
|:-------|-----:|:------------------|---------------:|------:|---------------:|----------------:|
| Shahed-136 | $20,000 | Patriot PAC-3 | $2,000,000 | 1:100 | **$4,200** | **1:0.2** |
| Lancet-3 | $35,000 | IRIS-T SLM | $450,000 | 1:13 | **$4,200** | **1:0.1** |
| Cruise Missile | $1,500,000 | SM-6 | $4,000,000 | 1:2.7 | **$12,600** (3x) | **1:0.008** |
| Mixed Wave (10Γ—) | $200,000 | Layered Defense | $8,000,000+ | 1:40 | **$42,000** | **1:0.2** |

---

## 🎯 What It Does

500 drones patrol at **300m altitude**. When a threat appears, the system detects it, classifies it, tracks it, and sends the best-positioned drone to intercept.

- ⚑ **50 Hz real-time tick rate** β€” full 500-drone cycle in ~6ms on a laptop
- πŸ§‘β€βœˆοΈ **Human veto at any point** β€” weapons locked by default, always
- 🎯 **3 interception waves tested** β€” Shahed-136, Lancet-3, mixed with decoys
- πŸ”’ **Byzantine fault-tolerant** β€” bad sensor data gets rejected automatically
- πŸ”‹ **Energy-aware routing** β€” drones go home before they fall out of the sky

---

## πŸ”§ Modules

```mermaid
flowchart TB
subgraph SENSORS["πŸ“‘ Sensor Layer"]
EO[EO/IR Camera
Sony IMX678 + FLIR Lepton]
RADAR[24GHz Radar
Inxpect LBK-24]
GPS[RTK GPS
Here3+]
IMU[Redundant IMU
ICM-42688-P Γ—2]
end

subgraph M1["M1 β€” Sensor Fusion"]
BFT[Byzantine Fault-Tolerant
MAD Filter]
end

subgraph M2["M2 β€” UKF Tracker"]
UKF[9-State Unscented
Kalman Filter]
end

subgraph M3["M3 β€” Elastic Net"]
FORM[Formation Control
6 Nearest Neighbors
O(6N)]
end

subgraph M4["M4 β€” Energy Budget"]
ENERGY[3-Reserve Model
Chute Β· RTB Β· Combat]
end

subgraph SAFETY["πŸ”’ Safety Layer"]
LOCK[ProximityLock
Weapon Safe by Default]
HUMAN[HumanLoopGate
Final Authorization]
ADSB[ADS-B Spoof
Detector]
end

SENSORS --> M1
M1 --> M2
M2 --> M3
M3 --> M4
M4 --> SAFETY

style SENSORS fill:#1a1a2e,stroke:#e94560,color:#fff
style M1 fill:#16213e,stroke:#0f3460,color:#fff
style M2 fill:#0f3460,stroke:#533483,color:#fff
style M3 fill:#1a1a2e,stroke:#e94560,color:#fff
style M4 fill:#16213e,stroke:#0f3460,color:#fff
style SAFETY fill:#2d0a0a,stroke:#ff4444,color:#fff
```

| Module | What It Does |
|:-------|:-------------|
| **M1 β€” Spectral Fusion** | Byzantine fault-tolerant data fusion (MAD filter). Drones report what they see β€” bad data gets rejected automatically. No single compromised sensor can corrupt the picture. |
| **M2 β€” UKF Tracker** | 9-state Unscented Kalman Filter. Tracks position, velocity, and acceleration of high-speed maneuvering targets. Handles evasive threats. |
| **M3 β€” Elastic Net** | Formation control via 6 nearest neighbors. **O(6N)** instead of O(NΒ²) β€” 83Γ— faster than full mesh at N=500. |
| **M4 β€” Energy Budget** | Three inviolable reserves per drone: chute (10Wh), RTB (40Wh), combat (60Wh). If the math doesn't clear, the drone goes home. No exceptions. |
| **Safety β€” ProximityLock** | Weapons locked by default. Requires active proof of safety every tick to unlock. Fail-safe: if anything goes wrong, weapons lock. |
| **Safety β€” HumanLoopGate** | Final human authorization. No engagement without human approval. Always. |
| **Safety β€” ADS-B Spoof Detector** | Detects spoofed ADS-B transponder signals to prevent friendly-fire. |

---

## ✈️ The Airframe β€” Tessera MK.II

Delta-canard CFRP, built for speed and endurance.

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ EO/IR β”‚
β”‚ Sensor β”‚
β”Œβ”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”
β•± CANARD L CANARD β•²
β•± β”Œβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β” β•²
β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
SPRINT ◄─────│ β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β”‚ │─────► PATROL
320 km/h β”‚ β”‚ β–ˆ JETSON β–ˆ β”‚ β”‚ 180 km/h
β”‚ β”‚ β–ˆ ORIN NX β–ˆ β”‚ β”‚
β•² β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β”‚ β•±
β•² β”‚ MAIN WING β”‚ β•±
β•²β”‚ 940mm span β”‚ β•±
β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
β”‚ MOTOR β”‚
β”‚ U10+ β”‚
β”‚ 700W β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

| Spec | Value |
|:-----|:------|
| **Wingspan** | 940 mm |
| **MTOW** | 7.2 kg |
| **Configuration** | Delta-canard |
| **Material** | T800H/3900-2 CFRP prepreg |
| **EO Sensor** | Sony IMX678 (4K 60fps, 0.1 lux) |
| **Thermal** | FLIR Lepton 3.5 (LWIR 8–14 ΞΌm) |
| **Radar** | Inxpect 24 GHz Doppler (Β±50 m/s) |
| **Compute** | Jetson Orin NX (70 TOPS) + Hailo H15 (40 TOPS) |
| **Mesh Network** | 60 GHz phased array (500 Mbps) |
| **Sprint Speed** | 320 km/h (Cesaroni Pro54 booster) |
| **Patrol Speed** | 180 km/h |
| **Endurance** | ~45 min patrol / ~8 min sprint |

Full BOM with part numbers and prices: [`docs/BOM.md`](docs/BOM.md)

---

## πŸ“Š Does It Work?

| Test | Status | Details |
|:-----|:------:|:--------|
| Unit Tests | βœ… | All modules tested individually |
| Fusion (M1) | βœ… | Byzantine rejection validated |
| UKF (M2) | βœ… | 9-state tracking converges |
| Elastic Net (M3) | βœ… | 500-drone formation stable |
| Energy (M4) | βœ… | Reserve model enforced |
| Safety | βœ… | ProximityLock + HumanLoopGate |
| Wave 1 β€” Shahed-136 | βœ… | Single target intercept |
| Wave 2 β€” Lancet-3 | ⚠️ | 3Γ— targets, convergence in progress |
| Wave 3 β€” Mixed + Decoys | βœ… | Decoy rejection working |
| Hardware | ❌ | Simulation only β€” no physical drone built yet |

> [!NOTE]
> **Honesty corner:** The code runs. Tests pass. The simulation is real (ISA atmosphere, real drag coefficients, real motor specs). But nobody's built the drone yet. Wave 2 isn't fully converged. That's life β€” this is a research project, not a product.

---

## ⚑ Performance

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 50 Hz PIPELINE BENCHMARK β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β”‚
β”‚ Sensor Fusion (M1) β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 0.8ms β”‚
β”‚ UKF Tracking (M2) β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 1.2ms β”‚
β”‚ Elastic Net (M3) β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 1.5ms β”‚
β”‚ Energy Budget (M4) β–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 0.4ms β”‚
β”‚ Safety Checks β–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 0.3ms β”‚
β”‚ Command Dispatch β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 0.2ms β”‚
β”‚ ────────────────────────────────────────── β”‚
β”‚ TOTAL β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘ ~4.4ms β”‚
β”‚ TICK BUDGET (50Hz) β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 20ms β”‚
β”‚ HEADROOM β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘ 15.6ms β”‚
β”‚ β”‚
β”‚ βœ… 500 drones @ 50Hz on laptop (i7-12700H) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

---

## πŸš€ Quick Start

### Install

```bash
git clone https://github.com/Vitalcheffe/Aegis.git
cd Aegis
pip install -r requirements.txt
```

### Run Tests

```bash
# All tests
python tests/test_all.py

# Individual modules
python tests/test_fusion.py
python tests/test_ukf.py
python tests/test_energy.py
python tests/test_safety.py
```

### Run Simulation

```bash
# Nevada scenario β€” 3 waves
python simulations/nevada_scenario.py

# Benchmark pipeline
python scripts/simulate.py
```

### Prerequisites

| Requirement | Version |
|:------------|:--------|
| **Python** | 3.11+ |
| **NumPy** | 1.26+ |
| **SciPy** | 1.12+ |

No exotic dependencies. No GPU required for simulation.

---

## πŸ“ Project Structure

```
Aegis/
β”œβ”€β”€ πŸ“‚ src/aegis/
β”‚ β”œβ”€β”€ 🐍 origin_core.py # 50Hz orchestrator β€” ZERO business logic
β”‚ β”œβ”€β”€ 🐍 core.py # Main entry point
β”‚ β”œβ”€β”€ 🐍 oc_types.py # Shared types + physical constants
β”‚ β”‚
β”‚ β”œβ”€β”€ πŸ“‚ fusion/
β”‚ β”‚ └── 🐍 spectral_fusion.py # M1 β€” Byzantine fault-tolerant sensor fusion
β”‚ β”‚
β”‚ β”œβ”€β”€ πŸ“‚ ukf/
β”‚ β”‚ └── 🐍 intercept_ukf.py # M2 β€” 9-state Unscented Kalman Filter
β”‚ β”‚
β”‚ β”œβ”€β”€ πŸ“‚ swarm/
β”‚ β”‚ └── 🐍 elastic_net.py # M3 β€” Formation control, O(6N)
β”‚ β”‚
β”‚ β”œβ”€β”€ πŸ“‚ energy/
β”‚ β”‚ └── 🐍 budget_manager.py # M4 β€” 3-reserve energy model
β”‚ β”‚
β”‚ └── πŸ“‚ safety/
β”‚ └── 🐍 proximity_lock.py # ProximityLock + HumanLoopGate + ADS-B
β”‚
β”œβ”€β”€ πŸ“‚ simulations/
β”‚ └── 🐍 nevada_scenario.py # 3-wave intercept simulation
β”‚
β”œβ”€β”€ πŸ“‚ tests/
β”‚ β”œβ”€β”€ πŸ§ͺ test_all.py # Run all tests
β”‚ β”œβ”€β”€ πŸ§ͺ test_fusion.py
β”‚ β”œβ”€β”€ πŸ§ͺ test_ukf.py
β”‚ β”œβ”€β”€ πŸ§ͺ test_energy.py
β”‚ β”œβ”€β”€ πŸ§ͺ test_safety.py
β”‚ └── πŸ§ͺ test_oc_types.py
β”‚
β”œβ”€β”€ πŸ“‚ docs/
β”‚ β”œβ”€β”€ πŸ“‹ BOM.md # Full bill of materials ($4,200/unit)
β”‚ β”œβ”€β”€ πŸ—οΈ architecture.md # Design decisions
β”‚ └── πŸ“‚ figures/
β”‚
β”œβ”€β”€ πŸ“‚ scripts/
β”‚ └── 🐍 simulate.py # Pipeline benchmark
β”‚
β”œβ”€β”€ βš™οΈ pyproject.toml
β”œβ”€β”€ πŸ“‹ requirements.txt
└── πŸ“„ LICENSE # MIT
```

---

## πŸ”’ Safety Philosophy

> [!CAUTION]
> **Weapons are locked by default. Always.**

AEGIS implements a **defense-in-depth safety model**:

1. **ProximityLock** β€” Every drone's weapon system starts LOCKED. To unlock, the drone must provide active proof of safety every single tick (20ms). If anything goes wrong β€” communication lost, sensor failure, unexpected behavior β€” weapons lock immediately.

2. **HumanLoopGate** β€” No engagement without human authorization. Period. The system can track, classify, and recommend β€” but the final "go" requires a human.

3. **ADS-B Spoof Detection** β€” Detects spoofed transponder signals to prevent friendly-fire against civilian or allied aircraft.

4. **3-Reserve Energy Model** β€” No drone can spend its RTB or chute reserves. If the math doesn't clear for a safe return, the drone doesn't engage. No exceptions, no overrides.

5. **Byzantine Fusion** β€” Compromised or malfunctioning sensors are automatically rejected. No single bad sensor can corrupt the tactical picture.

---

## 🌐 System Architecture

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ COMMAND CENTER β”‚
β”‚ (Human Operator) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ Auth + Veto
β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ AEGIS CORE (50Hz) β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Fusion β”‚β†’β†’β”‚ UKF β”‚β†’β†’β”‚ Net β”‚β†’β†’β”‚Energyβ”‚β†’β†’β”‚Safe β”‚ β”‚
β”‚ β”‚ M1 β”‚ β”‚ M2 β”‚ β”‚ M3 β”‚ β”‚ M4 β”‚ β”‚Lock β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ DroneCommands
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β–Ό β–Ό β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚Drone 001β”‚ β”‚Drone 002β”‚ β”‚Drone 500β”‚ Γ— 500
β”‚ EO/IR β”‚ β”‚ EO/IR β”‚ β”‚ EO/IR β”‚
β”‚ Radar β”‚ β”‚ Radar β”‚ β”‚ Radar β”‚
β”‚ Mesh β”‚ β”‚ Mesh β”‚ β”‚ Mesh β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ 60GHz Mesh
β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
β”‚ SWARM β”‚
β”‚ O(6N) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

---

## 🀝 Contributing

**This is a research project. Contributions are welcome β€” especially from people who know aerospace, control theory, or embedded systems.**

1. **Fork** the Project
2. **Create** your Feature Branch
```bash
git checkout -b feature/AmazingFeature
```
3. **Commit** your Changes
```bash
git commit -m 'feat: add AmazingFeature'
```
4. **Push** to the Branch
```bash
git push origin feature/AmazingFeature
```
5. **Open** a Pull Request

**Areas that need help:**
- 🎯 Wave 2 convergence (3Γ— Lancet-3 intercept)
- πŸ”¬ Hardware-in-the-loop testing
- πŸ“‘ Real sensor integration
- πŸ§ͺ Monte Carlo validation
- πŸ“– Documentation and diagrams

---

## πŸ“š References & Inspiration

- **Estimation and Tracking** β€” Bar-Shalom, Li, Kirubarajan (2001)
- **Swarm Intelligence** β€” Bonabeau, Dorigo, Theraulaz (1999)
- **Byzantine Fault Tolerance** β€” Lamport, Shostak, Pease (1982)
- **Unscented Kalman Filter** β€” Julier, Uhlmann (1997)
- **Elastic Net Formation** β€” Kaiser, GΓΆrner, Schmickl, Crailsheim (2012)

---

## πŸ“Š Stats

![GitHub Stars](https://img.shields.io/github/stars/Vitalcheffe/Aegis?style=social)
![GitHub Forks](https://img.shields.io/github/forks/Vitalcheffe/Aegis?style=social)
![GitHub Watchers](https://img.shields.io/github/watchers/Vitalcheffe/Aegis?style=social)

[![Star History Chart](https://api.star-history.com/svg?repos=Vitalcheffe/Aegis&type=date)](https://www.star-history.com/#Vitalcheffe/Aegis&type=date)

---

## πŸ“„ License

Distributed under the **MIT License**. See [`LICENSE`](LICENSE) for more information.

Build on it. Improve it. Make the math work.

---

### Made with ❀️, 🎯, and πŸ”¬ by [Amine Harch el Korane](https://github.com/Vitalcheffe)

_Inverting the air defense cost curve._

![AEGIS](https://socialify.git.ci/Vitalcheffe/Aegis/image?description=1&font=Raleway&forks=1&issues=1&language=1&name=1&owner=1&pattern=Circuit+Board&pulls=1&stargazers=1&theme=Dark)