Skip to main content

sensitivity_dbm

Function sensitivity_dbm 

Source
pub fn sensitivity_dbm(
    link: LinkSettings,
    noise_figure_db: Decibels,
) -> Decibels
Expand description

Returns the weakest signal a receiver can demodulate on a link, in dBm.

Sensitivity is the noise floor of the channel, raised by the noise figure of the receiver and lowered by the demodulator SNR. How closely that tracks the datasheets is in the module documentation.

§Arguments

  • link - the link settings, whose spreading factor and bandwidth set the floor.
  • noise_figure_db - the noise figure of the receiver, such as RADIO_NOISE_FIGURE_DB.

§Returns

The sensitivity in dBm.

§Examples

use pamoja_lora::budget::{sensitivity_dbm, RADIO_NOISE_FIGURE_DB};
use pamoja_lora::LinkSettings;

let fastest = sensitivity_dbm(LinkSettings::new(7, 125_000), RADIO_NOISE_FIGURE_DB);
let furthest = sensitivity_dbm(LinkSettings::new(12, 125_000), RADIO_NOISE_FIGURE_DB);
assert_eq!(fastest.to_string(), "-124.53");
assert_eq!(furthest.to_string(), "-137.03");