pub fn free_space_loss_db(distance_m: u32, frequency_hz: u32) -> DecibelsExpand description
Returns the free-space basic transmission loss between isotropic antennas, in dB.
This is Recommendation ITU-R P.525-5, equation (5), 20 log10(4 pi d / lambda): the
loss with nothing in the way, which grows by 6.02 dB each time the distance doubles.
Equation (6) writes the same loss in megahertz and kilometers as
32.4 + 20 log10 f + 20 log10 d, rounding its constant down from 32.45, so it reads
about 0.05 dB low. A path near the ground loses more once terrain enters the first
Fresnel ellipsoid, which fresnel_radius_mm sizes.
§Arguments
distance_m- the distance between the antennas in meters;0counts as one meter.frequency_hz- the carrier frequency in hertz;0counts as one hertz.
§Returns
The loss in dB. The formula assumes the antennas sit in each other’s far field, many wavelengths apart.
§Examples
use pamoja_lora::budget::free_space_loss_db;
assert_eq!(free_space_loss_db(1_000, 868_100_000).to_string(), "91.22");
assert_eq!(free_space_loss_db(2_000, 868_100_000).to_string(), "97.24");