# pcschmidt/fusetrack architecture

> Architecture diagram of the GitHub repository pcschmidt/fusetrack, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pcschmidt/fusetrack
- Repository: https://github.com/pcschmidt/fusetrack

## Overview

FuseTrack is a Rust multi-target radar-fusion tracking library and scenario-evaluation toolkit, not a deployed sensor service. Its principal workflow simulates targets and radar scans, processes each scan through a GNN tracker (or optional JPDA association), then scores track quality. Tracking combines gated association and track management with EKF or optional IMM filtering; the README also describes maneuvering scenarios, clutter diagnosis, and OSPA/GOSPA and identity metrics. Edges are limited to calls/import references in sampled source and explicit README descriptions; several benchmark capabilities are documented but their implementation details were not sampled.

Main entry points: [`src/tracker.rs`](https://github.com/pcschmidt/fusetrack/blob/main/src/tracker.rs) (GNN tracker), [`src/eval.rs`](https://github.com/pcschmidt/fusetrack/blob/main/src/eval.rs) (Scenario evaluation), [`src/imm.rs`](https://github.com/pcschmidt/fusetrack/blob/main/src/imm.rs) (IMM filter), [`src/sim.rs`](https://github.com/pcschmidt/fusetrack/blob/main/src/sim.rs) (Scenario simulator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scenario["Scenario generation"]
  node_scenario_sim["Scenario simulator<br/>[sim.rs]"]
  node_radar["Radar model<br/>[models.rs]"]
end

subgraph group_tracking["Tracking and association"]
  node_tracker["GNN tracker<br/>[tracker.rs]"]
  node_assignment["Hungarian assignment<br/>[assignment.rs]"]
  node_jpda["JPDA association<br/>[jpda.rs]"]
end

subgraph group_filters["State estimation"]
  node_ekf["Extended Kalman filter<br/>[ekf.rs]"]
  node_imm["IMM filter<br/>[imm.rs]"]
end

subgraph group_evaluation["Evaluation"]
  node_scenario_eval["Scenario evaluation<br/>[eval.rs]"]
  node_metrics["OSPA / GOSPA<br/>[metrics.rs]"]
end

node_engineer(("Library user"))

node_engineer -->|"runs evaluation"| node_scenario_eval
node_scenario_eval -->|"simulates scans"| node_scenario_sim
node_scenario_sim -->|"generates measurements"| node_radar
node_scenario_eval -->|"evaluates scans"| node_tracker
node_tracker -->|"assigns measurements"| node_assignment
node_tracker -->|"uses PDA updates"| node_jpda
node_tracker -->|"updates tracks"| node_ekf
node_tracker -->|"uses optional IMM"| node_imm
node_imm -->|"runs model filters"| node_ekf
node_imm -->|"uses PDA update"| node_jpda
node_scenario_eval -->|"scores tracks"| node_metrics
node_metrics -->|"matches point sets"| node_assignment

click node_scenario_sim "https://github.com/pcschmidt/fusetrack/blob/main/src/sim.rs"
click node_radar "https://github.com/pcschmidt/fusetrack/blob/main/src/models.rs"
click node_scenario_eval "https://github.com/pcschmidt/fusetrack/blob/main/src/eval.rs"
click node_tracker "https://github.com/pcschmidt/fusetrack/blob/main/src/tracker.rs"
click node_assignment "https://github.com/pcschmidt/fusetrack/blob/main/src/assignment.rs"
click node_jpda "https://github.com/pcschmidt/fusetrack/blob/main/src/jpda.rs"
click node_ekf "https://github.com/pcschmidt/fusetrack/blob/main/src/ekf.rs"
click node_imm "https://github.com/pcschmidt/fusetrack/blob/main/src/imm.rs"
click node_metrics "https://github.com/pcschmidt/fusetrack/blob/main/src/metrics.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_scenario_sim,node_radar,node_engineer toneBlue
class node_tracker,node_assignment,node_jpda toneAmber
class node_ekf,node_imm toneMint
class node_scenario_eval,node_metrics toneRose
```

## Components

### Scenario generation

- [Scenario simulator](https://github.com/pcschmidt/fusetrack/blob/main/src/sim.rs): `src/sim.rs`
- [Radar model](https://github.com/pcschmidt/fusetrack/blob/main/src/models.rs): `src/models.rs`

### Tracking and association

- [GNN tracker](https://github.com/pcschmidt/fusetrack/blob/main/src/tracker.rs): `src/tracker.rs`
- [Hungarian assignment](https://github.com/pcschmidt/fusetrack/blob/main/src/assignment.rs): `src/assignment.rs`
- [JPDA association](https://github.com/pcschmidt/fusetrack/blob/main/src/jpda.rs): `src/jpda.rs`

### State estimation

- [Extended Kalman filter](https://github.com/pcschmidt/fusetrack/blob/main/src/ekf.rs): `src/ekf.rs`
- [IMM filter](https://github.com/pcschmidt/fusetrack/blob/main/src/imm.rs): `src/imm.rs`

### Evaluation

- [Scenario evaluation](https://github.com/pcschmidt/fusetrack/blob/main/src/eval.rs): `src/eval.rs`
- [OSPA / GOSPA](https://github.com/pcschmidt/fusetrack/blob/main/src/metrics.rs): `src/metrics.rs`

### Other components

- **Library user**

## Connections

- Library user → Scenario evaluation: runs evaluation (evidence: `README.md`)
- Scenario evaluation → Scenario simulator: simulates scans (evidence: `src/eval.rs`)
- Scenario simulator → Radar model: generates measurements (evidence: `src/sim.rs`)
- Scenario evaluation → GNN tracker: evaluates scans (evidence: `src/eval.rs`)
- GNN tracker → Hungarian assignment: assigns measurements (evidence: `src/tracker.rs`)
- GNN tracker → JPDA association: uses PDA updates (evidence: `src/tracker.rs`)
- GNN tracker → Extended Kalman filter: updates tracks (evidence: `src/tracker.rs`)
- GNN tracker → IMM filter: uses optional IMM (evidence: `src/tracker.rs`)
- IMM filter → Extended Kalman filter: runs model filters (evidence: `src/imm.rs`)
- IMM filter → JPDA association: uses PDA update (evidence: `src/imm.rs`)
- Scenario evaluation → OSPA / GOSPA: scores tracks (evidence: `src/eval.rs`)
- OSPA / GOSPA → Hungarian assignment: matches point sets (evidence: `src/metrics.rs`)
