GaussianFilters.jl

May 27, 2026 · View on GitHub

TestingCoverageDocumentation
Build StatusCoverage Status

GaussianFilters.jl

GaussianFilters implements methods to define and run Kalman, Extended Kalman, Unscented Kalman, and Gaussian-Mixture Probability Hypothesis Density Filters on simulated data. It also implements simulation functions for the Kalman-class filters.

Documentation

The documentation for the package can be found here: https://sisl.github.io/GaussianFilters.jl/latest

Installation

GaussianFilters can be installed by running:

using Pkg
Pkg.add("GaussianFilters")

Basic Usage

Basic usage follows along defining appropriate models, constructing an appropriate filter, and running the filter with known actions on some measurement data.

using GaussianFilters, LinearAlgebra

# dynamics model
A = [1 0.1; 0 1]
B = [0; 1]
W = [0.5 0; 0 0.5]
dmodel = LinearDynamicsModel(A, B, W)

# measurement model
measure(x, u) = LinearAlgebra.norm(x, 2)
V = [0.01]
omodel = NonlinearObservationModel(measure, V)

# filtering given some action and measurement
ukf = UnscentedKalmanFilter(dmodel, omodel)

b0 = GaussianBelief([0, 0], [1 0; 0 1])
b1 = update(ukf, b0, action, measurement)

Covariances may be passed as any AbstractMatrix, or in identity form (I(n), s*I(n)). GaussianBelief also accepts a bare UniformScaling, inferring the size from the mean vector:

b0 = GaussianBelief([0.0, 0.0], 2.0*I)   # Σ becomes 2*I(2)

See the examples/ directory for full demonstrations.

Examples

Each example script lives in examples/ with its own Project.toml. Run any of them with:

julia --project=examples examples/kf_2d_motion.jl
ScriptFilterDescription
kf_2d_motion.jlKF2D point-mass with linear dynamics
ekf_spinning_satellite.jlEKFRigid-body rotation with saturated observations
ukf_nonholonomic_robot.jlUKFDifferential-drive robot with range observation
gmphd_surveillance.jlGM-PHDMulti-target tracking
gmphd_aircraft_carrier.jlGM-PHDAircraft carrier scenario
gmphd_tests.jlGM-PHDVisualization helpers