mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
feat(layers): highlight aircraft broadcasting a transponder emergency
Flights and Military Flights tint aircraft red while the latest poll carries squawk 7500/7600/7700 or an adsb.lol ADS-B emergency status (general/unlawful/nordo/downed). Minimum-fuel and lifeguard priorities are reported but not tinted. The Cockpit HUD aircraft-meta line names the broadcast code in red. The status is not sticky: a cleared code stops highlighting on the next refresh. The analyst/voice query engine gains squawk, emergency and emergencyKind fields. No new source or request: OpenSky state vectors already carry the squawk and adsb.lol/readsb carries both fields. Built by the Hex project (Crew Leo Agile dev team). Co-Authored-By: Claude <[email protected]>
This commit is contained in:
1 parent
9beadbda63
commit
eb7f059750
26 files changed
+1174
-107
No files matched your search
@@ -71,11 +71,31 @@ test('military analyst record: full record maps every contract field', () => {
|
||||
aircraftClass: 'widebody',
|
||||
originCountry: null,
|
||||
operator: 'United States Air Force',
|
||||
squawk: null,
|
||||
emergency: false,
|
||||
emergencyKind: null,
|
||||
routeOrigin: null,
|
||||
routeDestination: null,
|
||||
});
|
||||
});
|
||||
|
||||
test('military analyst record: emergency flag is only raised for emergency severity', () => {
|
||||
const hijack = mapAnalystRecord('ae01ce', {
|
||||
...FULL_INFO,
|
||||
squawk: '7500',
|
||||
emergency: { kind: 'unlawful', severity: 'emergency', squawk: '7500' },
|
||||
});
|
||||
assert.equal(hijack.squawk, '7500');
|
||||
assert.equal(hijack.emergency, true);
|
||||
assert.equal(hijack.emergencyKind, 'unlawful');
|
||||
const lifeguard = mapAnalystRecord('ae01ce', {
|
||||
...FULL_INFO,
|
||||
emergency: { kind: 'lifeguard', severity: 'priority', squawk: null },
|
||||
});
|
||||
assert.equal(lifeguard.emergency, false);
|
||||
assert.equal(lifeguard.emergencyKind, 'lifeguard');
|
||||
});
|
||||
|
||||
test('military analyst record: military is ALWAYS true, routes/country always null', () => {
|
||||
const r = mapAnalystRecord('ae01ce', undefined);
|
||||
assert.equal(r.military, true);
|
||||
|
||||
Reference in new issue
Block a user