diff --git a/A320-100-CFM.xml b/A320-100-CFM.xml
index f3df2d47..414297a3 100644
--- a/A320-100-CFM.xml
+++ b/A320-100-CFM.xml
@@ -137,6 +137,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
+
+
diff --git a/A320-200-CFM.xml b/A320-200-CFM.xml
index d540a647..75bd4d56 100644
--- a/A320-200-CFM.xml
+++ b/A320-200-CFM.xml
@@ -137,6 +137,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
+
+
diff --git a/A320-200-IAE.xml b/A320-200-IAE.xml
index ee5fa334..c0d51b1a 100644
--- a/A320-200-IAE.xml
+++ b/A320-200-IAE.xml
@@ -133,11 +133,12 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
-
+
+
diff --git a/A320neo-CFM.xml b/A320neo-CFM.xml
index 18ba3988..9c5b6724 100644
--- a/A320neo-CFM.xml
+++ b/A320neo-CFM.xml
@@ -137,6 +137,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
+
+
diff --git a/A320neo-PW.xml b/A320neo-PW.xml
index 03a78410..39a8e469 100644
--- a/A320neo-PW.xml
+++ b/A320neo-PW.xml
@@ -137,6 +137,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
+
+
diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas
index 173239bb..c50b7a6b 100644
--- a/Models/Instruments/IESI/IESI.nas
+++ b/Models/Instruments/IESI/IESI.nas
@@ -80,7 +80,7 @@ var canvas_IESI_base = {
dcess = systems.ELEC.Bus.dcEss.getValue();
dchot1 = systems.ELEC.Bus.dcHot1.getValue();
- if (dcess >= 25 or dchot1 >= 25) {
+ if (dcess >= 25 or (dchot1 >= 25 and airspeed.getValue() >= 50)) {
IESI.page.show();
IESI.update();
@@ -97,7 +97,7 @@ var canvas_IESI_base = {
iesi_init.setBoolValue(0);
}
- if (dcess >= 25 or dchot1 >= 25) {
+ if (dcess >= 25 or (dchot1 >= 25 and airspeed.getValue() >= 50)) {
IESI.page.show();
IESI.update();
} else {
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
index 1152c6de..e79d3f2a 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
@@ -2446,9 +2446,9 @@ var canvas_lowerECAM_hyd = {
green_psi = g_psi.getValue();
yellow_psi = y_psi.getValue();
- me["Press-Green"].setText(sprintf("%s", green_psi));
- me["Press-Blue"].setText(sprintf("%s", blue_psi));
- me["Press-Yellow"].setText(sprintf("%s", yellow_psi));
+ me["Press-Green"].setText(sprintf("%s", math.round(green_psi, 50)));
+ me["Press-Blue"].setText(sprintf("%s", math.round(blue_psi, 50)));
+ me["Press-Yellow"].setText(sprintf("%s", math.round(yellow_psi, 50)));
if (blue_psi >= 1500) {
me["Blue-Line"].setColor(0.0509,0.7529,0.2941);
diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml
index 2848580f..b9facf65 100644
--- a/Models/Instruments/OHpanel/OHpanel.xml
+++ b/Models/Instruments/OHpanel/OHpanel.xml
@@ -1906,7 +1906,7 @@
property-toggle
- controls/hydraulic/eng1-pump
+ controls/hydraulic/switches/green-edp
nasal
@@ -1922,11 +1922,11 @@
- systems/hydraulic/eng1-pump-fault
+ systems/hydraulic/lights/green-edp-fault
1
- controls/hydraulic/eng1-pump
+ controls/hydraulic/switches/green-edp
1
@@ -1944,7 +1944,7 @@
- controls/hydraulic/eng1-pump
+ controls/hydraulic/switches/green-edp
0
@@ -1982,7 +1982,7 @@
property-toggle
- controls/hydraulic/rat-man
+ controls/hydraulic/switches/rat-man
@@ -2074,7 +2074,7 @@
property-toggle
- controls/hydraulic/elec-pump-blue
+ controls/hydraulic/switches/blue-elec
nasal
@@ -2090,11 +2090,11 @@
- systems/hydraulic/elec-pump-b-fault
+ systems/hydraulic/lights/blue-elec-fault
1
- controls/hydraulic/elec-pump-blue
+ controls/hydraulic/switches/blue-elec
1
@@ -2112,7 +2112,7 @@
- controls/hydraulic/elec-pump-blue
+ controls/hydraulic/switches/blue-elec
0
@@ -2141,7 +2141,7 @@
property-toggle
- controls/hydraulic/ptu
+ controls/hydraulic/switches/ptu
nasal
@@ -2157,11 +2157,11 @@
- systems/hydraulic/ptu-fault
+ systems/hydraulic/lights/ptu-fault
1
- controls/hydraulic/ptu
+ controls/hydraulic/switches/ptu
1
@@ -2179,7 +2179,7 @@
- controls/hydraulic/ptu
+ controls/hydraulic/switches/ptu
0
@@ -2208,7 +2208,7 @@
property-toggle
- controls/hydraulic/eng2-pump
+ controls/hydraulic/switches/yellow-edp
nasal
@@ -2224,11 +2224,11 @@
- systems/hydraulic/eng2-pump-fault
+ systems/hydraulic/lights/yellow-edp-fault
1
- controls/hydraulic/eng2-pump
+ controls/hydraulic/switches/yellow-edp
1
@@ -2246,7 +2246,7 @@
- controls/hydraulic/eng2-pump
+ controls/hydraulic/switches/yellow-edp
0
@@ -2275,7 +2275,7 @@
property-toggle
- controls/hydraulic/elec-pump-yellow
+ controls/hydraulic/switches/yellow-elec
nasal
@@ -2291,11 +2291,11 @@
- systems/hydraulic/elec-pump-y-fault
+ systems/hydraulic/lights/yellow-elec-fault
1
- controls/hydraulic/elec-pump-yellow
+ controls/hydraulic/switches/yellow-elec
1
@@ -2313,7 +2313,7 @@
- controls/hydraulic/elec-pump-yellow
+ controls/hydraulic/switches/yellow-elec
1
diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas
index 27aa04a8..c64a8289 100644
--- a/Nasal/ECAM/ECAM-logic.nas
+++ b/Nasal/ECAM/ECAM-logic.nas
@@ -799,19 +799,19 @@ var messages_priority_3 = func {
if (getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dualFail.active and phaseVar != 4 and phaseVar != 8 and emerconfig.clearFlag == 0) {
emerconfig.active = 1;
- if (getprop("/systems/hydraulic/rat-position") != 0 and emerconfigMinRat.clearFlag == 0) {
+ if (getprop("/systems/hydraulic/sources/rat/position") != 0 and emerconfigMinRat.clearFlag == 0) {
emerconfigMinRat.active = 1;
} else {
ECAM_controller.warningReset(emerconfigMinRat);
}
- if (!getprop("/systems/electrical/some-electric-thingie/generator-1-reset") and !getprop("/systems/electrical/some-electric-thingie/generator-2-reset") and emerconfigGen.clearFlag == 0) {
+ if (!(getprop("/systems/electrical/some-electric-thingie/generator-1-reset") and getprop("/systems/electrical/some-electric-thingie/generator-2-reset")) and emerconfigGen.clearFlag == 0) {
emerconfigGen.active = 1;
} else {
ECAM_controller.warningReset(emerconfigGen);
}
- if (!getprop("/systems/electrical/some-electric-thingie/generator-1-reset-bustie") and !getprop("/systems/electrical/some-electric-thingie/generator-2-reset-bustie") and emerconfigGen2.clearFlag == 0) {
+ if (!(getprop("/systems/electrical/some-electric-thingie/generator-1-reset-bustie") and getprop("/systems/electrical/some-electric-thingie/generator-2-reset-bustie")) and emerconfigGen2.clearFlag == 0) {
emerconfigGen2.active = 1;
if (getprop("/controls/electrical/switches/bus-tie")) {
emerconfigBusTie.active = 1;
@@ -1124,7 +1124,7 @@ var messages_right_memo = func {
ptu.active = 0;
}
- if (getprop("/systems/hydraulic/rat-position") != 0) {
+ if (getprop("/systems/hydraulic/sources/rat/position") != 0) {
rat.active = 1;
} else {
rat.active = 0;
@@ -1136,7 +1136,7 @@ var messages_right_memo = func {
rat.colour = "g";
}
- if (getprop("/systems/electrical/relay/emer-glc/contact-pos") == 1 and getprop("/systems/hydraulics/rat-position") != 0 and getprop("/gear/gear[1]/wow") == 0) {
+ if (getprop("/systems/electrical/relay/emer-glc/contact-pos") == 1 and getprop("/systems/hydraulic/sources/rat/position") != 0 and getprop("/gear/gear[1]/wow") == 0) {
emer_gen.active = 1;
} else {
emer_gen.active = 0;
diff --git a/Nasal/hydraulics.nas b/Nasal/hydraulics.nas
index 9d1d80f4..71b1f547 100644
--- a/Nasal/hydraulics.nas
+++ b/Nasal/hydraulics.nas
@@ -1,249 +1,60 @@
# A3XX Hydraulic System
-# Joshua Davidson (Octal450)
+# Jonathan Redpath
-# Copyright (c) 2019 Joshua Davidson (Octal450)
+# Copyright (c) 2019 Jonathan Redpath
-var eng1_pump_sw = 0;
-var eng2_pump_sw = 0;
-var elec_pump_blue_sw = 0;
-var elec_pump_yellow_sw = 0;
-var yellow_hand_pump = 0;
-var ptu_sw = 0;
-var blue_psi = 0;
-var green_psi = 0;
-var yellow_psi = 0;
-var rpmapu = 0;
-var stateL = 0;
-var stateR = 0;
-var dc_ess = 0;
-var psi_diff = 0;
-var rat = 0;
-var gs = 0;
-var blue_leak = 0;
-var green_leak = 0;
-var yellow_leak = 0;
-var blue_pump_fail = 0;
-var green_pump_fail = 0;
-var yellow_pump_eng_fail = 0;
-var yellow_pump_elec_fail = 0;
-var ptu_fail = 0;
-var dc2 = 0;
-var ptu_active = 0;
-var accum = 0;
-var lpsi = 0;
-var rpsi = 0;
-var parking = 0;
-var askidnws_sw = 0;
-var brake_mode = 0;
-var brake_l = 0;
-var brake_r = 0;
-var brake_nose = 0;
-var counter = 0;
-var down = 0;
var HYD = {
+ Fail: {
+ blueElec: props.globals.getNode("/systems/failures/hydraulic/blue-elec"),
+ blueLeak: props.globals.getNode("/systems/failures/hydraulic/blue-leak"),
+ greenEng: props.globals.getNode("/systems/failures/hydraulic/green-edp"),
+ greenLeak: props.globals.getNode("/systems/failures/hydraulic/green-leak"),
+ ptuFault: props.globals.getNode("/systems/failures/hydraulic/ptu"),
+ yellowEng: props.globals.getNode("/systems/failures/hydraulic/yellow-edp"),
+ yellowElec: props.globals.getNode("/systems/failures/hydraulic/yellow-elec"),
+ yellowLeak: props.globals.getNode("/systems/failures/hydraulic/yellow-leak"),
+ },
+ Psi: {
+ },
+ Qty: {
+ blueInput: props.globals.initNode("/systems/hydraulic/blue-qty-input", 0, "INT"),
+ greenInput: props.globals.initNode("/systems/hydraulic/green-qty-input", 0, "INT"),
+ yellowInput: props.globals.initNode("/systems/hydraulic/yellow-qty-input", 0, "INT"),
+ },
+ Switch: {
+ blueElec: props.globals.getNode("/controls/hydraulic/switches/blue-elec"),
+ blueElecOvrd: props.globals.getNode("/controls/hydraulic/switches/blue-elec-ovrd"),
+ greenEDP: props.globals.getNode("/controls/hydraulic/switches/green-edp"),
+ ptu: props.globals.getNode("/controls/hydraulic/switches/ptu"),
+ rat: props.globals.getNode("/controls/hydraulic/switches/rat-man"),
+ yellowEDP: props.globals.getNode("/controls/hydraulic/switches/yellow-edp"),
+ yellowElec: props.globals.getNode("/controls/hydraulic/switches/yellow-elec"),
+ },
init: func() {
- setprop("/controls/hydraulic/eng1-pump", 1);
- setprop("/controls/hydraulic/eng2-pump", 1);
- setprop("/controls/hydraulic/elec-pump-blue", 1);
- setprop("/controls/hydraulic/elec-pump-yellow", 0);
- setprop("/controls/hydraulic/hand-pump-yellow", 0);
- setprop("/controls/hydraulic/ptu", 1);
- setprop("/systems/hydraulic/ptu-active", 0);
- setprop("/systems/hydraulic/blue-psi", 0);
- setprop("/systems/hydraulic/green-psi", 0);
- setprop("/systems/hydraulic/yellow-psi", 0);
- setprop("/controls/gear/brake-parking", 0);
- setprop("/systems/hydraulic/brakes/accumulator-pressure-psi", 0);
- setprop("/systems/hydraulic/brakes/pressure-left-psi", 0);
- setprop("/systems/hydraulic/brakes/pressure-right-psi", 0);
- setprop("/systems/hydraulic/brakes/askidnwssw", 1);
- setprop("/systems/hydraulic/brakes/mode", 0);
- setprop("/systems/hydraulic/brakes/lbrake", 0);
- setprop("/systems/hydraulic/brakes/rbrake", 0);
- setprop("/systems/hydraulic/brakes/nose-rubber", 0);
- setprop("/systems/hydraulic/brakes/counter", 0);
- setprop("/systems/hydraulic/brakes/accumulator-pressure-psi-1", 0);
- setprop("/systems/hydraulic/eng1-pump-fault", 0);
- setprop("/systems/hydraulic/eng2-pump-fault", 0);
- setprop("/systems/hydraulic/elec-pump-b-fault", 0);
- setprop("/systems/hydraulic/elec-pump-y-fault", 0);
- setprop("/systems/hydraulic/ptu-fault", 0);
- setprop("/systems/hydraulic/ptu-supplies", "XX");
- setprop("/systems/hydraulic/yellow-resv-lo-air-press", 0);
- setprop("/systems/hydraulic/blue-resv-lo-air-press", 0);
- setprop("/systems/hydraulic/green-resv-lo-air-press", 0);
- setprop("/systems/hydraulic/yellow-resv-ovht", 0);
- setprop("/systems/hydraulic/blue-resv-ovht", 0);
- setprop("/systems/hydraulic/green-resv-ovht", 0);
- setprop("/systems/hydraulic/elec-pump-yellow-ovht", 0);
- setprop("/systems/hydraulic/elec-pump-blue-ovht", 0);
- setprop("/systems/hydraulic/yellow-fire-valve", 0);
- setprop("/systems/hydraulic/green-fire-valve", 0);
+ me.resetFail();
+ me.Qty.blueInput.setValue(math.round((rand() * 4) + 8 , 0.1)); # Random between 8 and 12
+ me.Qty.greenInput.setValue(math.round((rand() * 4) + 8 , 0.1)); # Random between 8 and 12
+ me.Qty.yellowInput.setValue(math.round((rand() * 4) + 8 , 0.1)); # Random between 8 and 12
+ me.Switch.blueElec.setValue(1);
+ me.Switch.blueElecOvrd.setValue(0);
+ me.Switch.greenEDP.setValue(1);
+ me.Switch.ptu.setValue(1);
+ me.Switch.rat.setValue(0);
+ me.Switch.yellowEDP.setValue(1);
+ me.Switch.yellowElec.setValue(0);
+ },
+ resetFail: func() {
+ me.Fail.blueElec.setBoolValue(0);
+ me.Fail.blueLeak.setBoolValue(0);
+ me.Fail.greenEng.setBoolValue(0);
+ me.Fail.greenLeak.setBoolValue(0);
+ me.Fail.ptuFault.setBoolValue(0);
+ me.Fail.yellowEng.setBoolValue(0);
+ me.Fail.yellowElec.setBoolValue(0);
+ me.Fail.yellowLeak.setBoolValue(0);
},
loop: func() {
- eng1_pump_sw = getprop("/controls/hydraulic/eng1-pump");
- eng2_pump_sw = getprop("/controls/hydraulic/eng2-pump");
- elec_pump_blue_sw = getprop("/controls/hydraulic/elec-pump-blue");
- elec_pump_yellow_sw = getprop("/controls/hydraulic/elec-pump-yellow");
- yellow_hand_pump = getprop("/controls/hydraulic/hand-pump-yellow");
- ptu_sw = getprop("/controls/hydraulic/ptu");
- blue_psi = getprop("/systems/hydraulic/blue-psi");
- green_psi = getprop("/systems/hydraulic/green-psi");
- yellow_psi = getprop("/systems/hydraulic/yellow-psi");
- rpmapu = getprop("/systems/apu/rpm");
- stateL = getprop("/engines/engine[0]/state");
- stateR = getprop("/engines/engine[1]/state");
- dc_ess = getprop("/systems/electrical/bus/dc-ess");
- psi_diff = green_psi - yellow_psi;
- rat = getprop("/systems/hydraulic/rat-position");
- gs = getprop("/velocities/groundspeed-kt");
- blue_leak = getprop("/systems/failures/hyd-blue");
- green_leak = getprop("/systems/failures/hyd-green");
- yellow_leak = getprop("/systems/failures/hyd-yellow");
- blue_pump_fail = getprop("/systems/failures/pump-blue");
- green_pump_fail = getprop("/systems/failures/pump-green");
- yellow_pump_eng_fail = getprop("/systems/failures/pump-yellow-eng");
- yellow_pump_elec_fail = getprop("/systems/failures/pump-yellow-elec");
- ptu_fail = getprop("/systems/failures/ptu");
- dc2 = getprop("/systems/electrical/bus/dc-2");
-
- if ((psi_diff > 500 or psi_diff < -500) and ptu_sw and dc2 > 25) {
- setprop("/systems/hydraulic/ptu-active", 1);
- } else if (psi_diff < 20 and psi_diff > -20) {
- setprop("/systems/hydraulic/ptu-active", 0);
- }
-
- ptu_active = getprop("/systems/hydraulic/ptu-active");
-
- if (elec_pump_blue_sw and dc_ess >= 25 and !blue_pump_fail and (stateL == 3 or stateR == 3 or getprop("/gear/gear[0]/wow") == 0) and !blue_leak) {
- if (blue_psi < 2900) {
- setprop("/systems/hydraulic/blue-psi", blue_psi + 50);
- } else {
- setprop("/systems/hydraulic/blue-psi", 3000);
- }
- } else if (gs >= 50 and (rat == 1) and !blue_leak) {
- if (blue_psi < 2400) {
- setprop("/systems/hydraulic/blue-psi", blue_psi + 50);
- } else {
- setprop("/systems/hydraulic/blue-psi", 2500);
- }
- } else {
- if (blue_psi > 1) {
- setprop("/systems/hydraulic/blue-psi", blue_psi - 25);
- } else {
- setprop("/systems/hydraulic/blue-psi", 0);
- }
- }
-
- if (eng1_pump_sw and stateL == 3 and !green_pump_fail and !green_leak) {
- if (green_psi < 2900) {
- setprop("/systems/hydraulic/green-psi", green_psi + 50);
- } else {
- setprop("/systems/hydraulic/green-psi", 3000);
- }
- } else if (ptu_active and !ptu_fail and yellow_psi >= 1500 and !green_leak) {
- if (green_psi < 2900) {
- setprop("/systems/hydraulic/green-psi", green_psi + 50);
- } else {
- setprop("/systems/hydraulic/green-psi", 3000);
- }
- } else {
- if (green_psi > 1) {
- setprop("/systems/hydraulic/green-psi", green_psi - 25);
- } else {
- setprop("/systems/hydraulic/green-psi", 0);
- }
- }
-
- if (eng2_pump_sw and stateR == 3 and !yellow_pump_eng_fail and !yellow_leak) {
- if (yellow_psi < 2900) {
- setprop("/systems/hydraulic/yellow-psi", yellow_psi + 50);
- } else {
- setprop("/systems/hydraulic/yellow-psi", 3000);
- }
- } else if (elec_pump_yellow_sw and dc_ess >= 25 and !yellow_pump_elec_fail and !yellow_leak) {
- if (yellow_psi < 2900) {
- setprop("/systems/hydraulic/yellow-psi", yellow_psi + 50);
- } else {
- setprop("/systems/hydraulic/yellow-psi", 3000);
- }
- } else if (ptu_active and !ptu_fail and green_psi >= 1500 and !yellow_leak) {
- if (yellow_psi < 2900) {
- setprop("/systems/hydraulic/yellow-psi", yellow_psi + 50);
- } else {
- setprop("/systems/hydraulic/yellow-psi", 3000);
- }
- } else if (yellow_hand_pump and !yellow_leak and (getprop("/gear/gear[0]/wow") or getprop("/gear/gear[1]/wow") or getprop("/gear/gear[2]/wow"))) {
- if (yellow_psi < 2900) {
- setprop("/systems/hydraulic/yellow-psi", yellow_psi + 25);
- } else {
- setprop("/systems/hydraulic/yellow-psi", 3000);
- }
- } else {
- if (yellow_psi > 1) {
- setprop("/systems/hydraulic/yellow-psi", yellow_psi - 25);
- } else {
- setprop("/systems/hydraulic/yellow-psi", 0);
- }
- }
-
- accum = getprop("/systems/hydraulic/brakes/accumulator-pressure-psi");
- lpsi = getprop("/systems/hydraulic/brakes/pressure-left-psi");
- rpsi = getprop("/systems/hydraulic/brakes/pressure-right-psi");
- parking = getprop("/controls/gear/brake-parking");
- askidnws_sw = getprop("/systems/hydraulic/brakes/askidnwssw");
- brake_mode = getprop("/systems/hydraulic/brakes/mode");
- brake_l = getprop("/systems/hydraulic/brakes/lbrake");
- brake_r = getprop("/systems/hydraulic/brakes/rbrake");
- brake_nose = getprop("/systems/hydraulic/brakes/nose-rubber");
- counter = getprop("/systems/hydraulic/brakes/counter");
-
- if (!parking and askidnws_sw and green_psi > 2500) {
- # set mode to on
- setprop("/systems/hydraulic/brakes/mode", 1);
- } else if ((!parking and askidnws_sw and yellow_psi > 2500) or (!parking and askidnws_sw and accum > 0)) {
- # set mode to altn
- setprop("/systems/hydraulic/brakes/mode", 2);
- } else {
- # set mode to off
- setprop("/systems/hydraulic/brakes/mode", 0);
- }
-
- if (brake_mode == 2 and yellow_psi > 2500 and accum < 700) {
- setprop("/systems/hydraulic/brakes/accumulator-pressure-psi", accum + 50);
- }
-
- # Fault lights
- if (green_pump_fail and eng1_pump_sw) {
- setprop("/systems/hydraulic/eng1-pump-fault", 1);
- } else {
- setprop("/systems/hydraulic/eng1-pump-fault", 0);
- }
-
- if (blue_pump_fail and elec_pump_blue_sw) {
- setprop("/systems/hydraulic/elec-pump-b-fault", 1);
- } else {
- setprop("/systems/hydraulic/elec-pump-b-fault", 0);
- }
-
- if (ptu_fail and ptu_sw) {
- setprop("/systems/hydraulic/ptu-fault", 1);
- } else {
- setprop("/systems/hydraulic/ptu-fault", 0);
- }
-
- if (yellow_pump_eng_fail and eng2_pump_sw) {
- setprop("/systems/hydraulic/eng2-pump-fault", 1);
- } else {
- setprop("/systems/hydraulic/eng2-pump-fault", 0);
- }
-
- if (yellow_pump_elec_fail and elec_pump_yellow_sw) {
- setprop("/systems/hydraulic/elec-pump-y-fault", 1);
- } else {
- setprop("/systems/hydraulic/elec-pump-y-fault", 0);
- }
},
};
diff --git a/Systems/a320-electrical.xml b/Systems/a320-electrical.xml
index 81c7f02e..d9869776 100644
--- a/Systems/a320-electrical.xml
+++ b/Systems/a320-electrical.xml
@@ -327,12 +327,14 @@
/instrumentation/airspeed-indicator/indicated-speed-kt lt 100
/instrumentation/airspeed-indicator/indicated-speed-kt ge 50
/systems/electrical/bus/dc-bat eq 0
+ /sim/time/elapsed-sec gt 10
/instrumentation/airspeed-indicator/indicated-speed-kt lt 50
/controls/electrical/switches/bat-1 eq 1
/controls/electrical/switches/bat-2 eq 1
/systems/electrical/bus/dc-bat eq 0
+ /sim/time/elapsed-sec gt 10
@@ -374,25 +376,11 @@
/controls/electrical/switches/emer-elec-man-on eq 0
- /controls/hydraulic/rat-man eq 1
+ /controls/hydraulic/switches/rat-man eq 1
/controls/electrical/switches/emer-elec-man-on eq 1
-
- /systems/electrical/some-electric-thingie/rat-deploy
-
-
- 0.0
-
-
-
- 1.0
-
-
-
-
-
@@ -416,7 +404,7 @@
/systems/electrical/some-electric-thingie/emer-gen-operate eq 1
- /systems/hydraulic/rat-position eq 1
+ /systems/hydraulic/sources/rat/position eq 1
/controls/electrical/switches/emer-gen-test eq 1
diff --git a/Systems/a320-hydraulic.xml b/Systems/a320-hydraulic.xml
new file mode 100644
index 00000000..51ea5ac5
--- /dev/null
+++ b/Systems/a320-hydraulic.xml
@@ -0,0 +1,488 @@
+
+
+
+
+
+
+ /systems/hydraulic/sys-incr-rate
+ /systems/hydraulic/sources/ptu/green-yellow
+ /systems/hydraulic/sources/ptu/yellow-green
+
+
+
+
+
+
+ /systems/failures/hydraulic/blue-leak eq 1
+
+
+
+
+
+
+ /systems/failures/hydraulic/blue-leak eq 1
+
+
+
+
+ /systems/hydraulic/blue-qty-cmd
+ 100
+ /systems/hydraulic/blue-qty-decr-rate
+
+
+
+
+
+
+ /systems/failures/hydraulic/green-leak eq 1
+
+
+
+
+
+
+ /systems/failures/hydraulic/green-leak eq 1
+
+
+
+
+ /systems/hydraulic/green-qty-cmd
+ 100
+ /systems/hydraulic/green-qty-decr-rate
+
+
+
+
+
+
+ /systems/failures/hydraulic/yellow-leak eq 1
+
+
+
+
+
+
+ /systems/failures/hydraulic/yellow-leak eq 1
+
+
+
+
+ /systems/hydraulic/yellow-qty-cmd
+ 100
+ /systems/hydraulic/yellow-qty-decr-rate
+
+
+
+
+
+
+
+
+
+
+ /systems/acconfig/autoconfig-running eq 1
+
+
+
+
+
+ /systems/electrical/some-electric-thingie/rat-deploy
+
+
+ 0.0
+
+
+
+ 1.0
+
+
+
+
+
+
+
+
+ /instrumentation/airspeed-indicator/indicated-speed-kt
+
+ 99 0
+ 100 2500
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /controls/hydraulic/switches/blue-elec-ovrd eq 1
+ /controls/hydraulic/switches/blue-elec eq 1
+ position/wow eq 1
+
+
+
+ /controls/hydraulic/switches/blue-elec-ovrd eq 1
+ /controls/hydraulic/switches/blue-elec eq 1
+
+
+ /engines/engine[0]/state eq 3
+ /engines/engine[1]/state eq 3
+
+ /systems/electrical/bus/ac-1 ge 110
+
+
+ /systems/electrical/bus/ac-1 ge 110
+ /systems/electrical/relay/apu-glc/contact-pos eq 1
+ /systems/hydraulic/sources/blue-elec/pump-operate-apu-timer ne 0
+
+
+
+
+
+
+ gear/unit[0]/WOW eq 0
+ /systems/electrical/bus/ac-1 ge 110
+
+ /engines/engine[0]/state ne 3
+ /engines/engine[1]/state ne 3
+
+ /systems/electrical/relay/apu-glc/contact-pos eq 1
+
+
+
+
+ Timer for the ECAM system
+ /systems/hydraulic/sources/blue-elec/pump-operate-apu
+ 100
+ 0.0083333
+
+
+
+
+
+
+ /systems/failures/hydraulic/blue-elec
+ 1
+
+
+ /systems/hydraulic/sources/blue-elec/pump-operate
+
+ 0 0
+ 1 3000
+
+
+ 0
+
+
+
+
+
+
+
+ /systems/failures/hydraulic/blue-elec eq 0
+
+
+
+
+
+
+
+
+ /systems/failures/hydraulic/green-edp
+ 1
+
+
+ /engines/engine[0]/n2-actual
+
+ 40 0
+ 45 3000
+
+
+ 0
+
+
+
+
+
+
+
+ /controls/hydraulic/switches/green-edp eq 1
+
+
+
+
+
+
+
+ /controls/hydraulic/switches/yellow-elec eq 1
+
+ /systems/electrical/sources/ext/output-volt ge 110
+ /systems/electrical/bus/ac-2 ge 110
+
+
+
+
+
+
+
+
+ /systems/failures/hydraulic/yellow-elec
+ 1
+
+
+ /systems/hydraulic/sources/yellow-elec/pump-operate
+
+ 0 0
+ 1 3000
+
+
+ 0
+
+
+
+
+
+
+
+ /systems/failures/hydraulic/yellow-elec eq 0
+
+
+
+
+
+
+
+
+ /systems/failures/hydraulic/yellow-edp
+ 1
+
+
+ /engines/engine[1]/n2-actual
+
+ 40 0
+ 45 3000
+
+
+ 0
+
+
+
+
+
+
+
+ /controls/hydraulic/switches/yellow-edp eq 1
+
+
+
+
+
+
+
+
+ /systems/hydraulic/blue-qty
+ 1.0
+
+
+ /systems/hydraulic/sources/blue-elec/output-psi
+ /systems/hydraulic/sources/rat/output-psi
+
+ 0
+
+
+
+
+
+ /systems/hydraulic/blue-psi-cmd
+ /systems/hydraulic/sys-incr-rate
+ /systems/hydraulic/sys-decr-rate
+
+
+
+
+
+
+
+ /systems/hydraulic/green-qty
+ 1.0
+
+ /systems/hydraulic/sources/green-edp/output-psi
+ 0
+
+
+
+
+
+
+
+
+ /systems/hydraulic/green-qty
+ 1.0
+
+
+ /systems/hydraulic/green-psi-cmd-pump
+ /systems/hydraulic/sources/ptu/yellow-green
+
+ 0
+
+
+
+
+
+ /systems/hydraulic/green-psi-cmd
+ /systems/hydraulic/sys-incr-rate
+ /systems/hydraulic/sys-decr-rate
+
+
+
+
+
+
+
+ /systems/hydraulic/yellow-qty
+ 1.0
+
+
+ /systems/hydraulic/sources/yellow-edp/output-psi
+ /systems/hydraulic/sources/yellow-elec/output-psi
+
+ 0
+
+
+
+
+
+
+
+
+ /systems/hydraulic/yellow-qty
+ 1.0
+
+
+ /systems/hydraulic/yellow-psi-cmd-pump
+ /systems/hydraulic/sources/ptu/green-yellow
+
+ 0
+
+
+
+
+
+ /systems/hydraulic/yellow-psi-cmd
+ /systems/hydraulic/sys-incr-rate
+ /systems/hydraulic/sys-decr-rate
+
+
+
+
+
+
+ /systems/hydraulic/yellow-psi
+ /systems/hydraulic/green-psi
+
+
+
+
+
+
+
+ /systems/hydraulic/yellow-psi-diff gt 500
+ /systems/hydraulic/yellow-psi-diff lt -500
+
+
+
+
+
+
+ /controls/hydraulic/switches/ptu eq 1
+ /systems/hydraulic/sources/ptu/ptu-active eq 1
+ /systems/electrical/bus/dc-2 ge 25
+ /systems/failures/hydraulic/ptu ne 1
+
+
+
+
+
+
+ /controls/hydraulic/switches/ptu eq 1
+ /systems/hydraulic/sources/ptu/ptu-active eq 1
+ /systems/electrical/bus/dc-2 ge 25
+ /systems/failures/hydraulic/ptu ne 1
+
+
+
+
+
+
+
+
+
+
+
+ /systems/hydraulic/sources/blue-elec/output-psi le 1450
+
+ /engines/engine[0]/state eq 3
+ /engines/engine[1]/state eq 3
+
+
+ /systems/hydraulic/blue-qty lt 2.4
+
+
+
+
+
+
+
+ /systems/hydraulic/sources/green-edp/output-psi le 1750
+ /engines/engine[0]/state eq 3
+
+
+ /systems/hydraulic/green-qty lt 3.5
+
+
+
+
+
+
+
+
+ /systems/hydraulic/sources/yellow-edp/output-psi le 1750
+ /engines/engine[1]/state eq 3
+
+
+ /systems/hydraulic/yellow-qty lt 3.5
+
+
+
+
+
+
+
+
+ /systems/hydraulic/sources/yellow-elec/output-psi le 1450
+ /systems/hydraulic/sources/yellow-edp/output-psi le 1750
+
+ /systems/hydraulic/sources/ptu/green-yellow le 1750
+ /systems/hydraulic/sources/ptu/yellow-green le 1750
+
+
+
+ /systems/hydraulic/yellow-qty lt 3.5
+
+
+
+
+
+
+
+ /systems/hydraulic/yellow-qty lt 3.5
+ /systems/hydraulic/green-qty lt 3.5
+
+
+
+
+