1. Overview
+
+ The sweatbox is a native, in-process simulator inside the FSD process.
+ Aircraft are synthetic registry participants (no TCP pilot sockets). You drive them
+ from the Administrator web page at /sweatbox with text commands that
+ follow TWRTrainer-style vocabulary.
+
-
+
- Control plane: web forms → openfsd web → FSD service HTTP (
/sweatbox/*).
+ - Wire: synthetics inject
#AP, position@, flight plans, and#DPlike real pilots.
+ - Primary path: HTML forms work with JavaScript disabled. JS only refreshes the table live. +
2. Requirements & enablement
+| Need | Detail |
|---|---|
| Role | +Administrator network rating (same as Config / Airport Editor). | +
| FSD process | +Running and reachable by the web process over service HTTP (default :13618). |
+
| Feature flag | +SWEATBOX_ENABLED=true on the FSD process (default is off). Restart after changing. |
+
| Optional env | +SWEATBOX_CID (default 900001) — synthetic pilot CID shared by all sweatbox aircraft. |
+
+ If the page says Disabled, sweatbox routes are absent on FSD. + If it says Unavailable, the web UI cannot reach FSD service HTTP. +
+3. Control panel UI
+Dense 16:9 operator layout at /sweatbox.
-
+
- Status strip +
- ICAO, pause state, elapsed sim time, arrival/departure counts. Pause / Unpause / Refresh. +
- Aircraft table +
- + Callsign, type, rules, squawk, heading, altitude, speed, status, instruction. + Click a row (or Tab + Enter with JS) to copy the callsign into Selected CS. + Per-row Del removes that synthetic; Delete all needs the confirm checkbox. + +
- Command rail +
-
+ Selected CS + command Line + Run.
+ Target forms: embed callsign in the line (
AAL123, taxi A) or fill Selected CS and type only the verb. +
+ - Airport / scenario +
- Load
.aptand.airvia file upload or paste. Scenario load auto-pauses the sim.
+
+ With JavaScript enabled, the table polls about every 1.5 s. Draft fields may persist in browser storage. + Commands always execute on the server — client JS never authorizes mutations. +
+4. Typical workflow
+-
+
- Enable sweatbox on FSD and open
/sweatboxas Administrator.
+ -
+ Load an airport (
.apt). Use + Airport Editor to author/download files if needed + (editor never injects into a live session — you load files here). +
+ - Optionally load a scenario (
.air). Sim pauses automatically.
+ - Unpause when ready for motion. +
- + Spawn or select aircraft, issue taxi / takeoff / pattern / vector commands while students + control as normal ATC on the FSD port. + +
- Delete aircraft when finished, or use Delete all. +
5. Airport & scenario files
+Airport (.apt)
+ + TWRTrainer-compatible airport geometry: ICAO, magnetic variation, parking spots, + runways, taxiways, holds. Defines the graph used for taxi routing (~100 ft intersection snap). +
+-
+
- Replace checkbox clears existing aircraft when loading a new airport. +
- Max upload/paste size is 2 MiB. +
-
+ Bulk XP12 conversion: operator-fetched
apt.datvia +go run ./cmd/aptdat2apt …(see repo docs on X-Plane airport data). +
+
Scenario (.air)
+ + Colon-delimited aircraft snapshots (callsign, type, engine, rules, position, plan fields, …). + Load is best-effort: soft parse issues may be reported while accepted aircraft still spawn. + Loading a scenario auto-pauses the engine. +
+Airport Editor
+
+ /airport-editor is map-first authoring with Blob download only (no server save).
+ Workflow: edit → download .apt/.air → load on Sweatbox.
+
6. Command language
+Commands are plain text. Soft failures return a message (flash); success is often silent motion.
+Targeting
+-
+
- Global (no aircraft):
add,p/pause,un/unpause,ops/stats.
+ - Callsign prefix:
AAL123, taxi A B hs 33orAAL123 taxi A B hs 33(comma optional).
+ - Selected CS: fill Selected CS, then
taxi A B hs 33.
+
Aliases
+
+ Many verbs accept short forms (e.g. p=pause, ph=pos, cancel=ctoc,
+ speed/slow=spd, tcn=tc). Prefer the canonical names below when teaching.
+
7. Spawn & session commands
+| Command | Meaning |
|---|---|
add rules weight engine runway distance [type] |
+
+ Place on approach to runway at distance NM.
+ rules: v/i (VFR/IFR).
+ weight: s/m/l/h.
+ engine: p/t/j/h (prop / turboprop / jet / helo).
+ Optional ICAO type override.
+ |
+
add rules weight engine @parking [type] |
+ Parked at named parking space (e.g. @GA1). |
+
add rules weight engine -bearing distance altitude [type] |
+ Airborne on radial from field: negative bearing, distance NM, altitude feet. | +
del |
+ Delete selected / targeted aircraft (disconnect synthetic). | +
p / pause |
+ Freeze motion; aircraft remain online. | +
un / unpause |
+ Resume motion. | +
ops / stats |
+ Session stats: elapsed, arrivals, departures, rates. | +
+ Example approach spawn: add i h j 33 8 — IFR heavy jet on 8 NM final for runway 33.
+ Example parking: add v s p @GA1 C172.
+
8. Ground commands
+| Command | Meaning |
|---|---|
taxi path… [hs name…] |
+
+ Taxi via taxiway/runway names. Optional hs tokens insert hold-shorts
+ (e.g. taxi K C D 33 hs 15). First step must intersect current surface.
+ Max path length is limited (on the order of 100 steps).
+ |
+
hold |
+ Hold present position (stop taxi). | +
res |
+ Resume after hold / hold-short / cross wait. | +
cross name |
+ Cross the named surface currently holding short of. | +
pos / ph |
+ Line up and wait (position and hold) on departure runway. | +
cto [hdg] |
+ Cleared for takeoff; optional departure heading. | +
ctoc / cancel |
+ Cancel takeoff clearance. | +
ctomlt / ctomrt |
+ Cleared takeoff into left / right closed traffic. | +
nostop / nohold |
+ Cancel planned stop/hold-short behavior (e.g. during rollout taxi intent). | +
9. Airborne / vector commands
+| Command | Meaning |
|---|---|
fh hdg | Fly heading (shortest turn). |
fhn hdg | Fly heading now (snap / immediate). |
tr hdg / tl hdg | Turn right / left to heading (forced direction, may long-arc). |
fph | Fly present heading. |
cm alt | Climb/maintain altitude (feet). |
spd n | Speed control (knots). Aliases include speed, slow. |
ga | Go around from approach/pattern/landing context. |
go | Continue after stop-and-go wait on the runway. |
+ Kinematics are training-oriented (constant turn/climb rates), not a full flight model. + There is no collision AI between aircraft. +
+10. Pattern & arrival commands
+| Command | Meaning |
|---|---|
erc / erd / erb rwy |
+ Enter right crosswind / downwind / base for runway. | +
elc / eld / elb rwy |
+ Enter left crosswind / downwind / base. | +
ef rwy |
+ Enter final. | +
tg |
+ Touch and go. | +
sg [sec] |
+ Stop and go; optional seconds to hold, else wait for go. |
+
la |
+ Low approach. | +
fs |
+ Full stop landing. | +
ext |
+ Extend current pattern leg (upwind/crosswind/downwind). | +
mlt / mrt |
+ Make left / right traffic. | +
msa / mna |
+ Make short approach / normal approach (short cuts base from downwind). | +
ps nm |
+ Pattern size in nautical miles. | +
tc / td / tb |
+ Turn crosswind / downwind / base now (end extend / advance leg). | +
+ Closed-traffic takeoff (ctomlt/ctomrt) joins the circuit after climb.
+ Midfield downwind is reflected in the Instruction column when crossed.
+
11. Transponder & flight plan
+| Command | Meaning |
|---|---|
sq code | Squawk code. |
sqi code | Squawk code and ident. |
sn | Squawk normal (Mode C). |
ss | Squawk standby. |
id | Ident. |
fp type alt route… | IFR flight plan fields (type, cruise alt, route tokens). |
vp type alt route… | VFR flight plan fields. |
remarks text… | Flight plan remarks. |
+ ATC clients can query and amend flight plans on the wire. The instructor table merges + live session plan fields after ATC amends, so the UI stays honest about what controllers see. +
+12. Status vocabulary
+Common Status column values (aligned with TWRTrainer where practical):
+-
+
- Parked, Taxiing, Holding Short, Holding in Position, Holding +
- Takeoff, Departing, On Approach, Airborne, Landed +
- Upwind, Crosswind, Downwind, Base, Final +
+ Instruction is a short human-readable cue (taxi plan, pattern leg, + midfield report, landing type, etc.). Use it together with Status when briefing or debugging. +
+13. What students see
+-
+
- Normal pilot targets: callsigns, positions, flight plans, squawk. +
- Late-joining ATC does not receive historical
#APfor already-online traffic (same as real pilots); they see subsequent positions in range and can query plans.
+ - Direct text / CPDLC-like traffic to synthetics is not answered (drain-and-drop). Instructors use the web command box, not the radio, to control aircraft. +
- Dashboard may badge synthetic connections; public datafeed can include them when sweatbox is enabled—know your ops policy. +
14. Ops notes & troubleshooting
+| Symptom | Check |
|---|---|
| Page shows Disabled | +SWEATBOX_ENABLED=true on FSD; restart FSD/binary. |
+
| Page shows Unavailable | +Web can reach FSD service HTTP; shared JWT secret/config; FSD process up. | +
| Command soft-fails | +Read flash message: missing CS, not taxiing, runway not found, no intersection, etc. | +
| No motion | +Sim paused (scenario load pauses). Unpause. | +
| Callsign conflict | +Shared registry with human pilots; pick another CS or remove the human connection. | +
| Taxi “do not intersect” | +Path steps must chain via ~100 ft graph snap; fix airport geometry in Airport Editor. | +
Limits (defaults)
+-
+
- Max aircraft on the order of 64 (clamped; see server config). +
- Upload bodies capped at 2 MiB for airport/scenario. +
- One active airport / scenario namespace per FSD process. +
Related tools
+-
+
- Airport Editor — author
.apt/.air
+ - Dashboard — online users including synthetics +
- Sweatbox control panel — live session +
+ This manual describes the openfsd instructor control plane. It is not a substitute for + local training procedures or client-specific ATC software docs. +
+