36 lines
958 B
Python
36 lines
958 B
Python
"""
|
|
Utility functions for radar-related mathematical calculations.
|
|
"""
|
|
|
|
from scipy.constants import c
|
|
|
|
def calculate_max_unambiguous_range(prf: float) -> float:
|
|
"""
|
|
Calculates the maximum unambiguous range for a given PRF.
|
|
|
|
Args:
|
|
prf: Pulse Repetition Frequency in Hertz (Hz).
|
|
|
|
Returns:
|
|
The maximum unambiguous range in meters (m).
|
|
"""
|
|
if prf == 0:
|
|
return float('inf')
|
|
return c / (2 * prf)
|
|
|
|
def calculate_max_unambiguous_velocity(carrier_frequency: float, prf: float) -> float:
|
|
"""
|
|
Calculates the maximum unambiguous velocity for a given radar configuration.
|
|
|
|
Args:
|
|
carrier_frequency: Carrier frequency in Hertz (Hz).
|
|
prf: Pulse Repetition Frequency in Hertz (Hz).
|
|
|
|
Returns:
|
|
The maximum unambiguous (Nyquist) velocity in m/s.
|
|
"""
|
|
if carrier_frequency == 0:
|
|
return float('inf')
|
|
wavelength = c / carrier_frequency
|
|
return (prf * wavelength) / 4
|