Header-only C++ library implementing a full Strapdown Inertial Navigation System (INS) — from initial alignment through continuous mechanization to theoretical performance analysis via the Van Loan method.
Estimates the initial body-to-navigation DCM
Gravity Leveling:
Gyrocompassing:
Heading
Propagates attitude, velocity, and position epoch-by-epoch in the NED navigation frame.
Attitude Update (Rodrigues):
Velocity Update (Trapezoidal, Coriolis-compensated):
Transport Rate:
9-state linearized error dynamics:
The Van Loan method converts continuous-time system matrices
Requires CMake ≥ 3.14 and a C++17 compiler. Eigen is downloaded automatically.
git clone https://github.com/AmrFawzy-NavEng/Strapdown-INS-Cpp.git
cd Strapdown-INS-Cpp
mkdir build && cd build
cmake ..
cmake --build ../strapdown_demo # Runs the full INS pipeline, outputs CSV
cd .. && python scripts/plot_results.py # Generates plots from CSVThe demo generates a synthetic 60-second vehicle trajectory (accelerate → cruise → turn → brake) and processes it through the complete INS pipeline.
Strapdown-INS-Cpp/
├── CMakeLists.txt # Build system (auto-fetches Eigen)
├── include/strapdown_ins/
│ ├── types.h # Eigen type aliases, ImuSample, NavState
│ ├── rotation.h # Skew-symmetric, Rodrigues, DCM↔Euler
│ ├── alignment.h # InitialAlignment (leveling + gyrocompassing)
│ ├── navigator.h # StrapdownNavigator (full mechanization)
│ └── error_model.h # 9-state Van Loan error propagation
├── examples/
│ └── strapdown_demo.cpp # Self-contained demo with synthetic IMU
└── scripts/
└── plot_results.py # Visualization from CSV output
MIT — see LICENSE for details.


