A320 fuel/FADEC bridge findings — exact source dependencies

Immediate cause of empty pipe tanks5/6:
  A320/Systems/a320-fuel.xml:573-662 requires FG tank level-gal_us > unusable-gal_us,
  not just native contents-lbs. It also requires feed-left-inner/feed-right-inner.
  These feed switches are true with powered wing pumps OR pilot-gdamped>=0.5
  (the original model's suction/gravity-feed branch, lines420-457).
  Missing these FG properties prevents ANY native transfer to the engine pipes.

Required one-way tank mirrors (each physics step, native -> FG):
  propulsion/tank[i]/contents-lbs -> /consumables/fuel/tank[i]/level-lbs
  propulsion/tank[i]/density-lbs_per_gal -> .../density-ppg
  native contents-lbs / native density-lbs_per_gal -> .../level-gal_us
  source tank capacity in lb / native density -> .../capacity-gal_us (constant after load)
  propulsion/tank[i]/pct-full /100 -> .../level-norm
  propulsion/tank[i]/unusable-volume-gal -> .../unusable-gal_us
  All A320 tanks explicitly use density6.71 lb/USgal in FDE/A320-200-CFM.xml.
  Tank capacities lb: [1523,12591.95,14623,12591.95,1523,10,10,10].
  Unusable volumes in source: tank0=4L,1=28L,2=23.2L,3=28L,4=4L; pipes no specified unusable.
  Prefer native unusable-volume-gal rather than independently introducing conversion constants.
  Tank5 feedsengine0; tank6 feedsengine1; tank7 feedsAPU. Do not alter feed indices.

Required g mirror:
  Original FG defaults.xml initializes /accelerations/pilot-gdamped and pilot-g to1.0.
  Original Aircraft/Generic/g-forces.xml:272-302 calculates JSB pilot-g as
  -(pilot/z-accel-fps_sec /32.174 + optional groundshake), then exponential filter time0.2.
  JSBSim native accelerations/n-pilot-z-norm has DOWNWARD Z sign: negate it for normal positive g.
  Native FGAuxiliary binds this property. To reproduce exact source conversion use native pilot
  acceleration fps/s rather than a made-up constant g through flight. Initialize filter from1.0.
  This is needed even if no G display is visible: fuel transfer depends on it.

Engine mirrors and missing control bridge:
  Each native propulsion/engine[i]/n1,n2 -> /engines/engine[i]/n1,n2.
  Native fuel-flow-rate-pps *3600 -> /engines/engine[i]/fuel-flow_pph.
  Do NOT overwrite n1-actual/n2-actual or engine/state: native a320-cfm56... + a320-ignition
  compute those. N2-actual feeds source IDG drive RPM and native electric power.
  A320/Systems/core-rules.xml:98-132 is a separate FG PropertyList, not JSB system:
    /systems/ignition/cutoff-jsb-1 -> /controls/engines/engine[0]/cutoff
    /systems/ignition/cutoff-jsb-2 -> /controls/engines/engine[1]/cutoff
    /systems/ignition/starter-jsb-1 -> /controls/engines/engine[0]/starter
    /systems/ignition/starter-jsb-2 -> /controls/engines/engine[1]/starter
  Native JSBSim setter sequence for engine i:
    propulsion/active_engine=i
    propulsion/cutoff_cmd=corresponding cutoff-jsb
    propulsion/starter_cmd=corresponding starter-jsb
  FGTurbine does NOT bind propulsion/engine[i]/cutoff as a setter. Creating that property silently
  is not enough. FGPropulsion.cpp binds active_engine, cutoff_cmd, starter_cmd instead.

Source predicate chain:
  native pipe contents>=1 -> can-run=1 -> cutoff-switch0 permits cutoff-jsb0.
  N2-actual>=58 and cutoff-jsb0 -> engine/state3 (source CFM options/ign-run-n2).
  Native ignition starter-cutoff-n2=50, starter-engage-n2=16.
  Engine electrical IDG needs original idg-disc=1 (0 disables drive), gen switches1,
  battery switches1, bus-tie1, serviceable/default failure flags and real N2 mirror.
  Engine LP valve opens only with engine state>=1 and fire-btn0, powered DC>=25.
  Native source currently transfers fuel into pipe tanks without gating on that LP-valve output;
  keep the existing source model, do not invent a different workaround.

Practical ready-state staging (bridge order inferred from these exact source predicates):
  1. Load source defaults + original takeoff overrides; initialize FG global g state1.0.
     Apply original tank contents and all mirrors. Keep original empty pipes; do not fill by fiat.
  2. Enable original six fuel pumps and takeoff electric/engine switches. Start native stepping,
     with the g/tank mirrors and cutoff/starter adapter active. Native gravity-feed can fill
     pipes before engine generator power exists; source rate is9 lb/s until contents>=9.
  3. Verify actual pipe5/6 contents>=1 and can-run1/2=1 before calling source fastStart mechanism:
     cutoff-switch=false, propulsion/set-running=0 then1. Continue mirrors immediately.
     The published source taxi routine first starts its APU and waitsN1>=98; if reproducing that
     full startup, its additional APU/Nasal controller must be ported. Staging here starts at
     ready state as requested, not a claimed complete cold-start simulation.
  4. Verify native engine/state3, rising real N1/N2, wing-pump-operate1, AC buses>=110,
     and pipe supply sustained. Native FADEC must produce throttle-pos-norm; do not force it.
  5. Original taxi source shutsAPU off5sec afterfastStart; apply takeoff flaps0.2, trim-0.1.
  Alternative real source ground power input is ground-cart=1, ext-pwr=1; native electric
  system then generates115V/400Hz itself (a320-electrical.xml724+), rather than forcing bus outputs.

B787 original FBW port assessment
  Source is374lines Nasal/fbw.nas +102lines Systems/fly-by-wire.xml (THREE PID controllers).
  Feasible as a bounded JS port within this session, approximately one small stateful module,
  provided its original behavior is retained and tested. It is a community aircraft FBW model,
  not manufacturer-certified Boeing control-law software. Source has no evidence for that claim.
  Normal operation requires:
    - Active/rudder/yaw-damper1, bank-limit35, source init output zeros.
    - Actual pitch/roll/alpha, AGL/MSL, indicated airspeed, EFIS power mirror.
    - Original gradual axis response, bank limit, coordinated rudder, throttle adjustments,
      speed/alpha protection, trim relaxation, and output to fcs/*-fbw-output.
    - All THREE original FG PID blocks, including roll hold Kp.01/Ti10 and pitch/alpha Kp-.01/Ti1,
      source saturation and derivative/filter settings; their trim outputs need mapping to
      native fcs/roll-trim-cmd-norm and fcs/pitch-trim-cmd-norm.
    - Autostable enabled only centered axes +/-0.1, IAS>=220, AGL>=3500, autopilot/copilot off.
      For the five-minute low circuit it may never activate, but omitting it isn't a full port.
    - EFIS<9 atAGL>=200 disablesFBW. Preserve valid original electrical output calculation.
    - Persistent throttle target/override bookkeeping; app input loop must not overwrite
      automatic throttle eachphysics tick, or source speed/turn/stall protection is erased.
  Timing caution: source timer requests0.001s but fpsfix=25/renderFPS; several corrections
  (trim .005, rudder .015, stall elevator .02) are per update without fpsfix. Running it once
  per120Hz physics step changes those gains. Use a deliberate source-equivalent update cadence,
  e.g. render/60Hz adapter while physics substeps separately; record cadence adaptation.
  Source quirk: Alpha Protection PID reads pitch-deg, not alpha-deg, although Nasal tests alpha.
  Do not silently claim this is true aircraft alpha control. Preserve/report or explicitly fix
  with a separate validation change. No simple 'normal law' toggle substitutes for this module.

Primary source downloads retained locally:
  FlightGear-JSBSim.cxx (LGPL2+):
    https://raw.githubusercontent.com/FlightGear/flightgear/next/src/FDM/JSBSim/JSBSim.cxx
  JSBSim-FGPropulsion.cpp, JSBSim-FGTank.cpp, JSBSim-FGAuxiliary.cpp:
    https://github.com/JSBSim-Team/jsbsim/tree/master/src/models
  FlightGear-defaults.xml; FlightGear-g-forces.xml:
    https://gitlab.com/flightgear/fgdata/-/raw/next/defaults.xml
    https://gitlab.com/flightgear/fgdata/-/raw/next/Aircraft/Generic/g-forces.xml
  FlightGear-pidcontroller.cxx contains exact incremental PID algorithm:
    https://raw.githubusercontent.com/FlightGear/flightgear/next/src/Autopilot/pidcontroller.cxx
