Airbus A320¶
The A320 from the A320-family package models the aircraft’s systems very closely and comes with autopilot, autothrust and autoland. A script therefore doesn’t have to fly it, only press the right buttons. The basics are under Control with Python.

Installation¶
The model comes as A320-family from the default hangar in the FlightGear launcher and is licensed under the GPL. Its folder belongs in $FG_BASIS/Aircraft. I fly the A320neo-PW variant:
"$FG_BASIS/werkzeuge/starten.sh" --aircraft=A320neo-PW --airport=EDDE --runway=10 \
--prop:/systems/start-up-on-start=true
With start-up-on-start it stands ready for takeoff on the runway. For me both engines were running a little over a minute after the start.
ILS approach¶
Set the frequency and course on the radio, fly to the approach line with HDG and press APPR:
fg.set("/instrumentation/nav[0]/frequencies/selected-mhz", 111.90)
fg.set("/instrumentation/nav[0]/radials/selected-deg", 81) # magnetic runway course
fg.set("/it-autoflight/input/vert", 2)
fg.set("/it-autoflight/input/ap2", "true") # for autoland
Crosswind: don’t fly parallel to the line¶
The model captures the localizer only under these conditions (checkLoc in Nasal/FMGC/FMGC-b.nas):
Signal quality of at least 0.99, which for me was from about 14 nm
Deflection up to 0.25, or up to 0.95 if the heading points toward the line
My first controller computed the heading from the lateral offset only. At 15 kt of crosswind it needs about 4.5° of crab, though, so it stayed 226 m beside the line and flew parallel to it. The localizer didn’t capture, and 4 nm before the runway the script stopped. The fix is a slow integral term, computed once per second:
vorhalt = clamp(vorhalt - ablage_m / 50 * 0.01, -15, 15)
kurs = bahnkurs + clamp(-ablage_m / 50 + vorhalt, -30, 30)
After that it captured the localizer at 14.9 nm and touched down 1.8 m from the centerline.
Master Caution after a restart¶
If you shut down the engines at the gate and restart them through the model’s panel state, the Master Caution stays on for the entire next flight: AIR ENG 1 BLEED NOT CLSD. The fast start sets a latch in the model that doesn’t clear on its own. It clears when the bleed switches are off briefly, which is exactly what the ECAM asks for:
import time
for schalter in ("bleed-1", "bleed-2"):
fg.set(f"/controls/pneumatics/switches/{schalter}", 0)
time.sleep(3)
for schalter in ("bleed-1", "bleed-2"):
fg.set(f"/controls/pneumatics/switches/{schalter}", 1)
I checked this on the ground; there the caution stayed off up to the runway. Current messages are in /ECAM/msg/line1 to line8, the warning light in /ECAM/warnings/master-caution-light.
Results¶
Flight |
Touchdown |
From the centerline |
|---|---|---|
Erfurt → Leipzig, fog, 600 m visibility |
−94 ft/min |
0.3 m |
Erfurt → Leipzig, crosswind 13 kt |
−130 ft/min |
1.8 m |
Leipzig → Erfurt, crosswind 14 kt |
−164 ft/min |
2.7 m |