mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-08-04 16:22:48 +08:00
dont log users id on transmission
This commit is contained in:
@@ -150,6 +150,17 @@ export const takeoffEddf: FlightLabScenario = {
|
||||
{ id: 'engine-spool', action: 'play', volume: 0.5, loop: false },
|
||||
{ id: 'engine-cruise', action: 'play', volume: 0.4, loop: true },
|
||||
],
|
||||
simConditions: {
|
||||
conditions: [
|
||||
{ variable: 'TURB_ENG_N1_1', operator: '>=', value: 85 },
|
||||
{ variable: 'TURB_ENG_N1_2', operator: '>=', value: 85 },
|
||||
{ variable: 'BRAKE_PARKING_POSITION', operator: '==', value: false },
|
||||
],
|
||||
logic: 'AND',
|
||||
},
|
||||
simConditionTimeoutMs: 20000,
|
||||
simConditionHelpMessage: 'Schub-Hebel nach vorne schieben bis N1 bei etwa 85 Prozent. Dann die Parkbremse loesen.',
|
||||
simConditionNextPhase: 'takeoff_roll',
|
||||
},
|
||||
{
|
||||
id: 'engines_loud_comfort',
|
||||
@@ -184,6 +195,16 @@ export const takeoffEddf: FlightLabScenario = {
|
||||
{ id: 'runway-rumble', action: 'play', volume: 0.5, loop: true },
|
||||
{ id: 'wind-low', action: 'play', volume: 0.3, loop: true },
|
||||
],
|
||||
simConditions: {
|
||||
conditions: [
|
||||
{ variable: 'AIRSPEED_INDICATED', operator: '>=', value: 140 },
|
||||
{ variable: 'SIM_ON_GROUND', operator: '==', value: true },
|
||||
],
|
||||
logic: 'AND',
|
||||
},
|
||||
simConditionTimeoutMs: 45000,
|
||||
simConditionHelpMessage: 'Warte bis die Geschwindigkeit 140 Knoten erreicht. Schau auf den Speed-Tape links am Display.',
|
||||
simConditionNextPhase: 'rotation',
|
||||
},
|
||||
{
|
||||
id: 'roll_rumble_explain',
|
||||
@@ -228,6 +249,16 @@ export const takeoffEddf: FlightLabScenario = {
|
||||
{ id: 'wind-low', action: 'crossfade', volume: 0.0 },
|
||||
{ id: 'wind-high', action: 'play', volume: 0.35, loop: true },
|
||||
],
|
||||
simConditions: {
|
||||
conditions: [
|
||||
{ variable: 'SIM_ON_GROUND', operator: '==', value: false },
|
||||
{ variable: 'PLANE_PITCH_DEGREES', operator: '>', value: 5 },
|
||||
],
|
||||
logic: 'AND',
|
||||
},
|
||||
simConditionTimeoutMs: 15000,
|
||||
simConditionHelpMessage: 'Sidestick sanft nach hinten ziehen bis die Nase hochgeht.',
|
||||
simConditionNextPhase: 'gear_retract',
|
||||
},
|
||||
{
|
||||
id: 'rotation_belly_explain',
|
||||
@@ -252,6 +283,15 @@ export const takeoffEddf: FlightLabScenario = {
|
||||
sounds: [
|
||||
{ id: 'gear-retract', action: 'play', volume: 0.6, loop: false },
|
||||
],
|
||||
simConditions: {
|
||||
conditions: [
|
||||
{ variable: 'GEAR_HANDLE_POSITION', operator: '==', value: false },
|
||||
],
|
||||
logic: 'AND',
|
||||
},
|
||||
simConditionTimeoutMs: 10000,
|
||||
simConditionHelpMessage: 'Fahrwerk-Hebel nach oben schieben. Der Hebel ist links neben dem Mitteldisplay.',
|
||||
simConditionNextPhase: 'climb',
|
||||
},
|
||||
{
|
||||
id: 'gear_explain',
|
||||
@@ -277,6 +317,16 @@ export const takeoffEddf: FlightLabScenario = {
|
||||
{ id: 'engine-cruise', action: 'crossfade', volume: 0.3 },
|
||||
{ id: 'wind-high', action: 'crossfade', volume: 0.25 },
|
||||
],
|
||||
simConditions: {
|
||||
conditions: [
|
||||
{ variable: 'PLANE_ALTITUDE', operator: '>', value: 2000 },
|
||||
{ variable: 'VERTICAL_SPEED', operator: '>', value: 1000 },
|
||||
],
|
||||
logic: 'AND',
|
||||
},
|
||||
simConditionTimeoutMs: 30000,
|
||||
simConditionHelpMessage: 'Steigrate erhoehen auf etwa 2000 Fuss pro Minute. Sidestick leicht nach hinten halten.',
|
||||
simConditionNextPhase: 'climb_high',
|
||||
},
|
||||
{
|
||||
id: 'climb_height_info',
|
||||
@@ -313,6 +363,15 @@ export const takeoffEddf: FlightLabScenario = {
|
||||
{ id: 'almost_there', label: 'Fast geschafft!', icon: 'mdi-flag-checkered', next: 'leveloff', type: 'primary' },
|
||||
],
|
||||
sounds: [],
|
||||
simConditions: {
|
||||
conditions: [
|
||||
{ variable: 'PLANE_ALTITUDE', operator: '>=', value: 9800 },
|
||||
],
|
||||
logic: 'AND',
|
||||
},
|
||||
simConditionTimeoutMs: 60000,
|
||||
simConditionHelpMessage: 'Weiter steigen bis 10.000 Fuss. Halte die Nase leicht oben.',
|
||||
simConditionNextPhase: 'leveloff',
|
||||
},
|
||||
|
||||
// --- Phase 8: Level-off & Debrief ---
|
||||
@@ -332,6 +391,17 @@ export const takeoffEddf: FlightLabScenario = {
|
||||
{ id: 'wind-high', action: 'crossfade', volume: 0.15 },
|
||||
{ id: 'chime', action: 'play', volume: 0.3, loop: false },
|
||||
],
|
||||
simConditions: {
|
||||
conditions: [
|
||||
{ variable: 'VERTICAL_SPEED', operator: '<', value: 500 },
|
||||
{ variable: 'VERTICAL_SPEED', operator: '>', value: -500 },
|
||||
{ variable: 'PLANE_ALTITUDE', operator: '>=', value: 9500 },
|
||||
],
|
||||
logic: 'AND',
|
||||
},
|
||||
simConditionTimeoutMs: 20000,
|
||||
simConditionHelpMessage: 'Nase etwas senken zum Geradeausflug. Steigrate auf nahe Null bringen.',
|
||||
simConditionNextPhase: 'debrief',
|
||||
},
|
||||
{
|
||||
id: 'debrief',
|
||||
|
||||
@@ -16,6 +16,40 @@ export interface FlightLabButton {
|
||||
instructorAlert?: string
|
||||
}
|
||||
|
||||
// --- MSFS SimConnect Telemetry ---
|
||||
|
||||
/** MSFS2020 SimConnect variable state — keys match SimConnect naming */
|
||||
export interface FlightLabTelemetryState {
|
||||
AIRSPEED_INDICATED: number // knots
|
||||
GROUND_VELOCITY: number // knots
|
||||
VERTICAL_SPEED: number // feet per minute
|
||||
PLANE_ALTITUDE: number // feet MSL
|
||||
PLANE_PITCH_DEGREES: number // degrees
|
||||
TURB_ENG_N1_1: number // percent (0-100), engine 1
|
||||
TURB_ENG_N1_2: number // percent (0-100), engine 2
|
||||
SIM_ON_GROUND: boolean
|
||||
GEAR_HANDLE_POSITION: boolean // true = down, false = up
|
||||
FLAPS_HANDLE_INDEX: number // 0-4 for A320
|
||||
BRAKE_PARKING_POSITION: boolean // true = set, false = released
|
||||
AUTOPILOT_MASTER: boolean
|
||||
timestamp?: number
|
||||
}
|
||||
|
||||
export type SimConditionOperator = '>' | '<' | '>=' | '<=' | '==' | '!='
|
||||
|
||||
export interface SimCondition {
|
||||
variable: keyof FlightLabTelemetryState
|
||||
operator: SimConditionOperator
|
||||
value: number | boolean
|
||||
}
|
||||
|
||||
export interface SimConditionGroup {
|
||||
conditions: SimCondition[]
|
||||
logic: 'AND' | 'OR'
|
||||
}
|
||||
|
||||
// --- Phase ---
|
||||
|
||||
export interface FlightLabPhase {
|
||||
id: string
|
||||
atcMessage: string
|
||||
@@ -24,8 +58,18 @@ export interface FlightLabPhase {
|
||||
sounds?: FlightLabSound[]
|
||||
instructorNote?: string
|
||||
autoAdvanceAfterTTS?: boolean
|
||||
/** SimConnect conditions for auto-advance (when sim data available) */
|
||||
simConditions?: SimConditionGroup
|
||||
/** How long to wait (ms) before showing help if conditions not met. Default 20000 */
|
||||
simConditionTimeoutMs?: number
|
||||
/** Help message spoken via TTS when timeout reached */
|
||||
simConditionHelpMessage?: string
|
||||
/** Phase to advance to when conditions are met */
|
||||
simConditionNextPhase?: string
|
||||
}
|
||||
|
||||
// --- Scenario ---
|
||||
|
||||
export interface FlightLabScenario {
|
||||
id: string
|
||||
title: string
|
||||
@@ -38,6 +82,8 @@ export interface FlightLabScenario {
|
||||
phases: FlightLabPhase[]
|
||||
}
|
||||
|
||||
// --- Session / WebSocket ---
|
||||
|
||||
export type FlightLabRole = 'instructor' | 'participant'
|
||||
|
||||
export interface FlightLabSessionState {
|
||||
|
||||
Reference in New Issue
Block a user