mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-08-11 11:57:01 +08:00
feat(live-atc): teach the rare events on demand
A rejected take-off and a go-around both happen by chance about once in five hundred flights, which is the point of them — you cannot practise reacting to something you were told to expect. That also made them impossible to teach. Two switches under Special scenarios force either on the next flight. They are read when the session is created rather than watched, so flipping one mid-flight applies to the following one — which is how an instructor sets it up without the pilot seeing it coming. Only a switched-on value is sent: the backend reads the variable's absence as "leave it to chance", so sending false would pin the roll off instead of leaving it alone. Styled amber rather than the usual cyan, and the consequence is spelled out while either is armed: neither scenario continues to the stand.
This commit is contained in:
@@ -21,6 +21,8 @@ const prerecEnabled = defineModel<boolean>('prerecEnabled', { required: true })
|
||||
const prerecSeconds = defineModel<number>('prerecSeconds', { required: true })
|
||||
const aiTrafficEnabled = defineModel<boolean>('aiTrafficEnabled', { required: true })
|
||||
const autoTuneEnabled = defineModel<boolean>('autoTuneEnabled', { required: true })
|
||||
const forceRto = defineModel<boolean>('forceRto', { required: true })
|
||||
const forceGoAround = defineModel<boolean>('forceGoAround', { required: true })
|
||||
|
||||
/**
|
||||
* Shown while AI traffic is on. These are deliberate v1 boundaries from the
|
||||
@@ -170,6 +172,42 @@ const AI_TRAFFIC_LIMITS = [
|
||||
</v-expand-transition>
|
||||
</div>
|
||||
|
||||
<!-- Both of these happen on their own roughly once in five hundred
|
||||
flights, which is the point of them — you cannot practise reacting
|
||||
to something you were told to expect. These switches are for
|
||||
teaching them deliberately, so they apply to the NEXT flight rather
|
||||
than the one in progress. -->
|
||||
<div class="pt-2 border-t border-white/10 space-y-3">
|
||||
<div>
|
||||
<p class="text-xs uppercase tracking-[0.3em] text-white/40">Special scenarios</p>
|
||||
<p class="text-[11px] text-white/50 mt-1">
|
||||
Force a rare event on the next flight instead of waiting for it. Both
|
||||
otherwise occur by chance, about once in five hundred flights.
|
||||
</p>
|
||||
</div>
|
||||
<v-switch
|
||||
v-model="forceRto"
|
||||
color="amber"
|
||||
inset
|
||||
label="Rejected take-off (Tower cancels)"
|
||||
hide-details
|
||||
/>
|
||||
<v-switch
|
||||
v-model="forceGoAround"
|
||||
color="amber"
|
||||
inset
|
||||
label="Go-around (Tower breaks off the approach)"
|
||||
hide-details
|
||||
/>
|
||||
<v-expand-transition>
|
||||
<p v-if="forceRto || forceGoAround" class="text-[11px] text-amber-300/80">
|
||||
Applies when you start the next flight. A rejected take-off ends with
|
||||
the aircraft stopped on the runway; a go-around sends you back to
|
||||
Approach — neither continues to the stand.
|
||||
</p>
|
||||
</v-expand-transition>
|
||||
</div>
|
||||
|
||||
<div class="pt-2 border-t border-white/10 space-y-3">
|
||||
<div>
|
||||
<p class="text-xs uppercase tracking-[0.3em] text-white/40">Voice input</p>
|
||||
|
||||
Reference in New Issue
Block a user