mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-08-10 19:36:04 +08:00
feat(pm): add Uncontrolled Field (Info) arrival to the Drills chooser (#38)
Surfaces the info-arrival-v1 flow as a standalone drill and gives it a German D-registration callsign (same as VFR scenarios). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -2250,6 +2250,17 @@ const SCENARIOS: Scenario[] = [
|
|||||||
noChain: true,
|
noChain: true,
|
||||||
airport: 'dep',
|
airport: 'dep',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'info-arrival',
|
||||||
|
name: 'Uncontrolled Field (Info)',
|
||||||
|
subtitle: 'Self-announce arrival, no clearances',
|
||||||
|
chain: 'info-arrival-v1',
|
||||||
|
icon: 'mdi-account-voice',
|
||||||
|
startFlow: 'info-arrival-v1',
|
||||||
|
isComplete: false,
|
||||||
|
noChain: true,
|
||||||
|
airport: 'arr',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -2269,7 +2280,7 @@ const CHAIN_DEFS: ChainDef[] = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
// Standalone drills shown in their own section, separate from the journey chains.
|
// Standalone drills shown in their own section, separate from the journey chains.
|
||||||
const DRILL_IDS = ['rto']
|
const DRILL_IDS = ['rto', 'info-arrival']
|
||||||
const drillScenarios = computed(() => DRILL_IDS
|
const drillScenarios = computed(() => DRILL_IDS
|
||||||
.map(id => SCENARIOS.find(s => s.id === id))
|
.map(id => SCENARIOS.find(s => s.id === id))
|
||||||
.filter((s): s is Scenario => !!s))
|
.filter((s): s is Scenario => !!s))
|
||||||
@@ -3713,7 +3724,7 @@ const startMonitoring = async (flightPlan: any, scenario: Scenario) => {
|
|||||||
// Assign a German D-registration and its abbreviated form (D-EMIL -> D-IL,
|
// Assign a German D-registration and its abbreviated form (D-EMIL -> D-IL,
|
||||||
// first letter + last two), which ATC uses after the first call. Mirror it
|
// first letter + last two), which ATC uses after the first call. Mirror it
|
||||||
// into the local engine vars and HUD so the display matches the radio.
|
// into the local engine vars and HUD so the display matches the radio.
|
||||||
if (scenario.startFlow.startsWith('vfr')) {
|
if (scenario.startFlow.startsWith('vfr') || scenario.startFlow.startsWith('info')) {
|
||||||
const pool = ['D-EMIL', 'D-EKLM', 'D-ENNY', 'D-ELLA', 'D-EOMT', 'D-ELPC', 'D-EMTO', 'D-EBRA']
|
const pool = ['D-EMIL', 'D-EKLM', 'D-ENNY', 'D-ELLA', 'D-EOMT', 'D-ELPC', 'D-EMTO', 'D-EBRA']
|
||||||
const reg = pool[Math.floor(Math.random() * pool.length)]
|
const reg = pool[Math.floor(Math.random() * pool.length)]
|
||||||
const short = `D-${reg.replace(/^D-/, '').slice(-2)}`
|
const short = `D-${reg.replace(/^D-/, '').slice(-2)}`
|
||||||
|
|||||||
Reference in New Issue
Block a user