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.
v2.8.0 — 1,610 functions | 195 modules | 5,574 test functions | ty type-checked | 88% coverage | 9 interactive notebooks | GPU acceleration (CuPy + MLX)
Note
On MATLAB parity: the core tracking workflow — filter, associate, track, evaluate, in Earth-referenced coordinates — is fully ported and validated against independent references. The full MATLAB public surface is covered at roughly a third by function count; see MATLAB TCL parity inventory for the function-level accounting and MATLAB-to-pytcl migration map for verified name mappings.
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
- See Also
- Information Filters and SRIF
- When to Use Information Filters
- Information Filter Fundamentals
- Working in Information Form
- Filtering a Measurement Sequence
- Unknown Initial State
- Square Root Information Filter (SRIF)
- Multi-Sensor Fusion
- Comparison: Information Filter vs Kalman Filter
- Diagnostics
- Tuning Guidelines
- Common Pitfalls
- See Also
- Advanced Kalman Filter Variants
- When to Use Advanced KF Variants
- Cubature Kalman Filter (CKF)
- Sigma-Point Kalman Filters
- Central Difference (Numerical-Jacobian) Filtering
- Ensemble Kalman Filter (EnKF)
- Comparison: Advanced KF Variants
- Mixing Variants
- Practical Diagnostics
- Tuning Guidelines
- Common Pitfalls
- See Also
- Custom Filter Implementation
- Why Implement Custom Filters
- Design Patterns: Class-Based Wrappers
- 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
- See Also
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
- Thermosphere Density Modeling
- 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 (WMM2025 default, WMM2020, IGRF-14, IGRF-13, EMM), atmosphere (simplified thermosphere), 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 for batch Kalman filtering, particle filters, and matrix operations (measured on MLX: 1.6x at 100 tracks to 40x at 20,000 tracks for batch Kalman)
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}")