@skyvexsoftware/stratos-sdk 0.13.0 → 0.14.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/dist/helpers/aircraft.d.ts +6 -0
- package/dist/helpers/aircraft.js +3 -3
- package/dist/helpers/units.d.ts +9 -0
- package/dist/helpers/units.js +5 -0
- package/dist/hooks/context.d.ts +1 -1
- package/dist/hooks/useFlightEvents.d.ts +1 -1
- package/dist/hooks/useLandingAnalysis.d.ts +1 -1
- package/dist/index.d.ts +8 -3
- package/dist/index.js +2 -1
- package/dist/shared-types/additional-fields.d.ts +5 -0
- package/dist/shared-types/additional-fields.js +5 -0
- package/dist/shared-types/flight-events.d.ts +55 -0
- package/dist/shared-types/flight-events.js +15 -0
- package/dist/shared-types/flight-manager.d.ts +12 -0
- package/dist/shared-types/flight-manager.js +7 -0
- package/dist/shared-types/index.d.ts +5 -2
- package/dist/shared-types/index.js +2 -1
- package/dist/shared-types/landing.d.ts +149 -0
- package/dist/shared-types/landing.js +5 -0
- package/dist/shared-types/plugin-dialogs.d.ts +7 -0
- package/dist/shared-types/plugin-dialogs.js +2 -5
- package/dist/shared-types/simulator.d.ts +2 -194
- package/dist/shared-types/simulator.js +2 -13
- package/dist/shared-types/socket-events.d.ts +5 -0
- package/dist/shared-types/socket-events.js +2 -28
- package/dist/shared-types/theme.d.ts +6 -1
- package/dist/shared-types/theme.js +5 -0
- package/dist/types/context-ui.d.ts +101 -0
- package/dist/types/context-ui.js +5 -0
- package/dist/types/context.d.ts +35 -173
- package/dist/types/context.js +4 -3
- package/dist/types/index.d.ts +2 -1
- package/dist/types/manifest.d.ts +5 -3
- package/dist/types/manifest.js +3 -1
- package/dist/types/module.d.ts +4 -2
- package/dist/types/module.js +3 -1
- package/dist/types/settings.d.ts +81 -0
- package/dist/types/settings.js +6 -0
- package/dist/ui/badge.d.ts +2 -0
- package/dist/ui/button.d.ts +6 -0
- package/dist/ui/button.js +5 -0
- package/dist/ui/combobox.d.ts +3 -0
- package/dist/ui/combobox.js +1 -0
- package/package.json +1 -1
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @page Aircraft
|
|
3
|
+
*
|
|
4
|
+
* Aircraft classification produced by classifyAircraft.
|
|
5
|
+
*/
|
|
1
6
|
/**
|
|
2
7
|
* Aircraft size classification used by the landing analyser (and any future
|
|
3
8
|
* scorer) to apply class-aware thresholds — a 1000 fpm descent at 50 ft is
|
|
4
9
|
* marginal in a narrowbody but a clear bust in a widebody, etc.
|
|
5
10
|
*/
|
|
11
|
+
/** ICAO-type size class returned by `classifyAircraft`. */
|
|
6
12
|
export type AircraftClass = "widebody" | "narrowbody" | "regional";
|
|
7
13
|
/**
|
|
8
14
|
* Classify an ICAO aircraft type into widebody / narrowbody / regional.
|
package/dist/helpers/aircraft.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Aircraft
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* @page Aircraft
|
|
3
|
+
*
|
|
4
|
+
* Aircraft classification produced by classifyAircraft.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
7
|
* Known ICAO type designators by class. Lists are deliberately
|
package/dist/helpers/units.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @page Units
|
|
3
|
+
*
|
|
4
|
+
* Unit systems and the device unit preferences used by the formatting helpers.
|
|
5
|
+
*/
|
|
6
|
+
/** Weight unit selection: pounds or kilograms. */
|
|
1
7
|
export type WeightUnit = "lbs" | "kg";
|
|
8
|
+
/** Altitude unit selection: feet or metres. */
|
|
2
9
|
export type AltitudeUnit = "ft" | "m";
|
|
10
|
+
/** Distance unit selection: nautical miles, kilometres, or statute miles. */
|
|
3
11
|
export type DistanceUnit = "nm" | "km" | "mi";
|
|
12
|
+
/** The device-level unit preferences that drive all formatting helpers. */
|
|
4
13
|
export type UnitPreferences = {
|
|
5
14
|
weight: WeightUnit;
|
|
6
15
|
altitude: AltitudeUnit;
|
package/dist/helpers/units.js
CHANGED
package/dist/hooks/context.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* flight:event Socket.io events to append new events to the query cache.
|
|
6
6
|
* Provides comment mutations with optimistic updates.
|
|
7
7
|
*/
|
|
8
|
-
import type { FlightLogEvent, EventCategory } from "../shared-types/
|
|
8
|
+
import type { FlightLogEvent, EventCategory } from "../shared-types/flight-events";
|
|
9
9
|
export declare const flightEventsKeys: {
|
|
10
10
|
all: readonly ["flight-events"];
|
|
11
11
|
log: (flightId?: string | number | null) => readonly ["flight-events", "log", string | number];
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* subscribes to flight:landing Socket.io events for real-time touchdown/bounce
|
|
6
6
|
* notifications. Only re-renders when landing-relevant events occur.
|
|
7
7
|
*/
|
|
8
|
-
import type { LandingAnalysisSnapshot, CapturePoint, BounceData, LandingAnalysis } from "../shared-types/
|
|
8
|
+
import type { LandingAnalysisSnapshot, CapturePoint, BounceData, LandingAnalysis } from "../shared-types/landing";
|
|
9
9
|
export declare const landingAnalysisKeys: {
|
|
10
10
|
snapshot: readonly ["landing-analysis", "snapshot"];
|
|
11
11
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export type { PluginAuthor, PluginManifest } from "./types/manifest";
|
|
2
|
-
export type { PluginAirline, PluginAirlineAccessor, PluginAuthAccessor, PluginVaApiClient, PluginConfigStore, PluginContext, PluginDatabaseAccessor, PluginIPCRegistrar, PluginLogger,
|
|
2
|
+
export type { PluginAirline, PluginAirlineAccessor, PluginAuthAccessor, PluginVaApiClient, PluginConfigStore, PluginContext, PluginDatabaseAccessor, PluginIPCRegistrar, PluginLogger, PluginServerRegistrar, PluginFlightAccessor, PluginFlightLogWriter, PluginFlightLogInput, PluginFlightLogPatch, PluginStartGuard, PluginStartContext, PluginStartDecision, PluginNotifier, PluginToastInput, PluginAlertSound, PluginDialogApi, PluginPromptApi, PluginDialogAlertInput, PluginDialogConfirmInput, PluginPromptTextInput, PluginPromptNumberInput, PluginPromptSelectInput, PluginIndicatorType, PluginIndicatorInput, PluginSelfApi, } from "./types/context";
|
|
3
|
+
export type { PluginNavigationHelper, PluginPilotUser, PluginToastAPI, PluginUIContext, } from "./types/context-ui";
|
|
4
|
+
export type { PluginSettingType, PluginSettingOption, PluginSettingDefinition, PluginAvailableSettings, BooleanSettingDef, TextSettingDef, LongtextSettingDef, NumberSettingDef, RangeSettingDef, ListSettingDef, RadioSettingDef, DateSettingDef, JsonSettingDef, } from "./types/settings";
|
|
3
5
|
export type { PluginBackgroundModule, PluginRouteComponent, PluginUIModule, } from "./types/module";
|
|
4
|
-
export { FlightPhase, SimulatorType
|
|
5
|
-
export type {
|
|
6
|
+
export { FlightPhase, SimulatorType } from "./shared-types/simulator";
|
|
7
|
+
export type { FlightData, FlightDataSnapshot, FlightPhasePayload, FlightPhaseSnapshot, FlightStateDebugInfo, FlightTrends, PendingPhaseTransition, SimDataSnapshot, SimulatorStatus, } from "./shared-types/simulator";
|
|
8
|
+
export { EventCategory } from "./shared-types/flight-events";
|
|
9
|
+
export type { FlightEventPayload, FlightEventsSnapshot, FlightLogEvent, HistoryReportEntry, } from "./shared-types/flight-events";
|
|
10
|
+
export type { BounceData, CapturePoint, FlightLandingPayload, GateCapture, LandingAnalysis, LandingAnalysisSnapshot, LandingAnalyzerDebugState, LandingSample, } from "./shared-types/landing";
|
|
6
11
|
export type { ThemeMode } from "./shared-types/theme";
|
|
7
12
|
export { ADDITIONAL_FIELD_PHASES, toPhaseKey, } from "./shared-types/additional-fields";
|
|
8
13
|
export type { AdditionalFieldsConfig, FieldDelivery, } from "./shared-types/additional-fields";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// ── Shared Types ───────────────────────────────────────────────────────
|
|
2
|
-
export { FlightPhase, SimulatorType
|
|
2
|
+
export { FlightPhase, SimulatorType } from "./shared-types/simulator";
|
|
3
|
+
export { EventCategory } from "./shared-types/flight-events";
|
|
3
4
|
export { ADDITIONAL_FIELD_PHASES, toPhaseKey, } from "./shared-types/additional-fields";
|
|
4
5
|
// ── Helper Functions ───────────────────────────────────────────────────
|
|
5
6
|
export { createPlugin } from "./helpers/createPlugin";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @page Flight Events
|
|
3
|
+
* The flight log event stream — categories, entries, and the position-history report.
|
|
4
|
+
*/
|
|
5
|
+
import { FlightPhase } from "./simulator";
|
|
6
|
+
/** Event categories for filtering/display */
|
|
7
|
+
export declare enum EventCategory {
|
|
8
|
+
SYSTEM = "system",
|
|
9
|
+
PHASE = "phase",
|
|
10
|
+
CONTROLS = "controls",
|
|
11
|
+
ENGINE = "engine",
|
|
12
|
+
WARNING = "warning",
|
|
13
|
+
POSITION = "position",
|
|
14
|
+
COMMENT = "comment"
|
|
15
|
+
}
|
|
16
|
+
/** Flight log event entry */
|
|
17
|
+
export type FlightLogEvent = {
|
|
18
|
+
eventId: string;
|
|
19
|
+
eventTimestamp: string;
|
|
20
|
+
eventElapsedTime: number;
|
|
21
|
+
eventCondition: string;
|
|
22
|
+
category: EventCategory;
|
|
23
|
+
message: string;
|
|
24
|
+
data?: Record<string, unknown>;
|
|
25
|
+
};
|
|
26
|
+
/** History report entry (position sample) */
|
|
27
|
+
export type HistoryReportEntry = {
|
|
28
|
+
timestamp: number;
|
|
29
|
+
elapsedTime: number;
|
|
30
|
+
latitude: number;
|
|
31
|
+
longitude: number;
|
|
32
|
+
altitude: number;
|
|
33
|
+
altitudeAgl: number;
|
|
34
|
+
heading: number;
|
|
35
|
+
groundSpeed: number;
|
|
36
|
+
indicatedAirspeed: number;
|
|
37
|
+
verticalSpeed: number;
|
|
38
|
+
pitch: number;
|
|
39
|
+
bank: number;
|
|
40
|
+
phase: FlightPhase;
|
|
41
|
+
planeOnground: boolean;
|
|
42
|
+
landingRate: number | null;
|
|
43
|
+
};
|
|
44
|
+
/** Payload for the flight:event Socket.io event */
|
|
45
|
+
export type FlightEventPayload = {
|
|
46
|
+
event: FlightLogEvent;
|
|
47
|
+
timestamp: number;
|
|
48
|
+
};
|
|
49
|
+
/** Snapshot returned by GET /api/flight-events for useFlightEvents hydration */
|
|
50
|
+
export type FlightEventsSnapshot = {
|
|
51
|
+
events: FlightLogEvent[];
|
|
52
|
+
isTracking: boolean;
|
|
53
|
+
elapsedTime: number;
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=flight-events.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @page Flight Events
|
|
3
|
+
* The flight log event stream — categories, entries, and the position-history report.
|
|
4
|
+
*/
|
|
5
|
+
/** Event categories for filtering/display */
|
|
6
|
+
export var EventCategory;
|
|
7
|
+
(function (EventCategory) {
|
|
8
|
+
EventCategory["SYSTEM"] = "system";
|
|
9
|
+
EventCategory["PHASE"] = "phase";
|
|
10
|
+
EventCategory["CONTROLS"] = "controls";
|
|
11
|
+
EventCategory["ENGINE"] = "engine";
|
|
12
|
+
EventCategory["WARNING"] = "warning";
|
|
13
|
+
EventCategory["POSITION"] = "position";
|
|
14
|
+
EventCategory["COMMENT"] = "comment";
|
|
15
|
+
})(EventCategory || (EventCategory = {}));
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The flight lifecycle: the plan a plugin produces, the live state the shell
|
|
3
|
+
* broadcasts, and the options and results exchanged when starting, recovering,
|
|
4
|
+
* or completing a flight.
|
|
5
|
+
*
|
|
6
|
+
* @page Flight Manager
|
|
7
|
+
*/
|
|
1
8
|
import type { FlightPhase } from "./simulator";
|
|
2
9
|
/** VA-agnostic flight plan, produced by any plugin */
|
|
3
10
|
export type FlightPlan = {
|
|
@@ -72,12 +79,17 @@ export type PreflightCheck = {
|
|
|
72
79
|
passed: boolean;
|
|
73
80
|
message: string;
|
|
74
81
|
};
|
|
82
|
+
/** Aggregated result of all pre-flight validation checks. */
|
|
75
83
|
export type PreflightCheckResult = {
|
|
76
84
|
passed: boolean;
|
|
77
85
|
checks: PreflightCheck[];
|
|
78
86
|
};
|
|
79
87
|
/** Options for startFlight */
|
|
80
88
|
export type StartFlightOptions = {
|
|
89
|
+
/**
|
|
90
|
+
* Start even when preflight checks fail — set when the pilot chooses "Start
|
|
91
|
+
* Anyway" after a preflight error. Also overrides plugin start guards.
|
|
92
|
+
*/
|
|
81
93
|
forceStart?: boolean;
|
|
82
94
|
/** True when the start was triggered by auto-start (not a manual click). Surfaced to plugin start guards. */
|
|
83
95
|
isAutoStart?: boolean;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
export { FlightPhase, SimulatorType
|
|
2
|
-
export type {
|
|
1
|
+
export { FlightPhase, SimulatorType } from "./simulator";
|
|
2
|
+
export type { FlightData, FlightDataSnapshot, FlightPhasePayload, FlightPhaseSnapshot, FlightStateDebugInfo, FlightTrends, PendingPhaseTransition, SimDataSnapshot, SimulatorStatus, } from "./simulator";
|
|
3
|
+
export { EventCategory } from "./flight-events";
|
|
4
|
+
export type { FlightEventPayload, FlightEventsSnapshot, FlightLogEvent, HistoryReportEntry, } from "./flight-events";
|
|
5
|
+
export type { BounceData, CapturePoint, FlightLandingPayload, GateCapture, LandingAnalysis, LandingAnalysisSnapshot, LandingAnalyzerDebugState, } from "./landing";
|
|
3
6
|
export type { ThemeMode } from "./theme";
|
|
4
7
|
export { ADDITIONAL_FIELD_PHASES, toPhaseKey } from "./additional-fields";
|
|
5
8
|
export type { AdditionalFieldsConfig, FieldDelivery, } from "./additional-fields";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { FlightPhase, SimulatorType
|
|
1
|
+
export { FlightPhase, SimulatorType } from "./simulator";
|
|
2
|
+
export { EventCategory } from "./flight-events";
|
|
2
3
|
export { ADDITIONAL_FIELD_PHASES, toPhaseKey } from "./additional-fields";
|
|
3
4
|
// ── Socket.io Event Catalog ──────────────────────────────────────────────
|
|
4
5
|
export { SOCKET_EVENTS } from "./socket-events";
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @page Landing Analysis
|
|
3
|
+
* Landing-rate capture, bounce tracking, and the scored touchdown analysis.
|
|
4
|
+
*/
|
|
5
|
+
/** Capture point for landing analysis */
|
|
6
|
+
export type CapturePoint = {
|
|
7
|
+
timestamp: number;
|
|
8
|
+
altitude: number;
|
|
9
|
+
altitudeAgl: number;
|
|
10
|
+
verticalSpeed: number;
|
|
11
|
+
groundSpeed: number;
|
|
12
|
+
indicatedAirspeed: number;
|
|
13
|
+
latitude: number;
|
|
14
|
+
longitude: number;
|
|
15
|
+
pitch: number;
|
|
16
|
+
bank: number;
|
|
17
|
+
gForce: number;
|
|
18
|
+
heading: number;
|
|
19
|
+
glideslopeDeviation: number | null;
|
|
20
|
+
localizerDeviation: number | null;
|
|
21
|
+
flapsControl: number;
|
|
22
|
+
windDirection: number;
|
|
23
|
+
windSpeed: number;
|
|
24
|
+
totalFuelLbs: number;
|
|
25
|
+
/** Snapshot of data.flapsHandleIndex at the capture moment, null if the sim doesn't provide it. */
|
|
26
|
+
flapsHandleIndex: number | null;
|
|
27
|
+
};
|
|
28
|
+
/** Bounce data — captured when aircraft becomes airborne after touchdown */
|
|
29
|
+
export type BounceData = {
|
|
30
|
+
bounceNumber: number;
|
|
31
|
+
timestamp: number;
|
|
32
|
+
maxAltitudeAgl: number;
|
|
33
|
+
touchdownVerticalSpeed: number;
|
|
34
|
+
touchdownGForce: number;
|
|
35
|
+
durationMs: number;
|
|
36
|
+
};
|
|
37
|
+
/** Snapshot of aircraft state at the 50 ft stabilized-approach gate */
|
|
38
|
+
export type GateCapture = {
|
|
39
|
+
/** Actual AGL at capture, may be a few ft above/below the nominal 50 ft */
|
|
40
|
+
altitudeAgl: number;
|
|
41
|
+
indicatedAirspeed: number;
|
|
42
|
+
verticalSpeed: number;
|
|
43
|
+
bank: number;
|
|
44
|
+
pitch: number;
|
|
45
|
+
groundSpeed: number;
|
|
46
|
+
timestamp: number;
|
|
47
|
+
};
|
|
48
|
+
/** Complete landing analysis result */
|
|
49
|
+
export type LandingAnalysis = {
|
|
50
|
+
landingRateFpm: number;
|
|
51
|
+
simulatorVsAtTouchdown: number;
|
|
52
|
+
touchdownTimestamp: number;
|
|
53
|
+
touchdownLatitude: number;
|
|
54
|
+
touchdownLongitude: number;
|
|
55
|
+
touchdownHeading: number;
|
|
56
|
+
touchdownGroundSpeed: number;
|
|
57
|
+
/** Indicated airspeed at touchdown (knots) — sourced from the touchdown CapturePoint. */
|
|
58
|
+
touchdownIas: number;
|
|
59
|
+
/** Flaps handle index at touchdown, null if the sim doesn't provide one. */
|
|
60
|
+
touchdownFlapsIndex: number | null;
|
|
61
|
+
touchdownPitch: number;
|
|
62
|
+
touchdownBank: number;
|
|
63
|
+
/**
|
|
64
|
+
* Scored touchdown vertical-load G. The peak of a framerate-independent,
|
|
65
|
+
* time-constant EMA of per-frame gForce over the contact second — not the
|
|
66
|
+
* raw spike. This is the value scoring reads.
|
|
67
|
+
*/
|
|
68
|
+
touchdownGForce: number;
|
|
69
|
+
/**
|
|
70
|
+
* Forensic raw peak gForce over the same contact window (un-smoothed). Kept
|
|
71
|
+
* for diagnostics; NOT used for scoring. Optional/null when no frame-buffer
|
|
72
|
+
* samples fell in the window (the scored value then came from the instantaneous
|
|
73
|
+
* touchdown-frame G and there is no raw window peak to report).
|
|
74
|
+
*/
|
|
75
|
+
touchdownGForceRaw?: number | null;
|
|
76
|
+
approachAltitude: number;
|
|
77
|
+
approachIas: number;
|
|
78
|
+
approachVs: number;
|
|
79
|
+
approachBank: number;
|
|
80
|
+
approachPitch: number;
|
|
81
|
+
approachTimestamp: number;
|
|
82
|
+
/**
|
|
83
|
+
* Snapshot at ~50 ft AGL on final, used for the stabilized-approach gate.
|
|
84
|
+
* Null when the capture was missed (e.g. very fast descent, sim disconnect
|
|
85
|
+
* right before touchdown, or capture armed below 50 ft).
|
|
86
|
+
*/
|
|
87
|
+
gateCapture: GateCapture | null;
|
|
88
|
+
descentTimeSeconds: number;
|
|
89
|
+
averageDescentRateFpm: number;
|
|
90
|
+
bounceCount: number;
|
|
91
|
+
bounces: BounceData[];
|
|
92
|
+
landingDistanceFt: number;
|
|
93
|
+
captureQuality: "excellent" | "good" | "fair" | "poor";
|
|
94
|
+
captureNotes: string[];
|
|
95
|
+
};
|
|
96
|
+
/** Debug state for the landing analyzer */
|
|
97
|
+
export type LandingAnalyzerDebugState = {
|
|
98
|
+
isArmed: boolean;
|
|
99
|
+
hasCapturedApproach: boolean;
|
|
100
|
+
hasLanded: boolean;
|
|
101
|
+
isLandingSettled: boolean;
|
|
102
|
+
isBouncing: boolean;
|
|
103
|
+
bounceCount: number;
|
|
104
|
+
approachCapture: CapturePoint | null;
|
|
105
|
+
touchdownCapture: CapturePoint | null;
|
|
106
|
+
lastAirborneVs: number;
|
|
107
|
+
sampleCount: number;
|
|
108
|
+
samples: {
|
|
109
|
+
timestamp: number;
|
|
110
|
+
vs: number;
|
|
111
|
+
agl: number;
|
|
112
|
+
aglGear: number;
|
|
113
|
+
}[];
|
|
114
|
+
calculatedLandingRate: number | null;
|
|
115
|
+
landingAnalysis: LandingAnalysis | null;
|
|
116
|
+
};
|
|
117
|
+
/** High-frequency landing frame sample from the LandingFrameBuffer */
|
|
118
|
+
export type LandingSample = {
|
|
119
|
+
timestamp: number;
|
|
120
|
+
onGround: boolean;
|
|
121
|
+
verticalSpeed: number;
|
|
122
|
+
altitudeAgl: number;
|
|
123
|
+
altitudeAglGear: number;
|
|
124
|
+
gForce: number;
|
|
125
|
+
pitch: number;
|
|
126
|
+
bank: number;
|
|
127
|
+
groundSpeed: number;
|
|
128
|
+
latitude: number;
|
|
129
|
+
longitude: number;
|
|
130
|
+
glideslopeDeviation: number | null;
|
|
131
|
+
localizerDeviation: number | null;
|
|
132
|
+
};
|
|
133
|
+
/** Payload for the flight:landing Socket.io event */
|
|
134
|
+
export type FlightLandingPayload = {
|
|
135
|
+
type: "touchdown" | "bounce" | "settled";
|
|
136
|
+
timestamp: number;
|
|
137
|
+
landingAnalysis?: LandingAnalysis;
|
|
138
|
+
bounceData?: BounceData;
|
|
139
|
+
};
|
|
140
|
+
/** Snapshot returned by GET /api/simulator/landing-analysis/snapshot for useLandingAnalysis hydration */
|
|
141
|
+
export type LandingAnalysisSnapshot = {
|
|
142
|
+
landingRate: number | null;
|
|
143
|
+
bounceCount: number;
|
|
144
|
+
touchdowns: BounceData[];
|
|
145
|
+
isOnGround: boolean;
|
|
146
|
+
approachData: CapturePoint | null;
|
|
147
|
+
landingAnalysis: LandingAnalysis | null;
|
|
148
|
+
};
|
|
149
|
+
//# sourceMappingURL=landing.d.ts.map
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @page Dialogs
|
|
3
|
+
*
|
|
4
|
+
* The wire shapes for shell-rendered dialogs and prompts.
|
|
5
|
+
*/
|
|
1
6
|
/**
|
|
2
7
|
* Wire types for the background-plugin dialog/prompt surface.
|
|
3
8
|
*
|
|
@@ -6,7 +11,9 @@
|
|
|
6
11
|
* `PluginDialogResult` back. The wire value is always a string (or absent) — the
|
|
7
12
|
* typed coercion to boolean/number/null lives in the loader wrappers.
|
|
8
13
|
*/
|
|
14
|
+
/** Discriminator for the five supported dialog/prompt kinds. */
|
|
9
15
|
export type PluginDialogKind = "alert" | "confirm" | "text" | "number" | "select";
|
|
16
|
+
/** A single selectable option for a `select`-kind dialog. */
|
|
10
17
|
export type PluginDialogSelectOption = {
|
|
11
18
|
value: string;
|
|
12
19
|
label: string;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @page Dialogs
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* and also served by GET /api/plugin-dialogs for hydrate. The renderer posts a
|
|
6
|
-
* `PluginDialogResult` back. The wire value is always a string (or absent) — the
|
|
7
|
-
* typed coercion to boolean/number/null lives in the loader wrappers.
|
|
4
|
+
* The wire shapes for shell-rendered dialogs and prompts.
|
|
8
5
|
*/
|
|
9
6
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @page Simulator Data
|
|
3
|
+
* Standardized flight data, phase detection, and trend types shared across all simulators.
|
|
3
4
|
*
|
|
4
5
|
* These are the canonical definitions of flight data structures.
|
|
5
6
|
* Comprehensive flight data variables for VA platform compatibility.
|
|
@@ -207,184 +208,6 @@ export type FlightPhasePayload = {
|
|
|
207
208
|
};
|
|
208
209
|
/** Simulator connection status */
|
|
209
210
|
export type SimulatorStatus = "disconnected" | "connecting" | "connected" | "error";
|
|
210
|
-
/** Event categories for filtering/display */
|
|
211
|
-
export declare enum EventCategory {
|
|
212
|
-
SYSTEM = "system",
|
|
213
|
-
PHASE = "phase",
|
|
214
|
-
CONTROLS = "controls",
|
|
215
|
-
ENGINE = "engine",
|
|
216
|
-
WARNING = "warning",
|
|
217
|
-
POSITION = "position",
|
|
218
|
-
COMMENT = "comment"
|
|
219
|
-
}
|
|
220
|
-
/** Flight log event entry */
|
|
221
|
-
export type FlightLogEvent = {
|
|
222
|
-
eventId: string;
|
|
223
|
-
eventTimestamp: string;
|
|
224
|
-
eventElapsedTime: number;
|
|
225
|
-
eventCondition: string;
|
|
226
|
-
category: EventCategory;
|
|
227
|
-
message: string;
|
|
228
|
-
data?: Record<string, unknown>;
|
|
229
|
-
};
|
|
230
|
-
/** History report entry (position sample) */
|
|
231
|
-
export type HistoryReportEntry = {
|
|
232
|
-
timestamp: number;
|
|
233
|
-
elapsedTime: number;
|
|
234
|
-
latitude: number;
|
|
235
|
-
longitude: number;
|
|
236
|
-
altitude: number;
|
|
237
|
-
altitudeAgl: number;
|
|
238
|
-
heading: number;
|
|
239
|
-
groundSpeed: number;
|
|
240
|
-
indicatedAirspeed: number;
|
|
241
|
-
verticalSpeed: number;
|
|
242
|
-
pitch: number;
|
|
243
|
-
bank: number;
|
|
244
|
-
phase: FlightPhase;
|
|
245
|
-
planeOnground: boolean;
|
|
246
|
-
landingRate: number | null;
|
|
247
|
-
};
|
|
248
|
-
/** Payload for the flight:event Socket.io event */
|
|
249
|
-
export type FlightEventPayload = {
|
|
250
|
-
event: FlightLogEvent;
|
|
251
|
-
timestamp: number;
|
|
252
|
-
};
|
|
253
|
-
/** Capture point for landing analysis */
|
|
254
|
-
export type CapturePoint = {
|
|
255
|
-
timestamp: number;
|
|
256
|
-
altitude: number;
|
|
257
|
-
altitudeAgl: number;
|
|
258
|
-
verticalSpeed: number;
|
|
259
|
-
groundSpeed: number;
|
|
260
|
-
indicatedAirspeed: number;
|
|
261
|
-
latitude: number;
|
|
262
|
-
longitude: number;
|
|
263
|
-
pitch: number;
|
|
264
|
-
bank: number;
|
|
265
|
-
gForce: number;
|
|
266
|
-
heading: number;
|
|
267
|
-
glideslopeDeviation: number | null;
|
|
268
|
-
localizerDeviation: number | null;
|
|
269
|
-
flapsControl: number;
|
|
270
|
-
windDirection: number;
|
|
271
|
-
windSpeed: number;
|
|
272
|
-
totalFuelLbs: number;
|
|
273
|
-
/** Snapshot of data.flapsHandleIndex at the capture moment, null if the sim doesn't provide it. */
|
|
274
|
-
flapsHandleIndex: number | null;
|
|
275
|
-
};
|
|
276
|
-
/** Bounce data — captured when aircraft becomes airborne after touchdown */
|
|
277
|
-
export type BounceData = {
|
|
278
|
-
bounceNumber: number;
|
|
279
|
-
timestamp: number;
|
|
280
|
-
maxAltitudeAgl: number;
|
|
281
|
-
touchdownVerticalSpeed: number;
|
|
282
|
-
touchdownGForce: number;
|
|
283
|
-
durationMs: number;
|
|
284
|
-
};
|
|
285
|
-
/** Snapshot of aircraft state at the 50 ft stabilized-approach gate */
|
|
286
|
-
export type GateCapture = {
|
|
287
|
-
/** Actual AGL at capture, may be a few ft above/below the nominal 50 ft */
|
|
288
|
-
altitudeAgl: number;
|
|
289
|
-
indicatedAirspeed: number;
|
|
290
|
-
verticalSpeed: number;
|
|
291
|
-
bank: number;
|
|
292
|
-
pitch: number;
|
|
293
|
-
groundSpeed: number;
|
|
294
|
-
timestamp: number;
|
|
295
|
-
};
|
|
296
|
-
/** Complete landing analysis result */
|
|
297
|
-
export type LandingAnalysis = {
|
|
298
|
-
landingRateFpm: number;
|
|
299
|
-
simulatorVsAtTouchdown: number;
|
|
300
|
-
touchdownTimestamp: number;
|
|
301
|
-
touchdownLatitude: number;
|
|
302
|
-
touchdownLongitude: number;
|
|
303
|
-
touchdownHeading: number;
|
|
304
|
-
touchdownGroundSpeed: number;
|
|
305
|
-
/** Indicated airspeed at touchdown (knots) — sourced from the touchdown CapturePoint. */
|
|
306
|
-
touchdownIas: number;
|
|
307
|
-
/** Flaps handle index at touchdown, null if the sim doesn't provide one. */
|
|
308
|
-
touchdownFlapsIndex: number | null;
|
|
309
|
-
touchdownPitch: number;
|
|
310
|
-
touchdownBank: number;
|
|
311
|
-
/**
|
|
312
|
-
* Scored touchdown vertical-load G. The peak of a framerate-independent,
|
|
313
|
-
* time-constant EMA of per-frame gForce over the contact second — not the
|
|
314
|
-
* raw spike. This is the value scoring reads.
|
|
315
|
-
*/
|
|
316
|
-
touchdownGForce: number;
|
|
317
|
-
/**
|
|
318
|
-
* Forensic raw peak gForce over the same contact window (un-smoothed). Kept
|
|
319
|
-
* for diagnostics; NOT used for scoring. Optional/null when no frame-buffer
|
|
320
|
-
* samples fell in the window (the scored value then came from the instantaneous
|
|
321
|
-
* touchdown-frame G and there is no raw window peak to report).
|
|
322
|
-
*/
|
|
323
|
-
touchdownGForceRaw?: number | null;
|
|
324
|
-
approachAltitude: number;
|
|
325
|
-
approachIas: number;
|
|
326
|
-
approachVs: number;
|
|
327
|
-
approachBank: number;
|
|
328
|
-
approachPitch: number;
|
|
329
|
-
approachTimestamp: number;
|
|
330
|
-
/**
|
|
331
|
-
* Snapshot at ~50 ft AGL on final, used for the stabilized-approach gate.
|
|
332
|
-
* Null when the capture was missed (e.g. very fast descent, sim disconnect
|
|
333
|
-
* right before touchdown, or capture armed below 50 ft).
|
|
334
|
-
*/
|
|
335
|
-
gateCapture: GateCapture | null;
|
|
336
|
-
descentTimeSeconds: number;
|
|
337
|
-
averageDescentRateFpm: number;
|
|
338
|
-
bounceCount: number;
|
|
339
|
-
bounces: BounceData[];
|
|
340
|
-
landingDistanceFt: number;
|
|
341
|
-
captureQuality: "excellent" | "good" | "fair" | "poor";
|
|
342
|
-
captureNotes: string[];
|
|
343
|
-
};
|
|
344
|
-
/** Debug state for the landing analyzer */
|
|
345
|
-
export type LandingAnalyzerDebugState = {
|
|
346
|
-
isArmed: boolean;
|
|
347
|
-
hasCapturedApproach: boolean;
|
|
348
|
-
hasLanded: boolean;
|
|
349
|
-
isLandingSettled: boolean;
|
|
350
|
-
isBouncing: boolean;
|
|
351
|
-
bounceCount: number;
|
|
352
|
-
approachCapture: CapturePoint | null;
|
|
353
|
-
touchdownCapture: CapturePoint | null;
|
|
354
|
-
lastAirborneVs: number;
|
|
355
|
-
sampleCount: number;
|
|
356
|
-
samples: {
|
|
357
|
-
timestamp: number;
|
|
358
|
-
vs: number;
|
|
359
|
-
agl: number;
|
|
360
|
-
aglGear: number;
|
|
361
|
-
}[];
|
|
362
|
-
calculatedLandingRate: number | null;
|
|
363
|
-
landingAnalysis: LandingAnalysis | null;
|
|
364
|
-
};
|
|
365
|
-
/** High-frequency landing frame sample from the LandingFrameBuffer */
|
|
366
|
-
export type LandingSample = {
|
|
367
|
-
timestamp: number;
|
|
368
|
-
onGround: boolean;
|
|
369
|
-
verticalSpeed: number;
|
|
370
|
-
altitudeAgl: number;
|
|
371
|
-
altitudeAglGear: number;
|
|
372
|
-
gForce: number;
|
|
373
|
-
pitch: number;
|
|
374
|
-
bank: number;
|
|
375
|
-
groundSpeed: number;
|
|
376
|
-
latitude: number;
|
|
377
|
-
longitude: number;
|
|
378
|
-
glideslopeDeviation: number | null;
|
|
379
|
-
localizerDeviation: number | null;
|
|
380
|
-
};
|
|
381
|
-
/** Payload for the flight:landing Socket.io event */
|
|
382
|
-
export type FlightLandingPayload = {
|
|
383
|
-
type: "touchdown" | "bounce" | "settled";
|
|
384
|
-
timestamp: number;
|
|
385
|
-
landingAnalysis?: LandingAnalysis;
|
|
386
|
-
bounceData?: BounceData;
|
|
387
|
-
};
|
|
388
211
|
/** Snapshot returned by GET /api/simulator/snapshot for useSimData hydration */
|
|
389
212
|
export type SimDataSnapshot = {
|
|
390
213
|
data: FlightData | null;
|
|
@@ -399,21 +222,6 @@ export type FlightPhaseSnapshot = {
|
|
|
399
222
|
trends: FlightTrends | null;
|
|
400
223
|
isTracking: boolean;
|
|
401
224
|
};
|
|
402
|
-
/** Snapshot returned by GET /api/flight-events for useFlightEvents hydration */
|
|
403
|
-
export type FlightEventsSnapshot = {
|
|
404
|
-
events: FlightLogEvent[];
|
|
405
|
-
isTracking: boolean;
|
|
406
|
-
elapsedTime: number;
|
|
407
|
-
};
|
|
408
|
-
/** Snapshot returned by GET /api/simulator/landing-analysis/snapshot for useLandingAnalysis hydration */
|
|
409
|
-
export type LandingAnalysisSnapshot = {
|
|
410
|
-
landingRate: number | null;
|
|
411
|
-
bounceCount: number;
|
|
412
|
-
touchdowns: BounceData[];
|
|
413
|
-
isOnGround: boolean;
|
|
414
|
-
approachData: CapturePoint | null;
|
|
415
|
-
landingAnalysis: LandingAnalysis | null;
|
|
416
|
-
};
|
|
417
225
|
/** Debug info from the main process FlightStateManager */
|
|
418
226
|
export type FlightStateDebugInfo = {
|
|
419
227
|
trends: FlightTrends;
|