Skip to main content

Module rf

Module rf 

Source

Functions§

antenna_directivity
Antenna directivity from gain and efficiency: D = G / η
antenna_gain_from_area
Antenna gain from effective area: G = 4πA_e / λ²
beamwidth_approximate
Approximate antenna beamwidth in degrees: θ ≈ 70λ / D.
characteristic_impedance_coax
Characteristic impedance of coaxial cable: Z₀ = (138/√εr) × log₁₀(D/d).
db_to_ratio
Convert dB to linear ratio: ratio = 10^(dB / 10)
dbm_to_watts
Convert dBm to watts: P = 10^((dBm - 30) / 10)
effective_area_from_gain
Effective aperture from gain: A_e = Gλ² / (4π)
eirp
Effective isotropic radiated power: EIRP = P × G
fade_margin_db
Fade margin: FM = received_dBm - sensitivity_dBm
free_space_path_loss
Free-space path loss in dB: FSPL = 20log₁₀(d) + 20log₁₀(f) + 20log₁₀(4π/c)
frequency_to_energy
Photon energy from frequency: E = hf
frequency_to_wavelength
Frequency to wavelength: λ = c / f
friis_received_power
Friis transmission equation (linear): Pr = Pt × Gt × Gr × (λ/(4πd))²
half_wave_dipole_gain
Returns the half-wave dipole gain (linear): G ≈ 1.64 (2.15 dBi).
link_budget_db
Link budget in dB: Pr = Pt + Gt + Gr - PathLoss
mismatch_loss
Mismatch loss in dB: ML = -10log₁₀(1 - ((VSWR-1)/(VSWR+1))²)
noise_power
Thermal noise power: N = k_B × T × B
ratio_to_db
Convert linear ratio to dB: dB = 10log₁₀(ratio)
return_loss
Return loss in dB: RL = -20log₁₀(|Γ|)
shannon_capacity
Shannon-Hartley channel capacity: C = B × log₂(1 + SNR)
skin_depth_conductor
Skin depth in a conductor: δ = 1 / √(πfμσ)
snr_db
Signal-to-noise ratio in dB: SNR = 10log₁₀(S / N)
thermal_noise_floor_dbm
Thermal noise floor in dBm: 10log₁₀(k_B × T × B) + 30
velocity_factor
Velocity factor: VF = 1 / √εr
vswr
Voltage standing wave ratio: VSWR = (1 + |Γ|) / (1 - |Γ|)
watts_to_dbm
Convert watts to dBm: dBm = 10log₁₀(P) + 30
wavelength_in_line
Wavelength in a transmission line: λ_line = λ₀ × VF
wavelength_to_frequency
Wavelength to frequency: f = c / λ