mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -07:00
Adding Vessels
This commit is contained in:
@@ -157,6 +157,41 @@ class RTLSDRCommandBuilder(CommandBuilder):
|
||||
|
||||
return cmd
|
||||
|
||||
def build_ais_command(
|
||||
self,
|
||||
device: SDRDevice,
|
||||
gain: Optional[float] = None,
|
||||
bias_t: bool = False,
|
||||
tcp_port: int = 10110
|
||||
) -> list[str]:
|
||||
"""
|
||||
Build AIS-catcher command for AIS vessel tracking.
|
||||
|
||||
Uses AIS-catcher with TCP JSON output for real-time vessel data.
|
||||
AIS operates on 161.975 MHz and 162.025 MHz (handled automatically).
|
||||
"""
|
||||
if device.is_network:
|
||||
raise ValueError(
|
||||
"AIS-catcher does not support rtl_tcp. "
|
||||
"For remote AIS, run AIS-catcher on the remote machine."
|
||||
)
|
||||
|
||||
cmd = [
|
||||
'AIS-catcher',
|
||||
'-d', str(device.index),
|
||||
'-S', str(tcp_port), # TCP server with JSON output
|
||||
'-o', '5', # JSON output format
|
||||
'-q', # Quiet mode (less console output)
|
||||
]
|
||||
|
||||
if gain is not None and gain > 0:
|
||||
cmd.extend(['-gr', 'tuner', str(int(gain))])
|
||||
|
||||
if bias_t:
|
||||
cmd.extend(['-gr', 'biastee', '1'])
|
||||
|
||||
return cmd
|
||||
|
||||
def get_capabilities(self) -> SDRCapabilities:
|
||||
"""Return RTL-SDR capabilities."""
|
||||
return self.CAPABILITIES
|
||||
|
||||
Reference in New Issue
Block a user