pneumatics and basic LGCIU
This commit is contained in:
parent
59c40cc3e4
commit
a9a1e4ad39
11 changed files with 207 additions and 17 deletions
|
@ -90,6 +90,8 @@
|
|||
<file>Aircraft/A320Family/Nasal/electrical.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/engines.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/hydraulics.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/pneumatics.nas</file>
|
||||
</systems>
|
||||
<fbw>
|
||||
<file>Aircraft/A320Family/Nasal/it-fbw.nas</file>
|
||||
|
|
|
@ -83,6 +83,8 @@
|
|||
<file>Aircraft/A320Family/Nasal/electrical.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/engines.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/hydraulics.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/pneumatics.nas</file>
|
||||
</systems>
|
||||
<fbw>
|
||||
<file>Aircraft/A320Family/Nasal/it-fbw.nas</file>
|
||||
|
|
|
@ -83,6 +83,8 @@
|
|||
<file>Aircraft/A320Family/Nasal/electrical.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/engines.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/hydraulics.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/pneumatics.nas</file>
|
||||
</systems>
|
||||
<fbw>
|
||||
<file>Aircraft/A320Family/Nasal/it-fbw.nas</file>
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
<file>Aircraft/A320Family/Nasal/electrical.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/engines.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/hydraulics.nas</file>
|
||||
<file>Aircraft/A320Family/Nasal/pneumatics.nas</file>
|
||||
</systems>
|
||||
<fbw>
|
||||
<file>Aircraft/A320Family/Nasal/it-fbw.nas</file>
|
||||
|
|
|
@ -54,7 +54,7 @@ var colddark_b = func {
|
|||
# Continues the Cold and Dark script, after engines fully shutdown.
|
||||
setprop("/controls/APU/master", 0);
|
||||
setprop("/controls/APU/start", 0);
|
||||
setprop("/controls/APU/bleed", 0);
|
||||
setprop("/controls/bleed/OHP/bleedapu", 0);
|
||||
setprop("/controls/electrical/switches/gen-apu", 0);
|
||||
setprop("/controls/electrical/switches/battery1", 0);
|
||||
setprop("/controls/electrical/switches/battery2", 0);
|
||||
|
@ -85,7 +85,7 @@ var beforestart = func {
|
|||
setprop("/it-autoflight/input/fd2", 1);
|
||||
setprop("/controls/APU/master", 0);
|
||||
setprop("/controls/APU/start", 0);
|
||||
setprop("/controls/APU/bleed", 0);
|
||||
setprop("/controls/bleed/OHP/bleedapu", 0);
|
||||
setprop("/controls/electrical/switches/gen-apu", 0);
|
||||
setprop("/controls/electrical/switches/battery1", 0);
|
||||
setprop("/controls/electrical/switches/battery2", 0);
|
||||
|
@ -106,7 +106,7 @@ var beforestart_b = func {
|
|||
# Continue with engine start prep.
|
||||
setprop("/controls/electrical/switches/gen-apu", 1);
|
||||
setprop("/controls/electrical/switches/galley", 1);
|
||||
setprop("/controls/APU/bleed", 1);
|
||||
setprop("/controls/bleed/OHP/bleedapu", 1);
|
||||
setprop("/controls/electrical/switches/gen1", 1);
|
||||
setprop("/controls/electrical/switches/gen2", 1);
|
||||
setprop("controls/adirs/ir[0]/knob","2");
|
||||
|
@ -145,7 +145,7 @@ var taxi = func {
|
|||
setprop("/it-autoflight/input/fd2", 1);
|
||||
setprop("/controls/APU/master", 0);
|
||||
setprop("/controls/APU/start", 0);
|
||||
setprop("/controls/APU/bleed", 0);
|
||||
setprop("/controls/bleed/OHP/bleedapu", 0);
|
||||
setprop("/controls/electrical/switches/gen-apu", 0);
|
||||
setprop("/controls/electrical/switches/battery1", 0);
|
||||
setprop("/controls/electrical/switches/battery2", 0);
|
||||
|
@ -166,7 +166,7 @@ var taxi_b = func {
|
|||
# Continue with engine start prep, and start engine 2.
|
||||
setprop("/controls/electrical/switches/gen-apu", 1);
|
||||
setprop("/controls/electrical/switches/galley", 1);
|
||||
setprop("/controls/APU/bleed", 1);
|
||||
setprop("/controls/bleed/OHP/bleedapu", 1);
|
||||
setprop("/controls/electrical/switches/gen1", 1);
|
||||
setprop("/controls/electrical/switches/gen2", 1);
|
||||
setprop("controls/adirs/ir[0]/knob","2");
|
||||
|
@ -200,7 +200,7 @@ var taxi_c = func {
|
|||
var taxi_d = func {
|
||||
# After Start items.
|
||||
setprop("/controls/engines/engine-start-switch", 1);
|
||||
setprop("/controls/APU/bleed", 0);
|
||||
setprop("/controls/bleed/OHP/bleedapu", 0);
|
||||
setprop("/controls/APU/master", 0);
|
||||
setprop("/controls/APU/start", 0);
|
||||
setprop("/systems/acconfig/autoconfig-running", 0);
|
||||
|
|
|
@ -1854,7 +1854,7 @@
|
|||
<repeatable type="bool">false</repeatable>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/pneumatic/engine[0]/bleed</property>
|
||||
<property>controls/bleed/OHP/bleed1</property>
|
||||
</binding>
|
||||
|
||||
</action>
|
||||
|
@ -1863,7 +1863,7 @@
|
|||
<name>Engine 1 bleed on</name>
|
||||
<type>textranslate</type>
|
||||
<object-name>Eng1BleedBtn2</object-name>
|
||||
<property>controls/pneumatic/engine[0]/bleed</property>
|
||||
<property>controls/bleed/OHP/bleed1</property>
|
||||
<factor>0.5</factor>
|
||||
<axis>
|
||||
<x>1</x>
|
||||
|
@ -1883,7 +1883,7 @@
|
|||
<repeatable type="bool">false</repeatable>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/APU/bleed</property>
|
||||
<property>controls/bleed/OHP/bleedapu</property>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
@ -1932,7 +1932,7 @@
|
|||
<repeatable type="bool">false</repeatable>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/pneumatic/engine[1]/bleed</property>
|
||||
<property>controls/bleed/OHP/bleed2</property>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
@ -1940,7 +1940,7 @@
|
|||
<name>Engine 2 bleed on</name>
|
||||
<type>textranslate</type>
|
||||
<object-name>Eng2BleedBtn2</object-name>
|
||||
<property>controls/pneumatic/engine[1]/bleed</property>
|
||||
<property>controls/bleed/OHP/bleed2</property>
|
||||
<factor>0.5</factor>
|
||||
<axis>
|
||||
<x>1</x>
|
||||
|
|
|
@ -14,7 +14,7 @@ setprop("/systems/electrical/bus/ac1", 0);
|
|||
setprop("/systems/electrical/bus/ac2", 0);
|
||||
setprop("/systems/electrical/bus/ac-ess", 0);
|
||||
|
||||
var ADIRSinit = func {
|
||||
var adirs_init = func {
|
||||
var motionroll = getprop("/controls/adirs/motionroll");
|
||||
var motionpitch = getprop("/controls/adirs/motionpitch");
|
||||
setprop("controls/adirs/skip",0); #define this here, as we want this to be off on startup
|
||||
|
|
|
@ -48,7 +48,7 @@ setlistener("/controls/engines/engine[0]/cutoff-switch", func {
|
|||
});
|
||||
|
||||
var start_one_check = func {
|
||||
if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/controls/APU/bleed") == 1) and (getprop("/systems/apu/rpm") >= 98)) {
|
||||
if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/controls/bleed/OHP/bleedapu") == 1) and (getprop("/systems/apu/rpm") >= 98)) {
|
||||
auto_start_one();
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ setlistener("/controls/engines/engine[1]/cutoff-switch", func {
|
|||
});
|
||||
|
||||
var start_two_check = func {
|
||||
if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/controls/APU/bleed") == 1) and (getprop("/systems/apu/rpm") >= 98)) {
|
||||
if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/controls/bleed/OHP/bleedapu") == 1) and (getprop("/systems/apu/rpm") >= 98)) {
|
||||
auto_start_two();
|
||||
}
|
||||
}
|
||||
|
@ -174,8 +174,8 @@ setlistener("/controls/engines/engine-start-switch", func {
|
|||
}
|
||||
});
|
||||
|
||||
setlistener("/controls/APU/bleed", func {
|
||||
if (getprop("/controls/APU/bleed") == 0) {
|
||||
setlistener("/controls/bleed/OHP/bleedapu", func {
|
||||
if (getprop("/controls/bleed/OHP/bleedapu") == 0) {
|
||||
if (getprop("/controls/engines/engine[0]/state") == 1) {
|
||||
eng_one_stop();
|
||||
}
|
||||
|
|
76
Nasal/hydraulics.nas
Normal file
76
Nasal/hydraulics.nas
Normal file
|
@ -0,0 +1,76 @@
|
|||
# A320Family LGCIU
|
||||
# Jonathan Redpath
|
||||
|
||||
#####################
|
||||
# Initializing Vars #
|
||||
#####################
|
||||
var lgciu_init = func {
|
||||
#Hydraulics
|
||||
setprop("controls/LGCIU/hyd/safetyvalvepos",0); #1 is closed, 0 is open.
|
||||
setprop("controls/LGCIU/hyd/cutoffvalvepos",0); #1 is closed, 0 is open.
|
||||
setprop("controls/LGCIU/hyd/doorselvalvepos",1); #1 is closed, 0 is open.
|
||||
setprop("controls/LGCIU/hyd/gearselvalvepos",1); #1 is closed, 0 is open.
|
||||
#Sensors
|
||||
setprop("controls/LGCIU/sensor/ten",1); #1 is yes condition, ie on ground. Used to prohibit retraction on ground
|
||||
setprop("controls/LGCIU/sensor/adr1and3flt",0);
|
||||
setprop("controls/LGCIU/inhibit",1);
|
||||
#Timers
|
||||
safety_valve_ADR_timer.start();
|
||||
sensorten.start();
|
||||
}
|
||||
|
||||
var safety_valve_ADR = setlistener("controls/LGCIU/sensor/adr1and3flt", func {
|
||||
var ADRfault = getprop("controls/LGCIU/sensor/adr1and3flt");
|
||||
if (ADRfault) {
|
||||
setprop("controls/LGCIU/hyd/safetyvalvepos",1); #close valve if we have ADR 1 + 3 FAULT
|
||||
}
|
||||
});
|
||||
|
||||
var gear_retract_inhibit = setlistener("controls/LGCIU/sensor/ten", func {
|
||||
var sens10 = getprop("controls/LGCIU/sensor/ten");
|
||||
var gearcmd = getprop("gear/gear-cmd-norm");
|
||||
if (sens10) {
|
||||
setprop("controls/LGCIU/inhibit",1); #use this property in gear retraction logic, eg if not gearinhib
|
||||
} else {
|
||||
setprop("controls/LGCIU/inhibit",0);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
# Logic:
|
||||
#On the 320 series, the LGCIU, controls the safety valve when either ADR 1 or 3 has an indicated airspeed greater than 260KIAS, the valve will close preventing extension in flight. There is also a function where when the aircraft senses it's on the ground, the valve also closes to prevent inadvertent gear retraction.
|
||||
#ADR 1/3 less than 260 kts with L/G lever down ----> safety valve is open(lets hydraulic fluid pass through it) {take off condition}
|
||||
#ADR 1/3 less than 260 kts with L/G lever up ----> safety valve is still open as there is a 'Self Maintained' logic. {initial climb condition} As soon as ADR 1/3 more than 260 kts the safety valve will close (stop the hydraulic supply) {cruise}
|
||||
#ADR 1/3 more than 260 kts with L/G lever up ----> safety valve will remain close and when ADR 1/3 drops below 260 kts with L/G lever up it will still remain close. It will open only when L/G lever is selected down.{descent condition}
|
||||
|
||||
var ADRlock = setlistener("controls/LGCIU/hyd/safetyvalvepos", func { #lock the valve if there is an ADR 1 + 3 fault
|
||||
var ADRfault = getprop("controls/LGCIU/sensor/adr1and3flt");
|
||||
var valve = getprop("controls/LGCIU/hyd/safetyvalvepos");
|
||||
if (!valve and ADRfault) {
|
||||
setprop("controls/LGCIU/hyd/safetyvalvepos",1);
|
||||
}
|
||||
});
|
||||
|
||||
var safety_valve_ADR_timer = maketimer(1, func {
|
||||
var ADR1 = getprop("controls/adirs/ir[0]/fault");
|
||||
var ADR3 = getprop("controls/adirs/ir[2]/fault");
|
||||
if (ADR1 and ADR3) {
|
||||
setprop("controls/LGCIU/sensor/adr1and3flt", 1);
|
||||
} else {
|
||||
setprop("controls/LGCIU/sensor/adr1and3flt", 0);
|
||||
}
|
||||
});
|
||||
|
||||
var sensorten = maketimer(0.1, func {
|
||||
var gearpos = getprop("/gear/gear[0]/position-norm");
|
||||
var gearpo1 = getprop("/gear/gear[1]/position-norm");
|
||||
var gearpo2 = getprop("/gear/gear[2]/position-norm");
|
||||
var gear1comp = getprop("gear/gear[0]/compression-norm");
|
||||
var gear2comp = getprop("gear/gear[1]/compression-norm");
|
||||
var gear3comp = getprop("gear/gear[2]/compression-norm");
|
||||
if (gearpos and gearpo1 and gearpo2 and ((gear1comp > 0) and (gear2comp > 0) and (gear3comp > 0))) {
|
||||
setprop("controls/LGCIU/sensor/ten",1); #1 is yes condition, ie on ground. Used to prohibit retraction on ground
|
||||
} else {
|
||||
setprop("controls/LGCIU/sensor/ten",0); #1 is yes condition, ie on ground. Used to prohibit retraction on ground
|
||||
}
|
||||
});
|
104
Nasal/pneumatics.nas
Normal file
104
Nasal/pneumatics.nas
Normal file
|
@ -0,0 +1,104 @@
|
|||
var pneumatics_init = func {
|
||||
#Temps and Pressures. Controls ECAM indications
|
||||
setprop("/controls/bleed/BMC1/tempspsi/eng1/bleedvalvepsi",0); #eng 1 bleed pressure
|
||||
setprop("/controls/bleed/BMC1/tempspsi/eng1/bleedvalvetemp",0); #eng 2 bleed temp
|
||||
setprop("/controls/bleed/BMC1/tempspsi/eng2/bleedvalvepsi",0); #eng 1 bleed pressure
|
||||
setprop("/controls/bleed/BMC1/tempspsi/eng2/bleedvalvetemp",0); #eng 2 bleed temp
|
||||
setprop("/controls/bleed/BMC1/tempspsi/eng1/downstreamfavtemp",0); #eng 1 bleed temp upstream of precooler
|
||||
setprop("/controls/bleed/BMC1/tempspsi/eng2/downstreamfavtemp",0); #eng 2 bleed temp upstream of precooler
|
||||
#valves
|
||||
setprop("/controls/bleed/BMC1/valves/xbleed",0); #controls xbleed valve pos
|
||||
setprop("/controls/bleed/BMC1/valves/eng1/bleedvalvepos",0); #eng 1 bleed off on startup
|
||||
setprop("/controls/bleed/BMC1/valves/eng1/OPRESSvalve",0); #at 75 PSI the valve moves to 50 percent closed and at 85 psi moves to 100 percent
|
||||
setprop("/controls/bleed/BMC1/valves/eng1/bleedengsrc","7");
|
||||
setprop("/controls/bleed/BMC1/valves/eng1/fav",0); #limits temp upstream of bleed valve to 200C. closes as needed to maintain temp. closed on startup as engine n1 is 0
|
||||
setprop("/controls/bleed/BMC1/valves/eng2/fav",0); #limits temp upstream of bleed valve to 200C. closes as needed to maintain temp. closed on startup as engine n1 is 0
|
||||
setprop("/controls/bleed/BMC1/valves/eng2/bleedvalvepos",0); #eng 1 bleed off on startup
|
||||
setprop("/controls/bleed/BMC1/valves/eng2/OPRESSvalve",0);
|
||||
setprop("/controls/bleed/BMC1/valves/eng2/bleedengsrc","7");
|
||||
setprop("/controls/bleed/BMC1/valves/eng2/fav",0);
|
||||
setprop("/controls/bleed/BMC1/valves/apubleed",0); #apu bleed off on startup
|
||||
setprop("/controls/bleed/BMC1/valves/eng1/startvalve",0); #must be open for engine start. Opens automatically. Can get stuck (note for v.1.0)
|
||||
setprop("/controls/bleed/BMC1/valves/eng2/startvalve",0);
|
||||
setprop("/controls/bleed/ground",0); #ground air disco on startup. Remember that packs must be off for this, maybe make copilot screen message like 777 autopilot messages
|
||||
#7th stage of HP compressor is where the bleed is normally extracted at 44 PSI +- 4 but at low N2 10th stage is selected to provide 36 +- 4 psi
|
||||
#Overhead
|
||||
setprop("/controls/bleed/OHP/pack1",0);
|
||||
setprop("/controls/bleed/OHP/pack2",0);
|
||||
setprop("/controls/bleed/OHP/bleed1",0);
|
||||
setprop("/controls/bleed/OHP/bleed2",0);
|
||||
setprop("/controls/bleed/OHP/xbleed",0); #controls xbleed valve MODE
|
||||
setprop("/controls/bleed/OHP/bleedapu",0);
|
||||
setprop("/controls/bleed/OHP/ramair",0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#####################
|
||||
# Bleed Valve Logic #
|
||||
#####################
|
||||
setlistener("/controls/bleed/OHP/bleed1", func {
|
||||
var bleed1 = getprop("/controls/bleed/OHP/bleed1");
|
||||
if (bleed1) {
|
||||
setprop("/controls/bleed/BMC1/valves/eng1/bleedvalvepos",1);
|
||||
} else {
|
||||
setprop("/controls/bleed/BMC1/valves/eng1/bleedvalvepos",0);
|
||||
}
|
||||
});
|
||||
|
||||
setlistener("/controls/bleed/OHP/bleed2", func {
|
||||
var bleed2 = getprop("/controls/bleed/OHP/bleed2");
|
||||
if (bleed2) {
|
||||
setprop("/controls/bleed/BMC1/valves/eng2/bleedvalvepos",1);
|
||||
} else {
|
||||
setprop("/controls/bleed/BMC1/valves/eng2/bleedvalvepos",0);
|
||||
}
|
||||
});
|
||||
|
||||
var bleed_valve_eng1 = func { #logic that closes the bleed valve
|
||||
var opress1 = getprop("/controls/bleed/BMC1/valves/eng1/OPRESSvalve");
|
||||
var apubleed = getprop("/controls/bleed/BMC1/valves/apubleed");
|
||||
var bleedohp1 = getprop("/controls/bleed/OHP/bleed1");
|
||||
var eng1valveopen = getprop("/controls/bleed/BMC1/valves/eng1/startvalve");
|
||||
#if (opress1 or firepb or leak or ovht or apubleed or eng1valveopen or !bleedohp1)
|
||||
if (opress1 or apubleed or !bleedoph1 or eng1valveopen) {
|
||||
var bleedvalve1 = getprop("/controls/bleed/BMC1/valves/eng1/bleedvalvepos");
|
||||
setprop(bleedvalve1,0);
|
||||
}
|
||||
}
|
||||
|
||||
var bleed_valve_eng2 = func { #logic that closes the bleed valve
|
||||
var opress2 = getprop("/controls/bleed/BMC1/valves/eng2/OPRESSvalve");
|
||||
var apubleed = getprop("/controls/bleed/BMC1/valves/apubleed");
|
||||
var bleedohp2 = getprop("/controls/bleed/OHP/bleed2");
|
||||
var eng2valveopen = getprop("/controls/bleed/BMC1/valves/eng2/startvalve");
|
||||
#if (opress2 or firepb or leak or ovht or apubleed or eng1valveopen or !bleedohp2)
|
||||
if (opress2 or apubleed or !bleedoph2 or eng2valveopen) {
|
||||
var bleedvalve2 = getprop("/controls/bleed/BMC1/valves/eng2/bleedvalvepos");
|
||||
setprop(bleedvalve2,0);
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/controls/bleed/OHP/bleedapu", func {
|
||||
var bleedAPU = getprop("/controls/bleed/OHP/bleedapu");
|
||||
if (bleedAPU) {
|
||||
apubleedtimer.start();
|
||||
} else {
|
||||
apubleedtimer.stop();
|
||||
setprop("/controls/bleed/BMC1/valves/xbleed",0); #close xbleed
|
||||
setprop("/controls/bleed/BMC1/valves/apubleed",0); #close apu bleed
|
||||
}
|
||||
});
|
||||
|
||||
var apubleedtimer = maketimer(0.1, func {
|
||||
var APU = getprop("/systems/apu/rpm");
|
||||
if (APU > 94.9) {
|
||||
setprop("/controls/bleed/BMC1/valves/xbleed",1); #open xbleed so apu can supply both packs
|
||||
setprop("/controls/bleed/BMC1/valves/eng1/bleedvalvepos",0); #close eng bleeds
|
||||
setprop("/controls/bleed/BMC1/valves/eng2/bleedvalvepos",0);
|
||||
setprop("/controls/bleed/OHP/bleed1",0); #close eng bleeds on OHP
|
||||
setprop("/controls/bleed/OHP/bleed2",0);
|
||||
setprop("/controls/bleed/BMC1/valves/apubleed",1); #open apu bleed
|
||||
apubleedtimer.stop();
|
||||
}
|
||||
});
|
|
@ -147,7 +147,9 @@ var triggerDoor = func(door, doorName, doorDesc)
|
|||
|
||||
setlistener("/sim/signals/fdm-initialized", func {
|
||||
systems.elec_init();
|
||||
systems.ADIRSinit();
|
||||
systems.adirs_init();
|
||||
systems.lgciu_init();
|
||||
systems.pneumatics_init();
|
||||
itaf.ap_init();
|
||||
var autopilot = gui.Dialog.new("sim/gui/dialogs/autopilot/dialog", "Aircraft/A320Family/Systems/autopilot-dlg.xml");
|
||||
setprop("/controls/engines/thrust-limit", "TOGA");
|
||||
|
|
Reference in a new issue