@aeroswarm/core 0.2.12 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.js +1 -1
- package/dist/{chunk-OLU4NICO.js → chunk-7SUMR3X2.js} +4 -0
- package/dist/{chunk-YDUPWSVU.js → chunk-UROKN5FM.js} +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/types/index.d.ts +35 -1
- package/dist/utils/index.js +1 -1
- package/dist/validation/index.d.ts +21 -0
- package/dist/validation/index.js +1 -1
- package/package.json +1 -1
package/dist/api/index.js
CHANGED
|
@@ -39,6 +39,10 @@ var currentTrackSchema = z.object({
|
|
|
39
39
|
squawk: z.string().nullable(),
|
|
40
40
|
targetType: z.enum(["aircraft", "vehicle", "unknown"]).optional(),
|
|
41
41
|
vehicleFleet: z.number().optional(),
|
|
42
|
+
aircraftType: z.string().optional(),
|
|
43
|
+
wake: z.string().optional(),
|
|
44
|
+
route: z.object({ adep: z.string().optional(), ades: z.string().optional() }).optional(),
|
|
45
|
+
onGround: z.boolean().optional(),
|
|
42
46
|
airportId: z.string().optional(),
|
|
43
47
|
dataSource: dataSourceSchema.optional(),
|
|
44
48
|
lat: z.number().min(-90).max(90).nullable(),
|
|
@@ -83,6 +83,10 @@ function toCurrentTrack(fused, staleAfterMs = 15e3, lostAfterMs = 9e4) {
|
|
|
83
83
|
squawk: fused.identity.squawk ?? null,
|
|
84
84
|
...fused.identity.targetType !== void 0 && { targetType: fused.identity.targetType },
|
|
85
85
|
...fused.identity.vehicleFleet !== void 0 && { vehicleFleet: fused.identity.vehicleFleet },
|
|
86
|
+
...fused.identity.aircraftType !== void 0 && { aircraftType: fused.identity.aircraftType },
|
|
87
|
+
...fused.identity.wake !== void 0 && { wake: fused.identity.wake },
|
|
88
|
+
...fused.route !== void 0 && { route: fused.route },
|
|
89
|
+
...fused.position?.onGround !== void 0 && { onGround: fused.position.onGround },
|
|
86
90
|
...fused.airportId !== void 0 && { airportId: fused.airportId },
|
|
87
91
|
...fused.dataSource !== void 0 && { dataSource: fused.dataSource },
|
|
88
92
|
lat: fused.position?.lat ?? null,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SourceHealthEvent, FusedTrackEvent } from './types/index.js';
|
|
2
|
-
export { AeroConnectionStatus, AeroRecoverableError, AftnMessagePayload, AssignedRoute, Bbox, ConfidenceBudget, CurrentTrack, DataSource, FlightPhase, FlightPlan, FlightPlanEvent, FlightPlanStatus, FlightPlanSummary, Position, Protocol, RouteAssignment, SourceStatus, StreamEnvelope, TargetType, TrackSource, TrackStatus, Velocity } from './types/index.js';
|
|
2
|
+
export { AeroConnectionStatus, AeroRecoverableError, AftnMessagePayload, AssignedRoute, Bbox, ConfidenceBudget, CurrentTrack, DataSource, FlightPhase, FlightPlan, FlightPlanEvent, FlightPlanStatus, FlightPlanSummary, Position, Protocol, RouteAssignment, SourceStatus, StreamEnvelope, TargetDetails, TargetType, TrackSource, TrackStatus, Velocity } from './types/index.js';
|
|
3
3
|
import { TopicName } from './utils/index.js';
|
|
4
4
|
export { EMERGENCY_SQUAWKS, LOST_AFTER_MS, MACH1_KT, PolylineDistance, STALE_AFTER_MS, TOPICS, clamp, createEventId, createEventUid, createNanoid, createSessionId, createTrackId, distanceToPolylineM, haversineKm, isInsideBbox, isRenderableTrack, toCurrentTrack } from './utils/index.js';
|
|
5
5
|
export { applyFlightPlanEvent, flightPhase, flightPlanId, normalizeCallsign, pickMatchingPlan, summarizeFlightPlan } from './flightplan/index.js';
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
isInsideBbox,
|
|
25
25
|
isRenderableTrack,
|
|
26
26
|
toCurrentTrack
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-UROKN5FM.js";
|
|
28
28
|
import {
|
|
29
29
|
apiErrorSchema,
|
|
30
30
|
apiMetaSchema,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
velocitySchema,
|
|
40
40
|
wsSubscribeSchema,
|
|
41
41
|
wsUpdateFilterSchema
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-7SUMR3X2.js";
|
|
43
43
|
|
|
44
44
|
// src/config/index.ts
|
|
45
45
|
import { config } from "dotenv";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -28,6 +28,19 @@ interface DataSource {
|
|
|
28
28
|
sac: number;
|
|
29
29
|
sic: number;
|
|
30
30
|
}
|
|
31
|
+
/** Facts a sensor reports about a target besides its position and identity. All optional: a sensor sends what it has. */
|
|
32
|
+
interface TargetDetails {
|
|
33
|
+
/** Track number the sensor assigned */
|
|
34
|
+
trackNumber?: number;
|
|
35
|
+
/** Time of the report as the sensor stamped it, seconds since midnight UTC */
|
|
36
|
+
timeOfDay?: number;
|
|
37
|
+
/** ADS-B emitter category (CAT021 ECAT) */
|
|
38
|
+
emitterCategory?: number;
|
|
39
|
+
/** Footprint of a surface target, metres, and the way it points, degrees */
|
|
40
|
+
lengthM?: number;
|
|
41
|
+
widthM?: number;
|
|
42
|
+
orientationDeg?: number;
|
|
43
|
+
}
|
|
31
44
|
interface FusedTrackEvent {
|
|
32
45
|
trackId: string;
|
|
33
46
|
sources: [string, ...string[]];
|
|
@@ -39,7 +52,18 @@ interface FusedTrackEvent {
|
|
|
39
52
|
squawk?: string;
|
|
40
53
|
targetType?: TargetType;
|
|
41
54
|
vehicleFleet?: number;
|
|
55
|
+
/** ICAO aircraft type designator the surveillance system reports, e.g. "A320" (ASTERIX CAT062) */
|
|
56
|
+
aircraftType?: string;
|
|
57
|
+
/** Wake turbulence category L / M / H / J, as in `FlightPlan.wake` */
|
|
58
|
+
wake?: string;
|
|
59
|
+
};
|
|
60
|
+
/** Departure and destination aerodromes the surveillance system reports for the flight (ICAO), named as in `FlightPlan`. */
|
|
61
|
+
route?: {
|
|
62
|
+
adep?: string;
|
|
63
|
+
ades?: string;
|
|
42
64
|
};
|
|
65
|
+
/** What the sensor reported about the target besides where it is (ASTERIX feeds). */
|
|
66
|
+
details?: TargetDetails;
|
|
43
67
|
protocol: Protocol;
|
|
44
68
|
/** Sensor that reported this track (ASTERIX feeds only). For a merged track: the sensor whose position is shown. */
|
|
45
69
|
dataSource?: DataSource;
|
|
@@ -190,6 +214,16 @@ interface CurrentTrack {
|
|
|
190
214
|
targetType?: TargetType;
|
|
191
215
|
/** I010/300 Vehicle Fleet Identification code; only present when targetType is "vehicle" */
|
|
192
216
|
vehicleFleet?: number;
|
|
217
|
+
/** Aircraft type and wake category the surveillance system reports (not the flight plan's: see `flightPlan`) */
|
|
218
|
+
aircraftType?: string;
|
|
219
|
+
wake?: string;
|
|
220
|
+
/** Departure and destination the surveillance system reports for the flight */
|
|
221
|
+
route?: {
|
|
222
|
+
adep?: string;
|
|
223
|
+
ades?: string;
|
|
224
|
+
};
|
|
225
|
+
/** On the ground as the sensor reports it; the airport backend may replace it with its own derived state */
|
|
226
|
+
onGround?: boolean;
|
|
193
227
|
/** ICAO airport code this track is attributed to; undefined = unscoped */
|
|
194
228
|
airportId?: string;
|
|
195
229
|
/** Sensor (SAC/SIC) that reported the position shown; ASTERIX feeds only */
|
|
@@ -267,4 +301,4 @@ interface AeroRecoverableError {
|
|
|
267
301
|
}
|
|
268
302
|
type SourceStatus = SourceHealthEvent["status"];
|
|
269
303
|
|
|
270
|
-
export type { AeroConnectionStatus, AeroRecoverableError, AftnMessagePayload, AssignedRoute, Bbox, ConfidenceBudget, CurrentTrack, DataSource, FlightPhase, FlightPlan, FlightPlanEvent, FlightPlanStatus, FlightPlanSummary, FusedTrackEvent, Position, Protocol, RouteAssignment, SourceHealthEvent, SourceStatus, StreamEnvelope, TargetType, TrackSource, TrackStatus, Velocity };
|
|
304
|
+
export type { AeroConnectionStatus, AeroRecoverableError, AftnMessagePayload, AssignedRoute, Bbox, ConfidenceBudget, CurrentTrack, DataSource, FlightPhase, FlightPlan, FlightPlanEvent, FlightPlanStatus, FlightPlanSummary, FusedTrackEvent, Position, Protocol, RouteAssignment, SourceHealthEvent, SourceStatus, StreamEnvelope, TargetDetails, TargetType, TrackSource, TrackStatus, Velocity };
|
package/dist/utils/index.js
CHANGED
|
@@ -67,6 +67,13 @@ declare const currentTrackSchema: z.ZodObject<{
|
|
|
67
67
|
unknown: "unknown";
|
|
68
68
|
}>>;
|
|
69
69
|
vehicleFleet: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
aircraftType: z.ZodOptional<z.ZodString>;
|
|
71
|
+
wake: z.ZodOptional<z.ZodString>;
|
|
72
|
+
route: z.ZodOptional<z.ZodObject<{
|
|
73
|
+
adep: z.ZodOptional<z.ZodString>;
|
|
74
|
+
ades: z.ZodOptional<z.ZodString>;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
onGround: z.ZodOptional<z.ZodBoolean>;
|
|
70
77
|
airportId: z.ZodOptional<z.ZodString>;
|
|
71
78
|
dataSource: z.ZodOptional<z.ZodObject<{
|
|
72
79
|
sac: z.ZodNumber;
|
|
@@ -138,6 +145,13 @@ declare const streamEnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
138
145
|
unknown: "unknown";
|
|
139
146
|
}>>;
|
|
140
147
|
vehicleFleet: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
aircraftType: z.ZodOptional<z.ZodString>;
|
|
149
|
+
wake: z.ZodOptional<z.ZodString>;
|
|
150
|
+
route: z.ZodOptional<z.ZodObject<{
|
|
151
|
+
adep: z.ZodOptional<z.ZodString>;
|
|
152
|
+
ades: z.ZodOptional<z.ZodString>;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
onGround: z.ZodOptional<z.ZodBoolean>;
|
|
141
155
|
airportId: z.ZodOptional<z.ZodString>;
|
|
142
156
|
dataSource: z.ZodOptional<z.ZodObject<{
|
|
143
157
|
sac: z.ZodNumber;
|
|
@@ -210,6 +224,13 @@ declare const streamEnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
210
224
|
unknown: "unknown";
|
|
211
225
|
}>>;
|
|
212
226
|
vehicleFleet: z.ZodOptional<z.ZodNumber>;
|
|
227
|
+
aircraftType: z.ZodOptional<z.ZodString>;
|
|
228
|
+
wake: z.ZodOptional<z.ZodString>;
|
|
229
|
+
route: z.ZodOptional<z.ZodObject<{
|
|
230
|
+
adep: z.ZodOptional<z.ZodString>;
|
|
231
|
+
ades: z.ZodOptional<z.ZodString>;
|
|
232
|
+
}, z.core.$strip>>;
|
|
233
|
+
onGround: z.ZodOptional<z.ZodBoolean>;
|
|
213
234
|
airportId: z.ZodOptional<z.ZodString>;
|
|
214
235
|
dataSource: z.ZodOptional<z.ZodObject<{
|
|
215
236
|
sac: z.ZodNumber;
|
package/dist/validation/index.js
CHANGED