No description
Find a file
2026-05-30 03:35:41 +03:30
config docs: add project documentation and planning files, update configuration paths, and clean up plot directory. 2026-05-30 02:14:15 +03:30
docs docs: add expected simulation outputs documentation and associated visual assets for DEM-Based TERCOM Navigation pipeline 2026-05-30 03:35:41 +03:30
results feat: implement complete DEM-based terrain-aided navigation and INS simulation pipeline with EKF/UKF fusion, Monte Carlo analysis, and automated plotting. 2026-05-24 00:20:56 +03:30
src docs: add project documentation and planning files, update configuration paths, and clean up plot directory. 2026-05-30 02:14:15 +03:30
tests docs: add project documentation and planning files, update configuration paths, and clean up plot directory. 2026-05-30 02:14:15 +03:30
.gitignore docs: add comprehensive project documentation, roadmap plans, and walkthrough guides while updating gitignore and README. 2026-05-30 02:25:10 +03:30
README.md feat: implement simulation foundation including DEM loader, trajectory generator, and sensor models with project documentation and configuration updates 2026-05-30 02:21:34 +03:30
requirements.txt feat: implement complete DEM-based terrain-aided navigation and INS simulation pipeline with EKF/UKF fusion, Monte Carlo analysis, and automated plotting. 2026-05-24 00:20:56 +03:30
run.py feat: implement complete DEM-based terrain-aided navigation and INS simulation pipeline with EKF/UKF fusion, Monte Carlo analysis, and automated plotting. 2026-05-24 00:20:56 +03:30

DEM-Based Terrain-Aided INS (TAN)

Simulated terrain-aided navigation for a high-speed UAV without GNSS: IMU dead reckoning, radar altimeter, synthetic DEM, terrain profile matching, EKF/UKF fusion, and integrity gating.

Full research spec: docs/PROJECT_SPEC.md · Engineering plan: docs/roadmap.md


What it does

flowchart LR
    IMU[IMU] --> INS[INS dead reckoning]
    ALT[Altimeter] --> TM[Terrain matcher]
    DEM[DEM map] --> TM
    INS --> TM
    TM --> GATE[Integrity gate]
    GATE --> FILT[EKF / UKF]
    FILT --> OUT[Corrected position]
    FILT -.->|optional reset| INS
  1. Load real SRTM .hgt maps natively, or build a synthetic DEM fallback.
  2. Fly a truth trajectory (straight legs + banked turns).
  3. Simulate IMU and radar altimeter with noise and bias.
  4. Run INS (drifts over time).
  5. Match measured height profiles to the DEM (MAD matcher).
  6. Gate bad matches (χ² test), then fuse with EKF or UKF.
  7. Plot trajectories and errors; run benchmarks and Monte Carlo.

Quick start

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

python run.py sim      # plots 0106 → sim_outputs/[tile_name]/
python run.py bench    # scenario table → results/
python run.py mc       # Monte Carlo → results/ + monte_carlo_*.png
python run.py all      # run all three

Or directly:

python tests/main_sim.py

Settings (no code edits needed)

Edit config/settings.yaml (~20 fields). Example:

Group Keys Purpose
Flight start_speed_mps, flight_segments_sec, turn_rate_deg_s Mission path
DEM dem_amplitude_m, dem_seed Terrain roughness
Sensors imu_*, altimeter_* Noise / bias
Matching match_search_radius_m, match_window_size, match_interval_sec TAN tuning
Filter filter_type (ekf / ukf), filter_q_pos_m, filter_r_pos_m Fusion
Integrity integrity_chi2_threshold, closed_loop_ins_reset False-match rejection
UI plot_theme (dark / minimal), output_dir Plots

Override file path:

export DEM_TAN_SETTINGS=/path/to/my_settings.yaml

Project layout

config/settings.yaml     ← all tunables
data/
  dem_tiles/             Place SRTM `.hgt` dataset tiles here (e.g., n34e051.hgt)
src/
  dem/                   DEM loader + synthetic terrain + HGT parser
  simulation/            Truth trajectory
  sensors/               IMU + altimeter models
  navigation/            INS, matcher, EKF, UKF, integrity
  analysis/              NavigationPipeline, scenarios
  plotting/              Dark / minimal themes
tests/
  main_sim.py            End-to-end demo
  run_benchmarks.py      Multi-scenario comparison
  run_monte_carlo.py     Statistical runs
docs/                    Walkthrough logs and project documents
trash/                   Transient discarded files
sim_outputs/             Figures (0106) separated conditionally per loaded DEM title
results/                 CSV + markdown tables

Output figures (sim_outputs/)

Once started, the pipeline runs dynamically over every .hgt dataset placed at data/dem_tiles/. Outcomes are organized neatly per tile layout:

File Phase Content
01_trajectory_3d.png 12 Truth path over DEM (3D)
02_imu_accel.png 3 Body-frame accelerometer
03_altimeter.png 3 True vs noisy AGL + terrain height
04_navigation_map.png 46 Plan view on DEM (truth / INS / fused)
05_full_navigation.png 7 Map + accepted/rejected terrain matches
06_error_over_time.png Eval Horizontal position error vs time
monte_carlo_*.png 9 CEP histogram & dispersion (run.py mc)

Sample results

After python run.py bench, open results/benchmark_summary.md. Typical patterns:

  • Mountainous / hilly terrain → fusion can beat INS-only when matches are accepted.
  • Flat terrain → matching fails more often (high gate rejection).
  • UKF vs EKF → similar on this 4-state model; compare last benchmark row.

Monte Carlo prints CEP50 / CEP95 and saves histograms in sim_outputs/.


Themes

plot_theme Look
dark Dark background (default)
minimal Light, clean lines

Limitations (MVP)

  • Local flat-Earth INS (not full strapdown 6-DOF).
  • Synthetic DEM safely fallbacks natively without external data required.
  • Profile MAD matching (not full NCC grid search).
  • Particle filter not implemented (see roadmap).

License

Academic / research use — see course or lab guidelines.