mirror of
https://github.com/smittix/intercept.git
synced 2026-04-24 06:40:00 -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:
72
templates/partials/modes/bt_locate.html
Normal file
72
templates/partials/modes/bt_locate.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!-- BT LOCATE MODE -->
|
||||
<div id="btLocateMode" class="mode-content">
|
||||
<div class="section">
|
||||
<h3>BT Locate</h3>
|
||||
<p class="info-text" style="font-size: 11px; color: var(--text-dim); margin-bottom: 12px;">
|
||||
SAR Bluetooth device location — GPS-tagged signal trail mapping with proximity alerts for locating missing persons' devices.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Target Lock -->
|
||||
<div class="section">
|
||||
<h3>Target</h3>
|
||||
<div id="btLocateHandoffCard" style="display: none; background: rgba(0,255,136,0.08); border: 1px solid rgba(0,255,136,0.3); border-radius: 6px; padding: 8px; margin-bottom: 8px;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<span style="font-size: 10px; color: var(--accent-green); text-transform: uppercase; font-weight: 600;">Handed off from BT</span>
|
||||
<button onclick="BtLocate.clearHandoff()" style="background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 10px;">×</button>
|
||||
</div>
|
||||
<div id="btLocateHandoffName" style="font-size: 12px; font-weight: 600; color: var(--text-primary); margin-top: 4px;"></div>
|
||||
<div id="btLocateHandoffMeta" style="font-size: 10px; color: var(--text-dim); font-family: var(--font-mono);"></div>
|
||||
</div>
|
||||
|
||||
<label class="input-label">MAC Address</label>
|
||||
<input type="text" id="btLocateMac" class="text-input" placeholder="AA:BB:CC:DD:EE:FF" style="font-family: var(--font-mono); font-size: 11px;">
|
||||
|
||||
<label class="input-label" style="margin-top: 6px;">Name Pattern</label>
|
||||
<input type="text" id="btLocateNamePattern" class="text-input" placeholder="iPhone, Galaxy, etc.">
|
||||
|
||||
<label class="input-label" style="margin-top: 6px;">IRK (hex, optional)</label>
|
||||
<div style="display: flex; gap: 4px; align-items: center;">
|
||||
<input type="text" id="btLocateIrk" class="text-input" placeholder="32 hex chars for RPA resolution" style="font-family: var(--font-mono); font-size: 10px; flex: 1;">
|
||||
<button class="btl-detect-irk-btn" id="btLocateDetectIrkBtn" onclick="BtLocate.fetchPairedIrks()" title="Detect IRKs from paired devices">Detect</button>
|
||||
</div>
|
||||
<div id="btLocateIrkPicker" class="btl-irk-picker" style="display: none;">
|
||||
<div id="btLocateIrkPickerStatus" class="btl-irk-picker-status"></div>
|
||||
<div id="btLocateIrkPickerList" class="btl-irk-picker-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Environment Preset -->
|
||||
<div class="section">
|
||||
<h3>Environment</h3>
|
||||
<div class="btl-env-grid">
|
||||
<button class="btl-env-btn" data-env="FREE_SPACE" onclick="BtLocate.setEnvironment('FREE_SPACE')">
|
||||
<span class="btl-env-icon">🏠</span>
|
||||
<span class="btl-env-label">Open Field</span>
|
||||
<span class="btl-env-n">n=2.0</span>
|
||||
</button>
|
||||
<button class="btl-env-btn active" data-env="OUTDOOR" onclick="BtLocate.setEnvironment('OUTDOOR')">
|
||||
<span class="btl-env-icon">🌳</span>
|
||||
<span class="btl-env-label">Outdoor</span>
|
||||
<span class="btl-env-n">n=2.2</span>
|
||||
</button>
|
||||
<button class="btl-env-btn" data-env="INDOOR" onclick="BtLocate.setEnvironment('INDOOR')">
|
||||
<span class="btl-env-icon">🏢</span>
|
||||
<span class="btl-env-label">Indoor</span>
|
||||
<span class="btl-env-n">n=3.0</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Controls -->
|
||||
<div class="section">
|
||||
<div style="display: flex; gap: 6px;">
|
||||
<button class="run-btn" id="btLocateStartBtn" onclick="BtLocate.start()">Start Locate</button>
|
||||
<button class="stop-btn" id="btLocateStopBtn" onclick="BtLocate.stop()" style="display: none;">Stop</button>
|
||||
</div>
|
||||
<div id="btLocateScanStatus" style="display: none; margin-top: 6px; font-size: 10px; color: var(--text-dim);">
|
||||
<span id="btLocateScanDot" style="display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; margin-right: 4px; vertical-align: middle;"></span>
|
||||
<span id="btLocateScanText">BT scanner active</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
126
templates/partials/modes/gps.html
Normal file
126
templates/partials/modes/gps.html
Normal file
@@ -0,0 +1,126 @@
|
||||
<!-- GPS MODE -->
|
||||
<div id="gpsMode" class="mode-content">
|
||||
<div class="section">
|
||||
<h3>GPS Receiver</h3>
|
||||
<p class="info-text" style="font-size: 11px; color: var(--text-dim); margin-bottom: 12px;">
|
||||
Display live GPS data from gpsd — satellite sky view, signal strengths, position, velocity, DOP values, and timing.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Connection -->
|
||||
<div class="section">
|
||||
<h3>Connection</h3>
|
||||
<div class="gps-connection-status">
|
||||
<span class="gps-status-dot" id="gpsStatusDot"></span>
|
||||
<span class="gps-status-text" id="gpsStatusText">Disconnected</span>
|
||||
</div>
|
||||
<div id="gpsDevicePath" style="font-size: 10px; color: var(--text-dim); margin-top: 4px; font-family: var(--font-mono);"></div>
|
||||
<div style="display: flex; gap: 6px; margin-top: 8px;">
|
||||
<button class="run-btn" id="gpsConnectBtn" onclick="GPS.connect()">Connect</button>
|
||||
<button class="stop-btn" id="gpsDisconnectBtn" onclick="GPS.disconnect()" style="display: none;">Disconnect</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Fix Info -->
|
||||
<div class="section">
|
||||
<h3>Fix</h3>
|
||||
<div class="gps-info-grid">
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">Fix Type</span>
|
||||
<span class="gps-info-value" id="gpsFixType">---</span>
|
||||
</div>
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">Satellites</span>
|
||||
<span class="gps-info-value"><span id="gpsSatUsed">-</span> / <span id="gpsSatTotal">-</span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Position -->
|
||||
<div class="section">
|
||||
<h3>Position</h3>
|
||||
<div class="gps-info-grid">
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">Latitude</span>
|
||||
<span class="gps-info-value gps-mono" id="gpsLat">---</span>
|
||||
</div>
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">Longitude</span>
|
||||
<span class="gps-info-value gps-mono" id="gpsLon">---</span>
|
||||
</div>
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">Altitude</span>
|
||||
<span class="gps-info-value gps-mono" id="gpsAlt">---</span>
|
||||
</div>
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">Speed</span>
|
||||
<span class="gps-info-value gps-mono" id="gpsSpeed">---</span>
|
||||
</div>
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">Heading</span>
|
||||
<span class="gps-info-value gps-mono" id="gpsHeading">---</span>
|
||||
</div>
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">Climb</span>
|
||||
<span class="gps-info-value gps-mono" id="gpsClimb">---</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- DOP Values -->
|
||||
<div class="section">
|
||||
<h3>Dilution of Precision</h3>
|
||||
<div class="gps-info-grid">
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">HDOP</span>
|
||||
<span class="gps-info-value gps-mono" id="gpsHdop">---</span>
|
||||
</div>
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">VDOP</span>
|
||||
<span class="gps-info-value gps-mono" id="gpsVdop">---</span>
|
||||
</div>
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">PDOP</span>
|
||||
<span class="gps-info-value gps-mono" id="gpsPdop">---</span>
|
||||
</div>
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">TDOP</span>
|
||||
<span class="gps-info-value gps-mono" id="gpsTdop">---</span>
|
||||
</div>
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">GDOP</span>
|
||||
<span class="gps-info-value gps-mono" id="gpsGdop">---</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Error Estimates -->
|
||||
<div class="section">
|
||||
<h3>Error Estimates</h3>
|
||||
<div class="gps-info-grid">
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">EPH (horiz)</span>
|
||||
<span class="gps-info-value gps-mono" id="gpsEph">---</span>
|
||||
</div>
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">EPV (vert)</span>
|
||||
<span class="gps-info-value gps-mono" id="gpsEpv">---</span>
|
||||
</div>
|
||||
<div class="gps-info-item">
|
||||
<span class="gps-info-label">EPS (speed)</span>
|
||||
<span class="gps-info-value gps-mono" id="gpsEps">---</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Timing -->
|
||||
<div class="section">
|
||||
<h3>GPS Time</h3>
|
||||
<div class="gps-info-grid">
|
||||
<div class="gps-info-item" style="grid-column: 1 / -1;">
|
||||
<span class="gps-info-label">UTC</span>
|
||||
<span class="gps-info-value gps-mono" id="gpsTime" style="font-size: 14px;">---</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user