525 Commits

Author SHA1 Message Date
itsrubberduck
48db36ac26 copilot ui improvements 2026-05-10 17:15:41 +02:00
Emanuel Leube
0956c92b8e Merge pull request #263 from OpenSquawk/feature/pm-python-backend-integration
Wire /pm to Python backend for stateful ATC training sessions
2026-05-09 17:50:38 +02:00
leubeem
9464d37293 Wire /pm to Python backend for stateful ATC training sessions
Replace the LLM-per-request flow in /pm with a stateful Python backend
(OpenSquawk-LiveATC-api). The backend owns session state, does regex-first
routing with readback evaluation, and returns the next state + ATC speech.
The frontend keeps its local cursor (communicationsEngine) for TTS and
monitoring UI, but no longer calls /api/llm/decide.

Changes:

app/composables/useRadioBackend.ts (new)
  Typed Nuxt composable wrapping the Python REST API:
  createSession, transmit, deleteSession, fetchFlows.
  Base URL read from NUXT_PUBLIC_RADIO_BACKEND_URL (default 127.0.0.1:8000).

nuxt.config.ts
  Expose radioBackendUrl as a public runtime config key so the composable
  and communicationsEngine can both reach the Python backend.

shared/utils/communicationsEngine.ts
  - fetchRuntimeTree now accepts an optional baseUrl so it fetches from the
    Python backend instead of the Nuxt server when a URL is provided.
  - renderTpl handles both {var} (old MongoDB schema) and {{var}} (new YAML
    schema) — double-brace matched first to avoid partial matches.
  - stateSayTpl / stateUtteranceTpl helpers unify say_tpl|say_template and
    utterance_tpl|expected_pilot_template across both schema versions.
  - auto_transitions from the new YAML schema are included when collecting
    eligible transitions in collectAtcStatesUntilPilotTurn.

shared/types/decision.ts
  RuntimeDecisionState extended with say_template and expected_pilot_template
  fields (new YAML schema field names alongside the existing legacy names).

app/pages/pm.vue
  - startMonitoring: loads tree from Python backend, then creates a backend
    session (backendSessionId). Cursor synced to session.current_state.
  - handlePilotTransmission: calls radioBackend.transmit instead of
    /api/llm/decide. Applies auto_advanced_states via moveToSilent, then
    the final state. Speaks controller_say_template via TTS.
  - Both fetchRuntimeTree calls now pass radioBackendUrl so they hit the
    Python backend, not the Nuxt flow-from-MongoDB path.

AGENTS.md (new)
  Project guide updated to document the new two-backend architecture,
  the Python backend session lifecycle, and the dual template schema.

docs/plans/2026-05-06-pm-python-runtime-contract.md (new)
  Implementation plan and API contract written before the work started.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09 17:49:28 +02:00
itsrubberduck
f38b47acbd Wochenreport 2026-05-06 17:38:36 +02:00
itsrubberduck
2bcd27c635 fix popover 2026-05-06 16:08:45 +02:00
itsrubberduck
ae3dab6f9d komplette 320 sops 2026-05-06 15:51:58 +02:00
itsrubberduck
896ee4c3df simbrief gefixt 2026-05-06 15:43:05 +02:00
itsrubberduck
4435a61096 final fixes for copilot 2026-05-06 15:37:50 +02:00
itsrubberduck
d0280d45d2 sehr gute design fixes 2026-05-06 15:35:38 +02:00
itsrubberduck
1f08cfbc75 ui fixes 2026-05-06 15:28:55 +02:00
itsrubberduck
e0ce8e5fdc bessers ui aber mit fehlern 2026-05-06 14:57:25 +02:00
itsrubberduck
c161a0d0f4 clenaeres design verbesserte views 2026-04-26 09:59:34 +02:00
itsrubberduck
20358eea6c redeisng to match osq 2026-04-25 20:52:25 +02:00
itsrubberduck
bbcd9dca54 first version looks ok 2026-04-25 20:29:09 +02:00
itsrubberduck
e716262fe2 fix: enforce small-screen nav visibility 2026-04-23 11:10:17 +02:00
itsrubberduck
329deca2ae fix: simplify landing nav on small screens 2026-04-23 10:51:14 +02:00
itsrubberduck
7355605c00 fix: refine classroom tts popups 2026-04-23 10:20:06 +02:00
itsrubberduck
b7df1e86f2 feat: warn when classroom speech server is unavailable 2026-04-23 09:21:23 +02:00
itsrubberduck
3038f0f611 Update Discord invite links on landing page 2026-03-30 19:45:27 +02:00
itsrubberduck
e792b09671 feat: update classroom feedback round 2 content 2026-02-27 13:03:04 +01:00
itsrubberduck
1e3cff1770 feat(landing): add captcha challenge cycling option 2026-02-22 18:32:17 +01:00
itsrubberduck
ba1b1090b1 speed tape changes 2026-02-22 16:07:02 +01:00
itsrubberduck
f5509d9fce claude hat das pfd sehr krass ueberarbeitet 2026-02-21 18:04:37 +01:00
itsrubberduck
9e2138d1ce style(pfd): match A320 reference colors from licarth/a320pfd
- Sky: #19b5e6, ground: #64241a (darker, more accurate)
- Tape backgrounds: dark blueish #1a2628/#1d282a (not pure grey)
- Tape borders: #304c50 (teal-tinted)
- Readout text: brighter green #3ae061
- Readout box borders: yellow #fbe044 (matches real A320)
- Aircraft symbol yellow: #faf56c
- Heading yellow: #fbe044
- VS background: #0a171d

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 15:52:23 +01:00
itsrubberduck
febe4d907a feat(pfd): realistic styling, flight inertia, and improved training exercises
- Darken all tape backgrounds to match real A320 PFD (#16181f/#1c1e26)
- Speed/altitude readouts green (#19e34a) instead of cyan
- Attitude indicator: sky/ground gradients, W-shaped aircraft symbol
- Speed tape: cyan target zone (not red), VFE/min-speed red bands
- Altitude tape: ticks on left side toward attitude indicator
- Flight physics: 3x slower pitch (smoothed, tau 2s), halved roll rate,
  stronger speed-pitch coupling for realistic 150t inertia
- Pitch/bank exercises use normal flight ranges (±10° bank, ±3-4° pitch)
- Multi-phase speed exercise: explain → coarse hold 5s → fine hold 8s
- ATC messages emphasize small inputs, patience, and anticipation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 15:45:39 +01:00
itsrubberduck
11ffd09e3b fix(pfd): mirror vertical speed vector direction 2026-02-21 00:28:03 +01:00
itsrubberduck
c9dee79605 style(pfd): refine colors, narrow heading tape, and rework VS scale 2026-02-21 00:25:32 +01:00
itsrubberduck
064ce39e79 fix(flightlab): keep cloud flow coming from ahead toward camera 2026-02-21 00:23:24 +01:00
itsrubberduck
09bc6fe02c feat(flightlab): add moving cloud field for speed heading and altitude cues 2026-02-21 00:13:47 +01:00
itsrubberduck
719f4efad3 style(pfd): align core instrument visuals with Airbus reference 2026-02-21 00:10:37 +01:00
itsrubberduck
06f277e3ee feat(learn-pfd): add pitch-based speed hold step and target speed zones 2026-02-21 00:08:16 +01:00
itsrubberduck
7cfe21c490 feat(flightlab): add custom airplane glb asset 2026-02-21 00:01:01 +01:00
itsrubberduck
6f73f37caf flugzeug von hinten 2026-02-20 23:59:09 +01:00
itsrubberduck
b83ccf2c7c engine thr mehr respektieren 2026-02-20 23:55:45 +01:00
itsrubberduck
34df91188d einfache verison 2026-02-20 23:47:48 +01:00
itsrubberduck
a3056491d9 fix(pfd): correct 3D aircraft orientation and heading indicator layout
Aircraft model rebuilt with proper Three.js coordinate system:
- Wings along X axis (horizontal), fuselage along Z (forward=-Z), Y=up
- Pitch rotates around X, bank around Z
- Camera positioned for front-left view

Heading indicator fixed to match Airbus PFD style:
- Yellow heading readout box at top with pointer triangle below
- Ticks grow upward from bottom edge
- Labels positioned above ticks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:38:42 +01:00
itsrubberduck
0d1dae87e7 fix(3d): correct aircraft rotation axes and camera position
Pitch rotates around Y axis (wing axis), bank around X axis
(longitudinal axis). Camera moved to front-right view to clearly
show both pitch and bank movements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:32:13 +01:00
itsrubberduck
a22fcbd240 fix(stick-input): correct vertical stick direction
Remove Y-axis inversion so pulling stick down (toward user) gives
positive pitch (nose up), matching real Airbus sidestick behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:29:16 +01:00
itsrubberduck
fcfa46c37a fix(pfd): use correct Nuxt auto-import component names (FlightlabPfd*)
Nuxt auto-import prefixes component names based on directory path.
Components in app/components/flightlab/pfd/ are registered as
FlightlabPfd*, not Pfd*. Fixed in learn-pfd.vue and PfdContainer.vue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:28:39 +01:00
itsrubberduck
36cd0c8b69 feat(stick-input): add touchscreen stick-input page and WS session to learn-pfd
- learn-pfd.vue now creates a WebSocket session on mount and displays
  the 4-char session code in the header bar for touchscreen connection
- New stick-input.vue page at /flightlab/medienstationen/stick-input
  with touch-based sidestick (spring-loaded 2D pad) and throttle
  (vertical slider). Joins session by code, sends input at 30Hz.
- Stick input page added to medienstationen index as second card.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:21:27 +01:00
itsrubberduck
4404bd168a fix(learn-pfd): use h-screen and min-h for proper grid layout height
Root div min-h-screen → h-screen ensures flex-1 children get real
height. Grid children get min-h-[200px] so Three.js and PFD SVG
have measurable container dimensions to render into.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:18:32 +01:00
itsrubberduck
c7a64521f6 feat(learn-pfd): add main learn-pfd page with dynamic layout and WebSocket input
Integrates FBW physics, PFD SVG instruments, 3D aircraft model,
TTS narration, goal evaluation engine, and WebSocket stick input
into a single interactive learning experience. Features dynamic
CSS Grid layout that transitions between model-focus, split, and
pfd-focus modes as the user progresses through phases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:04:08 +01:00
itsrubberduck
c6a634b7de feat(medienstationen): add medienstationen index page and link from flightlab
New index page at /flightlab/medienstationen with PFD learning card
and coming-soon placeholder. Adds medienstationen section link to
the main flightlab index page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:01:29 +01:00
itsrubberduck
ef8f1a1991 feat(engine): add learn-pfd engine composable with goal evaluation
Composable manages phase navigation, interaction goal monitoring with
hold-time validation, progress tracking, and hint system for the
learn-pfd medienstation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:01:16 +01:00
itsrubberduck
636f7f7e12 feat(data): add learn-pfd scenario phases with progressive PFD element introduction
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 18:33:15 +01:00
itsrubberduck
9a6eb7892b feat(pfd): add SVG PFD instrument components (attitude, speed, alt, VS, heading)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 18:33:13 +01:00
itsrubberduck
2d6d8e43c3 feat(3d): add Three.js aircraft model component for PFD learning
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 18:32:02 +01:00
itsrubberduck
c4c841a2c1 feat(ws): add stick-input WebSocket message handler and client support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 18:30:26 +01:00
itsrubberduck
4e74b74255 feat(fbw): add Airbus Normal Law FBW physics composable
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 18:30:16 +01:00
itsrubberduck
3f28abae1f feat(types): add LearnPfdPhase, PFD element types, and stick-input WS event
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 18:29:01 +01:00