|
<!DOCTYPE html> |
|
<html> |
|
<head> |
|
<meta charset="UTF-8"> |
|
<title>Global SDR Network Monitor</title> |
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.css" /> |
|
<style> |
|
body { |
|
margin: 0; |
|
padding: 20px; |
|
background: #000; |
|
color: #0f0; |
|
font-family: monospace; |
|
overflow: hidden; |
|
} |
|
|
|
.container { |
|
display: grid; |
|
grid-template-columns: 300px 1fr; |
|
gap: 20px; |
|
height: calc(100vh - 40px); |
|
} |
|
|
|
.sidebar { |
|
background: #111; |
|
padding: 15px; |
|
border-radius: 8px; |
|
height: 100%; |
|
overflow-y: auto; |
|
z-index: 1000; |
|
} |
|
|
|
.receiver { |
|
margin: 10px 0; |
|
padding: 10px; |
|
background: #1a1a1a; |
|
border-radius: 4px; |
|
position: relative; |
|
} |
|
|
|
.status { |
|
display: flex; |
|
align-items: center; |
|
margin-bottom: 5px; |
|
} |
|
|
|
.led { |
|
width: 8px; |
|
height: 8px; |
|
border-radius: 50%; |
|
margin-right: 8px; |
|
} |
|
|
|
.active { |
|
background: #0f0; |
|
box-shadow: 0 0 10px #0f0; |
|
animation: pulse 2s infinite; |
|
} |
|
|
|
@keyframes pulse { |
|
0% { opacity: 1; } |
|
50% { opacity: 0.5; } |
|
100% { opacity: 1; } |
|
} |
|
|
|
.inactive { |
|
background: #f00; |
|
} |
|
|
|
#map-container { |
|
position: relative; |
|
height: 100%; |
|
border-radius: 8px; |
|
overflow: hidden; |
|
} |
|
|
|
canvas#map { |
|
position: absolute; |
|
top: 0; |
|
left: 0; |
|
width: 100%; |
|
height: 100%; |
|
z-index: 1; |
|
} |
|
|
|
#world-map { |
|
position: absolute; |
|
top: 0; |
|
left: 0; |
|
width: 100%; |
|
height: 100%; |
|
z-index: 0; |
|
filter: invert(1) hue-rotate(180deg); |
|
opacity: 0.5; |
|
background: #111; |
|
} |
|
|
|
.signal-strength { |
|
height: 4px; |
|
background: #222; |
|
margin-top: 5px; |
|
border-radius: 2px; |
|
} |
|
|
|
.signal-bar { |
|
height: 100%; |
|
background: linear-gradient(to right, #0f0, #00ff00); |
|
width: 0%; |
|
transition: width 0.3s ease-in-out; |
|
box-shadow: 0 0 5px #0f0; |
|
border-radius: 2px; |
|
} |
|
|
|
.detection { |
|
background: rgba(0, 255, 0, 0.1); |
|
border-left: 3px solid #0f0; |
|
padding: 8px; |
|
margin: 5px 0; |
|
font-size: 12px; |
|
border-radius: 0 4px 4px 0; |
|
} |
|
|
|
.signal-line { |
|
position: absolute; |
|
background: linear-gradient(90deg, rgba(0,255,0,0.4) 0%, rgba(0,255,0,0) 100%); |
|
height: 2px; |
|
transform-origin: 0 0; |
|
pointer-events: none; |
|
opacity: 0.7; |
|
animation: signalPulse 2s infinite; |
|
} |
|
|
|
@keyframes signalPulse { |
|
0% { opacity: 0.7; } |
|
50% { opacity: 0.3; } |
|
100% { opacity: 0.7; } |
|
} |
|
|
|
.leaflet-container { |
|
background: #111 !important; |
|
} |
|
|
|
.leaflet-control-attribution { |
|
background: rgba(17, 17, 17, 0.8) !important; |
|
color: #666 !important; |
|
} |
|
|
|
.leaflet-control-attribution a { |
|
color: #888 !important; |
|
} |
|
|
|
.leaflet-popup-content { |
|
color: black; |
|
} |
|
|
|
.leaflet-control-zoom { |
|
border: none !important; |
|
background: rgba(17, 17, 17, 0.8) !important; |
|
} |
|
|
|
.leaflet-control-zoom a { |
|
color: #0f0 !important; |
|
background: #222 !important; |
|
border: 1px solid #0f0 !important; |
|
} |
|
|
|
.leaflet-control-zoom a:hover { |
|
background: #333 !important; |
|
} |
|
</style> |
|
</head> |
|
|
|
<body> |
|
<div class="container"> |
|
<div class="sidebar"> |
|
<h3>Active SDR Receivers</h3> |
|
<div id="receivers"></div> |
|
|
|
<h3>Real-time Detections</h3> |
|
<div id="detections"></div> |
|
</div> |
|
|
|
<div id="map-container"> |
|
<div id="world-map"></div> |
|
<canvas id="map"></canvas> |
|
</div> |
|
</div> |
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js"></script> |
|
<script> |
|
|
|
const sdrStations = [ |
|
|
|
{ |
|
name: "Twente WebSDR", |
|
url: "websdr.ewi.utwente.nl:8901", |
|
location: [52.2389, 6.8343], |
|
frequency: "0-29.160 MHz", |
|
range: 200, |
|
active: true |
|
}, |
|
{ |
|
name: "TU Delft WebSDR", |
|
url: "websdr.tudelft.nl:8901", |
|
location: [51.9981, 4.3731], |
|
frequency: "0-29.160 MHz", |
|
range: 180, |
|
active: true |
|
}, |
|
{ |
|
name: "SUWS WebSDR UK", |
|
url: "websdr.suws.org.uk", |
|
location: [51.2785, -0.7642], |
|
frequency: "0-30 MHz", |
|
range: 150, |
|
active: true |
|
}, |
|
{ |
|
name: "KiwiSDR Switzerland", |
|
url: "hb9ryz.no-ip.org:8073", |
|
location: [47.3769, 8.5417], |
|
frequency: "0-30 MHz", |
|
range: 160, |
|
active: true |
|
}, |
|
|
|
{ |
|
name: "W6DRZ WebSDR", |
|
url: "w6drz.sdr.us:8901", |
|
location: [34.2847, -118.4429], |
|
frequency: "0-30 MHz", |
|
range: 170, |
|
active: true |
|
}, |
|
{ |
|
name: "K3FEF WebSDR", |
|
url: "k3fef.sdr.us:8901", |
|
location: [40.5697, -75.9363], |
|
frequency: "0-30 MHz", |
|
range: 160, |
|
active: true |
|
}, |
|
{ |
|
name: "WA2ZKD KiwiSDR", |
|
url: "wa2zkd.sdr.us:8073", |
|
location: [40.7128, -74.0060], |
|
frequency: "0-30 MHz", |
|
range: 150, |
|
active: true |
|
}, |
|
{ |
|
name: "W4AX WebSDR", |
|
url: "w4ax.sdr.us:8901", |
|
location: [33.7756, -84.3963], |
|
frequency: "0-30 MHz", |
|
range: 165, |
|
active: true |
|
}, |
|
|
|
{ |
|
name: "JH7VHZ WebSDR", |
|
url: "jh7vhz.sdr.jp:8901", |
|
location: [38.2682, 140.8694], |
|
frequency: "0-30 MHz", |
|
range: 155, |
|
active: true |
|
}, |
|
{ |
|
name: "JA1GJB KiwiSDR", |
|
url: "ja1gjb.sdr.jp:8073", |
|
location: [35.6762, 139.6503], |
|
frequency: "0-30 MHz", |
|
range: 145, |
|
active: true |
|
}, |
|
|
|
]; |
|
|
|
class RadarSystem { |
|
constructor() { |
|
this.canvas = document.getElementById('map'); |
|
this.ctx = this.canvas.getContext('2d'); |
|
this.targets = new Set(); |
|
this.signalLines = new Set(); |
|
this.setupWorldMap(); |
|
this.setupCanvas(); |
|
this.renderReceivers(); |
|
this.startTracking(); |
|
|
|
window.addEventListener('resize', this.handleResize.bind(this)); |
|
} |
|
|
|
setupWorldMap() { |
|
|
|
this.worldMap = L.map('world-map', { |
|
center: [30, 0], |
|
zoom: 3, |
|
minZoom: 2, |
|
maxZoom: 18, |
|
zoomControl: true, |
|
dragging: true, |
|
scrollWheelZoom: true, |
|
doubleClickZoom: true |
|
}); |
|
|
|
|
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
|
attribution: 'Β© OpenStreetMap contributors', |
|
noWrap: false, |
|
bounds: [[-90, -180], [90, 180]] |
|
}).addTo(this.worldMap); |
|
|
|
|
|
L.control.zoom({ |
|
position: 'topright' |
|
}).addTo(this.worldMap); |
|
|
|
|
|
sdrStations.forEach(station => { |
|
|
|
const stationMarker = L.circleMarker([station.location[0], station.location[1]], { |
|
radius: 8, |
|
color: '#0f0', |
|
fillColor: '#0f0', |
|
fillOpacity: 0.5, |
|
weight: 2 |
|
}).addTo(this.worldMap); |
|
|
|
|
|
L.circle([station.location[0], station.location[1]], { |
|
radius: station.range * 1000, |
|
color: '#0f0', |
|
fillColor: '#0f0', |
|
fillOpacity: 0.1, |
|
weight: 1 |
|
}).addTo(this.worldMap); |
|
|
|
|
|
stationMarker.bindPopup(` |
|
<div style="color: black;"> |
|
<strong>${station.name}</strong><br> |
|
π‘ ${station.url}<br> |
|
π» ${station.frequency}<br> |
|
Range: ${station.range}km |
|
</div> |
|
`); |
|
}); |
|
} |
|
|
|
generateTarget() { |
|
const station = sdrStations[Math.floor(Math.random() * sdrStations.length)]; |
|
const range = station.range / 100; |
|
return { |
|
type: Math.random() > 0.7 ? 'aircraft' : 'vehicle', |
|
position: { |
|
lat: station.location[0] + (Math.random() - 0.5) * range, |
|
lon: station.location[1] + (Math.random() - 0.5) * range |
|
}, |
|
speed: Math.random() * 100 + 50, |
|
heading: Math.random() * 360, |
|
station: station |
|
}; |
|
} |
|
|
|
updateTargets() { |
|
if (Math.random() < 0.1 && this.targets.size < 10) { |
|
const newTarget = this.generateTarget(); |
|
this.targets.add(newTarget); |
|
|
|
|
|
const targetMarker = L.circleMarker([newTarget.position.lat, newTarget.position.lon], { |
|
radius: 5, |
|
color: newTarget.type === 'aircraft' ? '#ff0' : '#f00', |
|
fillColor: newTarget.type === 'aircraft' ? '#ff0' : '#f00', |
|
fillOpacity: 0.8, |
|
weight: 2 |
|
}).addTo(this.worldMap); |
|
|
|
newTarget.marker = targetMarker; |
|
} |
|
|
|
this.targets.forEach(target => { |
|
const rad = target.heading * Math.PI / 180; |
|
target.position.lat += Math.cos(rad) * target.speed * 0.00001; |
|
target.position.lon += Math.sin(rad) * target.speed * 0.00001; |
|
|
|
if (target.marker) { |
|
target.marker.setLatLng([target.position.lat, target.position.lon]); |
|
} |
|
|
|
const distance = this.calculateDistance( |
|
target.position.lat, |
|
target.position.lon, |
|
target.station.location[0], |
|
target.station.location[1] |
|
); |
|
|
|
if (distance > target.station.range) { |
|
if (target.marker) { |
|
this.worldMap.removeLayer(target.marker); |
|
} |
|
this.targets.delete(target); |
|
} |
|
}); |
|
} |
|
|
|
addSignalLine(target) { |
|
const stationLatLng = L.latLng(target.station.location[0], target.station.location[1]); |
|
const targetLatLng = L.latLng(target.position.lat, target.position.lon); |
|
|
|
|
|
const line = L.polyline([stationLatLng, targetLatLng], { |
|
color: '#0f0', |
|
weight: 2, |
|
opacity: 0.8, |
|
dashArray: '5, 10', |
|
className: 'signal-line' |
|
}).addTo(this.worldMap); |
|
|
|
|
|
setTimeout(() => { |
|
this.worldMap.removeLayer(line); |
|
}, 2000); |
|
} |
|
|
|
startTracking() { |
|
setInterval(() => { |
|
this.updateTargets(); |
|
this.targets.forEach(target => { |
|
if (Math.random() < 0.3) { |
|
this.addDetection(target); |
|
} |
|
}); |
|
}, 2000); |
|
} |
|
} |
|
|
|
|
|
window.addEventListener('load', () => { |
|
new RadarSystem(); |
|
}); |
|
</script> |
|
</body> |
|
</html> |