Dateien
AegisSight-Globe/static/js/layers/iss.js
Claude Dev fd9e6558db 5 neue Layer: Militaerflug, Seekabel, Infrastruktur, ISS Tracker
MILITAERFLUGVERKEHR (adsb.lol /v2/mil):
- ~254 Militaerflugzeuge weltweit in Echtzeit (rot)
- Callsign-Labels bei Zoom (RCH=USAF, GAF=Luftwaffe etc.)
- Klick zeigt: Callsign, Registration, Typ, Hoehe, Squawk
- 20s Refresh

SEEKABEL (TeleGeography):
- Untersee-Glasfaserkabel als cyan-Linien auf dem Globus
- ~500+ internationale Kabelverbindungen
- Geopolitisch relevant (Sabotage, Abhoerung)

INFRASTRUKTUR (OpenStreetMap Overpass):
- 348 Kernkraftwerke weltweit (gelb mit Orange-Rand)
- Militaerflughaefen (rot)
- Labels bei Zoom (<500km)
- 24h Cache (statische Daten)

ISS TRACKER (Open-Notify API):
- Echtzeit-Position der ISS (roter Punkt, 420km Hoehe)
- 5s Refresh, prominentes Label
- Klick zeigt Details

Backend: data_military.py, data_infra.py (2 neue Dateien)
Frontend: military.js, cables.js, infra.js, iss.js (4 neue Dateien)
2026-03-24 23:05:43 +01:00

44 Zeilen
1.8 KiB
JavaScript

const ISSLayer = {
_viewer: null, _entity: null, _interval: null, _count: 0,
start(viewer) {
if (this._entity) return;
this._viewer = viewer;
this._entity = viewer.entities.add({
name: 'ISS - International Space Station',
position: Cesium.Cartesian3.fromDegrees(0, 0, 420000),
point: { pixelSize: 10, color: Cesium.Color.fromCssColorString('#ff4444'),
outlineColor: Cesium.Color.WHITE, outlineWidth: 2 },
label: { text: 'ISS', font: '12px monospace bold',
fillColor: Cesium.Color.fromCssColorString('#ff4444'),
outlineColor: Cesium.Color.BLACK, outlineWidth: 3,
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
pixelOffset: new Cesium.Cartesian2(12, -6) },
description: '<div style="font-family:monospace;font-size:13px;color:#ff4444;padding:8px"><strong>International Space Station</strong><br>Hoehe: ~420 km<br>Geschwindigkeit: ~27.600 km/h</div>',
});
this._count = 1;
this._fetch();
var self = this;
this._interval = setInterval(function() { self._fetch(); }, 5000);
},
stop() {
if (this._interval) { clearInterval(this._interval); this._interval = null; }
if (this._entity && this._viewer) { this._viewer.entities.remove(this._entity); this._entity = null; }
this._count = 0;
},
_fetch() {
var self = this;
fetch('/api/iss')
.then(function(r) { return r.json(); })
.then(function(data) {
if (!self._entity || data.message !== 'success') return;
var pos = data.iss_position;
self._entity.position = Cesium.Cartesian3.fromDegrees(
parseFloat(pos.longitude), parseFloat(pos.latitude), 420000
);
}).catch(function() {});
},
};