A high-performance, scientifically-validated Rust implementation of the ITS Irregular Terrain Model (ITM), also known as the Longley-Rice model.
itm-longley-rice provides a modern, memory-safe port of the standard atmospheric propagation model used for frequencies between 20 MHz and 20 GHz. This implementation is based directly on the original NTIA C++ source code (v1.3), ensuring functional parity with the established scientific reference while providing the safety and performance benefits of the Rust ecosystem.
This library is designed for integration into large-scale simulations, including Unreal Engine 5 and other C++ environments, via a robust C-API.
The core algorithm predicts terrestrial radiowave propagation based on electromagnetic theory and extensive empirical data collected by Anita Longley and Phil Rice.
- Free Space Loss: Standard LOS propagation.
- Diffraction: Multi-faceted implementation using Vogler's smooth-earth approximation and Bullington knife-edge methods.
- Troposcatter: Selection and calculation of tropospheric scatter for trans-horizon paths.
- Variability Analysis: Statistical modeling of signal reliability across time, location, and situation.
This implementation precisely follows the algorithms defined in the following primary references:
- NTIA Technical Report TR-82-100: A Guide to the Use of the ITS Irregular Terrain Model in the Area Prediction Mode.
- NTIA Technical Report ERL 79-ITS 67: Prediction of Tropospheric Radio Transmission Loss Over Irregular Terrain: A Computer Method.
- Hufford, G. A. (1985): Memorandum on the ITS Irregular Terrain Model, version 1.2.2.
- Point-to-Point (P2P) Mode: Calculate path loss using actual terrain elevation profiles sampled from GIS data or game engine geometry.
- Area Prediction Mode: Generate statistical coverage estimates based on terrain roughness (
delta_h) when specific profiles are unavailable. - Parallelized Signal Radius Calculation: Efficiently determine the maximum distance a signal can travel before dropping below a specified sensitivity threshold. This is implemented as a multi-point parallel search using Rayon for high performance.
- C-API Integration: Built-in support for static linking into Unreal Engine, allowing real-time electromagnetic warfare (EW) and signal simulation.
This project is a pragmatic, high-fidelity port of the NTIA/ITS C++ implementation. It maintains the internal numeric heuristics and mathematical structures found in the canonical FORTRAN and C++ versions, ensuring that results match validated government benchmarks.
Refer to the following documentation for integration details:
- C-API Usage Guide: Detailed instructions for Unreal Engine and C/C++ integration.
FFI feature note: The C-API is enabled by default. Rust-only consumers can disable it with --no-default-features or by setting default-features = false in their dependency entry.
For technical inquiries regarding the underlying ITM model, refer to the official NTIA/ITS documentation.
This project uses GitHub Actions for continuous integration and validation:
- CI Workflow: Tests on Windows, Linux, and macOS with stable and beta Rust toolchains
- NTIA Validation: Automated testing against NTIA reference implementation outputs
- Security Audit: Daily dependency vulnerability scanning with cargo-audit and cargo-deny
- Code Coverage: Automated coverage reports via Codecov
- Release Automation: Automatic cross-platform builds and crates.io publishing on version tags
All tests must pass before merging, ensuring scientific accuracy and code quality.
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
Before submitting a PR:
- Run
cargo test --allto ensure all tests pass - Run
cargo test --test ntia_validationto validate against NTIA reference - Run
cargo fmtandcargo clippyto maintain code quality - Add tests for new functionality
This project is licensed under the MIT License - see the LICENSE file for details.
The original ITS Irregular Terrain Model developed by NTIA is in the public domain as a work of the U.S. Federal Government (Title 15 USC § 105). This Rust implementation is a derivative work that maintains compatibility with the original while adding modern safety guarantees and performance optimizations.
When using this library, please acknowledge:
- Original ITM: National Telecommunications and Information Administration (NTIA)
- Original Authors: Anita Longley and Phil Rice
- This Implementation: Daniel Santana
- Original NTIA ITM Repository: https://github.com/NTIA/itm
- NTIA ITM License: https://github.com/NTIA/itm/blob/master/LICENSE.md