@squawk/mode-s 0.2.0 → 0.3.0

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/README.md CHANGED
@@ -5,13 +5,14 @@
5
5
  Decodes raw Mode-S/ADS-B messages: downlink format and CRC extraction, CPR
6
6
  position, airborne velocity, aircraft identification, altitude (both the
7
7
  ADS-B position-message field and legacy Gillham-coded surveillance replies),
8
- squawk identity, emergency status, ACAS/TCAS Resolution Advisories, target
9
- state and status, aircraft operational status, and Enhanced Surveillance
10
- Comm-B registers (selected vertical intention, track and turn, heading and
11
- speed). Transport-agnostic - it operates on already-framed message bytes and
12
- has no opinion about where they came from (a live Beast feed, a logged
13
- capture, or any other source). For a Beast binary parser and live TCP client
14
- built on top of this package, see [`@squawk/beast`](../beast).
8
+ squawk identity, Flight Status alert/ident flags, emergency status,
9
+ ACAS/TCAS Resolution Advisories, target state and status, aircraft
10
+ operational status, and Enhanced Surveillance Comm-B registers (selected
11
+ vertical intention, track and turn, heading and speed). Transport-agnostic -
12
+ it operates on already-framed message bytes and has no opinion about where
13
+ they came from (a live Beast feed, a logged capture, or any other source).
14
+ For a Beast binary parser and live TCP client built on top of this package,
15
+ see [`@squawk/beast`](../beast).
15
16
 
16
17
  Part of the [@squawk](https://www.npmjs.com/org/squawk) aviation library suite. See all packages on npm.
17
18
 
@@ -70,6 +71,8 @@ package doesn't perform that cross-check itself. DF20/21 (`'commBAltitudeReply'`
70
71
  carry the same altitude/squawk payload as DF4/5 plus a 56-bit MB field,
71
72
  decoded into `commBRegisters` - see
72
73
  [Enhanced Surveillance Comm-B registers](#enhanced-surveillance-comm-b-registers).
74
+ DF4/5/20/21 additionally carry `identActive`/`squawkAlert` - see
75
+ [Flight Status (alert/ident)](#flight-status-alertident).
73
76
 
74
77
  ### Resolving CPR position
75
78
 
@@ -209,6 +212,23 @@ if (decoded?.kind === 'commBAltitudeReply') {
209
212
  `inferCommBRegisters(mb)` is also exported directly for callers working with
210
213
  a raw MB field outside of `decodeModeSMessage`'s DF20/21 dispatch.
211
214
 
215
+ ### Flight Status (alert/ident)
216
+
217
+ DF4/5/20/21 carry a 3-bit Flight Status (FS) field with the transponder's
218
+ Alert (recent squawk change) and Ident (SPI) flags:
219
+
220
+ ```typescript
221
+ const decoded = decodeModeSMessage(rawMessageBytes);
222
+ if (decoded?.kind === 'surveillanceAltitudeReply') {
223
+ console.log(decoded.identActive, decoded.squawkAlert);
224
+ }
225
+ ```
226
+
227
+ Both fields are undefined for the two reserved FS values (6, 7), where
228
+ alert/ident status is not defined - `decodeFlightStatus(fsField)` is also
229
+ exported directly for callers working with a raw FS field outside of
230
+ `decodeModeSMessage`'s dispatch.
231
+
212
232
  ### Mode A/C
213
233
 
214
234
  Mode A/C predates Mode-S and carries no ICAO address, so it has no natural
@@ -234,6 +254,7 @@ console.log(reply.squawk, reply.identActive, reply.altitudeFt);
234
254
  - `decodeAltitudeCode(altitudeCode)`, `decodeAdsbPositionAltitude(field)`, `decodeAdsbGnssAltitude(field)` - altitude decoding.
235
255
  - `decodeSurfaceMovement(field)` - ground speed from a surface position message's movement field.
236
256
  - `decodeEmergencyState(rawState)` - emergency/priority state from an ADS-B aircraft status message.
257
+ - `decodeFlightStatus(fsField)` - Alert/Ident flags from a DF4/5/20/21 Flight Status field.
237
258
  - `decodeAcasResolutionAdvisory(payload)` - ACAS/TCAS Resolution Advisory report from a DF16 MV field or a type-code-28 subtype-2 ME field.
238
259
  - `decodeTargetStateAndStatus(me)` - target state and status from a type-29 ME field.
239
260
  - `decodeAircraftOperationalStatus(me)` - operational status from a type-31 ME field.
@@ -0,0 +1,10 @@
1
+ import type { FlightStatus } from './types/index.js';
2
+ /**
3
+ * Decodes the 3-bit Flight Status (FS) field of a DF4/5/20/21 Mode-S
4
+ * surveillance reply.
5
+ *
6
+ * @param fsField - The raw 3-bit field, 0-7.
7
+ * @returns The decoded Alert and Ident status.
8
+ */
9
+ export declare function decodeFlightStatus(fsField: number): FlightStatus;
10
+ //# sourceMappingURL=flight-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flight-status.d.ts","sourceRoot":"","sources":["../src/flight-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAsBrD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAEhE"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Alert and Ident (SPI) status per Flight Status (FS) field value, 0-7, per
3
+ * ICAO Annex 10 Vol. IV / RTCA DO-260 - cross-checked against dump1090-fa's
4
+ * own `mode_s.c` FS decode (the reference decoder this package already
5
+ * treats as ground truth for wire-format behavior; see the package README).
6
+ * FS 6 and 7 are reserved: neither alert nor Ident status is defined for
7
+ * them, so both fields are left undefined rather than guessed at false.
8
+ */
9
+ const FLIGHT_STATUSES = [
10
+ { identActive: false, squawkAlert: false }, // 0: no alert, no ident
11
+ { identActive: false, squawkAlert: false }, // 1: no alert, no ident
12
+ { identActive: false, squawkAlert: true }, // 2: alert, no ident
13
+ { identActive: false, squawkAlert: true }, // 3: alert, no ident
14
+ { identActive: true, squawkAlert: true }, // 4: alert, ident
15
+ { identActive: true, squawkAlert: false }, // 5: no alert, ident
16
+ ];
17
+ /** Returned for the reserved FS values (6, 7), where alert/Ident status is not defined. */
18
+ const RESERVED_FLIGHT_STATUS = { identActive: undefined, squawkAlert: undefined };
19
+ /**
20
+ * Decodes the 3-bit Flight Status (FS) field of a DF4/5/20/21 Mode-S
21
+ * surveillance reply.
22
+ *
23
+ * @param fsField - The raw 3-bit field, 0-7.
24
+ * @returns The decoded Alert and Ident status.
25
+ */
26
+ export function decodeFlightStatus(fsField) {
27
+ return FLIGHT_STATUSES[fsField] ?? RESERVED_FLIGHT_STATUS;
28
+ }
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export { decodeAdsbGnssAltitude, decodeAdsbPositionAltitude, decodeAltitudeCode,
11
11
  export { decodeHeadingAndSpeedReport, decodeSelectedVerticalIntention, decodeTrackAndTurnReport, inferCommBRegisters, } from './comm-b.js';
12
12
  export { cprNumLongitudeZones, decodeAirborneCprPair, decodeAirborneCprWithReference, decodeSurfaceCprPair, decodeSurfaceCprWithReference, } from './cpr.js';
13
13
  export { decodeEmergencyState } from './emergency-status.js';
14
+ export { decodeFlightStatus } from './flight-status.js';
14
15
  export { extractDownlinkFormat, computeCrc24, parseModeSFrame } from './frame.js';
15
16
  export { decodeIdentification } from './identification.js';
16
17
  export { decodeIdentityCode } from './identity.js';
@@ -25,6 +26,7 @@ export type { TargetStateAndStatus } from './types/index.js';
25
26
  export type { CommBRegister, HeadingAndSpeedReport, SelectedVerticalIntention, TrackAndTurnReport, } from './types/index.js';
26
27
  export type { AcasResolutionAdvisoryReport, AcasThreat, AcasThreatAltitudeRangeBearing, AcasThreatIcaoAddress, AcasThreatNone, AcasThreatType, ResolutionAdvisoryType, } from './types/index.js';
27
28
  export type { EmergencyState } from './types/index.js';
29
+ export type { FlightStatus } from './types/index.js';
28
30
  export type { AircraftIdentification } from './types/index.js';
29
31
  export type { AirborneVelocity, AirborneVelocityCommon, AirSpeedVelocity, GroundSpeedVelocity, } from './types/index.js';
30
32
  export type { CprPosition, CprReference, ModeSMessageEnvelope } from './types/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,2BAA2B,EAC3B,+BAA+B,EAC/B,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EAC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B,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EACV,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,+BAA+B,EAC/B,sBAAsB,EACtB,+BAA+B,EAC/B,8BAA8B,EAC9B,iCAAiC,EACjC,wBAAwB,EACxB,oCAAoC,EACpC,wBAAwB,EACxB,2BAA2B,EAC3B,aAAa,EACb,4BAA4B,EAC5B,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAClE,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,YAAY,EACV,aAAa,EACb,qBAAqB,EACrB,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,4BAA4B,EAC5B,UAAU,EACV,8BAA8B,EAC9B,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,YAAY,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxF,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -11,6 +11,7 @@ export { decodeAdsbGnssAltitude, decodeAdsbPositionAltitude, decodeAltitudeCode,
11
11
  export { decodeHeadingAndSpeedReport, decodeSelectedVerticalIntention, decodeTrackAndTurnReport, inferCommBRegisters, } from './comm-b.js';
12
12
  export { cprNumLongitudeZones, decodeAirborneCprPair, decodeAirborneCprWithReference, decodeSurfaceCprPair, decodeSurfaceCprWithReference, } from './cpr.js';
13
13
  export { decodeEmergencyState } from './emergency-status.js';
14
+ export { decodeFlightStatus } from './flight-status.js';
14
15
  export { extractDownlinkFormat, computeCrc24, parseModeSFrame } from './frame.js';
15
16
  export { decodeIdentification } from './identification.js';
16
17
  export { decodeIdentityCode } from './identity.js';
@@ -1 +1 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../src/message.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,mBAAmB,EAGpB,MAAM,kBAAkB,CAAC;AAuN1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,mBAAmB,GAAG,SAAS,CAqFrF"}
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../src/message.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,mBAAmB,EAGpB,MAAM,kBAAkB,CAAC;AAuN1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,mBAAmB,GAAG,SAAS,CAiGrF"}
package/dist/message.js CHANGED
@@ -3,6 +3,7 @@ import { decodeAdsbGnssAltitude, decodeAdsbPositionAltitude, decodeAltitudeCode,
3
3
  import { extractBits, formatHexAddress } from './bits.js';
4
4
  import { inferCommBRegisters } from './comm-b.js';
5
5
  import { decodeEmergencyState } from './emergency-status.js';
6
+ import { decodeFlightStatus } from './flight-status.js';
6
7
  import { parseModeSFrame } from './frame.js';
7
8
  import { decodeIdentification } from './identification.js';
8
9
  import { decodeIdentityCode } from './identity.js';
@@ -261,35 +262,47 @@ export function decodeModeSMessage(bytes) {
261
262
  }
262
263
  if (envelope.downlinkFormat === 4) {
263
264
  const acField = extractBits(bytes, 19, 13);
265
+ const flightStatus = decodeFlightStatus(extractBits(bytes, 5, 3));
264
266
  return {
265
267
  kind: 'surveillanceAltitudeReply',
266
268
  candidateIcaoHex: formatHexAddress(envelope.crcRemainder),
267
269
  altitudeFt: decodeAltitudeCode(acField),
270
+ identActive: flightStatus.identActive,
271
+ squawkAlert: flightStatus.squawkAlert,
268
272
  };
269
273
  }
270
274
  if (envelope.downlinkFormat === 20) {
271
275
  const acField = extractBits(bytes, 19, 13);
276
+ const flightStatus = decodeFlightStatus(extractBits(bytes, 5, 3));
272
277
  return {
273
278
  kind: 'commBAltitudeReply',
274
279
  candidateIcaoHex: formatHexAddress(envelope.crcRemainder),
275
280
  altitudeFt: decodeAltitudeCode(acField),
281
+ identActive: flightStatus.identActive,
282
+ squawkAlert: flightStatus.squawkAlert,
276
283
  commBRegisters: inferCommBRegisters(bytes.slice(4, 11)),
277
284
  };
278
285
  }
279
286
  if (envelope.downlinkFormat === 5) {
280
287
  const idField = extractBits(bytes, 19, 13);
288
+ const flightStatus = decodeFlightStatus(extractBits(bytes, 5, 3));
281
289
  return {
282
290
  kind: 'surveillanceIdentityReply',
283
291
  candidateIcaoHex: formatHexAddress(envelope.crcRemainder),
284
292
  squawk: decodeIdentityCode(idField),
293
+ identActive: flightStatus.identActive,
294
+ squawkAlert: flightStatus.squawkAlert,
285
295
  };
286
296
  }
287
297
  if (envelope.downlinkFormat === 21) {
288
298
  const idField = extractBits(bytes, 19, 13);
299
+ const flightStatus = decodeFlightStatus(extractBits(bytes, 5, 3));
289
300
  return {
290
301
  kind: 'commBIdentityReply',
291
302
  candidateIcaoHex: formatHexAddress(envelope.crcRemainder),
292
303
  squawk: decodeIdentityCode(idField),
304
+ identActive: flightStatus.identActive,
305
+ squawkAlert: flightStatus.squawkAlert,
293
306
  commBRegisters: inferCommBRegisters(bytes.slice(4, 11)),
294
307
  };
295
308
  }
@@ -1,82 +1,2 @@
1
- /**
2
- * The named Resolution Advisory type for a single-threat encounter, derived
3
- * from the corrective/sense/rate/crossing/reversal flags per RTCA DO-185B
4
- * Table 2-16 (reproduced as Table 3 in the FAA's "Introduction to TCAS II
5
- * v7.1"). "Maintain Climb"/"Maintain Descend" and "Crossing Maintain
6
- * Climb"/"Crossing Maintain Descend" are not distinct wire values - they
7
- * are the same broadcast RA as `climb`/`descend` (or their crossing
8
- * variants), annunciated differently by the receiving aircraft's own TCAS
9
- * unit depending on whether it was already climbing/descending faster than
10
- * the initially-commanded rate.
11
- */
12
- export type ResolutionAdvisoryType = 'climb' | 'descend' | 'crossingClimb' | 'crossingDescend' | 'increaseClimb' | 'increaseDescent' | 'reduceClimb' | 'reduceDescent' | 'doNotClimb' | 'doNotDescend' | 'reversalToClimb' | 'reversalToDescend';
13
- /** No threat-identity data (Threat Type Indicator 0). */
14
- export interface AcasThreatNone {
15
- /** Discriminant tag - no threat-identity data follows. */
16
- threatType: 'none';
17
- }
18
- /** The threat identified by its 24-bit ICAO address (Threat Type Indicator 1). */
19
- export interface AcasThreatIcaoAddress {
20
- /** Discriminant tag - the threat is identified by ICAO address. */
21
- threatType: 'icaoAddress';
22
- /** The threat aircraft's 24-bit ICAO hex address. */
23
- threatIcaoHex: string;
24
- }
25
- /** The threat identified by relative altitude, range, and bearing (Threat Type Indicator 2). */
26
- export interface AcasThreatAltitudeRangeBearing {
27
- /** Discriminant tag - the threat is identified by altitude/range/bearing. */
28
- threatType: 'altitudeRangeBearing';
29
- /** The threat's altitude in feet, or undefined if the field is unavailable. */
30
- threatAltitudeFt: number | undefined;
31
- /** The threat's range in nautical miles, or undefined if the field is unavailable. */
32
- threatRangeNm: number | undefined;
33
- /** The threat's bearing in degrees relative to own aircraft, or undefined if the field is unavailable. */
34
- threatBearingDeg: number | undefined;
35
- }
36
- /**
37
- * The identity of the threat an ACAS Resolution Advisory report responds
38
- * to, discriminated by `threatType` (the 2-bit Threat Type Indicator, TTI).
39
- */
40
- export type AcasThreat = AcasThreatNone | AcasThreatIcaoAddress | AcasThreatAltitudeRangeBearing;
41
- /** Which kind of threat-identity data an ACAS Resolution Advisory report carries - the `threatType` discriminant of {@link AcasThreat}. */
42
- export type AcasThreatType = AcasThreat['threatType'];
43
- /**
44
- * A decoded ACAS/TCAS Resolution Advisory report - BDS 3,0 content, carried
45
- * either in a DF16 long air-air surveillance reply's MV field, or in a
46
- * DF17/18 type-code-28 subtype-2 ME field (the ADS-B RA broadcast, which
47
- * carries the identical content so aircraft without interrogation
48
- * capability can still see an active RA).
49
- */
50
- export interface AcasResolutionAdvisoryReport {
51
- /** Whether a Resolution Advisory is currently active. False (with every other field still populated) means no advisory is presently in effect. */
52
- active: boolean;
53
- /** The named RA type for a single-threat encounter, derived from `corrective`/`downwardSense`/`increasedRate`/`senseReversal`/`altitudeCrossing`. Undefined when `active` is false, or when the flag combination has no defined single-threat RA type (e.g. some multi-threat composites - see `doNotPassBelow`/`doNotPassAbove`/`doNotTurnLeft`/`doNotTurnRight`). */
54
- advisoryType: ResolutionAdvisoryType | undefined;
55
- /** True if own aircraft must change its current vertical speed to comply; false if the RA is preventive (own aircraft is already in conformance and must only avoid certain rates). */
56
- corrective: boolean;
57
- /** True when the RA's sense is downward (descend-family); false when upward (climb-family). */
58
- downwardSense: boolean;
59
- /** True once own aircraft has been told to accelerate its climb/descent beyond the initial RA's target rate. */
60
- increasedRate: boolean;
61
- /** True when this RA reverses the sense of a previously issued RA for the same encounter. */
62
- senseReversal: boolean;
63
- /** True when this RA requires own aircraft to cross through the threat's altitude. */
64
- altitudeCrossing: boolean;
65
- /** True for a positive RA (a specific target climb/descend rate); false for a negative/Vertical-Speed-Limit RA (a rate to avoid). */
66
- positive: boolean;
67
- /** Resolution Advisory Complement: restricts own aircraft from descending below its current altitude. Primarily meaningful in multi-threat encounters. */
68
- doNotPassBelow: boolean;
69
- /** Resolution Advisory Complement: restricts own aircraft from climbing above its current altitude. Primarily meaningful in multi-threat encounters. */
70
- doNotPassAbove: boolean;
71
- /** Resolution Advisory Complement: reserved for a horizontal-maneuver capability TCAS II does not implement (TCAS II issues vertical RAs only) - expected to always be false in practice, decoded for completeness. */
72
- doNotTurnLeft: boolean;
73
- /** Resolution Advisory Complement: reserved for a horizontal-maneuver capability TCAS II does not implement (TCAS II issues vertical RAs only) - expected to always be false in practice, decoded for completeness. */
74
- doNotTurnRight: boolean;
75
- /** True for up to 18 seconds after an RA ends, indicating it is no longer displayed to the pilot. */
76
- terminated: boolean;
77
- /** True when this report resolves more than one simultaneous threat. */
78
- multipleThreat: boolean;
79
- /** The threat this report responds to - narrow on `threat.threatType` to access the identity fields for that kind. */
80
- threat: AcasThreat;
81
- }
1
+ export type { AcasResolutionAdvisoryReport, AcasThreat, AcasThreatAltitudeRangeBearing, AcasThreatIcaoAddress, AcasThreatNone, AcasThreatType, ResolutionAdvisoryType, } from '@squawk/types';
82
2
  //# sourceMappingURL=acas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"acas.d.ts","sourceRoot":"","sources":["../../src/types/acas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,sBAAsB,GAC9B,OAAO,GACP,SAAS,GACT,eAAe,GACf,iBAAiB,GACjB,eAAe,GACf,iBAAiB,GACjB,aAAa,GACb,eAAe,GACf,YAAY,GACZ,cAAc,GACd,iBAAiB,GACjB,mBAAmB,CAAC;AAExB,yDAAyD;AACzD,MAAM,WAAW,cAAc;IAC7B,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,kFAAkF;AAClF,MAAM,WAAW,qBAAqB;IACpC,mEAAmE;IACnE,UAAU,EAAE,aAAa,CAAC;IAC1B,qDAAqD;IACrD,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,gGAAgG;AAChG,MAAM,WAAW,8BAA8B;IAC7C,6EAA6E;IAC7E,UAAU,EAAE,sBAAsB,CAAC;IACnC,+EAA+E;IAC/E,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,sFAAsF;IACtF,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,0GAA0G;IAC1G,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,qBAAqB,GAAG,8BAA8B,CAAC;AAEjG,2IAA2I;AAC3I,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B;IAC3C,kJAAkJ;IAClJ,MAAM,EAAE,OAAO,CAAC;IAChB,uWAAuW;IACvW,YAAY,EAAE,sBAAsB,GAAG,SAAS,CAAC;IACjD,uLAAuL;IACvL,UAAU,EAAE,OAAO,CAAC;IACpB,+FAA+F;IAC/F,aAAa,EAAE,OAAO,CAAC;IACvB,gHAAgH;IAChH,aAAa,EAAE,OAAO,CAAC;IACvB,6FAA6F;IAC7F,aAAa,EAAE,OAAO,CAAC;IACvB,sFAAsF;IACtF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,qIAAqI;IACrI,QAAQ,EAAE,OAAO,CAAC;IAClB,0JAA0J;IAC1J,cAAc,EAAE,OAAO,CAAC;IACxB,wJAAwJ;IACxJ,cAAc,EAAE,OAAO,CAAC;IACxB,uNAAuN;IACvN,aAAa,EAAE,OAAO,CAAC;IACvB,uNAAuN;IACvN,cAAc,EAAE,OAAO,CAAC;IACxB,qGAAqG;IACrG,UAAU,EAAE,OAAO,CAAC;IACpB,wEAAwE;IACxE,cAAc,EAAE,OAAO,CAAC;IACxB,sHAAsH;IACtH,MAAM,EAAE,UAAU,CAAC;CACpB"}
1
+ {"version":3,"file":"acas.d.ts","sourceRoot":"","sources":["../../src/types/acas.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,4BAA4B,EAC5B,UAAU,EACV,8BAA8B,EAC9B,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,sBAAsB,GACvB,MAAM,eAAe,CAAC"}
@@ -1,6 +1,2 @@
1
- /**
2
- * Emergency/priority state carried by an ADS-B aircraft status message
3
- * (BDS 6,1 subtype 1, type code 28), per the 3-bit emergency state field.
4
- */
5
- export type EmergencyState = 'none' | 'general' | 'lifeguardMedical' | 'minimumFuel' | 'noCommunications' | 'unlawfulInterference' | 'downed' | 'reserved';
1
+ export type { EmergencyState } from '@squawk/types';
6
2
  //# sourceMappingURL=emergency-status.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"emergency-status.d.ts","sourceRoot":"","sources":["../../src/types/emergency-status.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,SAAS,GACT,kBAAkB,GAClB,aAAa,GACb,kBAAkB,GAClB,sBAAsB,GACtB,QAAQ,GACR,UAAU,CAAC"}
1
+ {"version":3,"file":"emergency-status.d.ts","sourceRoot":"","sources":["../../src/types/emergency-status.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Decoded 3-bit Flight Status (FS) subfield of a DF4/5/20/21 Mode-S
3
+ * surveillance reply - the Alert (recent squawk change) and Ident (SPI)
4
+ * flags. Ground/airborne status is also nominally packed into this field
5
+ * but is not decoded here - see {@link decodeFlightStatus}.
6
+ */
7
+ export interface FlightStatus {
8
+ /** True when the transponder's Ident (SPI) pulse is active. Undefined for a reserved FS value (6 or 7), where Ident status is not defined. */
9
+ identActive: boolean | undefined;
10
+ /** True when the transponder is flagging a recent squawk code change. Undefined for a reserved FS value (6 or 7), where alert status is not defined. */
11
+ squawkAlert: boolean | undefined;
12
+ }
13
+ //# sourceMappingURL=flight-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flight-status.d.ts","sourceRoot":"","sources":["../../src/types/flight-status.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,8IAA8I;IAC9I,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,wJAAwJ;IACxJ,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;CAClC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -2,6 +2,7 @@ export * from './acas.js';
2
2
  export * from './comm-b.js';
3
3
  export * from './cpr.js';
4
4
  export * from './emergency-status.js';
5
+ export * from './flight-status.js';
5
6
  export * from './frame.js';
6
7
  export * from './identification.js';
7
8
  export * from './message.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC"}
@@ -2,6 +2,7 @@ export * from './acas.js';
2
2
  export * from './comm-b.js';
3
3
  export * from './cpr.js';
4
4
  export * from './emergency-status.js';
5
+ export * from './flight-status.js';
5
6
  export * from './frame.js';
6
7
  export * from './identification.js';
7
8
  export * from './message.js';
@@ -145,6 +145,10 @@ export interface SurveillanceAltitudeReply {
145
145
  candidateIcaoHex: string;
146
146
  /** Decoded altitude in feet, or undefined if the AC field is empty or invalid. */
147
147
  altitudeFt: number | undefined;
148
+ /** True when the transponder's Ident (SPI) pulse is active, from the Flight Status field. Undefined for a reserved Flight Status value. */
149
+ identActive: boolean | undefined;
150
+ /** True when the transponder is flagging a recent squawk code change, from the Flight Status field. Undefined for a reserved Flight Status value. */
151
+ squawkAlert: boolean | undefined;
148
152
  }
149
153
  /**
150
154
  * A DF20 Comm-B altitude reply - the same altitude payload as
@@ -162,6 +166,10 @@ export interface CommBAltitudeReply {
162
166
  candidateIcaoHex: string;
163
167
  /** Decoded altitude in feet, or undefined if the AC field is empty or invalid. */
164
168
  altitudeFt: number | undefined;
169
+ /** True when the transponder's Ident (SPI) pulse is active, from the Flight Status field. Undefined for a reserved Flight Status value. */
170
+ identActive: boolean | undefined;
171
+ /** True when the transponder is flagging a recent squawk code change, from the Flight Status field. Undefined for a reserved Flight Status value. */
172
+ squawkAlert: boolean | undefined;
165
173
  /** Every Enhanced Surveillance Comm-B register the MB field plausibly holds - see {@link inferCommBRegisters}. Empty if none matched. */
166
174
  commBRegisters: CommBRegister[];
167
175
  }
@@ -179,6 +187,10 @@ export interface SurveillanceIdentityReply {
179
187
  candidateIcaoHex: string;
180
188
  /** The decoded 4-digit octal squawk code. */
181
189
  squawk: string;
190
+ /** True when the transponder's Ident (SPI) pulse is active, from the Flight Status field. Undefined for a reserved Flight Status value. */
191
+ identActive: boolean | undefined;
192
+ /** True when the transponder is flagging a recent squawk code change, from the Flight Status field. Undefined for a reserved Flight Status value. */
193
+ squawkAlert: boolean | undefined;
182
194
  }
183
195
  /**
184
196
  * A DF21 Comm-B identity reply - the same squawk payload as
@@ -196,6 +208,10 @@ export interface CommBIdentityReply {
196
208
  candidateIcaoHex: string;
197
209
  /** The decoded 4-digit octal squawk code. */
198
210
  squawk: string;
211
+ /** True when the transponder's Ident (SPI) pulse is active, from the Flight Status field. Undefined for a reserved Flight Status value. */
212
+ identActive: boolean | undefined;
213
+ /** True when the transponder is flagging a recent squawk code change, from the Flight Status field. Undefined for a reserved Flight Status value. */
214
+ squawkAlert: boolean | undefined;
199
215
  /** Every Enhanced Surveillance Comm-B register the MB field plausibly holds - see {@link inferCommBRegisters}. Empty if none matched. */
200
216
  commBRegisters: CommBRegister[];
201
217
  }
@@ -1 +1 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/types/message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,aAAa,GACvB,YAAY,GAAG,iBAAiB,GAAG,UAAU,GAAG,eAAe,GAAG,MAAM,CAAC;AAE3E,wEAAwE;AACxE,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,4FAA4F;IAC5F,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,wEAAwE;AACxE,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB;IACtE,2FAA2F;IAC3F,IAAI,EAAE,0BAA0B,CAAC;IACjC,0EAA0E;IAC1E,OAAO,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC;IAC1B,yKAAyK;IACzK,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,0KAA0K;IAC1K,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,2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BAA4B,CAAC;CAClD;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAC3B,wBAAwB,GACxB,wBAAwB,GACxB,8BAA8B,GAC9B,oCAAoC,GACpC,iCAAiC,GACjC,+BAA+B,GAC/B,+BAA+B,GAC/B,YAAY,GACZ,4BAA4B,GAC5B,2BAA2B,GAC3B,yBAAyB,GACzB,kBAAkB,GAClB,yBAAyB,GACzB,kBAAkB,CAAC"}
@@ -1,34 +1,2 @@
1
- /**
2
- * Decoded ADS-B Target State and Status (BDS 6,2, type code 29) - the
3
- * pilot's selected altitude/heading targets, altimeter setting, and
4
- * active autopilot/nav modes, per RTCA DO-260B section 2.2.3.2.7.1.
5
- */
6
- export interface TargetStateAndStatus {
7
- /** Source of the selected altitude target - undefined when `selectedAltitudeFt` is unavailable. */
8
- selectedAltitudeSource: 'mcpFcu' | 'fms' | undefined;
9
- /** MCP/FCU or FMS selected altitude target, in feet. Undefined if not available. */
10
- selectedAltitudeFt: number | undefined;
11
- /** Barometric pressure (altimeter) setting, in millibars/hectopascals. Undefined if not available. */
12
- baroPressureSettingMb: number | undefined;
13
- /** Selected heading/track angle, in degrees. Undefined if not available. */
14
- selectedHeadingDeg: number | undefined;
15
- /** Navigation Accuracy Category for Position, 0-15 (higher is more accurate). */
16
- navAccuracyCategoryPosition: number;
17
- /** Whether the reported altitude source meets the Navigation Integrity Category barometric requirement. */
18
- nicBaro: boolean;
19
- /** Source Integrity Level, 0-3 (higher is more reliable). */
20
- sourceIntegrityLevel: number;
21
- /** Whether the autopilot is engaged. Undefined when mode status is not reported. */
22
- autopilotEngaged: boolean | undefined;
23
- /** Whether VNAV mode is active. Undefined when mode status is not reported. */
24
- vnavModeActive: boolean | undefined;
25
- /** Whether altitude-hold mode is active. Undefined when mode status is not reported. */
26
- altitudeHoldModeActive: boolean | undefined;
27
- /** Whether approach mode is active. Undefined when mode status is not reported. */
28
- approachModeActive: boolean | undefined;
29
- /** Whether LNAV mode is active. Undefined when mode status is not reported. */
30
- lnavModeActive: boolean | undefined;
31
- /** Whether ACAS/TCAS is operational (not inhibited or failed). Always reported, regardless of mode status. */
32
- tcasOperational: boolean;
33
- }
1
+ export type { TargetStateAndStatus } from '@squawk/types';
34
2
  //# sourceMappingURL=target-state-status.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"target-state-status.d.ts","sourceRoot":"","sources":["../../src/types/target-state-status.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,mGAAmG;IACnG,sBAAsB,EAAE,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IACrD,oFAAoF;IACpF,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,sGAAsG;IACtG,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,4EAA4E;IAC5E,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,iFAAiF;IACjF,2BAA2B,EAAE,MAAM,CAAC;IACpC,2GAA2G;IAC3G,OAAO,EAAE,OAAO,CAAC;IACjB,6DAA6D;IAC7D,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oFAAoF;IACpF,gBAAgB,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,+EAA+E;IAC/E,cAAc,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,wFAAwF;IACxF,sBAAsB,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5C,mFAAmF;IACnF,kBAAkB,EAAE,OAAO,GAAG,SAAS,CAAC;IACxC,+EAA+E;IAC/E,cAAc,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,8GAA8G;IAC9G,eAAe,EAAE,OAAO,CAAC;CAC1B"}
1
+ {"version":3,"file":"target-state-status.d.ts","sourceRoot":"","sources":["../../src/types/target-state-status.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squawk/mode-s",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "Decode raw Mode-S/ADS-B messages: DF/CRC parsing, CPR position, velocity, identification, and altitude",
6
6
  "author": "Neil Cochran",
@@ -41,7 +41,7 @@
41
41
  "api:report": "api-extractor run --local --verbose"
42
42
  },
43
43
  "dependencies": {
44
- "@squawk/types": "^0.8.6"
44
+ "@squawk/types": "^0.9.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/node": "^26.4.0"