fix: integrate GNSS and emergency features with current main contracts

This commit is contained in:
Mazeyar Moeini Feizabadi committed 2026-10-13 17:42:30 +02:00
1 parent 69e8b18e02
commit ec80c89c1e
27 files changed
+1581 -453

No files matched your search

+4 -4
View File
@@ -225,7 +225,7 @@ export function createQueries({
* military: boolean, aircraftClass: string|null, originCountry: string|null,
* operator: string|null, squawk: string|null, emergency: boolean,
* emergencyKind: string|null, emergencySource: 'squawk'|'ads-b'|null,
* emergencyBroadcast: string|null, observedAtMs: number|null, routeOrigin: string|null,
* emergencyBroadcast: string|null, lastContactAtMs: number|null, routeOrigin: string|null,
* routeDestination: string|null}}
*/
@@ -271,9 +271,9 @@ export function createQueries({
// when the Mode A code names the status, 'ads-b' for the readsb field.
emergencySource: text(info?.emergency?.source),
emergencyBroadcast: emergencyBroadcastPhrase(info?.emergency),
// Epoch ms of the last transponder message — when this squawk/status
// was heard (OpenSky time_contact; readsb snapshot time minus `seen`).
observedAtMs: num(info?.lastContactEpochMs),
// Latest known general aircraft-message contact, retained if a poll
// has no time. This is not the receipt time of the current status.
lastContactAtMs: num(info?.lastContactEpochMs),
routeOrigin: routeOk ? text(info?.route?.origin?.code) : null,
routeDestination: routeOk ? text(info?.route?.destination?.code) : null,
};
+4 -4
View File
@@ -162,7 +162,7 @@ export function createQueries({
* military: boolean, aircraftClass: string|null, originCountry: null,
* operator: string|null, squawk: string|null, emergency: boolean,
* emergencyKind: string|null, emergencySource: 'squawk'|'ads-b'|null,
* emergencyBroadcast: string|null, observedAtMs: number|null, routeOrigin: null, routeDestination: null}}
* emergencyBroadcast: string|null, lastContactAtMs: number|null, routeOrigin: null, routeDestination: null}}
*/
function mapAnalystRecord(icao24, info) {
@@ -204,9 +204,9 @@ export function createQueries({
// when the Mode A code names the status, 'ads-b' for the readsb field.
emergencySource: text(info?.emergency?.source),
emergencyBroadcast: emergencyBroadcastPhrase(info?.emergency),
// Epoch ms of the last transponder message — when this squawk/status
// was heard (OpenSky time_contact; readsb snapshot time minus `seen`).
observedAtMs: num(info?.lastContactEpochMs),
// Latest known general aircraft-message contact, retained if a poll
// has no time. This is not the receipt time of the current status.
lastContactAtMs: num(info?.lastContactEpochMs),
routeOrigin: null,
routeDestination: null,
};