Expand description
Selected ITU-R P-series atmospheric propagation models.
This crate is a Rust port of the subset of
python-itu-r needed for
Earth-space atmospheric attenuation on a slant path. It currently focuses on
atmospheric_attenuation_slant_path and the recommendation data needed to
compute gas, cloud, rain, scintillation, and total attenuation contributions.
§Data files
Model grids are loaded lazily on first use. In a repository checkout, the
crate looks for data under data/ next to Cargo.toml.
§Automatic Data Download
For published package use, enable features = ["data"]. No runtime
configuration is required: the build uses local data/ files when present,
otherwise downloads and embeds the verified data archive.
The raw ITU-R grids are too large to
include directly because crates.io limits .crate archive size.
§Manual Data Directory
If automatic data embedding is not suitable, set ITU_RS_DATA_DIR to a
directory containing the
python-itu-r itur/data
layout. On Unix shells:
export ITU_RS_DATA_DIR=/path/to/ITU-Rpy/itur/dataOn Windows PowerShell:
$env:ITU_RS_DATA_DIR = "C:\path\to\ITU-Rpy\itur\data"The examples that depend on recommendation grids check whether data is
available before calling the model. That keeps doctests useful in this
repository, with features = ["data"], and in downstream builds that set
ITU_RS_DATA_DIR.
§Conventions
Public APIs use plain f64 values and encode units in argument and return
names:
_deg: degrees.lat_degis geodetic latitude and must be in[-90, 90].lon_degis geodetic longitude; any finite degree value is accepted and map lookups wrap it internally._ghz: carrier frequency in gigahertz._kmand_m: kilometres and metres. Site heights are above mean sea level unless the function says otherwise._hpa: pressure in hectopascals._gm3: density in grams per cubic metre._kgm2: columnar mass in kilograms per square metre._mmh: rainfall rate in millimetres per hour._dband_db_per_km: attenuation in decibels and specific attenuation in decibels per kilometre._kand_c: temperature in kelvin and degrees Celsius.
The p argument is a percentage of time exceeded, not a probability
fraction. For example, 0.1 means 0.1% of an average year. Elevation angles
are above the local horizon and must be in the open interval (0, 90).
§Example
use itu_rs::{atmospheric_attenuation_slant_path, SlantPathOptions};
let attenuation = atmospheric_attenuation_slant_path(
45.4215, // latitude, degrees
-75.6972, // longitude, degrees
12.0, // frequency, GHz
30.0, // elevation, degrees
0.1, // time percentage exceeded
1.2, // antenna diameter, m
SlantPathOptions::default(),
)?;
assert!(attenuation.total_db.is_finite());Structs§
- ItuError
- Error returned by ITU-R model loading, validation, and calculation routines.
- Slant
Path Contributions - Atmospheric attenuation contribution breakdown in dB.
- Slant
Path Options - Optional environmental and model inputs for slant-path attenuation.
Enums§
- GasPath
Mode - Calculation mode for P.676 gaseous path attenuation.
- Hydrometeor
Type - Hydrometeor phase used by P.453 saturation vapour-pressure formulas.
Functions§
- atmospheric_
attenuation_ slant_ path - Computes total atmospheric attenuation for one Earth-space slant path.
- atmospheric_
attenuation_ slant_ path_ many - Computes atmospheric attenuation for multiple elevation angles.
- bicubic_
2d_ interpolate - Interpolates a regular P.1144 grid with bicubic interpolation.
- bilinear_
2d_ interpolate - Interpolates a regular P.1144 grid with bilinear interpolation.
- cloud_
attenuation_ db - Computes cloud attenuation from ITU-R P.840.
- cloud_
attenuation_ lognormal_ db - Computes cloud attenuation with the P.840 lognormal approximation.
- cloud_
liquid_ mass_ absorption_ coefficient - Computes the P.840 cloud liquid-water mass absorption coefficient.
- cloud_
reduced_ liquid_ kgm2 - Looks up reduced cloud liquid water content from ITU-R P.840.
- cloud_
specific_ attenuation_ coefficient - Computes the P.840 cloud specific attenuation coefficient.
- dn1
- Looks up the P.453 refractivity gradient exceeded over the lowest 1 km.
- dn65
- Looks up the P.453 refractivity gradient exceeded in the lowest 65 m.
- dry_
term_ radio_ refractivity - Computes dry-term radio refractivity from ITU-R P.453.
- fit_
rain_ attenuation_ to_ lognormal - Fits P.618 rain attenuation statistics to a lognormal model.
- gamma0_
approx_ db_ per_ km - Computes the P.676 dry-air approximate compatibility attenuation in dB/km.
- gamma0_
exact_ db_ per_ km - Computes dry-air specific attenuation from ITU-R P.676 in dB/km.
- gamma_
exact_ db_ per_ km - Computes total specific gaseous attenuation from ITU-R P.676 in dB/km.
- gammaw_
approx_ db_ per_ km - Computes the P.676 water-vapour approximate specific attenuation in dB/km.
- gammaw_
exact_ db_ per_ km - Computes water-vapour specific attenuation from ITU-R P.676 in dB/km.
- gas_
attenuation_ default - Computes gas-only atmospheric attenuation for one elevation angle.
- gas_
attenuation_ default_ many - Computes gas-only atmospheric attenuation for multiple elevation angles.
- gas_
attenuation_ default_ many_ checked - Computes gas-only atmospheric attenuation for multiple elevation angles.
- gaseous_
attenuation_ inclined_ path_ db - Computes gaseous attenuation on an inclined path from ITU-R P.676.
- gaseous_
attenuation_ slant_ path_ db - Computes gaseous attenuation on an Earth-space slant path from ITU-R P.676.
- gaseous_
attenuation_ terrestrial_ path_ db - Computes gaseous attenuation on a terrestrial path from ITU-R P.676.
- inter_
annual_ variability - Computes inter-annual variability from ITU-R P.678.
- is_
regular_ grid - Tests whether latitude and longitude matrices describe a regular P.1144 grid.
- lognormal_
approximation_ coefficients - Looks up P.840 lognormal cloud liquid-water distribution coefficients.
- map_
wet_ term_ radio_ refractivity - Looks up wet-term radio refractivity maps from ITU-R P.453.
- nearest_
2d_ interpolate - Interpolates a regular P.1144 grid with nearest-neighbour interpolation.
- radio_
refractive_ index - Computes radio refractive index from ITU-R P.453.
- rain_
attenuation_ db - Computes rain attenuation from ITU-R P.618.
- rain_
attenuation_ probability_ percent - Computes rain-attenuation occurrence probability from ITU-R P.618.
- rain_
cross_ polarization_ discrimination_ db - Computes rain cross-polarization discrimination from ITU-R P.618.
- rain_
height_ km - Looks up rain height from ITU-R P.839.
- rain_
specific_ attenuation_ coefficients - Computes ITU-R P.838 rain specific attenuation coefficients.
- rain_
specific_ attenuation_ db_ per_ km - Computes ITU-R P.838 rain specific attenuation in dB/km.
- rainfall_
probability_ percent - Computes annual rain probability from ITU-R P.837.
- rainfall_
rate_ mmh - Computes rainfall rate exceeded for a requested time percentage from ITU-R P.837.
- rainfall_
rate_ r001_ mmh - Looks up rainfall rate exceeded for 0.01% of an average year from ITU-R P.837.
- risk_
of_ exceedance - Computes exceedance risk from ITU-R P.678.
- saturation_
vapour_ pressure_ hpa - Computes saturation vapour pressure from ITU-R P.453.
- scintillation_
attenuation_ db - Computes scintillation attenuation from ITU-R P.618.
- scintillation_
sigma_ db - Computes the P.618 scintillation standard deviation in dB.
- site_
diversity_ rain_ outage_ probability_ percent - Computes P.618 site-diversity rain outage probability.
- slant_
inclined_ path_ equivalent_ height_ km - Computes P.676 equivalent heights for dry air and water vapour.
- standard_
pressure_ hpa - Computes standard-atmosphere pressure from ITU-R P.835.
- standard_
temperature_ k - Computes standard-atmosphere temperature from ITU-R P.835.
- standard_
water_ vapour_ density_ gm3 - Computes standard water-vapour density from ITU-R P.835.
- surface_
mean_ temperature_ k - Looks up annual mean surface temperature from ITU-R P.1510.
- surface_
month_ mean_ temperature_ k - Looks up monthly mean surface temperature from ITU-R P.1510.
- surface_
water_ vapour_ density_ gm3 - Looks up surface water-vapour density from ITU-R P.836.
- topographic_
altitude_ km - Looks up topographic altitude above mean sea level from ITU-R P.1511.
- total_
water_ vapour_ content_ kgm2 - Looks up total columnar water-vapour content from ITU-R P.836.
- unavailability_
from_ rainfall_ rate_ percent - Inverts ITU-R P.837 rainfall-rate statistics.
- water_
vapour_ pressure_ hpa - Computes water-vapour pressure from ITU-R P.453.
- wet_
term_ radio_ refractivity - Computes wet-term radio refractivity from ITU-R P.453.
- zenith_
water_ vapour_ attenuation_ db - Computes P.676 zenith water-vapour attenuation.
- zero_
isotherm_ height_ km - Looks up zero-degree isotherm height from ITU-R P.839.