From e00b6a94a186f565e78cbbfee5d5fabb0fc53a94 Mon Sep 17 00:00:00 2001 From: Josh Davidson Date: Mon, 11 May 2020 22:40:59 -0400 Subject: [PATCH] Control: Totally refactor Flaps/Slats system, add more detail --- A320-100-CFM-set.xml | 5 +- A320-100-CFM.xml | 1 + A320-200-CFM-set.xml | 5 +- A320-200-CFM.xml | 1 + A320-200-IAE-set.xml | 5 +- A320-200-IAE.xml | 1 + A320-main.xml | 17 +- A320neo-CFM-set.xml | 5 +- A320neo-CFM.xml | 1 + A320neo-PW-set.xml | 5 +- A320neo-PW.xml | 1 + AircraftConfig/acconfig.nas | 28 +- Models/Instruments/PFD/PFD.nas | 2 +- Models/Instruments/Upper-ECAM/Upper-ECAM.nas | 28 +- Nasal/ECAM/ECAM-logic.nas | 14 +- Nasal/FMGC/FMGC.nas | 8 +- Nasal/Libraries/libraries.nas | 470 +++--- Nasal/Libraries/property-tree-setup.nas | 3 + Nasal/Systems/FADEC/fadec-common.nas | 2 +- Systems/a320-fbw.xml | 1346 +++++++++++++++ Systems/a320-fcs.xml | 1561 ++---------------- Systems/fadec-cfm.xml | 2 +- Systems/fadec-iae.xml | 2 +- Systems/lower-ecam.xml | 4 +- revision.txt | 2 +- 25 files changed, 1747 insertions(+), 1772 deletions(-) create mode 100644 Systems/a320-fbw.xml diff --git a/A320-100-CFM-set.xml b/A320-100-CFM-set.xml index 2503a080..f06ce986 100644 --- a/A320-100-CFM-set.xml +++ b/A320-100-CFM-set.xml @@ -183,8 +183,9 @@ 0 - CFM - 52.3 + CFM + 52.3 + 35 0 diff --git a/A320-100-CFM.xml b/A320-100-CFM.xml index 17120141..b9cbac2f 100644 --- a/A320-100-CFM.xml +++ b/A320-100-CFM.xml @@ -198,6 +198,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd"> + diff --git a/A320-200-CFM-set.xml b/A320-200-CFM-set.xml index a6e18ac3..834479d6 100644 --- a/A320-200-CFM-set.xml +++ b/A320-200-CFM-set.xml @@ -183,8 +183,9 @@ 0 - CFM - 52.3 + CFM + 52.3 + 35 0 diff --git a/A320-200-CFM.xml b/A320-200-CFM.xml index 5656cd99..984e00a2 100644 --- a/A320-200-CFM.xml +++ b/A320-200-CFM.xml @@ -197,6 +197,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd"> + diff --git a/A320-200-IAE-set.xml b/A320-200-IAE-set.xml index 61d17a7a..42e8abc1 100644 --- a/A320-200-IAE-set.xml +++ b/A320-200-IAE-set.xml @@ -183,8 +183,9 @@ 0 - IAE - 52.3 + IAE + 52.3 + 40 0 diff --git a/A320-200-IAE.xml b/A320-200-IAE.xml index f5c23561..d7a0dc4e 100644 --- a/A320-200-IAE.xml +++ b/A320-200-IAE.xml @@ -197,6 +197,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd"> + diff --git a/A320-main.xml b/A320-main.xml index 48ce70c1..b145f018 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -99,14 +99,6 @@ 2-engine - - 0.000 - 0.290 - 0.596 - 0.645 - 1.000 - - @@ -704,11 +696,10 @@ 0 - 0 - 0 - 0 - 0 - 0 + 0 + 0 + 0 + 0 diff --git a/A320neo-CFM-set.xml b/A320neo-CFM-set.xml index 8cfb9497..012b4af5 100644 --- a/A320neo-CFM-set.xml +++ b/A320neo-CFM-set.xml @@ -183,8 +183,9 @@ 1 - CFM - 52.3 + CFM + 52.3 + 35 1 diff --git a/A320neo-CFM.xml b/A320neo-CFM.xml index a727f9c5..eab5d28f 100644 --- a/A320neo-CFM.xml +++ b/A320neo-CFM.xml @@ -197,6 +197,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd"> + diff --git a/A320neo-PW-set.xml b/A320neo-PW-set.xml index 805fddf3..8ac9cb94 100644 --- a/A320neo-PW-set.xml +++ b/A320neo-PW-set.xml @@ -183,8 +183,9 @@ 1 - CFM - 52.3 + CFM + 52.3 + 35 1 diff --git a/A320neo-PW.xml b/A320neo-PW.xml index 89021da0..1e020196 100644 --- a/A320neo-PW.xml +++ b/A320neo-PW.xml @@ -197,6 +197,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd"> + diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas index cf0df896..14efed8b 100644 --- a/AircraftConfig/acconfig.nas +++ b/AircraftConfig/acconfig.nas @@ -277,12 +277,7 @@ var colddark = func { setprop("/controls/engines/engine-start-switch", 1); setprop("/controls/engines/engine[0]/cutoff-switch", 1); setprop("/controls/engines/engine[1]/cutoff-switch", 1); - setprop("/controls/flight/slats", 0.000); - setprop("/controls/flight/flaps", 0.000); - setprop("/controls/flight/flap-lever", 0); - setprop("/controls/flight/flap-pos", 0); - setprop("/controls/flight/flap-txt", " "); - libraries.flaptimer.stop(); + setprop("/controls/flight/flaps", 0); setprop("/controls/flight/speedbrake-arm", 0); setprop("/controls/flight/speedbrake", 0); setprop("/controls/gear/gear-down", 1); @@ -340,12 +335,7 @@ var beforestart = func { setprop("/controls/engines/engine-start-switch", 1); setprop("/controls/engines/engine[0]/cutoff-switch", 1); setprop("/controls/engines/engine[1]/cutoff-switch", 1); - setprop("/controls/flight/slats", 0.000); - setprop("/controls/flight/flaps", 0.000); - setprop("/controls/flight/flap-lever", 0); - setprop("/controls/flight/flap-pos", 0); - setprop("/controls/flight/flap-txt", " "); - libraries.flaptimer.stop(); + setprop("/controls/flight/flaps", 0); setprop("/controls/flight/speedbrake-arm", 0); setprop("/controls/flight/speedbrake", 0); setprop("/controls/gear/gear-down", 1); @@ -432,12 +422,7 @@ var taxi = func { setprop("/controls/engines/engine-start-switch", 1); setprop("/controls/engines/engine[0]/cutoff-switch", 1); setprop("/controls/engines/engine[1]/cutoff-switch", 1); - setprop("/controls/flight/slats", 0.000); - setprop("/controls/flight/flaps", 0.000); - setprop("/controls/flight/flap-lever", 0); - setprop("/controls/flight/flap-pos", 0); - setprop("/controls/flight/flap-txt", " "); - libraries.flaptimer.stop(); + setprop("/controls/flight/flaps", 0); setprop("/controls/flight/speedbrake-arm", 0); setprop("/controls/flight/speedbrake", 0); setprop("/controls/gear/gear-down", 1); @@ -548,14 +533,9 @@ var takeoff = func { setprop("/controls/switches/landing-lights-l", 1); setprop("/controls/switches/landing-lights-r", 1); setprop("/controls/flight/speedbrake-arm", 1); - setprop("/controls/flight/flaps", 0.290); - setprop("/controls/flight/slats", 0.666); - setprop("/controls/flight/flap-lever", 1); - setprop("/controls/flight/flap-pos", 2); - setprop("/controls/flight/flap-txt", "1+F"); + setprop("/controls/flight/flaps", 0.2); setprop("/controls/atc/mode-knob", 4); atc.transponderPanel.modeSwitch(5); - libraries.flaptimer.start(); setprop("/controls/flight/elevator-trim", -0.07); systems.arm_autobrake(3); setprop("/ECAM/to-config-test", 1); diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index 3fa8710f..a3825490 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -135,7 +135,7 @@ var vr = props.globals.getNode("/FMGC/internal/vr", 1); var vr_set = props.globals.getNode("/FMGC/internal/vr-set", 1); var v2 = props.globals.getNode("/FMGC/internal/v2", 1); var v2_set = props.globals.getNode("/FMGC/internal/v2-set", 1); -var flap_config = props.globals.getNode("/controls/flight/flap-lever", 1); +var flap_config = props.globals.getNode("/controls/flight/flaps-input", 1); var hundredAbove = props.globals.getNode("/instrumentation/pfd/hundred-above", 1); var minimum = props.globals.getNode("/instrumentation/pfd/minimums", 1); diff --git a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas index 22e7eef3..f731ca69 100644 --- a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas +++ b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas @@ -13,6 +13,8 @@ var rightmsg = "XX"; # Conversion factor pounds to kilogram LBS2KGS = 0.4535924; +var flapsPos = 0; + # Create Nodes: var fuel_1 = props.globals.initNode("/engines/engine[0]/fuel-flow_actual", 0); var fuel_2 = props.globals.initNode("/engines/engine[1]/fuel-flow_actual", 0); @@ -48,8 +50,6 @@ var eng2_n1mode = props.globals.getNode("/systems/fadec/eng2/n1", 1); var eng2_eprmode = props.globals.getNode("/systems/fadec/eng2/epr", 1); var eng1_n2mode = props.globals.getNode("/systems/fadec/eng1/n2", 1); var eng2_n2mode = props.globals.getNode("/systems/fadec/eng2/n2", 1); -var flap_text = props.globals.getNode("/controls/flight/flap-txt", 1); -var flap_pos = props.globals.getNode("/controls/flight/flap-pos", 1); var fuel = props.globals.getNode("/consumables/fuel/total-fuel-lbs", 1); var modeautobrake = props.globals.getNode("/controls/autobrake/mode", 1); var speedbrakearm = props.globals.getNode("/controls/flight/speedbrake-arm", 1); @@ -232,9 +232,22 @@ var canvas_upperECAM_base = { } # Flap Indicator - me["FlapTxt"].setText(sprintf("%s", flap_text.getValue())); + flapsPos = pts.Controls.Flight.flapsPos.getValue(); + if (flapsPos == 1) { + me["FlapTxt"].setText("1"); + } else if (flapsPos == 2) { + me["FlapTxt"].setText("1+F"); + } else if (flapsPos == 3) { + me["FlapTxt"].setText("2"); + } else if (flapsPos == 4) { + me["FlapTxt"].setText("3"); + } else if (flapsPos == 5) { + me["FlapTxt"].setText("FULL"); + } else { + me["FlapTxt"].setText(" "); # More efficient then hide/show + } - if (flap_pos.getValue() > 0) { + if (flapsPos > 0) { me["FlapDots"].show(); } else { me["FlapDots"].hide(); @@ -397,7 +410,7 @@ var canvas_upperECAM_base = { me["TO_Spoilers_B"].show(); } - if (flap_pos.getValue() > 0 and flap_pos.getValue() < 5) { + if (flapsPos > 0 and flapsPos < 5) { me["TO_Flaps"].setText("FLAPS T.O"); me["TO_Flaps_B"].hide(); } else { @@ -442,12 +455,11 @@ var canvas_upperECAM_base = { } flaps3 = flaps3_ovr.getValue(); - flaps_position = flap_pos.getValue(); - if (flaps3 != 1 and flaps_position == 5) { + if (flaps3 != 1 and flapsPos == 5) { me["LDG_Flaps"].setText("FLAPS FULL"); me["LDG_Flaps_B"].hide(); me["LDG_Flaps_B3"].hide(); - } else if (flaps3 == 1 and flaps_position >= 4) { + } else if (flaps3 == 1 and flapsPos >= 4) { me["LDG_Flaps"].setText("FLAPS 3"); me["LDG_Flaps_B"].hide(); me["LDG_Flaps_B3"].hide(); diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index 525256ae..e1e6cd08 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -86,7 +86,7 @@ var messages_priority_3 = func { } # FCTL FLAPS NOT ZERO - if ((flap_not_zero.clearFlag == 0) and phaseVar == 6 and getprop("controls/flight/flap-lever") != 0 and getprop("instrumentation/altimeter/indicated-altitude-ft") > 22000) { + if ((flap_not_zero.clearFlag == 0) and phaseVar == 6 and getprop("controls/flight/flaps-input") != 0 and getprop("instrumentation/altimeter/indicated-altitude-ft") > 22000) { flap_not_zero.active = 1; } else { ECAM_controller.warningReset(flap_not_zero); @@ -697,7 +697,7 @@ var messages_priority_3 = func { } # CONFIG - if ((slats_config.clearFlag == 0) and (getprop("controls/flight/flap-lever") == 0 or getprop("controls/flight/flap-lever")) == 4 and phaseVar >= 3 and phaseVar <= 4) { + if ((slats_config.clearFlag == 0) and (getprop("controls/flight/flaps-input") == 0 or getprop("controls/flight/flaps-input")) == 4 and phaseVar >= 3 and phaseVar <= 4) { slats_config.active = 1; slats_config_1.active = 1; } else { @@ -705,7 +705,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(slats_config_1); } - if ((flaps_config.clearFlag == 0) and (getprop("controls/flight/flap-lever") == 0 or getprop("controls/flight/flap-lever") == 4) and phaseVar >= 3 and phaseVar <= 4) { + if ((flaps_config.clearFlag == 0) and (getprop("controls/flight/flaps-input") == 0 or getprop("controls/flight/flaps-input") == 4) and phaseVar >= 3 and phaseVar <= 4) { flaps_config.active = 1; flaps_config_1.active = 1; } else { @@ -1324,7 +1324,7 @@ var messages_priority_0 = func { var messages_config_memo = func { phaseVar = phaseNode.getValue(); - if (getprop("controls/flight/flap-lever") == 0 or getprop("controls/flight/flap-lever") == 4 or getprop("controls/flight/speedbrake") != 0 or getprop("fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65 or getprop("fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) { + if (getprop("controls/flight/flaps-input") == 0 or getprop("controls/flight/flaps-input") == 4 or getprop("controls/flight/speedbrake") != 0 or getprop("fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65 or getprop("fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) { setprop("ECAM/to-config-normal", 0); } else { setprop("ECAM/to-config-normal", 1); @@ -1366,7 +1366,7 @@ var messages_config_memo = func { toMemoLine3.colour = "c"; } - if (getprop("controls/flight/flap-pos") > 0 and getprop("controls/flight/flap-pos") < 5) { + if (getprop("controls/flight/flaps-pos") > 0 and getprop("controls/flight/flaps-pos") < 5) { toMemoLine4.msg = " FLAPS T.O"; toMemoLine4.colour = "g"; } else { @@ -1433,7 +1433,7 @@ var messages_config_memo = func { } if (getprop("it-fbw/law") == 1 or getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override")) { - if (getprop("controls/flight/flap-pos") == 4) { + if (getprop("controls/flight/flaps-pos") == 4) { ldgMemoLine4.msg = " FLAPS CONF 3"; ldgMemoLine4.colour = "g"; } else { @@ -1441,7 +1441,7 @@ var messages_config_memo = func { ldgMemoLine4.colour = "c"; } } else { - if (getprop("controls/flight/flap-pos") == 5) { + if (getprop("controls/flight/flaps-pos") == 5) { ldgMemoLine4.msg = " FLAPS FULL"; ldgMemoLine4.colour = "g"; } else { diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index e87d3dbd..6e0d1018 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -148,7 +148,7 @@ setlistener("/gear/gear[0]/wow-fmgc", func { var trimReset = func { gear0 = getprop("/gear/gear[0]/wow"); - flaps = getprop("/controls/flight/flap-pos"); + flaps = getprop("/controls/flight/flaps-pos"); if (gear0 == 1 and getprop("/FMGC/status/to-state") == 0 and (flaps >= 5 or (flaps >= 4 and getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap3-override") == 1))) { interpolate("/controls/flight/elevator-trim", 0.0, 1.5); } @@ -181,7 +181,7 @@ setlistener("/FMGC/internal/cruise-ft", func { var masterFMGC = maketimer(0.2, func { n1_left = getprop("/engines/engine[0]/n1-actual"); n1_right = getprop("/engines/engine[1]/n1-actual"); - flaps = getprop("/controls/flight/flap-pos"); + flaps = getprop("/controls/flight/flaps-pos"); modelat = getprop("/modes/pfd/fma/roll-mode"); mode = getprop("/modes/pfd/fma/pitch-mode"); modeI = getprop("/it-autoflight/mode/vert"); @@ -284,7 +284,7 @@ var masterFMGC = maketimer(0.2, func { } # calculate speeds - flap = getprop("/controls/flight/flap-pos"); + flap = getprop("/controls/flight/flaps-pos"); weight_lbs = getprop("/fdm/jsbsim/inertia/weight-lbs") / 1000; tow = getprop("/FMGC/internal/tow"); lw = getprop("/FMGC/internal/lw"); @@ -673,7 +673,7 @@ var ManagedSPD = maketimer(0.25, func { mach_sel = getprop("/it-autoflight/input/spd-mach"); srsSPD = getprop("/it-autoflight/settings/togaspd"); phase = getprop("/FMGC/status/phase"); # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done - flap = getprop("/controls/flight/flap-pos"); + flap = getprop("/controls/flight/flaps-pos"); maxspeed = getprop("/FMGC/internal/maxspeed"); minspeed = getprop("/FMGC/internal/minspeed"); mach_switchover = getprop("/FMGC/internal/mach-switchover"); diff --git a/Nasal/Libraries/libraries.nas b/Nasal/Libraries/libraries.nas index 0c5d84d8..16a9fc2f 100644 --- a/Nasal/Libraries/libraries.nas +++ b/Nasal/Libraries/libraries.nas @@ -7,33 +7,33 @@ print("------------------------------------------------"); print("Copyright (c) 2016-2020 Josh Davidson (Octal450)"); print("------------------------------------------------"); -setprop("sim/replay/was-active", 0); +setprop("/sim/replay/was-active", 0); -setprop("sim/menubar/default/menu[0]/item[0]/enabled", 0); -setprop("sim/menubar/default/menu[2]/item[0]/enabled", 0); -setprop("sim/menubar/default/menu[2]/item[2]/enabled", 0); -setprop("sim/menubar/default/menu[3]/enabled", 0); -setprop("sim/menubar/default/menu[5]/item[9]/enabled", 0); -setprop("sim/menubar/default/menu[5]/item[10]/enabled", 0); -setprop("sim/menubar/default/menu[5]/item[11]/enabled", 0); +setprop("/sim/menubar/default/menu[0]/item[0]/enabled", 0); +setprop("/sim/menubar/default/menu[2]/item[0]/enabled", 0); +setprop("/sim/menubar/default/menu[2]/item[2]/enabled", 0); +setprop("/sim/menubar/default/menu[3]/enabled", 0); +setprop("/sim/menubar/default/menu[5]/item[9]/enabled", 0); +setprop("/sim/menubar/default/menu[5]/item[10]/enabled", 0); +setprop("/sim/menubar/default/menu[5]/item[11]/enabled", 0); # Dimmers -setprop("controls/lighting/ndl-norm", 1); -setprop("controls/lighting/ndr-norm", 1); -setprop("controls/lighting/upper-norm", 1); +setprop("/controls/lighting/ndl-norm", 1); +setprop("/controls/lighting/ndr-norm", 1); +setprop("/controls/lighting/upper-norm", 1); # Lights -setprop("sim/model/lights/nose-lights", 0); -setprop("sim/model/lights/turnoffsw", 0); -setprop("controls/lighting/turnoff-light-switch", 0); -setprop("controls/lighting/leftturnoff", 0); -setprop("controls/lighting/rightturnoff", 0); +setprop("/sim/model/lights/nose-lights", 0); +setprop("/sim/model/lights/turnoffsw", 0); +setprop("/controls/lighting/turnoff-light-switch", 0); +setprop("/controls/lighting/leftturnoff", 0); +setprop("/controls/lighting/rightturnoff", 0); # Oil Qty var qty1 = math.round((rand() * 5 ) + 20, 0.1); var qty2 = math.round((rand() * 5 ) + 20, 0.1); -setprop("engines/engine[0]/oil-qt-actual", qty1); -setprop("engines/engine[1]/oil-qt-actual", qty2); +setprop("/engines/engine[0]/oil-qt-actual", qty1); +setprop("/engines/engine[1]/oil-qt-actual", qty2); ########## # Lights # @@ -46,21 +46,21 @@ var strobe_switch = props.globals.getNode("controls/switches/strobe", 1); var strobe_light = props.globals.getNode("controls/lighting/strobe", 1); var strobe = aircraft.light.new("/sim/model/lights/strobe", [0.05, 0.06, 0.05, 1], "/controls/lighting/strobe"); var tail_strobe = aircraft.light.new("/sim/model/lights/tailstrobe", [0.1, 1], "/controls/lighting/strobe"); -var logo_lights = getprop("sim/model/lights/logo-lights"); +var logo_lights = getprop("/sim/model/lights/logo-lights"); var nav_lights = props.globals.getNode("sim/model/lights/nav-lights"); var wing_switch = props.globals.getNode("controls/switches/wing-lights", 1); var wing_ctl = props.globals.getNode("controls/lighting/wing-lights", 1); var dome_light = props.globals.initNode("/sim/model/lights/dome-light", 0.0, "DOUBLE"); -var wow = getprop("gear/gear[2]/wow"); -var slats = getprop("controls/flight/slats"); -var gear = getprop("gear/gear[0]/position-norm"); -var nose_lights = getprop("sim/model/lights/nose-lights"); +var wow = getprop("/gear/gear[2]/wow"); +var slats = getprop("/controls/flight/slats"); +var gear = getprop("/gear/gear[0]/position-norm"); +var nose_lights = getprop("/sim/model/lights/nose-lights"); var left_turnoff_light = props.globals.getNode("controls/lighting/leftturnoff"); var right_turnoff_light = props.globals.getNode("controls/lighting/rightturnoff"); -var settingT = getprop("controls/lighting/taxi-light-switch"); -var settingTurnoff = getprop("controls/lighting/turnoff-light-switch"); -var setting = getprop("controls/lighting/nav-lights-switch"); -var domeSetting = getprop("controls/lighting/dome-norm"); +var settingT = getprop("/controls/lighting/taxi-light-switch"); +var settingTurnoff = getprop("/controls/lighting/turnoff-light-switch"); +var setting = getprop("/controls/lighting/nav-lights-switch"); +var domeSetting = getprop("/controls/lighting/dome-norm"); var landL = props.globals.getNode("controls/lighting/landing-lights[1]", 1); var landR = props.globals.getNode("controls/lighting/landing-lights[2]", 1); var landlSw = props.globals.getNode("controls/switches/landing-lights-l", 1); @@ -78,7 +78,7 @@ aircraft.rain.init(); ########## setlistener("/sim/sounde/btn1", func { - if (!getprop("sim/sounde/btn1")) { + if (!getprop("/sim/sounde/btn1")) { return; } settimer(func { @@ -87,7 +87,7 @@ setlistener("/sim/sounde/btn1", func { }); setlistener("/sim/sounde/oh-btn", func { - if (!getprop("sim/sounde/oh-btn")) { + if (!getprop("/sim/sounde/oh-btn")) { return; } settimer(func { @@ -96,7 +96,7 @@ setlistener("/sim/sounde/oh-btn", func { }); setlistener("/sim/sounde/btn3", func { - if (!getprop("sim/sounde/btn3")) { + if (!getprop("/sim/sounde/btn3")) { return; } settimer(func { @@ -105,7 +105,7 @@ setlistener("/sim/sounde/btn3", func { }); setlistener("/sim/sounde/knb1", func { - if (!getprop("sim/sounde/knb1")) { + if (!getprop("/sim/sounde/knb1")) { return; } settimer(func { @@ -114,7 +114,7 @@ setlistener("/sim/sounde/knb1", func { }); setlistener("/sim/sounde/switch1", func { - if (!getprop("sim/sounde/switch1")) { + if (!getprop("/sim/sounde/switch1")) { return; } settimer(func { @@ -136,12 +136,12 @@ setlistener("/controls/lighting/no-smoking-sign", func { }, 1); }, 0, 0); -setlistener("/controls/flight/flap-lever", func { +setlistener("/controls/flight/flaps-input", func { props.globals.getNode("sim/sounde/flaps-click").setBoolValue(1); }, 0, 0); setlistener("/sim/sounde/flaps-click", func { - if (!getprop("sim/sounde/flaps-click")) { + if (!getprop("/sim/sounde/flaps-click")) { return; } settimer(func { @@ -176,11 +176,11 @@ var armrests = aircraft.door.new("/sim/model/door-positions/armrests", 2); # door opener/closer var triggerDoor = func(door, doorName, doorDesc) { - if (getprop("sim/model/door-positions/" ~ doorName ~ "/position-norm") > 0) { + if (getprop("/sim/model/door-positions/" ~ doorName ~ "/position-norm") > 0) { gui.popupTip("Closing " ~ doorDesc ~ " door"); door.toggle(); } else { - if (getprop("velocities/groundspeed-kt") > 5) { + if (getprop("/velocities/groundspeed-kt") > 5) { gui.popupTip("You cannot open the doors while the aircraft is moving!"); } else { gui.popupTip("Opening " ~ doorDesc ~ " door"); @@ -244,56 +244,56 @@ var systemsLoop = maketimer(0.1, func { systems.APUController.loop(); systems.HFLoop(); - if ((getprop("controls/pneumatic/switches/groundair") or getprop("controls/electrical/ground-cart")) and ((getprop("velocities/groundspeed-kt") > 2) or (getprop("controls/gear/brake-parking") == 0 and getprop("services/chocks/nose") == 0 and getprop("services/chocks/left") == 0 and getprop("services/chocks/right") == 0))) { - setprop("controls/electrical/ground-cart", 0); - setprop("controls/pneumatic/switches/groundair", 0); + if ((getprop("/controls/pneumatic/switches/groundair") or getprop("/controls/electrical/ground-cart")) and ((getprop("/velocities/groundspeed-kt") > 2) or (getprop("/controls/gear/brake-parking") == 0 and getprop("/services/chocks/nose") == 0 and getprop("/services/chocks/left") == 0 and getprop("/services/chocks/right") == 0))) { + setprop("/controls/electrical/ground-cart", 0); + setprop("/controls/pneumatic/switches/groundair", 0); } - if (getprop("velocities/groundspeed-kt") > 15) { - setprop("systems/shake/effect", 1); + if (getprop("/velocities/groundspeed-kt") > 15) { + setprop("/systems/shake/effect", 1); } else { - setprop("systems/shake/effect", 0); + setprop("/systems/shake/effect", 0); } - if (getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override") == 1 or (getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override") == 1 and getprop("controls/flight/flap-pos") >= 4)) { - setprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 1); + if (getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override") == 1 or (getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override") == 1 and getprop("/controls/flight/flaps-pos") >= 4)) { + setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 1); } else { - setprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 0); + setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 0); } - if (getprop("instrumentation/mk-viii/inputs/discretes/gpws-inhibit") == 1) { - setprop("instrumentation/mk-viii/speaker/volume", 0); + if (getprop("/instrumentation/mk-viii/inputs/discretes/gpws-inhibit") == 1) { + setprop("/instrumentation/mk-viii/speaker/volume", 0); } else { - setprop("instrumentation/mk-viii/speaker/volume", 2); + setprop("/instrumentation/mk-viii/speaker/volume", 2); } - if (getprop("engines/engine[0]/state") == 3 and getprop("engines/engine[1]/state") == 3) { - setprop("engines/ready", 1); + if (getprop("/engines/engine[0]/state") == 3 and getprop("/engines/engine[1]/state") == 3) { + setprop("/engines/ready", 1); } else { - setprop("engines/ready", 0); + setprop("/engines/ready", 0); } - if ((getprop("engines/engine[0]/state") == 2 or getprop("engines/engine[0]/state") == 3) and getprop("fdm/jsbsim/propulsion/tank[5]/contents-lbs") < 1) { + if ((getprop("/engines/engine[0]/state") == 2 or getprop("/engines/engine[0]/state") == 3) and getprop("/fdm/jsbsim/propulsion/tank[5]/contents-lbs") < 1) { systems.cutoff_one(); } - if ((getprop("engines/engine[1]/state") == 2 or getprop("engines/engine[1]/state") == 3) and getprop("fdm/jsbsim/propulsion/tank[6]/contents-lbs") < 1) { + if ((getprop("/engines/engine[1]/state") == 2 or getprop("/engines/engine[1]/state") == 3) and getprop("/fdm/jsbsim/propulsion/tank[6]/contents-lbs") < 1) { systems.cutoff_two(); } - if (getprop("sim/replay/replay-state") == 1) { - setprop("sim/replay/was-active", 1); - } else if (getprop("sim/replay/replay-state") == 0 and getprop("sim/replay/was-active") == 1) { - setprop("sim/replay/was-active", 0); + if (getprop("/sim/replay/replay-state") == 1) { + setprop("/sim/replay/was-active", 1); + } else if (getprop("/sim/replay/replay-state") == 0 and getprop("/sim/replay/was-active") == 1) { + setprop("/sim/replay/was-active", 0); acconfig.colddark(); gui.popupTip("Replay Ended: Setting Cold and Dark state..."); } }); setlistener("/options/steep-ils", func { - if (getprop("options/steep-ils") == 1) { - setprop("instrumentation/mk-viii/inputs/discretes/steep-approach", 1); + if (getprop("/options/steep-ils") == 1) { + setprop("/instrumentation/mk-viii/inputs/discretes/steep-approach", 1); } else { - setprop("instrumentation/mk-viii/inputs/discretes/steep-approach", 0); + setprop("/instrumentation/mk-viii/inputs/discretes/steep-approach", 0); } }); @@ -320,120 +320,8 @@ canvas.Element.setVisible = func(vis) { me.setBool("visible", vis); }; - -# In air, flaps 1 is slats only. On ground, it is slats and flaps. - -setprop("controls/flight/flap-lever", 0); -setprop("controls/flight/flap-pos", 0); -setprop("controls/flight/flap-txt", " "); - -controls.flapsDown = func(step) { - if (step == 1) { - if (getprop("controls/flight/flap-lever") == 0) { - if (getprop("velocities/airspeed-kt") <= 100) { - setprop("controls/flight/flaps", 0.2857); - setprop("controls/flight/slats", 0.6666); - setprop("controls/flight/flap-lever", 1); - setprop("controls/flight/flap-pos", 2); - setprop("controls/flight/flap-txt", "1+F"); - flaptimer.start(); - return; - } else { - setprop("controls/flight/flaps", 0.000); - setprop("controls/flight/slats", 0.6666); - setprop("controls/flight/flap-lever", 1); - setprop("controls/flight/flap-pos", 1); - setprop("controls/flight/flap-txt", "1"); - flaptimer.stop(); - return; - } - } else if (getprop("controls/flight/flap-lever") == 1) { - setprop("controls/flight/flaps", 0.4286); - setprop("controls/flight/slats", 0.8148); - setprop("controls/flight/flap-lever", 2); - setprop("controls/flight/flap-pos", 3); - setprop("controls/flight/flap-txt", "2"); - flaptimer.stop(); - return; - } else if (getprop("controls/flight/flap-lever") == 2) { - setprop("controls/flight/flaps", 0.5714); - setprop("controls/flight/slats", 0.8148); - setprop("controls/flight/flap-lever", 3); - setprop("controls/flight/flap-pos", 4); - setprop("controls/flight/flap-txt", "3"); - flaptimer.stop(); - return; - } else if (getprop("controls/flight/flap-lever") == 3) { - setprop("controls/flight/flaps", 1.000); - setprop("controls/flight/slats", 1.000); - setprop("controls/flight/flap-lever", 4); - setprop("controls/flight/flap-pos", 5); - setprop("controls/flight/flap-txt", "FULL"); - flaptimer.stop(); - return; - } - } else if (step == -1) { - if (getprop("controls/flight/flap-lever") == 4) { - setprop("controls/flight/flaps", 0.5714); - setprop("controls/flight/slats", 0.8148); - setprop("controls/flight/flap-lever", 3); - setprop("controls/flight/flap-pos", 4); - setprop("controls/flight/flap-txt", "3"); - flaptimer.stop(); - return; - } else if (getprop("controls/flight/flap-lever") == 3) { - setprop("controls/flight/flaps", 0.4286); - setprop("controls/flight/slats", 0.8148); - setprop("controls/flight/flap-lever", 2); - setprop("controls/flight/flap-pos", 3); - setprop("controls/flight/flap-txt", "2"); - flaptimer.stop(); - return; - } else if (getprop("controls/flight/flap-lever") == 2) { - if (getprop("velocities/airspeed-kt") <= 100) { - setprop("controls/flight/flaps", 0.2857); - setprop("controls/flight/slats", 0.6666); - setprop("controls/flight/flap-lever", 1); - setprop("controls/flight/flap-pos", 2); - setprop("controls/flight/flap-txt", "1+F"); - flaptimer.start(); - return; - } else { - setprop("controls/flight/flaps", 0.000); - setprop("controls/flight/slats", 0.6666); - setprop("controls/flight/flap-lever", 1); - setprop("controls/flight/flap-pos", 1); - setprop("controls/flight/flap-txt", "1"); - flaptimer.stop(); - return; - } - } else if (getprop("controls/flight/flap-lever") == 1) { - setprop("controls/flight/flaps", 0.000); - setprop("controls/flight/slats", 0.000); - setprop("controls/flight/flap-lever", 0); - setprop("controls/flight/flap-pos", 0); - setprop("controls/flight/flap-txt", " "); - flaptimer.stop(); - return; - } - } else { - return 0; - } -} - -var flaptimer = maketimer(0.5, func { - if (getprop("controls/flight/flap-pos") == 2 and getprop("velocities/airspeed-kt") >= 208) { - setprop("controls/flight/flaps", 0.000); - setprop("controls/flight/slats", 0.666); - setprop("controls/flight/flap-lever", 1); - setprop("controls/flight/flap-pos", 1); - setprop("controls/flight/flap-txt", "1"); - flaptimer.stop(); - } -}); - controls.stepSpoilers = func(step) { - setprop("controls/flight/speedbrake-arm", 0); + setprop("/controls/flight/speedbrake-arm", 0); if (step == 1) { deploySpeedbrake(); } else if (step == -1) { @@ -442,100 +330,128 @@ controls.stepSpoilers = func(step) { } var deploySpeedbrake = func { - if (getprop("gear/gear[1]/wow") == 1 or getprop("gear/gear[2]/wow") == 1) { - if (getprop("controls/flight/speedbrake") < 1.0) { - setprop("controls/flight/speedbrake", 1.0); + if (getprop("/gear/gear[1]/wow") == 1 or getprop("/gear/gear[2]/wow") == 1) { + if (getprop("/controls/flight/speedbrake") < 1.0) { + setprop("/controls/flight/speedbrake", 1.0); } } else { - if (getprop("controls/flight/speedbrake") < 0.5) { - setprop("controls/flight/speedbrake", 0.5); - } else if (getprop("controls/flight/speedbrake") < 1.0) { - setprop("controls/flight/speedbrake", 1.0); + if (getprop("/controls/flight/speedbrake") < 0.5) { + setprop("/controls/flight/speedbrake", 0.5); + } else if (getprop("/controls/flight/speedbrake") < 1.0) { + setprop("/controls/flight/speedbrake", 1.0); } } } var retractSpeedbrake = func { - if (getprop("gear/gear[1]/wow") == 1 or getprop("gear/gear[2]/wow") == 1) { - if (getprop("controls/flight/speedbrake") > 0.0) { - setprop("controls/flight/speedbrake", 0.0); + if (getprop("/gear/gear[1]/wow") == 1 or getprop("/gear/gear[2]/wow") == 1) { + if (getprop("/controls/flight/speedbrake") > 0.0) { + setprop("/controls/flight/speedbrake", 0.0); } } else { - if (getprop("controls/flight/speedbrake") > 0.5) { - setprop("controls/flight/speedbrake", 0.5); - } else if (getprop("controls/flight/speedbrake") > 0.0) { - setprop("controls/flight/speedbrake", 0.0); + if (getprop("/controls/flight/speedbrake") > 0.5) { + setprop("/controls/flight/speedbrake", 0.5); + } else if (getprop("/controls/flight/speedbrake") > 0.0) { + setprop("/controls/flight/speedbrake", 0.0); } } } var slewProp = func(prop, delta) { - delta *= getprop("sim/time/delta-realtime-sec"); + delta *= getprop("/sim/time/delta-realtime-sec"); setprop(prop, getprop(prop) + delta); return getprop(prop); } +controls.flapsDown = func(step) { + pts.Controls.Flight.flapsTemp = pts.Controls.Flight.flaps.getValue(); + if (step == 1) { + if (pts.Controls.Flight.flapsTemp < 0.2) { + pts.Controls.Flight.flaps.setValue(0.2); + } else if (pts.Controls.Flight.flapsTemp < 0.4) { + pts.Controls.Flight.flaps.setValue(0.4); + } else if (pts.Controls.Flight.flapsTemp < 0.6) { + pts.Controls.Flight.flaps.setValue(0.6); + } else if (pts.Controls.Flight.flapsTemp < 0.8) { + pts.Controls.Flight.flaps.setValue(0.8); + } + } else if (step == -1) { + if (pts.Controls.Flight.flapsTemp > 0.6) { + pts.Controls.Flight.flaps.setValue(0.6); + } else if (pts.Controls.Flight.flapsTemp > 0.4) { + pts.Controls.Flight.flaps.setValue(0.4); + } else if (pts.Controls.Flight.flapsTemp > 0.2) { + pts.Controls.Flight.flaps.setValue(0.2); + } else if (pts.Controls.Flight.flapsTemp > 0) { + pts.Controls.Flight.flaps.setValue(0); + } + } +} + + controls.elevatorTrim = func(speed) { - if (getprop("systems/hydraulic/green-psi") >= 1500) { - slewProp("/controls/flight/elevator-trim", speed * 0.045); + if (getprop("/systems/hydraulic/green-psi") >= 1500) { + slewprop("/controls/flight/elevator-trim", speed * 0.0185); # Rate in JSB normalized (0.25 / 13.5) + } else { + slewprop("/controls/flight/elevator-trim", speed * 0.0092); # Rate in JSB normalized (0.125 / 13.5) } } setlistener("/controls/flight/elevator-trim", func { - if (getprop("controls/flight/elevator-trim") > 0.32) { - setprop("controls/flight/elevator-trim", 0.32); + if (getprop("/controls/flight/elevator-trim") > 0.296296) { + setprop("/controls/flight/elevator-trim", 0.296296); } }); var lightsLoop = maketimer(0.2, func { - gear = getprop("gear/gear[0]/position-norm"); - nose_lights = getprop("sim/model/lights/nose-lights"); - settingT = getprop("controls/lighting/taxi-light-switch"); - domeSetting = getprop("controls/lighting/dome-norm"); + gear = getprop("/gear/gear[0]/position-norm"); + nose_lights = getprop("/sim/model/lights/nose-lights"); + settingT = getprop("/controls/lighting/taxi-light-switch"); + domeSetting = getprop("/controls/lighting/dome-norm"); # nose lights - if (settingT == 0.5 and gear > 0.9 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0)) { - setprop("sim/model/lights/nose-lights", 0.85); - } else if (settingT == 1 and gear > 0.9 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0)) { - setprop("sim/model/lights/nose-lights", 1); + if (settingT == 0.5 and gear > 0.9 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0)) { + setprop("/sim/model/lights/nose-lights", 0.85); + } else if (settingT == 1 and gear > 0.9 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0)) { + setprop("/sim/model/lights/nose-lights", 1); } else { - setprop("sim/model/lights/nose-lights", 0); + setprop("/sim/model/lights/nose-lights", 0); } # turnoff lights - settingTurnoff = getprop("controls/lighting/turnoff-light-switch"); + settingTurnoff = getprop("/controls/lighting/turnoff-light-switch"); left_turnoff_light = props.globals.getNode("controls/lighting/leftturnoff"); right_turnoff_light = props.globals.getNode("controls/lighting/rightturnoff"); - if (settingTurnoff == 1 and gear > 0.9 and getprop("systems/electrical/bus/ac-1") > 0) { + if (settingTurnoff == 1 and gear > 0.9 and getprop("/systems/electrical/bus/ac-1") > 0) { left_turnoff_light.setBoolValue(1); } else { left_turnoff_light.setBoolValue(0); } - if (settingTurnoff == 1 and gear > 0.9 and getprop("systems/electrical/bus/ac-2") > 0) { + if (settingTurnoff == 1 and gear > 0.9 and getprop("/systems/electrical/bus/ac-2") > 0) { right_turnoff_light.setBoolValue(1); } else { right_turnoff_light.setBoolValue(0); } # logo and navigation lights - setting = getprop("controls/lighting/nav-lights-switch"); + setting = getprop("/controls/lighting/nav-lights-switch"); nav_lights = props.globals.getNode("sim/model/lights/nav-lights"); logo_lights = props.globals.getNode("sim/model/lights/logo-lights"); - wow = getprop("gear/gear[2]/wow"); - slats = getprop("controls/flight/slats"); + wow = getprop("/gear/gear[2]/wow"); + slats = getprop("/controls/flight/slats"); - if (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0 or getprop("systems/electrical/bus/dc-1") > 0 or getprop("systems/electrical/bus/dc-2") > 0) { - setprop("systems/electrical/nav-lights-power", 1); + if (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0 or getprop("/systems/electrical/bus/dc-1") > 0 or getprop("/systems/electrical/bus/dc-2") > 0) { + setprop("/systems/electrical/nav-lights-power", 1); } else { - setprop("systems/electrical/nav-lights-power", 0); + setprop("/systems/electrical/nav-lights-power", 0); } if (setting == 0 and logo_lights == 1) { logo_lights.setBoolValue(0); - } else if (setting == 1 or setting == 2 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0)) { + } else if (setting == 1 or setting == 2 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0)) { if ((wow) or (!wow and slats > 0)) { logo_lights.setBoolValue(1); } else { @@ -545,15 +461,15 @@ var lightsLoop = maketimer(0.2, func { logo_lights.setBoolValue(0); } - if (setting == 1 or setting == 2 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0 or getprop("systems/electrical/bus/dc-1") > 0 or getprop("systems/electrical/bus/dc-2") > 0)) { + if (setting == 1 or setting == 2 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0 or getprop("/systems/electrical/bus/dc-1") > 0 or getprop("/systems/electrical/bus/dc-2") > 0)) { nav_lights.setBoolValue(1); } else { nav_lights.setBoolValue(0); } - if (domeSetting == 0.5 and getprop("systems/electrical/bus/dc-ess") > 0) { + if (domeSetting == 0.5 and getprop("/systems/electrical/bus/dc-ess") > 0) { dome_light.setValue(0.5); - } elsif (domeSetting == 1 and getprop("systems/electrical/bus/dc-ess") > 0) { + } elsif (domeSetting == 1 and getprop("/systems/electrical/bus/dc-ess") > 0) { dome_light.setValue(1); } else { dome_light.setValue(0); @@ -562,9 +478,9 @@ var lightsLoop = maketimer(0.2, func { # strobe strobe_sw = strobe_switch.getValue(); - if (strobe_sw == 1 and getprop("systems/electrical/bus/ac-2") > 0) { + if (strobe_sw == 1 and getprop("/systems/electrical/bus/ac-2") > 0) { strobe_light.setValue(1); - } elsif (strobe_sw == 0.5 and getprop("gear/gear[1]/wow") == 0 and getprop("gear/gear[2]/wow") == 0 and getprop("systems/electrical/bus/ac-2") > 0) { + } elsif (strobe_sw == 0.5 and getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0 and getprop("/systems/electrical/bus/ac-2") > 0) { # todo: use lgciu output 5 strobe_light.setValue(1); } else { @@ -573,7 +489,7 @@ var lightsLoop = maketimer(0.2, func { # beacon - if (beacon_switch.getValue() == 1 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0)) { + if (beacon_switch.getValue() == 1 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0)) { beacon_ctl.setValue(1); } else { beacon_ctl.setValue(0); @@ -581,7 +497,7 @@ var lightsLoop = maketimer(0.2, func { # wing - if (wing_switch.getValue() == 1 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0)) { + if (wing_switch.getValue() == 1 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0)) { wing_ctl.setValue(1); } else { wing_ctl.setValue(0); @@ -589,13 +505,13 @@ var lightsLoop = maketimer(0.2, func { # landL - if (landlSw.getValue() == 1 and getprop("systems/electrical/bus/ac-1") > 0) { + if (landlSw.getValue() == 1 and getprop("/systems/electrical/bus/ac-1") > 0) { landL.setValue(1); } else { landL.setValue(0); } - if (landrSw.getValue() == 1 and getprop("systems/electrical/bus/ac-2") > 0) { + if (landrSw.getValue() == 1 and getprop("/systems/electrical/bus/ac-2") > 0) { landR.setValue(1); } else { landR.setValue(0); @@ -603,48 +519,48 @@ var lightsLoop = maketimer(0.2, func { # signs - if (getprop("systems/pressurization/cabinalt-norm") > 11300) { - setprop("controls/lighting/seatbelt-sign", 1); - setprop("controls/lighting/no-smoking-sign", 1); + if (getprop("/systems/pressurization/cabinalt-norm") > 11300) { + setprop("/controls/lighting/seatbelt-sign", 1); + setprop("/controls/lighting/no-smoking-sign", 1); } else { - if (getprop("controls/switches/seatbelt-sign") == 1) { - if (getprop("controls/lighting/seatbelt-sign") == 0) { - setprop("controls/lighting/seatbelt-sign", 1); + if (getprop("/controls/switches/seatbelt-sign") == 1) { + if (getprop("/controls/lighting/seatbelt-sign") == 0) { + setprop("/controls/lighting/seatbelt-sign", 1); } - } elsif (getprop("controls/switches/seatbelt-sign") == 0) { - if (getprop("controls/lighting/seatbelt-sign") == 1) { - setprop("controls/lighting/seatbelt-sign", 0); + } elsif (getprop("/controls/switches/seatbelt-sign") == 0) { + if (getprop("/controls/lighting/seatbelt-sign") == 1) { + setprop("/controls/lighting/seatbelt-sign", 0); } } - if (getprop("controls/switches/no-smoking-sign") == 1) { - if (getprop("controls/lighting/no-smoking-sign") == 0) { - setprop("controls/lighting/no-smoking-sign", 1); + if (getprop("/controls/switches/no-smoking-sign") == 1) { + if (getprop("/controls/lighting/no-smoking-sign") == 0) { + setprop("/controls/lighting/no-smoking-sign", 1); } - } elsif (getprop("controls/switches/no-smoking-sign") == 0.5 and getprop("gear/gear[0]/position-norm") != 0) { # todo: should be when uplocks not engaged - if (getprop("controls/lighting/no-smoking-sign") == 0) { - setprop("controls/lighting/no-smoking-sign", 1); + } elsif (getprop("/controls/switches/no-smoking-sign") == 0.5 and getprop("/gear/gear[0]/position-norm") != 0) { # todo: should be when uplocks not engaged + if (getprop("/controls/lighting/no-smoking-sign") == 0) { + setprop("/controls/lighting/no-smoking-sign", 1); } } else { - setprop("controls/lighting/no-smoking-sign", 0); # sign stays on in cabin but sound still occurs + setprop("/controls/lighting/no-smoking-sign", 0); # sign stays on in cabin but sound still occurs } } - if (getprop("controls/lighting/landing-lights[1]") >= 0.5) { - setprop("fdm/jsbsim/rubbish/landL", 1); + if (getprop("/controls/lighting/landing-lights[1]") >= 0.5) { + setprop("/fdm/jsbsim/rubbish/landL", 1); } else { - setprop("fdm/jsbsim/rubbish/landL", 0); + setprop("/fdm/jsbsim/rubbish/landL", 0); } - if (getprop("controls/lighting/landing-lights[2]") >= 0.5) { - setprop("fdm/jsbsim/rubbish/landR", 1); + if (getprop("/controls/lighting/landing-lights[2]") >= 0.5) { + setprop("/fdm/jsbsim/rubbish/landR", 1); } else { - setprop("fdm/jsbsim/rubbish/landR", 0); + setprop("/fdm/jsbsim/rubbish/landR", 0); } }); var lTray = func { - var lTrayCMD = getprop("controls/tray/lefttrayext"); + var lTrayCMD = getprop("/controls/tray/lefttrayext"); if (lTrayCMD < 0.5) { interpolate("/controls/tray/lefttrayext", 0.5, 0.5); } else if (lTrayCMD == 0.5) { @@ -655,7 +571,7 @@ var lTray = func { } var rTray = func { - var rTrayCMD = getprop("controls/tray/righttrayext"); + var rTrayCMD = getprop("/controls/tray/righttrayext"); if (rTrayCMD < 0.5) { interpolate("/controls/tray/righttrayext", 0.5, 0.5); } else if (rTrayCMD == 0.5) { @@ -666,7 +582,7 @@ var rTray = func { } var l1Pedal = func { - var lPedalCMD = getprop("controls/footrest-cpt[0]"); + var lPedalCMD = getprop("/controls/footrest-cpt[0]"); if (lPedalCMD < 1.0) { interpolate("/controls/footrest-cpt[0]", 1.0, 0.5); } else { @@ -675,7 +591,7 @@ var l1Pedal = func { } var l2Pedal = func { - var l2PedalCMD = getprop("controls/footrest-cpt[1]"); + var l2PedalCMD = getprop("/controls/footrest-cpt[1]"); if (l2PedalCMD < 1.0) { interpolate("/controls/footrest-cpt[1]", 1.0, 0.5); } else { @@ -684,7 +600,7 @@ var l2Pedal = func { } var r1Pedal = func { - var rPedalCMD = getprop("controls/footrest-fo[0]"); + var rPedalCMD = getprop("/controls/footrest-fo[0]"); if (rPedalCMD < 1.0) { interpolate("/controls/footrest-fo[0]", 1.0, 0.5); } else { @@ -693,7 +609,7 @@ var r1Pedal = func { } var r2Pedal = func { - var r2PedalCMD = getprop("controls/footrest-fo[1]"); + var r2PedalCMD = getprop("/controls/footrest-fo[1]"); if (r2PedalCMD < 1.0) { interpolate("/controls/footrest-fo[1]", 1.0, 0.5); } else { @@ -701,13 +617,13 @@ var r2Pedal = func { } } -if (getprop("controls/flight/auto-coordination") == 1) { - setprop("controls/flight/auto-coordination", 0); +if (getprop("/controls/flight/auto-coordination") == 1) { + setprop("/controls/flight/auto-coordination", 0); print("System: Auto Coordination has been turned off as it is not compatible with the fly-by-wire of this aircraft."); screen.log.write("Auto Coordination has been disabled as it is not compatible with the fly-by-wire of this aircraft", 1, 0, 0); } -setprop("controls/flight/aileron-drives-tiller", 0); +setprop("/controls/flight/aileron-drives-tiller", 0); var APPanel = { APDisc: func() { @@ -719,15 +635,15 @@ var APPanel = { }; var resetView = func() { - if (getprop("sim/current-view/view-number") == 0) { - if (getprop("sim/rendering/headshake/enabled")) { + if (getprop("/sim/current-view/view-number") == 0) { + if (getprop("/sim/rendering/headshake/enabled")) { var _shakeFlag = 1; - setprop("sim/rendering/headshake/enabled", 0); + setprop("/sim/rendering/headshake/enabled", 0); } else { var _shakeFlag = 0; } - var hd = getprop("sim/current-view/heading-offset-deg"); + var hd = getprop("/sim/current-view/heading-offset-deg"); var hd_t = 360; if (hd < 180) { hd_t = hd_t - 360; @@ -742,21 +658,21 @@ var resetView = func() { interpolate("sim/current-view/z-offset-m", -13.75, 0.66); if (_shakeFlag) { - setprop("sim/rendering/headshake/enabled", 1); + setprop("/sim/rendering/headshake/enabled", 1); } } } var autopilotView = func() { - if (getprop("sim/current-view/view-number") == 0) { - if (getprop("sim/rendering/headshake/enabled")) { + if (getprop("/sim/current-view/view-number") == 0) { + if (getprop("/sim/rendering/headshake/enabled")) { var _shakeFlag = 1; - setprop("sim/rendering/headshake/enabled", 0); + setprop("/sim/rendering/headshake/enabled", 0); } else { var _shakeFlag = 0; } - var hd = getprop("sim/current-view/heading-offset-deg"); + var hd = getprop("/sim/current-view/heading-offset-deg"); var hd_t = 341.7; if (hd < 180) { hd_t = hd_t - 360; @@ -771,21 +687,21 @@ var autopilotView = func() { interpolate("sim/current-view/z-offset-m", -13.75, 0.66); if (_shakeFlag) { - setprop("sim/rendering/headshake/enabled", 1); + setprop("/sim/rendering/headshake/enabled", 1); } } } var overheadView = func() { - if (getprop("sim/current-view/view-number") == 0) { - if (getprop("sim/rendering/headshake/enabled")) { + if (getprop("/sim/current-view/view-number") == 0) { + if (getprop("/sim/rendering/headshake/enabled")) { var _shakeFlag = 1; - setprop("sim/rendering/headshake/enabled", 0); + setprop("/sim/rendering/headshake/enabled", 0); } else { var _shakeFlag = 0; } - var hd = getprop("sim/current-view/heading-offset-deg"); + var hd = getprop("/sim/current-view/heading-offset-deg"); var hd_t = 348; if (hd < 180) { hd_t = hd_t - 360; @@ -800,21 +716,21 @@ var overheadView = func() { interpolate("sim/current-view/z-offset-m", -13.75, 0.66); if (_shakeFlag) { - setprop("sim/rendering/headshake/enabled", 1); + setprop("/sim/rendering/headshake/enabled", 1); } } } var pedestalView = func() { - if (getprop("sim/current-view/view-number") == 0) { - if (getprop("sim/rendering/headshake/enabled")) { + if (getprop("/sim/current-view/view-number") == 0) { + if (getprop("/sim/rendering/headshake/enabled")) { var _shakeFlag = 1; - setprop("sim/rendering/headshake/enabled", 0); + setprop("/sim/rendering/headshake/enabled", 0); } else { var _shakeFlag = 0; } - var hd = getprop("sim/current-view/heading-offset-deg"); + var hd = getprop("/sim/current-view/heading-offset-deg"); var hd_t = 315; if (hd < 180) { hd_t = hd_t - 360; @@ -829,21 +745,21 @@ var pedestalView = func() { interpolate("sim/current-view/z-offset-m", -13.75, 0.66); if (_shakeFlag) { - setprop("sim/rendering/headshake/enabled", 1); + setprop("/sim/rendering/headshake/enabled", 1); } } } var lightsView = func() { - if (getprop("sim/current-view/view-number") == 0) { - if (getprop("sim/rendering/headshake/enabled")) { + if (getprop("/sim/current-view/view-number") == 0) { + if (getprop("/sim/rendering/headshake/enabled")) { var _shakeFlag = 1; - setprop("sim/rendering/headshake/enabled", 0); + setprop("/sim/rendering/headshake/enabled", 0); } else { var _shakeFlag = 0; } - var hd = getprop("sim/current-view/heading-offset-deg"); + var hd = getprop("/sim/current-view/heading-offset-deg"); var hd_t = 329; if (hd < 180) { hd_t = hd_t - 360; @@ -858,9 +774,9 @@ var lightsView = func() { interpolate("sim/current-view/z-offset-m", -13.75, 0.66); if (_shakeFlag) { - setprop("sim/rendering/headshake/enabled", 1); + setprop("/sim/rendering/headshake/enabled", 1); } } } -setprop("systems/acconfig/libraries-loaded", 1); +setprop("/systems/acconfig/libraries-loaded", 1); diff --git a/Nasal/Libraries/property-tree-setup.nas b/Nasal/Libraries/property-tree-setup.nas index c6fa9032..8ef19c72 100644 --- a/Nasal/Libraries/property-tree-setup.nas +++ b/Nasal/Libraries/property-tree-setup.nas @@ -26,6 +26,9 @@ var Controls = { }, Flight: { aileron: props.globals.getNode("/controls/flight/aileron"), + flaps: props.globals.getNode("/controls/flight/flaps"), + flapsTemp: 0, + flapsPos: props.globals.getNode("/controls/flight/flaps-pos"), }, Gear: { gearDown: props.globals.getNode("/controls/gear/gear-down"), diff --git a/Nasal/Systems/FADEC/fadec-common.nas b/Nasal/Systems/FADEC/fadec-common.nas index d4f082ab..6efdbc83 100644 --- a/Nasal/Systems/FADEC/fadec-common.nas +++ b/Nasal/Systems/FADEC/fadec-common.nas @@ -271,7 +271,7 @@ var thrust_loop = maketimer(0.04, func { } alpha = getprop("fdm/jsbsim/aero/alpha-deg"); - flaps = getprop("controls/flight/flap-pos"); + flaps = getprop("controls/flight/flaps-pos"); if (flaps == 0) { alphaProt = 9.5; } else if (flaps == 1 or flaps == 2 or flaps == 3) { diff --git a/Systems/a320-fbw.xml b/Systems/a320-fbw.xml new file mode 100644 index 00000000..7dd5c0ba --- /dev/null +++ b/Systems/a320-fbw.xml @@ -0,0 +1,1346 @@ + + + + + + + + fbw/roll/pid + fbw/pitch/g-pi + fbw/pitch/pid + fbw/yaw/tc-pd + fbw/spoiler-output + fbw/mixer/sidestick-gain-feedback + + + fbw/roll/p-gain + fbw/roll/i-gain + fbw/roll/d-gain + fbw/pitch/p-gain + fbw/pitch/i-gain + fbw/pitch/d-gain + fbw/yaw/yd-p-gain + fbw/yaw/tc-p-gain + fbw/yaw/tc-d-gain + + + fbw/fmgc/roll-cmd + fbw/fmgc/pitch-cmd + fbw/fmgc/yaw-cmd + + + + + + + gear/unit[0]/WOW eq 1 + gear/unit[1]/WOW eq 1 + gear/unit[2]/WOW eq 1 + + + + + + + position/wow eq 1 + /it-fbw/law ne 0 + + + + + + + position/wow eq 1 + /it-fbw/law eq 2 + /it-fbw/law eq 3 + + + + + + + position/wow eq 1 + /it-fbw/law eq 2 + /it-fbw/law eq 3 + + + + + + + /it-autoflight/output/ap1 eq 1 + /it-autoflight/output/ap2 eq 1 + + + + + + + velocities/vc-kts + fbw/roll/gain-switch + + 0 1 + 140 -20.0 0.0 + 350 -5.0 0.0 + +
+
+
+ + + + + velocities/vc-kts + fbw/roll/gain-switch + + 0 1 + 140 -35.0 0.0 + 350 -10.0 0.0 + +
+
+
+ + + + + velocities/vc-kts + fbw/roll/gain-switch + + 0 1 + 140 -2.5 0.0 + 350 -0.5 0.0 + +
+
+
+ + + + + velocities/vc-kts + fbw/pitch/gain-switch + + 0 1 + 140 28 0 + 350 20 0 + +
+
+
+ + + + + velocities/vc-kts + fbw/pitch/gain-switch + + 0 1 + 140 60 0 + 350 40 0 + +
+
+
+ + + + + velocities/vc-kts + fbw/pitch/gain-switch + + 0 1 + 140 2.0 0.0 + 350 0.4 0.0 + +
+
+
+ + + + + velocities/vc-kts + fbw/yaw/gain-switch + + 0 1 + 140 -7.0 0.0 + 350 -1.2 0.0 + +
+
+
+ + + + + velocities/vc-kts + fbw/yaw/gain-switch + + 0 1 + 140 3.0 0.0 + 350 1.5 0.0 + +
+
+
+ + + + + velocities/vc-kts + fbw/yaw/gain-switch + + 0 1 + 140 6.0 0.0 + 350 3.0 0.0 + +
+
+
+ + + Use D only to calculate rate of IAS + velocities/vc-kts + 0.0 + 0.0 + 1.0 + + + + fbw/pitch/vc-kts-rate + 1.0 + + + + + + position/wow eq 1 + fbw/mixer/sidestick-gain-feedback eq 1 + + + position/wow eq 1 + fbw/mixer/sidestick-gain-feedback ne 1 + + + position/wow eq 0 + fbw/mixer/sidestick-gain-feedback eq 0 + + + + + position/wow + fbw/mixer/rate-limit + fbw/mixer/sidestick-gain-feedback + + + + + + fbw/mixer/sidestick-gain + + 0 1 + 1 0 + +
+
+
+ +
+ + + + + + + fbw/fmgc/enabled eq 1 + + + + + fbw/roll/a-i-f + + + -1 + + + + 1 + + + + /controls/flight/aileron-input-fast + + + + + + /controls/flight/aileron + + -1.00 -1 + -0.04 0 + 0.04 0 + 1.00 1 + +
+
+
+ + + + + fbw/fmgc/enabled eq 0 + + + position/wow eq 0 + fbw/fmgc/enabled eq 1 + + + + + fbw/roll/a-i-s + + + -1 + + + + 1 + + + + /controls/flight/aileron-input + + + + + + + fbw/roll/a-i + 0.261799 + + + attitude/roll-rad + fbw/roll/a-i + + -1 0 1 + -0.575959 0.261799 0.000000 0.000000 + -0.488692 0.000000 0.000000 0.000000 + 0.488692 0.000000 0.000000 0.000000 + 0.575959 0.000000 0.000000 -0.261799 + +
+ + attitude/roll-rad + + -0.750492 0.261799 + -0.575959 0.000000 + 0.575959 0.000000 + 0.750492 -0.261799 + +
+
+
+
+ + + + + + fbw/roll/a-i + 0.261799 + + + attitude/roll-rad + fbw/roll/a-i + + -1.0 0.0 1.0 + -1.169370 0.261799 0.000000 0.000000 + -1.082100 0.000000 0.000000 0.000000 + 1.082100 0.000000 0.000000 0.000000 + 1.169370 0.000000 0.000000 -0.261799 + +
+ + attitude/roll-rad + + -1.343900 0.261799 + -1.169370 0.000000 + 1.169370 0.000000 + 1.343900 -0.261799 + +
+
+
+
+ + + + + attitude/roll-rad + + -1.169370 0.436332 + -0.698132 0.174533 + -0.575959 0.000000 + 0.575959 0.000000 + 0.698132 -0.174533 + 1.169370 -0.436332 + +
+
+
+ + + + + attitude/roll-rad lt 0 + fbw/roll/r-r-33 ge fbw/roll/r-r-rb-f + + + attitude/roll-rad gt 0 + fbw/roll/r-r-33 le fbw/roll/r-r-rb-f + + + + + + + + fbw/roll/a-i + 0.261799 + + + attitude/roll-rad + fbw/roll/a-i + + -1 0 1 + -0.698132 0.261799 0.000000 0.000000 + -0.610865 0.000000 0.000000 0.000000 + 0.610865 0.000000 0.000000 0.000000 + 0.698132 0.000000 0.000000 -0.261799 + +
+
+
+
+ + + + + attitude/roll-rad + + -0.698132 0.436332 + -0.261799 0.174533 + 0.000000 0.000000 + 0.261799 -0.174533 + 0.698132 -0.436332 + +
+
+
+ + + + + /it-fbw/roll-lim eq 33 + /it-fbw/roll-back ne 1 + /it-fbw/protections/overspeed ne 1 + + + /it-fbw/roll-lim eq 67 + /it-fbw/protections/overspeed ne 1 + + + /it-fbw/roll-back eq 1 + /it-fbw/protections/overspeed ne 1 + + + /it-fbw/protections/overspeed eq 1 + /it-fbw/protections/overspeed-roll-back ne 1 + + + /it-fbw/protections/overspeed eq 1 + /it-fbw/protections/overspeed-roll-back eq 1 + + + + + fbw/roll/rate-demand + 16.4 + + + + + + /orientation/roll-rate-degps + + + + + + + + gear/unit[0]/WOW eq 1 + + + + + fbw/roll/p-r_s-s + -fbw/roll/rate-demand-lag + + + + + + fbw/roll/gain-switch gt 0 + + + fbw/roll/pid le -0.999 + fbw/roll/pid ge 0.999 + + + + + fbw/roll/rate-error + fbw/roll/p-gain + fbw/roll/i-gain + fbw/roll/d-gain + fbw/roll/trigger + + -1.0 + 1.0 + + fbw/roll/pid + + + + + + position/wow eq 1 + /it-fbw/law eq 1 + /it-fbw/law eq 2 + + + + + + + /orientation/roll-deg + -0.1 + + + + + + fbw/roll/pid + fbw/mixer/computer-gain + + + + fbw/roll/a-i-f + fbw/mixer/sidestick-gain + + + + fbw/mixer/roll/computer-demand + fbw/mixer/roll/sidestick-demand + + -1.0 + 1.0 + + + + + + + position/wow eq 0 + /it-fbw/law eq 0 + + + fbw/fmgc/enabled eq 0 + fbw/roll/gear-law-switch eq 1 + + + fbw/fmgc/enabled eq 1 + position/wow eq 1 + /it-fbw/law eq 0 + + + /it-fbw/law eq 3 + + + + + + + position/wow eq 0 + /it-fbw/law eq 0 + + + fbw/roll/gear-law-switch eq 1 + + + /it-fbw/law eq 3 + + + + + + + + fbw/roll/s-i-f-i + + -1.0 -1.0 + -0.2 0.0 + 0.2 0.0 + 1.0 1.0 + +
+ + velocities/vc-kts + position/wow + + 0 1 + 140 0.5 1.0 + 350 0.1 1.0 + +
+
+
+
+ + + + + /it-fbw/roll-back eq 0 + + + + + + + /it-fbw/law ne 3 + /systems/failures/aileron-left eq 0 + + + /it-fbw/law ne 3 + /systems/failures/aileron-left eq 1 + + + + + + + /it-fbw/law ne 3 + /systems/failures/aileron-right eq 0 + + + /it-fbw/law ne 3 + /systems/failures/aileron-right eq 1 + + + + + /controls/flight/aileron + 20 + + +
+ + + + + + + /it-fbw/law eq 0 + /it-fbw/protections/overspeed eq 1 + + + + + + + fbw/fmgc/enabled eq 1 + + + -1.0 + fbw/pitch/elevator-max + + + + + fbw/pitch/e-i-f + + + -1 + + + + 1 + + + + /controls/flight/elevator-input-fast + + + + + + /controls/flight/elevator + + -1.00 -1 + -0.04 0 + 0.04 0 + 1.00 1 + +
+
+
+ + + + + fbw/pitch/elevator-nul + + /position/gear-agl-ft + + 5 0.2 + 30 0.1 + +
+
+
+
+ + + + + fbw/pitch/elevator-nul + -0.15 + + + + + + + + gear/unit[1]/WOW eq 1 + gear/unit[2]/WOW eq 1 + + + + + + + fbw/fmgc/enabled eq 0 + /position/gear-agl-ft le 30 + /controls/flight/flaps-pos ge 4 + /controls/engines/engine[0]/throttle lt 0.65 + /controls/engines/engine[1]/throttle lt 0.65 + /FMGC/status/to-state eq 0 + /it-fbw/law eq 0 + position/wow eq 0 + + + fbw/fmgc/enabled eq 0 + /position/gear-agl-ft le 30 + /controls/flight/flaps-pos ge 4 + /controls/engines/engine[0]/throttle lt 0.65 + /controls/engines/engine[1]/throttle lt 0.65 + /FMGC/status/to-state eq 0 + /it-fbw/law eq 0 + gear/unit[0]/WOW eq 0 + fbw/pitch/flare-gear-switch eq 1 + + + fbw/fmgc/enabled eq 1 + position/wow eq 0 + + + fbw/fmgc/enabled eq 1 + position/wow eq 1 + + + -1.0 + fbw/pitch/elevator-max + + + + + fbw/pitch/e-i-s + + + -1 + + + + 1 + + + + /controls/flight/elevator-input + + + + + + /controls/flight/flaps-pos ne 0 + + + + + + + /controls/flight/flaps-pos ne 0 + + + + + + + fbw/pitch/e-i + + -1.0 2.5 + 0.0 1.0 + 1.0 -0.5 + +
+
+ + fbw/pitch/g-min + fbw/pitch/g-max + +
+ + + /accelerations/pilot-g + 1.0 + + + + + + fbw/pitch/g-instrumented + + -1 + + attitude/roll-rad + + + 1 + + + + + + fbw/pitch/g-computed + -fbw/pitch/g-demand + + + + + + fbw/pitch/g-pi + -1.0 + + + + + + attitude/roll-rad lt -1.5708 + attitude/roll-rad gt 1.5708 + + + + + + + + + + fbw/pitch/g-pi-switched + -0.087266 + + + attitude/pitch-rad + fbw/pitch/g-pi-switched + + -1 0 1 + -0.261799 0.000000 0.000000 0.087266 + -0.174533 0.000000 0.000000 0.000000 + 0.436332 0.000000 0.000000 0.000000 + 0.523599 -0.087266 0.000000 0.000000 + +
+ + attitude/pitch-rad + + -0.436332 0.087266 + -0.261799 0.000000 + 0.523599 0.000000 + 0.698132 -0.087266 + +
+
+
+
+ + + fbw/pitch/g-pi-switched + -0.087266 + + + + + + + fbw/pitch/g-pi-switched + fbw/pitch/vc-kts-rate-lag + + -2 -1 + -1.0 0.087266 0.087266 + 0.0 0.000000 0.026180 + +
+ + attitude/pitch-rad + fbw/pitch/g-pi-switched + + -1 0 + 0.436332 -0.026180 0.000000 + 0.523599 -0.087266 0.000000 + +
+ + attitude/pitch-rad + + 0.523599 0.000000 + 0.698132 -0.087266 + +
+
+
+
+ + + + + fbw/pitch/g-pi-switched + fbw/pitch/vc-kts-rate-lag + + -2 -1 + -1.0 0.087266 0.087266 + 0.0 0.000000 0.026180 + 1.0 -0.061086 -0.087266 + +
+
+
+ + + + + /it-fbw/law eq 0 + /it-fbw/protections/overspeed ne 1 + + + /it-fbw/law ne 0 + /it-fbw/protections/overspeed ne 1 + + + /it-fbw/law eq 0 + /it-fbw/protections/overspeed eq 1 + + + /it-fbw/law ne 0 + /it-fbw/protections/overspeed eq 1 + + + + + fbw/pitch/rate-demand + 10.1 + + + + + + /orientation/pitch-rate-degps + + + + + + + + gear/unit[0]/WOW eq 1 + + + + + fbw/pitch/t-r_s-s + -fbw/pitch/rate-demand-lag + + + + + + fbw/pitch/gain-switch gt 0 + + + fbw/pitch/pid le -0.999 + fbw/pitch/pid ge 0.999 + + + + + fbw/pitch/rate-error + fbw/pitch/p-gain + fbw/pitch/i-gain + fbw/pitch/d-gain + fbw/pitch/trigger + + -1.0 + 1.0 + + fbw/pitch/pid + + + + fbw/pitch/pid + -1.0 + + + + + + attitude/roll-rad lt -1.5708 + attitude/roll-rad gt 1.5708 + + + + + + + /it-fbw/law eq 0 + /it-fbw/law eq 1 + + + + + + + gear/unit[1]/WOW eq 1 + gear/unit[2]/WOW eq 1 + /it-fbw/law eq 2 + + + + + fbw/pitch/pid-switched + fbw/mixer/computer-gain + + + + fbw/pitch/e-i-f + fbw/mixer/sidestick-gain + + + + fbw/mixer/pitch/computer-demand + fbw/mixer/pitch/sidestick-demand + + -1.0 + 1.0 + + + + + + + position/wow eq 0 + fbw/pitch/law-switch eq 1 + + + fbw/fmgc/enabled eq 0 + fbw/pitch/law-gear-switch eq 1 + + + fbw/fmgc/enabled eq 1 + position/wow eq 1 + gear/unit[0]/WOW eq 0 + + + fbw/fmgc/enabled eq 1 + position/wow eq 1 + + + /it-fbw/law eq 3 + + + + + /controls/flight/elevator + 20 + + + + + + fbw/fmgc/enabled eq 1 + + + + + + + fbw/pitch/gain-switch eq 0 + /position/gear-agl-ft ge fbw/pitch/autotrim-height + attitude/roll-rad lt 0.628319 + attitude/roll-rad gt -0.628319 + fbw/pitch/pid-switched ge 0.01 + fbw/pitch/g-instrumented ge 0.5 + /it-fbw/protections/overspeed ne 1 + /controls/flight/elevator-trim le 0.32 + position/wow eq 0 + + + fbw/pitch/gain-switch eq 0 + /position/gear-agl-ft ge fbw/pitch/autotrim-height + attitude/roll-rad lt 0.628319 + attitude/roll-rad gt -0.628319 + fbw/pitch/pid-switched le -0.01 + fbw/pitch/g-instrumented ge 0.5 + /it-fbw/protections/overspeed ne 1 + /controls/flight/elevator-trim ge -1.0 + position/wow eq 0 + + + + + + + + + fbw/pitch/autotrim-switch + 1 + + + fbw/pitch/pid-switched + + 0.05 0.00001 + 0.30 0.00015 + +
+ 0.0 +
+ + + fbw/pitch/autotrim-switch + 2 + + + fbw/pitch/pid-switched + + -0.30 -0.00015 + -0.05 -0.00001 + +
+ 0.0 +
+
+
+
+ + + + + /controls/flight/elevator-trim + fbw/pitch/autotrim-offset + + + + -1.0 + 0.32 + + /controls/flight/elevator-trim + + +
+ + + + + + + velocities/vc-kts + + 160 25.0 + 410 3.5 + +
+
+
+ + + + + /systems/fctl/fac1 eq 1 + /systems/fctl/fac2 eq 1 + /gear/gear[1]/wow eq 0 + /gear/gear[2]/wow eq 0 + + + /controls/flight/flaps eq 0 + /gear/gear[1]/wow eq 0 + /gear/gear[2]/wow eq 0 + + + + + fbw/yaw/max-deg-switch + + -25 + 25 + + + -1 + 1 + + + + + fbw/yaw/max-deg-scale + -1.0 + + + + + + /controls/flight/rudder + fbw/fmgc/enabled + + 0 1 + -1.00 -1 0 + -0.04 0 0 + 0.04 0 0 + 1.00 1 0 + +
+
+
+ + + + + + fbw/yaw/rudder-nul + fbw/yaw/max-deg-switch + + 25.0 + + + + + + + + fbw/fmgc/enabled eq 1 + /it-autoflight/output/lat eq 4 + + + + + velocities/r-rad_sec + 0.5 + + + + + + position/wow eq 1 + /position/gear-agl-ft lt 50 + fbw/yaw/autoland-switch eq 1 + + + + + fbw/yaw/r-r_s-s + fbw/yaw/yd-p-gain + + -0.5 + 0.5 + + + + + + + position/wow eq 1 + fbw/yaw/rudder-nul gt 0 + fbw/yaw/rudder-nul lt 0 + + + + + fbw/yaw/slip-skid + fbw/yaw/tc-p-gain + 0.0 + fbw/yaw/tc-d-gain + + -0.4 + 0.4 + + fbw/yaw/tc-pd + + + + + + position/wow eq 1 + fbw/yaw/rudder-nul gt 0 + fbw/yaw/rudder-nul lt 0 + + + + + + + fbw/yaw/autoland-switch eq 1 + + + + + fbw/yaw/yd-f + fbw/yaw/tc-pd-s + fbw/yaw/fmgc-cmd + + + + + + /it-fbw/law eq 0 + /it-fbw/law eq 1 + + + + + + + fbw/yaw/law-switch eq 1 + fbw/yaw/rudder-nul eq 0 + + /controls/flight/rudder-fbw + + + + /controls/flight/rudder + 20 + + +
+ +
diff --git a/Systems/a320-fcs.xml b/Systems/a320-fcs.xml index 04b03cfa..2d9efa85 100644 --- a/Systems/a320-fcs.xml +++ b/Systems/a320-fcs.xml @@ -1,1372 +1,11 @@ - + + - fbw/roll/pid - fbw/pitch/g-pi - fbw/pitch/pid - fbw/yaw/tc-pd - fbw/spoiler-output - fbw/mixer/sidestick-gain-feedback - - - fbw/roll/p-gain - fbw/roll/i-gain - fbw/roll/d-gain - fbw/pitch/p-gain - fbw/pitch/i-gain - fbw/pitch/d-gain - fbw/yaw/yd-p-gain - fbw/yaw/tc-p-gain - fbw/yaw/tc-d-gain - - - fbw/fmgc/roll-cmd - fbw/fmgc/pitch-cmd - fbw/fmgc/yaw-cmd - - - - - - - gear/unit[0]/WOW eq 1 - gear/unit[1]/WOW eq 1 - gear/unit[2]/WOW eq 1 - - - - - - - position/wow eq 1 - /it-fbw/law ne 0 - - - - - - - position/wow eq 1 - /it-fbw/law eq 2 - /it-fbw/law eq 3 - - - - - - - position/wow eq 1 - /it-fbw/law eq 2 - /it-fbw/law eq 3 - - - - - - - /it-autoflight/output/ap1 eq 1 - /it-autoflight/output/ap2 eq 1 - - - - - - - velocities/vc-kts - fbw/roll/gain-switch - - 0 1 - 140 -20.0 0.0 - 350 -5.0 0.0 - -
-
-
- - - - - velocities/vc-kts - fbw/roll/gain-switch - - 0 1 - 140 -35.0 0.0 - 350 -10.0 0.0 - -
-
-
- - - - - velocities/vc-kts - fbw/roll/gain-switch - - 0 1 - 140 -2.5 0.0 - 350 -0.5 0.0 - -
-
-
- - - - - velocities/vc-kts - fbw/pitch/gain-switch - - 0 1 - 140 28 0 - 350 20 0 - -
-
-
- - - - - velocities/vc-kts - fbw/pitch/gain-switch - - 0 1 - 140 60 0 - 350 40 0 - -
-
-
- - - - - velocities/vc-kts - fbw/pitch/gain-switch - - 0 1 - 140 2.0 0.0 - 350 0.4 0.0 - -
-
-
- - - - - velocities/vc-kts - fbw/yaw/gain-switch - - 0 1 - 140 -7.0 0.0 - 350 -1.2 0.0 - -
-
-
- - - - - velocities/vc-kts - fbw/yaw/gain-switch - - 0 1 - 140 3.0 0.0 - 350 1.5 0.0 - -
-
-
- - - - - velocities/vc-kts - fbw/yaw/gain-switch - - 0 1 - 140 6.0 0.0 - 350 3.0 0.0 - -
-
-
- - - Use D only to calculate rate of IAS - velocities/vc-kts - 0.0 - 0.0 - 1.0 - - - - fbw/pitch/vc-kts-rate - 1.0 - - - - - - position/wow eq 1 - fbw/mixer/sidestick-gain-feedback eq 1 - - - position/wow eq 1 - fbw/mixer/sidestick-gain-feedback ne 1 - - - position/wow eq 0 - fbw/mixer/sidestick-gain-feedback eq 0 - - - - - position/wow - fbw/mixer/rate-limit - fbw/mixer/sidestick-gain-feedback - - - - - - fbw/mixer/sidestick-gain - - 0 1 - 1 0 - -
-
-
- -
- - - - - - - fbw/fmgc/enabled eq 1 - - - - - fbw/roll/a-i-f - - - -1 - - - - 1 - - - - /controls/flight/aileron-input-fast - - - - - - /controls/flight/aileron - - -1.00 -1 - -0.04 0 - 0.04 0 - 1.00 1 - -
-
-
- - - - - fbw/fmgc/enabled eq 0 - - - position/wow eq 0 - fbw/fmgc/enabled eq 1 - - - - - fbw/roll/a-i-s - - - -1 - - - - 1 - - - - /controls/flight/aileron-input - - - - - - - fbw/roll/a-i - 0.261799 - - - attitude/roll-rad - fbw/roll/a-i - - -1 0 1 - -0.575959 0.261799 0.000000 0.000000 - -0.488692 0.000000 0.000000 0.000000 - 0.488692 0.000000 0.000000 0.000000 - 0.575959 0.000000 0.000000 -0.261799 - -
- - attitude/roll-rad - - -0.750492 0.261799 - -0.575959 0.000000 - 0.575959 0.000000 - 0.750492 -0.261799 - -
-
-
-
- - - - - - fbw/roll/a-i - 0.261799 - - - attitude/roll-rad - fbw/roll/a-i - - -1.0 0.0 1.0 - -1.169370 0.261799 0.000000 0.000000 - -1.082100 0.000000 0.000000 0.000000 - 1.082100 0.000000 0.000000 0.000000 - 1.169370 0.000000 0.000000 -0.261799 - -
- - attitude/roll-rad - - -1.343900 0.261799 - -1.169370 0.000000 - 1.169370 0.000000 - 1.343900 -0.261799 - -
-
-
-
- - - - - attitude/roll-rad - - -1.169370 0.436332 - -0.698132 0.174533 - -0.575959 0.000000 - 0.575959 0.000000 - 0.698132 -0.174533 - 1.169370 -0.436332 - -
-
-
- - - - - attitude/roll-rad lt 0 - fbw/roll/r-r-33 ge fbw/roll/r-r-rb-f - - - attitude/roll-rad gt 0 - fbw/roll/r-r-33 le fbw/roll/r-r-rb-f - - - - - - - - fbw/roll/a-i - 0.261799 - - - attitude/roll-rad - fbw/roll/a-i - - -1 0 1 - -0.698132 0.261799 0.000000 0.000000 - -0.610865 0.000000 0.000000 0.000000 - 0.610865 0.000000 0.000000 0.000000 - 0.698132 0.000000 0.000000 -0.261799 - -
-
-
-
- - - - - attitude/roll-rad - - -0.698132 0.436332 - -0.261799 0.174533 - 0.000000 0.000000 - 0.261799 -0.174533 - 0.698132 -0.436332 - -
-
-
- - - - - /it-fbw/roll-lim eq 33 - /it-fbw/roll-back ne 1 - /it-fbw/protections/overspeed ne 1 - - - /it-fbw/roll-lim eq 67 - /it-fbw/protections/overspeed ne 1 - - - /it-fbw/roll-back eq 1 - /it-fbw/protections/overspeed ne 1 - - - /it-fbw/protections/overspeed eq 1 - /it-fbw/protections/overspeed-roll-back ne 1 - - - /it-fbw/protections/overspeed eq 1 - /it-fbw/protections/overspeed-roll-back eq 1 - - - - - fbw/roll/rate-demand - 16.4 - - - - - - /orientation/roll-rate-degps - - - - - - - - gear/unit[0]/WOW eq 1 - - - - - fbw/roll/p-r_s-s - -fbw/roll/rate-demand-lag - - - - - - fbw/roll/gain-switch gt 0 - - - fbw/roll/pid le -0.999 - fbw/roll/pid ge 0.999 - - - - - fbw/roll/rate-error - fbw/roll/p-gain - fbw/roll/i-gain - fbw/roll/d-gain - fbw/roll/trigger - - -1.0 - 1.0 - - fbw/roll/pid - - - - - - position/wow eq 1 - /it-fbw/law eq 1 - /it-fbw/law eq 2 - - - - - - - /orientation/roll-deg - -0.1 - - - - - - fbw/roll/pid - fbw/mixer/computer-gain - - - - fbw/roll/a-i-f - fbw/mixer/sidestick-gain - - - - fbw/mixer/roll/computer-demand - fbw/mixer/roll/sidestick-demand - - -1.0 - 1.0 - - - - - - - position/wow eq 0 - /it-fbw/law eq 0 - - - fbw/fmgc/enabled eq 0 - fbw/roll/gear-law-switch eq 1 - - - fbw/fmgc/enabled eq 1 - position/wow eq 1 - /it-fbw/law eq 0 - - - /it-fbw/law eq 3 - - - - - - - position/wow eq 0 - /it-fbw/law eq 0 - - - fbw/roll/gear-law-switch eq 1 - - - /it-fbw/law eq 3 - - - - - - - - fbw/roll/s-i-f-i - - -1.0 -1.0 - -0.2 0.0 - 0.2 0.0 - 1.0 1.0 - -
- - velocities/vc-kts - position/wow - - 0 1 - 140 0.5 1.0 - 350 0.1 1.0 - -
-
-
-
- - - - - /it-fbw/roll-back eq 0 - - - - - - - /it-fbw/law ne 3 - /systems/failures/aileron-left eq 0 - - - /it-fbw/law ne 3 - /systems/failures/aileron-left eq 1 - - - - - - - /it-fbw/law ne 3 - /systems/failures/aileron-right eq 0 - - - /it-fbw/law ne 3 - /systems/failures/aileron-right eq 1 - - - - - /controls/flight/aileron - 20 - - -
- - - - - - - /it-fbw/law eq 0 - /it-fbw/protections/overspeed eq 1 - - - - - - - fbw/fmgc/enabled eq 1 - - - -1.0 - fbw/pitch/elevator-max - - - - - fbw/pitch/e-i-f - - - -1 - - - - 1 - - - - /controls/flight/elevator-input-fast - - - - - - /controls/flight/elevator - - -1.00 -1 - -0.04 0 - 0.04 0 - 1.00 1 - -
-
-
- - - - - fbw/pitch/elevator-nul - - /position/gear-agl-ft - - 5 0.2 - 30 0.1 - -
-
-
-
- - - - - fbw/pitch/elevator-nul - -0.15 - - - - - - - - gear/unit[1]/WOW eq 1 - gear/unit[2]/WOW eq 1 - - - - - - - fbw/fmgc/enabled eq 0 - /position/gear-agl-ft le 30 - /controls/flight/flap-pos ge 4 - /controls/engines/engine[0]/throttle lt 0.65 - /controls/engines/engine[1]/throttle lt 0.65 - /FMGC/status/to-state eq 0 - /it-fbw/law eq 0 - position/wow eq 0 - - - fbw/fmgc/enabled eq 0 - /position/gear-agl-ft le 30 - /controls/flight/flap-pos ge 4 - /controls/engines/engine[0]/throttle lt 0.65 - /controls/engines/engine[1]/throttle lt 0.65 - /FMGC/status/to-state eq 0 - /it-fbw/law eq 0 - gear/unit[0]/WOW eq 0 - fbw/pitch/flare-gear-switch eq 1 - - - fbw/fmgc/enabled eq 1 - position/wow eq 0 - - - fbw/fmgc/enabled eq 1 - position/wow eq 1 - - - -1.0 - fbw/pitch/elevator-max - - - - - fbw/pitch/e-i-s - - - -1 - - - - 1 - - - - /controls/flight/elevator-input - - - - - - /controls/flight/flap-pos ne 0 - - - - - - - /controls/flight/flap-pos ne 0 - - - - - - - fbw/pitch/e-i - - -1.0 2.5 - 0.0 1.0 - 1.0 -0.5 - -
-
- - fbw/pitch/g-min - fbw/pitch/g-max - -
- - - /accelerations/pilot-g - 1.0 - - - - - - fbw/pitch/g-instrumented - - -1 - - attitude/roll-rad - - - 1 - - - - - - fbw/pitch/g-computed - -fbw/pitch/g-demand - - - - - - fbw/pitch/g-pi - -1.0 - - - - - - attitude/roll-rad lt -1.5708 - attitude/roll-rad gt 1.5708 - - - - - - - - - - fbw/pitch/g-pi-switched - -0.087266 - - - attitude/pitch-rad - fbw/pitch/g-pi-switched - - -1 0 1 - -0.261799 0.000000 0.000000 0.087266 - -0.174533 0.000000 0.000000 0.000000 - 0.436332 0.000000 0.000000 0.000000 - 0.523599 -0.087266 0.000000 0.000000 - -
- - attitude/pitch-rad - - -0.436332 0.087266 - -0.261799 0.000000 - 0.523599 0.000000 - 0.698132 -0.087266 - -
-
-
-
- - - fbw/pitch/g-pi-switched - -0.087266 - - - - - - - fbw/pitch/g-pi-switched - fbw/pitch/vc-kts-rate-lag - - -2 -1 - -1.0 0.087266 0.087266 - 0.0 0.000000 0.026180 - -
- - attitude/pitch-rad - fbw/pitch/g-pi-switched - - -1 0 - 0.436332 -0.026180 0.000000 - 0.523599 -0.087266 0.000000 - -
- - attitude/pitch-rad - - 0.523599 0.000000 - 0.698132 -0.087266 - -
-
-
-
- - - - - fbw/pitch/g-pi-switched - fbw/pitch/vc-kts-rate-lag - - -2 -1 - -1.0 0.087266 0.087266 - 0.0 0.000000 0.026180 - 1.0 -0.061086 -0.087266 - -
-
-
- - - - - /it-fbw/law eq 0 - /it-fbw/protections/overspeed ne 1 - - - /it-fbw/law ne 0 - /it-fbw/protections/overspeed ne 1 - - - /it-fbw/law eq 0 - /it-fbw/protections/overspeed eq 1 - - - /it-fbw/law ne 0 - /it-fbw/protections/overspeed eq 1 - - - - - fbw/pitch/rate-demand - 10.1 - - - - - - /orientation/pitch-rate-degps - - - - - - - - gear/unit[0]/WOW eq 1 - - - - - fbw/pitch/t-r_s-s - -fbw/pitch/rate-demand-lag - - - - - - fbw/pitch/gain-switch gt 0 - - - fbw/pitch/pid le -0.999 - fbw/pitch/pid ge 0.999 - - - - - fbw/pitch/rate-error - fbw/pitch/p-gain - fbw/pitch/i-gain - fbw/pitch/d-gain - fbw/pitch/trigger - - -1.0 - 1.0 - - fbw/pitch/pid - - - - fbw/pitch/pid - -1.0 - - - - - - attitude/roll-rad lt -1.5708 - attitude/roll-rad gt 1.5708 - - - - - - - /it-fbw/law eq 0 - /it-fbw/law eq 1 - - - - - - - gear/unit[1]/WOW eq 1 - gear/unit[2]/WOW eq 1 - /it-fbw/law eq 2 - - - - - fbw/pitch/pid-switched - fbw/mixer/computer-gain - - - - fbw/pitch/e-i-f - fbw/mixer/sidestick-gain - - - - fbw/mixer/pitch/computer-demand - fbw/mixer/pitch/sidestick-demand - - -1.0 - 1.0 - - - - - - - position/wow eq 0 - fbw/pitch/law-switch eq 1 - - - fbw/fmgc/enabled eq 0 - fbw/pitch/law-gear-switch eq 1 - - - fbw/fmgc/enabled eq 1 - position/wow eq 1 - gear/unit[0]/WOW eq 0 - - - fbw/fmgc/enabled eq 1 - position/wow eq 1 - - - /it-fbw/law eq 3 - - - - - /controls/flight/elevator - 20 - - - - - - fbw/fmgc/enabled eq 1 - - - - - - - fbw/pitch/gain-switch eq 0 - /position/gear-agl-ft ge fbw/pitch/autotrim-height - attitude/roll-rad lt 0.628319 - attitude/roll-rad gt -0.628319 - fbw/pitch/pid-switched ge 0.01 - fbw/pitch/g-instrumented ge 0.5 - /it-fbw/protections/overspeed ne 1 - /controls/flight/elevator-trim le 0.32 - position/wow eq 0 - - - fbw/pitch/gain-switch eq 0 - /position/gear-agl-ft ge fbw/pitch/autotrim-height - attitude/roll-rad lt 0.628319 - attitude/roll-rad gt -0.628319 - fbw/pitch/pid-switched le -0.01 - fbw/pitch/g-instrumented ge 0.5 - /it-fbw/protections/overspeed ne 1 - /controls/flight/elevator-trim ge -1.0 - position/wow eq 0 - - - - - - - - - fbw/pitch/autotrim-switch - 1 - - - fbw/pitch/pid-switched - - 0.05 0.00001 - 0.30 0.00015 - -
- 0.0 -
- - - fbw/pitch/autotrim-switch - 2 - - - fbw/pitch/pid-switched - - -0.30 -0.00015 - -0.05 -0.00001 - -
- 0.0 -
-
-
-
- - - - - /controls/flight/elevator-trim - fbw/pitch/autotrim-offset - - - - -1.0 - 0.32 - - /controls/flight/elevator-trim - - -
- - - - - - - velocities/vc-kts - - 160.00 25.000 - 162.15 23.649 - 165.02 22.226 - 168.64 21.015 - 172.25 19.734 - 176.59 18.595 - 181.67 17.525 - 186.75 16.385 - 191.83 15.316 - 197.65 14.318 - 205.65 13.247 - 212.93 12.318 - 219.48 11.462 - 227.48 10.533 - 236.96 9.7450 - 246.43 8.8863 - 255.18 8.0990 - 266.12 7.4525 - 277.06 6.7704 - 288.00 6.0884 - 299.67 5.5124 - 311.35 5.0075 - 323.03 4.5736 - 335.44 4.2104 - 347.13 3.9186 - 358.81 3.6979 - 370.50 3.5482 - 380.00 3.4000 - -
-
-
- - - - - /systems/fctl/fac1 eq 1 - /systems/fctl/fac2 eq 1 - /gear/gear[1]/wow eq 0 - /gear/gear[2]/wow eq 0 - - - /controls/flight/slats eq 0 - /gear/gear[1]/wow eq 0 - /gear/gear[2]/wow eq 0 - - - - - fbw/yaw/max-deg-switch - - -25 - 25 - - - -1 - 1 - - - - - fbw/yaw/max-deg-scale - -1.0 - - - - - - /controls/flight/rudder - fbw/fmgc/enabled - - 0 1 - -1.00 -1 0 - -0.04 0 0 - 0.04 0 0 - 1.00 1 0 - -
-
-
- - - - - - fbw/yaw/rudder-nul - fbw/yaw/max-deg-switch - - 25.0 - - - - - - - - fbw/fmgc/enabled eq 1 - /it-autoflight/output/lat eq 4 - - - - - velocities/r-rad_sec - 0.5 - - - - - - position/wow eq 1 - /position/gear-agl-ft lt 50 - fbw/yaw/autoland-switch eq 1 - - - - - fbw/yaw/r-r_s-s - fbw/yaw/yd-p-gain - - -0.5 - 0.5 - - - - - - - position/wow eq 1 - fbw/yaw/rudder-nul gt 0 - fbw/yaw/rudder-nul lt 0 - - - - - fbw/yaw/slip-skid - fbw/yaw/tc-p-gain - 0.0 - fbw/yaw/tc-d-gain - - -0.4 - 0.4 - - fbw/yaw/tc-pd - - - - - - position/wow eq 1 - fbw/yaw/rudder-nul gt 0 - fbw/yaw/rudder-nul lt 0 - - - - - - - fbw/yaw/autoland-switch eq 1 - - - - - fbw/yaw/yd-f - fbw/yaw/tc-pd-s - fbw/yaw/fmgc-cmd - - - - - - /it-fbw/law eq 0 - /it-fbw/law eq 1 - - - - - - - fbw/yaw/law-switch eq 1 - fbw/yaw/rudder-nul eq 0 - - /controls/flight/rudder-fbw - - - - /controls/flight/rudder - 20 - - -
+ /controls/flight/flaps-input-last @@ -1467,13 +106,10 @@ - + hydraulics/aileron-l/switch - - -25 - 25 - - + 25 + hydraulics/aileron-l/cmd-deg @@ -1543,13 +179,10 @@ - + hydraulics/aileron-r/switch - - -25 - 25 - - + 25 + hydraulics/aileron-r/cmd-deg @@ -1565,8 +198,8 @@ fbw/elevator-output - -0.6666666666666666666666666666666 - 1.0 + -0.6666666666666666666666666666666 + 0.5 @@ -1601,13 +234,14 @@ - + hydraulics/elevator-l/switch - + 30 + -30 - 17 - - + 15 + + hydraulics/elevator-l/cmd-deg @@ -1640,13 +274,14 @@ - + hydraulics/elevator-r/switch - + 30 + -30 - 17 - - + 15 + + hydraulics/elevator-r/cmd-deg @@ -1670,10 +305,10 @@ /controls/flight/elevator-trim -1.00 - 0.32 + 0.296296 - -12.5 + -13.5 4.0 @@ -1698,17 +333,10 @@ - + /controls/flight/rudder-trim - - -1.0 - 1.0 - - - -20.0 - 20.0 - - + 20 + /controls/flight/rudder-trim @@ -1739,13 +367,10 @@ - + hydraulics/rudder/switch - - -25 - 25 - - + 25 + hydraulics/rudder/cmd-deg @@ -1840,10 +465,112 @@ - + + + + + + /controls/flight/flaps ge 0.2 + /controls/flight/flaps lt 0.4 + + + /controls/flight/flaps ge 0.4 + /controls/flight/flaps lt 0.6 + + + /controls/flight/flaps ge 0.6 + /controls/flight/flaps lt 0.8 + + + /controls/flight/flaps ge 0.8 + + /controls/flight/flaps-input-out + + + + + + /controls/flight/flaps-input ne 1 + /instrumentation/airspeed-indicator/indicated-speed-kt ge 210 + + + /controls/flight/flaps-input eq 1 + /controls/flight/flaps-input-last eq 0 + /instrumentation/airspeed-indicator/indicated-speed-kt le 100 + + + /controls/flight/flaps-input eq 1 + /controls/flight/flaps-input-last ge 2 + /instrumentation/airspeed-indicator/indicated-speed-kt lt 210 + + + + + /controls/flight/flaps-input + 1.0 + + + + + + /controls/flight/flaps ge 0.2 + /controls/flight/flaps lt 0.4 + /controls/flight/flaps-1f-enable ne 1 + + + /controls/flight/flaps ge 0.2 + /controls/flight/flaps lt 0.4 + /controls/flight/flaps-1f-enable eq 1 + + + /controls/flight/flaps ge 0.4 + /controls/flight/flaps lt 0.6 + + + /controls/flight/flaps ge 0.6 + /controls/flight/flaps lt 0.8 + + + /controls/flight/flaps ge 0.8 + + /controls/flight/flaps-input-out + + + + + + /controls/flight/flaps-pos eq 2 + + + /controls/flight/flaps-pos eq 3 + + + /controls/flight/flaps-pos eq 4 + + + /controls/flight/flaps-pos eq 5 + + + 0 + /options/maxflap + + + + + + + /controls/flight/flaps-input eq 4 + + + /controls/flight/flaps-input ge 2 + + + /controls/flight/flaps-input eq 1 + + - /controls/flight/flap-lever + /controls/flight/flaps-input 20 @@ -1863,12 +590,7 @@ - - - - /controls/flight/flaps - 35.0 - + @@ -1902,7 +624,7 @@ - fcs/flap-pos-gain + /controls/flight/flaps-cmd fcs/flap-pos-rate fcs/flap-pos-deg @@ -1911,7 +633,7 @@ fcs/flap-pos-deg 0 - 35 + 40 0 @@ -1924,11 +646,6 @@ - - /controls/flight/slats - 27.0 - - @@ -1961,7 +678,7 @@ - fcs/slat-pos-gain + /controls/flight/slats-cmd fcs/slat-pos-rate fcs/slat-pos-deg diff --git a/Systems/fadec-cfm.xml b/Systems/fadec-cfm.xml index 8cd4e37e..40447f9a 100644 --- a/Systems/fadec-cfm.xml +++ b/Systems/fadec-cfm.xml @@ -51,7 +51,7 @@ - /controls/flight/flap-lever + /controls/flight/flaps-input 0 diff --git a/Systems/fadec-iae.xml b/Systems/fadec-iae.xml index a3dab683..d6275615 100644 --- a/Systems/fadec-iae.xml +++ b/Systems/fadec-iae.xml @@ -51,7 +51,7 @@ - /controls/flight/flap-lever + /controls/flight/flaps-input 0 diff --git a/Systems/lower-ecam.xml b/Systems/lower-ecam.xml index 95285ec1..09ae6ad5 100644 --- a/Systems/lower-ecam.xml +++ b/Systems/lower-ecam.xml @@ -151,7 +151,7 @@ /fdm/jsbsim/hydraulics/elevator-l/final-deg -30-1.03 0 0.00 - 17 0.63 + 15 0.63 @@ -168,7 +168,7 @@ /fdm/jsbsim/hydraulics/elevator-r/final-deg -30-1.03 0 0.00 - 17 0.63 + 15 0.63 diff --git a/revision.txt b/revision.txt index b74e882a..1758dddc 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -31 \ No newline at end of file +32 \ No newline at end of file