MAJOR Update to engine system, new ACCONFIG System: step 1/5 of THE BIG PUSH

This commit is contained in:
Joshua Davidson 2017-04-05 18:36:27 -04:00
parent d4069ab9da
commit 4ae105e6e7
25 changed files with 34047 additions and 3235 deletions

View file

@ -75,7 +75,6 @@
<nasal>
<A320>
<file>Aircraft/A320Family/Nasal/engines.nas</file>
<file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/systems.nas</file>
<file>Aircraft/A320Family/Nasal/a319livery.nas</file>
@ -85,6 +84,12 @@
<file>Aircraft/A320Family/Nasal/PFD_FMA.nas</file>
<file>Aircraft/A320Family/Nasal/fctl.nas</file>
</A320>
<acconfig>
<file>Aircraft/A320Family/AircraftConfig/acconfig.nas</file>
</acconfig>
<systems>
<file>Aircraft/A320Family/Nasal/engines.nas</file>
</systems>
<itaf>
<file>Aircraft/A320Family/Nasal/it-autoflight.nas</file>
</itaf>

View file

@ -68,7 +68,6 @@
<nasal>
<A320>
<file>Aircraft/A320Family/Nasal/engines.nas</file>
<file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/systems.nas</file>
<file>Aircraft/A320Family/Nasal/a320livery.nas</file>
@ -78,6 +77,12 @@
<file>Aircraft/A320Family/Nasal/PFD_FMA.nas</file>
<file>Aircraft/A320Family/Nasal/fctl.nas</file>
</A320>
<acconfig>
<file>Aircraft/A320Family/AircraftConfig/acconfig.nas</file>
</acconfig>
<systems>
<file>Aircraft/A320Family/Nasal/engines.nas</file>
</systems>
<itaf>
<file>Aircraft/A320Family/Nasal/it-autoflight.nas</file>
</itaf>

View file

@ -72,7 +72,7 @@
</instrumentation>
<alarms>
<master-caution type="bool">false</master-caution>
<master-caution type="bool">0</master-caution>
</alarms>
<menubar>
@ -93,24 +93,15 @@
<menu n="100">
<enabled type="bool">true</enabled>
<item>
<name>autostart</name>
<label>Autostart</label>
<binding>
<command>property-toggle</command>
<property>sim/model/start-idling</property>
</binding>
</item>
<item>
<label>Select Livery</label>
<label>Aircraft Config</label>
<binding>
<command>nasal</command>
<script>
aircraft.livery.dialog.open();
acconfig.main_dlg.open();
</script>
</binding>
</item>
<item>
<name>pushback</name>
<label>Pushback</label>
<binding>
<command>dialog-show</command>
@ -274,7 +265,21 @@
</settings>
</it-autoflight>
<engines n="0">
<engine n="0">
<egt-actual type="float">0</egt-actual>
<state type="int">0</state>
</engine>
<engine n="1">
<egt-actual type="float">0</egt-actual>
<state type="int">0</state>
</engine>
</engines>
<apu>
<rpm type="float">0</rpm>
<egt type="float">0</egt>
</apu>
<autopilot>
<autobrake>
@ -288,9 +293,10 @@
<controls>
<APU>
<fire-switch type="bool">false</fire-switch>
<master-switch type="bool">false</master-switch>
<starter type="bool">false</starter>
<fire-switch type="bool">0</fire-switch>
<master type="bool">0</master>
<start type="bool">0</start>
<bleed type="bool">0</bleed>
</APU>
<electric>
<avionics-switch type="bool">true</avionics-switch>
@ -300,65 +306,65 @@
<engine n="0">
<cutoff type="bool">true</cutoff>
<cutoff-switch type="bool">true</cutoff-switch>
<starter type="bool">false</starter>
<starter-switch type="bool">false</starter-switch>
<starter type="bool">0</starter>
<starter-switch type="bool">0</starter-switch>
<max-athr-thrust type="float">0.94</max-athr-thrust>
</engine>
<engine n="1">
<cutoff type="bool">true</cutoff>
<cutoff-switch type="bool">true</cutoff-switch>
<starter type="bool">false</starter>
<starter-switch type="bool">false</starter-switch>
<starter type="bool">0</starter>
<starter-switch type="bool">0</starter-switch>
<max-athr-thrust type="float">0.94</max-athr-thrust>
</engine>
</engines>
<flight>
<speedbrake-arm>0</speedbrake-arm>
<ground-spoilers-armed type="bool">false</ground-spoilers-armed>
<ground-spoilers-armed type="bool">0</ground-spoilers-armed>
<speedbrake-lever type="double">0</speedbrake-lever>
</flight>
<gear>
<brake-parking type="bool">true</brake-parking>
<tiller-cmd-norm type="double">0</tiller-cmd-norm>
<tiller-enabled type="bool">false</tiller-enabled>
<tiller-enabled type="bool">0</tiller-enabled>
</gear>
<lighting>
<beacon type="bool">false</beacon>
<beacon type="bool">0</beacon>
<interior type="double">0</interior>
<cockpit type="bool">false</cockpit>
<cockpit type="bool">0</cockpit>
<cones type="bool">true</cones>
<dome-norm type="double">0</dome-norm>
<landing-lights n="0" type="bool">false</landing-lights>
<landing-lights n="1" type="bool">false</landing-lights>
<landing-lights n="2" type="bool">false</landing-lights>
<landing-lights n="0" type="bool">0</landing-lights>
<landing-lights n="1" type="bool">0</landing-lights>
<landing-lights n="2" type="bool">0</landing-lights>
<nav-lights-switch type="int">0</nav-lights-switch>
<overhead-panel-norm type="double">0.8</overhead-panel-norm>
<main-panel-pedestal-norm type="double">0.8</main-panel-pedestal-norm>
<strobe type="bool">false</strobe>
<strobe type="bool">0</strobe>
</lighting>
<switches>
<!-- Smoking is bad :P -->
<no-smoking-sign type="bool">true</no-smoking-sign>
<seatbelt-sign type="bool">false</seatbelt-sign>
<seatbelt-sign type="bool">0</seatbelt-sign>
</switches>
</controls>
<engines>
<apu>
<rpm type="double">0</rpm>
<on-fire type="bool">false</on-fire>
<running type="bool">false</running>
<on-fire type="bool">0</on-fire>
<running type="bool">0</running>
<serviceable type="bool">true</serviceable>
</apu>
<engine n="0">
<on-fire type="bool">false</on-fire>
<on-fire type="bool">0</on-fire>
<reverser-pos-norm type="double">0</reverser-pos-norm>
<running type="bool">false</running>
<running type="bool">0</running>
</engine>
<engine n="1">
<on-fire type="bool">false</on-fire>
<on-fire type="bool">0</on-fire>
<reverser-pos-norm type="double">0</reverser-pos-norm>
<running type="bool">false</running>
<running type="bool">0</running>
</engine>
</engines>
@ -439,7 +445,7 @@
</configuration-module>
<inputs>
<arinc429>
<decision-height-ncd type="bool">false</decision-height-ncd>
<decision-height-ncd type="bool">0</decision-height-ncd>
<decision-height type="double">250</decision-height>
</arinc429>
</inputs>
@ -458,16 +464,16 @@
</groundradar>
<chrono n="0">
<started type="bool">false</started>
<paused type="bool">false</paused>
<started type="bool">0</started>
<paused type="bool">0</paused>
<text type="string">0' 00'</text>
<started-at type="int">0</started-at>
<elapsed-time type="int">0</elapsed-time>
</chrono>
<chrono n="1">
<started type="bool">false</started>
<paused type="bool">false</paused>
<started type="bool">0</started>
<paused type="bool">0</paused>
<text type="string">0' 00'</text>
<started-at type="int">0</started-at>
<elapsed-time type="int">0</elapsed-time>
@ -481,8 +487,8 @@
</altimeter>
<pfd>
<minimums-mode>DH</minimums-mode>
<ILS1>false</ILS1>
<ILS2>false</ILS2>
<ILS1>0</ILS1>
<ILS2>0</ILS2>
<stallvls>-10</stallvls>
<fma>
<athr-box>O </athr-box>

View file

@ -68,7 +68,6 @@
<nasal>
<A320>
<file>Aircraft/A320Family/Nasal/engines.nas</file>
<file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/systems.nas</file>
<file>Aircraft/A320Family/Nasal/a321livery.nas</file>
@ -78,6 +77,12 @@
<file>Aircraft/A320Family/Nasal/PFD_FMA.nas</file>
<file>Aircraft/A320Family/Nasal/fctl.nas</file>
</A320>
<acconfig>
<file>Aircraft/A320Family/AircraftConfig/acconfig.nas</file>
</acconfig>
<systems>
<file>Aircraft/A320Family/Nasal/engines.nas</file>
</systems>
<itaf>
<file>Aircraft/A320Family/Nasal/it-autoflight.nas</file>
</itaf>

View file

@ -74,10 +74,7 @@
<nasal>
<A320>
<file>Aircraft/A320Family/Nasal/engines.nas</file>
<file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/v-speeds.nas</file>
<file>Aircraft/A320Family/Nasal/tyresmoke.nas</file>
<file>Aircraft/A320Family/Nasal/systems.nas</file>
<file>Aircraft/A320Family/Nasal/acjlivery.nas</file>
<file>Aircraft/A320Family/Models/Instruments/ND/ND.nas</file>
@ -86,6 +83,12 @@
<file>Aircraft/A320Family/Nasal/PFD_FMA.nas</file>
<file>Aircraft/A320Family/Nasal/fctl.nas</file>
</A320>
<acconfig>
<file>Aircraft/A320Family/AircraftConfig/acconfig.nas</file>
</acconfig>
<systems>
<file>Aircraft/A320Family/Nasal/engines.nas</file>
</systems>
<itaf>
<file>Aircraft/A320Family/Nasal/it-autoflight.nas</file>
</itaf>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- A3XX Aircraft Config Dialog -->
<PropertyList>
<name>aircraft-config-init</name>
<layout>vbox</layout>
<pref-width>200</pref-width>
<group>
<layout>hbox</layout>
<text>
<halign>left</halign>
<label>Please wait...</label>
</text>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<text>
<halign>center</halign>
<label>Initializing...</label>
</text>
</group>
</PropertyList>

197
AircraftConfig/acconfig.nas Normal file
View file

@ -0,0 +1,197 @@
# Aircraft Config Center
# Joshua Davidson (it0uchpods)
setprop("/systems/acconfig/autoconfig-running", 0);
var main_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/main/dialog", "Aircraft/A320Family/AircraftConfig/main.xml");
var welcome_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/welcome/dialog", "Aircraft/A320Family/AircraftConfig/welcome.xml");
var ps_load_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psload/dialog", "Aircraft/A320Family/AircraftConfig/psload.xml");
var ps_loaded_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psloaded/dialog", "Aircraft/A320Family/AircraftConfig/psloaded.xml");
var init_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/init/dialog", "Aircraft/A320Family/AircraftConfig/ac_init.xml");
init_dlg.open();
setlistener("/sim/signals/fdm-initialized", func {
init_dlg.close();
welcome_dlg.open();
});
################
# Panel States #
################
# Cold and Dark
var colddark = func {
ps_load_dlg.open();
setprop("/systems/acconfig/autoconfig-running", 1);
# Initial shutdown, and reinitialization.
setprop("/controls/engines/engine-start-switch", 1);
setprop("/controls/engines/engine[0]/cutoff-switch", 1);
setprop("/controls/engines/engine[1]/cutoff-switch", 1);
setprop("/controls/electric/engine[0]/generator", 0);
setprop("/controls/electric/engine[1]/generator", 0);
setprop("/controls/flight/slats", 0.000);
setprop("/controls/flight/flaps", 0.000);
setprop("/controls/flight/flap-lever", 0);
setprop("/controls/flight/speedbrake-arm", 0);
setprop("/controls/gear/gear-down", 1);
# systems.elec_init();
itaf.ap_init();
setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1);
if (getprop("/engines/engine[1]/n2") < 2) {
colddark_b();
} else {
var colddark_eng_off = setlistener("/engines/engine[1]/n2", func {
if (getprop("/engines/engine[1]/n2") < 2) {
removelistener(colddark_eng_off);
colddark_b();
}
});
}
}
var colddark_b = func {
# Continues the Cold and Dark script, after engines fully shutdown.
setprop("/controls/APU/master", 0);
setprop("/controls/APU/start", 0);
setprop("/controls/APU/bleed", 0);
setprop("/controls/electric/APU-generator", 0);
setprop("/controls/electric/battery-switch", 0);
setprop("/systems/acconfig/autoconfig-running", 0);
ps_load_dlg.close();
ps_loaded_dlg.open();
}
# Ready to Start Eng
var beforestart = func {
ps_load_dlg.open();
setprop("/systems/acconfig/autoconfig-running", 1);
# First, we set everything to cold and dark.
setprop("/controls/engines/engine-start-switch", 1);
setprop("/controls/engines/engine[0]/cutoff-switch", 1);
setprop("/controls/engines/engine[1]/cutoff-switch", 1);
setprop("/controls/electric/engine[0]/generator", 0);
setprop("/controls/electric/engine[1]/generator", 0);
setprop("/controls/flight/slats", 0.000);
setprop("/controls/flight/flaps", 0.000);
setprop("/controls/flight/flap-lever", 0);
setprop("/controls/flight/speedbrake-arm", 0);
setprop("/controls/gear/gear-down", 1);
# systems.elec_init();
itaf.ap_init();
setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1);
setprop("/controls/APU/master", 0);
setprop("/controls/APU/start", 0);
setprop("/controls/APU/bleed", 0);
setprop("/controls/electric/APU-generator", 0);
setprop("/controls/electric/battery-switch", 0);
# Now the Startup!
setprop("/controls/electric/battery-switch", 1);
setprop("/controls/APU/master", 1);
setprop("/controls/APU/start", 1);
var apu_rpm_chk = setlistener("/systems/apu/rpm", func {
if (getprop("/systems/apu/rpm") >= 99) {
removelistener(apu_rpm_chk);
beforestart_b();
}
});
}
var beforestart_b = func {
# Continue with engine start prep.
setprop("/controls/electric/APU-generator", 1);
setprop("/controls/APU/bleed", 1);
setprop("/controls/electric/engine[0]/generator", 1);
setprop("/controls/electric/engine[1]/generator", 1);
setprop("/systems/acconfig/autoconfig-running", 0);
ps_load_dlg.close();
ps_loaded_dlg.open();
}
# Ready to Taxi
var taxi = func {
ps_load_dlg.open();
setprop("/systems/acconfig/autoconfig-running", 1);
# First, we set everything to cold and dark.
setprop("/controls/engines/engine-start-switch", 1);
setprop("/controls/engines/engine[0]/cutoff-switch", 1);
setprop("/controls/engines/engine[1]/cutoff-switch", 1);
setprop("/controls/electric/engine[0]/generator", 0);
setprop("/controls/electric/engine[1]/generator", 0);
setprop("/controls/flight/slats", 0.000);
setprop("/controls/flight/flaps", 0.000);
setprop("/controls/flight/flap-lever", 0);
setprop("/controls/flight/speedbrake-arm", 0);
setprop("/controls/gear/gear-down", 1);
# systems.elec_init();
itaf.ap_init();
setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1);
setprop("/controls/APU/master", 0);
setprop("/controls/APU/start", 0);
setprop("/controls/APU/bleed", 0);
setprop("/controls/electric/APU-generator", 0);
setprop("/controls/electric/battery-switch", 0);
# Now the Startup!
setprop("/controls/electric/battery-switch", 1);
setprop("/controls/APU/master", 1);
setprop("/controls/APU/start", 1);
var apu_rpm_chk = setlistener("/systems/apu/rpm", func {
if (getprop("/systems/apu/rpm") >= 99) {
removelistener(apu_rpm_chk);
taxi_b();
}
});
}
var taxi_b = func {
# Continue with engine start prep, and start engine 2.
setprop("/controls/electric/APU-generator", 1);
setprop("/controls/APU/bleed", 1);
setprop("/controls/electric/engine[0]/generator", 1);
setprop("/controls/electric/engine[1]/generator", 1);
setprop("/controls/engines/engine-start-switch", 2);
setprop("/controls/engines/engine[1]/cutoff-switch", 0);
var eng_two_chk = setlistener("/engines/engine[1]/state", func {
if (getprop("/engines/engine[1]/state") == 3) {
removelistener(eng_two_chk);
taxi_c();
}
});
}
var taxi_c = func {
# Start engine 1.
setprop("/controls/engines/engine[0]/cutoff-switch", 0);
var eng_one_chk = setlistener("/engines/engine[0]/state", func {
if (getprop("/engines/engine[0]/state") == 3) {
removelistener(eng_one_chk);
taxi_d();
}
});
}
var taxi_d = func {
# After Start items.
setprop("/controls/engines/engine-start-switch", 1);
setprop("/controls/APU/bleed", 0);
setprop("/controls/APU/master", 0);
setprop("/controls/APU/start", 0);
setprop("/systems/acconfig/autoconfig-running", 0);
ps_load_dlg.close();
ps_loaded_dlg.open();
}
# Ready to Takeoff
var takeoff = func {
# The same as taxi, except we set some things afterwards.
taxi();
var eng_one_chk_c = setlistener("/engines/engine[0]/state", func {
if (getprop("/engines/engine[0]/state") == 3) {
removelistener(eng_one_chk_c);
setprop("/controls/flight/speedbrake-arm", 1);
setprop("/controls/flight/flaps", 0.290);
setprop("/controls/flight/slats", 0.666);
setprop("/controls/flight/flap-lever", 1);
setprop("/controls/flight/flap-txt", "1+F");
setprop("/controls/flight/elevator-trim", -0.1);
}
});
}

258
AircraftConfig/main.xml Normal file
View file

@ -0,0 +1,258 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- A3XX Aircraft Config Dialog -->
<PropertyList>
<name>aircraft-config</name>
<layout>vbox</layout>
<group>
<layout>hbox</layout>
<text>
<halign>left</halign>
<label>Aircraft Configuration</label>
</text>
<button>
<halign>right</halign>
<pref-width>20</pref-width>
<pref-height>20</pref-height>
<legend>X</legend>
<key>Esc</key>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<hrule/>
<group>
<layout>hbox</layout>
<group>
<layout>vbox</layout>
<group>
<layout>vbox</layout>
<button>
<halign>center</halign>
<legend>Welcome</legend>
<pref-width>140</pref-width>
<binding>
<command>nasal</command>
<script>
acconfig.welcome_dlg.open();
</script>
</binding>
</button>
<button>
<halign>center</halign>
<legend>Select Livery</legend>
<pref-width>140</pref-width>
<binding>
<command>nasal</command>
<script>
aircraft.livery.dialog.toggle();
</script>
</binding>
</button>
<button>
<halign>center</halign>
<legend>Aircraft Tutorial</legend>
<pref-width>140</pref-width>
<enable>
<property>/systems/unused/unusedthing</property>
</enable>
<binding>
<command>nasal</command>
<script>
# Blank for now
</script>
</binding>
</button>
</group>
<group>
<layout>vbox</layout>
<group>
<layout>hbox</layout>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
<text>
<label>Auto Aircraft Config</label>
</text>
<hrule>
<stretch type="bool">true</stretch>
</hrule>
</group>
<group>
<layout>vbox</layout>
<button>
<halign>center</halign>
<legend>Cold and Dark</legend>
<pref-width>140</pref-width>
<enable>
<not><property>/systems/acconfig/autoconfig-running</property></not>
</enable>
<binding>
<command>nasal</command>
<script>acconfig.colddark();</script>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<button>
<halign>center</halign>
<legend>Ready to Start Eng</legend>
<pref-width>140</pref-width>
<enable>
<not><property>/systems/acconfig/autoconfig-running</property></not>
</enable>
<binding>
<command>nasal</command>
<script>acconfig.beforestart();</script>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<button>
<halign>center</halign>
<legend>Ready for Taxi</legend>
<pref-width>140</pref-width>
<enable>
<not><property>/systems/acconfig/autoconfig-running</property></not>
</enable>
<binding>
<command>nasal</command>
<script>acconfig.taxi();</script>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<button>
<halign>center</halign>
<legend>Ready for Takeoff</legend>
<pref-width>140</pref-width>
<enable>
<not><property>/systems/acconfig/autoconfig-running</property></not>
</enable>
<binding>
<command>nasal</command>
<script>acconfig.takeoff();</script>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
</group>
</group>
<vrule/>
<group>
<layout>vbox</layout>
<checkbox>
<label>Enable De-icing Truck</label>
<halign>left</halign>
<enable>
<property>/systems/unused/unusedthing</property>
</enable>
<property>services/deicing_truck/enable</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<button>
<legend>De-ice Aircraft</legend>
<halign>center</halign>
<padding>5</padding>
<enable>
<property>/systems/unused/unusedthing</property>
</enable>
<binding>
<command>nasal</command>
<script>
if (getprop("services/deicing_truck/enable") == 1) {
setprop("/services/deicing_truck/de-ice", 1);
screen.log.write("Starting De-icing Process...", 1, 1, 1);
} else
screen.log.write("Please Enable the De-icing truck first", 1, 0, 0);
</script>
</binding>
</button>
<checkbox>
<label>Enable Baggage Ramp</label>
<halign>left</halign>
<enable>
<property>/systems/unused/unusedthing</property>
</enable>
<property>services/baggage/enable</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Enable External Power Box</label>
<halign>left</halign>
<enable>
<property>/systems/unused/unusedthing</property>
</enable>
<property>/controls/switches/cart</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<hrule/>
<checkbox>
<label>EIS2 Displays</label>
<halign>left</halign>
<enable>
<property>/systems/unused/unusedthing</property>
</enable>
<property>/options/EIS2</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Skip IRS alignment</label>
<halign>left</halign>
<enable>
<property>/systems/unused/unusedthing</property>
</enable>
<property>/systems/unused/unusedthing</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
</group>
</group>
</PropertyList>

35
AircraftConfig/psload.xml Normal file
View file

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- A3XX Aircraft Config Dialog -->
<PropertyList>
<name>aircraft-config-panelstateload</name>
<layout>vbox</layout>
<group>
<layout>hbox</layout>
<text>
<halign>left</halign>
<label>Please wait...</label>
</text>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<text>
<halign>center</halign>
<label>Loading Panel State...</label>
</text>
<text>
<halign>center</halign>
<label>Please don't touch anything during this process!</label>
</text>
</group>
</PropertyList>

View file

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- A3XX Aircraft Config Dialog -->
<PropertyList>
<name>aircraft-config-panelstateloaded</name>
<layout>vbox</layout>
<group>
<layout>hbox</layout>
<text>
<halign>left</halign>
<label>Message</label>
</text>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<text>
<halign>center</halign>
<label>Panel State Load Complete!</label>
</text>
<button>
<halign>center</halign>
<legend>Close</legend>
<pref-width>140</pref-width>
<key>Esc</key>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
</PropertyList>

View file

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- A3XX Aircraft Config Dialog -->
<PropertyList>
<name>aircraft-config-welcome</name>
<layout>vbox</layout>
<group>
<layout>hbox</layout>
<text>
<halign>left</halign>
<label>Welcome!</label>
</text>
<button>
<halign>right</halign>
<pref-width>20</pref-width>
<pref-height>20</pref-height>
<legend>X</legend>
<key>Esc</key>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<text>
<halign>center</halign>
<label>Welcome to the it0uchpods A3XX Series!</label>
</text>
<text>
<halign>center</halign>
<label>This is a complex simulation of these amazing Airbus Aircraft.</label>
</text>
<text>
<halign>center</halign>
<label>They are currently still under development, and therefore are not complete yet.</label>
</text>
<text>
<halign>center</halign>
<label>Use the Aircraft Config to select livery, manage panel states, and more!</label>
</text>
<text>
<halign>center</halign>
<label>Please report bugs on the FlightGear forums! Enjoy!</label>
</text>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<button>
<halign>center</halign>
<legend>Open A/C Config</legend>
<pref-width>140</pref-width>
<binding>
<command>nasal</command>
<script>
acconfig.main_dlg.open();
</script>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<button>
<halign>center</halign>
<legend>Close</legend>
<pref-width>140</pref-width>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
</PropertyList>

View file

@ -6,7 +6,7 @@
Inputs:
name: V2522_A5
type: turbine
thrust: 21998.928 lb
thrust: 23000 lb
augmented? no
injected? no
-->
@ -17,7 +17,9 @@
<tsfc> 0.8 </tsfc>
<bleed> 0.03 </bleed>
<idlen1> 23.4 </idlen1>
<idlen2> 62.7 </idlen2>
<idlen2> 63.7 </idlen2>
<n1spinup> 5.1 </n1spinup>
<n2spinup> 22.8 </n2spinup>
<maxn1> 105.8 </maxn1>
<maxn2> 102.1 </maxn2>
<augmented> 0 </augmented>

View file

@ -6,7 +6,7 @@
Inputs:
name: V2522_A5
type: turbine
thrust: 21998.928 lb
thrust: 26600 lb
augmented? no
injected? no
-->
@ -17,7 +17,9 @@
<tsfc> 0.8 </tsfc>
<bleed> 0.03 </bleed>
<idlen1> 23.4 </idlen1>
<idlen2> 62.7 </idlen2>
<idlen2> 63.7 </idlen2>
<n1spinup> 5.1 </n1spinup>
<n2spinup> 22.8 </n2spinup>
<maxn1> 105.8 </maxn1>
<maxn2> 102.1 </maxn2>
<augmented> 0 </augmented>

View file

@ -6,7 +6,7 @@
Inputs:
name: V2522_A5
type: turbine
thrust: 21998.928 lb
thrust: 32000 lb
augmented? no
injected? no
-->
@ -17,7 +17,9 @@
<tsfc> 0.8 </tsfc>
<bleed> 0.03 </bleed>
<idlen1> 23.4 </idlen1>
<idlen2> 62.7 </idlen2>
<idlen2> 63.7 </idlen2>
<n1spinup> 5.1 </n1spinup>
<n2spinup> 22.8 </n2spinup>
<maxn1> 105.8 </maxn1>
<maxn2> 102.1 </maxn2>
<augmented> 0 </augmented>

View file

@ -2119,64 +2119,6 @@
<!-- Engine Cut-off Switches -->
<animation>
<type>rotate</type>
<object-name>Lcutoff</object-name>
<property>controls/engines/engine[0]/cutoff</property>
<factor>40</factor>
<center>
<x-m>-0.1064</x-m>
<y-m>0</y-m>
<z-m>-0.3795</z-m>
</center>
<axis>
<x>0</x>
<y>1</y>
<z>0</z>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>Rcutoff</object-name>
<property>controls/engines/engine[1]/cutoff</property>
<factor>40</factor>
<center>
<x-m>-0.1064</x-m>
<y-m>0</y-m>
<z-m>-0.3795</z-m>
</center>
<axis>
<x>0</x>
<y>1</y>
<z>0</z>
</axis>
</animation>
<animation>
<type>pick</type>
<object-name>Lcutoff</object-name>
<action>
<button>0</button>
<binding>
<command>property-toggle</command>
<property>controls/engines/engine[0]/cutoff-switch</property>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>Rcutoff</object-name>
<action>
<button>0</button>
<binding>
<command>property-toggle</command>
<property>controls/engines/engine[1]/cutoff-switch</property>
</binding>
</action>
</animation>
<!-- Side Stick Animations -->
@ -4019,7 +3961,7 @@
<object-name>Lcutoff</object-name>
<action>
<button>0</button>
<repeatable type="bool">false</repeatable>
<repeatable>false</repeatable>
<binding>
<command>property-toggle</command>
<property>controls/engines/engine[0]/cutoff-switch</property>
@ -4031,7 +3973,10 @@
<type>rotate</type>
<object-name>Lcutoff</object-name>
<property>controls/engines/engine[0]/cutoff-switch</property>
<factor>20</factor>
<interpolation>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>1</ind><dep>60</dep></entry>
</interpolation>
<center>
<x-m>-0.1067</x-m>
<y-m>0</y-m>
@ -4049,7 +3994,7 @@
<object-name>Rcutoff</object-name>
<action>
<button>0</button>
<repeatable type="bool">false</repeatable>
<repeatable>false</repeatable>
<binding>
<command>property-toggle</command>
<property>controls/engines/engine[1]/cutoff-switch</property>
@ -4061,7 +4006,10 @@
<type>rotate</type>
<object-name>Rcutoff</object-name>
<property>controls/engines/engine[1]/cutoff-switch</property>
<factor>20</factor>
<interpolation>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>1</ind><dep>60</dep></entry>
</interpolation>
<center>
<x-m>-0.1067</x-m>
<y-m>0</y-m>

View file

@ -48,7 +48,7 @@
<type>rotation</type>
<offset>-30</offset>
<scale>1.6</scale>
<property>engines/apu/rpm</property>
<property>/systems/apu/rpm</property>
</transformation>
</transformations>
</layer>
@ -66,7 +66,7 @@
<chunks>
<chunk>
<type>number-value</type>
<property>engines/apu/rpm</property>
<property>/systems/apu/rpm</property>
<format type="string">%3.0f</format>
</chunk>
</chunks>
@ -108,7 +108,10 @@
</transformation>
</transformations>
<condition>
<property>engines/apu/running</property>
<greater-than>
<property>/systems/apu/rpm</property>
<value>98.0</value>
</greater-than>
</condition>
</layer>
@ -138,7 +141,7 @@
</transformation>
</transformations>
<condition>
<property>controls/APU/master-switch</property>
<property>controls/APU/master</property>
</condition>
</layer>
@ -156,7 +159,7 @@
<chunks>
<chunk>
<type>number-value</type>
<property>/systems/electrical/suppliers/apu-v</property><!-- There is no TAT temperature property-->
<property>/systems/electrical/suppliers/apu-v</property>
<format type="string">%3.0f</format>
</chunk>
</chunks>
@ -189,7 +192,7 @@
<chunks>
<chunk>
<type>number-value</type>
<property>environment/temperature-degc</property><!-- There is no TAT temperature property-->
<property>environment/temperature-degc</property>
<format type="string">%3.0f</format>
</chunk>
</chunks>

View file

@ -922,16 +922,15 @@
<repeatable type="bool">false</repeatable>
<binding>
<command>property-toggle</command>
<property>controls/pneumatic/APU-bleed</property>
<property>controls/APU/bleed</property>
</binding>
</action>
</animation>
<animation>
<name>APU bleed on</name>
<type>textranslate</type>
<object-name>APUBleedBtn2</object-name>
<property>controls/pneumatic/APU-bleed</property>
<property>controls/APU/bleed</property>
<factor>0.5</factor>
<axis>
<x>1</x>
@ -951,7 +950,6 @@
<command>property-toggle</command>
<property>controls/pneumatic/engine[1]/bleed</property>
</binding>
</action>
</animation>
<animation>
@ -1368,7 +1366,7 @@
<repeatable type="bool">false</repeatable>
<binding>
<command>property-toggle</command>
<property>controls/APU/master-switch</property>
<property>controls/APU/master</property>
</binding>
</action>
@ -1379,7 +1377,7 @@
<object-name>APUMasterBtn1</object-name>
<property>engines/apu/serviceable</property>
<interpolation>
<entry><ind>0</ind><dep>0.5</dep></entry>
<entry><ind>0</ind><dep>0</dep></entry> <!-- Set 0.5 to make the FAULT light appear -->
<entry><ind>1</ind><dep>0</dep></entry>
</interpolation>
<axis>
@ -1391,7 +1389,7 @@
<name>APU master switch on</name>
<type>textranslate</type>
<object-name>APUMasterBtn2</object-name>
<property>controls/APU/master-switch</property>
<property>controls/APU/master</property>
<factor>0.5</factor>
<axis>
<x>1</x>
@ -1409,7 +1407,7 @@
<repeatable type="bool">false</repeatable>
<binding>
<command>property-toggle</command>
<property>controls/APU/starter</property>
<property>controls/APU/start</property>
</binding>
</action>
@ -1418,7 +1416,7 @@
<name>APU starter on</name>
<type>textranslate</type>
<object-name>APUStartBtn2</object-name>
<property>controls/APU/starter</property>
<property>controls/APU/start</property>
<factor>0.5</factor>
<axis>
<x>1</x>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -137,7 +137,7 @@ var Alternator = {
var battery = Battery.new("/controls/electric/battery-switch",24,30,34,1.0,7.0);
var alternator1 = Alternator.new(0,"controls/electric/engine[0]/generator","/engines/engine[0]/amp-v","/engines/engine[0]/n2",50.0,28.0,60.0);
var alternator2 = Alternator.new(1,"controls/electric/engine[1]/generator","/engines/engine[1]/amp-v","/engines/engine[1]/n2",50.0,28.0,60.0);
var alternator3 = Alternator.new(2,"controls/electric/APU-generator","/engines/apu/amp-v","/engines/apu/rpm",80.0,24.0,60.0);
var alternator3 = Alternator.new(2,"controls/electric/APU-generator","/engines/apu/amp-v","/systems/apu/rpm",80.0,24.0,60.0);
#####################################
setlistener("/sim/signals/fdm-initialized", func {

View file

@ -1,236 +1,190 @@
## AIRBUS A320 ENGINE CONTROL SYSTEMS
#####################################
# A320Family JSB Engine System
# Joshua Davidson (it0uchpods)
# NOTE: Update functions are called in systems.nas
#####################
# Initializing Vars #
#####################
var apu =
{
new: func(no)
{
var m =
{
parents: [apu]
};
m.number = no;
var engines = props.globals.getNode("/engines").getChildren("engine");
var n1_min = 23.4;
var n2_min = 63.7;
var egt_min = 323;
var n1_spin = 5.1;
var n2_spin = 22.8;
var n1_start = 23.3;
var n2_start = 63.6;
var egt_start = 489;
var n1_max = 105.8;
var n2_max = 102.1;
var egt_max = 860;
var n1_wm = 0;
var n2_wm = 0;
var apu_max = 99.8;
var apu_egt_max = 462;
var spinup_time = 15;
var start_time = 10;
var egt_lightup_time = 3;
var egt_lightdn_time = 7;
var shutdown_time = 20;
var egt_shutdown_time = 20;
setprop("/systems/apu/rpm", 0);
setprop("/systems/apu/egt", 42);
m.fire_switch = props.globals.getNode("engines/apu[" ~ no ~ "]/fire-switch", 1);
m.fire_switch.setBoolValue(0);
m.master_switch = props.globals.getNode("controls/APU[" ~ no ~ "]/master-switch", 1);
m.master_switch.setBoolValue(0);
m.on_fire = props.globals.getNode("engines/apu[" ~ no ~ "]/on-fire", 1);
m.on_fire.setBoolValue(0);
m.rpm = props.globals.getNode("engines/apu[" ~ no ~ "]/rpm", 1);
m.rpm.setValue(0);
m.running = props.globals.getNode("engines/apu[" ~ no ~ "]/running", 1);
m.running.setBoolValue(0);
m.serviceable = props.globals.getNode("engines/apu[" ~ no ~ "]/serviceable", 1);
m.serviceable.setBoolValue(1);
m.starter = props.globals.getNode("controls/APU[" ~ no ~ "]/starter", 1);
m.starter.setBoolValue(0);
##############################
# Trigger Startups and Stops #
##############################
return m;
},
update: func
{
if (me.on_fire.getBoolValue())
{
me.serviceable.setBoolValue(0);
setlistener("/controls/engines/engine[0]/cutoff-switch", func {
if (getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
start_one_check();
} else if (getprop("/controls/engines/engine[0]/cutoff-switch") == 1) {
setprop("/controls/engines/engine[0]/starter", 0);
setprop("/controls/engines/engine[0]/cutoff", 1);
setprop("/engines/engine[0]/state", 0);
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
}
});
var start_one_check = func {
if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/controls/APU/bleed") == 1) and (getprop("/systems/apu/rpm") >= 98)) {
auto_start_one();
}
if (me.fire_switch.getBoolValue())
{
me.on_fire.setBoolValue(0);
}
if (me.serviceable.getBoolValue() and (me.master_switch.getBoolValue() or me.starter.getBoolValue()))
{
if (me.starter.getBoolValue())
{
var rpm = me.rpm.getValue();
rpm += getprop("sim/time/delta-realtime-sec") * 25;
if (rpm >= 100)
{
rpm = 100;
setlistener("/controls/engines/engine[1]/cutoff-switch", func {
if (getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
start_two_check();
} else if (getprop("/controls/engines/engine[1]/cutoff-switch") == 1) {
setprop("/controls/engines/engine[1]/starter", 0);
setprop("/controls/engines/engine[1]/cutoff", 1);
setprop("/engines/engine[0]/state", 0);
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
}
me.rpm.setValue(rpm);
}
if (me.master_switch.getBoolValue() and me.rpm.getValue() == 100)
{
me.running.setBoolValue(1);
}
}
else
{
me.running.setBoolValue(0);
});
var rpm = me.rpm.getValue();
rpm -= getprop("sim/time/delta-realtime-sec") * 30;
if (rpm <= 0)
{
rpm = 0;
var start_two_check = func {
if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/controls/APU/bleed") == 1) and (getprop("/systems/apu/rpm") >= 98)) {
auto_start_two();
}
me.rpm.setValue(rpm);
}
}
};
var engine =
{
new: func(no)
{
var m =
{
parents: [engine]
};
m.number = no;
m.contrail = props.globals.getNode("engines/engine[" ~ no ~ "]/contrail", 1);
m.contrail.setBoolValue(0);
m.cutoff = props.globals.getNode("controls/engines/engine[" ~ no ~ "]/cutoff", 1);
m.cutoff.setBoolValue(1);
m.cutoff_switch = props.globals.getNode("controls/engines/engine[" ~ no ~ "]/cutoff-switch", 1);
m.cutoff_switch.setBoolValue(1);
m.fire_bottle_discharge = props.globals.getNode("controls/engines/engine[" ~ no ~ "]/fire-bottle-discharge", 1);
m.fire_bottle_discharge.setBoolValue(0);
m.n2 = props.globals.getNode("engines/engine[" ~ no ~ "]/n2", 1);
m.n2.setValue(0);
m.on_fire = props.globals.getNode("engines/engine[" ~ no ~ "]/on-fire", 1);
m.on_fire.setBoolValue(0);
m.out_of_fuel = props.globals.getNode("engines/engine[" ~ no ~ "]/out-of-fuel", 1);
m.out_of_fuel.setBoolValue(0);
m.reverser = props.globals.getNode("controls/engines/engine[" ~ no ~ "]/reverser", 1);
m.reverser.setBoolValue(0);
m.reverser_angle_rad = props.globals.getNode("fdm/jsbsim/propulsion/engine[" ~ no ~ "]/reverser-angle-rad", 1);
m.reverser_angle_rad.setValue(0);
m.reverser_pos_norm = props.globals.getNode("engines/engine[" ~ no ~ "]/reverser-pos-norm", 1);
m.reverser_pos_norm.setValue(0);
m.starter = props.globals.getNode("controls/engines/engine[" ~ no ~ "]/starter", 1);
m.starter.setBoolValue(0);
m.starter_switch = props.globals.getNode("controls/engines/engine[" ~ no ~ "]/starter-switch", 1);
m.starter_switch.setBoolValue(0);
m.serviceable = props.globals.getNode("sim/failure-manager/engines/engine[" ~ no ~ "]/serviceable", 1);
m.serviceable.setBoolValue(1);
m.throttle = props.globals.getNode("controls/engines/engine[" ~ no ~ "]/throttle", 1);
m.throttle.setValue(0);
return m;
},
update: func
{
if (me.on_fire.getBoolValue())
{
me.serviceable.setBoolValue(0);
}
if (me.fire_bottle_discharge.getBoolValue())
{
me.on_fire.setBoolValue(0);
}
if (me.serviceable.getBoolValue())
{
me.cutoff.setBoolValue(me.cutoff_switch.getBoolValue());
}
me.starter.setBoolValue(me.starter_switch.getBoolValue());
if (getprop("controls/engines/engine-start-switch") == 0 or getprop("controls/engines/engine-start-switch") == 2)
{
me.starter.setBoolValue(1);
}
if (!props.globals.getNode("engines/apu/running").getBoolValue())
{
me.starter.setBoolValue(0);
####################
# Start Engine One #
####################
var auto_start_one = func {
setprop("/engines/engine[0]/state", 1);
setprop("/controls/engines/engine[0]/starter", 1);
eng_one_auto_startt.start();
}
if (me.n2.getValue() > 50 and props.globals.getNode("environment/contrail").getBoolValue())
{
me.contrail.setBoolValue(1);
}
else
{
me.contrail.setBoolValue(0);
}
},
reverse_thrust: func
{
if (me.throttle.getValue() == 0 and props.globals.getNode("gear/gear[1]/wow").getBoolValue())
{
if (me.reverser_pos_norm.getValue() == 0)
{
interpolate(me.reverser_pos_norm.getPath(),
1, 1.4
);
me.reverser_angle_rad.setValue(math.pi);
me.reverser.setBoolValue(1);
}
elsif (me.reverser_pos_norm.getValue() == 1)
{
interpolate(me.reverser_pos_norm.getPath(),
0, 1.4
);
me.reverser_angle_rad.setValue(0);
me.reverser.setBoolValue(0);
var eng_one_auto_start = func {
if (getprop("/engines/engine[0]/n2") >= 24.1) {
setprop("/engines/engine[0]/state", 2);
setprop("/controls/engines/engine[0]/cutoff", 0);
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_one_n2_checkt.start();
eng_one_auto_startt.stop();
}
}
}
};
var apu1 = apu.new(0);
var engine1 = engine.new(0);
var engine2 = engine.new(1);
# startup/shutdown functions
var startup = func
{
setprop("controls/electric/battery-switch", 1);
setprop("controls/electric/engine[0]/generator", 1);
setprop("controls/electric/engine[1]/generator", 1);
setprop("controls/engines/engine[0]/cutoff-switch", 1);
setprop("controls/engines/engine[1]/cutoff-switch", 1);
setprop("controls/APU/master-switch", 1);
setprop("controls/APU/starter", 1);
var eng_one_n2_check = func {
if (getprop("/engines/engine[0]/egt-actual") >= egt_start) {
interpolate(engines[0].getNode("egt-actual"), egt_min, egt_lightdn_time);
}
if (getprop("/engines/engine[0]/n2") >= n2_start) {
setprop("/engines/engine[0]/state", 3);
eng_one_n2_checkt.stop();
}
}
var listener1 = setlistener("engines/apu/running", func
{
if (props.globals.getNode("engines/apu/running").getBoolValue())
{
setprop("controls/engines/engine-start-switch", 2);
settimer(func
{
setprop("controls/engines/engine[0]/cutoff-switch", 0);
setprop("controls/engines/engine[1]/cutoff-switch", 0);
}, 2);
removelistener(listener1);
}
}, 0, 0);
var listener2 = setlistener("engines/engine[0]/running", func
{
if (props.globals.getNode("engines/engine[0]/running").getBoolValue())
{
settimer(func
{
setprop("controls/APU/master-switch", 0);
setprop("controls/APU/starter", 0);
setprop("controls/engines/engine-start-switch", 1);
setprop("controls/electric/battery-switch", 0);
}, 2);
removelistener(listener2);
}
}, 0, 0);
};
var shutdown = func
{
setprop("controls/electric/engine[0]/generator", 0);
setprop("controls/electric/engine[1]/generator", 0);
setprop("controls/engines/engine[0]/cutoff-switch", 1);
setprop("controls/engines/engine[1]/cutoff-switch", 1);
};
####################
# Start Engine Two #
####################
# listener to activate these functions accordingly
setlistener("sim/model/start-idling", func(idle)
{
var run = idle.getBoolValue();
if (run)
{
startup();
var auto_start_two = func {
setprop("/engines/engine[1]/state", 1);
setprop("/controls/engines/engine[1]/starter", 1);
eng_two_auto_startt.start();
}
else
{
shutdown();
var eng_two_auto_start = func {
if (getprop("/engines/engine[1]/n2") >= 24.1) {
setprop("/engines/engine[1]/state", 2);
setprop("/controls/engines/engine[1]/cutoff", 0);
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_two_n2_checkt.start();
eng_two_auto_startt.stop();
}
}, 0, 0);
}
var eng_two_n2_check = func {
if (getprop("/engines/engine[1]/egt-actual") >= egt_start) {
interpolate(engines[1].getNode("egt-actual"), egt_min, egt_lightdn_time);
}
if (getprop("/engines/engine[1]/n2") >= n2_start) {
setprop("/engines/engine[1]/state", 3);
eng_two_n2_checkt.stop();
}
}
#############
# Start APU #
#############
setlistener("/controls/APU/start", func {
if ((getprop("/controls/APU/master") == 1) and (getprop("/controls/APU/start") == 1)) {
interpolate("/systems/apu/rpm", apu_max, spinup_time);
interpolate("/systems/apu/egt", apu_egt_max, spinup_time);
} else if (getprop("/controls/APU/master") == 0) {
apu_stop();
}
});
############
# Stop APU #
############
setlistener("/controls/APU/master", func {
if (getprop("/controls/APU/master") == 0) {
setprop("/controls/APU/start", 0);
apu_stop();
}
});
var apu_stop = func {
interpolate("/systems/apu/rpm", 0, spinup_time);
interpolate("/systems/apu/egt", 42, spinup_time);
}
#######################
# Various other stuff #
#######################
setlistener("/controls/engines/engine-start-switch", func {
if ((getprop("/controls/engines/engine-start-switch") == 0) or (getprop("/controls/engines/engine-start-switch") == 1)) {
if (getprop("/controls/engines/engine[0]/state") == 1) {
eng_one_stop();
}
if (getprop("/controls/engines/engine[1]/state") == 1) {
eng_two_stop();
}
}
});
setlistener("/controls/APU/bleed", func {
if (getprop("/controls/APU/bleed") == 0) {
if (getprop("/controls/engines/engine[0]/state") == 1) {
eng_one_stop();
}
if (getprop("/controls/engines/engine[1]/state") == 1) {
eng_two_stop();
}
}
});
# Timers
var eng_one_auto_startt = maketimer(0.5, eng_one_auto_start);
var eng_one_n2_checkt = maketimer(0.5, eng_one_n2_check);
var eng_two_auto_startt = maketimer(0.5, eng_two_auto_start);
var eng_two_n2_checkt = maketimer(0.5, eng_two_n2_check);

View file

@ -25,9 +25,6 @@ var systems =
},
update: func
{
apu1.update();
engine1.update();
engine2.update();
update_electrical();
# stop calling our systems code if the stop() function was called or the aircraft crashes

View file

@ -41,18 +41,26 @@
</filter>
<filter>
<name>EGT 1</name>
<name>EGT L</name>
<type>gain</type>
<gain>1</gain>
<enable>
<condition>
<equals>
<property>/engines/engine[0]/state</property>
<value>3</value>
</equals>
</condition>
</enable>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<expression>
<table>
<property>/engines/engine[0]/n1</property>
<entry><ind> 0</ind><dep>037</dep></entry>
<entry><ind> 8</ind><dep>037</dep></entry>
<entry><ind> 23</ind><dep>415</dep></entry>
<entry><ind>110</ind><dep>642</dep></entry>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>6</ind><dep>0</dep></entry>
<entry><ind>23.4</ind><dep>323</dep></entry>
<entry><ind>110</ind><dep>700</dep></entry>
</table>
</expression>
</input>
@ -60,18 +68,26 @@
</filter>
<filter>
<name>EGT 2</name>
<name>EGT R</name>
<type>gain</type>
<gain>1</gain>
<enable>
<condition>
<equals>
<property>/engines/engine[1]/state</property>
<value>3</value>
</equals>
</condition>
</enable>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<expression>
<table>
<property>/engines/engine[1]/n1</property>
<entry><ind> 0</ind><dep>037</dep></entry>
<entry><ind> 8</ind><dep>037</dep></entry>
<entry><ind> 23</ind><dep>415</dep></entry>
<entry><ind>110</ind><dep>642</dep></entry>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>6</ind><dep>0</dep></entry>
<entry><ind>23.4</ind><dep>323</dep></entry>
<entry><ind>110</ind><dep>700</dep></entry>
</table>
</expression>
</input>