diff --git a/utils/sdr/airspy.py b/utils/sdr/airspy.py index 36ae824..fcf2127 100644 --- a/utils/sdr/airspy.py +++ b/utils/sdr/airspy.py @@ -99,7 +99,8 @@ class AirspyCommandBuilder(CommandBuilder): def build_adsb_command( self, device: SDRDevice, - gain: Optional[float] = None + gain: Optional[float] = None, + bias_t: bool = False ) -> list[str]: """ Build dump1090/readsb command with SoapySDR support for ADS-B decoding. @@ -119,6 +120,9 @@ class AirspyCommandBuilder(CommandBuilder): if gain is not None: cmd.extend(['--gain', str(int(gain))]) + if bias_t: + cmd.extend(['--enable-bias-t']) + return cmd def build_ism_command( diff --git a/utils/sdr/base.py b/utils/sdr/base.py index 9941b09..5755dd0 100644 --- a/utils/sdr/base.py +++ b/utils/sdr/base.py @@ -118,7 +118,8 @@ class CommandBuilder(ABC): def build_adsb_command( self, device: SDRDevice, - gain: Optional[float] = None + gain: Optional[float] = None, + bias_t: bool = False ) -> list[str]: """ Build ADS-B decoder command. @@ -126,6 +127,7 @@ class CommandBuilder(ABC): Args: device: The SDR device to use gain: Gain in dB (None for auto) + bias_t: Enable bias-T power (for active antennas) Returns: Command as list of strings for subprocess diff --git a/utils/sdr/hackrf.py b/utils/sdr/hackrf.py index acb7c54..562e201 100644 --- a/utils/sdr/hackrf.py +++ b/utils/sdr/hackrf.py @@ -96,7 +96,8 @@ class HackRFCommandBuilder(CommandBuilder): def build_adsb_command( self, device: SDRDevice, - gain: Optional[float] = None + gain: Optional[float] = None, + bias_t: bool = False ) -> list[str]: """ Build dump1090/readsb command with SoapySDR support for ADS-B decoding. @@ -116,6 +117,9 @@ class HackRFCommandBuilder(CommandBuilder): if gain is not None: cmd.extend(['--gain', str(int(gain))]) + if bias_t: + cmd.extend(['--enable-bias-t']) + return cmd def build_ism_command( diff --git a/utils/sdr/limesdr.py b/utils/sdr/limesdr.py index a8db3bd..c0405af 100644 --- a/utils/sdr/limesdr.py +++ b/utils/sdr/limesdr.py @@ -75,13 +75,15 @@ class LimeSDRCommandBuilder(CommandBuilder): def build_adsb_command( self, device: SDRDevice, - gain: Optional[float] = None + gain: Optional[float] = None, + bias_t: bool = False ) -> list[str]: """ Build dump1090 command with SoapySDR support for ADS-B decoding. Uses dump1090 compiled with SoapySDR support, or readsb as alternative. Note: Requires dump1090 with SoapySDR support or readsb. + Note: LimeSDR does not support bias-T, parameter is ignored. """ device_str = self._build_device_string(device) diff --git a/utils/sdr/rtlsdr.py b/utils/sdr/rtlsdr.py index ba6ed22..0b80c0d 100644 --- a/utils/sdr/rtlsdr.py +++ b/utils/sdr/rtlsdr.py @@ -81,7 +81,8 @@ class RTLSDRCommandBuilder(CommandBuilder): def build_adsb_command( self, device: SDRDevice, - gain: Optional[float] = None + gain: Optional[float] = None, + bias_t: bool = False ) -> list[str]: """ Build dump1090 command for ADS-B decoding. @@ -108,6 +109,9 @@ class RTLSDRCommandBuilder(CommandBuilder): if gain is not None: cmd.extend(['--gain', str(int(gain))]) + if bias_t: + cmd.extend(['--enable-bias-t']) + return cmd def build_ism_command(