← Tutorials

Tutorial Series · Part 27 of 27

Capstone: Build a Simple GNSS/INS Fusion Simulator

Combine trajectory generation, IMU simulation, GNSS simulation, drift and Kalman fusion into one final interactive tool.

Series Context

Navigation from First Principles

This article is part of an ordered course. Use the previous and next links to stay in sequence.

Progress Part 27 of 27

This capstone ties the whole series together. It lets you generate a true trajectory, simulate IMU and GNSS measurements, run dead reckoning, run a simple Kalman filter, and compare the results. The point is not to build a production navigation stack, but to make the relationships between models, sensors, and uncertainty visible.

The technical foundation comes from the previous posts: GNSS pseudorange and errors from Navipedia, inertial navigation from Groves and Woodman, and filtering from Welch and Bishop.1234

Why a capstone helps

GNSS-only is absolute but noisy and fragile. INS-only is smooth and high-rate but drifts. Fusion uses each source where it is strong:

  • INS fills gaps and provides short-term smooth motion.
  • GNSS bounds long-term drift.
  • The filter decides how much to trust each source.

A compact fusion model

Use a 2D state for the first capstone:

x=[n,e,vn,ve]T\mathbf{x}=[n,e,v_n,v_e]^T

Truth model:

xtrue,k+1=f(xtrue,k,uk)\mathbf{x}_{true,k+1}=f(\mathbf{x}_{true,k},\mathbf{u}_k)

IMU-like acceleration measurement:

a~k=atrue,k+ba+ηa\tilde{\mathbf{a}}_k=\mathbf{a}_{true,k}+\mathbf{b}_a+\boldsymbol{\eta}_a

GNSS position measurement:

zgnss,k=[nkek]+ηgnss\mathbf{z}_{gnss,k}=\begin{bmatrix}n_k \\ e_k\end{bmatrix}+\boldsymbol{\eta}_{gnss}

Prediction:

xk+1=Fxk+Ba~k\mathbf{x}_{k+1}^{-}=\mathbf{F}\mathbf{x}_{k}+\mathbf{B}\tilde{\mathbf{a}}_k

with:

F=[10Δt0010Δt00100001]\mathbf{F}=\begin{bmatrix} 1&0&\Delta t&0\\ 0&1&0&\Delta t\\ 0&0&1&0\\ 0&0&0&1 \end{bmatrix} B=[12Δt20012Δt2Δt00Δt]\mathbf{B}=\begin{bmatrix} \frac{1}{2}\Delta t^2&0\\ 0&\frac{1}{2}\Delta t^2\\ \Delta t&0\\ 0&\Delta t \end{bmatrix}

Measurement update uses:

H=[10000100]\mathbf{H}=\begin{bmatrix} 1&0&0&0\\ 0&1&0&0 \end{bmatrix}

Interactive demo: full GNSS/INS simulator

This capstone widget pulls together the same ideas from the earlier demos: truth generation, inertial drift, noisy GNSS, an outage window and a fused estimate that depends on declared process and measurement confidence.

Interactive Demo

GNSS/INS Fusion Capstone

This capstone combines truth motion, IMU drift, noisy GNSS, an outage window, and a simple fused estimate so you can compare all three tracks at once.

Position error by source
Outage window and uncertainty

Controls

Run the default case first, then extend the outage or raise accelerometer bias and compare fused drift against GNSS and pure INS.

Readouts

Fused final error0.0 m
INS final error0.0 m
GNSS final error0.0 m
What to noticeFusion stays smoother than GNSS and more bounded than INS.

What to watch

  • INS-only drifts more and more through the run.
  • GNSS-only stays noisy and disappears during the outage window.
  • The fused path usually stays smoother than GNSS and more bounded than INS.
  • Poor covariance choices and outliers can visibly degrade the fused result.

Try this

Run the default case, then increase accelerometer bias and stretch the outage window. After that, raise the measurement-confidence mismatch by lowering R too far while keeping outliers on. The fused estimate should start behaving overconfidently instead of robustly.

Limits of the capstone

This capstone is still a toy model. A real GNSS/INS uses 3D frames, attitude, gravity, Earth rotation, IMU bias states, clock states, robust measurement gating, timing alignment and careful numerical implementation. That is the next layer, not a bug in the teaching version.

Footnotes

  1. ESA Navipedia, “GNSS Basic Observables”. https://gssc.esa.int/navipedia/index.php/GNSS_Basic_Observables - Reference for pseudorange and carrier-phase observables. Accessed 2026-06-11.

  2. Paul D. Groves, “Navigation Using Inertial Sensors”, IEEE Aerospace and Electronic Systems Magazine, 2015. https://ieee-aess.org/media/navigation-using-inertial-sensors - Tutorial covering inertial sensor technology, strapdown navigation, alignment, zero updates, motion constraints, pedestrian dead reckoning and fault detection. Accessed 2026-06-11.

  3. Oliver J. Woodman, “An introduction to inertial navigation”, University of Cambridge Computer Laboratory Technical Report UCAM-CL-TR-696, 2007. https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-696.html - Accessible report on MEMS strapdown INS error characteristics and drift growth. Accessed 2026-06-11.

  4. Greg Welch and Gary Bishop, “An Introduction to the Kalman Filter”, TR 95-041. https://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/WELCH/kalman.html - Practical introduction to the discrete Kalman filter and EKF. Accessed 2026-06-11.