Add visual approach requests (controller-initiated and pilot-spontaneous) #583#807
Add visual approach requests (controller-initiated and pilot-spontaneous) #583#807jordw wants to merge 17 commits intommp:masterfrom
Conversation
|
Would it be possible to make this a probability as well "Pilots always request "the visual" generically - the controller decides whether to clear a plain visual (CV) or a charted visual procedure (C).". Becuase I feel like, not every pilot requets a visual or calls the field in sight. I think that might be a bit more realistic than having them call every time. |
|
Sorry if that wasn't clear, but it's a probability like so: Base rate: 3% per second (~30 second expected wait time if conditions are perfect) Distance: linear taper from 3nm to 15nm:
Visibility: linear ramp from 3SM to 10SM:
Combined: prob = 0.03 × distFactor × visFactor Happy to adjust this - thoughts? |
910efd6 to
b99d5c7
Compare
|
I play tested this a bit more, and came up with a simpler probability model for requesting the visual that's also easier to tune. |
|
Add command documentation |
c388aa3 to
b4ceafb
Compare
|
Removed the charted visual fallback to a direct straight-in when the aircraft can't intercept the charted waypoints — it now reports "unable" instead, so the controller can re-clear. |
|
This will be fantastic to have in there. Broadly speaking the code looks good. Some initial feedback / thoughts before properly digging into the code (which will probably have to wait until tomorrow at this point):
|
d4e7001 to
8ca5942
Compare
|
Great feedback! I took another stab at it.
Done. FS is replaced with AP/{oclock}/{miles}. The clock position gets compared against the actual bearing to the airport, and if it's off by more than about 120 degrees they'll always say "looking." Otherwise there's a distance scaled probability they spot it.
Added. When they say "looking" a 10-20 second timer starts, and once it expires they re-check and call back with "field in sight" if they can see it, or negative if they can't.
Good catch, fixed. CV now requires field in sight, a spontaneous visual request, or traffic in sight before accepting the clearance. That last one means you can also clear a visual after a traffic advisory: point out preceding traffic, pilot calls traffic in sight, then clear the visual. This is also valid per the 7110.65, and was easy enough to add.
I researched this more and reworked this. It does happen, but it's seemingly rare on both counts, so I adjusted the probabilities: 10% of pilots spontaneously report field in sight, and of those about 10% also request the visual. The rest only report field/traffic in sight when asked. These are easily tunable if there's more feedback as well.
Done. The actual METAR visibility (converted from statute to nautical miles, capped at 15nm) is now used as the max range instead of a flat 15. Also added a ceiling check: if the aircraft is above airport elevation plus the reported ceiling, they're in the clouds regardless of surface weather. |
|
I checked out the PR branch and spent some time with it. First and foremost, apologies for that crash in the wx/atmos code; that is now fixed in master and merging that to this branch takes care of that. I did successfully clear someone for a visual approach in the end which was great, but hit a few bumps (this was all via STT and not the keyboard commands):
In general, don't include "approach" in transmission strings; that will be added automatically. Also, use (I'll look at the code a bit now.) |
mmp
left a comment
There was a problem hiding this comment.
First pass; I haven't dug into everything deeply yet, but here are some initial comments.
|
Thanks for the playtesting and feedback. No worries about the crash, I was able to fix it locally last night and keep moving. I didn’t expect this feature to be so nuanced when I started, but it’s been a great way to learn the codebase, and I appreciate your patience. It’s clear what I need to do to polish this up. Everything you ran into looks straightforward to address, so I’ll do another pass. |
…ous) mmp#583 Pilots spontaneously report "field in sight, requesting the visual" when VMC, within 15nm, and the airport is visible (≤120° off nose). Probability scales with distance and visibility. Controllers can query "do you have the field in sight?" (FS command). The CV command (e.g., CV13L) clears a direct visual approach: when roughly aligned, flies a 3nm final to the threshold; when offset, inserts a base-turn waypoint for a realistic turn onto final. Charted visual intercept failures also fall back to the direct visual path.
Replace per-second probability scaling (distance/visibility factors) with a one-time coin flip: ~30% of pilots prefer the visual and request it after a short random delay (2-8s) once the field is in sight. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rence Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mp#583 Charted visual approaches have specific waypoints for separation and obstacle clearance. If the aircraft can't intercept, it should report unable so the controller can re-clear, not silently degrade to a straight-in visual. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mp#583 - Replace FS command with AP/{oclock}/{miles} (airport advisory): controller tells pilot where to look, pilot responds "field in sight", "looking", or IMC indication based on bearing accuracy, distance, and weather - Add "looking" → delayed "field in sight" flow mirroring traffic advisory pattern (checkDelayedFieldInSight) - Require field-in-sight before CV clearance; pilot responds "unable" without it - Change spontaneous calls: ~90% report "field in sight" only, ~10% also request the visual approach - Update STT handlers, website docs, and tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Scale visual range with actual METAR visibility (capped at 15nm) instead of a fixed 15nm constant, and reject field-in-sight when the aircraft is above the reported ceiling. Adds effectiveVisualRange() helper to keep the logic DRY between checkVisualEligibility and handleAirportAdvisory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…backs mmp#583 checkDelayedTrafficInSight and checkDelayedFieldInSight now fire deterministically when SimTime passes the deadline instead of randomly within a window. The initial 10-20s random delay is sufficient variation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
METAR reports visibility in statute miles but distances are computed in nautical miles. Add StatuteMilesToNauticalMiles constant and apply the conversion in effectiveVisualRange. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…bability, update UI help mmp#583 - Merge duplicate airport/field STT commands into one pattern and add "report field in sight" variant - Make visual request conditional on field-in-sight flip (10% of 10% = 1%) - Update UI help to show AP/{oclock}/{miles} instead of old FS command Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ack mmp#583 - CV gate now accepts TrafficInSight so controllers can clear a visual after a traffic advisory (per 7110.65) - When the looking timer expires and the pilot still can't see the field, they call back "negative field" instead of going silent - Update UI help and website docs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
589bc8d to
c68c630
Compare
METAR visibility is a ground-level measurement. Aerosol extinction decays exponentially with altitude: σ(z) = σ₀·exp(-z/H). Integrating along the slant path from the aircraft to the airport (Beer-Lambert) gives: effectiveRange = surfaceVis × h / (H × (1 - exp(-h/H))), using a 2500 ft haze scale height. Cap raised from 15 to 25 NM. mmp#583 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change approach name to "Visual Approach Runway XX" (title case, with "approach" before runway) matching real pilot phrasing. Skip appending "approach" in ClearedApproachIntent and ApproachExpect renderers when the name already contains it. mmp#583 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c68c630 to
01b7a37
Compare
|
Updates from today:
I still need to do more play testing tomorrow with STT, but good progress. |
GetSTTFixes() was missing the arrival and departure airport ICAO codes, so STT couldn't match airport names like "Kennedy" in commands such as "Kennedy 12 o'clock 12 miles" for the AP (airport advisory) command. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
I smoke tested this in the sim with STT via the test bench tool I submitted in #816 (the visual approach scenarios for now are at jordw@ee904d8 since they depend on this logic, and I wanted to keep this clean) and it seems to be in decent shape now. |
I took a stab at adding visual approach support. I tried to make some reasonable assumptions, but happy to iterate based on feedback.
Pilots spontaneously request the visual when they have the field in sight, controllers can ask (FS), and controllers can clear direct visual approaches (CV). Charted visual approaches (e.g., Belmont Visual) remain separate via the C command. STT equivalents are included for all new commands.
Assumptions
Pilot behavior
Flight path
Test plan