1
0
Fork 0

Merge branch '3D' into 3D-flightdeck

This commit is contained in:
Jonathan Redpath 2022-03-14 15:13:57 +00:00
commit 21e87240ed
43 changed files with 933 additions and 1777 deletions

View file

@ -230,4 +230,11 @@
<model-number type="string">A320-214</model-number>
</options>
<systems n="0">
<ignition n="0">
<starter-cutoff-n2 type="double">50</starter-cutoff-n2>
<starter-engage-n2 type="double">16</starter-engage-n2>
</ignition>
</systems>
</PropertyList>

View file

@ -281,6 +281,7 @@
<system file="a320-hydraulic"/>
<system file="a320-pneumatic"/>
<system file="a320-aircond"/> <!-- after pneu -->
<system file="a320-ignition"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<system file="a320-adr"/>

View file

@ -229,5 +229,12 @@
<maxflap type="int">40</maxflap>
<model-number type="string">A320-232</model-number>
</options>
<systems n="0">
<ignition n="0">
<starter-cutoff-n2 type="double">43</starter-cutoff-n2>
<starter-engage-n2 type="double">19</starter-engage-n2>
</ignition>
</systems>
</PropertyList>

View file

@ -281,6 +281,7 @@
<system file="a320-hydraulic"/>
<system file="a320-pneumatic"/>
<system file="a320-aircond"/> <!-- after pneu -->
<system file="a320-ignition"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<system file="a320-adr"/>

View file

@ -644,13 +644,13 @@
<name>Outer Right Wing</name>
</tank>
<tank n="5">
<name>Engine 1 Pipes</name>
<name>Engine 1 Pipe</name>
</tank>
<tank n="6">
<name>Engine 2 Pipes</name>
<name>Engine 2 Pipe</name>
</tank>
<tank n="7">
<name>APU Pipes</name>
<name>APU Pipe</name>
</tank>
</fuel>
</consumables>
@ -926,21 +926,18 @@
</switches>
</electrical>
<engines n="0">
<engine-start-switch type="int">1</engine-start-switch>
<engine n="0">
<cutoff type="bool">true</cutoff>
<cutoff-switch type="bool">true</cutoff-switch>
<fire-btn type="bool">0</fire-btn>
<fire-btn-cover type="bool">0</fire-btn-cover>
<fire-light type="bool">0</fire-light>
<man-start type="bool">0</man-start>
<starter type="bool">0</starter>
<starter-switch type="bool">0</starter-switch>
<start-switch type="bool">0</start-switch>
<reverse-cmd type="bool">0</reverse-cmd>
<reverse-lever type="double">0</reverse-lever>
<igniter-a type="bool">0</igniter-a>
<igniter-b type="bool">0</igniter-b>
<last-igniter type="string">B</last-igniter>
</engine>
<engine n="1">
<cutoff type="bool">true</cutoff>
@ -948,14 +945,12 @@
<fire-btn type="bool">0</fire-btn>
<fire-btn-cover type="bool">0</fire-btn-cover>
<fire-light type="bool">0</fire-light>
<man-start type="bool">0</man-start>
<starter type="bool">0</starter>
<starter-switch type="bool">0</starter-switch>
<start-switch type="bool">0</start-switch>
<reverse-cmd type="bool">0</reverse-cmd>
<reverse-lever type="double">0</reverse-lever>
<igniter-a type="bool">0</igniter-a>
<igniter-b type="bool">0</igniter-b>
<last-igniter type="string">B</last-igniter>
</engine>
<engine n="2">
<cutoff type="bool">true</cutoff>
@ -1095,6 +1090,9 @@
<leftturnoff type="bool">0</leftturnoff>
<rightturnoff type="bool">0</rightturnoff>
</lighting>
<ignition n="0">
<start-sw type="int">1</start-sw>
</ignition>
<navigation>
<adirscp>
<switches>
@ -1279,22 +1277,22 @@
</gear>
<network>
<cpdlc>
<link>
<status type="int">0</status>
<data-authority type="string"></data-authority>
</link>
<rx>
<message type="string"/>
<new-message type="bool">0</new-message>
</rx>
</cpdlc>
<mpirc>
<irc-ready type="bool">0</irc-ready>
<msg-count-in type="int">0</msg-count-in>
<msg-count-out type="int">0</msg-count-out>
</mpirc>
</network>
<cpdlc>
<link>
<status type="int">0</status>
<data-authority type="string"></data-authority>
</link>
<rx>
<message type="string"/>
<new-message type="bool">0</new-message>
</rx>
</cpdlc>
<mpirc>
<irc-ready type="bool">0</irc-ready>
<msg-count-in type="int">0</msg-count-in>
<msg-count-out type="int">0</msg-count-out>
</mpirc>
</network>
<services n="0">
<chocks n="0">
@ -1321,6 +1319,8 @@
<mct-t type="double">0.83</mct-t>
<toga-b type="double">0.95</toga-b>
</fadec>
<igniter-select-1 type="int">0</igniter-select-1>
<igniter-select-2 type="int">0</igniter-select-2>
<seperate-tiller-axis type="bool">0</seperate-tiller-axis>
</options>
</acconfig>
@ -1560,15 +1560,6 @@
</fire>
<fuel n="0">
<only-use-ctr-tank type="bool">0</only-use-ctr-tank>
<tank n="0">
<feed type="bool">0</feed>
</tank>
<tank n="1">
<feed type="bool">0</feed>
</tank>
<tank n="2">
<feed type="bool">0</feed>
</tank>
<ctr-pump-cmd-on-eng-start type="bool">0</ctr-pump-cmd-on-eng-start>
<refuel>
<left-valve type="bool">0</left-valve>
@ -2377,7 +2368,7 @@
</binding>
<binding>
<condition>
<property>/options/system/fgcamera-keys-enabled</property>
<property>/options/system/fgcamera-keys-enabled</property>
</condition>
<command>fgcamera-select</command>
<camera-id>1</camera-id>
@ -2423,7 +2414,7 @@
</binding>
<binding>
<condition>
<property>/options/system/fgcamera-keys-enabled</property>
<property>/options/system/fgcamera-keys-enabled</property>
</condition>
<command>fgcamera-select</command>
<camera-id>2</camera-id>
@ -2470,7 +2461,7 @@
</binding>
<binding>
<condition>
<property>/options/system/fgcamera-keys-enabled</property>
<property>/options/system/fgcamera-keys-enabled</property>
</condition>
<command>fgcamera-select</command>
<camera-id>3</camera-id>
@ -2517,7 +2508,7 @@
</binding>
<binding>
<condition>
<property>/options/system/fgcamera-keys-enabled</property>
<property>/options/system/fgcamera-keys-enabled</property>
</condition>
<command>fgcamera-select</command>
<camera-id>4</camera-id>
@ -2564,7 +2555,7 @@
</binding>
<binding>
<condition>
<property>/options/system/fgcamera-keys-enabled</property>
<property>/options/system/fgcamera-keys-enabled</property>
</condition>
<command>fgcamera-select</command>
<camera-id>5</camera-id>
@ -2613,7 +2604,7 @@
</binding>
<binding>
<condition>
<property>/options/system/fgcamera-keys-enabled</property>
<property>/options/system/fgcamera-keys-enabled</property>
</condition>
<command>fgcamera-select</command>
<camera-id>6</camera-id>
@ -2670,7 +2661,7 @@
</binding-->
<binding>
<condition>
<property>/options/system/fgcamera-keys-enabled</property>
<property>/options/system/fgcamera-keys-enabled</property>
</condition>
<command>fgcamera-select</command>
<camera-id>7</camera-id>
@ -2706,7 +2697,7 @@
</binding>
<binding>
<condition>
<property>/options/system/fgcamera-keys-enabled</property>
<property>/options/system/fgcamera-keys-enabled</property>
</condition>
<command>fgcamera-select</command>
<camera-id>8</camera-id>
@ -2753,7 +2744,7 @@
</binding>
<binding>
<condition>
<property>/options/system/fgcamera-keys-enabled</property>
<property>/options/system/fgcamera-keys-enabled</property>
</condition>
<command>fgcamera-select</command>
<camera-id>9</camera-id>
@ -3108,16 +3099,16 @@
<command>nasal</command>
<script>controls.gearDown(1)</script>
</binding>
<mod-up>
<binding>
<condition>
<mod-up>
<binding>
<condition>
<not><property>/FMGC/keyboard-left</property></not>
<not><property>/FMGC/keyboard-right</property></not>
</condition>
<command>nasal</command>
<script>controls.gearDown(0)</script>
</binding>
</mod-up>
</binding>
</mod-up>
</key>
<key n="72">
<name>SHIFT-h</name>
@ -4802,9 +4793,9 @@
</options>
<nasal>
<notifications>
<file>Aircraft/A320-family/Nasal/emesary/M_frame_notification.nas</file>
</notifications>
<notifications>
<file>Aircraft/A320-family/Nasal/emesary/M_frame_notification.nas</file>
</notifications>
<pts>
<file>Aircraft/A320-family/Nasal/Libraries/property-tree-setup.nas</file>
</pts>
@ -4833,7 +4824,7 @@
<file>Aircraft/A320-family/Nasal/Systems/pneumatics.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/hydraulics.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/fuel.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/Engines/engines-common.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/engines.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/fadec-common.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/ADIRS/ADR.nas</file>
<file>Aircraft/A320-family/Nasal/Panels/SwitchingPanel.nas</file>

View file

@ -232,5 +232,12 @@
<sharklet type="bool">1</sharklet>
</model-options>
</options>
<systems n="0">
<ignition n="0">
<starter-cutoff-n2 type="double">50</starter-cutoff-n2> <!-- Check -->
<starter-engage-n2 type="double">16</starter-engage-n2> <!-- Check -->
</ignition>
</systems>
</PropertyList>

View file

@ -281,6 +281,7 @@
<system file="a320-hydraulic"/>
<system file="a320-pneumatic"/>
<system file="a320-aircond"/> <!-- after pneu -->
<system file="a320-ignition"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<system file="a320-adr"/>

View file

@ -222,7 +222,7 @@
</limits>
<options n="0">
<eng type="string">CFM</eng> <!-- Apparently PW PurePower uses N1, not EPR.... sooo I use CFM ECAM, and no N1 mode switches -->
<eng type="string">CFM</eng> <!-- PW PurePower uses N1, not EPR... so I use CFM, and no N1 mode switches -->
<eng-int type="int">0</eng-int>
<engine-name type="string">PW1127G-JM</engine-name>
<maxblock type="double">52.3</maxblock>
@ -232,5 +232,12 @@
<sharklet type="bool">1</sharklet>
</model-options>
</options>
<systems n="0">
<ignition n="0">
<starter-cutoff-n2 type="double">50</starter-cutoff-n2> <!-- Check -->
<starter-engage-n2 type="double">16</starter-engage-n2> <!-- Check -->
</ignition>
</systems>
</PropertyList>

View file

@ -281,6 +281,7 @@
<system file="a320-hydraulic"/>
<system file="a320-pneumatic"/>
<system file="a320-aircond"/> <!-- after pneu -->
<system file="a320-ignition"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<system file="a320-adr"/>

View file

@ -276,7 +276,7 @@ var colddark = func {
setprop("/controls/gear/brake-right", 1);
# Initial shutdown, and reinitialization.
setprop("/services/chocks/enable", 1);
setprop("/controls/engines/engine-start-switch", 1);
setprop("/controls/ignition/start-sw", 1);
setprop("/controls/engines/engine[0]/cutoff-switch", 1);
setprop("/controls/engines/engine[1]/cutoff-switch", 1);
setprop("/controls/flight/flaps", 0);
@ -336,7 +336,7 @@ var beforestart = func {
setprop("/controls/gear/brake-right", 1);
# First, we set everything to cold and dark.
setprop("/services/chocks/enable", 1);
setprop("/controls/engines/engine-start-switch", 1);
setprop("/controls/ignition/start-sw", 1);
setprop("/controls/engines/engine[0]/cutoff-switch", 1);
setprop("/controls/engines/engine[1]/cutoff-switch", 1);
setprop("/controls/flight/flaps", 0);
@ -433,7 +433,7 @@ var taxi = func {
setprop("/controls/gear/brake-right", 1);
# First, we set everything to cold and dark.
setprop("/services/chocks/enable", 0);
setprop("/controls/engines/engine-start-switch", 1);
setprop("/controls/ignition/start-sw", 1);
setprop("/controls/engines/engine[0]/cutoff-switch", 1);
setprop("/controls/engines/engine[1]/cutoff-switch", 1);
setprop("/controls/flight/flaps", 0);
@ -527,9 +527,8 @@ var taxi_c = func {
colddark();
return 0; # auto-config aborted
}
setprop("/controls/engines/engine-start-switch", 2);
setprop("/controls/engines/engine[0]/cutoff-switch", 0);
setprop("/controls/engines/engine[1]/cutoff-switch", 0);
systems.IGNITION.fastStart(0);
systems.IGNITION.fastStart(1);
settimer(func {
taxi_d();
}, 10);
@ -540,7 +539,6 @@ var taxi_d = func {
return 0; # auto-config aborted
}
# After Start items.
setprop("/controls/engines/engine-start-switch", 1);
setprop("/controls/apu/master", 0);
setprop("/controls/pneumatics/switches/apu", 0);
setprop("/controls/gear/brake-left", 0);

View file

@ -6,17 +6,17 @@
<milthrust>27000</milthrust>
<tsfc>0.335</tsfc>
<bleed>0.03</bleed>
<ignitionn1>2.3</ignitionn1>
<ignitionn2>22.2</ignitionn2>
<n1spinup>0.19</n1spinup>
<n2spinup>1.85</n2spinup>
<bleed>0</bleed> <!-- Set by pneumatic system -->
<ignitionn1>1.7</ignitionn1>
<ignitionn2>28.5</ignitionn2>
<n1spinup>0.11</n1spinup>
<n2spinup>1.845</n2spinup>
<n1startrate>0.503</n1startrate>
<n2startrate>1.127</n2startrate>
<idlen1>18.9</idlen1>
<idlen2>59.4</idlen2>
<maxn1>104.0</maxn1>
<maxn2>105.0</maxn2>
<maxn1>104</maxn1>
<maxn2>105</maxn2>
<augmented>0</augmented>
<injected>0</injected>

View file

@ -6,17 +6,17 @@
<milthrust>27000</milthrust>
<tsfc>0.335</tsfc>
<bleed>0.03</bleed>
<ignitionn1>2.3</ignitionn1>
<ignitionn2>22.2</ignitionn2>
<n1spinup>0.19</n1spinup>
<n2spinup>1.85</n2spinup>
<bleed>0</bleed> <!-- Set by pneumatic system -->
<ignitionn1>1.7</ignitionn1>
<ignitionn2>28.5</ignitionn2>
<n1spinup>0.11</n1spinup>
<n2spinup>1.845</n2spinup>
<n1startrate>0.503</n1startrate>
<n2startrate>1.127</n2startrate>
<idlen1>18.9</idlen1>
<idlen2>59.4</idlen2>
<maxn1>104.0</maxn1>
<maxn2>105.0</maxn2>
<maxn1>104</maxn1>
<maxn2>105</maxn2>
<augmented>0</augmented>
<injected>0</injected>

View file

@ -6,17 +6,17 @@
<milthrust>27000</milthrust>
<tsfc>0.335</tsfc>
<bleed>0.03</bleed>
<ignitionn1>2.3</ignitionn1>
<ignitionn2>22.2</ignitionn2>
<n1spinup>0.19</n1spinup>
<n2spinup>1.85</n2spinup>
<bleed>0</bleed> <!-- Set by pneumatic system -->
<ignitionn1>1.7</ignitionn1>
<ignitionn2>28.5</ignitionn2>
<n1spinup>0.11</n1spinup>
<n2spinup>1.845</n2spinup>
<n1startrate>0.503</n1startrate>
<n2startrate>1.127</n2startrate>
<idlen1>18.9</idlen1>
<idlen2>59.4</idlen2>
<maxn1>104.0</maxn1>
<maxn2>105.0</maxn2>
<maxn1>104</maxn1>
<maxn2>105</maxn2>
<augmented>0</augmented>
<injected>0</injected>

View file

@ -6,17 +6,17 @@
<milthrust>27000</milthrust>
<tsfc>0.335</tsfc>
<bleed>0.03</bleed>
<ignitionn1>2.3</ignitionn1>
<ignitionn2>22.2</ignitionn2>
<n1spinup>0.19</n1spinup>
<n2spinup>1.85</n2spinup>
<bleed>0</bleed> <!-- Set by pneumatic system -->
<ignitionn1>1.7</ignitionn1>
<ignitionn2>28.5</ignitionn2>
<n1spinup>0.11</n1spinup>
<n2spinup>1.845</n2spinup>
<n1startrate>0.503</n1startrate>
<n2startrate>1.127</n2startrate>
<idlen1>18.9</idlen1>
<idlen2>59.4</idlen2>
<maxn1>104.0</maxn1>
<maxn2>105.0</maxn2>
<maxn1>104</maxn1>
<maxn2>105</maxn2>
<augmented>0</augmented>
<injected>0</injected>

View file

@ -6,17 +6,17 @@
<milthrust>27000</milthrust>
<tsfc>0.335</tsfc>
<bleed>0.03</bleed>
<ignitionn1>2.3</ignitionn1>
<ignitionn2>22.2</ignitionn2>
<n1spinup>0.19</n1spinup>
<n2spinup>1.85</n2spinup>
<bleed>0</bleed> <!-- Set by pneumatic system -->
<ignitionn1>1.7</ignitionn1>
<ignitionn2>28.5</ignitionn2>
<n1spinup>0.11</n1spinup>
<n2spinup>1.845</n2spinup>
<n1startrate>0.503</n1startrate>
<n2startrate>1.127</n2startrate>
<idlen1>18.9</idlen1>
<idlen2>59.4</idlen2>
<maxn1>104.0</maxn1>
<maxn2>105.0</maxn2>
<maxn1>104</maxn1>
<maxn2>105</maxn2>
<augmented>0</augmented>
<injected>0</injected>

View file

@ -6,17 +6,17 @@
<milthrust>27000</milthrust>
<tsfc>0.335</tsfc>
<bleed>0.03</bleed>
<ignitionn1>2.3</ignitionn1>
<ignitionn2>22.2</ignitionn2>
<n1spinup>0.19</n1spinup>
<n2spinup>1.85</n2spinup>
<bleed>0</bleed> <!-- Set by pneumatic system -->
<ignitionn1>1.7</ignitionn1>
<ignitionn2>28.5</ignitionn2>
<n1spinup>0.11</n1spinup>
<n2spinup>1.845</n2spinup>
<n1startrate>0.503</n1startrate>
<n2startrate>1.127</n2startrate>
<idlen1>18.9</idlen1>
<idlen2>59.4</idlen2>
<maxn1>104.0</maxn1>
<maxn2>105.0</maxn2>
<maxn1>104</maxn1>
<maxn2>105</maxn2>
<augmented>0</augmented>
<injected>0</injected>

View file

@ -6,17 +6,17 @@
<milthrust>26600</milthrust> <!-- @ 0.2 Mach, 24800 at 0 Mach, handled in fadec file -->
<tsfc>0.335</tsfc>
<bleed>0.03</bleed>
<ignitionn1>4.8</ignitionn1>
<ignitionn2>23.9</ignitionn2>
<n1spinup>0.37</n1spinup>
<n2spinup>1.85</n2spinup>
<bleed>0</bleed> <!-- Set by pneumatic system -->
<ignitionn1>5.3</ignitionn1>
<ignitionn2>28.5</ignitionn2>
<n1spinup>0.343</n1spinup>
<n2spinup>1.845</n2spinup>
<n1startrate>0.365</n1startrate>
<n2startrate>0.767</n2startrate>
<idlen1>22.4</idlen1>
<idlen2>60.9</idlen2>
<maxn1>100.0</maxn1>
<maxn2>100.0</maxn2>
<maxn1>100</maxn1>
<maxn2>100</maxn2>
<augmented>0</augmented>
<injected>0</injected>

View file

@ -6,17 +6,17 @@
<milthrust>26600</milthrust> <!-- @ 0.2 Mach, 24800 at 0 Mach, handled in fadec file -->
<tsfc>0.335</tsfc>
<bleed>0.03</bleed>
<ignitionn1>4.8</ignitionn1>
<ignitionn2>23.9</ignitionn2>
<n1spinup>0.37</n1spinup>
<n2spinup>1.85</n2spinup>
<bleed>0</bleed> <!-- Set by pneumatic system -->
<ignitionn1>5.3</ignitionn1>
<ignitionn2>28.5</ignitionn2>
<n1spinup>0.343</n1spinup>
<n2spinup>1.845</n2spinup>
<n1startrate>0.365</n1startrate>
<n2startrate>0.767</n2startrate>
<idlen1>22.4</idlen1>
<idlen2>60.9</idlen2>
<maxn1>100.0</maxn1>
<maxn2>100.0</maxn2>
<maxn1>100</maxn1>
<maxn2>100</maxn2>
<augmented>0</augmented>
<injected>0</injected>

View file

@ -11464,7 +11464,7 @@
<type>knob</type>
<object-name>eng_mode</object-name>
<object-name>eng_mode.mark</object-name>
<property>controls/engines/engine-start-switch-knob</property>
<property>controls/ignition/start-sw-knob</property>
<factor>53</factor>
<offset-deg>-53</offset-deg>
<axis>
@ -11474,7 +11474,7 @@
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>controls/engines/engine-start-switch</property>
<property>controls/ignition/start-sw</property>
<value>0</value>
<value>1</value>
<value>2</value>
@ -26124,7 +26124,7 @@
</and>
</condition>
<command>property-toggle</command>
<property>controls/engines/engine[0]/man-start</property>
<property>controls/engines/engine[0]/start-switch</property>
</binding>
<binding>
<condition>
@ -26191,7 +26191,7 @@
</and>
</condition>
<command>property-toggle</command>
<property>controls/engines/engine[1]/man-start</property>
<property>controls/engines/engine[1]/start-switch</property>
</binding>
<binding>
<condition>
@ -26272,7 +26272,7 @@
<object-name>Eng1ManStartBtn2O</object-name>
<condition>
<or>
<property>controls/engines/engine[0]/man-start</property>
<property>controls/engines/engine[0]/start-switch</property>
<property>controls/switches/annun-test</property>
</or>
</condition>
@ -26283,7 +26283,7 @@
<object-name>Eng2ManStartBtn2O</object-name>
<condition>
<or>
<property>controls/engines/engine[1]/man-start</property>
<property>controls/engines/engine[1]/start-switch</property>
<property>controls/switches/annun-test</property>
</or>
</condition>

View file

@ -39,12 +39,12 @@ var canvas_lowerECAMPageEng =
obj.quantity[0] = sprintf("%2.1f",(0.1 * math.round(val * QT2LTR * 10,5)));
obj["OilQT1"].setText(sprintf("%s", left(obj.quantity[0], (size(obj.quantity[0]) == 4 ? 2 : 1))));
obj["OilQT1-decimal"].setText(sprintf("%s", right(obj.quantity[0],1)));
obj["OilQT1-needle"].setRotation(((val * QT2LTR) + 90) * D2R);
obj["OilQT1-needle"].setRotation(((val * QT2LTR)) * D2R);
} else {
obj.quantity[0] = sprintf("%2.1f",(0.1 * math.round(val * 10,5)));
obj["OilQT1"].setText(sprintf("%s", left(obj.quantity[0], (size(obj.quantity[0]) == 4 ? 2 : 1))));
obj["OilQT1-decimal"].setText(sprintf("%s", right(obj.quantity[0],1)));
obj["OilQT1-needle"].setRotation((val + 90) * D2R);
obj["OilQT1-needle"].setRotation((val) * D2R);
}
}),
props.UpdateManager.FromHashValue("engOilQt2", 0.005, func(val) {
@ -52,12 +52,12 @@ var canvas_lowerECAMPageEng =
obj.quantity[1] = sprintf("%2.1f",(0.1 * math.round(val * QT2LTR * 10,5)));
obj["OilQT2"].setText(sprintf("%s", left(obj.quantity[1], (size(obj.quantity[1]) == 4 ? 2 : 1))));
obj["OilQT2-decimal"].setText(sprintf("%s", right(obj.quantity[1],1)));
obj["OilQT2-needle"].setRotation(((val * QT2LTR) + 90) * D2R);
obj["OilQT2-needle"].setRotation(((val * QT2LTR)) * D2R);
} else {
obj.quantity[1] = sprintf("%2.1f",(0.1 * math.round(val * 10,5)));
obj["OilQT2"].setText(sprintf("%s", left(obj.quantity[1], (size(obj.quantity[1]) == 4 ? 2 : 1))));
obj["OilQT2-decimal"].setText(sprintf("%s", right(obj.quantity[1],1)));
obj["OilQT2-needle"].setRotation((val + 90) * D2R);
obj["OilQT2-needle"].setRotation((val) * D2R);
}
}),
props.UpdateManager.FromHashValue("engOilPsi1", 0.25, func(val) {
@ -70,7 +70,7 @@ var canvas_lowerECAMPageEng =
}
obj["OilPSI1"].setText(sprintf("%s", math.round(val)));
obj["OilPSI1-needle"].setRotation((val + 90) * D2R);
obj["OilPSI1-needle"].setRotation((val) * D2R);
}),
props.UpdateManager.FromHashValue("engOilPsi2", 0.25, func(val) {
if (val >= 13) {
@ -82,7 +82,7 @@ var canvas_lowerECAMPageEng =
}
obj["OilPSI2"].setText(sprintf("%s", math.round(val)));
obj["OilPSI2-needle"].setRotation((val + 90) * D2R);
obj["OilPSI2-needle"].setRotation((val) * D2R);
}),
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
if (val) {

View file

@ -1,284 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (c) 2022 Josh Davidson (Octal450) -->
<PropertyList>
<!--<path>res/ohpanelEPR.ac</path>-->
<!-- No button lights without power! -->
<animation>
<type>select</type>
<object-name>Eng1N1Btn2O</object-name>
<object-name>Eng2N1Btn2O</object-name>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc-1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc-2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
</animation>
<!-- N1 Mode switches -->
<animation>
<type>pick</type>
<object-name>Eng1N1Btn</object-name>
<object-name>Eng1N1Btn2O</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<and>
<equals>
<property>controls/OH/protectors/eng1-n1</property>
<value>1</value>
</equals>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc-1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc-2</property>
<value>25</value>
</greater-than-equals>
</or>
</and>
</condition>
<command>property-toggle</command>
<property>fdm/jsbsim/fadec/control-1/n1-mode-sw</property>
</binding>
<binding>
<command>property-assign</command>
<property>controls/OH/protectors/eng1-n1</property>
<value>0</value>
</binding>
<binding>
<condition>
<equals>
<property>controls/OH/protectors/eng1-n1</property>
<value>1</value>
</equals>
</condition>
<command>nasal</command>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>Eng1N1Prot</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-toggle</command>
<property>controls/OH/protectors/eng1-n1</property>
</binding>
<binding>
<condition>
<not>
<property>controls/OH/protectors/eng1-n1</property>
</not>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-cover", 1);</script>
</binding>
</action>
</animation>
<animation>
<type>rotate</type>
<object-name>Eng1N1Prot</object-name>
<property>controls/OH/protectors/eng1-n1</property>
<factor>-145</factor>
<axis>
<x1-m>0.00201</x1-m>
<y1-m>0.25404</y1-m>
<z1-m>-0.20418</z1-m>
<x2-m>0.00489</x2-m>
<y2-m>0.27681</y2-m>
<z2-m>-0.20418</z2-m>
</axis>
</animation>
<animation>
<type>select</type>
<object-name>Eng1N1Btn2O</object-name>
<condition>
<or>
<equals>
<property>fdm/jsbsim/fadec/control-1/n1-mode-sw</property>
<value>1</value>
</equals>
<equals>
<property>controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>pick</type>
<object-name>Eng2N1Btn</object-name>
<object-name>Eng2N1Btn2O</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<and>
<equals>
<property>controls/OH/protectors/eng2-n1</property>
<value>1</value>
</equals>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc-1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc-2</property>
<value>25</value>
</greater-than-equals>
</or>
</and>
</condition>
<command>property-toggle</command>
<property>fdm/jsbsim/fadec/control-2/n1-mode-sw</property>
</binding>
<binding>
<command>property-assign</command>
<property>controls/OH/protectors/eng2-n1</property>
<value>0</value>
</binding>
<binding>
<condition>
<equals>
<property>controls/OH/protectors/eng2-n1</property>
<value>1</value>
</equals>
</condition>
<command>nasal</command>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>Eng2N1Prot</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-toggle</command>
<property>controls/OH/protectors/eng2-n1</property>
</binding>
<binding>
<condition>
<not>
<property>controls/OH/protectors/eng2-n1</property>
</not>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-cover", 1);</script>
</binding>
</action>
</animation>
<animation>
<type>rotate</type>
<object-name>Eng2N1Prot</object-name>
<property>controls/OH/protectors/eng2-n1</property>
<factor>-145</factor>
<axis>
<x1-m>0.00616</x1-m>
<y1-m>0.2855</y1-m>
<z1-m>-0.20418</z1-m>
<x2-m>0.00904</x2-m>
<y2-m>0.30828</y2-m>
<z2-m>-0.20418</z2-m>
</axis>
</animation>
<animation>
<type>select</type>
<object-name>Eng2N1Btn2O</object-name>
<condition>
<or>
<equals>
<property>fdm/jsbsim/fadec/control-2/n1-mode-sw</property>
<value>1</value>
</equals>
<equals>
<property>controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<!-- Panel lighting -->
<animation>
<name>Panel lighting</name>
<type>material</type>
<object-name>MarkingLts</object-name>
<condition>
<not>
<and>
<greater-than>
<property>sim/model/lights/dome-light</property>
<value>0</value>
</greater-than>
<less-than>
<property>controls/lighting/overhead-panel-norm</property>
<value>0.25</value>
</less-than>
</and>
</not>
</condition>
<emission>
<red>1</red>
<green>0.824</green>
<blue>0.518</blue>
<factor-prop>controls/lighting/overhead-panel-norm</factor-prop>
</emission>
</animation>
<animation>
<name>Panel lighting</name>
<type>material</type>
<object-name>MarkingLts</object-name>
<condition>
<and>
<not>
<greater-than>
<property>controls/lighting/overhead-panel-norm</property>
<value>0.25</value>
</greater-than>
</not>
<greater-than>
<property>sim/model/lights/dome-light</property>
<value>0</value>
</greater-than>
</and>
</condition>
<emission>
<red>0.20</red>
<green>0.20</green>
<blue>0.20</blue>
<factor-prop>sim/model/lights/dome-light</factor-prop>
</emission>
</animation>
</PropertyList>

View file

@ -1,131 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (c) 2022 Josh Davidson (Octal450) -->
<PropertyList>
<!--<path>res/SteepAppr.ac</path>-->
<!-- ANIMATIONS -->
<animation>
<type>select</type>
<object-name>SteepApprBtn2O</object-name>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc-1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc-2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
</animation>
<!-- Steep Approach -->
<animation>
<type>pick</type>
<object-name>SteepApprBtn1</object-name>
<object-name>SteepApprBtn2</object-name>
<object-name>SteepApprBtn2O</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc-1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc-2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>options/steep-ils</property>
</binding>
<binding>
<command>nasal</command>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
<animation>
<type>select</type>
<object-name>SteepApprBtn2O</object-name>
<condition>
<or>
<equals>
<property>options/steep-ils</property>
<value>1</value>
</equals>
<equals>
<property>controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<!-- Panel lighting -->
<animation>
<name>Panel lighting</name>
<type>material</type>
<object-name>MarkingLts</object-name>
<condition>
<not>
<and>
<greater-than>
<property>sim/model/lights/dome-light</property>
<value>0</value>
</greater-than>
<less-than>
<property>controls/lighting/overhead-panel-norm</property>
<value>0.25</value>
</less-than>
</and>
</not>
</condition>
<emission>
<red>1</red>
<green>0.824</green>
<blue>0.518</blue>
<factor-prop>controls/lighting/overhead-panel-norm</factor-prop>
</emission>
</animation>
<animation>
<name>Panel lighting</name>
<type>material</type>
<object-name>MarkingLts</object-name>
<condition>
<and>
<not>
<greater-than>
<property>controls/lighting/overhead-panel-norm</property>
<value>0.25</value>
</greater-than>
</not>
<greater-than>
<property>sim/model/lights/dome-light</property>
<value>0</value>
</greater-than>
</and>
</condition>
<emission>
<red>0.20</red>
<green>0.20</green>
<blue>0.20</blue>
<factor-prop>sim/model/lights/dome-light</factor-prop>
</emission>
</animation>
</PropertyList>

View file

@ -1723,7 +1723,7 @@ var canvas_pfd = {
} else {
me["FMA_combined"].hide();
me["FMA_combined_box"].hide();
if ((notification.ap1 or notification.ap2) and fmgc.Modes.PFD.FMA.pitchMode == "V/S" and (notification.overspeedVsProt or notification.underspeedVsProt)) {
if ((notification.ap1 or notification.ap2) and (fmgc.Modes.PFD.FMA.pitchMode == "V/S" or fmgc.Modes.PFD.FMA.pitchMode == "FPA") and (notification.overspeedVsProt or notification.underspeedVsProt)) {
me.amberBoxVS = 1;
} else {
me.amberBoxVS = 0;

View file

@ -733,7 +733,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(excessCabAltSPD);
}
if (excessCabAltENG.clearFlag == 0 and pts.Controls.Engines.startSw.getValue() != 1) {
if (excessCabAltENG.clearFlag == 0 and systems.IGNITION.startSw.getValue() != 1) {
excessCabAltENG.active = 1;
} else {
ECAM_controller.warningReset(excessCabAltENG);
@ -1148,7 +1148,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(emerconfigManOn);
}
if (pts.Controls.Engines.startSw.getValue() != 2 and emerconfigEngMode.clearFlag == 0) {
if (systems.IGNITION.startSw.getValue() != 2 and emerconfigEngMode.clearFlag == 0) {
emerconfigEngMode.active = 1;
} else {
ECAM_controller.warningReset(emerconfigEngMode);
@ -1476,7 +1476,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(shaftFailure1);
}
if (phaseVar2 != 2 and phaseVar2 != 9 and pts.Controls.Engines.startSw.getValue() != 2 and eng1FailModeSel.clearFlag == 0) { # and not stall and not EGT protect
if (phaseVar2 != 2 and phaseVar2 != 9 and systems.IGNITION.startSw.getValue() != 2 and eng1FailModeSel.clearFlag == 0) { # and not stall and not EGT protect
eng1FailModeSel.active = 1;
} else {
ECAM_controller.warningReset(eng1FailModeSel);
@ -1584,7 +1584,7 @@ var messages_priority_2 = func {
}
if (FWC.Timer.gnd.getValue() == 0 or systems.fireButtons[0].getValue() == 0) {
if (eng1ShutDownModeSel.clearFlag == 0 and pts.Controls.Engines.startSw.getValue() != 2) {
if (eng1ShutDownModeSel.clearFlag == 0 and systems.IGNITION.startSw.getValue() != 2) {
eng1ShutDownModeSel.active = 1;
} else {
ECAM_controller.warningReset(eng1ShutDownModeSel);
@ -1683,7 +1683,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(shaftFailure2);
}
if (phaseVar2 != 2 and phaseVar2 != 9 and pts.Controls.Engines.startSw.getValue() != 2 and eng2FailModeSel.clearFlag == 0) { # and not stall and not EGT protect
if (phaseVar2 != 2 and phaseVar2 != 9 and systems.IGNITION.startSw.getValue() != 2 and eng2FailModeSel.clearFlag == 0) { # and not stall and not EGT protect
eng2FailModeSel.active = 1;
} else {
ECAM_controller.warningReset(eng2FailModeSel);
@ -1797,7 +1797,7 @@ var messages_priority_2 = func {
}
if (FWC.Timer.gnd.getValue() == 0 or systems.fireButtons[1].getValue() == 0) {
if (eng2ShutDownModeSel.clearFlag == 0 and pts.Controls.Engines.startSw.getValue() != 2) {
if (eng2ShutDownModeSel.clearFlag == 0 and systems.IGNITION.startSw.getValue() != 2) {
eng2ShutDownModeSel.active = 1;
} else {
ECAM_controller.warningReset(eng2ShutDownModeSel);
@ -3975,7 +3975,7 @@ var messages_right_memo = func {
pax_oxy.active = 0;
}
if (getprop("/controls/engines/engine[0]/igniter-a") == 1 or getprop("/controls/engines/engine[0]/igniter-b") == 1 or getprop("/controls/engines/engine[1]/igniter-a") == 1 or getprop("/controls/engines/engine[1]/igniter-b") == 1) {
if (getprop("/systems/ignition/ign-1/igniter-a") == 1 or getprop("/systems/ignition/ign-1/igniter-b") == 1 or getprop("/systems/ignition/ign-2/igniter-a") == 1 or getprop("/systems/ignition/ign-2/igniter-b") == 1) {
ignition.active = 1;
} else {
ignition.active = 0;

View file

@ -218,7 +218,7 @@ var SystemDisplayController = {
}
}
me.tempEngineModeSel = pts.Controls.Engines.startSw.getValue();
me.tempEngineModeSel = systems.IGNITION.startSw.getValue();
if (me.tempEngineModeSel == 0 or me.tempEngineModeSel == 2) {
if (!me.Display.Engine) {
me.Display.Engine = 1;

View file

@ -163,7 +163,7 @@ var Text = {
};
var Settings = {
reducAglFt: props.globals.initNode("/it-autoflight/settings/accel-agl-ft", 1500, "INT"), # Changable from MCDU, eventually set to 1500 above runway
accelFt: props.globals.initNode("/it-autoflight/settings/accel-ft", 1500, "INT"), # Changable from MCDU, eventually set to 1500 above runway
};
var Sound = {
@ -307,7 +307,7 @@ var ITAF = {
# FLCH Engagement
if (Text.vertTemp == "T/O CLB") {
me.checkFlch(Settings.reducAglFt.getValue());
me.checkFlch(Settings.accelFt.getValue());
}
# Altitude Capture/Sync Logic
@ -379,7 +379,6 @@ var ITAF = {
} else {
Internal.bankLimitAuto = 30;
}
Internal.bankLimit.setValue(Internal.bankLimitAuto);
# If in LNAV mode and route is not longer active, switch to HDG HLD

View file

@ -35,7 +35,7 @@ var windsDidChange = 0;
var tempOverspeed = nil;
setprop("/position/gear-agl-ft", 0);
setprop("/it-autoflight/settings/accel-agl-ft", 1500); #eventually set to 1500 above runway
setprop("/it-autoflight/settings/accel-ft", 1500); #eventually set to 1500 above runway
setprop("/it-autoflight/internal/vert-speed-fpm", 0);
setprop("/instrumentation/nav[0]/nav-id", "XXX");
setprop("/instrumentation/nav[1]/nav-id", "XXX");
@ -604,7 +604,7 @@ var masterFMGC = maketimer(0.2, func {
# cruiseft_b = FMGCInternal.crzFt - 200;
state1 = systems.FADEC.detentText[0].getValue();
state2 = systems.FADEC.detentText[1].getValue();
accel_agl_ft = Settings.reducAglFt.getValue();
accel_agl_ft = Settings.accelFt.getValue();
gear0 = pts.Gear.wow[0].getBoolValue();
altSel = Input.alt.getValue();

View file

@ -131,8 +131,8 @@ var systemsInit = func() {
systems.HYD.init();
systems.FUEL.init();
systems.ADIRS.init();
systems.eng_init();
systems.ENGINE.init();
systems.IGNITION.init();
systems.FADEC.init();
systems.APUController.init();
systems.BrakeSys.reset();
@ -201,14 +201,6 @@ var systemsLoop = func(notification) {
systems.PNEU.Switch.groundAir.setBoolValue(0);
}
}
if (notification.engine1State >= 2 and pts.Fdm.JSBsim.Propulsion.Tank.contentsLbs[5].getValue() < 1) {
systems.cutoff_one();
}
if (notification.engine2State >= 2 and pts.Fdm.JSBsim.Propulsion.Tank.contentsLbs[6].getValue() < 1) {
systems.cutoff_two();
}
}
# GPWS
@ -341,6 +333,7 @@ setlistener("/controls/flight/auto-coordination", func() {
pts.Controls.Flight.autoCoordination.setBoolValue(0);
print("System: Auto Coordination has been turned off as it is not compatible with the fly-by-wire of this aircraft.");
screen.log.write("Auto Coordination has been disabled as it is not compatible with the fly-by-wire of this aircraft", 1, 0, 0);
screen.log.write("Tiller will now be controlled by aileron, rather than rudder", 1, 0, 0);
}, 0, 0);
# Legacy FCU

View file

@ -31,7 +31,6 @@ var Consumables = {
var Controls = {
Engines: {
startSw: props.globals.getNode("/controls/engines/engine-start-switch"),
Engine: {
cutoff: [props.globals.getNode("/controls/engines/engine[0]/cutoff"), props.globals.getNode("/controls/engines/engine[1]/cutoff")],
cutoffSw: [props.globals.getNode("/controls/engines/engine[0]/cutoff-switch"), props.globals.getNode("/controls/engines/engine[1]/cutoff-switch")],
@ -138,14 +137,14 @@ var Fdm = {
wow: props.globals.getNode("/fdm/jsbsim/position/wow"),
},
Propulsion: {
tatC: props.globals.getNode("/fdm/jsbsim/propulsion/tat-c"),
Engine: {
fuelUsed: [props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/fuel-used-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/engine[1]/fuel-used-lbs")],
reverserAngle: [props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad"), props.globals.getNode("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad")],
},
setRunning: props.globals.getNode("/fdm/jsbsim/propulsion/set-running"),
tatC: props.globals.getNode("/fdm/jsbsim/propulsion/tat-c"),
Tank: {
contentsLbs: [props.globals.getNode("/fdm/jsbsim/propulsion/tank[0]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[1]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[2]/contents-lbs"),
props.globals.getNode("/fdm/jsbsim/propulsion/tank[3]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[4]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[5]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[6]/contents-lbs")],
contentsLbs: [props.globals.getNode("/fdm/jsbsim/propulsion/tank[0]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[1]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[2]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[3]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[4]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[5]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[6]/contents-lbs")],
},
},
},
@ -358,6 +357,11 @@ var Sim = {
};
var Systems = {
Acconfig: {
Options: {
igniterSelect: [props.globals.getNode("/systems/acconfig/options/igniter-select-1"), props.globals.getNode("/systems/acconfig/options/igniter-select-2")],
}
},
Navigation: {
ADR: {
Output: {

View file

@ -1,377 +0,0 @@
# A3XX IAE V2500 Engine
# Joshua Davidson (Octal450)
# Copyright (c) 2022 Josh Davidson (Octal450)
#####################
# Initializing Vars #
#####################
var engines = props.globals.getNode("engines").getChildren("engine");
var egt_min = 434;
var egt_start = 587;
var egt_max = 712;
var start_time = 10;
var egt_lightup_time = 4;
var egt_lightdn_time = 10;
var shutdown_time = 20;
var egt_shutdown_time = 20;
var eng_init = func {
eng_common_init();
}
# Trigger Startups and Stops
setlistener("/controls/engines/engine[0]/cutoff-switch", func {
if (!pts.Controls.Engines.Engine.cutoffSw[0].getValue()) {
if (pts.Acconfig.running.getValue()) {
fast_start_one();
} else {
if (!manStart[0].getValue()) {
start_one_check();
} else {
eng_one_man_start.start();
}
}
} else if (pts.Controls.Engines.Engine.cutoffSw[0].getValue()) {
cutoff_one();
}
}, 0, 0);
var cutoff_one = func {
eng_one_auto_start.stop();
eng_one_man_start.stop();
eng_one_n2_check.stop();
igniterA[0].setValue(0);
igniterB[0].setValue(0);
manStart[0].setValue(0);
systems.PNEU.Valves.starter1.setValue(0);
pts.Controls.Engines.Engine.starter[0].setValue(0);
pts.Controls.Engines.Engine.cutoff[0].setValue(1);
pts.Engines.Engine.state[0].setValue(0);
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
eng_one_n2_check.stop();
}
var fast_start_one = func {
pts.Controls.Engines.Engine.cutoff[0].setValue(0);
setprop("/engines/engine[0]/out-of-fuel", 0);
setprop("/engines/engine[0]/run", 1);
setprop("/engines/engine[0]/cutoff", 0);
setprop("/engines/engine[0]/starter", 0);
setprop("/fdm/jsbsim/propulsion/set-running", 0);
pts.Engines.Engine.state[0].setValue(3);
systems.PNEU.Valves.starter1.setValue(0);
}
setlistener("/controls/engines/engine[0]/man-start", func {
start_one_mancheck();
}, 0, 0);
var start_one_mancheck = func {
if (manStart[0].getValue()) {
if (pts.Controls.Engines.startSw.getValue() == 2 and (pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 1)) {
systems.PNEU.Valves.starter1.setValue(1);
settimer(start_one_mancheck_b, 0.5);
}
} else {
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
systems.PNEU.Valves.starter1.setValue(0);
pts.Engines.Engine.state[0].setValue(0);
pts.Controls.Engines.Engine.starter[0].setValue(0);
}
}
}
var start_one_mancheck_b = func {
if (systems.PNEU.Psi.engine1.getValue() >= 25) {
pts.Engines.Engine.state[0].setValue(1);
pts.Controls.Engines.Engine.starter[0].setValue(1);
}
}
var start_one_check = func {
if (pts.Controls.Engines.startSw.getValue() == 2 and pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) {
systems.PNEU.Valves.starter1.setValue(1);
settimer(start_one_check_b, 0.5);
}
}
var start_one_check_b = func {
if (pts.Controls.Engines.startSw.getValue() == 2 and systems.PNEU.Psi.engine1.getValue() >= 25and !pts.Controls.Engines.Engine.cutoffSw[0].getValue()) {
auto_start_one();
}
}
setlistener("/controls/engines/engine[1]/cutoff-switch", func {
if (!pts.Controls.Engines.Engine.cutoffSw[1].getValue()) {
if (pts.Acconfig.running.getValue()) {
fast_start_two();
} else {
if (!manStart[1].getValue()) {
start_two_check();
} else {
eng_two_man_start.start();
}
}
} else if (pts.Controls.Engines.Engine.cutoffSw[1].getValue()) {
cutoff_two();
}
}, 0, 0);
var cutoff_two = func {
eng_two_auto_start.stop();
eng_two_man_start.stop();
eng_two_n2_check.stop();
igniterA[1].setValue(0);
igniterB[1].setValue(0);
manStart[1].setValue(0);
systems.PNEU.Valves.starter2.setValue(0);
pts.Controls.Engines.Engine.starter[1].setValue(0);
pts.Controls.Engines.Engine.cutoff[1].setValue(1);
pts.Engines.Engine.state[1].setValue(0);
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
}
var fast_start_two = func {
pts.Controls.Engines.Engine.cutoff[1].setValue(0);
setprop("/engines/engine[1]/out-of-fuel", 0);
setprop("/engines/engine[1]/run", 1);
setprop("/engines/engine[1]/cutoff", 0);
setprop("/engines/engine[1]/starter", 0);
setprop("/fdm/jsbsim/propulsion/set-running", 1);
pts.Engines.Engine.state[1].setValue(3);
systems.PNEU.Valves.starter2.setValue(0);
}
setlistener("/controls/engines/engine[1]/man-start", func {
start_two_mancheck();
}, 0, 0);
var start_two_mancheck = func {
if (manStart[1].getValue() == 1) {
if (pts.Controls.Engines.startSw.getValue() == 2 and (pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 1)) {
systems.PNEU.Valves.starter2.setValue(1);
settimer(start_two_mancheck_b, 0.5);
}
} else {
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
systems.PNEU.Valves.starter2.setValue(0);
pts.Engines.Engine.state[1].setValue(0);
pts.Controls.Engines.Engine.starter[1].setValue(0);
}
}
}
var start_two_mancheck_b = func {
if (systems.PNEU.Psi.engine2.getValue() >= 25) {
pts.Engines.Engine.state[1].setValue(1);
pts.Controls.Engines.Engine.starter[1].setValue(1);
}
}
var start_two_check = func {
if (pts.Controls.Engines.startSw.getValue() == 2 and pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) {
systems.PNEU.Valves.starter2.setValue(1);
settimer(start_two_check_b, 0.5);
}
}
var start_two_check_b = func {
if (pts.Controls.Engines.startSw.getValue() == 2 and systems.PNEU.Psi.engine2.getValue() >= 25 and !pts.Controls.Engines.Engine.cutoffSw[1].getValue()) {
auto_start_two();
}
}
# Start Engine One
var auto_start_one = func {
pts.Engines.Engine.state[0].setValue(1);
pts.Controls.Engines.Engine.starter[0].setValue(1);
eng_one_auto_start.start();
}
var eng_one_auto_start = maketimer(0.5, func {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 21) {
eng_one_auto_start.stop();
pts.Engines.Engine.state[0].setValue(2);
pts.Controls.Engines.Engine.cutoff[0].setValue(0);
if (lastIgniter[0].getValue() == "B") {
igniterA[0].setValue(1);
igniterB[0].setValue(0);
lastIgniter[0].setValue("A");
} else if (lastIgniter[0].getValue() == "A") {
igniterA[0].setValue(0);
igniterB[0].setValue(1);
lastIgniter[0].setValue("B");
}
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_one_egt_check.start();
eng_one_n2_check.start();
}
});
var eng_one_man_start = maketimer(0.5, func {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 16.7) {
eng_one_man_start.stop();
pts.Engines.Engine.state[0].setValue(2);
pts.Controls.Engines.Engine.cutoff[0].setValue(0);
igniterA[0].setValue(1);
igniterB[0].setValue(1);
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_one_egt_check.start();
eng_one_n2_check.start();
}
});
var eng_one_egt_check = maketimer(0.5, func {
if (pts.Engines.Engine.egtActual[0].getValue() >= egt_start) {
eng_one_egt_check.stop();
interpolate(engines[0].getNode("egt-actual"), egt_min, egt_lightdn_time);
}
});
var eng_one_n2_check = maketimer(0.5, func {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 43.0) {
if (igniterA[0].getValue() != 0) {
igniterA[0].setValue(0);
}
if (igniterB[0].getValue() != 0) {
igniterB[0].setValue(0);
}
}
if (pts.Engines.Engine.n2Actual[0].getValue() >= 57.0) {
eng_one_n2_check.stop();
systems.PNEU.Valves.starter1.setValue(0);
pts.Engines.Engine.state[0].setValue(3);
}
});
# Start Engine Two
var auto_start_two = func {
pts.Engines.Engine.state[1].setValue(1);
pts.Controls.Engines.Engine.starter[1].setValue(1);
eng_two_auto_start.start();
}
var eng_two_auto_start = maketimer(0.5, func {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 21) {
eng_two_auto_start.stop();
pts.Engines.Engine.state[1].setValue(2);
pts.Controls.Engines.Engine.cutoff[1].setValue(0);
if (lastIgniter[1].getValue() == "B") {
igniterA[1].setValue(1);
igniterB[1].setValue(0);
lastIgniter[1].setValue("A");
} else if (lastIgniter[1].getValue() == "A") {
igniterA[1].setValue(0);
igniterB[1].setValue(1);
lastIgniter[1].setValue("B");
}
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_two_egt_check.start();
eng_two_n2_check.start();
}
});
var eng_two_man_start = maketimer(0.5, func {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 16.7) {
eng_two_man_start.stop();
pts.Engines.Engine.state[1].setValue(2);
pts.Controls.Engines.Engine.cutoff[1].setValue(0);
igniterA[1].setValue(1);
igniterB[1].setValue(1);
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_two_egt_check.start();
eng_two_n2_check.start();
}
});
var eng_two_egt_check = maketimer(0.5, func {
if (pts.Engines.Engine.egtActual[1].getValue() >= egt_start) {
eng_two_egt_check.stop();
interpolate(engines[1].getNode("egt-actual"), egt_min, egt_lightdn_time);
}
});
var eng_two_n2_check = maketimer(0.5, func {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 50.0) {
if (igniterA[1].getValue() != 0) {
igniterA[1].setValue(0);
}
if (igniterB[1].getValue() != 0) {
igniterB[1].setValue(0);
}
}
if (pts.Engines.Engine.n2Actual[1].getValue() >= 57.0) {
eng_two_n2_check.stop();
systems.PNEU.Valves.starter2.setValue(0);
pts.Engines.Engine.state[1].setValue(3);
}
});
# Various Other Stuff
setlistener("/controls/engines/engine-start-switch", func {
if (pts.Engines.Engine.state[0].getValue() == 0) {
start_one_check();
start_one_mancheck();
}
if (pts.Engines.Engine.state[1].getValue() == 0) {
start_two_check();
start_two_mancheck();
}
if ((pts.Controls.Engines.startSw.getValue() == 0) or (pts.Controls.Engines.startSw.getValue() == 1)) {
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
pts.Controls.Engines.Engine.starter[0].setValue(0);
pts.Controls.Engines.Engine.cutoff[0].setValue(1);
systems.PNEU.Valves.starter1.setValue(0);
pts.Engines.Engine.state[0].setValue(0);
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
}
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
pts.Controls.Engines.Engine.starter[1].setValue(0);
pts.Controls.Engines.Engine.cutoff[1].setValue(1);
systems.PNEU.Valves.starter2.setValue(0);
pts.Engines.Engine.state[1].setValue(0);
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
}
}
}, 0, 0);
setlistener("/systems/pneumatics/psi/engine-1-psi", func {
if (systems.PNEU.Psi.engine1.getValue() < 24.5) {
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
pts.Controls.Engines.Engine.starter[0].setValue(0);
pts.Controls.Engines.Engine.cutoff[0].setValue(1);
systems.PNEU.Valves.starter1.setValue(0);
pts.Engines.Engine.state[0].setValue(0);
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
}
}
}, 0, 0);
setlistener("/systems/pneumatics/psi/engine-2-psi", func {
if (systems.PNEU.Psi.engine2.getValue() < 24.5) {
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
pts.Controls.Engines.Engine.starter[1].setValue(0);
pts.Controls.Engines.Engine.cutoff[1].setValue(1);
systems.PNEU.Valves.starter2.setValue(0);
pts.Engines.Engine.state[1].setValue(0);
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
}
}
}, 0, 0);
setlistener("/engines/engine[0]/state", func() {
setprop("/sim/sound/shutdown[0]", pts.Engines.Engine.state[0].getValue());
}, 0, 0);
setlistener("/engines/engine[1]/state", func() {
setprop("/sim/sound/shutdown[1]", pts.Engines.Engine.state[1].getValue());
}, 0, 0);

View file

@ -1,378 +0,0 @@
# A3XX IAE V2500 Engine
# Joshua Davidson (Octal450)
# Copyright (c) 2022 Josh Davidson (Octal450)
#####################
# Initializing Vars #
#####################
var engines = props.globals.getNode("engines").getChildren("engine");
var egt_min = 434;
var egt_start = 587;
var egt_max = 712;
var start_time = 10;
var egt_lightup_time = 4;
var egt_lightdn_time = 10;
var shutdown_time = 20;
var egt_shutdown_time = 20;
var eng_init = func {
eng_common_init();
}
# Trigger Startups and Stops
setlistener("/controls/engines/engine[0]/cutoff-switch", func {
if (!pts.Controls.Engines.Engine.cutoffSw[0].getValue()) {
if (pts.Acconfig.running.getValue()) {
fast_start_one();
} else {
if (!manStart[0].getValue()) {
start_one_check();
} else if (manStart[0].getValue()) {
eng_one_man_start.start();
}
}
} else if (pts.Controls.Engines.Engine.cutoffSw[0].getValue()) {
cutoff_one();
}
}, 0, 0);
var cutoff_one = func {
eng_one_auto_start.stop();
eng_one_man_start.stop();
eng_one_n2_check.stop();
igniterA[0].setValue(0);
igniterB[0].setValue(0);
manStart[0].setValue(0);
systems.PNEU.Valves.starter1.setValue(0);
pts.Controls.Engines.Engine.starter[0].setValue(0);
pts.Controls.Engines.Engine.cutoff[0].setValue(1);
pts.Engines.Engine.state[0].setValue(0);
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
eng_one_n2_check.stop();
}
var fast_start_one = func {
pts.Controls.Engines.Engine.cutoff[0].setValue(0);
setprop("/engines/engine[0]/out-of-fuel", 0);
setprop("/engines/engine[0]/run", 1);
setprop("/engines/engine[0]/cutoff", 0);
setprop("/engines/engine[0]/starter", 0);
setprop("/fdm/jsbsim/propulsion/set-running", 0);
pts.Engines.Engine.state[0].setValue(3);
systems.PNEU.Valves.starter1.setValue(0);
}
setlistener("/controls/engines/engine[0]/man-start", func {
start_one_mancheck();
}, 0, 0);
var start_one_mancheck = func {
if (manStart[0].getValue()) {
if (pts.Controls.Engines.startSw.getValue() == 2 and (pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 1)) {
systems.PNEU.Valves.starter1.setValue(1);
settimer(start_one_mancheck_b, 0.5);
}
} else {
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
systems.PNEU.Valves.starter1.setValue(0);
pts.Engines.Engine.state[0].setValue(0);
pts.Controls.Engines.Engine.starter[0].setValue(0);
}
}
}
var start_one_mancheck_b = func {
if (systems.PNEU.Psi.engine1.getValue() >= 25) {
pts.Engines.Engine.state[0].setValue(1);
pts.Controls.Engines.Engine.starter[0].setValue(1);
}
}
var start_one_check = func {
if (pts.Controls.Engines.startSw.getValue() == 2 and pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) {
systems.PNEU.Valves.starter1.setValue(1);
settimer(start_one_check_b, 0.5);
}
}
var start_one_check_b = func {
if (pts.Controls.Engines.startSw.getValue() == 2 and systems.PNEU.Psi.engine1.getValue() >= 25 and !pts.Controls.Engines.Engine.cutoffSw[0].getValue()) {
auto_start_one();
}
}
setlistener("/controls/engines/engine[1]/cutoff-switch", func {
if (!pts.Controls.Engines.Engine.cutoffSw[1].getValue()) {
if (pts.Acconfig.running.getValue()) {
fast_start_two();
} else {
if (!manStart[1].getValue()) {
start_two_check();
} else if (manStart[1].getValue()) {
eng_two_man_start.start();
}
}
} else if (pts.Controls.Engines.Engine.cutoffSw[1].getValue()) {
cutoff_two();
}
}, 0, 0);
var cutoff_two = func {
eng_two_auto_start.stop();
eng_two_man_start.stop();
eng_two_n2_check.stop();
igniterA[1].setValue(0);
igniterB[1].setValue(0);
manStart[1].setValue(0);
systems.PNEU.Valves.starter2.setValue(0);
pts.Controls.Engines.Engine.starter[1].setValue(0);
pts.Controls.Engines.Engine.cutoff[1].setValue(1);
pts.Engines.Engine.state[1].setValue(0);
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
}
var fast_start_two = func {
pts.Controls.Engines.Engine.cutoff[1].setValue(0);
setprop("/engines/engine[1]/out-of-fuel", 0);
setprop("/engines/engine[1]/run", 1);
setprop("/engines/engine[1]/cutoff", 0);
setprop("/engines/engine[1]/starter", 0);
setprop("/fdm/jsbsim/propulsion/set-running", 1);
pts.Engines.Engine.state[1].setValue(3);
systems.PNEU.Valves.starter2.setValue(0);
}
setlistener("/controls/engines/engine[1]/man-start", func {
start_two_mancheck();
}, 0, 0);
var start_two_mancheck = func {
if (manStart[1].getValue() == 1) {
if (pts.Controls.Engines.startSw.getValue() == 2 and (pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 1)) {
systems.PNEU.Valves.starter2.setValue(1);
settimer(start_two_mancheck_b, 0.5);
}
} else {
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
systems.PNEU.Valves.starter2.setValue(0);
pts.Engines.Engine.state[1].setValue(0);
pts.Controls.Engines.Engine.starter[1].setValue(0);
}
}
}
var start_two_mancheck_b = func {
if (systems.PNEU.Psi.engine1.getValue() >= 25) {
pts.Engines.Engine.state[1].setValue(1);
pts.Controls.Engines.Engine.starter[1].setValue(1);
}
}
var start_two_check = func {
if (pts.Controls.Engines.startSw.getValue() == 2 and pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) {
systems.PNEU.Valves.starter2.setValue(1);
settimer(start_two_check_b, 0.5);
}
}
var start_two_check_b = func {
if (pts.Controls.Engines.startSw.getValue() == 2 and systems.PNEU.Psi.engine2.getValue() >= 25 and !pts.Controls.Engines.Engine.cutoffSw[1].getValue()) {
auto_start_two();
}
}
# Start Engine One
var auto_start_one = func {
pts.Engines.Engine.state[0].setValue(1);
pts.Controls.Engines.Engine.starter[0].setValue(1);
eng_one_auto_start.start();
}
var eng_one_auto_start = maketimer(0.5, func {
if (pts.Engines.Engine.n1Actual[0].getValue() >= 4.7) {
eng_one_auto_start.stop();
pts.Engines.Engine.state[0].setValue(2);
pts.Controls.Engines.Engine.cutoff[0].setValue(0);
if (lastIgniter[0].getValue() == "B") {
igniterA[0].setValue(1);
igniterB[0].setValue(0);
lastIgniter[0].setValue("A");
} else if (lastIgniter[0].getValue() == "A") {
igniterA[0].setValue(0);
igniterB[0].setValue(1);
lastIgniter[0].setValue("B");
}
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_one_egt_check.start();
eng_one_n2_check.start();
}
});
var eng_one_man_start = maketimer(0.5, func {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 16.7) {
eng_one_man_start.stop();
pts.Engines.Engine.state[0].setValue(2);
pts.Controls.Engines.Engine.cutoff[0].setValue(0);
igniterA[0].setValue(1);
igniterB[0].setValue(1);
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_one_egt_check.start();
eng_one_n2_check.start();
}
});
var eng_one_egt_check = maketimer(0.5, func {
if (pts.Engines.Engine.egtActual[0].getValue() >= egt_start) {
eng_one_egt_check.stop();
interpolate(engines[0].getNode("egt-actual"), egt_min, egt_lightdn_time);
}
});
var eng_one_n2_check = maketimer(0.5, func {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 43.0) {
if (igniterA[0].getValue() != 0) {
igniterA[0].setValue(0);
}
if (igniterB[0].getValue() != 0) {
igniterB[0].setValue(0);
}
}
if (pts.Engines.Engine.n2Actual[0].getValue() >= 57.0) {
eng_one_n2_check.stop();
systems.PNEU.Valves.starter1.setValue(0);
pts.Engines.Engine.state[0].setValue(3);
}
});
# Start Engine Two
var auto_start_two = func {
pts.Engines.Engine.state[1].setValue(1);
pts.Controls.Engines.Engine.starter[1].setValue(1);
eng_two_auto_start.start();
}
var eng_two_auto_start = maketimer(0.5, func {
if (pts.Engines.Engine.n1Actual[1].getValue() >= 4.7) {
eng_two_auto_start.stop();
pts.Engines.Engine.state[1].setValue(2);
pts.Controls.Engines.Engine.cutoff[1].setValue(0);
if (lastIgniter[1].getValue() == "B") {
igniterA[1].setValue(1);
igniterB[1].setValue(0);
lastIgniter[1].setValue("A");
} else if (lastIgniter[1].getValue() == "A") {
igniterA[1].setValue(0);
igniterB[1].setValue(1);
lastIgniter[1].setValue("B");
}
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_two_egt_check.start();
eng_two_n2_check.start();
}
});
var eng_two_man_start = maketimer(0.5, func {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 16.7) {
eng_two_man_start.stop();
pts.Engines.Engine.state[1].setValue(2);
pts.Controls.Engines.Engine.cutoff[1].setValue(0);
igniterA[1].setValue(1);
igniterB[1].setValue(1);
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
eng_two_egt_check.start();
eng_two_n2_check.start();
}
});
var eng_two_egt_check = maketimer(0.5, func {
if (pts.Engines.Engine.egtActual[1].getValue() >= egt_start) {
eng_two_egt_check.stop();
interpolate(engines[1].getNode("egt-actual"), egt_min, egt_lightdn_time);
}
});
var eng_two_n2_check = maketimer(0.5, func {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 43.0) {
if (igniterA[1].getValue() != 0) {
igniterA[1].setValue(0);
}
if (igniterB[1].getValue() != 0) {
igniterB[1].setValue(0);
}
}
if (pts.Engines.Engine.n2Actual[1].getValue() >= 57.0) {
eng_two_n2_check.stop();
systems.PNEU.Valves.starter2.setValue(0);
pts.Engines.Engine.state[1].setValue(3);
}
});
# Various Other Stuff
setlistener("/controls/engines/engine-start-switch", func {
if (pts.Engines.Engine.state[0].getValue() == 0) {
start_one_check();
start_one_mancheck();
}
if (pts.Engines.Engine.state[1].getValue() == 0) {
start_two_check();
start_two_mancheck();
}
if ((pts.Controls.Engines.startSw.getValue() == 0) or (pts.Controls.Engines.startSw.getValue() == 1)) {
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
pts.Controls.Engines.Engine.starter[0].setValue(0);
pts.Controls.Engines.Engine.cutoff[0].setValue(1);
systems.PNEU.Valves.starter1.setValue(0);
pts.Engines.Engine.state[0].setValue(0);
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
}
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
pts.Controls.Engines.Engine.starter[1].setValue(0);
pts.Controls.Engines.Engine.cutoff[1].setValue(1);
systems.PNEU.Valves.starter2.setValue(0);
pts.Engines.Engine.state[1].setValue(0);
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
}
}
}, 0, 0);
setlistener("/systems/pneumatics/psi/engine-1-psi", func {
if (systems.PNEU.Psi.engine1.getValue() < 24.5) {
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
pts.Controls.Engines.Engine.starter[0].setValue(0);
pts.Controls.Engines.Engine.cutoff[0].setValue(1);
systems.PNEU.Valves.starter1.setValue(0);
pts.Engines.Engine.state[0].setValue(0);
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
}
}
}, 0, 0);
setlistener("/systems/pneumatics/psi/engine-2-psi", func {
if (systems.PNEU.Psi.engine2.getValue() < 24.5) {
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
pts.Controls.Engines.Engine.starter[1].setValue(0);
pts.Controls.Engines.Engine.cutoff[1].setValue(1);
systems.PNEU.Valves.starter2.setValue(0);
pts.Engines.Engine.state[1].setValue(0);
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
}
}
}, 0, 0);
setlistener("/engines/engine[0]/state", func() {
setprop("/sim/sound/shutdown[0]", pts.Engines.Engine.state[0].getValue());
}, 0, 0);
setlistener("/engines/engine[1]/state", func() {
setprop("/sim/sound/shutdown[1]", pts.Engines.Engine.state[1].getValue());
}, 0, 0);

View file

@ -1,32 +1,57 @@
# A3XX Engine Control
# Copyright (c) 2022 Josh Davidson (Octal450)
var manStart = [props.globals.initNode("/controls/engines/engine[0]/man-start", 0, "BOOL"),props.globals.initNode("/controls/engines/engine[1]/man-start", 0, "BOOL")];
var lastIgniter = [props.globals.getNode("/controls/engines/engine[0]/last-igniter"),props.globals.initNode("/controls/engines/engine[1]/last-igniter")];
var igniterA = [props.globals.initNode("/controls/engines/engine[0]/igniter-a", 0, "BOOL"),props.globals.initNode("/controls/engines/engine[1]/igniter-a", 0, "BOOL")];
var igniterB = [props.globals.initNode("/controls/engines/engine[0]/igniter-b", 0, "BOOL"),props.globals.initNode("/controls/engines/engine[1]/igniter-b", 0, "BOOL")];
if (pts.Options.eng.getValue() == "IAE") {
io.include("engines-iae.nas");
} else {
io.include("engines-cfm.nas");
}
var eng_common_init = func {
manStart[0].setValue(0);
manStart[1].setValue(0);
}
var ENGINE = {
cutoffSwitch: [props.globals.getNode("/controls/engines/engine[0]/cutoff-switch"), props.globals.getNode("/controls/engines/engine[1]/cutoff-switch")],
manStart: [props.globals.getNode("/controls/engines/engine[0]/start-switch"), props.globals.getNode("/controls/engines/engine[1]/start-switch")],
reverseLever: [props.globals.getNode("/controls/engines/engine[0]/reverse-lever"), props.globals.getNode("/controls/engines/engine[1]/reverse-lever")],
reverseLeverTemp: [0, 0],
throttle: [props.globals.getNode("/controls/engines/engine[0]/throttle"), props.globals.getNode("/controls/engines/engine[1]/throttle")],
init: func() {
me.manStart[0].setBoolValue(0);
me.manStart[1].setBoolValue(0);
me.reverseLever[0].setBoolValue(0);
me.reverseLever[1].setBoolValue(0);
},
};
var IGNITION = {
autoStart: [props.globals.getNode("/systems/ignition/auto-start-1"), props.globals.getNode("/systems/ignition/auto-start-2")],
igniterSelectTemp: [0, 0],
startSw: props.globals.getNode("/controls/ignition/start-sw"),
init: func() {
me.startSw.setValue(1);
},
fastStart: func(n) {
ENGINE.cutoffSwitch[n].setBoolValue(0);
pts.Fdm.JSBsim.Propulsion.setRunning.setValue(n);
},
updateigniterSelect: func(n) {
if (me.autoStart[n].getBoolValue()) {
me.igniterSelectTemp[n] = pts.Systems.Acconfig.Options.igniterSelect[n].getValue();
if (me.igniterSelectTemp[n] == 1) {
pts.Systems.Acconfig.Options.igniterSelect[n].setValue(0);
} else {
pts.Systems.Acconfig.Options.igniterSelect[n].setValue(me.igniterSelectTemp[n] + 1);
}
acconfig.writeSettings();
}
},
};
setlistener("/engines/engine[0]/state", func() {
if (pts.Engines.Engine.state[0].getValue() == 1) {
IGNITION.updateigniterSelect(0);
}
}, 0, 0);
setlistener("/engines/engine[1]/state", func() {
if (pts.Engines.Engine.state[1].getValue() == 1) {
IGNITION.updateigniterSelect(1);
}
}, 0, 0);
# Engine Sim Control Stuff
var doIdleThrust = func {
# Idle does not respect selected engines, because it is used to respond
@ -77,8 +102,8 @@ var doRevThrust = func() {
ENGINE.reverseLever[0].setValue(0.75);
ENGINE.reverseLever[1].setValue(0.75);
} else if (ENGINE.reverseLeverTemp[0] < 1.0) {
ENGINE.reverseLever[0].setValue(1.0);
ENGINE.reverseLever[1].setValue(1.0);
ENGINE.reverseLever[0].setValue(1);
ENGINE.reverseLever[1].setValue(1);
}
ENGINE.throttle[0].setValue(0);
ENGINE.throttle[1].setValue(0);

View file

@ -119,7 +119,7 @@ var FADEC_S = {
state1 = pts.Engines.Engine.state[0].getValue();
state2 = pts.Engines.Engine.state[1].getValue();
modeSel = pts.Controls.Engines.startSw.getValue();
modeSel = systems.IGNITION.startSw.getValue();
if (state1 == 3) {
me.Power.powered1.setValue(1);

View file

@ -119,7 +119,7 @@ var FADEC_S = {
state1 = pts.Engines.Engine.state[0].getValue();
state2 = pts.Engines.Engine.state[1].getValue();
modeSel = pts.Controls.Engines.startSw.getValue();
modeSel = systems.IGNITION.startSw.getValue();
if (state1 == 3) {
me.Power.powered1.setValue(1);

View file

@ -84,13 +84,13 @@ For the FO Sidestick, use `side=2`
<repeatable type="string">false</repeatable>
<binding>
<command>property-assign</command>
<property>controls/engines/engine-start-switch</property>
<property>controls/ignition/start-sw</property>
<value>0</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>controls/engines/engine-start-switch</property>
<property>controls/ignition/start-sw</property>
<value>1</value>
</binding>
</mod-up>
@ -100,13 +100,13 @@ For the FO Sidestick, use `side=2`
<repeatable type="string">false</repeatable>
<binding>
<command>property-assign</command>
<property>controls/engines/engine-start-switch</property>
<property>controls/ignition/start-sw</property>
<value>2</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>controls/engines/engine-start-switch</property>
<property>controls/ignition/start-sw</property>
<value>1</value>
</binding>
</mod-up>

View file

@ -37,8 +37,8 @@
<c1>12</c1>
</lag_filter>
<lag_filter name="/controls/engines/engine-start-switch-knob">
<input>/controls/engines/engine-start-switch</input>
<lag_filter name="/controls/ignition/start-sw-knob">
<input>/controls/ignition/start-sw</input>
<c1>20</c1>
</lag_filter>

View file

@ -277,7 +277,7 @@
<default value="0"/>
<test logic="AND" value="1">
/controls/engines/engine[0]/fire-btn eq 0
/controls/engines/engine[0]/cutoff-switch eq 0
/engines/engine[0]/state ge 1
</test>
</switch>
@ -298,7 +298,7 @@
<default value="0"/>
<test logic="AND" value="1">
/controls/engines/engine[1]/fire-btn eq 0
/controls/engines/engine[1]/cutoff-switch eq 0
/engines/engine[1]/state ge 1
</test>
</switch>
@ -552,32 +552,6 @@
</test>
</switch>
<switch name="rubbish/pipes-unusable-volume-1">
<default value="0"/>
<test logic="AND" value="1.5">
/systems/acconfig/autoconfig-running eq 0
/systems/fuel/valves/engine-1-lp-valve eq 0
</test>
<output>propulsion/tank[5]/unusable-volume-gal</output>
</switch>
<switch name="rubbish/pipes-unusable-volume-2">
<default value="0"/>
<test logic="AND" value="1.5">
/systems/acconfig/autoconfig-running eq 0
/systems/fuel/valves/engine-2-lp-valve eq 0
</test>
<output>propulsion/tank[6]/unusable-volume-gal</output>
</switch>
<switch name="rubbish/pipes-unusable-volume-apu">
<default value="0"/>
<test logic="AND" value="1.5">
/systems/acconfig/autoconfig-running eq 0
/systems/fuel/valves/apu-lp-valve eq 0
</test>
<output>propulsion/tank[7]/unusable-volume-gal</output>
</switch>
<!-- Feed system -->
<switch name="/systems/fuel/internal/apu-source"> <!-- this only when all pumps off -->

View file

@ -1121,7 +1121,7 @@
<switch name="/ECAM/warnings/logic/cranking-35-sec-input">
<default value="0"/>
<test value="1">
/controls/engines/engine-start-switch eq 0
/controls/ignition/start-sw eq 0
</test>
</switch>
@ -1129,7 +1129,7 @@
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/controls/engines/engine-start-switch eq 0
/controls/ignition/start-sw eq 0
/ECAM/warnings/timer/cranking-35-sec eq 1
</test>
/controls/pneumatics/switches/pack-1 eq 1
@ -1143,7 +1143,7 @@
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/controls/engines/engine-start-switch eq 0
/controls/ignition/start-sw eq 0
/ECAM/warnings/timer/cranking-35-sec eq 1
</test>
/controls/pneumatics/switches/pack-2 eq 1
@ -1174,7 +1174,7 @@
<test logic="OR" value="1">
/systems/pneumatics/valves/starter-valve-1 ne 0
/systems/pneumatics/valves/starter-valve-2 ne 0
/controls/engines/engine-start-switch eq 2
/controls/ignition/start-sw eq 2
/engines/engine[0]/state eq 1
/engines/engine[0]/state eq 2
/engines/engine[1]/state eq 1

414
Systems/a320-ignition.xml Normal file
View file

@ -0,0 +1,414 @@
<?xml version="1.0"?>
<!-- Airbus A320 Ignition -->
<!-- Copyright (c) 2022 Josh Davidson (Octal450) -->
<system name="A320: Ignition">
<channel name="Ignition" execrate="8">
<switch name="/systems/ignition/ign-1/ign-a">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR"> <!-- Priority Stat Inv -->
/systems/electrical/sources/si-1/output-volt ge 110
/systems/electrical/bus/ac-ess ge 110
</test>
/controls/ignition/start-sw eq 2
</test>
</switch>
<switch name="/systems/ignition/ign-1/ign-b">
<default value="0"/>
<test logic="AND" value="1">
/systems/electrical/bus/ac-1 ge 110
/controls/ignition/start-sw eq 2
</test>
</switch>
<switch name="/systems/ignition/ign-1/ign-avail">
<default value="0"/>
<test logic="OR" value="1">
/systems/ignition/ign-1/ign-a eq 1
/systems/ignition/ign-1/ign-b eq 1
</test>
</switch>
<switch name="/systems/ignition/ign-2/ign-a">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR"> <!-- Priority Stat Inv -->
/systems/electrical/sources/si-1/output-volt ge 110
/systems/electrical/bus/ac-ess ge 110
</test>
/controls/ignition/start-sw eq 2
</test>
</switch>
<switch name="/systems/ignition/ign-2/ign-b">
<default value="0"/>
<test logic="AND" value="1">
/systems/electrical/bus/ac-2 ge 110
/controls/ignition/start-sw eq 2
</test>
</switch>
<switch name="/systems/ignition/ign-2/ign-avail">
<default value="0"/>
<test logic="OR" value="1">
/systems/ignition/ign-2/ign-a eq 1
/systems/ignition/ign-2/ign-b eq 1
</test>
</switch>
</channel>
<channel name="Engine Start/Stop"> <!-- Do NOT execrate! -->
<!-- Engine 1 -->
<switch name="/systems/ignition/cutoff-1">
<default value="1"/>
<test logic="AND" value="0">
/controls/engines/engine[0]/cutoff-switch eq 0
propulsion/tank[5]/contents-lbs ge 1
</test>
</switch>
<switch name="/systems/ignition/can-start-1">
<default value="1"/>
<test logic="OR" value="0">
/systems/pneumatics/psi/engine-1-psi lt 20
/engines/engine[0]/n2-actual ge /systems/ignition/starter-cutoff-n2
/systems/ignition/ign-1/ign-avail ne 1
</test>
<test logic="AND" value="0"> <!-- So that starting is aborting if cutoff placed to off -->
/systems/ignition/cutoff-1 eq 1
/engines/engine[0]/state ge 2
</test>
</switch>
<switch name="/systems/ignition/auto-start-1">
<default value="0"/>
<test logic="AND" value="1">
/systems/ignition/can-start-1 eq 1
/systems/ignition/cutoff-1 eq 0
/controls/engines/engine[0]/start-switch eq 0
</test>
</switch>
<switch name="/systems/ignition/start-switch-1">
<default value="/controls/engines/engine[0]/start-switch"/>
<test logic="OR" value="0">
/systems/ignition/can-start-1 eq 0
/systems/ignition/auto-start-1 eq 1
</test>
<output>/controls/engines/engine[0]/start-switch</output>
</switch>
<switch name="/systems/ignition/start-valve-1-cmd">
<default value="0"/>
<test logic="OR" value="1">
/systems/ignition/auto-start-1 eq 1
/systems/ignition/start-switch-1 eq 1
</test>
</switch>
<actuator name="/systems/ignition/start-valve-1">
<input>/systems/ignition/start-valve-1-cmd</input>
<rate_limit sense="incr">1</rate_limit>
<rate_limit sense="decr">1000</rate_limit>
</actuator>
<switch name="/systems/ignition/starter-1">
<default value="0"/>
<test value="1">
/systems/ignition/start-valve-1 eq 1
</test>
<output>/systems/pneumatics/valves/starter-valve-1</output>
</switch>
<switch name="/systems/ignition/cutoff-delay-cmd-1">
<default value="0"/>
<test logic="AND" value="1">
/systems/ignition/starter-1 eq 1
/engines/engine[0]/n2-actual ge /systems/ignition/starter-engage-n2
</test>
</switch>
<switch name="/systems/ignition/cutoff-delay-rate-1">
<default value="1000"/>
<test value="1"> <!-- There's a delay -->
/systems/ignition/start-switch-1 eq 1
</test>
<test value="0.45"> <!-- JSBsim sequencing fix + there's a delay -->
/systems/ignition/auto-start-1 eq 1
</test>
</switch>
<actuator name="/systems/ignition/cutoff-delay-1">
<input>/systems/ignition/cutoff-delay-cmd-1</input>
<rate_limit sense="incr">/systems/ignition/cutoff-delay-rate-1</rate_limit>
<rate_limit sense="decr">1000</rate_limit>
</actuator>
<switch name="/systems/ignition/starter-jsb-1">
<default value="/systems/ignition/start-valve-1"/>
<test logic="AND" value="1"> <!-- Because JSBsim will kill the engine if we cut out early -->
/engines/engine[0]/n2-actual ge /systems/ignition/starter-cutoff-n2
/systems/ignition/cutoff-1 eq 0
</test>
</switch>
<switch name="/systems/ignition/cutoff-jsb-1">
<default value="/systems/ignition/cutoff-1"/>
<test logic="AND" value="1">
/systems/ignition/auto-start-1 eq 1
/systems/ignition/cutoff-delay-1 lt 1
</test>
</switch>
<switch name="/systems/ignition/state-1">
<default value="0"/>
<test logic="AND" value="3">
/systems/ignition/cutoff-jsb-1 eq 0
/engines/engine[0]/n2-actual ge 58
</test>
<test logic="AND" value="2">
/systems/ignition/cutoff-jsb-1 eq 0
/systems/ignition/starter-jsb-1 eq 1
</test>
<test value="1">
/systems/ignition/starter-jsb-1 eq 1
</test>
<output>/engines/engine[0]/state</output>
</switch>
<!-- Engine 2 -->
<switch name="/systems/ignition/cutoff-2">
<default value="1"/>
<test logic="AND" value="0">
/controls/engines/engine[1]/cutoff-switch eq 0
propulsion/tank[5]/contents-lbs ge 1
</test>
</switch>
<switch name="/systems/ignition/can-start-2">
<default value="1"/>
<test logic="OR" value="0">
/systems/pneumatics/psi/engine-2-psi lt 20
/engines/engine[1]/n2-actual ge /systems/ignition/starter-cutoff-n2
/systems/ignition/ign-2/ign-avail ne 1
</test>
<test logic="AND" value="0"> <!-- So that starting is aborting if cutoff placed to off -->
/systems/ignition/cutoff-2 eq 1
/engines/engine[1]/state ge 2
</test>
</switch>
<switch name="/systems/ignition/auto-start-2">
<default value="0"/>
<test logic="AND" value="1">
/systems/ignition/can-start-2 eq 1
/systems/ignition/cutoff-2 eq 0
/controls/engines/engine[1]/start-switch eq 0
</test>
</switch>
<switch name="/systems/ignition/start-switch-2">
<default value="/controls/engines/engine[1]/start-switch"/>
<test logic="OR" value="0">
/systems/ignition/can-start-2 eq 0
/systems/ignition/auto-start-2 eq 1
</test>
<output>/controls/engines/engine[1]/start-switch</output>
</switch>
<switch name="/systems/ignition/start-valve-2-cmd">
<default value="0"/>
<test logic="OR" value="1">
/systems/ignition/auto-start-2 eq 1
/systems/ignition/start-switch-2 eq 1
</test>
</switch>
<actuator name="/systems/ignition/start-valve-2">
<input>/systems/ignition/start-valve-2-cmd</input>
<rate_limit sense="incr">1</rate_limit>
<rate_limit sense="decr">1000</rate_limit>
</actuator>
<switch name="/systems/ignition/starter-2">
<default value="0"/>
<test value="1">
/systems/ignition/start-valve-2 eq 1
</test>
<output>/systems/pneumatics/valves/starter-valve-2</output>
</switch>
<switch name="/systems/ignition/cutoff-delay-cmd-2">
<default value="0"/>
<test logic="AND" value="1">
/systems/ignition/starter-2 eq 1
/engines/engine[1]/n2-actual ge /systems/ignition/starter-engage-n2
</test>
</switch>
<switch name="/systems/ignition/cutoff-delay-rate-2">
<default value="1000"/>
<test value="1"> <!-- There's a delay -->
/systems/ignition/start-switch-2 eq 1
</test>
<test value="0.45"> <!-- JSBsim sequencing fix + there's a delay -->
/systems/ignition/auto-start-2 eq 1
</test>
</switch>
<actuator name="/systems/ignition/cutoff-delay-2">
<input>/systems/ignition/cutoff-delay-cmd-2</input>
<rate_limit sense="incr">/systems/ignition/cutoff-delay-rate-2</rate_limit>
<rate_limit sense="decr">1000</rate_limit>
</actuator>
<switch name="/systems/ignition/starter-jsb-2">
<default value="/systems/ignition/start-valve-2"/>
<test logic="AND" value="1"> <!-- Because JSBsim will kill the engine if we cut out early -->
/engines/engine[1]/n2-actual ge /systems/ignition/starter-cutoff-n2
/systems/ignition/cutoff-2 eq 0
</test>
</switch>
<switch name="/systems/ignition/cutoff-jsb-2">
<default value="/systems/ignition/cutoff-2"/>
<test logic="AND" value="1">
/systems/ignition/auto-start-2 eq 1
/systems/ignition/cutoff-delay-2 lt 1
</test>
</switch>
<switch name="/systems/ignition/state-2">
<default value="0"/>
<test logic="AND" value="3">
/systems/ignition/cutoff-jsb-2 eq 0
/engines/engine[1]/n2-actual ge 58
</test>
<test logic="AND" value="2">
/systems/ignition/cutoff-jsb-2 eq 0
/systems/ignition/starter-jsb-2 eq 1
</test>
<test value="1">
/systems/ignition/starter-jsb-2 eq 1
</test>
<output>/engines/engine[1]/state</output>
</switch>
</channel>
<channel name="Ignition 2" execrate="8">
<switch name="/systems/ignition/ign-1/igniter-a">
<default value="0"/>
<test value="0">
/systems/ignition/ign-1/ign-avail eq 0
</test>
<test logic="AND" value="1">
/systems/ignition/state-1 eq 3
/controls/ignition/start-sw eq 2
position/wow eq 0
</test>
<test logic="AND" value="1">
/systems/ignition/state-1 eq 2
<test logic="OR">
position/wow eq 0
/systems/ignition/auto-start-1 eq 0
</test>
</test>
<test logic="AND" value="1">
/systems/ignition/state-1 eq 2
<test logic="OR"> <!-- FADEC A Igniter A and FADEC B Igniter A -->
/systems/acconfig/options/igniter-select-1 eq 0
/systems/acconfig/options/igniter-select-1 eq 1
</test>
</test>
</switch>
<switch name="/systems/ignition/ign-1/igniter-b">
<default value="0"/>
<test value="0">
/systems/ignition/ign-1/ign-avail eq 0
</test>
<test logic="AND" value="1">
/systems/ignition/state-1 eq 3
/controls/ignition/start-sw eq 2
position/wow eq 0
</test>
<test logic="AND" value="1">
/systems/ignition/state-1 eq 2
<test logic="OR">
position/wow eq 0
/systems/ignition/auto-start-1 eq 0
</test>
</test>
<test logic="AND" value="1">
/systems/ignition/state-1 eq 2
<test logic="OR"> <!-- FADEC A Igniter B and FADEC B Igniter B -->
/systems/acconfig/options/igniter-select-1 eq 2
/systems/acconfig/options/igniter-select-1 eq 3
</test>
</test>
</switch>
<switch name="/systems/ignition/ign-2/igniter-a">
<default value="0"/>
<test value="0">
/systems/ignition/ign-2/ign-avail eq 0
</test>
<test logic="AND" value="1">
/systems/ignition/state-2 eq 3
/controls/ignition/start-sw eq 2
position/wow eq 0
</test>
<test logic="AND" value="1">
/systems/ignition/state-2 eq 2
<test logic="OR">
position/wow eq 0
/systems/ignition/auto-start-2 eq 0
</test>
</test>
<test logic="AND" value="1">
/systems/ignition/state-2 eq 2
<test logic="OR"> <!-- FADEC A Igniter A and FADEC B Igniter A -->
/systems/acconfig/options/igniter-select-2 eq 0
/systems/acconfig/options/igniter-select-2 eq 1
</test>
</test>
</switch>
<switch name="/systems/ignition/ign-2/igniter-b">
<default value="0"/>
<test value="0">
/systems/ignition/ign-2/ign-avail eq 0
</test>
<test logic="AND" value="1">
/systems/ignition/state-2 eq 3
/controls/ignition/start-sw eq 2
position/wow eq 0
</test>
<test logic="AND" value="1">
/systems/ignition/state-2 eq 2
<test logic="OR">
position/wow eq 0
/systems/ignition/auto-start-2 eq 0
</test>
</test>
<test logic="AND" value="1">
/systems/ignition/state-2 eq 2
<test logic="OR"> <!-- FADEC A Igniter B and FADEC B Igniter B -->
/systems/acconfig/options/igniter-select-2 eq 2
/systems/acconfig/options/igniter-select-2 eq 3
</test>
</test>
</switch>
</channel>
</system>

View file

@ -5,6 +5,47 @@
<PropertyList>
<!-- Logic -->
<logic>
<input>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd2</property>
<value>1</value>
</equals>
</or>
</input>
<output>/it-autoflight/output/apfd-on</output>
</logic>
<logic>
<input>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
</or>
</input>
<output>/it-autoflight/output/ap-on</output>
</logic>
<!-- Predictors -->
<predict-simple>
<name>IAS 5 Second Predictor</name>
@ -288,24 +329,7 @@
<value>7</value>
</equals>
</or>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd2</property>
<value>1</value>
</equals>
</or>
<property>/it-autoflight/output/apfd-on</property>
<equals>
<property>/gear/gear[1]/wow</property>
<value>0</value>
@ -489,201 +513,6 @@
<output>/it-autoflight/input/vs</output>
</filter>
<filter>
<name>Vertical Speed VMO Protection</name>
<type>gain</type>
<input>
<expression>
<div>
<product>
<property>/instrumentation/airspeed-indicator/true-speed-kt</property>
<value>101.26859142607174</value> <!-- FPM to Knot -->
<dif>
<product>
<property>/fdm/jsbsim/forces/fbx-prop-lbs</property>
<cos>
<property>/fdm/jsbsim/aero/alpha-rad</property>
</cos>
</product>
<product>
<property>/fdm/jsbsim/forces/fwx-aero-lbs</property>
<sum>
<value>1</value>
<product>
<property>/it-autoflight/internal/vmo-mmo-error</property>
<value>-0.1</value>
</product>
</sum>
</product>
</dif>
</product>
<property>/fdm/jsbsim/inertia/weight-lbs</property>
</div>
</expression>
</input>
<output>/it-autoflight/internal/overspeed-vs</output>
<min>-6000</min>
<max>6000</max>
</filter>
<filter>
<name>Vertical Speed VLS Protection</name>
<type>gain</type>
<input>
<expression>
<div>
<product>
<property>/instrumentation/airspeed-indicator/true-speed-kt</property>
<value>101.26859142607174</value> <!-- FPM to Knot -->
<dif>
<product>
<property>/fdm/jsbsim/forces/fbx-prop-lbs</property>
<cos>
<property>/fdm/jsbsim/aero/alpha-rad</property>
</cos>
</product>
<product>
<property>/fdm/jsbsim/forces/fwx-aero-lbs</property>
<sum>
<value>1</value>
<product>
<property>/it-autoflight/internal/vls-error</property>
<value>-0.1</value>
</product>
</sum>
</product>
</dif>
</product>
<property>/fdm/jsbsim/inertia/weight-lbs</property>
</div>
</expression>
</input>
<output>/it-autoflight/internal/underspeed-vs</output>
<min>-6000</min>
<max>6000</max>
</filter>
<logic>
<input>
<and>
<greater-than>
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
<property>/FMGC/internal/vmo-mmo-minus-5</property>
</greater-than>
<or>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>1</value>
</equals>
<greater-than>
<property>/it-autoflight/internal/overspeed-vs</property>
<property>/it-autoflight/input/vs</property>
</greater-than>
</and>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>5</value>
</equals>
<greater-than>
<property>/it-autoflight/internal/overspeed-vs</property>
<property>/it-autoflight/internal/target-fpm-fpa-raw</property>
</greater-than>
</and>
</or>
</and>
</input>
<output>/it-autoflight/internal/overspeed-vs-prot</output>
</logic>
<logic>
<input>
<and>
<less-than>
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
<property>/FMGC/internal/vls-switched-plus-5</property>
</less-than>
<or>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>1</value>
</equals>
<less-than>
<property>/it-autoflight/internal/underspeed-vs</property>
<property>/it-autoflight/input/vs</property>
</less-than>
</and>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>5</value>
</equals>
<less-than>
<property>/it-autoflight/internal/underspeed-vs</property>
<property>/it-autoflight/internal/target-fpm-fpa-raw</property>
</less-than>
</and>
</or>
</and>
</input>
<output>/it-autoflight/internal/underspeed-vs-prot</output>
</logic>
<filter>
<name>Vertical Speed Filter</name>
<type>noise-spike</type>
<feedback-if-disabled>true</feedback-if-disabled>
<initialize-to>output</initialize-to>
<input>
<condition>
<property>/it-autoflight/internal/overspeed-vs-prot</property>
</condition>
<property>/it-autoflight/internal/overspeed-vs</property>
</input>
<input>
<condition>
<property>/it-autoflight/internal/underspeed-vs-prot</property>
</condition>
<property>/it-autoflight/internal/underspeed-vs</property>
</input>
<input>/it-autoflight/input/vs</input>
<output>/it-autoflight/internal/vs</output>
<max-rate-of-change>
<condition>
<and>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
</or>
<not><property>/it-autoflight/internal/overspeed-vs-prot</property></not>
<not><property>/it-autoflight/internal/underspeed-vs-prot</property></not>
<equals>
<property>/it-autoflight/output/vert</property>
<value>1</value>
</equals>
<equals>
<property>/gear/gear[1]/wow</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>0</value>
</equals>
</and>
</condition>
<value>300</value>
</max-rate-of-change>
<max-rate-of-change>2000</max-rate-of-change>
</filter>
<filter>
<name>VS Abs</name>
<type>gain</type>
@ -1069,7 +898,7 @@
<property>/FMGC/internal/accel-agl-ft</property>
</expression>
</input>
<output>/it-autoflight/settings/accel-agl-ft</output>
<output>/it-autoflight/settings/accel-ft</output>
</filter>
</PropertyList>

View file

@ -24,9 +24,216 @@
<max>/it-autoflight/internal/max-vs</max>
</filter>
<filter>
<name>Vertical Speed VMO Protection</name>
<type>gain</type>
<input>
<expression>
<div>
<product>
<property>/instrumentation/airspeed-indicator/true-speed-kt</property>
<value>101.26859142607174</value> <!-- FPM to Knot -->
<dif>
<product>
<property>/fdm/jsbsim/forces/fbx-prop-lbs</property>
<cos>
<property>/fdm/jsbsim/aero/alpha-rad</property>
</cos>
</product>
<product>
<property>/fdm/jsbsim/forces/fwx-aero-lbs</property>
<sum>
<value>1</value>
<product>
<property>/it-autoflight/internal/vmo-mmo-error</property>
<value>-0.1</value>
</product>
</sum>
</product>
</dif>
</product>
<property>/fdm/jsbsim/inertia/weight-lbs</property>
</div>
</expression>
</input>
<output>/it-autoflight/internal/overspeed-vs</output>
<min>-6000</min>
<max>6000</max>
</filter>
<filter>
<name>Vertical Speed VLS Protection</name>
<type>gain</type>
<input>
<expression>
<div>
<product>
<property>/instrumentation/airspeed-indicator/true-speed-kt</property>
<value>101.26859142607174</value> <!-- FPM to Knot -->
<dif>
<product>
<property>/fdm/jsbsim/forces/fbx-prop-lbs</property>
<cos>
<property>/fdm/jsbsim/aero/alpha-rad</property>
</cos>
</product>
<product>
<property>/fdm/jsbsim/forces/fwx-aero-lbs</property>
<sum>
<value>1</value>
<product>
<property>/it-autoflight/internal/vls-error</property>
<value>-0.1</value>
</product>
</sum>
</product>
</dif>
</product>
<property>/fdm/jsbsim/inertia/weight-lbs</property>
</div>
</expression>
</input>
<output>/it-autoflight/internal/underspeed-vs</output>
<min>-6000</min>
<max>6000</max>
</filter>
<logic>
<input>
<and>
<greater-than>
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
<property>/FMGC/internal/vmo-mmo-minus-5</property>
</greater-than>
<or>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>1</value>
</equals>
<greater-than>
<property>/it-autoflight/internal/overspeed-vs</property>
<property>/it-autoflight/input/vs</property>
</greater-than>
</and>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>5</value>
</equals>
<greater-than>
<property>/it-autoflight/internal/overspeed-vs</property>
<property>/it-autoflight/internal/target-fpm-fpa-raw</property>
</greater-than>
</and>
</or>
</and>
</input>
<output>/it-autoflight/internal/overspeed-vs-prot</output>
</logic>
<logic>
<input>
<and>
<less-than>
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
<property>/FMGC/internal/vls-switched-plus-5</property>
</less-than>
<or>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>1</value>
</equals>
<less-than>
<property>/it-autoflight/internal/underspeed-vs</property>
<property>/it-autoflight/input/vs</property>
</less-than>
</and>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>5</value>
</equals>
<less-than>
<property>/it-autoflight/internal/underspeed-vs</property>
<property>/it-autoflight/internal/target-fpm-fpa-raw</property>
</less-than>
</and>
</or>
</and>
</input>
<output>/it-autoflight/internal/underspeed-vs-prot</output>
</logic>
<filter>
<name>Vertical Speed FPM Filter</name>
<type>noise-spike</type>
<input>
<condition>
<not>
<and>
<property>/it-autoflight/output/ap-on</property>
<equals>
<property>/it-autoflight/output/vert</property>
<value>1</value>
</equals>
<equals>
<property>/gear/gear[1]/wow</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>0</value>
</equals>
</and>
</not>
</condition>
<property>/it-autoflight/internal/vert-speed-fpm</property>
</input>
<input>
<condition>
<property>/it-autoflight/internal/overspeed-vs-prot</property>
</condition>
<property>/it-autoflight/internal/overspeed-vs</property>
</input>
<input>
<condition>
<property>/it-autoflight/internal/underspeed-vs-prot</property>
</condition>
<property>/it-autoflight/internal/underspeed-vs</property>
</input>
<input>/it-autoflight/input/vs</input>
<output>/it-autoflight/internal/target-fpm-vs</output>
<max-rate-of-change>
<condition>
<and>
<property>/it-autoflight/output/ap-on</property>
<not><property>/it-autoflight/internal/overspeed-vs-prot</property></not>
<not><property>/it-autoflight/internal/underspeed-vs-prot</property></not>
<equals>
<property>/it-autoflight/output/vert</property>
<value>1</value>
</equals>
<equals>
<property>/gear/gear[1]/wow</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>0</value>
</equals>
</and>
</condition>
<value>300</value>
</max-rate-of-change>
<max-rate-of-change>10000</max-rate-of-change>
</filter>
<logic>
<input>
<and>
<property>/it-autoflight/output/apfd-on</property>
<or>
<equals>
<property>/it-autoflight/output/vert</property>
@ -37,24 +244,6 @@
<value>7</value>
</equals>
</or>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd2</property>
<value>1</value>
</equals>
</or>
</and>
</input>
<output>/it-autoflight/internal/flch-active</output>
@ -181,28 +370,11 @@
<logic>
<input>
<and>
<property>/it-autoflight/output/apfd-on</property>
<equals>
<property>/it-autoflight/output/vert</property>
<value>5</value>
</equals>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd2</property>
<value>1</value>
</equals>
</or>
</and>
</input>
<output>/it-autoflight/internal/fpa-active</output>
@ -385,7 +557,7 @@
<property>/it-autoflight/internal/underspeed-vs</property>
</input>
<input>/it-autoflight/input/vs</input>
<output>/it-autoflight/internal/vs-fd</output>
<output>/it-autoflight/internal/target-fpm-vs-fd</output>
</filter>
<filter>
@ -404,8 +576,8 @@
</condition>
<property>/it-autoflight/internal/underspeed-vs</property>
</input>
<input>/it-autoflight/internal/target-fpm-fpa-raw</input>
<output>/it-autoflight/internal/fpa-fd</output>
<input>/it-autoflight/internal/target-fpm-fpa</input>
<output>/it-autoflight/internal/target-fpm-fpa-fd</output>
</filter>
<filter>
@ -428,7 +600,7 @@
<value>1</value>
</equals>
</condition>
<property>/it-autoflight/internal/vs-fd</property>
<property>/it-autoflight/internal/target-fpm-vs-fd</property>
</input>
<input>
<condition>
@ -461,7 +633,7 @@
<value>5</value>
</equals>
</condition>
<property>/it-autoflight/internal/fpa-fd</property>
<property>/it-autoflight/internal/target-fpm-fpa-fd</property>
</input>
<input>
<condition>
@ -489,6 +661,7 @@
<enable>
<condition>
<and>
<property>/it-autoflight/output/ap-on</property>
<equals>
<property>/gear/gear[1]/wow</property>
<value>0</value>
@ -497,16 +670,6 @@
<property>/gear/gear[2]/wow</property>
<value>0</value>
</equals>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
</or>
<not-equals>
<property>/it-autoflight/output/vert</property>
<value>9</value>
@ -522,7 +685,7 @@
<value>1</value>
</equals>
</condition>
<property>/it-autoflight/internal/vs</property>
<property>/it-autoflight/internal/target-fpm-vs</property>
</reference>
<reference>
<condition>
@ -645,6 +808,7 @@
<condition>
<not>
<and>
<property>/it-autoflight/output/ap-on</property>
<equals>
<property>/gear/gear[1]/wow</property>
<value>0</value>
@ -653,16 +817,6 @@
<property>/gear/gear[2]/wow</property>
<value>0</value>
</equals>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
</or>
<not-equals>
<property>/it-autoflight/output/vert</property>
<value>9</value>

View file

@ -21,6 +21,7 @@
<enable>
<condition>
<and>
<property>/it-autoflight/output/apfd-on</property>
<or>
<equals>
<property>/it-autoflight/output/lat</property>
@ -31,24 +32,6 @@
<value>1</value>
</equals>
</or>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd2</property>
<value>1</value>
</equals>
</or>
</and>
</condition>
</enable>
@ -77,28 +60,11 @@
<enable>
<condition>
<and>
<property>/it-autoflight/output/apfd-on</property>
<equals>
<property>/it-autoflight/output/lat</property>
<value>2</value>
</equals>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd2</property>
<value>1</value>
</equals>
</or>
</and>
</condition>
</enable>
@ -141,24 +107,7 @@
<enable>
<condition>
<or>
<and>
<not-equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</not-equals>
<not-equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</not-equals>
<not-equals>
<property>/it-autoflight/output/fd1</property>
<value>1</value>
</not-equals>
<not-equals>
<property>/it-autoflight/output/fd2</property>
<value>1</value>
</not-equals>
</and>
<not><property>/it-autoflight/output/apfd-on</property></not>
<equals>
<property>/it-autoflight/output/lat</property>
<value>9</value>
@ -183,24 +132,7 @@
<max-rate-of-change>
<condition>
<or>
<and>
<not-equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</not-equals>
<not-equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</not-equals>
<not-equals>
<property>/it-autoflight/output/fd1</property>
<value>1</value>
</not-equals>
<not-equals>
<property>/it-autoflight/output/fd2</property>
<value>1</value>
</not-equals>
</and>
<not><property>/it-autoflight/output/apfd-on</property></not>
<equals>
<property>/it-autoflight/output/lat</property>
<value>9</value>
@ -211,16 +143,7 @@
</max-rate-of-change>
<max-rate-of-change>
<condition>
<and>
<not-equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</not-equals>
<not-equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</not-equals>
</and>
<not><property>/it-autoflight/output/ap-on</property></not>
</condition>
<value>15</value>
</max-rate-of-change>
@ -281,16 +204,7 @@
<input>
<condition>
<and>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
</or>
<property>/it-autoflight/output/ap-on</property>
<equals>
<property>/it-autoflight/output/lat</property>
<value>4</value>

View file

@ -111,38 +111,37 @@
<filter-gain>0.0</filter-gain>
</predict-simple>
<!-- Because overwriting from JSBsim doesn't work -->
<filter>
<name>OIL PSI 1</name>
<name>Engine 1 Cutoff</name>
<type>gain</type>
<gain>1.0</gain>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<expression>
<table>
<property>/engines/engine[0]/n2-actual</property>
<entry><ind>11</ind><dep> 2</dep></entry>
<entry><ind>58</ind><dep>48</dep></entry>
</table>
</expression>
</input>
<output>/engines/engine[0]/oil-psi-actual</output>
<input>/systems/ignition/cutoff-jsb-1</input>
<output>/controls/engines/engine[0]/cutoff</output>
</filter>
<filter>
<name>OIL PSI 2</name>
<name>Engine 2 Cutoff</name>
<type>gain</type>
<gain>1.0</gain>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<expression>
<table>
<property>/engines/engine[1]/n2-actual</property>
<entry><ind>11</ind><dep> 2</dep></entry>
<entry><ind>58</ind><dep>48</dep></entry>
</table>
</expression>
</input>
<output>/engines/engine[1]/oil-psi-actual</output>
<input>/systems/ignition/cutoff-jsb-2</input>
<output>/controls/engines/engine[1]/cutoff</output>
</filter>
<filter>
<name>Engine 1 Starter</name>
<type>gain</type>
<gain>1.0</gain>
<input>/systems/ignition/starter-jsb-1</input>
<output>/controls/engines/engine[0]/starter</output>
</filter>
<filter>
<name>Engine 2 Starter</name>
<type>gain</type>
<gain>1.0</gain>
<input>/systems/ignition/starter-jsb-2</input>
<output>/controls/engines/engine[1]/starter</output>
</filter>
<filter>