1
0
Fork 0

Merge branch 'dev' into 3D

This commit is contained in:
legoboyvdlp R 2021-07-29 17:55:36 +01:00
commit 945c5e1327
20 changed files with 662 additions and 126 deletions

View file

@ -289,6 +289,7 @@
<system file="a320-engine-fire"/>
<system file="a320-adr"/>
<system file="a320-apu"/>
<system file="a320-oxygen"/>
<system file="a320-fmgc"/>
<system file="a320-misc"/>
<system file="a320-cockpit"/>

View file

@ -289,6 +289,7 @@
<system file="a320-engine-fire"/>
<system file="a320-adr"/>
<system file="a320-apu"/>
<system file="a320-oxygen"/>
<system file="a320-fmgc"/>
<system file="a320-misc"/>
<system file="a320-cockpit"/>

View file

@ -1033,6 +1033,8 @@
<dome-norm type="double">0</dome-norm>
<fcu-panel-knb type="double">0</fcu-panel-knb>
<fcu-panel-norm type="double">0</fcu-panel-norm>
<fcu-digit-knb type="double">1</fcu-digit-knb>
<fcu-digit-norm type="double">1</fcu-digit-norm>
<landing-lights n="0" type="double">0</landing-lights>
<landing-lights n="1" type="double">0</landing-lights>
<landing-lights n="2" type="double">0</landing-lights>
@ -1105,6 +1107,19 @@
<ratman type="bool">0</ratman>
</protectors>
</OH>
<oxygen>
<cockpit-oxygen-supply-pb type="bool">0</cockpit-oxygen-supply-pb>
<cockpit-mask-1-on type="bool">0</cockpit-mask-1-on>
<cockpit-mask-2-on type="bool">0</cockpit-mask-2-on>
<cockpit-mask-3-on type="bool">0</cockpit-mask-3-on>
<cockpit-mask-4-on type="bool">0</cockpit-mask-4-on>
<cockpit-mask-1-selector type="bool">0</cockpit-mask-1-selector>
<cockpit-mask-2-selector type="bool">0</cockpit-mask-2-selector>
<cockpit-mask-3-selector type="bool">0</cockpit-mask-3-selector>
<cockpit-mask-4-selector type="bool">0</cockpit-mask-4-selector>
<passenger-mask-deploy-man type="bool">0</passenger-mask-deploy-man>
<passenger-mask-reset type="bool">0</passenger-mask-reset>
</oxygen>
<pneumatics n="0">
<switches n="0">
<apu type="bool">0</apu>
@ -1620,6 +1635,7 @@
<operating-3 type="bool">0</operating-3>
</adr>
</navigation>
</systems>
<options n="0">

View file

@ -289,6 +289,7 @@
<system file="a320-engine-fire"/>
<system file="a320-adr"/>
<system file="a320-apu"/>
<system file="a320-oxygen"/>
<system file="a320-fmgc"/>
<system file="a320-misc"/>
<system file="a320-cockpit"/>

View file

@ -289,6 +289,7 @@
<system file="a320-engine-fire"/>
<system file="a320-adr"/>
<system file="a320-apu"/>
<system file="a320-oxygen"/>
<system file="a320-fmgc"/>
<system file="a320-misc"/>
<system file="a320-cockpit"/>

View file

@ -327,7 +327,7 @@ var beforestart = func {
setprop("/controls/flight/elevator-trim", 0);
libraries.systemsInit();
libraries.variousReset();
setprop("/controls/oxygen/crewOxyPB", 1);
setprop("/controls/oxygen/cockpit-oxygen-supply-pb", 1);
failResetOld();
# Now the Startup!
@ -423,7 +423,7 @@ var taxi = func {
setprop("/controls/flight/elevator-trim", 0);
libraries.systemsInit();
libraries.variousReset();
setprop("/controls/oxygen/crewOxyPB", 1);
setprop("/controls/oxygen/cockpit-oxygen-supply-pb", 1);
failResetOld();
# Now the Startup!

View file

@ -342,6 +342,56 @@
<value>1</value>
</binding>
</button>
<group>
<layout>hbox</layout>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
<text>
<label>Oxygen</label>
</text>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
</group>
<text>
<x>10</x>
<y>200</y>
<label>8888 litres</label><!-- placeholder for width -->
<format>%4.0f litres</format>
<property>/systems/oxygen/cockpit-oxygen/cockpit-bottle-L</property>
<live>true</live>
</text>
<button>
<legend>Replace Oxygen Bottle</legend>
<halign>center</halign>
<padding>5</padding>
<enable>
<property>/gear/gear[1]/wow</property>
</enable>
<binding>
<command>property-assign</command>
<property>/systems/oxygen/cockpit-oxygen/cockpit-bottle-L</property>
<value>2183</value>
</binding>
</button>
<button>
<legend>Reset Pax Oxy Masks</legend>
<halign>center</halign>
<padding>5</padding>
<enable>
<property>/gear/gear[1]/wow</property>
</enable>
<binding>
<command>property-assign</command>
<property>/systems/oxygen/passenger-oxygen/masks-deploy</property>
<value>0</value>
</binding>
</button>
</group>
</PropertyList>

View file

@ -6264,6 +6264,47 @@
<object-name>fcu_integ_knb.axis</object-name>
</axis>
</animation>
<animation>
<type>pick</type>
<object-name>lt_knb_1.001</object-name>
<action>
<button>0</button>
<button>3</button>
<repeatable>true</repeatable>
<binding>
<command>property-adjust</command>
<property>controls/lighting/fcu-digit-knb</property>
<step>0.05</step>
<max>1</max>
</binding>
</action>
<action>
<button>1</button>
<button>4</button>
<repeatable>true</repeatable>
<binding>
<command>property-adjust</command>
<property>controls/lighting/fcu-digit-knb</property>
<step>-0.05</step>
<min>0</min>
</binding>
</action>
</animation>
<animation>
<type>rotate</type>
<object-name>lt_knb_1.001</object-name>
<property>controls/lighting/fcu-digit-knb</property>
<factor>10</factor>
<axis>
<x1-m>-0.450412</x1-m>
<y1-m>0.06869</y1-m>
<z1-m>0.375016</z1-m>
<x2-m>-0.45531</x2-m>
<y2-m>0.068899</y2-m>
<z2-m>0.385331</z2-m>
</axis>
</animation>
<animation>
<name>Main Panel and Pedestal lighting</name>
@ -7552,15 +7593,32 @@
<animation>
<type>material</type>
<object-name>spd-text</object-name>
<object-name>spd.ind</object-name>
<object-name>spd.fmgc</object-name>
<object-name>mach-text</object-name>
<object-name>mach.ind</object-name>
<object-name>hdg-text</object-name>
<object-name>hdg.ind</object-name>
<object-name>trk.ind</object-name>
<object-name>lat.fmgc</object-name>
<object-name>hdg2.ind</object-name>
<object-name>trk2.ind</object-name>
<object-name>alt-text</object-name>
<object-name>vs.dash</object-name>
<object-name>vs-text</object-name>
<object-name>vs-text-last-2-digits</object-name>
<object-name>spd-text-test</object-name>
<object-name>hdg-text-test</object-name>
<object-name>alt-text-test</object-name>
<object-name>vs-text-test</object-name>
<object-name>vs.ind.001</object-name>
<object-name>vs.ind.002</object-name>
<object-name>ver.fmgc</object-name>
<object-name>lvlch.ind</object-name>
<object-name>alt.ind</object-name>
<object-name>vs.ind</object-name>
<object-name>fpa.ind</object-name>
<object-name>fpa.ind.001</object-name>
<object-name>atc-code</object-name>
<object-name>atc-test</object-name>
<object-name>fpa-text</object-name>
@ -7570,6 +7628,34 @@
<object-name>qnh-test</object-name>
<object-name>rudder-trim</object-name>
<object-name>rudder-trim-letter</object-name>
<diffuse>
<red>0.75</red>
<green>0.30</green>
<blue>0.0</blue>
<factor-prop>controls/lighting/fcu-digit-norm</factor-prop>
</diffuse>
<ambient>
<red>0</red>
<green>0</green>
<blue>0</blue>
</ambient>
<specular>
<red>0</red>
<green>0</green>
<blue>0</blue>
</specular>
<emission>
<red>0.75</red>
<green>0.30</green>
<blue>0.0</blue>
<factor-prop>controls/lighting/fcu-digit-norm</factor-prop>
</emission>
</animation>
<animation>
<type>material</type>
<object-name>rudder-trim</object-name>
<object-name>rudder-trim-letter</object-name>
<diffuse>
<red>0.75</red>
<green>0.30</green>

View file

@ -26,7 +26,6 @@ var canvas_lowerECAMPageDoor =
obj["Cabin3LeftSlide"].hide();
obj["Cabin3RightSlide"].hide();
obj["DOOROXY-REGUL-LO-PR"].hide();
obj["AvionicsLine1"].hide();
obj["AvionicsLine2"].hide();
obj["AvionicsLbl1"].hide();
@ -153,16 +152,23 @@ var canvas_lowerECAMPageDoor =
obj["Cargo1Line"].hide();
}
}),
props.UpdateManager.FromHashValue("oxyPB", nil, func(val) {
if (val) {
obj["DOOROXY-OxyIndicator"].setColor(0.8078,0.8039,0.8078);
obj["DOOROXY-PR"].setColor(0.0509,0.7529,0.2941);
obj["DOOROXY-PR"].setText("1300");
props.UpdateManager.FromHashList(["oxyPB","oxyBottlePress","oxyBottleRegulLoPr"], nil, func(val) {
if (val.oxyPB) {
if (val.oxyBottlePress < 300 or val.oxyBottleRegulLoPr) {
obj["DOOROXY-OxyIndicator"].setColor(0.7333,0.3803,0);
} else {
obj["DOOROXY-OxyIndicator"].setColor(0.8078,0.8039,0.8078);
}
} else {
obj["DOOROXY-OxyIndicator"].setColor(0.7333,0.3803,0);
obj["DOOROXY-PR"].setColor(0.7333,0.3803,0);
obj["DOOROXY-PR"].setText("0");
}
if (val.oxyBottlePress < 300) {
obj["DOOROXY-PR"].setColor(0.7333,0.3803,0);
} else {
obj["DOOROXY-PR"].setColor(0.0509,0.7529,0.2941);
}
obj["DOOROXY-PR"].setText(sprintf("%4.0f", math.round(val.oxyBottlePress, 10)));
}),
props.UpdateManager.FromHashValue("pressVS", nil, func(val) {
if (val > 9950) {
@ -186,6 +192,13 @@ var canvas_lowerECAMPageDoor =
obj["DOOR-VS-Container"].hide();
}
}),
props.UpdateManager.FromHashValue("oxyBottleRegulLoPr", nil, func(val) {
if (val) {
obj["DOOROXY-REGUL-LO-PR"].show();
} else {
obj["DOOROXY-REGUL-LO-PR"].hide();
}
}),
];
obj.displayedGForce = 0;
@ -326,7 +339,9 @@ var input = {
cargoAft: "/sim/model/door-positions/cargoaft/position-norm",
cargoBulk: "/sim/model/door-positions/cargobulk/position-norm",
cargoFwd: "/sim/model/door-positions/cargofwd/position-norm",
oxyPB: "/controls/oxygen/crewOxyPB",
oxyPB: "/controls/oxygen/cockpit-oxygen-supply-pb",
oxyBottlePress: "/systems/oxygen/cockpit-oxygen/bottle-psi",
oxyBottleRegulLoPr: "/systems/oxygen/cockpit-oxygen/regul-lo-pr",
};
foreach (var name; keys(input)) {

View file

@ -631,14 +631,16 @@ var canvas_lowerECAMPageElec =
} else {
obj["ELEC-Line-APU-EXT"].hide();
}
if (val.elecExtEPC and (val.elecAcTie1 or val.elecAcTie2)) {
}),
props.UpdateManager.FromHashValue("elecExtEPC", nil, func(val) {
if (val) {
obj["EXT-out"].show();
} else {
obj["EXT-out"].hide();
}
if (val.apuGLC and (val.elecAcTie1 or val.elecAcTie2)) {
}),
props.UpdateManager.FromHashValue("apuGLC", nil, func(val) {
if (val) {
obj["APU-out"].show();
} else {
obj["APU-out"].hide();

View file

@ -7314,6 +7314,10 @@
<command>nasal</command>
<script>libraries.MechCallFunc();</script>
</binding>
<binding>
<command>nasal</command>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -7333,6 +7337,33 @@
<command>nasal</command>
<script>libraries.CabinCallFunc();</script>
</binding>
<binding>
<command>nasal</command>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>AftCabinCall</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>nasal</command>
<script>libraries.CabinCallFunc();</script>
</binding>
<binding>
<command>nasal</command>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -7524,37 +7555,13 @@
</action>
</animation>
<animation>
<type>pick</type>
<object-name>PassOxyInd</object-name>
<object-name>PassOxyInd1S</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>controls/oxygen/masksSys</property>
</binding>
<binding>
<command>nasal</command>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
<animation>
<type>select</type>
<object-name>PassOxyInd1S</object-name>
<condition>
<or>
<equals>
<property>controls/oxygen/masksSys</property>
<property>/systems/oxygen/passenger-oxygen/sys-on-light</property>
<value>1</value>
</equals>
<equals>
@ -7580,7 +7587,7 @@
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>controls/oxygen/crewOxyPB</property>
<property>controls/oxygen/cockpit-oxygen-supply-pb</property>
</binding>
<binding>
<command>nasal</command>
@ -7595,7 +7602,7 @@
<condition>
<or>
<equals>
<property>controls/oxygen/crewOxyPB</property>
<property>controls/oxygen/cockpit-oxygen-supply-pb</property>
<value>0</value>
</equals>
<equals>
@ -7625,8 +7632,9 @@
</greater-than-equals>
</and>
</condition>
<command>property-toggle</command>
<property>controls/oxygen/masksDeployMan</property>
<command>property-assign</command>
<property>controls/oxygen/passenger-mask-deploy-man</property>
<value>1</value>
</binding>
<binding>
<condition>
@ -7638,17 +7646,36 @@
<command>nasal</command>
<script>libraries.pushbutton();</script>
</binding>
<binding>
<condition>
<equals>
<property>controls/OH/protectors/maskman</property>
<value>1</value>
</equals>
</condition>
<command>property-assign</command>
<property>controls/OH/protectors/maskman</property>
<value>0</value>
</binding>
<mod-up>
<binding>
<condition>
<and>
<equals>
<property>controls/OH/protectors/maskman</property>
<value>1</value>
</equals>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</and>
</condition>
<command>property-assign</command>
<property>controls/oxygen/passenger-mask-deploy-man</property>
<value>0</value>
</binding>
<binding>
<condition>
<equals>
<property>controls/OH/protectors/maskman</property>
<value>1</value>
</equals>
</condition>
<command>property-assign</command>
<property>controls/OH/protectors/maskman</property>
<value>0</value>
</binding>
</mod-up>
</action>
</animation>

View file

@ -3460,12 +3460,6 @@ var messages_right_memo = func {
park_brk.colour = "g";
}
if (getprop("/controls/gear/brake-fans") == 1) {
brk_fan.active = 1;
} else {
brk_fan.active = 0;
}
if (systems.HYD.Switch.ptu.getValue() == 1 and ((systems.HYD.Psi.yellow.getValue() < 1450 and systems.HYD.Psi.green.getValue() > 1450 and getprop("/controls/hydraulic/elec-pump-yellow") == 0) or (systems.HYD.Psi.yellow.getValue() > 1450 and systems.HYD.Psi.green.getValue() < 1450))) {
ptu.active = 1;
} else {
@ -3507,7 +3501,13 @@ var messages_right_memo = func {
} else {
ram_air.active = 0;
}
if (getprop("/systems/oxygen/passenger-oxygen/sys-on-light") == 1) {
pax_oxy.active = 1;
} else {
pax_oxy.active = 0;
}
if (getprop("/controls/engines/engine[0]/igniter-a") == 1 or getprop("/controls/engines/engine[0]/igniter-b") == 1 or getprop("/controls/engines/engine[1]/igniter-a") == 1 or getprop("/controls/engines/engine[1]/igniter-b") == 1) {
ignition.active = 1;
} else {
@ -3531,6 +3531,24 @@ var messages_right_memo = func {
company_call.active = 0;
}
if (mcdu.ReceivedMessagesDatabase.firstUnviewed() != -99 and (phaseVarMemo2 <= 2 or phaseVarMemo2 == 6 or phaseVarMemo2 >= 9)) {
company_msg.active = 1;
} else {
company_msg.active = 0;
}
if (getprop("/controls/ice-protection/leng") == 1 or getprop("/controls/ice-protection/reng") == 1 or getprop("/systems/electrical/bus/dc-1") == 0 or getprop("/systems/electrical/bus/dc-2") == 0) {
eng_aice.active = 1;
} else {
eng_aice.active = 0;
}
if (wing_pb.getValue() == 1) {
wing_aice.active = 1;
} else {
wing_aice.active = 0;
}
if (getprop("/controls/pneumatics/switches/apu") == 1 and pts.APU.rpm.getValue() >= 95) {
apu_bleed.active = 1;
} else {
@ -3549,22 +3567,16 @@ var messages_right_memo = func {
ldg_lt.active = 0;
}
if (mcdu.ReceivedMessagesDatabase.firstUnviewed() != -99 and (phaseVarMemo2 <= 2 or phaseVarMemo2 == 6 or phaseVarMemo2 >= 9)) {
company_msg.active = 1;
if (getprop("/controls/gear/brake-fans") == 1) {
brk_fan.active = 1;
} else {
company_msg.active = 0;
brk_fan.active = 0;
}
if (getprop("/controls/ice-protection/leng") == 1 or getprop("/controls/ice-protection/reng") == 1 or getprop("/systems/electrical/bus/dc-1") == 0 or getprop("/systems/electrical/bus/dc-2") == 0) {
eng_aice.active = 1;
if (getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override") == 1) { # todo: emer elec
gpws_flap3.active = 1;
} else {
eng_aice.active = 0;
}
if (wing_pb.getValue() == 1) {
wing_aice.active = 1;
} else {
wing_aice.active = 0;
gpws_flap3.active = 0;
}
if (!getprop("/systems/radio/vhf3-data-mode") and (phaseVarMemo3 == 1 or phaseVarMemo3 == 2 or phaseVarMemo3 == 6 or phaseVarMemo3 == 9 or phaseVarMemo3 == 10)) {
@ -3591,6 +3603,12 @@ var messages_right_memo = func {
auto_brk_max.active = 0;
}
if (phaseVarMemo3 >= 2 and phaseVarMemo3 <= 9 and systems.ELEC.Bus.ac1.getValue() >= 110 and systems.ELEC.Bus.ac2.getValue() >= 110 and (getprop("/systems/fuel/feed-center-1") or getprop("/systems/fuel/feed-center-2"))) {
ctr_tk_feedg.active = 1;
} else {
ctr_tk_feedg.active = 0;
}
if (systems.FUEL.Valves.crossfeed.getValue() != 0 and systems.FUEL.Switches.crossfeed.getValue()) {
fuelx.active = 1;
} else {
@ -3603,16 +3621,10 @@ var messages_right_memo = func {
fuelx.colour = "g";
}
if (getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override") == 1) { # todo: emer elec
gpws_flap3.active = 1;
if (systems.SwitchingPanel.Switches.airData.getValue() != 0 or systems.SwitchingPanel.Switches.attHdg.getValue() != 0) {
adirs_switch.active = 1;
} else {
gpws_flap3.active = 0;
}
if (phaseVarMemo3 >= 2 and phaseVarMemo3 <= 9 and systems.ELEC.Bus.ac1.getValue() >= 110 and systems.ELEC.Bus.ac2.getValue() >= 110 and (getprop("/systems/fuel/feed-center-1") or getprop("/systems/fuel/feed-center-2"))) {
ctr_tk_feedg.active = 1;
} else {
ctr_tk_feedg.active = 0;
adirs_switch.active = 0;
}
}

View file

@ -796,8 +796,11 @@ var memos = std.Vector.new([
var rat = memo.new(msg: "RAT OUT" ),
var emer_gen = memo.new(msg: "EMER GEN" ),
var ram_air = memo.new(msg: "RAM AIR ON" ),
var pax_oxy = memo.new(msg: "OXY PAX ON" ),
var nw_strg_disc = memo.new(msg: "NW STRG DISC"),
var ignition = memo.new(msg: "IGNITION" ),
var eng1Cowl = memo.new(msg: "ENG 1 COWL" ), # Not yet implemented (NEO)
var eng2Cowl = memo.new(msg: "ENG 2 COWL" ), # Not yet implemented (NEO)
var cabin_ready = memo.new(msg: "CABIN READY" ), # Not yet implemented
var pred_ws_off = memo.new(msg: "PRED W/S OFF"), # Not yet implemented
var terr_stby = memo.new(msg: "TERR STBY" ), # Not yet implemented
@ -825,7 +828,8 @@ var memos = std.Vector.new([
var auto_brk_off = memo.new(msg: "AUTO BRK OFF"), # Not yet implemented
var man_ldg_elev = memo.new(msg: "MAN LDG ELEV"), # Not yet implemented
var ctr_tk_feedg = memo.new(msg: "CTR TK FEEDG"),
var fuelx = memo.new(msg: "FUEL X FEED" )
var fuelx = memo.new(msg: "FUEL X FEED" ),
var adirs_switch = memo.new(msg: "ADIRS SWTG" ) # Not yet implemented
]);
var clearWarnings = std.Vector.new();

View file

@ -30,7 +30,6 @@ var variousReset = func() {
setprop("/controls/CVR/gndctl", 0);
setprop("/controls/CVR/erase", 0);
setprop("/controls/switches/pneumatics/cabin-fans", 1);
setprop("/controls/oxygen/crewOxyPB", 0); # 0 = OFF 1 = AUTO
setprop("/controls/switches/emerCallLtO", 0); # ON light, flashes white for 10s
setprop("/controls/switches/emerCallLtC", 0); # CALL light, flashes amber for 10s
setprop("/controls/switches/emerCall", 0);

View file

@ -140,10 +140,8 @@ var PNEU = {
#setprop("/systems/ventilation/cabin/fans", 0); # aircon fans
#setprop("/systems/ventilation/avionics/extractvalve", "0");
#setprop("/systems/ventilation/avionics/inletvalve", "0");
setprop("/controls/oxygen/masksDeploy", 0);
setprop("/controls/oxygen/masksDeployMan", 0);
setprop("/controls/oxygen/masksReset", 0); # this is the TMR RESET pb on the maintenance panel, needs 3D model
setprop("/controls/oxygen/masksSys", 0);
setprop("/controls/oxygen/passenger-mask-deploy-man", 0);
setprop("/controls/oxygen/passenger-mask-reset", 0); # this is the TMR RESET pb on the maintenance panel, needs 3D model
},
resetFail: func() {
me.Fail.apu.setBoolValue(0);
@ -206,41 +204,5 @@ var PNEU = {
#setprop("/systems/ventilation/avionics/extractvalve", "1");
#setprop("/systems/ventilation/avionics/inletvalve", "1");
#}
# Oxygen
if (cabinalt > 13500) {
setprop("/controls/oxygen/masksDeploy", 1);
setprop("/controls/oxygen/masksSys", 1);
}
},
};
# Oxygen (Cabin)
setlistener("/controls/oxygen/masksDeployMan", func {
guard = getprop("/controls/oxygen/masksGuard");
masks = getprop("/controls/oxygen/masksDeployMan");
if (guard and masks) {
setprop("/controls/oxygen/masksDeployMan", 0);
} else if (!guard and masks) {
setprop("/controls/oxygen/masksDeployMan", 1);
setprop("/controls/oxygen/masksDeploy", 1);
setprop("/controls/oxygen/masksSys", 1);
}
}, 0, 0);
setlistener("/controls/oxygen/masksDeployMan", func {
masks = getprop("/controls/oxygen/masksDeployMan");
if (!masks) {
setprop("/controls/oxygen/masksDeployMan", 1);
}
}, 0, 0);
setlistener("/controls/oxygen/masksDeploy", func {
autoMasks = getprop("/controls/oxygen/masksDeploy");
if (!autoMasks) {
setprop("/controls/oxygen/masksDeploy", 1);
}
}, 0, 0);
};

View file

@ -2001,6 +2001,22 @@
</volume>
</announcements>
<announcements>
<name>depressurization</name>
<mode>once</mode>
<path>Aircraft/A320-family/Sounds/Announce/depressurization.wav</path>
<condition>
<equals>
<property>/systems/oxygen/passenger-oxygen/sys-on-light</property>
<value>1</value>
</equals>
</condition>
<volume>
<property>/sim/current-view/internal</property>
<factor>2.0</factor>
</volume>
</announcements>
<chime>
<name>Click</name>
<path>Aircraft/A320-family/Sounds/Cockpit/click.wav</path>

Binary file not shown.

View file

@ -32,6 +32,13 @@
<output>/controls/lighting/fcu-panel-norm</output>
</filter>
<filter>
<type>gain</type>
<gain>1.0</gain>
<input>/controls/lighting/fcu-digit-norm-tied</input>
<output>/controls/lighting/fcu-digit-norm</output>
</filter>
<filter>
<type>gain</type>
<gain>1.0</gain>

View file

@ -34,6 +34,13 @@
</test>
</switch>
<switch name="/controls/lighting/fcu-digit-norm-tied">
<default value="0" />
<test value="/controls/lighting/fcu-digit-knb">
/systems/electrical/bus/ac-1 gt 25
</test>
</switch>
<switch name="/controls/lighting/main-panel-norm-tied">
<default value="0" />
<test value="/controls/lighting/main-panel-knb">

329
Systems/a320-oxygen.xml Normal file
View file

@ -0,0 +1,329 @@
<!-- Airbus A320 Fuel -->
<!-- Copyright (c) 2019 Jonathan Redpath -->
<system name="A320: Oxygen">
<property value="2183">/systems/oxygen/cockpit-oxygen/cockpit-bottle-L</property>
<property value="15">/systems/oxygen/cockpit-oxygen/distributor-manifold-L</property>
<channel name="Cockpit Oxygen" execrate="8">
<!-- Bottle: 2183L @ 1850 psi NTPD -->
<!-- Regulator:
HP - transducer to ECAM
LP - 65 to 94 psi
flow: 0 to 300 L / min
Cyl PSI: 100 to 2030 psi
-->
<switch name="/systems/oxygen/cockpit-oxygen/supply-valve-cmd">
<default value="0"/>
<test logic="AND" value="1"> <!-- solenoid valve; when not energized, it shuts -->
/controls/oxygen/cockpit-oxygen-supply-pb eq 1
/systems/electrical/bus/dc-ess-shed ge 25
</test>
</switch>
<actuator name="/systems/oxygen/cockpit-oxygen/supply-valve">
<input>/systems/oxygen/cockpit-oxygen/supply-valve-cmd</input>
<rate_limit>10</rate_limit>
</actuator>
<fcs_function name="/systems/oxygen/cockpit-oxygen/mask-1-flow-rate">
<function>
<product>
<quotient>
<property>/systems/oxygen/cockpit-oxygen/distributor-manifold-L</property>
<value>15</value>
</quotient>
<property>/controls/oxygen/cockpit-mask-1-on</property>
<table>
<independentVar lookup="row">/systems/pressurization/cabinalt</independentVar>
<independentVar lookup="column">/controls/oxygen/cockpit-mask-1-selector</independentVar>
<tableData>
0 1
0 0 29.5
5000 0.0 31.0
8000 0.17 36.4
10000 0.71 36.9
15000 5.60 37.9
20000 15.9 38.9
30000 30.4 39.9
35000 40.9 40.9
40000 41.9 41.9
</tableData>
</table>
</product>
</function>
</fcs_function>
<fcs_function name="/systems/oxygen/cockpit-oxygen/mask-2-flow-rate">
<function>
<product>
<quotient>
<property>/systems/oxygen/cockpit-oxygen/distributor-manifold-L</property>
<value>15</value>
</quotient>
<property>/controls/oxygen/cockpit-mask-2-on</property>
<table>
<independentVar lookup="row">/systems/pressurization/cabinalt</independentVar>
<independentVar lookup="column">/controls/oxygen/cockpit-mask-2-selector</independentVar>
<tableData>
0 1
0 0 29.5
5000 0.0 31.0
8000 0.17 36.4
10000 0.71 36.9
15000 5.60 37.9
20000 15.9 38.9
30000 30.4 39.9
35000 40.9 40.9
40000 41.9 41.9
</tableData>
</table>
</product>
</function>
</fcs_function>
<fcs_function name="/systems/oxygen/cockpit-oxygen/mask-3-flow-rate">
<function>
<product>
<quotient>
<property>/systems/oxygen/cockpit-oxygen/distributor-manifold-L</property>
<value>15</value>
</quotient>
<property>/controls/oxygen/cockpit-mask-3-on</property>
<table>
<independentVar lookup="row">/systems/pressurization/cabinalt</independentVar>
<independentVar lookup="column">/controls/oxygen/cockpit-mask-3-selector</independentVar>
<tableData>
0 1
0 0 29.5
5000 0.0 31.0
8000 0.17 36.4
10000 0.71 36.9
15000 5.60 37.9
20000 15.9 38.9
30000 30.4 39.9
35000 40.9 40.9
40000 41.9 41.9
</tableData>
</table>
</product>
</function>
</fcs_function>
<fcs_function name="/systems/oxygen/cockpit-oxygen/mask-4-flow-rate">
<function>
<product>
<quotient>
<property>/systems/oxygen/cockpit-oxygen/distributor-manifold-L</property>
<value>15</value>
</quotient>
<property>/controls/oxygen/cockpit-mask-4-on</property>
<table>
<independentVar lookup="row">/systems/pressurization/cabinalt</independentVar>
<independentVar lookup="column">/controls/oxygen/cockpit-mask-4-selector</independentVar>
<tableData>
0 1
0 0 29.5
5000 0.0 31.0
8000 0.17 36.4
10000 0.71 36.9
15000 5.60 37.9
20000 15.9 38.9
30000 30.4 39.9
35000 40.9 40.9
40000 41.9 41.9
</tableData>
</table>
</product>
</function>
</fcs_function>
<fcs_function name="Cockpit Oxygen Bottle">
<function>
<sum>
<property>/systems/oxygen/cockpit-oxygen/cockpit-bottle-L</property>
<product>
<quotient>
<property>-/systems/oxygen/cockpit-oxygen/hp-regulator-flow-rate</property>
<value>60</value>
</quotient>
<property>simulation/channel-dt</property>
</product>
</sum>
</function>
<output>/systems/oxygen/cockpit-oxygen/cockpit-bottle-L</output>
<clipto>
<min>0.0</min>
<max>2183.0</max>
</clipto>
</fcs_function>
<fcs_function name="/systems/oxygen/cockpit-oxygen/bottle-psi">
<function>
<product>
<value>58.58145</value>
<pow>
<property>/systems/oxygen/cockpit-oxygen/cockpit-bottle-L</property>
<value>0.4512568</value>
</pow>
</product>
</function>
</fcs_function>
<fcs_function name="/systems/oxygen/cockpit-oxygen/bottle-flow-rate">
<function>
<table>
<independentVar lookup="row">/systems/oxygen/cockpit-oxygen/cockpit-bottle-L</independentVar>
<tableData>
0 0
500 200
1000 275
2000 300
2183 300
</tableData>
</table>
</function>
</fcs_function>
<fcs_function name="/systems/oxygen/cockpit-oxygen/distributor-fill-rate">
<function>
<product>
<property>/systems/oxygen/cockpit-oxygen/supply-valve</property>
<table>
<independentVar lookup="row">/systems/oxygen/cockpit-oxygen/distributor-manifold-L</independentVar>
<tableData>
0 300
14.5 170
15 0
</tableData>
</table>
</product>
</function>
</fcs_function>
<fcs_function name="/systems/oxygen/cockpit-oxygen/hp-regulator-flow-rate-calc">
<function>
<product>
<property>/systems/oxygen/cockpit-oxygen/bottle-flow-rate</property>
<property>/systems/oxygen/cockpit-oxygen/supply-valve</property>
</product>
</function>
</fcs_function>
<fcs_function name="/systems/oxygen/cockpit-oxygen/hp-regulator-flow-rate">
<function>
<sum>
<property>/systems/oxygen/cockpit-oxygen/mask-1-flow-rate</property>
<property>/systems/oxygen/cockpit-oxygen/mask-2-flow-rate</property>
<property>/systems/oxygen/cockpit-oxygen/mask-3-flow-rate</property>
<property>/systems/oxygen/cockpit-oxygen/mask-4-flow-rate</property>
<property>/systems/oxygen/cockpit-oxygen/distributor-fill-rate</property>
</sum>
</function>
<clipto>
<min>0.0</min>
<max>/systems/oxygen/cockpit-oxygen/hp-regulator-flow-rate-calc</max>
</clipto>
</fcs_function>
<!-- Distributor -->
<fcs_function name="/systems/oxygen/cockpit-oxygen/distributor-manifold-rate">
<function>
<sum>
<property>-/systems/oxygen/cockpit-oxygen/mask-1-flow-rate</property>
<property>-/systems/oxygen/cockpit-oxygen/mask-2-flow-rate</property>
<property>-/systems/oxygen/cockpit-oxygen/mask-3-flow-rate</property>
<property>-/systems/oxygen/cockpit-oxygen/mask-4-flow-rate</property>
<property>/systems/oxygen/cockpit-oxygen/hp-regulator-flow-rate</property>
</sum>
</function>
</fcs_function>
<fcs_function name="Cockpit Oxygen Distributor">
<function>
<sum>
<property>/systems/oxygen/cockpit-oxygen/distributor-manifold-L</property>
<product>
<quotient>
<property>/systems/oxygen/cockpit-oxygen/distributor-manifold-rate</property>
<value>60</value>
</quotient>
<property>simulation/channel-dt</property>
</product>
</sum>
</function>
<output>/systems/oxygen/cockpit-oxygen/distributor-manifold-L</output>
<clipto>
<min>0.0</min>
<max>15.0</max>
</clipto>
</fcs_function>
<fcs_function name="/systems/oxygen/cockpit-oxygen/distributor-psi">
<function>
<product>
<value>75</value>
<log10>
<sum>
<property>/systems/oxygen/cockpit-oxygen/distributor-manifold-L</property>
<value>1</value>
</sum>
</log10>
</product>
</function>
</fcs_function>
<switch name="/systems/oxygen/cockpit-oxygen/regul-lo-pr">
<default value="0"/>
<test logic="OR" value="1">
/systems/oxygen/cockpit-oxygen/distributor-psi lt 50
</test>
</switch>
</channel>
<channel name="Passenger Oxygen" execrate="8">
<switch name="/systems/oxygen/passenger-oxygen/pressure-switch">
<defualt value="0"/>
<test logic="AND" value="1">
/systems/pressurization/cabinalt ge 14000
/systems/electrical/bus/dc-ess ge 25
</test>
<!-- HI ALT 16000 -->
</switch>
<switch name="/systems/oxygen/passenger-oxygen/masks-deploy-cmd">
<default value="0"/>
<test logic="OR" value="1">
/systems/oxygen/passenger-oxygen/pressure-switch eq 1
/controls/oxygen/passenger-mask-deploy-man eq 1
</test>
</switch>
<switch name="/systems/oxygen/passenger-oxygen/masks-deploy">
<default value="/systems/oxygen/passenger-oxygen/masks-deploy"/>
<test logic="AND" value="1">
/systems/oxygen/passenger-oxygen/masks-deploy-cmd eq 1
/systems/electrical/bus/ac-ess-shed ge 110
</test>
</switch>
<switch name="Sys On Light">
<default value="/systems/oxygen/passenger-oxygen/sys-on-light"/>
<test logic="OR" value="0">
/controls/oxygen/passenger-mask-reset eq 1
/systems/electrical/bus/dc-ess lt 25
</test>
<test logic="AND" value="1">
/systems/oxygen/passenger-oxygen/masks-deploy-cmd eq 1
/systems/electrical/bus/dc-ess ge 25
</test>
<output>/systems/oxygen/passenger-oxygen/sys-on-light</output>
</switch>
</channel>
</system>