Status pasa w kontekście + reguła RUNWAY STATUS

- kontekst lotu zawiera 'Selected runway X: clear/OCCUPIED by ...'
- prompt: ATC odmawia zgody na start/lądowanie gdy pas zajęty,
  daje zgodę tylko gdy wolny (na zapytanie pilota)
- działa razem z proaktywnym wyzwalaczem 'pas zajęty'
This commit is contained in:
pali112 committed 2026-10-21 19:15:28 +02:00
1 parent b911a77517
commit f67345a287
2 files changed
+22 -3

No files matched your search

+19
View File
@@ -62,6 +62,10 @@ DEFAULT_CONFIG = {
"Ground->Tower->Departure->Center (so Tower hands off to Departure). On ARRIVAL "
"the flow is Center->Approach->Tower->Ground (so Tower hands off to Ground). "
"Never hand off to yourself (e.g. Tower must NOT say 'contact Tower'). "
"RUNWAY STATUS: when the pilot requests takeoff or landing, check the "
"'Selected runway' status in the context. If it says OCCUPIED, you must "
"withhold the clearance (e.g. 'hold short', 'go around', 'runway occupied'). "
"Only issue a takeoff/landing clearance when the runway is clear. "
"Use the nearby traffic list when issuing traffic advisories "
"(e.g. bearing in clock positions and distance). "
"Respond with ATC instructions only, no extra commentary."
@@ -529,6 +533,21 @@ class XSayATC:
ctx["NextFacility"] = nxt
lines.append(f"Next expected facility (per standard flow): {nxt}")
# Stan wybranego pasa (zajety/wolny) — dodawany do kontekstu, zeby
# ATC wiedzial, czy moze dac zgodę na start/lądowanie, gdy pilot pyta.
if self.selected_runway and self._runway_icao:
occ = self._runway_occupants(self._runway_icao, self.selected_runway)
if occ:
desc = ", ".join(
(o['phase_name'] + (f" (key 0x{o['key']:X})" if isinstance(o.get('key'), int) else ""))
for o in occ
)
ctx["RunwayStatus"] = "occupied"
lines.append(f"Selected runway {self.selected_runway}: OCCUPIED by {desc}")
else:
ctx["RunwayStatus"] = "clear"
lines.append(f"Selected runway {self.selected_runway}: clear")
# Ruch lotniczy w poblizu
traffic_lines = self._collect_traffic()
ctx["Traffic"] = traffic_lines