Compare commits
21 commits
master
...
DetailedSy
Author | SHA1 | Date | |
---|---|---|---|
|
c0bab3a7fa | ||
|
d8428b0ea6 | ||
|
e585656c26 | ||
|
84d93c6be1 | ||
|
5cffd84ef9 | ||
|
024241b964 | ||
|
89a77fe0bf | ||
|
a2ce0751c0 | ||
|
df4fcf4373 | ||
|
dee13f0e3f | ||
|
7186532109 | ||
|
ff7152a4a7 | ||
|
db5971ab9a | ||
|
7fa3473609 | ||
|
bf8e910dfa | ||
|
e26c7f39ca | ||
|
6eeb3f8dc9 | ||
|
a47cf09e85 | ||
|
a1c29e3bf7 | ||
|
76a0afcd1a | ||
|
b7b0536852 |
31 changed files with 2140 additions and 1218 deletions
|
@ -133,6 +133,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
|
|||
</tank>
|
||||
</propulsion>
|
||||
|
||||
<system file="a320-electrical"/>
|
||||
<system file="fuel"/>
|
||||
<system file="glass-effect1"/>
|
||||
<system file="a320-fcs"/>
|
||||
|
|
|
@ -609,10 +609,25 @@
|
|||
<avionics-switch type="bool">true</avionics-switch>
|
||||
</electric>
|
||||
<electrical>
|
||||
<idg>
|
||||
<left-idg-disc type="bool">false</left-idg-disc>
|
||||
<right-idg-disc type="bool">false</right-idg-disc>
|
||||
</idg>
|
||||
<ground-cart type="bool">0</ground-cart>
|
||||
<switches n="0">
|
||||
<apu type="bool">1</apu>
|
||||
<ac-ess-feed type="bool">1</ac-ess-feed>
|
||||
<bat-1 type="bool">0</bat-1>
|
||||
<bat-2 type="bool">0</bat-2>
|
||||
<bus-tie type="bool">1</bus-tie>
|
||||
<emer-gen-test type="bool">0</emer-gen-test>
|
||||
<ext-pwr type="bool">0</ext-pwr>
|
||||
<galley type="bool">1</galley>
|
||||
<gen-1 type="bool">1</gen-1>
|
||||
<gen-2 type="bool">1</gen-2>
|
||||
<gen-1-line-contactor type="bool">0</gen-1-line-contactor>
|
||||
<idg-1-disc type="bool">1</idg-1-disc>
|
||||
<idg-2-disc type="bool">1</idg-2-disc>
|
||||
<idg-1-disc-momentary type="bool">0</idg-1-disc-momentary>
|
||||
<idg-2-disc-momentary type="bool">0</idg-2-disc-momentary>
|
||||
<emer-elec-man-on type="bool">0</emer-elec-man-on>
|
||||
</switches>
|
||||
</electrical>
|
||||
<engines>
|
||||
<engine-start-switch type="int">1</engine-start-switch>
|
||||
|
@ -662,6 +677,9 @@
|
|||
<tiller-enabled type="bool">0</tiller-enabled>
|
||||
<nws-switch type="double">1</nws-switch>
|
||||
</gear>
|
||||
<hydraulic>
|
||||
<rat-man type="bool">0</rat-man>
|
||||
</hydraulic>
|
||||
<lighting>
|
||||
<DU>
|
||||
<du1 type="double">1</du1>
|
||||
|
@ -721,7 +739,6 @@
|
|||
</switches>
|
||||
</pneumatic>
|
||||
<switches>
|
||||
<cart type="bool">0</cart>
|
||||
<!-- Smoking is bad :P -->
|
||||
<no-smoking-sign type="double">0.5</no-smoking-sign>
|
||||
<seatbelt-sign type="double">0.0</seatbelt-sign>
|
||||
|
@ -807,20 +824,63 @@
|
|||
<failed type="bool">0</failed>
|
||||
</atc>
|
||||
<apu n="0">
|
||||
<n2 type="double">0</n2>
|
||||
<emer-shutdown type="bool">false</emer-shutdown>
|
||||
</apu>
|
||||
<electrical n="0">
|
||||
<bus n="0">
|
||||
<dc-ess>0</dc-ess>
|
||||
<dc1>0</dc1>
|
||||
<dc2>0</dc2>
|
||||
<bus>
|
||||
<dc-1 type="double">0</dc-1>
|
||||
<dc-2 type="double">0</dc-2>
|
||||
</bus>
|
||||
<relay>
|
||||
<ess-tr-contactor>
|
||||
<contact-pos type="int">0</contact-pos>
|
||||
</ess-tr-contactor>
|
||||
</relay>
|
||||
<some-electric-thingie>
|
||||
<emer-gen-operate type="bool">0</emer-gen-operate>
|
||||
</some-electric-thingie>
|
||||
<sources>
|
||||
<bat-1>
|
||||
<amps type="double">0</amps>
|
||||
<limiter type="bool">0</limiter>
|
||||
<percent type="double">80</percent>
|
||||
<time type="int">0</time>
|
||||
</bat-1>
|
||||
<bat-2>
|
||||
<amps type="double">0</amps>
|
||||
<limiter type="bool">0</limiter>
|
||||
<percent type="double">80</percent>
|
||||
<time type="int">0</time>
|
||||
</bat-2>
|
||||
</sources>
|
||||
</electrical>
|
||||
<failures n="0">
|
||||
<aileron-left type="bool">0</aileron-left>
|
||||
<aileron-right type="bool">0</aileron-right>
|
||||
<elevator-left type="bool">0</elevator-left>
|
||||
<elevator-right type="bool">0</elevator-right>
|
||||
<electrical>
|
||||
<apu type="bool">0</apu>
|
||||
<ac-ess-bus type="bool">0</ac-ess-bus>
|
||||
<ac-1-bus type="bool">0</ac-1-bus>
|
||||
<ac-2-bus type="bool">0</ac-2-bus>
|
||||
<bat-1 type="bool">0</bat-1>
|
||||
<bat-2 type="bool">0</bat-2>
|
||||
<dc-bat-bus type="bool">0</dc-bat-bus>
|
||||
<dc-ess-bus type="bool">0</dc-ess-bus>
|
||||
<dc-1-bus type="bool">0</dc-1-bus>
|
||||
<dc-2-bus type="bool">0</dc-2-bus>
|
||||
<emer-gen type="bool">0</emer-gen>
|
||||
<ess-tr type="bool">0</ess-tr>
|
||||
<gen-1 type="bool">0</gen-1>
|
||||
<gen-2 type="bool">0</gen-2>
|
||||
<idg-1 type="bool">0</idg-1>
|
||||
<idg-2 type="bool">0</idg-2>
|
||||
<stat-inv type="bool">0</stat-inv>
|
||||
<tr-1 type="bool">0</tr-1>
|
||||
<tr-2 type="bool">0</tr-2>
|
||||
</electrical>
|
||||
<rudder type="bool">0</rudder>
|
||||
<spoiler-l1 type="bool">0</spoiler-l1>
|
||||
<spoiler-l2 type="bool">0</spoiler-l2>
|
||||
|
|
|
@ -21,6 +21,10 @@ var spinning = maketimer(0.05, func {
|
|||
});
|
||||
|
||||
var failReset = func {
|
||||
# Put IntegratedSystems Fail Reset Functions here
|
||||
}
|
||||
|
||||
var failResetOld = func {
|
||||
setprop("/systems/failures/elac1", 0);
|
||||
setprop("/systems/failures/elac2", 0);
|
||||
setprop("/systems/failures/sec1", 0);
|
||||
|
@ -77,7 +81,7 @@ var failReset = func {
|
|||
setprop("/systems/failures/engine-right-fire", 0);
|
||||
}
|
||||
|
||||
failReset();
|
||||
failResetOld();
|
||||
setprop("/systems/acconfig/autoconfig-running", 0);
|
||||
setprop("/systems/acconfig/spinning", 0);
|
||||
setprop("/systems/acconfig/spin", "-");
|
||||
|
@ -267,7 +271,7 @@ var colddark = func {
|
|||
setprop("/controls/atc/mode-knob", 0);
|
||||
atc.transponderPanel.modeSwitch(1);
|
||||
libraries.systemsInit();
|
||||
failReset();
|
||||
failResetOld();
|
||||
if (getprop("/engines/engine[1]/n2-actual") < 2) {
|
||||
colddark_b();
|
||||
} else {
|
||||
|
@ -318,13 +322,13 @@ var beforestart = func {
|
|||
setprop("/controls/gear/gear-down", 1);
|
||||
setprop("/controls/flight/elevator-trim", 0);
|
||||
libraries.systemsInit();
|
||||
failReset();
|
||||
failResetOld();
|
||||
setprop("/controls/APU/master", 0);
|
||||
setprop("/controls/APU/start", 0);
|
||||
|
||||
# Now the Startup!
|
||||
setprop("/controls/electrical/switches/battery1", 1);
|
||||
setprop("/controls/electrical/switches/battery2", 1);
|
||||
props.globals.getNode("/controls/electrical/switches/bat-1").setValue(1);
|
||||
props.globals.getNode("/controls/electrical/switches/bat-2").setValue(1);
|
||||
setprop("/controls/APU/master", 1);
|
||||
setprop("/controls/APU/start", 1);
|
||||
var apu_rpm_chk = setlistener("/systems/apu/rpm", func {
|
||||
|
@ -343,10 +347,10 @@ var beforestart_b = func {
|
|||
setprop("/controls/fuel/tank1pump2", 1);
|
||||
setprop("/controls/fuel/tank2pump1", 1);
|
||||
setprop("/controls/fuel/tank2pump2", 1);
|
||||
setprop("/controls/electrical/switches/gen-apu", 1);
|
||||
setprop("/controls/electrical/switches/apu", 1);
|
||||
setprop("/controls/electrical/switches/galley", 1);
|
||||
setprop("/controls/electrical/switches/gen1", 1);
|
||||
setprop("/controls/electrical/switches/gen2", 1);
|
||||
setprop("/controls/electrical/switches/gen-1", 1);
|
||||
setprop("/controls/electrical/switches/gen-2", 1);
|
||||
setprop("/controls/pneumatic/switches/bleedapu", 1);
|
||||
setprop("/controls/pneumatic/switches/bleed1", 1);
|
||||
setprop("/controls/pneumatic/switches/bleed2", 1);
|
||||
|
@ -400,13 +404,13 @@ var taxi = func {
|
|||
setprop("/controls/gear/gear-down", 1);
|
||||
setprop("/controls/flight/elevator-trim", 0);
|
||||
libraries.systemsInit();
|
||||
failReset();
|
||||
failResetOld();
|
||||
setprop("/controls/APU/master", 0);
|
||||
setprop("/controls/APU/start", 0);
|
||||
|
||||
# Now the Startup!
|
||||
setprop("/controls/electrical/switches/battery1", 1);
|
||||
setprop("/controls/electrical/switches/battery2", 1);
|
||||
props.globals.getNode("/controls/electrical/switches/bat-1").setValue(1);
|
||||
props.globals.getNode("/controls/electrical/switches/bat-2").setValue(1);
|
||||
setprop("/controls/APU/master", 1);
|
||||
setprop("/controls/APU/start", 1);
|
||||
var apu_rpm_chk = setlistener("/systems/apu/rpm", func {
|
||||
|
@ -425,10 +429,10 @@ var taxi_b = func {
|
|||
setprop("/controls/fuel/tank1pump2", 1);
|
||||
setprop("/controls/fuel/tank2pump1", 1);
|
||||
setprop("/controls/fuel/tank2pump2", 1);
|
||||
setprop("/controls/electrical/switches/gen-apu", 1);
|
||||
setprop("/controls/electrical/switches/apu", 1);
|
||||
setprop("/controls/electrical/switches/galley", 1);
|
||||
setprop("/controls/electrical/switches/gen1", 1);
|
||||
setprop("/controls/electrical/switches/gen2", 1);
|
||||
setprop("/controls/electrical/switches/gen-1", 1);
|
||||
setprop("/controls/electrical/switches/gen-2", 1);
|
||||
setprop("/controls/pneumatic/switches/bleedapu", 1);
|
||||
setprop("/controls/pneumatic/switches/bleed1", 1);
|
||||
setprop("/controls/pneumatic/switches/bleed2", 1);
|
||||
|
|
|
@ -274,10 +274,10 @@
|
|||
<checkbox>
|
||||
<label>Enable External Power Box</label>
|
||||
<halign>left</halign>
|
||||
<property>/controls/switches/cart</property>
|
||||
<property>/controls/electrical/ground-cart</property>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>/controls/electrical/switches/gen-ext</property>
|
||||
<property>/controls/electrical/switches/ext-pwr</property>
|
||||
<value>0</value>
|
||||
</binding>
|
||||
<enable>
|
||||
|
@ -343,11 +343,11 @@
|
|||
<value>2</value>
|
||||
</less-than>
|
||||
<less-than>
|
||||
<property>/systems/electrical/bus/ac2</property>
|
||||
<property>/systems/electrical/bus/ac-2</property>
|
||||
<value>115</value>
|
||||
</less-than>
|
||||
<equals>
|
||||
<property>/controls/electrical/switches/gen-ext</property>
|
||||
<property>/controls/electrical/switches/ext-pwr</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</and>
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
<path>Aircraft/IDG-A32X/Models/Services/External-Power/ext-pwr-box.ac</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>controls/switches/cart</property>
|
||||
<property>controls/electrical/ground-cart</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
|
|
@ -18,9 +18,9 @@ var iesi_rate = props.globals.getNode("/systems/acconfig/options/iesi-rate");
|
|||
var et = props.globals.getNode("/sim/time/elapsed-sec");
|
||||
var aconfig = props.globals.getNode("/systems/acconfig/autoconfig-running");
|
||||
|
||||
var dcbat = props.globals.getNode("/systems/electrical/bus/dcbat");
|
||||
var dc1 = props.globals.getNode("/systems/electrical/bus/dc1");
|
||||
var dc2 = props.globals.getNode("/systems/electrical/bus/dc2");
|
||||
var dcbat = props.globals.getNode("/systems/electrical/bus/dc-bat");
|
||||
var dc1 = props.globals.getNode("/systems/electrical/bus/dc-1");
|
||||
var dc2 = props.globals.getNode("/systems/electrical/bus/dc-2");
|
||||
|
||||
var airspeed = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt");
|
||||
var mach = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach");
|
||||
|
|
|
@ -38,10 +38,12 @@ var tr1_v = 0;
|
|||
var tr1_a = 0;
|
||||
var tr2_v = 0;
|
||||
var tr2_a = 0;
|
||||
var essTramps = 0;
|
||||
var essTrvolts = 0;
|
||||
|
||||
# Fetch Nodes
|
||||
var elapsed_sec = props.globals.getNode("/sim/time/elapsed-sec", 1);
|
||||
var ac2 = props.globals.getNode("/systems/electrical/bus/ac2", 1);
|
||||
var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2", 1);
|
||||
var autoconfig_running = props.globals.getNode("/systems/acconfig/autoconfig-running", 1);
|
||||
var ac1_src = props.globals.getNode("/systems/electrical/ac1-src", 1);
|
||||
var ac2_src = props.globals.getNode("/systems/electrical/ac2-src", 1);
|
||||
|
@ -62,8 +64,6 @@ var oil_qt1 = props.globals.getNode("/ECAM/Lower/Oil-QT[0]", 1);
|
|||
var oil_qt2 = props.globals.getNode("/ECAM/Lower/Oil-QT[1]", 1);
|
||||
var oil_psi1 = props.globals.getNode("/ECAM/Lower/Oil-PSI[0]", 1);
|
||||
var oil_psi2 = props.globals.getNode("/ECAM/Lower/Oil-PSI[1]", 1);
|
||||
var apu_volts = props.globals.getNode("/systems/electrical/extra/apu-volts", 1);
|
||||
var apu_hz = props.globals.getNode("/systems/electrical/extra/apu-hz", 1);
|
||||
var bleedapu = props.globals.getNode("/systems/pneumatic/bleedapu", 1);
|
||||
var oil_psi_actual1 = props.globals.getNode("/engines/engine[0]/oil-psi-actual", 1);
|
||||
var oil_psi_actual2 = props.globals.getNode("/engines/engine[1]/oil-psi-actual", 1);
|
||||
|
@ -77,7 +77,6 @@ var temperature_degc = props.globals.getNode("/environment/temperature-degc", 1)
|
|||
var gw = props.globals.getNode("/FMGC/internal/gw", 1);
|
||||
var tank3_content_lbs = props.globals.getNode("/fdm/jsbsim/propulsion/tank[2]/contents-lbs", 1);
|
||||
var apu_master = props.globals.getNode("/controls/APU/master", 1);
|
||||
var gen_apu = props.globals.getNode("/controls/electrical/switches/gen-apu", 1);
|
||||
var ir2_knob = props.globals.getNode("/controls/adirs/ir[1]/knob", 1);
|
||||
var switch_bleedapu = props.globals.getNode("/controls/pneumatic/switches/bleedapu", 1);
|
||||
var pneumatic_xbleed_state = props.globals.getNode("/systems/pneumatic/xbleed-state", 1);
|
||||
|
@ -122,44 +121,52 @@ var doorR4_pos = props.globals.getNode("sim/model/door-positions/doorr4/position
|
|||
var cargobulk_pos = props.globals.getNode("/sim/model/door-positions/cargobulk/position-norm", 1);
|
||||
var cargofwd_pos = props.globals.getNode("/sim/model/door-positions/cargofwd/position-norm", 1);
|
||||
var cargoaft_pos = props.globals.getNode("/sim/model/door-positions/cargoaft/position-norm", 1);
|
||||
var switch_bat1 = props.globals.getNode("/controls/electrical/switches/battery1", 1);
|
||||
var switch_bat2 = props.globals.getNode("/controls/electrical/switches/battery2", 1);
|
||||
var bat1_amps = props.globals.getNode("/systems/electrical/battery1-amps", 1);
|
||||
var bat2_amps = props.globals.getNode("/systems/electrical/battery2-amps", 1);
|
||||
var bat1_volts = props.globals.getNode("/systems/electrical/battery1-volts", 1);
|
||||
var bat2_volts = props.globals.getNode("/systems/electrical/battery2-volts", 1);
|
||||
var bat1_fault = props.globals.getNode("/systems/electrical/batt1-fault", 1);
|
||||
var bat2_fault = props.globals.getNode("/systems/electrical/batt2-fault", 1);
|
||||
var tr1_volts = props.globals.getNode("/systems/electrical/extra/tr1-volts", 1);
|
||||
var tr2_volts = props.globals.getNode("/systems/electrical/extra/tr2-volts", 1);
|
||||
var tr1_amps = props.globals.getNode("/systems/electrical/extra/tr1-amps", 1);
|
||||
var tr2_amps = props.globals.getNode("/systems/electrical/extra/tr2-amps", 1);
|
||||
var dc1 = props.globals.getNode("/systems/electrical/bus/dc1", 1);
|
||||
var dc2 = props.globals.getNode("/systems/electrical/bus/dc2", 1);
|
||||
|
||||
# Electrical nodes
|
||||
var apu_volts = props.globals.getNode("/systems/electrical/sources/apu/output-volt", 1);
|
||||
var apu_hz = props.globals.getNode("/systems/electrical/sources/apu/output-hertz", 1);
|
||||
var gen_apu = props.globals.getNode("/systems/electrical/relay/apu-glc/contact-pos", 1);
|
||||
var switch_bat1 = props.globals.getNode("/controls/electrical/switches/bat-1", 1);
|
||||
var switch_bat2 = props.globals.getNode("/controls/electrical/switches/bat-2", 1);
|
||||
var bat1_amps = props.globals.getNode("/systems/electrical/sources/bat-1/amp", 1);
|
||||
var bat2_amps = props.globals.getNode("/systems/electrical/sources/bat-2/amp", 1);
|
||||
var bat1_volts = props.globals.getNode("/systems/electrical/sources/bat-1/volt", 1);
|
||||
var bat2_volts = props.globals.getNode("/systems/electrical/sources/bat-2/volt", 1);
|
||||
var bat1_fault = props.globals.getNode("/systems/electrical/light/bat-1-fault", 1);
|
||||
var bat2_fault = props.globals.getNode("/systems/electrical/light/bat-2-fault", 1);
|
||||
var emerGenVolts = props.globals.getNode("/systems/electrical/relay/emer-glc/output", 1);
|
||||
var emerGenHz = props.globals.getNode("/systems/electrical/sources/emer-gen/output-hertz", 1);
|
||||
var tr1_volts = props.globals.getNode("/systems/electrical/relay/tr-contactor-1/output", 1);
|
||||
var tr2_volts = props.globals.getNode("/systems/electrical/relay/tr-contactor-2/output", 1);
|
||||
var tr1_amps = props.globals.getNode("/systems/electrical/relay/tr-contactor-1/output-amp", 1);
|
||||
var tr2_amps = props.globals.getNode("/systems/electrical/relay/tr-contactor-2/output-amp", 1);
|
||||
var dc1 = props.globals.getNode("/systems/electrical/bus/dc-1", 1);
|
||||
var dc2 = props.globals.getNode("/systems/electrical/bus/dc-2", 1);
|
||||
var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess", 1);
|
||||
var switch_emer_gen = props.globals.getNode("/controls/electrical/switches/emer-gen", 1);
|
||||
var switch_gen1 = props.globals.getNode("/controls/electrical/switches/gen1", 1);
|
||||
var switch_gen2 = props.globals.getNode("/controls/electrical/switches/gen2", 1);
|
||||
var eng1_running = props.globals.getNode("/engines/engine[0]/running", 1);
|
||||
var eng2_running = props.globals.getNode("/engines/engine[1]/running", 1);
|
||||
var gen1_load = props.globals.getNode("/systems/electrical/extra/gen1-load", 1);
|
||||
var gen2_load = props.globals.getNode("/systems/electrical/extra/gen2-load", 1);
|
||||
var gen1_volts = props.globals.getNode("/systems/electrical/extra/gen1-volts", 1);
|
||||
var gen2_volts = props.globals.getNode("/systems/electrical/extra/gen2-volts", 1);
|
||||
var gen1_hz = props.globals.getNode("/systems/electrical/bus/gen1-hz", 1);
|
||||
var gen2_hz = props.globals.getNode("/systems/electrical/bus/gen2-hz", 1);
|
||||
var switch_cart = props.globals.getNode("/controls/switches/cart", 1);
|
||||
var ext_volts = props.globals.getNode("/systems/electrical/extra/ext-volts", 1);
|
||||
var ext_hz = props.globals.getNode("/systems/electrical/extra/ext-hz", 1);
|
||||
var switch_emer_gen = props.globals.getNode("/systems/electrical/sources/emer-gen/output-volt", 1);
|
||||
var switch_gen1 = props.globals.getNode("/controls/electrical/switches/gen-1", 1);
|
||||
var switch_gen2 = props.globals.getNode("/controls/electrical/switches/gen-2", 1);
|
||||
var gen1_volts = props.globals.getNode("/systems/electrical/sources/idg-1/output-volt", 1);
|
||||
var gen2_volts = props.globals.getNode("/systems/electrical/sources/idg-2/output-volt", 1);
|
||||
var gen1_hz = props.globals.getNode("/systems/electrical/sources/idg-1/output-hertz", 1);
|
||||
var gen2_hz = props.globals.getNode("/systems/electrical/sources/idg-2/output-hertz", 1);
|
||||
var ext_volts = props.globals.getNode("/systems/electrical/sources/ext/output-volt", 1);
|
||||
var ext_hz = props.globals.getNode("/systems/electrical/sources/ext/output-hertz", 1);
|
||||
var galleyshed = props.globals.getNode("/systems/electrical/extra/galleyshed", 1);
|
||||
var switch_galley = props.globals.getNode("/controls/electrical/switches/galley", 1);
|
||||
var dcbat = props.globals.getNode("/systems/electrical/bus/dcbat", 1);
|
||||
var dcbat = props.globals.getNode("/systems/electrical/bus/dc-bat", 1);
|
||||
var ac_ess = props.globals.getNode("/systems/electrical/bus/ac-ess", 1);
|
||||
var ac1 = props.globals.getNode("/systems/electrical/bus/ac1", 1);
|
||||
var ac2 = props.globals.getNode("/systems/electrical/bus/ac2", 1);
|
||||
var ac1 = props.globals.getNode("/systems/electrical/bus/ac-1", 1);
|
||||
var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2", 1);
|
||||
var switch_ac_ess_feed = props.globals.getNode("/controls/electrical/switches/ac-ess-feed", 1);
|
||||
var tr1_fault = props.globals.getNode("/systems/electrical/tr1-fault", 1);
|
||||
var tr2_fault = props.globals.getNode("/systems/electrical/tr2-fault", 1);
|
||||
var tr1_fault = props.globals.getNode("/systems/failures/electrical/tr-1", 1);
|
||||
var tr2_fault = props.globals.getNode("/systems/failures/electrical/tr-2", 1);
|
||||
var essTrVolt = props.globals.getNode("/systems/electrical/relay/dc-ess-feed-tr/output", 1);
|
||||
var essTrAmp = props.globals.getNode("/systems/electrical/relay/dc-ess-feed-tr/output-amp", 1);
|
||||
|
||||
var eng1_running = props.globals.getNode("/engines/engine[0]/running", 1);
|
||||
var eng2_running = props.globals.getNode("/engines/engine[1]/running", 1);
|
||||
var switch_cart = props.globals.getNode("/controls/electrical/ground-cart", 1);
|
||||
var total_psi = props.globals.getNode("/systems/pneumatic/total-psi", 1);
|
||||
var b_psi = props.globals.getNode("/systems/hydraulic/blue-psi", 1);
|
||||
var g_psi = props.globals.getNode("/systems/hydraulic/green-psi", 1);
|
||||
|
@ -246,6 +253,8 @@ var gear0_wow = props.globals.getNode("/gear/gear[0]/wow", 1);
|
|||
|
||||
# Create Nodes:
|
||||
var apu_load = props.globals.initNode("/systems/electrical/extra/apu-load", 0, "DOUBLE");
|
||||
var gen1_load = props.globals.initNode("/systems/electrical/extra/gen1-load", 0, "DOUBLE");
|
||||
var gen2_load = props.globals.initNode("/systems/electrical/extra/gen2-load", 0, "DOUBLE");
|
||||
var du4_test = props.globals.initNode("/instrumentation/du/du4-test", 0, "BOOL");
|
||||
var du4_test_time = props.globals.initNode("/instrumentation/du/du4-test-time", 0, "DOUBLE");
|
||||
var du4_test_amount = props.globals.initNode("/instrumentation/du/du4-test-amount", 0, "DOUBLE");
|
||||
|
@ -1132,10 +1141,10 @@ var canvas_lowerECAM_elec = {
|
|||
getKeys: func() {
|
||||
return ["TAT","SAT","GW","UTCh","UTCm","BAT1-label","Bat1Volt","Bat1Ampere","BAT2-label","Bat2Volt","Bat2Ampere","BAT1-charge","BAT1-discharge","BAT2-charge","BAT2-discharge","ELEC-Line-DC1-DCBAT","ELEC-Line-DC1-DCESS","ELEC-Line-DC2-DCBAT",
|
||||
"ELEC-Line-DC1-DCESS_DCBAT","ELEC-Line-DC2-DCESS_DCBAT","ELEC-Line-TR1-DC1","ELEC-Line-TR2-DC2","Shed-label","ELEC-Line-ESSTR-DCESS","TR1-label","TR1Volt","TR1Ampere","TR2-label","TR2Volt","TR2Ampere","EMERGEN-group","EmergenVolt","EmergenHz",
|
||||
"ELEC-Line-Emergen-ESSTR","EMERGEN-Label-off","EMERGEN-out","ELEC-Line-ACESS-TRESS","ELEC-Line-AC1-TR1","ELEC-Line-AC2-TR2","ELEC-Line-AC1-ACESS","ELEC-Line-AC2-ACESS","ACESS-SHED","ACESS","AC1-in","AC2-in","ELEC-Line-GEN1-AC1","ELEC-Line-GEN2-AC2",
|
||||
"ELEC-Line-Emergen-ESSTR","EMERGEN-Label-off","Emergen-Label","EMERGEN-out","ELEC-Line-ACESS-TRESS","ELEC-Line-AC1-TR1","ELEC-Line-AC2-TR2","ELEC-Line-AC1-ACESS","ELEC-Line-AC2-ACESS","ACESS-SHED","ACESS","AC1-in","AC2-in","ELEC-Line-GEN1-AC1","ELEC-Line-GEN2-AC2",
|
||||
"ELEC-Line-APU-AC1","ELEC-Line-APU-EXT","ELEC-Line-EXT-AC2","APU-out","EXT-out","EXTPWR-group","ExtVolt","ExtHz","APU-content","APU-border","APUGentext","APUGenLoad","APUGenVolt","APUGenHz","APUGEN-off","GEN1-label","Gen1Load","Gen1Volt","Gen1Hz",
|
||||
"GEN2-label","Gen2Load","GEN2-off","Gen2Volt","Gen2Hz","ELEC-IDG-1-label","ELEC-IDG-1-Temp","IDG1-LOPR","IDG1-DISC","IDG1-RISE-Value","IDG1-RISE-label","GalleyShed","ELEC-IDG-2-Temp","ELEC-IDG-2-label","IDG2-RISE-label","IDG2-RISE-Value","IDG2-LOPR",
|
||||
"IDG2-DISC","ESSTR-group","ESSTR-Volt","ESSTR-Ampere","BAT1-content","BAT2-content","BAT1-OFF","BAT2-OFF","GEN1-content","GEN2-content","GEN-1-num-label","GEN-2-num-label","GEN1-off","GEN2-off","GEN1-num-label","GEN2-num-label","EXTPWR-label",
|
||||
"GEN2-label","Gen2Load","GEN2-off","Gen2Volt","Gen2Hz","ELEC-IDG-1-label","ELEC-IDG-1-num-label","ELEC-IDG-1-Temp","IDG1-LOPR","IDG1-DISC","IDG1-RISE-Value","IDG1-RISE-label","GalleyShed","ELEC-IDG-2-Temp","ELEC-IDG-2-label","ELEC-IDG-2-num-label","IDG2-RISE-label","IDG2-RISE-Value","IDG2-LOPR",
|
||||
"IDG2-DISC","ESSTR-group","ESSTR","ESSTR-Volt","ESSTR-Ampere","BAT1-content","BAT2-content","BAT1-OFF","BAT2-OFF","GEN1-content","GEN2-content","GEN-1-num-label","GEN-2-num-label","GEN1-off","GEN2-off","GEN1-num-label","GEN2-num-label","EXTPWR-label",
|
||||
"ELEC-ACESS-SHED-label","ELEC-DCBAT-label","ELEC-DCESS-label","ELEC-DC2-label","ELEC-DC1-label","ELEC-AC1-label","ELEC-AC2-label","ELEC-ACESS-label","ELEC-Line-ESSTR-DCESS-off","ELEC-Line-Emergen-ESSTR-off"];
|
||||
},
|
||||
update: func() {
|
||||
|
@ -1152,7 +1161,7 @@ var canvas_lowerECAM_elec = {
|
|||
me["Bat1Ampere"].setText(sprintf("%s", math.round(bat1_amps.getValue())));
|
||||
me["Bat1Volt"].setText(sprintf("%s", math.round(bat1_volts.getValue())));
|
||||
|
||||
if (bat1_volts.getValue() >= 25) {
|
||||
if (bat1_volts.getValue() >= 25 and bat1_volts.getValue() <= 31) {
|
||||
me["Bat1Volt"].setColor(0.0509,0.7529,0.2941);
|
||||
} else {
|
||||
me["Bat1Volt"].setColor(0.7333,0.3803,0);
|
||||
|
@ -1164,13 +1173,21 @@ var canvas_lowerECAM_elec = {
|
|||
me["Bat1Ampere"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
|
||||
# TODO add correct charge/dischare behaviour
|
||||
# this is only temporary
|
||||
if (!systems.ELEC.Source.Bat1.limiter.getBoolValue()) {
|
||||
me["BAT1-discharge"].hide();
|
||||
me["BAT1-charge"].hide();
|
||||
} else {
|
||||
if (systems.ELEC.Bus.dcBat.getValue() > 25) {
|
||||
me["BAT1-charge"].show();
|
||||
me["BAT1-discharge"].hide();
|
||||
} else {
|
||||
me["BAT1-discharge"].show();
|
||||
me["BAT1-charge"].hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bat1_fault.getValue() == 1 or bat1_volts.getValue() < 25 or bat1_amps.getValue() > 5) {
|
||||
if (bat1_fault.getValue() == 1 or bat1_volts.getValue() < 25 or bat1_volts.getValue() > 31 or bat1_amps.getValue() > 5) {
|
||||
me["BAT1-label"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["BAT1-label"].setColor(0.8078,0.8039,0.8078);
|
||||
|
@ -1188,7 +1205,7 @@ var canvas_lowerECAM_elec = {
|
|||
me["Bat2Ampere"].setText(sprintf("%s", math.round(bat2_amps.getValue())));
|
||||
me["Bat2Volt"].setText(sprintf("%s", math.round(bat2_volts.getValue())));
|
||||
|
||||
if (bat2_volts.getValue() >= 25) {
|
||||
if (bat2_volts.getValue() >= 25 and bat2_volts.getValue() <= 31) {
|
||||
me["Bat2Volt"].setColor(0.0509,0.7529,0.2941);
|
||||
} else {
|
||||
me["Bat2Volt"].setColor(0.7333,0.3803,0);
|
||||
|
@ -1199,13 +1216,22 @@ var canvas_lowerECAM_elec = {
|
|||
} else {
|
||||
me["Bat2Ampere"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
# TODO add correct charge/dischare behaviour
|
||||
# this is only temporary
|
||||
|
||||
if (!systems.ELEC.Source.Bat2.limiter.getBoolValue()) {
|
||||
me["BAT2-discharge"].hide();
|
||||
me["BAT2-charge"].hide();
|
||||
} else {
|
||||
if (systems.ELEC.Bus.dcBat.getValue() > 25) {
|
||||
me["BAT2-charge"].show();
|
||||
me["BAT2-discharge"].hide();
|
||||
} else {
|
||||
me["BAT2-discharge"].show();
|
||||
me["BAT2-charge"].hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bat2_fault.getValue() == 1 or bat2_volts.getValue() < 25 or bat2_amps.getValue() > 5) {
|
||||
if (bat2_fault.getValue() == 1 or bat2_volts.getValue() < 25 or bat2_volts.getValue() > 31 or bat2_amps.getValue() > 5) {
|
||||
me["BAT2-label"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["BAT2-label"].setColor(0.8078,0.8039,0.8078);
|
||||
|
@ -1219,7 +1245,7 @@ var canvas_lowerECAM_elec = {
|
|||
me["TR1Volt"].setText(sprintf("%s", math.round(tr1_v)));
|
||||
me["TR1Ampere"].setText(sprintf("%s", math.round(tr1_a)));
|
||||
|
||||
if (tr1_v < 25 or tr1_v > 31 or tr1_a <= 5) {
|
||||
if (tr1_v < 25 or tr1_v > 31 or tr1_a < 5) {
|
||||
me["TR1-label"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["TR1-label"].setColor(0.8078,0.8039,0.8078);
|
||||
|
@ -1231,7 +1257,7 @@ var canvas_lowerECAM_elec = {
|
|||
me["TR1Volt"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
|
||||
if (tr1_a <= 5) {
|
||||
if (tr1_a < 5) {
|
||||
me["TR1Ampere"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["TR1Ampere"].setColor(0.0509,0.7529,0.2941);
|
||||
|
@ -1245,7 +1271,7 @@ var canvas_lowerECAM_elec = {
|
|||
me["TR2Volt"].setText(sprintf("%s", math.round(tr2_v)));
|
||||
me["TR2Ampere"].setText(sprintf("%s", math.round(tr2_a)));
|
||||
|
||||
if (tr2_v < 25 or tr2_v > 31 or tr2_a <= 5) {
|
||||
if (tr2_v < 25 or tr2_v > 31 or tr2_a < 5) {
|
||||
me["TR2-label"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["TR2-label"].setColor(0.8078,0.8039,0.8078);
|
||||
|
@ -1257,31 +1283,42 @@ var canvas_lowerECAM_elec = {
|
|||
me["TR2Volt"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
|
||||
if (tr2_a <= 5) {
|
||||
if (tr2_a < 5) {
|
||||
me["TR2Ampere"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["TR2Ampere"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
|
||||
# ESS TR
|
||||
# TODO add amber title on under A.
|
||||
# TODO add correct A
|
||||
if (dc1.getValue() < 25) {
|
||||
essTrvolts = essTrVolt.getValue();
|
||||
essTramps = essTrAmp.getValue();
|
||||
if (systems.ELEC.Relay.essTrContactor.getValue()) {
|
||||
me["ESSTR-group"].show();
|
||||
me["ESSTR-Volt"].setText(sprintf("%s", math.round(dc_ess.getValue())));
|
||||
me["ESSTR-Volt"].setText(sprintf("%s", math.round(essTrvolts)));
|
||||
me["ESSTR-Ampere"].setText(sprintf("%s", math.round(essTramps)));
|
||||
|
||||
if (dc_ess.getValue() < 25 or dc_ess.getValue() > 31) {
|
||||
if (essTrvolts < 25 or essTrvolts > 31 or essTramps < 5) {
|
||||
me["ESSTR"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["ESSTR"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
|
||||
if (essTrvolts < 25 or essTrvolts > 31) {
|
||||
me["ESSTR-Volt"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["ESSTR-Volt"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
|
||||
if (essTramps < 5) {
|
||||
me["ESSTR-Ampere"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["ESSTR-Ampere"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
} else {
|
||||
me["ESSTR-group"].hide();
|
||||
}
|
||||
|
||||
# EMER GEN
|
||||
# TODO add values and amber on over/under load
|
||||
# TODO changes the prop to the one which indicates the use of the emergen and not of the man depoly
|
||||
if (switch_emer_gen.getValue() == 0) {
|
||||
me["EMERGEN-group"].hide();
|
||||
me["ELEC-Line-Emergen-ESSTR"].hide();
|
||||
|
@ -1292,13 +1329,68 @@ var canvas_lowerECAM_elec = {
|
|||
me["ELEC-Line-Emergen-ESSTR"].show();
|
||||
me["ELEC-Line-Emergen-ESSTR-off"].hide();
|
||||
me["EMERGEN-Label-off"].hide();
|
||||
|
||||
me["EmergenVolt"].setText(sprintf("s", math.round(emerGenVolts.getValue())));
|
||||
me["EmergenHz"].setText(sprintf("s", math.round(emerGenHz.getValue())));
|
||||
|
||||
if (emerGenVolts.getValue() > 120 or emerGenVolts.getValue() < 110 or emerGenHz.getValue() > 410 or emerGenHz.getValue() < 390) {
|
||||
me["Emergen-Label"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["Emergen-Label"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
|
||||
if (emerGenVolts.getValue() > 120 or emerGenVolts.getValue() < 110) {
|
||||
me["EmergenVolt"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["EmergenVolt"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
|
||||
if (emerGenHz.getValue() > 410 or emerGenHz.getValue() < 390) {
|
||||
me["EmergenHz"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["EmergenHz"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
}
|
||||
|
||||
# IDG 1
|
||||
if (!systems.ELEC.Switch.idg1Disc.getBoolValue()) {
|
||||
me["IDG1-DISC"].show();
|
||||
me["ELEC-IDG-1-label"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["IDG1-DISC"].hide();
|
||||
me["ELEC-IDG-1-label"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
|
||||
if (eng1_running.getValue() == 0) {
|
||||
me["ELEC-IDG-1-num-label"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["ELEC-IDG-1-num-label"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
|
||||
if (eng2_running.getValue() == 0) {
|
||||
me["ELEC-IDG-2-num-label"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["ELEC-IDG-2-num-label"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
|
||||
# IDG 2
|
||||
if (!systems.ELEC.Switch.idg2Disc.getBoolValue()) {
|
||||
me["IDG2-DISC"].show();
|
||||
me["ELEC-IDG-2-label"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["IDG2-DISC"].hide();
|
||||
me["ELEC-IDG-2-label"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
|
||||
# GEN1
|
||||
if (switch_gen1.getValue() == 0) {
|
||||
me["GEN1-content"].hide();
|
||||
me["GEN1-off"].show();
|
||||
if (systems.ELEC.Source.IDG1.gcrRelay.getValue()) {
|
||||
me["GEN1-label"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["GEN1-label"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
|
||||
if (eng1_running.getValue() == 0) {
|
||||
me["GEN1-num-label"].setColor(0.7333,0.3803,0);
|
||||
|
@ -1308,7 +1400,7 @@ var canvas_lowerECAM_elec = {
|
|||
} else {
|
||||
me["GEN1-content"].show();
|
||||
me["GEN1-off"].hide();
|
||||
me["Gen1Load"].setText(sprintf("%s", math.round(gen1_load.getValue())));
|
||||
# me["Gen1Load"].setText(sprintf("%s", math.round(gen1_load.getValue())));
|
||||
me["Gen1Volt"].setText(sprintf("%s", math.round(gen1_volts.getValue())));
|
||||
|
||||
if (gen1_hz.getValue() == 0) {
|
||||
|
@ -1323,13 +1415,13 @@ var canvas_lowerECAM_elec = {
|
|||
me["GEN1-num-label"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
|
||||
if (gen1_volts.getValue() > 120 or gen1_volts.getValue() < 110 or gen1_hz.getValue() > 410 or gen1_hz.getValue() < 390 or gen1_load.getValue() > 100) {
|
||||
if (gen1_volts.getValue() > 120 or gen1_volts.getValue() < 110 or gen1_hz.getValue() > 410 or gen1_hz.getValue() < 390 or gen1_load.getValue() > 110) {
|
||||
me["GEN1-label"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["GEN1-label"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
|
||||
if (gen1_load.getValue() > 100) {
|
||||
if (gen1_load.getValue() > 110) {
|
||||
me["Gen1Load"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["Gen1Load"].setColor(0.0509,0.7529,0.2941);
|
||||
|
@ -1352,9 +1444,13 @@ var canvas_lowerECAM_elec = {
|
|||
if (switch_gen2.getValue() == 0) {
|
||||
me["GEN2-content"].hide();
|
||||
me["GEN2-off"].show();
|
||||
if (systems.ELEC.Source.IDG2.gcrRelay.getValue()) {
|
||||
me["GEN2-label"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["GEN2-label"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
|
||||
if (engr2_running.getValue() == 0) {
|
||||
if (eng2_running.getValue() == 0) {
|
||||
me["GEN2-num-label"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["GEN2-num-label"].setColor(0.8078,0.8039,0.8078);
|
||||
|
@ -1362,7 +1458,7 @@ var canvas_lowerECAM_elec = {
|
|||
} else {
|
||||
me["GEN2-content"].show();
|
||||
me["GEN2-off"].hide();
|
||||
me["Gen2Load"].setText(sprintf("%s", math.round(gen2_load.getValue())));
|
||||
# me["Gen2Load"].setText(sprintf("%s", math.round(gen2_load.getValue())));
|
||||
me["Gen2Volt"].setText(sprintf("%s", math.round(gen2_volts.getValue())));
|
||||
if (gen2_hz.getValue() == 0) {
|
||||
me["Gen2Hz"].setText(sprintf("XX"));
|
||||
|
@ -1376,16 +1472,16 @@ var canvas_lowerECAM_elec = {
|
|||
me["GEN2-num-label"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
|
||||
if (gen2_volts.getValue() > 120 or gen2_volts.getValue() < 110 or gen2_hz.getValue() > 410 or gen2_hz.getValue() < 390 or gen2_load.getValue() > 100) {
|
||||
if (gen2_volts.getValue() > 120 or gen2_volts.getValue() < 110 or gen2_hz.getValue() > 410 or gen2_hz.getValue() < 390 or gen2_load.getValue() > 110) {
|
||||
me["GEN2-label"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["GEN2-label"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
|
||||
if (gen1_load.getValue() > 100) {
|
||||
me["Gen1Load"].setColor(0.7333,0.3803,0);
|
||||
if (gen2_load.getValue() > 110) {
|
||||
me["Gen2Load"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["Gen1Load"].setColor(0.0509,0.7529,0.2941);
|
||||
me["Gen2Load"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1417,7 +1513,7 @@ var canvas_lowerECAM_elec = {
|
|||
} else {
|
||||
me["APU-content"].show();
|
||||
me["APUGEN-off"].hide();
|
||||
me["APUGenLoad"].setText(sprintf("%s", math.round(apu_load.getValue())));
|
||||
# me["APUGenLoad"].setText(sprintf("%s", math.round(apu_load.getValue())));
|
||||
me["APUGenVolt"].setText(sprintf("%s", math.round(apu_volts.getValue())));
|
||||
|
||||
if (apu_hz.getValue() == 0) {
|
||||
|
@ -1426,13 +1522,13 @@ var canvas_lowerECAM_elec = {
|
|||
me["APUGenHz"].setText(sprintf("%s", math.round(apu_hz.getValue())));
|
||||
}
|
||||
|
||||
if (apu_volts.getValue() > 120 or apu_volts.getValue() < 110 or apu_hz.getValue() > 410 or apu_hz.getValue() < 390 or apu_load.getValue() > 100) {
|
||||
if (apu_volts.getValue() > 120 or apu_volts.getValue() < 110 or apu_hz.getValue() > 410 or apu_hz.getValue() < 390 or apu_load.getValue() > 110) {
|
||||
me["APUGentext"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["APUGentext"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
|
||||
if(apu_load.getValue() > 100) {
|
||||
if(apu_load.getValue() > 110) {
|
||||
me["APUGenLoad"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["APUGenLoad"].setColor(0.0509,0.7529,0.2941);
|
||||
|
@ -1480,8 +1576,6 @@ var canvas_lowerECAM_elec = {
|
|||
}
|
||||
}
|
||||
|
||||
# TODO add IDG warnings and rise part
|
||||
|
||||
if (galleyshed.getValue() == 1 or (switch_galley.getValue() == 0)) {
|
||||
me["GalleyShed"].show();
|
||||
} else {
|
||||
|
@ -1519,7 +1613,7 @@ var canvas_lowerECAM_elec = {
|
|||
me["ELEC-ACESS-label"].setColor(0.7333,0.3803,0);
|
||||
}
|
||||
|
||||
if (ac_ess.getValue() > 110) {
|
||||
if (systems.ELEC.Bus.acEssShed.getValue() > 110) {
|
||||
me["ACESS-SHED"].hide();
|
||||
} else {
|
||||
me["ACESS-SHED"].show();
|
||||
|
@ -1539,25 +1633,25 @@ var canvas_lowerECAM_elec = {
|
|||
|
||||
|
||||
# Managment of the connecting lines between the components
|
||||
if (ac1_src.getValue() == "APU" or ac2_src.getValue() == "APU") {
|
||||
if (getprop("/systems/electrical/relay/apu-glc/contact-pos") and (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") or getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos"))) {
|
||||
me["APU-out"].show();
|
||||
} else {
|
||||
me["APU-out"].hide();
|
||||
}
|
||||
|
||||
if (ac1_src.getValue() == "EXT" or ac2_src.getValue() == "EXT") {
|
||||
if (getprop("/systems/electrical/relay/ext-epc/contact-pos") and (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") or getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos"))) {
|
||||
me["EXT-out"].show();
|
||||
} else {
|
||||
me["EXT-out"].hide();
|
||||
}
|
||||
|
||||
if (gen1_volts.getValue() >= 110) {
|
||||
if (gen1_volts.getValue() >= 110 and getprop("/systems/electrical/relay/gen-1-glc/contact-pos")) {
|
||||
me["ELEC-Line-GEN1-AC1"].show();
|
||||
} else {
|
||||
me["ELEC-Line-GEN1-AC1"].hide();
|
||||
}
|
||||
|
||||
if (gen2_volts.getValue() >= 110) {
|
||||
if (gen2_volts.getValue() >= 110 and getprop("/systems/electrical/relay/gen-2-glc/contact-pos")) {
|
||||
me["ELEC-Line-GEN2-AC2"].show();
|
||||
} else {
|
||||
me["ELEC-Line-GEN2-AC2"].hide();
|
||||
|
@ -1575,23 +1669,29 @@ var canvas_lowerECAM_elec = {
|
|||
me["AC2-in"].hide();
|
||||
}
|
||||
|
||||
if (ac1_src.getValue() == "APU" or ac1_src.getValue() == "EXT" or ac1_src.getValue() == "XTIE" or ac2_src.getValue() == "XTIE") {
|
||||
if (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") and getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos")) {
|
||||
me["ELEC-Line-APU-AC1"].show();
|
||||
me["ELEC-Line-APU-EXT"].show();
|
||||
me["ELEC-Line-EXT-AC2"].show();
|
||||
} else {
|
||||
if (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos")) {
|
||||
me["ELEC-Line-APU-AC1"].show();
|
||||
} else {
|
||||
me["ELEC-Line-APU-AC1"].hide();
|
||||
}
|
||||
|
||||
if (ac1_src.getValue() == "EXT" or ac2_src.getValue() == "APU" or ac1_src.getValue() == "XTIE" or ac2_src.getValue() == "XTIE") {
|
||||
if ((getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos") and getprop("/systems/electrical/relay/apu-glc/contact-pos") and !getprop("/systems/electrical/relay/gen-2-glc/contact-pos")) or (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") and getprop("/systems/electrical/relay/ext-epc/contact-pos") and !getprop("/systems/electrical/relay/gen-1-glc/contact-pos"))) {
|
||||
me["ELEC-Line-APU-EXT"].show();
|
||||
} else {
|
||||
me["ELEC-Line-APU-EXT"].hide();
|
||||
}
|
||||
|
||||
if (ac2_src.getValue() == "APU" or ac2_src.getValue() == "EXT" or ac1_src.getValue() == "XTIE" or ac2_src.getValue() == "XTIE") {
|
||||
if (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos")) {
|
||||
me["ELEC-Line-EXT-AC2"].show();
|
||||
} else {
|
||||
me["ELEC-Line-EXT-AC2"].hide();
|
||||
}
|
||||
}
|
||||
|
||||
if (switch_ac_ess_feed.getValue() == 1) {
|
||||
me["ELEC-Line-AC1-ACESS"].hide();
|
||||
|
@ -1627,44 +1727,56 @@ var canvas_lowerECAM_elec = {
|
|||
me["ELEC-Line-TR2-DC2"].hide();
|
||||
}
|
||||
|
||||
if (ac1.getValue() < 110) {
|
||||
me["ELEC-Line-DC1-DCESS"].hide();
|
||||
} else {
|
||||
me["ELEC-Line-DC1-DCESS"].show();
|
||||
}
|
||||
|
||||
if (dc1.getValue() < 25) {
|
||||
me["ELEC-Line-DC1-DCESS_DCBAT"].hide();
|
||||
me["ELEC-Line-DC1-DCBAT"].hide();
|
||||
} else {
|
||||
if (getprop("/systems/electrical/relay/dc-bus-tie-dc-1/contact-pos")) {
|
||||
me["ELEC-Line-DC1-DCESS_DCBAT"].show();
|
||||
me["ELEC-Line-DC1-DCBAT"].show();
|
||||
}
|
||||
|
||||
if (dc2.getValue() < 25 or dc1.getValue() >= 25 and ac1.getValue() >= 110) {
|
||||
me["ELEC-Line-DC2-DCESS_DCBAT"].hide();
|
||||
me["ELEC-Line-DC2-DCBAT"].hide();
|
||||
} else {
|
||||
me["ELEC-Line-DC2-DCESS_DCBAT"].show();
|
||||
me["ELEC-Line-DC2-DCBAT"].show();
|
||||
me["ELEC-Line-DC1-DCESS_DCBAT"].hide();
|
||||
}
|
||||
|
||||
if (switch_emer_gen.getValue() == 1 and (ac1.getValue() < 110 and switch_ac_ess_feed.getValue() == 0 or ac2.getValue() < 110 and switch_ac_ess_feed.getValue() == 1)) {
|
||||
if (getprop("/systems/electrical/relay/dc-ess-feed-bat/contact-pos")) {
|
||||
me["ELEC-Line-DC1-DCESS"].show();
|
||||
} else {
|
||||
me["ELEC-Line-DC1-DCESS"].hide();
|
||||
}
|
||||
|
||||
if (getprop("/systems/electrical/relay/dc-ess-feed-bat/contact-pos") or getprop("/systems/electrical/relay/dc-bus-tie-dc-1/contact-pos")) {
|
||||
me["ELEC-Line-DC1-DCBAT"].show();
|
||||
} else {
|
||||
me["ELEC-Line-DC1-DCBAT"].hide();
|
||||
}
|
||||
|
||||
if (getprop("/systems/electrical/relay/dc-bus-tie-dc-2/contact-pos")) {
|
||||
me["ELEC-Line-DC2-DCBAT"].show();
|
||||
me["ELEC-Line-DC2-DCESS_DCBAT"].show();
|
||||
} else {
|
||||
me["ELEC-Line-DC2-DCBAT"].hide();
|
||||
me["ELEC-Line-DC2-DCESS_DCBAT"].hide();
|
||||
}
|
||||
|
||||
if (getprop("/systems/electrical/relay/ac-ess-feed-emer-gen/contact-pos")) {
|
||||
me["EMERGEN-out"].show();
|
||||
me["ELEC-Line-Emergen-ESSTR"].show();
|
||||
} else {
|
||||
me["EMERGEN-out"].hide();
|
||||
me["ELEC-Line-Emergen-ESSTR"].hide();
|
||||
}
|
||||
|
||||
# TODO add connections from/to ESS TR
|
||||
if (!getprop("/systems/electrical/relay/ac-ess-feed-emer-gen/contact-pos") and (!getprop("/systems/electrical/relay/tr-contactor-1/contact-pos") or !getprop("/systems/electrical/relay/tr-contactor-2/contact-pos"))) {
|
||||
me["ELEC-Line-ACESS-TRESS"].show();
|
||||
} else {
|
||||
me["ELEC-Line-ACESS-TRESS"].hide();
|
||||
}
|
||||
|
||||
if (getprop("/systems/electrical/relay/dc-ess-feed-tr/contact-pos")) {
|
||||
me["ELEC-Line-ESSTR-DCESS"].show();
|
||||
} else {
|
||||
me["ELEC-Line-ESSTR-DCESS"].hide();
|
||||
}
|
||||
|
||||
# hide not yet implemented items
|
||||
me["IDG1-LOPR"].hide();
|
||||
me["IDG2-LOPR"].hide();
|
||||
me["IDG1-DISC"].hide();
|
||||
me["IDG2-DISC"].hide();
|
||||
me["Shed-label"].hide();
|
||||
me["ELEC-Line-ESSTR-DCESS"].hide();
|
||||
me["ELEC-Line-ACESS-TRESS"].hide();
|
||||
me["IDG2-RISE-label"].hide();
|
||||
me["IDG2-RISE-Value"].hide();
|
||||
me["IDG1-RISE-label"].hide();
|
||||
|
|
|
@ -2272,7 +2272,7 @@
|
|||
sodipodi:linespacing="0%"
|
||||
transform="scale(0.96119963,1.0403666)"
|
||||
inkscape:label="#text5149"
|
||||
id="text3891"
|
||||
id="Emergen-Label"
|
||||
y="659.37976"
|
||||
x="695.19788"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36px;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:-1.60000002px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:4.02423px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
|
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
|
@ -28,8 +28,8 @@ setprop("/MCDUC/colors/yel/g", 0.9333);
|
|||
setprop("/MCDUC/colors/yel/b", 0.0000);
|
||||
|
||||
# Fetch nodes:
|
||||
var ac1 = props.globals.getNode("/systems/electrical/bus/ac1", 1);
|
||||
var ac2 = props.globals.getNode("/systems/electrical/bus/ac2", 1);
|
||||
var ac1 = props.globals.getNode("/systems/electrical/bus/ac-1", 1);
|
||||
var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2", 1);
|
||||
var mcdu1_lgt = props.globals.getNode("/controls/lighting/DU/mcdu1", 1);
|
||||
var mcdu2_lgt = props.globals.getNode("/controls/lighting/DU/mcdu2", 1);
|
||||
var acType = props.globals.getNode("/MCDUC/type", 1);
|
||||
|
|
|
@ -105,7 +105,7 @@ var canvas_nd_base = {
|
|||
} else {
|
||||
du2_test.setValue(0);
|
||||
}
|
||||
if (getprop("/systems/electrical/bus/ac2") >= 110) {
|
||||
if (getprop("/systems/electrical/bus/ac-2") >= 110) {
|
||||
if (wow0.getValue() == 1) {
|
||||
if (getprop("/systems/acconfig/autoconfig-running") != 1 and du5_test.getValue() != 1) {
|
||||
du5_test.setValue(1);
|
||||
|
@ -143,7 +143,7 @@ var canvas_nd_base = {
|
|||
ND_1_test.page.hide();
|
||||
ND_1.page.hide();
|
||||
}
|
||||
if (getprop("/systems/electrical/bus/ac2") >= 110 and getprop("/controls/lighting/DU/du5") > 0) {
|
||||
if (getprop("/systems/electrical/bus/ac-2") >= 110 and getprop("/controls/lighting/DU/du5") > 0) {
|
||||
if (du5_test_time.getValue() + du5_test_amount.getValue() >= elapsedtime and fo_du_xfr.getValue() != 1) {
|
||||
ND_2.page.hide();
|
||||
ND_2_test.page.show();
|
||||
|
|
|
@ -69,16 +69,10 @@
|
|||
<object-name>SEC1Btn2O</object-name>
|
||||
<object-name>VentBlowBtn1F</object-name>
|
||||
<condition>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<property>systems/electrical/bus/ac-ess</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dc-ess</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</or>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
@ -186,11 +180,9 @@
|
|||
<object-name>CargoHotAirBtn2O</object-name>
|
||||
<object-name>EmerCallBtn1C</object-name>
|
||||
<object-name>EmerCallBtn2O</object-name>
|
||||
<object-name>EmerGenInd1F</object-name>
|
||||
<object-name>EvacCommandBtn1E</object-name>
|
||||
<object-name>EvacCommandBtn2O</object-name>
|
||||
<object-name>Gen1LineBtn1S</object-name>
|
||||
<object-name>Gen1LineBtn2O</object-name>
|
||||
<object-name>RcdrGndCtlBtn2O</object-name>
|
||||
<object-name>VentBlowBtn2O</object-name>
|
||||
<object-name>VentExtractBtn1F</object-name>
|
||||
|
@ -1979,7 +1971,7 @@
|
|||
</equals>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
|
@ -2011,7 +2003,7 @@
|
|||
</equals>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
|
@ -2881,7 +2873,7 @@
|
|||
<or>
|
||||
<and>
|
||||
<equals>
|
||||
<property>systems/electrical/galley-fault</property>
|
||||
<property>systems/electrical/light/galley-fault</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -2926,7 +2918,7 @@
|
|||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/electrical/switches/battery1</property>
|
||||
<property>controls/electrical/switches/bat-1</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -2942,11 +2934,11 @@
|
|||
<or>
|
||||
<and>
|
||||
<equals>
|
||||
<property>systems/electrical/batt1-fault</property>
|
||||
<property>systems/electrical/light/bat-1-fault</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>controls/electrical/switches/battery1</property>
|
||||
<property>controls/electrical/switches/bat-1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</and>
|
||||
|
@ -2964,7 +2956,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/electrical/switches/battery1</property>
|
||||
<property>controls/electrical/switches/bat-1</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -2987,7 +2979,7 @@
|
|||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/electrical/switches/battery2</property>
|
||||
<property>controls/electrical/switches/bat-2</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -3003,11 +2995,11 @@
|
|||
<or>
|
||||
<and>
|
||||
<equals>
|
||||
<property>systems/electrical/batt2-fault</property>
|
||||
<property>systems/electrical/light/bat-2-fault</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>controls/electrical/switches/battery2</property>
|
||||
<property>controls/electrical/switches/bat-2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</and>
|
||||
|
@ -3025,7 +3017,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/electrical/switches/battery2</property>
|
||||
<property>controls/electrical/switches/bat-2</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -3036,8 +3028,7 @@
|
|||
</condition>
|
||||
</animation>
|
||||
|
||||
<!-- Not modeled in electric system yet -->
|
||||
<!--animation>
|
||||
<animation>
|
||||
<name>IDG 1 pick</name>
|
||||
<type>pick</type>
|
||||
<object-name>IDG1Btn</object-name>
|
||||
|
@ -3052,11 +3043,24 @@
|
|||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</condition>
|
||||
<command>property-toggle</command>
|
||||
<property>systems/unused/unused-oh</property>
|
||||
<command>property-assign</command>
|
||||
<property>controls/electrical/switches/idg-1-disc</property>
|
||||
<value>0</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>controls/electrical/switches/idg-1-disc-momentary</property>
|
||||
<value>1</value>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>controls/electrical/switches/idg-1-disc-momentary</property>
|
||||
<value>0</value>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</action>
|
||||
</animation-->
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
|
@ -3064,7 +3068,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>systems/electrical/idg1-fault</property>
|
||||
<property>systems/electrical/light/idg-1-fault</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -3089,17 +3093,13 @@
|
|||
<condition>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dc-ess</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</or>
|
||||
</condition>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/electrical/switches/gen1</property>
|
||||
<property>controls/electrical/switches/gen-1</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -3113,16 +3113,10 @@
|
|||
<object-name>Gen1Btn1F</object-name>
|
||||
<condition>
|
||||
<or>
|
||||
<and>
|
||||
<equals>
|
||||
<property>systems/electrical/gen1-fault</property>
|
||||
<property>systems/electrical/light/gen-1-fault</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>controls/electrical/switches/gen1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</and>
|
||||
<equals>
|
||||
<property>controls/switches/annun-test</property>
|
||||
<value>1</value>
|
||||
|
@ -3137,7 +3131,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/electrical/switches/gen1</property>
|
||||
<property>controls/electrical/switches/gen-1</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -3161,7 +3155,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
|
@ -3186,7 +3180,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>systems/electrical/ac-ess-feed-fault</property>
|
||||
<property>systems/electrical/light/ac-ess-feed-fault</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -3226,19 +3220,13 @@
|
|||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<condition>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dc-ess</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</or>
|
||||
</condition>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/electrical/switches/gen-apu</property>
|
||||
<property>controls/electrical/switches/apu</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -3246,6 +3234,7 @@
|
|||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>APUGenBtn1F</object-name>
|
||||
|
@ -3253,11 +3242,11 @@
|
|||
<or>
|
||||
<and>
|
||||
<equals>
|
||||
<property>systems/electrical/apugen-fault</property>
|
||||
<property>systems/electrical/light/apu-fault</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>controls/electrical/switches/gen-apu</property>
|
||||
<property>controls/electrical/switches/apu</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</and>
|
||||
|
@ -3268,13 +3257,14 @@
|
|||
</or>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>APUGenBtn2O</object-name>
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/electrical/switches/gen-apu</property>
|
||||
<property>controls/electrical/switches/apu</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -3297,7 +3287,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
|
@ -3307,7 +3297,7 @@
|
|||
</or>
|
||||
</condition>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/electrical/switches/apu-ext-crosstie</property>
|
||||
<property>controls/electrical/switches/bus-tie</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -3322,7 +3312,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/electrical/switches/apu-ext-crosstie</property>
|
||||
<property>controls/electrical/switches/bus-tie</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -3344,8 +3334,14 @@
|
|||
<button>0</button>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/controls/electrical/ground-cart</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/electrical/switches/gen-ext</property>
|
||||
<property>controls/electrical/switches/ext-pwr</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -3353,21 +3349,16 @@
|
|||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>ExtPwrBtn1A</object-name>
|
||||
<condition>
|
||||
<or>
|
||||
<and>
|
||||
<equals>
|
||||
<property>controls/switches/cart</property>
|
||||
<property>/controls/electrical/ground-cart</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>controls/electrical/switches/gen-ext</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</and>
|
||||
<and>
|
||||
<equals>
|
||||
<property>controls/switches/annun-test</property>
|
||||
|
@ -3375,12 +3366,8 @@
|
|||
</equals>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dc-ess</property>
|
||||
<value>25</value>
|
||||
<property>systems/electrical/bus/ac-ess</property>
|
||||
<value>110</value>
|
||||
</greater-than-equals>
|
||||
</or>
|
||||
</and>
|
||||
|
@ -3391,22 +3378,22 @@
|
|||
<type>select</type>
|
||||
<object-name>ExtPwrBtn2O</object-name>
|
||||
<condition>
|
||||
<or>
|
||||
<and>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/switches/cart</property>
|
||||
<property>/systems/electrical/relay/ext-epc/contact-pos</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>controls/electrical/switches/gen-ext</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</and>
|
||||
<equals>
|
||||
<property>controls/switches/annun-test</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/ac-ess</property>
|
||||
<value>110</value>
|
||||
</greater-than-equals>
|
||||
</and>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
@ -3424,17 +3411,13 @@
|
|||
<condition>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dc-ess</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</or>
|
||||
</condition>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/electrical/switches/gen2</property>
|
||||
<property>controls/electrical/switches/gen-2</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
|
@ -3448,16 +3431,10 @@
|
|||
<object-name>Gen2Btn1F</object-name>
|
||||
<condition>
|
||||
<or>
|
||||
<and>
|
||||
<equals>
|
||||
<property>systems/electrical/gen2-fault</property>
|
||||
<property>systems/electrical/light/gen-2-fault</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>controls/electrical/switches/gen2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</and>
|
||||
<equals>
|
||||
<property>controls/switches/annun-test</property>
|
||||
<value>1</value>
|
||||
|
@ -3472,7 +3449,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/electrical/switches/gen2</property>
|
||||
<property>controls/electrical/switches/gen-2</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
@ -3483,8 +3460,7 @@
|
|||
</condition>
|
||||
</animation>
|
||||
|
||||
<!-- Not modeled in electric system yet -->
|
||||
<!--animation>
|
||||
<animation>
|
||||
<name>IDG 2 pick</name>
|
||||
<type>pick</type>
|
||||
<object-name>IDG2Btn</object-name>
|
||||
|
@ -3499,21 +3475,34 @@
|
|||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</condition>
|
||||
<command>property-toggle</command>
|
||||
<property>systems/unused/unused-oh</property>
|
||||
<command>property-assign</command>
|
||||
<property>controls/electrical/switches/idg-2-disc</property>
|
||||
<value>0</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>controls/electrical/switches/idg-2-disc-momentary</property>
|
||||
<value>1</value>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>controls/electrical/switches/idg-2-disc-momentary</property>
|
||||
<value>0</value>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</action>
|
||||
</animation-->
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>IDG2Btn1F</object-name>
|
||||
<condition>
|
||||
<or>
|
||||
<greater-than>
|
||||
<property>systems/unused/unused-oh</property>
|
||||
<value>150</value> <!-- I didn't model faults yet -->
|
||||
</greater-than>
|
||||
<equals>
|
||||
<property>systems/electrical/light/idg-2-fault</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>controls/switches/annun-test</property>
|
||||
<value>1</value>
|
||||
|
@ -3522,6 +3511,177 @@
|
|||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<name>Emer Gen Test pick</name>
|
||||
<type>pick</type>
|
||||
<object-name>EmerGenTest</object-name>
|
||||
<action>
|
||||
<button>0</button>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<condition>
|
||||
<and>
|
||||
<equals>
|
||||
<property>controls/OH/protectors/emergentest</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</and>
|
||||
</condition>
|
||||
<command>property-assign</command>
|
||||
<property>/controls/electrical/switches/emer-gen-test</property>
|
||||
<value>1</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>controls/OH/protectors/emergentest</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/oh-btn", 1);</script>
|
||||
</binding>
|
||||
<mod-up>
|
||||
<binding>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>controls/OH/protectors/emergentest</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<command>property-assign</command>
|
||||
<property>/controls/electrical/switches/emer-gen-test</property>
|
||||
<value>0</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>controls/OH/protectors/emergentest</property>
|
||||
<value>0</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<condition>
|
||||
<not>
|
||||
<property>controls/OH/protectors/emergentest</property>
|
||||
</not>
|
||||
</condition>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/oh-cover", 1);</script>
|
||||
</binding>
|
||||
</mod-up>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>pick</type>
|
||||
<object-name>EmerGenTestGuard</object-name>
|
||||
<action>
|
||||
<button>0</button>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/OH/protectors/emergentest</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<condition>
|
||||
<not>
|
||||
<property>controls/OH/protectors/emergentest</property>
|
||||
</not>
|
||||
</condition>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/oh-cover", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>rotate</type>
|
||||
<object-name>EmerGenTestGuard</object-name>
|
||||
<property>controls/OH/protectors/emergentest</property>
|
||||
<factor>-145</factor>
|
||||
<axis>
|
||||
<x1-m>0.008142</x1-m>
|
||||
<y1-m>-0.298068</y1-m>
|
||||
<z1-m>-0.028926</z1-m>
|
||||
<x2-m>0.006752</x2-m>
|
||||
<y2-m>-0.286753</y2-m>
|
||||
<z2-m>-0.028926</z2-m>
|
||||
</axis>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<name>Gen 1 Line Contactor pick</name>
|
||||
<type>pick</type>
|
||||
<object-name>Gen1LineBtn</object-name>
|
||||
<object-name>Gen1LineBtn1S</object-name>
|
||||
<object-name>Gen1LineBtn2O</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-assign</command>
|
||||
<property>controls/electrical/switches/gen-1-line-contactor</property>
|
||||
<value>0</value>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>Gen1LineBtn2O</object-name>
|
||||
<condition>
|
||||
<and>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dc-ess</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/electrical/switches/gen-1-line-contactor</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>controls/switches/annun-test</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</and>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>EmerGenInd1F</object-name>
|
||||
<condition>
|
||||
<and>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dc-ess</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<or>
|
||||
<and>
|
||||
<equals>
|
||||
<property>systems/electrical/bus/ac-1</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>systems/electrical/bus/ac-2</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</and>
|
||||
<equals>
|
||||
<property>controls/switches/annun-test</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</and>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<name>ELEC RAT MAN pick</name>
|
||||
<type>pick</type>
|
||||
|
@ -3538,7 +3698,7 @@
|
|||
</equals>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
|
@ -3548,8 +3708,9 @@
|
|||
</or>
|
||||
</and>
|
||||
</condition>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/electrical/switches/rat-man</property>
|
||||
<command>property-assign</command>
|
||||
<property>controls/electrical/switches/emer-elec-man-on</property>
|
||||
<value>1</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<condition>
|
||||
|
@ -3570,7 +3731,7 @@
|
|||
</equals>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
|
@ -3906,7 +4067,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
|
@ -4046,7 +4207,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
|
@ -4252,7 +4413,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
|
@ -4328,7 +4489,7 @@
|
|||
</equals>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
|
@ -4596,7 +4757,7 @@
|
|||
</equals>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
|
@ -5393,7 +5554,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
|
@ -5457,7 +5618,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dcbat</property>
|
||||
<property>systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
|
@ -6088,7 +6249,7 @@
|
|||
<axis-alignment>xy-plane</axis-alignment>
|
||||
<type type="string">number-value</type>
|
||||
<format type="string">%2.1f</format>
|
||||
<property>systems/electrical/battery1-volts</property>
|
||||
<property>systems/electrical/sources/bat-1/volt</property>
|
||||
<font type="string">led.txf</font>
|
||||
<draw-text type="bool">true</draw-text>
|
||||
<draw-alignment type="bool">false</draw-alignment>
|
||||
|
@ -6140,7 +6301,7 @@
|
|||
<axis-alignment>xy-plane</axis-alignment>
|
||||
<type type="string">number-value</type>
|
||||
<format type="string">%2.1f</format>
|
||||
<property>systems/electrical/battery2-volts</property>
|
||||
<property>systems/electrical/sources/bat-2/volt</property>
|
||||
<font type="string">led.txf</font>
|
||||
<draw-text type="bool">true</draw-text>
|
||||
<draw-alignment type="bool">false</draw-alignment>
|
||||
|
|
|
@ -43,7 +43,7 @@ var pitch = props.globals.getNode("/orientation/pitch-deg", 1);
|
|||
var roll = props.globals.getNode("/orientation/roll-deg", 1);
|
||||
var elapsedtime = props.globals.getNode("/sim/time/elapsed-sec", 1);
|
||||
var acess = props.globals.getNode("/systems/electrical/bus/ac-ess", 1);
|
||||
var ac2 = props.globals.getNode("/systems/electrical/bus/ac2", 1);
|
||||
var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2", 1);
|
||||
var du1_lgt = props.globals.getNode("/controls/lighting/DU/du1", 1);
|
||||
var du6_lgt = props.globals.getNode("/controls/lighting/DU/du6", 1);
|
||||
var acconfig = props.globals.getNode("/systems/acconfig/autoconfig-running", 1);
|
||||
|
|
|
@ -57,9 +57,9 @@ var ADIRS = {
|
|||
roll = getprop("/orientation/roll-deg");
|
||||
pitch = getprop("/orientation/pitch-deg");
|
||||
gs = getprop("/velocities/groundspeed-kt");
|
||||
ac1 = getprop("/systems/electrical/bus/ac1");
|
||||
ac2 = getprop("/systems/electrical/bus/ac2");
|
||||
dcbat = getprop("/systems/electrical/bus/dcbat");
|
||||
ac1 = getprop("/systems/electrical/bus/ac-1");
|
||||
ac2 = getprop("/systems/electrical/bus/ac-2");
|
||||
dcbat = getprop("/systems/electrical/bus/dc-bat");
|
||||
|
||||
if (getprop("/controls/adirs/skip") == 1) {
|
||||
if (getprop("/controls/adirs/align-time") != 5) {
|
||||
|
@ -110,9 +110,9 @@ var ADIRS = {
|
|||
}
|
||||
},
|
||||
beginAlign: func(n) {
|
||||
ac1 = getprop("/systems/electrical/bus/ac1");
|
||||
ac2 = getprop("/systems/electrical/bus/ac2");
|
||||
dcbat = getprop("/systems/electrical/bus/dcbat");
|
||||
ac1 = getprop("/systems/electrical/bus/ac-1");
|
||||
ac2 = getprop("/systems/electrical/bus/ac-2");
|
||||
dcbat = getprop("/systems/electrical/bus/dc-bat");
|
||||
setprop("/instrumentation/adirs/adr[" ~ n ~ "]/active", 1);
|
||||
if (getprop("/controls/adirs/ir[" ~ n ~ "]/align") != 1 and getprop("/instrumentation/adirs/ir[" ~ n ~ "]/aligned") != 1 and (ac1 >= 110 or ac2 >= 110 or dcbat >= 25)) {
|
||||
setprop("/controls/adirs/ir[" ~ n ~ "]/time", getprop("/sim/time/elapsed-sec"));
|
||||
|
|
|
@ -234,7 +234,7 @@ var ECAM = {
|
|||
|
||||
|
||||
# Warning Phases
|
||||
if (getprop("/systems/electrical/bus/ac1") < 110 and getprop("/systems/electrical/bus/ac2") < 110 and getprop("/systems/electrical/bus/ac-ess") < 110) { # Reset warning phases
|
||||
if (getprop("/systems/electrical/bus/ac-1") < 110 and getprop("/systems/electrical/bus/ac-2") < 110 and getprop("/systems/electrical/bus/ac-ess") < 110) { # Reset warning phases
|
||||
if (getprop("/ECAM/warning-phase") != 1) {
|
||||
setprop("/ECAM/warning-phase", 1);
|
||||
}
|
||||
|
|
|
@ -377,7 +377,7 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(eng1FireGnevacApu);
|
||||
}
|
||||
|
||||
if (eng1FireGnevacBat.clearFlag == 0 and (getprop("/controls/electrical/switches/battery1") or getprop("/controls/electrical/switches/battery2"))) {
|
||||
if (eng1FireGnevacBat.clearFlag == 0 and (systems.ELEC.Switch.bat1.getValue() or systems.ELEC.Switch.bat2.getValue())) {
|
||||
eng1FireGnevacBat.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(eng1FireGnevacBat);
|
||||
|
@ -560,7 +560,7 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(eng2FireGnevacApu);
|
||||
}
|
||||
|
||||
if (eng2FireGnevacBat.clearFlag == 0 and (getprop("/controls/electrical/switches/battery1") or getprop("/controls/electrical/switches/battery2"))) {
|
||||
if (eng2FireGnevacBat.clearFlag == 0 and (systems.ELEC.Switch.bat1.getValue() or systems.ELEC.Switch.bat2.getValue())) {
|
||||
eng2FireGnevacBat.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(eng2FireGnevacBat);
|
||||
|
@ -930,7 +930,7 @@ var messages_right_memo = func {
|
|||
land_asap_r.active = 0;
|
||||
}
|
||||
|
||||
if (land_asap_r.active == 0 and getprop("/gear/gear[1]/wow") == 0 and ((getprop("/fdm/jsbsim/propulsion/tank[0]/contents-lbs") < 1650 and getprop("/fdm/jsbsim/propulsion/tank[1]/contents-lbs") < 1650) or ((getprop("/systems/electrical/bus/dc2") < 25 and (getprop("/systems/failures/elac1") == 1 or getprop("/systems/failures/sec1") == 1)) or (getprop("/systems/hydraulic/green-psi") < 1500 and (getprop("/systems/failures/elac1") == 1 and getprop("/systems/failures/sec1") == 1)) or (getprop("/systems/hydraulic/yellow-psi") < 1500 and (getprop("/systems/failures/elac1") == 1 and getprop("/systems/failures/sec1") == 1)) or (getprop("/systems/hydraulic/blue-psi") < 1500 and (getprop("/systems/failures/elac2") == 1 and getprop("/systems/failures/sec2") == 1))) or (phaseVar >= 3 and phaseVar <= 8 and (getprop("/engines/engine[0]/state") != 3 or getprop("/engines/engine[1]/state") != 3)))) {
|
||||
if (land_asap_r.active == 0 and getprop("/gear/gear[1]/wow") == 0 and ((getprop("/fdm/jsbsim/propulsion/tank[0]/contents-lbs") < 1650 and getprop("/fdm/jsbsim/propulsion/tank[1]/contents-lbs") < 1650) or ((getprop("/systems/electrical/bus/dc-2") < 25 and (getprop("/systems/failures/elac1") == 1 or getprop("/systems/failures/sec1") == 1)) or (getprop("/systems/hydraulic/green-psi") < 1500 and (getprop("/systems/failures/elac1") == 1 and getprop("/systems/failures/sec1") == 1)) or (getprop("/systems/hydraulic/yellow-psi") < 1500 and (getprop("/systems/failures/elac1") == 1 and getprop("/systems/failures/sec1") == 1)) or (getprop("/systems/hydraulic/blue-psi") < 1500 and (getprop("/systems/failures/elac2") == 1 and getprop("/systems/failures/sec2") == 1))) or (phaseVar >= 3 and phaseVar <= 8 and (getprop("/engines/engine[0]/state") != 3 or getprop("/engines/engine[1]/state") != 3)))) {
|
||||
land_asap_a.active = 1;
|
||||
} else {
|
||||
land_asap_a.active = 0;
|
||||
|
@ -1037,7 +1037,7 @@ var messages_right_memo = func {
|
|||
ldg_lt.active = 0;
|
||||
}
|
||||
|
||||
if (getprop("/controls/switches/leng") == 1 or getprop("/controls/switches/reng") == 1 or getprop("/systems/electrical/bus/dc1") == 0 or getprop("/systems/electrical/bus/dc2") == 0) {
|
||||
if (getprop("/controls/switches/leng") == 1 or getprop("/controls/switches/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;
|
||||
|
@ -1090,7 +1090,7 @@ var messages_right_memo = func {
|
|||
gpws_flap3.active = 0;
|
||||
}
|
||||
|
||||
if (phaseVar >= 2 and phaseVar <= 9 and getprop("/systems/fuel/only-use-ctr-tank") == 1 and getprop("/systems/electrical/bus/ac1") >= 115 and getprop("/systems/electrical/bus/ac2") >= 115) {
|
||||
if (phaseVar >= 2 and phaseVar <= 9 and getprop("/systems/fuel/only-use-ctr-tank") == 1 and getprop("/systems/electrical/bus/ac-1") >= 115 and getprop("/systems/electrical/bus/ac-2") >= 115) {
|
||||
ctr_tk_feedg.active = 1;
|
||||
} else {
|
||||
ctr_tk_feedg.active = 0;
|
||||
|
|
|
@ -22,7 +22,7 @@ var Transponder = {
|
|||
knobNode: props.globals.getNode("instrumentation/transponder/inputs/knob-mode", 1),
|
||||
identNode: props.globals.getNode("/instrumentation/transponder/inputs/ident-btn", 1),
|
||||
wowNode: props.globals.getNode("/fdm/jsbsim/position/wow"),
|
||||
ac1Node: props.globals.getNode("/systems/electrical/bus/ac1", 1),
|
||||
ac1Node: props.globals.getNode("/systems/electrical/bus/ac-1", 1),
|
||||
tcasNode: props.globals.getNode("/instrumentation/tcas/inputs/mode"),
|
||||
aglNode: props.globals.getNode("/position/gear-agl-ft", 1),
|
||||
electricNode: props.globals.getNode("/systems/electrical/outputs/transponder", 1),
|
||||
|
@ -238,7 +238,7 @@ setlistener("/instrumentation/transponder/id-code", func {
|
|||
}
|
||||
}, 0, 0);
|
||||
|
||||
var Transponders = std.Vector.new([Transponder.new("/systems/electrical/bus/ac-ess-shed", 1), Transponder.new("/systems/electrical/bus/ac2", 2)]);
|
||||
var Transponders = std.Vector.new([Transponder.new("/systems/electrical/bus/ac-ess-shed", 1), Transponder.new("/systems/electrical/bus/ac-2", 2)]);
|
||||
|
||||
var transponderTimer = maketimer(0.1, func() {
|
||||
Transponders.vector[transponderPanel.atcSel - 1].update();
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -31,8 +31,8 @@ var FADEC = {
|
|||
setprop("/systems/fadec/eng2-master-time", -300);
|
||||
},
|
||||
loop: func() {
|
||||
var ac1 = getprop("/systems/electrical/bus/ac1");
|
||||
var ac2 = getprop("/systems/electrical/bus/ac2");
|
||||
var ac1 = getprop("/systems/electrical/bus/ac-1");
|
||||
var ac2 = getprop("/systems/electrical/bus/ac-2");
|
||||
var acess = getprop("/systems/electrical/bus/ac-ess");
|
||||
var state1 = getprop("/engines/engine[0]/state");
|
||||
var state2 = getprop("/engines/engine[1]/state");
|
||||
|
|
|
@ -35,8 +35,8 @@ var FADEC = {
|
|||
setprop("/systems/fadec/eng2-master-time", -300);
|
||||
},
|
||||
loop: func() {
|
||||
var ac1 = getprop("/systems/electrical/bus/ac1");
|
||||
var ac2 = getprop("/systems/electrical/bus/ac2");
|
||||
var ac1 = getprop("/systems/electrical/bus/ac-1");
|
||||
var ac2 = getprop("/systems/electrical/bus/ac-2");
|
||||
var acess = getprop("/systems/electrical/bus/ac-ess");
|
||||
var state1 = getprop("/engines/engine[0]/state");
|
||||
var state2 = getprop("/engines/engine[1]/state");
|
||||
|
|
|
@ -34,7 +34,7 @@ var eng1Agent2TimerTime = props.globals.initNode("/systems/fire/engine1/agent2-t
|
|||
var eng2Agent2TimerTime = props.globals.initNode("/systems/fire/engine2/agent2-timer-time", 0, "INT");
|
||||
var apuAgentTimerTime = props.globals.initNode("/systems/fire/apu/agent-timer-time", 0, "INT");
|
||||
var wow = props.globals.getNode("/fdm/jsbsim/position/wow", 1);
|
||||
var dcbatNode = props.globals.getNode("systems/electrical/bus/dcbat", 1);
|
||||
var dcbatNode = props.globals.getNode("systems/electrical/bus/dc-bat", 1);
|
||||
var dcessNode = props.globals.getNode("systems/electrical/bus/dc-ess", 1);
|
||||
var apuBleedNode = props.globals.getNode("/systems/apu/bleed-used", 1);
|
||||
var apuMaster = props.globals.getNode("/controls/APU/master", 1);
|
||||
|
@ -509,9 +509,9 @@ var cargoSmokeDetectorUnits = std.Vector.new([cargoSmokeDetectorUnit.new(0, "/sy
|
|||
|
||||
# Create detector loops
|
||||
var engDetectorLoops = std.Vector.new([
|
||||
detectorLoop.new(0, 1, "/systems/fire/engine1/temperature", "/systems/electrical/bus/dc-ess", "/systems/failures/engine-left-fire"), detectorLoop.new(0, 2, "/systems/fire/engine1/temperature", "/systems/electrical/bus/dc2", "/systems/failures/engine-left-fire"),
|
||||
detectorLoop.new(1, 1, "/systems/fire/engine2/temperature", "/systems/electrical/bus/dc2", "/systems/failures/engine-right-fire"), detectorLoop.new(1, 2, "/systems/fire/engine2/temperature", "/systems/electrical/bus/dc-ess", "/systems/failures/engine-right-fire"),
|
||||
detectorLoop.new(2, 1, "/systems/fire/apu/temperature", "/systems/electrical/bus/dcbat", "/systems/failures/apu-fire"), detectorLoop.new(2, 2, "/systems/fire/apu/temperature", "/systems/electrical/bus/dcbat", "/systems/failures/apu-fire")
|
||||
detectorLoop.new(0, 1, "/systems/fire/engine1/temperature", "/systems/electrical/bus/dc-ess", "/systems/failures/engine-left-fire"), detectorLoop.new(0, 2, "/systems/fire/engine1/temperature", "/systems/electrical/bus/dc-2", "/systems/failures/engine-left-fire"),
|
||||
detectorLoop.new(1, 1, "/systems/fire/engine2/temperature", "/systems/electrical/bus/dc-2", "/systems/failures/engine-right-fire"), detectorLoop.new(1, 2, "/systems/fire/engine2/temperature", "/systems/electrical/bus/dc-ess", "/systems/failures/engine-right-fire"),
|
||||
detectorLoop.new(2, 1, "/systems/fire/apu/temperature", "/systems/electrical/bus/dc-bat", "/systems/failures/apu-fire"), detectorLoop.new(2, 2, "/systems/fire/apu/temperature", "/systems/electrical/bus/dc-bat", "/systems/failures/apu-fire")
|
||||
]);
|
||||
|
||||
var cargoDetectorLoops = std.Vector.new([
|
||||
|
@ -521,15 +521,15 @@ cargoDetectorLoop.new(2, 1, "/systems/fire/cargo/fwd/temperature", "/systems/fai
|
|||
]);
|
||||
|
||||
# Create extinguisher bottles
|
||||
var extinguisherBottles = std.Vector.new([extinguisherBottle.new(0, "/systems/fire/engine1/disch1", "/systems/electrical/bus/dcbat", "/systems/failures/engine-left-fire", "/systems/fire/engine1/warning-active"), extinguisherBottle.new(1, "/systems/fire/engine1/disch2", "/systems/electrical/bus/dc2", "/systems/failures/engine-left-fire", "/systems/fire/engine1/warning-active"),
|
||||
extinguisherBottle.new(0, "/systems/fire/engine2/disch1", "/systems/electrical/bus/dcbat", "/systems/failures/engine-right-fire", "/systems/fire/engine2/warning-active"), extinguisherBottle.new(1, "/systems/fire/engine2/disch2", "/systems/electrical/bus/dc2", "/systems/failures/engine-right-fire", "/systems/fire/engine2/warning-active"),
|
||||
extinguisherBottle.new(9, "/systems/fire/apu/disch", "/systems/electrical/bus/dcbat", "/systems/failures/apu-fire", "/systems/fire/apu/warning-active") ]);
|
||||
var extinguisherBottles = std.Vector.new([extinguisherBottle.new(0, "/systems/fire/engine1/disch1", "/systems/electrical/bus/dc-bat", "/systems/failures/engine-left-fire", "/systems/fire/engine1/warning-active"), extinguisherBottle.new(1, "/systems/fire/engine1/disch2", "/systems/electrical/bus/dc-2", "/systems/failures/engine-left-fire", "/systems/fire/engine1/warning-active"),
|
||||
extinguisherBottle.new(0, "/systems/fire/engine2/disch1", "/systems/electrical/bus/dc-bat", "/systems/failures/engine-right-fire", "/systems/fire/engine2/warning-active"), extinguisherBottle.new(1, "/systems/fire/engine2/disch2", "/systems/electrical/bus/dc-2", "/systems/failures/engine-right-fire", "/systems/fire/engine2/warning-active"),
|
||||
extinguisherBottle.new(9, "/systems/fire/apu/disch", "/systems/electrical/bus/dc-bat", "/systems/failures/apu-fire", "/systems/fire/apu/warning-active") ]);
|
||||
|
||||
# There is only one bottle but the system will think there are two, so other parts work
|
||||
var cargoExtinguisherBottles = std.Vector.new([extinguisherBottle.new(8, "/systems/fire/cargo/disch", "/systems/electrical/bus/dcbat", "/systems/failures/cargo-aft-fire", "/systems/fire/cargo/aft/warning-active", 250), extinguisherBottle.new(7, "/systems/fire/cargo/disch", "/systems/electrical/bus/dcbat", "/systems/failures/cargo-fwd-fire", "/systems/fire/cargo/fwd/warning-active", 250)]);
|
||||
var cargoExtinguisherBottles = std.Vector.new([extinguisherBottle.new(8, "/systems/fire/cargo/disch", "/systems/electrical/bus/dc-bat", "/systems/failures/cargo-aft-fire", "/systems/fire/cargo/aft/warning-active", 250), extinguisherBottle.new(7, "/systems/fire/cargo/disch", "/systems/electrical/bus/dc-bat", "/systems/failures/cargo-fwd-fire", "/systems/fire/cargo/fwd/warning-active", 250)]);
|
||||
|
||||
# Create CIDS channels
|
||||
var CIDSchannels = std.Vector.new([CIDSchannel.new("/systems/electrical/bus/dc-ess"), CIDSchannel.new("/systems/electrical/bus/dc2")]);
|
||||
var CIDSchannels = std.Vector.new([CIDSchannel.new("/systems/electrical/bus/dc-ess"), CIDSchannel.new("/systems/electrical/bus/dc-2")]);
|
||||
|
||||
# Setlistener helper
|
||||
var createFireBottleListener = func(prop, fireBtnProp, index) {
|
||||
|
|
|
@ -68,8 +68,8 @@ var FUEL = {
|
|||
tank2pump2_sw = getprop("/controls/fuel/tank2pump2");
|
||||
mode_sw = getprop("/controls/fuel/mode");
|
||||
xfeed = getprop("/systems/fuel/x-feed");
|
||||
ac1 = getprop("/systems/electrical/bus/ac1");
|
||||
ac2 = getprop("/systems/electrical/bus/ac2");
|
||||
ac1 = getprop("/systems/electrical/bus/ac-1");
|
||||
ac2 = getprop("/systems/electrical/bus/ac-2");
|
||||
gravityfeedL = getprop("/systems/fuel/gravityfeedL");
|
||||
gravityfeedR = getprop("/systems/fuel/gravityfeedR");
|
||||
gload = getprop("/accelerations/pilot-gdamped");
|
||||
|
|
|
@ -9,7 +9,6 @@ var elec_pump_blue_sw = 0;
|
|||
var elec_pump_yellow_sw = 0;
|
||||
var yellow_hand_pump = 0;
|
||||
var ptu_sw = 0;
|
||||
var rat_man_sw = 0;
|
||||
var blue_psi = 0;
|
||||
var green_psi = 0;
|
||||
var yellow_psi = 0;
|
||||
|
@ -19,7 +18,6 @@ var stateR = 0;
|
|||
var dc_ess = 0;
|
||||
var psi_diff = 0;
|
||||
var rat = 0;
|
||||
var ratout = 0;
|
||||
var gs = 0;
|
||||
var blue_leak = 0;
|
||||
var green_leak = 0;
|
||||
|
@ -51,9 +49,6 @@ var HYD = {
|
|||
setprop("/controls/hydraulic/elec-pump-yellow", 0);
|
||||
setprop("/controls/hydraulic/hand-pump-yellow", 0);
|
||||
setprop("/controls/hydraulic/ptu", 1);
|
||||
setprop("/controls/hydraulic/rat-man", 0);
|
||||
setprop("/controls/hydraulic/rat", 0);
|
||||
setprop("/controls/hydraulic/rat-deployed", 0);
|
||||
setprop("/systems/hydraulic/ptu-active", 0);
|
||||
setprop("/systems/hydraulic/blue-psi", 0);
|
||||
setprop("/systems/hydraulic/green-psi", 0);
|
||||
|
@ -93,7 +88,6 @@ var HYD = {
|
|||
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");
|
||||
rat_man_sw = getprop("/controls/hydraulic/rat-man");
|
||||
blue_psi = getprop("/systems/hydraulic/blue-psi");
|
||||
green_psi = getprop("/systems/hydraulic/green-psi");
|
||||
yellow_psi = getprop("/systems/hydraulic/yellow-psi");
|
||||
|
@ -102,8 +96,7 @@ var HYD = {
|
|||
stateR = getprop("/engines/engine[1]/state");
|
||||
dc_ess = getprop("/systems/electrical/bus/dc-ess");
|
||||
psi_diff = green_psi - yellow_psi;
|
||||
rat = getprop("/controls/hydraulic/rat");
|
||||
ratout = getprop("/controls/hydraulic/rat-deployed");
|
||||
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");
|
||||
|
@ -113,7 +106,7 @@ var HYD = {
|
|||
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/dc2");
|
||||
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);
|
||||
|
@ -121,13 +114,6 @@ var HYD = {
|
|||
setprop("/systems/hydraulic/ptu-active", 0);
|
||||
}
|
||||
|
||||
if ((rat_man_sw == 1 or getprop("/controls/electrical/switches/emer-gen") == 1) and gs >= 100) {
|
||||
setprop("/controls/hydraulic/rat", 1);
|
||||
setprop("/controls/hydraulic/rat-deployed", 1);
|
||||
} else if (gs < 100) {
|
||||
setprop("/controls/hydraulic/rat", 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) {
|
||||
|
@ -136,11 +122,11 @@ var HYD = {
|
|||
} else {
|
||||
setprop("/systems/hydraulic/blue-psi", 3000);
|
||||
}
|
||||
} else if (gs >= 50 and rat and !blue_leak) {
|
||||
} 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", 2250);
|
||||
setprop("/systems/hydraulic/blue-psi", 2500);
|
||||
}
|
||||
} else {
|
||||
if (blue_psi > 1) {
|
||||
|
|
|
@ -233,14 +233,14 @@ var icingModel = func {
|
|||
}
|
||||
}
|
||||
|
||||
# if ((getprop("/systems/electrical/bus/dc1") == 0 or getprop("/systems/electrical/bus/dc2") == 0) and getprop("/fdm/jsbsim/position/wow") == 0) {
|
||||
# if ((getprop("/systems/electrical/bus/dc-1") == 0 or getprop("/systems/electrical/bus/dc-2") == 0) and getprop("/fdm/jsbsim/position/wow") == 0) {
|
||||
# setprop("/controls/switches/leng", 1);
|
||||
# setprop("/controls/switches/reng", 1);
|
||||
# }
|
||||
|
||||
if (getprop("/systems/electrical/bus/dc-ess-shed") == 0) {
|
||||
setprop("/controls/switches/wing", 0);
|
||||
}
|
||||
#if (getprop("/systems/electrical/bus/dc-ess-shed") == 0) {
|
||||
# setprop("/controls/switches/wing", 0);
|
||||
#}
|
||||
}
|
||||
|
||||
#################
|
||||
|
|
|
@ -51,15 +51,15 @@ var update_loop = func {
|
|||
var fac1_fail = getprop("/systems/failures/fac1");
|
||||
var fac2_fail = getprop("/systems/failures/fac2");
|
||||
|
||||
var ac_ess = getprop("/systems/electrical/bus/ac-ess");
|
||||
var dc_ess = getprop("/systems/electrical/bus/dc-ess");
|
||||
var dc_ess_shed = getprop("/systems/electrical/bus/dc-ess-shed");
|
||||
var ac1 = getprop("/systems/electrical/bus/ac1");
|
||||
var ac2 = getprop("/systems/electrical/bus/ac2");
|
||||
var dc1 = getprop("/systems/electrical/bus/dc1");
|
||||
var dc2 = getprop("/systems/electrical/bus/dc2");
|
||||
var battery1_sw = getprop("/controls/electrical/switches/battery1");
|
||||
var battery2_sw = getprop("/controls/electrical/switches/battery2");
|
||||
var ac_ess = props.globals.getNode("/systems/electrical/bus/ac-ess").getValue();
|
||||
var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess").getValue();
|
||||
var dc_ess_shed = props.globals.getNode("/systems/electrical/bus/dc-ess-shed").getValue();
|
||||
var ac1 = props.globals.getNode("/systems/electrical/bus/ac-1").getValue();
|
||||
var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2").getValue();
|
||||
var dc1 = props.globals.getNode("/systems/electrical/bus/dc-1").getValue();
|
||||
var dc2 = props.globals.getNode("/systems/electrical/bus/dc-2").getValue();
|
||||
var battery1_sw = props.globals.getNode("/controls/electrical/switches/bat-1").getValue();
|
||||
var battery2_sw = props.globals.getNode("/controls/electrical/switches/bat-2").getValue();
|
||||
var elac1_test = getprop("/systems/electrical/elac1-test");
|
||||
var elac2_test = getprop("/systems/electrical/elac2-test");
|
||||
|
||||
|
@ -174,12 +174,12 @@ var update_loop = func {
|
|||
setprop("/it-fbw/degrade-law", 1);
|
||||
}
|
||||
}
|
||||
if (getprop("/systems/electrical/bus/ac-ess") >= 110 and getprop("/systems/hydraulic/blue-psi") >= 1500 and getprop("/systems/hydraulic/green-psi") < 1500 and getprop("/systems/hydraulic/yellow-psi") < 1500) {
|
||||
if (ac_ess >= 110 and getprop("/systems/hydraulic/blue-psi") >= 1500 and getprop("/systems/hydraulic/green-psi") < 1500 and getprop("/systems/hydraulic/yellow-psi") < 1500) {
|
||||
if (law == 0 or law == 1) {
|
||||
setprop("/it-fbw/degrade-law", 2);
|
||||
}
|
||||
}
|
||||
if (getprop("/systems/electrical/bus/ac-ess") < 110 or (getprop("/systems/hydraulic/blue-psi") < 1500 and getprop("/systems/hydraulic/green-psi") < 1500 and getprop("/systems/hydraulic/yellow-psi") < 1500)) {
|
||||
if (ac_ess < 110 or (getprop("/systems/hydraulic/blue-psi") < 1500 and getprop("/systems/hydraulic/green-psi") < 1500 and getprop("/systems/hydraulic/yellow-psi") < 1500)) {
|
||||
setprop("/it-fbw/degrade-law", 3);
|
||||
}
|
||||
}
|
||||
|
@ -190,10 +190,11 @@ var update_loop = func {
|
|||
}
|
||||
}
|
||||
|
||||
# degrade loop runs faster; reset this variable
|
||||
var law = getprop("/it-fbw/law");
|
||||
|
||||
# Mech Backup can always return to direct, if it can.
|
||||
if (law == 3 and getprop("/systems/electrical/bus/ac-ess") >= 110 and (getprop("/systems/hydraulic/green-psi") >= 1500 or getprop("/systems/hydraulic/blue-psi") >= 1500 or getprop("/systems/hydraulic/yellow-psi") >= 1500)) {
|
||||
if (law == 3 and ac_ess >= 110 and (getprop("/systems/hydraulic/green-psi") >= 1500 or getprop("/systems/hydraulic/blue-psi") >= 1500 or getprop("/systems/hydraulic/yellow-psi") >= 1500)) {
|
||||
setprop("/it-fbw/degrade-law", 2);
|
||||
}
|
||||
|
||||
|
|
|
@ -235,8 +235,8 @@ var systemsLoop = maketimer(0.1, func {
|
|||
fadec.FADEC.loop();
|
||||
rmp.rmpUpdate();
|
||||
|
||||
if ((getprop("/controls/pneumatic/switches/groundair") or getprop("/controls/switches/cart")) and ((getprop("/velocities/groundspeed-kt") > 2) or getprop("/controls/gear/brake-parking") == 0)) {
|
||||
setprop("/controls/switches/cart", 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)) {
|
||||
setprop("/controls/electrical/ground-cart", 0);
|
||||
setprop("/controls/pneumatic/switches/groundair", 0);
|
||||
}
|
||||
|
||||
|
@ -485,9 +485,9 @@ var lightsLoop = maketimer(0.2, func {
|
|||
|
||||
# nose lights
|
||||
|
||||
if (settingT == 0.5 and gear > 0.9 and (getprop("/systems/electrical/bus/ac1") > 0 or getprop("/systems/electrical/bus/ac2") > 0)) {
|
||||
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/ac1") > 0 or getprop("/systems/electrical/bus/ac2") > 0)) {
|
||||
} 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);
|
||||
|
@ -498,13 +498,13 @@ var lightsLoop = maketimer(0.2, func {
|
|||
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/ac1") > 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/ac2") > 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);
|
||||
|
@ -517,7 +517,7 @@ var lightsLoop = maketimer(0.2, func {
|
|||
wow = getprop("/gear/gear[2]/wow");
|
||||
slats = getprop("/controls/flight/slats");
|
||||
|
||||
if (getprop("/systems/electrical/bus/ac1") > 0 or getprop("/systems/electrical/bus/ac2") > 0 or getprop("/systems/electrical/bus/dc1") > 0 or getprop("/systems/electrical/bus/dc2") > 0) {
|
||||
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);
|
||||
|
@ -525,7 +525,7 @@ var lightsLoop = maketimer(0.2, func {
|
|||
|
||||
if (setting == 0 and logo_lights == 1) {
|
||||
logo_lights.setBoolValue(0);
|
||||
} else if (setting == 1 or setting == 2 and (getprop("/systems/electrical/bus/ac1") > 0 or getprop("/systems/electrical/bus/ac2") > 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 {
|
||||
|
@ -535,7 +535,7 @@ var lightsLoop = maketimer(0.2, func {
|
|||
logo_lights.setBoolValue(0);
|
||||
}
|
||||
|
||||
if (setting == 1 or setting == 2 and (getprop("/systems/electrical/bus/ac1") > 0 or getprop("/systems/electrical/bus/ac2") > 0 or getprop("/systems/electrical/bus/dc1") > 0 or getprop("/systems/electrical/bus/dc2") > 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);
|
||||
|
@ -552,9 +552,9 @@ var lightsLoop = maketimer(0.2, func {
|
|||
# strobe
|
||||
strobe_sw = strobe_switch.getValue();
|
||||
|
||||
if (strobe_sw == 1 and getprop("/systems/electrical/bus/ac2") > 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/ac2") > 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 {
|
||||
|
@ -563,7 +563,7 @@ var lightsLoop = maketimer(0.2, func {
|
|||
|
||||
# beacon
|
||||
|
||||
if (beacon_switch.getValue() == 1 and (getprop("/systems/electrical/bus/ac1") > 0 or getprop("/systems/electrical/bus/ac2") > 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);
|
||||
|
@ -571,7 +571,7 @@ var lightsLoop = maketimer(0.2, func {
|
|||
|
||||
# wing
|
||||
|
||||
if (wing_switch.getValue() == 1 and (getprop("/systems/electrical/bus/ac1") > 0 or getprop("/systems/electrical/bus/ac2") > 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);
|
||||
|
@ -579,13 +579,13 @@ var lightsLoop = maketimer(0.2, func {
|
|||
|
||||
# landL
|
||||
|
||||
if (landlSw.getValue() == 1 and getprop("/systems/electrical/bus/ac1") > 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/ac2") > 0) {
|
||||
if (landrSw.getValue() == 1 and getprop("/systems/electrical/bus/ac-2") > 0) {
|
||||
landR.setValue(1);
|
||||
} else {
|
||||
landR.setValue(0);
|
||||
|
|
|
@ -197,15 +197,15 @@ var light_manager = {
|
|||
var sh = math.sin(heading);
|
||||
var ch = math.cos(heading);
|
||||
|
||||
if ((ll1 == 1 and getprop("/systems/electrical/bus/ac1") != 0) and (ll2 == 1 and getprop("/systems/electrical/bus/ac2") !=0)) {
|
||||
if ((ll1 == 1 and getprop("/systems/electrical/bus/ac-1") != 0) and (ll2 == 1 and getprop("/systems/electrical/bus/ac-2") !=0)) {
|
||||
me.light1_ypos = 0.0;
|
||||
me.light1_setSize(16);
|
||||
me.light1_on();
|
||||
} else if (ll1 == 1 and getprop("/systems/electrical/bus/ac1") != 0) {
|
||||
} else if (ll1 == 1 and getprop("/systems/electrical/bus/ac-1") != 0) {
|
||||
me.light1_ypos = 3.0;
|
||||
me.light1_setSize(12);
|
||||
me.light1_on();
|
||||
} else if (ll2 == 1 and getprop("/systems/electrical/bus/ac2") !=0) {
|
||||
} else if (ll2 == 1 and getprop("/systems/electrical/bus/ac-2") !=0) {
|
||||
me.light1_ypos = -3.0;
|
||||
me.light1_setSize(12);
|
||||
me.light1_on();
|
||||
|
|
|
@ -1408,11 +1408,11 @@
|
|||
<condition>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/controls/switches/cart</property>
|
||||
<property>/controls/electrical/ground-cart</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/controls/electrical/switches/gen-ext</property>
|
||||
<property>/controls/electrical/switches/ext-pwr</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</and>
|
||||
|
@ -1446,11 +1446,11 @@
|
|||
<property>/sim/current-view/internal</property>
|
||||
<or>
|
||||
<greater-than>
|
||||
<property>/systems/electrical/bus/ac1</property>
|
||||
<property>/systems/electrical/bus/ac-1</property>
|
||||
<value>110</value>
|
||||
</greater-than>
|
||||
<greater-than>
|
||||
<property>/systems/electrical/bus/ac2</property>
|
||||
<property>/systems/electrical/bus/ac-2</property>
|
||||
<value>110</value>
|
||||
</greater-than>
|
||||
</or>
|
||||
|
|
1175
Systems/a320-electrical.xml
Normal file
1175
Systems/a320-electrical.xml
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1866,7 +1866,7 @@
|
|||
<switch name="fcs/sfcc/unit2-avail">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/systems/electrical/bus/dc2 ge 25
|
||||
/systems/electrical/bus/dc-2 ge 25
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
|
@ -2025,10 +2025,10 @@
|
|||
<switch name="hydraulics/tiller/elec-pwr">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/systems/electrical/bus/ac1 ge 110
|
||||
/systems/electrical/bus/ac2 ge 110
|
||||
/systems/electrical/bus/dc1 ge 25
|
||||
/systems/electrical/bus/dc2 ge 25
|
||||
/systems/electrical/bus/ac-1 ge 110
|
||||
/systems/electrical/bus/ac-2 ge 110
|
||||
/systems/electrical/bus/dc-1 ge 25
|
||||
/systems/electrical/bus/dc-2 ge 25
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
|
|
|
@ -3,31 +3,55 @@
|
|||
<system name="A320: Lights">
|
||||
|
||||
<channel name="Lights">
|
||||
<switch name="lights/reading-light">
|
||||
<output>/controls/lighting/reading-light</output>
|
||||
|
||||
<switch name="/controls/lighting/reading-light">
|
||||
<default value="0" />
|
||||
<test logic="OR" value="/controls/lighting/main-flood-knb">
|
||||
/systems/electrical/bus/dc1 gt 25
|
||||
<test value="/controls/lighting/main-flood-knb">
|
||||
/systems/electrical/bus/dc-1 gt 25
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="lights/panel-light">
|
||||
<output>/controls/lighting/panel-light</output>
|
||||
|
||||
<switch name="/controls/lighting/panel-light">
|
||||
<default value="0" />
|
||||
<test logic="OR" value="/controls/lighting/main-flood-knb">
|
||||
/systems/electrical/bus/dc-ess gt 25
|
||||
/systems/electrical/bus/dc1 gt 25
|
||||
/systems/electrical/bus/dc-1 gt 25
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="lights/pedestal-light">
|
||||
<output>/controls/lighting/pedestal-light</output>
|
||||
|
||||
<switch name="/controls/lighting/pedestal-light">
|
||||
<default value="0" />
|
||||
<test logic="OR" value="/controls/lighting/ped-flood-knb">
|
||||
/systems/electrical/bus/dc1 gt 25
|
||||
<test value="/controls/lighting/ped-flood-knb">
|
||||
/systems/electrical/bus/dc-1 gt 25
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/controls/lighting/fcu-panel-norm">
|
||||
<default value="0" />
|
||||
<test value="/controls/lighting/fcu-panel-knb">
|
||||
/systems/electrical/bus/ac-1 gt 25
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/controls/lighting/main-panel-norm">
|
||||
<default value="0" />
|
||||
<test value="/controls/lighting/main-panel-knb">
|
||||
/systems/electrical/bus/ac-1 gt 25
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/controls/lighting/overhead-panel-norm">
|
||||
<default value="0" />
|
||||
<test value="/controls/lighting/overhead-panel-knb">
|
||||
/systems/electrical/bus/ac-1 gt 25
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/controls/lighting/annunciator-lights">
|
||||
<default value="0" />
|
||||
<test logic="OR" value="1"> <!-- TODO: add static inverter as a source, also dc-2 switching -->
|
||||
/systems/electrical/bus/ac-1 gt 110
|
||||
/systems/electrical/bus/ac-2 gt 110
|
||||
/systems/electrical/bus/dc-2 gt 25
|
||||
</test>
|
||||
</switch>
|
||||
</channel>
|
||||
|
|
|
@ -870,15 +870,15 @@
|
|||
<condition>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dcbat</property>
|
||||
<property>/systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dc1</property>
|
||||
<property>/systems/electrical/bus/dc-1</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dc2</property>
|
||||
<property>/systems/electrical/bus/dc-2</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</or>
|
||||
|
@ -916,15 +916,15 @@
|
|||
<and>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dcbat</property>
|
||||
<property>/systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dc1</property>
|
||||
<property>/systems/electrical/bus/dc-1</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dc2</property>
|
||||
<property>/systems/electrical/bus/dc-2</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</or>
|
||||
|
@ -946,15 +946,15 @@
|
|||
<and>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dcbat</property>
|
||||
<property>/systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dc1</property>
|
||||
<property>/systems/electrical/bus/dc-1</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dc2</property>
|
||||
<property>/systems/electrical/bus/dc-2</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</or>
|
||||
|
@ -1003,15 +1003,15 @@
|
|||
<and>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dcbat</property>
|
||||
<property>/systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dc1</property>
|
||||
<property>/systems/electrical/bus/dc-1</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dc2</property>
|
||||
<property>/systems/electrical/bus/dc-2</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</or>
|
||||
|
@ -1033,15 +1033,15 @@
|
|||
<and>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dcbat</property>
|
||||
<property>/systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dc1</property>
|
||||
<property>/systems/electrical/bus/dc-1</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dc2</property>
|
||||
<property>/systems/electrical/bus/dc-2</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</or>
|
||||
|
@ -1071,15 +1071,15 @@
|
|||
<and>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dcbat</property>
|
||||
<property>/systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dc1</property>
|
||||
<property>/systems/electrical/bus/dc-1</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dc2</property>
|
||||
<property>/systems/electrical/bus/dc-2</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</or>
|
||||
|
@ -1123,15 +1123,15 @@
|
|||
<and>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dcbat</property>
|
||||
<property>/systems/electrical/bus/dc-bat</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dc1</property>
|
||||
<property>/systems/electrical/bus/dc-1</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>/systems/electrical/bus/dc2</property>
|
||||
<property>/systems/electrical/bus/dc-2</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</or>
|
||||
|
|
Reference in a new issue