Tracker Component Library
A Python port of the U.S. Naval Research Laboratory’s Tracker Component Library, providing a comprehensive collection of algorithms for target tracking and state estimation.
v1.15.0 — 1,421 functions | 183 modules | 3,122 tests | 100% MATLAB parity | 100% mypy –strict | 80% coverage | 8 Interactive Notebooks | GPU acceleration
Note
100% MATLAB Parity Achieved: Starting with v1.13.2, all tier 1 and tier 2 missing components are now implemented: NRLMSISE-00 atmosphere model, constrained EKF, and Rao-Blackwellized particle filters. GPU acceleration (CuPy + MLX) provides 10-15x speedup for batch processing. Ready for v2.0.0 release.
Start Here
- Getting Started
- Library Architecture
- API Navigation Guide
- Common Use Cases & Recipes
- Basic Single-Target Kalman Filtering
- Multi-Target Tracking with Assignment
- Extended Kalman Filter with Nonlinear Dynamics
- Unscented Kalman Filter
- INS/GNSS Navigation
- Particle Filter for Nonlinear Non-Gaussian Systems
- Adaptive Kalman Filtering
- Batch Processing / Smoothing
- Data Association with Gating
Filtering & Estimation
- Kalman Filter Tuning Guide
- Constrained State Estimation
- Hybrid Linear/Nonlinear Filtering with RBPF
- Adaptive Filtering
- When to Use Adaptive Filtering
- Divergence Detection Techniques
- Noise Covariance Estimation
- Adaptive Kalman Filtering
- Least Mean Squares (LMS) Adaptation
- Recursive Least Squares (RLS) Adaptation
- Practical Adaptive Filter Systems
- Diagnostic Tools
- Tuning Guidelines
- Common Pitfalls
- Information Filters and SRIF
- When to Use Information Filters
- Information Filter Fundamentals
- Standard Information Filter Algorithm
- Square Root Information Filter (SRIF)
- Extended Information Filter (EKIF)
- Decorrelated Measurement Processing
- Comparison: Information Filter vs Kalman Filter
- Weak Initial Conditions (High Uncertainty)
- Practical Diagnostic Tools
- Batch Information Filter (BIF)
- Tuning Guidelines
- Common Pitfalls
- Advanced Kalman Filter Variants
- When to Use Advanced KF Variants
- Cubature Kalman Filter (CKF)
- Sigma-Point Kalman Filters
- Centered Difference Kalman Filter
- Ensemble Kalman Filter (EnKF)
- Comparison: Advanced KF Variants
- Hybrid Approaches
- Practical Diagnostics
- Tuning Guidelines
- Common Pitfalls
- Custom Filter Implementation
- Why Implement Custom Filters
- Design Patterns: Base Class Architecture
- Example 1: Custom Adaptive Constant Velocity Filter
- Example 2: Wrapping External C++ Filter
- Integration with TCL Components
- Testing Custom Filters
- Performance Optimization
- Practical Workflow: Algorithm to Integration
- Documentation and Type Hints
- Common Pitfalls and Solutions
Tracking & Association
Domain-Specific
- Coordinate Systems Deep Dive
- Overview
- Common Coordinate Systems
- Conversion Matrix Quick Reference
- Practical Examples by Use Case
- Rotations: Euler Angles, Quaternions, DCM
- Jacobians for Nonlinear Filtering
- Map Projections
- Coordinate Transformation Workflow
- Performance Considerations
- Common Pitfalls and Solutions
- Advanced Topics
- Conversion Decision Tree
- Astronomical & Celestial Mechanics
- Atmospheric Modeling with NRLMSISE-00
- Navigation & Inertial Measurement Systems
- Signal Processing Fundamentals
Performance & Advanced
Reference & Learning
Overview
The Tracker Component Library provides:
Dynamic Estimation: Kalman filters (KF, EKF, UKF, CKF, CEKF, IMM), particle filters (RBPF), smoothers (RTS, fixed-lag, two-filter), information filters (SRIF), H-infinity
Data Association: GNN, JPDA, MHT, 2D/3D assignment (Hungarian, auction, Murty)
Coordinate Systems: Cartesian, spherical, geodetic conversions; map projections (UTM, Mercator, Lambert); rotation representations
Dynamic Models: Constant velocity, acceleration, Singer, coordinated turn, and polynomial motion models
Navigation: INS mechanization, INS/GNSS integration, great circle/rhumb line navigation, TDOA localization
Geophysical Models: Gravity (WGS84, EGM96/2008), magnetism (WMM, IGRF), atmosphere (NRLMSISE-00), tidal effects, terrain/DEM utilities
Astronomical: Orbital mechanics, Kepler propagation, Lambert problem, reference frame transformations, JPL ephemerides (DE405/430/432s/440), relativistic corrections (Schwarzschild, geodetic precession, Shapiro delay)
Mathematical Functions: Special functions (Marcum Q, Lambert W, Debye, hypergeometric, Bessel), statistics, numerical integration
GPU Acceleration: CuPy (NVIDIA CUDA) and MLX (Apple Silicon) backends with 10-15x speedup for batch Kalman filtering, particle filters, and matrix operations
Data Persistence: HDF5 and SQL backends for tracking data storage and retrieval
Installation
pip install nrl-tracker
Or install from source:
git clone https://github.com/nedonatelli/TCL.git
cd TCL
pip install -e .
Quick Start
Here’s a simple example using the Kalman filter:
import numpy as np
from pytcl.dynamic_estimation import kf_predict, kf_update
from pytcl.dynamic_models import f_constant_velocity, q_constant_velocity
# Initial state [x, vx, y, vy]
x = np.array([0.0, 1.0, 0.0, 0.5])
P = np.eye(4) * 0.1
# Motion model
T = 1.0 # time step
F = f_constant_velocity(T=T, num_dims=2)
Q = q_constant_velocity(T=T, sigma_a=0.1, num_dims=2)
# Predict
pred = kf_predict(x, P, F, Q)
print(f"Predicted state: {pred.x}")
# Measurement model (position only)
H = np.array([[1, 0, 0, 0], [0, 0, 1, 0]])
R = np.eye(2) * 0.5
z = np.array([1.1, 0.6])
# Update
upd = kf_update(pred.x, pred.P, z, H, R)
print(f"Updated state: {upd.x}")