mirror of
https://github.com/smittix/intercept.git
synced 2026-04-25 23:29:59 -07:00
feat: Add BT Locate and GPS modes with IRK auto-detection
New modes: - BT Locate: SAR Bluetooth device location with GPS-tagged signal trail, RSSI-based proximity bands, audio alerts, and IRK auto-extraction from paired devices (macOS plist / Linux BlueZ) - GPS: Real-time position tracking with live map, speed, heading, altitude, satellite info, and track recording via gpsd Bug fixes: - Fix ABBA deadlock between session lock and aggregator lock in BT Locate - Fix bleak scan lifecycle tracking in BluetoothScanner (is_scanning property now cross-checks backend state) - Fix map tile persistence when switching modes - Use 15s max_age window for fresh detections in BT Locate poll loop Documentation: - Update README, FEATURES.md, USAGE.md, and GitHub Pages with new modes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -63,7 +63,9 @@
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/modes/sstv.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/modes/weather-satellite.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/modes/sstv-general.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/modes/gps.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/modes/subghz.css') }}?v={{ version }}&r=subghz_layout9">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/modes/bt_locate.css') }}?v={{ version }}&r=btlocate2">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/settings.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/components/function-strip.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/components/toast.css') }}">
|
||||
@@ -248,6 +250,10 @@
|
||||
<span class="mode-icon icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="12" cy="12" r="3"/><path d="M16.24 7.76a6 6 0 0 1 0 8.49m-8.48-.01a6 6 0 0 1 0-8.49"/></svg></span>
|
||||
<span class="mode-name">HF SSTV</span>
|
||||
</button>
|
||||
<button class="mode-card mode-card-sm" onclick="selectMode('gps')">
|
||||
<span class="mode-icon icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="10" r="3"/><path d="M12 21.7C17.3 17 20 13 20 10a8 8 0 1 0-16 0c0 3 2.7 7 8 11.7z"/></svg></span>
|
||||
<span class="mode-name">GPS</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -538,6 +544,8 @@
|
||||
|
||||
{% include 'partials/modes/sstv-general.html' %}
|
||||
|
||||
{% include 'partials/modes/gps.html' %}
|
||||
|
||||
{% include 'partials/modes/listening-post.html' %}
|
||||
|
||||
{% include 'partials/modes/tscm.html' %}
|
||||
@@ -554,6 +562,8 @@
|
||||
|
||||
{% include 'partials/modes/subghz.html' %}
|
||||
|
||||
{% include 'partials/modes/bt_locate.html' %}
|
||||
|
||||
<button class="preset-btn" onclick="killAll()"
|
||||
style="width: 100%; margin-top: 10px; border-color: #ff3366; color: #ff3366;">
|
||||
Kill All Processes
|
||||
@@ -828,6 +838,7 @@
|
||||
</div>
|
||||
<button class="bt-detail-btn" id="btDetailWatchBtn" onclick="BluetoothMode.toggleWatchlist()">Watchlist</button>
|
||||
<button class="bt-detail-btn" id="btDetailCopyBtn" onclick="BluetoothMode.copyAddress()">Copy</button>
|
||||
<button class="bt-detail-btn bt-locate-btn" id="btDetailLocateBtn" onclick="BluetoothMode.locateDevice()">Locate</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1043,6 +1054,67 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- GPS Receiver Dashboard -->
|
||||
<div id="gpsVisuals" class="gps-visuals-container" style="display: none;">
|
||||
<div class="gps-visuals-top">
|
||||
<!-- Sky View Polar Plot -->
|
||||
<div class="gps-skyview-panel">
|
||||
<h4>Satellite Sky View</h4>
|
||||
<div class="gps-skyview-canvas-wrap">
|
||||
<canvas id="gpsSkyCanvas" width="400" height="400"></canvas>
|
||||
</div>
|
||||
<div class="gps-legend">
|
||||
<div class="gps-legend-item"><span class="gps-legend-dot" style="background:#00d4ff;"></span> GPS</div>
|
||||
<div class="gps-legend-item"><span class="gps-legend-dot" style="background:#00ff88;"></span> GLONASS</div>
|
||||
<div class="gps-legend-item"><span class="gps-legend-dot" style="background:#ff8800;"></span> Galileo</div>
|
||||
<div class="gps-legend-item"><span class="gps-legend-dot" style="background:#ff4466;"></span> BeiDou</div>
|
||||
<div class="gps-legend-item"><span class="gps-legend-dot" style="background:#ffdd00;"></span> SBAS</div>
|
||||
<div class="gps-legend-item"><span class="gps-legend-dot" style="background:#cc66ff;"></span> QZSS</div>
|
||||
<div class="gps-legend-item"><span class="gps-legend-dot" style="background:#00d4ff;"></span> Used (filled)</div>
|
||||
<div class="gps-legend-item"><span class="gps-legend-dot" style="background:transparent; border:1.5px solid #00d4ff;"></span> Unused (hollow)</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Position Info -->
|
||||
<div class="gps-position-panel">
|
||||
<h4>Position</h4>
|
||||
<div class="gps-pos-big">
|
||||
<div id="gpsVisPosLat">---</div>
|
||||
<div id="gpsVisPosLon">---</div>
|
||||
</div>
|
||||
<div style="margin-top: 4px;">
|
||||
<span class="gps-fix-badge no-fix" id="gpsVisFixBadge">NO FIX</span>
|
||||
</div>
|
||||
<div style="margin-top: 12px;">
|
||||
<div class="gps-pos-row">
|
||||
<span class="gps-pos-label">Altitude</span>
|
||||
<span class="gps-pos-value" id="gpsVisPosAlt">---</span>
|
||||
</div>
|
||||
<div class="gps-pos-row">
|
||||
<span class="gps-pos-label">Speed</span>
|
||||
<span class="gps-pos-value" id="gpsVisPosSpeed">---</span>
|
||||
</div>
|
||||
<div class="gps-pos-row">
|
||||
<span class="gps-pos-label">Heading</span>
|
||||
<span class="gps-pos-value" id="gpsVisPosHeading">---</span>
|
||||
</div>
|
||||
<div class="gps-pos-row">
|
||||
<span class="gps-pos-label">Climb</span>
|
||||
<span class="gps-pos-value" id="gpsVisPosClimb">---</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-color);">
|
||||
<div class="gps-pos-label">GPS TIME</div>
|
||||
<div class="gps-pos-value" id="gpsVisTime" style="font-size: 14px; color: var(--accent-cyan);">---</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Signal Strength Bars -->
|
||||
<div class="gps-signal-panel">
|
||||
<h4>Signal Strength (SNR dB-Hz)</h4>
|
||||
<div class="gps-signal-bars" id="gpsSignalBars"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Listening Post Visualizations - Professional Ham Radio Scanner -->
|
||||
<div class="wifi-visuals" id="listeningPostVisuals" style="display: none;">
|
||||
|
||||
@@ -2064,6 +2136,75 @@
|
||||
|
||||
</div>
|
||||
|
||||
<!-- BT Locate SAR Dashboard -->
|
||||
<div id="btLocateVisuals" class="btl-visuals-container" style="display: none;">
|
||||
<!-- Proximity HUD -->
|
||||
<div class="btl-hud" id="btLocateHud" style="display: none;">
|
||||
<div class="btl-hud-top">
|
||||
<div class="btl-hud-band" id="btLocateBand">---</div>
|
||||
<div class="btl-hud-metrics">
|
||||
<div class="btl-hud-metric btl-hud-metric-lg">
|
||||
<span class="btl-hud-value" id="btLocateDistance">--</span>
|
||||
<span class="btl-hud-unit">m</span>
|
||||
<span class="btl-hud-label">Est. Distance</span>
|
||||
</div>
|
||||
<div class="btl-hud-metric">
|
||||
<span class="btl-hud-value" id="btLocateRssi">--</span>
|
||||
<span class="btl-hud-unit">dBm</span>
|
||||
<span class="btl-hud-label">RSSI</span>
|
||||
</div>
|
||||
<div class="btl-hud-metric">
|
||||
<span class="btl-hud-value" id="btLocateRssiEma">--</span>
|
||||
<span class="btl-hud-unit">dBm</span>
|
||||
<span class="btl-hud-label">RSSI avg</span>
|
||||
</div>
|
||||
<div class="btl-hud-separator"></div>
|
||||
<div class="btl-hud-metric">
|
||||
<span class="btl-hud-value" id="btLocateDetectionCount">0</span>
|
||||
<span class="btl-hud-unit"> </span>
|
||||
<span class="btl-hud-label">Detections</span>
|
||||
</div>
|
||||
<div class="btl-hud-metric">
|
||||
<span class="btl-hud-value" id="btLocateGpsCount">0</span>
|
||||
<span class="btl-hud-unit"> </span>
|
||||
<span class="btl-hud-label">GPS pts</span>
|
||||
</div>
|
||||
<div class="btl-hud-metric">
|
||||
<span class="btl-hud-value" id="btLocateSessionTime">0:00</span>
|
||||
<span class="btl-hud-unit"> </span>
|
||||
<span class="btl-hud-label">Duration</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btl-hud-controls">
|
||||
<label class="btl-hud-audio-toggle">
|
||||
<input type="checkbox" id="btLocateAudioEnable" onchange="BtLocate.toggleAudio()">
|
||||
<span>Audio</span>
|
||||
</label>
|
||||
<button class="btl-hud-clear-btn" onclick="BtLocate.clearTrail()">Clear Trail</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btl-hud-bottom">
|
||||
<div class="btl-hud-info">
|
||||
<span class="btl-hud-info-item" id="btLocateTargetInfo">--</span>
|
||||
<span class="btl-hud-info-sep">·</span>
|
||||
<span class="btl-hud-info-item" id="btLocateEnvInfo">--</span>
|
||||
<span class="btl-hud-info-sep">·</span>
|
||||
<span class="btl-hud-info-item" id="btLocateGpsStatus">GPS: --</span>
|
||||
<span class="btl-hud-info-sep">·</span>
|
||||
<span class="btl-hud-info-item" id="btLocateLastSeen">Last: --</span>
|
||||
</div>
|
||||
<div id="btLocateDiag" class="btl-hud-diag"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btl-map-container">
|
||||
<div id="btLocateMap"></div>
|
||||
</div>
|
||||
<div class="btl-rssi-chart-container">
|
||||
<span class="btl-chart-label">RSSI History</span>
|
||||
<canvas id="btLocateRssiChart"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- WebSDR Dashboard -->
|
||||
<div id="websdrVisuals" style="display: none; padding: 12px; flex-direction: column; gap: 12px; flex: 1; min-height: 0; overflow: hidden;">
|
||||
<!-- Audio Control Bar (hidden until connected) -->
|
||||
@@ -2831,7 +2972,7 @@
|
||||
<script src="{{ url_for('static', filename='js/components/device-card.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/components/proximity-radar.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/components/timeline-heatmap.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/modes/bluetooth.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/modes/bluetooth.js') }}?v={{ version }}&r=btlocate1"></script>
|
||||
<!-- WiFi v2 components -->
|
||||
<script src="{{ url_for('static', filename='js/components/channel-chart.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/modes/wifi.js') }}"></script>
|
||||
@@ -2841,9 +2982,11 @@
|
||||
<script src="{{ url_for('static', filename='js/modes/sstv.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/modes/weather-satellite.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/modes/sstv-general.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/modes/gps.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/modes/dmr.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/modes/websdr.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/modes/subghz.js') }}?v={{ version }}&r=subghz_layout9"></script>
|
||||
<script src="{{ url_for('static', filename='js/modes/bt_locate.js') }}?v={{ version }}&r=btlocate2"></script>
|
||||
|
||||
<script>
|
||||
// ============================================
|
||||
@@ -2978,8 +3121,8 @@
|
||||
let pendingStartMode = null;
|
||||
const validModes = new Set([
|
||||
'pager', 'sensor', 'rtlamr', 'aprs', 'listening',
|
||||
'spystations', 'meshtastic', 'wifi', 'bluetooth',
|
||||
'tscm', 'satellite', 'sstv', 'weathersat', 'sstv_general', 'websdr', 'subghz'
|
||||
'spystations', 'meshtastic', 'wifi', 'bluetooth', 'bt_locate',
|
||||
'tscm', 'satellite', 'sstv', 'weathersat', 'sstv_general', 'gps', 'websdr', 'subghz'
|
||||
]);
|
||||
|
||||
function getModeFromQuery() {
|
||||
@@ -3435,11 +3578,11 @@
|
||||
const modeGroups = {
|
||||
'pager': 'sdr', 'sensor': 'sdr',
|
||||
'aprs': 'sdr', 'listening': 'sdr',
|
||||
'wifi': 'wireless', 'bluetooth': 'wireless',
|
||||
'wifi': 'wireless', 'bluetooth': 'wireless', 'bt_locate': 'wireless',
|
||||
'tscm': 'security',
|
||||
'rtlamr': 'sdr', 'ais': 'sdr', 'spystations': 'sdr',
|
||||
'meshtastic': 'sdr',
|
||||
'satellite': 'space', 'sstv': 'space', 'weathersat': 'space', 'sstv_general': 'space',
|
||||
'satellite': 'space', 'sstv': 'space', 'weathersat': 'space', 'sstv_general': 'space', 'gps': 'space',
|
||||
'subghz': 'sdr'
|
||||
};
|
||||
|
||||
@@ -3513,7 +3656,7 @@
|
||||
document.querySelectorAll('.mode-nav-btn').forEach(btn => btn.classList.remove('active'));
|
||||
const modeMap = {
|
||||
'pager': 'pager', 'sensor': '433',
|
||||
'satellite': 'satellite', 'wifi': 'wifi', 'bluetooth': 'bluetooth',
|
||||
'satellite': 'satellite', 'wifi': 'wifi', 'bluetooth': 'bluetooth', 'bt_locate': 'bt locate',
|
||||
'listening': 'listening', 'aprs': 'aprs', 'tscm': 'tscm', 'meshtastic': 'meshtastic',
|
||||
'dmr': 'dmr', 'websdr': 'websdr', 'sstv_general': 'hf sstv'
|
||||
};
|
||||
@@ -3530,8 +3673,10 @@
|
||||
document.getElementById('sstvMode')?.classList.toggle('active', mode === 'sstv');
|
||||
document.getElementById('weatherSatMode')?.classList.toggle('active', mode === 'weathersat');
|
||||
document.getElementById('sstvGeneralMode')?.classList.toggle('active', mode === 'sstv_general');
|
||||
document.getElementById('gpsMode')?.classList.toggle('active', mode === 'gps');
|
||||
document.getElementById('wifiMode')?.classList.toggle('active', mode === 'wifi');
|
||||
document.getElementById('bluetoothMode')?.classList.toggle('active', mode === 'bluetooth');
|
||||
document.getElementById('btLocateMode')?.classList.toggle('active', mode === 'bt_locate');
|
||||
document.getElementById('listeningPostMode')?.classList.toggle('active', mode === 'listening');
|
||||
document.getElementById('aprsMode')?.classList.toggle('active', mode === 'aprs');
|
||||
document.getElementById('tscmMode')?.classList.toggle('active', mode === 'tscm');
|
||||
@@ -3569,8 +3714,10 @@
|
||||
'sstv': 'ISS SSTV',
|
||||
'weathersat': 'WEATHER SAT',
|
||||
'sstv_general': 'HF SSTV',
|
||||
'gps': 'GPS',
|
||||
'wifi': 'WIFI',
|
||||
'bluetooth': 'BLUETOOTH',
|
||||
'bt_locate': 'BT LOCATE',
|
||||
'listening': 'LISTENING POST',
|
||||
'aprs': 'APRS',
|
||||
'tscm': 'TSCM',
|
||||
@@ -3594,9 +3741,11 @@
|
||||
const sstvVisuals = document.getElementById('sstvVisuals');
|
||||
const weatherSatVisuals = document.getElementById('weatherSatVisuals');
|
||||
const sstvGeneralVisuals = document.getElementById('sstvGeneralVisuals');
|
||||
const gpsVisuals = document.getElementById('gpsVisuals');
|
||||
const dmrVisuals = document.getElementById('dmrVisuals');
|
||||
const websdrVisuals = document.getElementById('websdrVisuals');
|
||||
const subghzVisuals = document.getElementById('subghzVisuals');
|
||||
const btLocateVisuals = document.getElementById('btLocateVisuals');
|
||||
if (wifiLayoutContainer) wifiLayoutContainer.style.display = mode === 'wifi' ? 'flex' : 'none';
|
||||
if (btLayoutContainer) btLayoutContainer.style.display = mode === 'bluetooth' ? 'flex' : 'none';
|
||||
if (satelliteVisuals) satelliteVisuals.style.display = mode === 'satellite' ? 'block' : 'none';
|
||||
@@ -3608,9 +3757,11 @@
|
||||
if (sstvVisuals) sstvVisuals.style.display = mode === 'sstv' ? 'flex' : 'none';
|
||||
if (weatherSatVisuals) weatherSatVisuals.style.display = mode === 'weathersat' ? 'flex' : 'none';
|
||||
if (sstvGeneralVisuals) sstvGeneralVisuals.style.display = mode === 'sstv_general' ? 'flex' : 'none';
|
||||
if (gpsVisuals) gpsVisuals.style.display = mode === 'gps' ? 'flex' : 'none';
|
||||
if (dmrVisuals) dmrVisuals.style.display = mode === 'dmr' ? 'flex' : 'none';
|
||||
if (websdrVisuals) websdrVisuals.style.display = mode === 'websdr' ? 'flex' : 'none';
|
||||
if (subghzVisuals) subghzVisuals.style.display = mode === 'subghz' ? 'flex' : 'none';
|
||||
if (btLocateVisuals) btLocateVisuals.style.display = mode === 'bt_locate' ? 'flex' : 'none';
|
||||
|
||||
// Hide sidebar by default for Meshtastic mode, show for others
|
||||
const mainContent = document.querySelector('.main-content');
|
||||
@@ -3637,8 +3788,10 @@
|
||||
'sstv': 'ISS SSTV Decoder',
|
||||
'weathersat': 'Weather Satellite Decoder',
|
||||
'sstv_general': 'HF SSTV Decoder',
|
||||
'gps': 'GPS Receiver',
|
||||
'wifi': 'WiFi Scanner',
|
||||
'bluetooth': 'Bluetooth Scanner',
|
||||
'bt_locate': 'BT Locate — SAR Tracker',
|
||||
'listening': 'Listening Post',
|
||||
'aprs': 'APRS Tracker',
|
||||
'tscm': 'TSCM Counter-Surveillance',
|
||||
@@ -3665,7 +3818,7 @@
|
||||
const reconBtn = document.getElementById('reconBtn');
|
||||
const intelBtn = document.querySelector('[onclick="exportDeviceDB()"]');
|
||||
const reconPanel = document.getElementById('reconPanel');
|
||||
if (mode === 'satellite' || mode === 'sstv' || mode === 'weathersat' || mode === 'sstv_general' || mode === 'listening' || mode === 'aprs' || mode === 'tscm' || mode === 'spystations' || mode === 'meshtastic' || mode === 'dmr' || mode === 'websdr' || mode === 'subghz') {
|
||||
if (mode === 'satellite' || mode === 'sstv' || mode === 'weathersat' || mode === 'sstv_general' || mode === 'gps' || mode === 'listening' || mode === 'aprs' || mode === 'tscm' || mode === 'spystations' || mode === 'meshtastic' || mode === 'dmr' || mode === 'websdr' || mode === 'subghz') {
|
||||
if (reconPanel) reconPanel.style.display = 'none';
|
||||
if (reconBtn) reconBtn.style.display = 'none';
|
||||
if (intelBtn) intelBtn.style.display = 'none';
|
||||
@@ -3758,6 +3911,8 @@
|
||||
}, 100);
|
||||
} else if (mode === 'sstv_general') {
|
||||
SSTVGeneral.init();
|
||||
} else if (mode === 'gps') {
|
||||
GPS.init();
|
||||
} else if (mode === 'dmr') {
|
||||
if (typeof checkDmrTools === 'function') checkDmrTools();
|
||||
if (typeof checkDmrStatus === 'function') checkDmrStatus();
|
||||
@@ -3766,6 +3921,8 @@
|
||||
if (typeof initWebSDR === 'function') initWebSDR();
|
||||
} else if (mode === 'subghz') {
|
||||
SubGhz.init();
|
||||
} else if (mode === 'bt_locate') {
|
||||
BtLocate.init();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3773,6 +3930,7 @@
|
||||
window.addEventListener('resize', function () {
|
||||
if (aprsMap) aprsMap.invalidateSize();
|
||||
if (typeof Meshtastic !== 'undefined') Meshtastic.invalidateMap();
|
||||
if (typeof BtLocate !== 'undefined') BtLocate.invalidateMap();
|
||||
});
|
||||
|
||||
window.addEventListener('popstate', function () {
|
||||
|
||||
Reference in New Issue
Block a user