Merge pull request #21 from legoboyvdlp/master
fix APU spinup time and add generator lines. Varios improvements
This commit is contained in:
commit
5893b12633
8 changed files with 419 additions and 7 deletions
|
@ -176,6 +176,7 @@
|
|||
<float n="8" alias="/controls/flight/rudder-fdm" />
|
||||
<float n="9" alias="/controls/flight/spoiler-left" />
|
||||
<float n="10" alias="/controls/flight/spoiler-right" />
|
||||
<float n="11" alias="/fdm/jsbsim/fcs/slat-pos-norm" />
|
||||
<int n="2" alias="/controls/lighting/landing-lights[0]" />
|
||||
<int n="3" alias="/controls/lighting/landing-lights[1]" />
|
||||
<int n="4" alias="/controls/lighting/landing-lights[2]" />
|
||||
|
|
|
@ -712,7 +712,6 @@
|
|||
</or>
|
||||
</condition>
|
||||
</layer>
|
||||
|
||||
<layer>
|
||||
<type>text</type>
|
||||
<name>TR1-volts</name>
|
||||
|
@ -830,6 +829,56 @@
|
|||
</transformations>
|
||||
<!-- TRs simply show 0V and 0A, no conditions -->
|
||||
</layer>
|
||||
<layer>
|
||||
<name>gen1off</name>
|
||||
<emissive>true</emissive>
|
||||
<w>2</w>
|
||||
<h>10</h>
|
||||
<texture>
|
||||
<path>Aircraft/A320Family/Models/Instruments/ECAM/res/elec-gen-green-line.png</path>
|
||||
</texture>
|
||||
<transformations>
|
||||
<transformation>
|
||||
<type>y-shift</type>
|
||||
<offset>-16</offset>
|
||||
</transformation>
|
||||
<transformation>
|
||||
<type>x-shift</type>
|
||||
<offset>-100</offset>
|
||||
</transformation>
|
||||
</transformations>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/controls/electrical/switches/gen1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
</layer>
|
||||
<layer>
|
||||
<name>gen2off</name>
|
||||
<emissive>true</emissive>
|
||||
<w>2</w>
|
||||
<h>10</h>
|
||||
<texture>
|
||||
<path>Aircraft/A320Family/Models/Instruments/ECAM/res/elec-gen-green-line.png</path>
|
||||
</texture>
|
||||
<transformations>
|
||||
<transformation>
|
||||
<type>y-shift</type>
|
||||
<offset>-16</offset>
|
||||
</transformation>
|
||||
<transformation>
|
||||
<type>x-shift</type>
|
||||
<offset>101</offset>
|
||||
</transformation>
|
||||
</transformations>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/controls/electrical/switches/gen2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
</layer>
|
||||
<!-- ################################## Bottom #################################-->
|
||||
|
||||
<layer>
|
||||
|
|
BIN
Models/Instruments/ECAM/res/elec-gen-green-line.png
Normal file
BIN
Models/Instruments/ECAM/res/elec-gen-green-line.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 B |
Binary file not shown.
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
@ -479,5 +479,344 @@
|
|||
<z2-m>0.949</z2-m>
|
||||
</axis>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<name>SlatsL</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatR1</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.18</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.22</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.27</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>-1</x>
|
||||
<y>0</y>
|
||||
<z>0</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatR1</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.03</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.05</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.1</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<z>-1</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL1</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatR2</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.18</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.22</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.27</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>-1</x>
|
||||
<y>0</y>
|
||||
<z>0</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL1</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatR2</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.03</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.05</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.1</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<z>-1</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL2</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatR3</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.18</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.22</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.27</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>-1</x>
|
||||
<y>0</y>
|
||||
<z>0</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL2</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatR3</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.03</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.05</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.1</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<z>-1</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL3</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatR4</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.18</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.22</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.27</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>-1</x>
|
||||
<y>0</y>
|
||||
<z>0</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL3</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatR4</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.03</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.05</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.1</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<z>-1</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL4</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatR5</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.18</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.22</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.27</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>-1</x>
|
||||
<y>0</y>
|
||||
<z>0</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL4</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatR5</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.03</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.05</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.1</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<z>-1</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatL1</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.18</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.22</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.27</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>-1</x>
|
||||
<y>0</y>
|
||||
<z>0</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatL1</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.03</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.05</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.1</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<z>-1</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL1</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatL2</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.18</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.22</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.27</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>-1</x>
|
||||
<y>0</y>
|
||||
<z>0</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL1</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatL2</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.03</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.05</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.1</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<z>-1</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL2</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatL3</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.18</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.22</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.27</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>-1</x>
|
||||
<y>0</y>
|
||||
<z>0</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL2</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatL3</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.03</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.05</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.1</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<z>-1</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL3</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatL4</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.18</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.22</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.27</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>-1</x>
|
||||
<y>0</y>
|
||||
<z>0</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL3</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatL4</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.03</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.05</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.1</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<z>-1</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL4</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatL5</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.18</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.22</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.27</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>-1</x>
|
||||
<y>0</y>
|
||||
<z>0</z>
|
||||
</axis>
|
||||
</animation>
|
||||
<animation>
|
||||
<name>SlatsL4</name>
|
||||
<type>translate</type>
|
||||
<object-name>SlatL5</object-name>
|
||||
<property>/sim/multiplay/generic/float[11]</property>
|
||||
<interpolation>
|
||||
<entry><ind>0.0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>0.666</ind><dep>0.03</dep></entry>
|
||||
<entry><ind>0.814</ind><dep>0.05</dep></entry>
|
||||
<entry><ind>1.0</ind><dep>0.1</dep></entry>
|
||||
</interpolation>
|
||||
<axis>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<z>-1</z>
|
||||
</axis>
|
||||
</animation>
|
||||
</PropertyList>
|
||||
|
|
|
@ -45,6 +45,7 @@ var elec_init = func {
|
|||
setprop("/systems/electrical/extra/ext-hz", 0);
|
||||
setprop("/systems/electrical/extra/apu-hz", 0);
|
||||
setprop("/systems/electrical/extra/galleyshed", 0);
|
||||
setprop("/systems/electrical/gen-apu", 0);
|
||||
setprop("systems/electrical/on", 0);
|
||||
setprop("/controls/electrical/xtie/xtieL", 0);
|
||||
setprop("/controls/electrical/xtie/xtieR", 0);
|
||||
|
@ -93,6 +94,7 @@ var master_elec = func {
|
|||
var gen2_sw = getprop("/controls/electrical/switches/gen2");
|
||||
var gen_apu_sw = getprop("/controls/electrical/switches/gen-apu");
|
||||
var gen_ext_sw = getprop("/controls/electrical/switches/gen-ext");
|
||||
var gen_apu = getprop("/systems/electrical/gen-apu");
|
||||
var apu_ext_crosstie_sw = getprop("/controls/electrical/switches/apu-ext-crosstie");
|
||||
var ac_ess_feed_sw = getprop("/controls/electrical/switches/ac-ess-feed");
|
||||
var battery1_sw = getprop("/controls/electrical/switches/battery1");
|
||||
|
@ -111,6 +113,7 @@ var master_elec = func {
|
|||
var dc_ess = getprop("/systems/electrical/bus/dc-ess");
|
||||
var gen_1_volts = getprop("/systems/electrical/extra/gen1-volts");
|
||||
var gen_2_volts = getprop("/systems/electrical/extra/gen1-volts");
|
||||
var galley_shed = getprop("/systems/electrical/extra/galleyshed");
|
||||
|
||||
|
||||
|
||||
|
@ -145,7 +148,7 @@ var master_elec = func {
|
|||
setprop("/systems/electrical/bus/dc1", dc_volt_std);
|
||||
setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
|
||||
setprop("/systems/electrical/bus/dc1-amps", dc_amps_std);
|
||||
} else if (rpmapu >= 94.9 and gen_apu_sw) {
|
||||
} else if (gen_apu) {
|
||||
setprop("/systems/electrical/bus/ac1", ac_volt_std);
|
||||
setprop("/systems/electrical/bus/ac-ess", ac_volt_std);
|
||||
setprop("/systems/electrical/extra/apu-volts", ac_volt_std);
|
||||
|
@ -194,7 +197,7 @@ var master_elec = func {
|
|||
setprop("/systems/electrical/bus/dc2", dc_volt_std);
|
||||
setprop("/systems/electrical/bus/dc-ess", dc_volt_std);
|
||||
setprop("/systems/electrical/bus/dc2-amps", dc_amps_std);
|
||||
} else if (rpmapu >= 94.9 and gen_apu_sw) {
|
||||
} else if (gen_apu) {
|
||||
setprop("/systems/electrical/bus/ac2", ac_volt_std);
|
||||
setprop("/systems/electrical/bus/ac-ess", ac_volt_std);
|
||||
setprop("/systems/electrical/extra/apu-volts", ac_volt_std);
|
||||
|
@ -235,15 +238,29 @@ var master_elec = func {
|
|||
}
|
||||
|
||||
if (ac_ess >= 100) {
|
||||
if (galley_sw == 1) {
|
||||
if (galley_sw == 1 and !galley_shed) {
|
||||
setprop("/systems/electrical/bus/galley", ac_volt_std);
|
||||
} else if (galley_sw) {
|
||||
} else if (galley_sw or galley_shed) {
|
||||
setprop("/systems/electrical/bus/galley", 0);
|
||||
}
|
||||
} else {
|
||||
setprop("/systems/electrical/bus/galley", 0);
|
||||
}
|
||||
|
||||
# Galley Shedding Logic
|
||||
if (!gen_apu and !gen_ext_sw and (!gen1_sw or !gen2_sw)) { # this is when one of the generators is not working or turned off as it reads 0 V
|
||||
setprop("/systems/electrical/extra/galleyshed", 1);
|
||||
} else {
|
||||
setprop("/systems/electrical/extra/galleyshed", 0);
|
||||
}
|
||||
|
||||
# APU Generator: Make it only come online when the apu is running. This is needed to make galley shed work properly.
|
||||
if (rpmapu >= 94.9 and gen_apu_sw) {
|
||||
setprop("/systems/electrical/gen-apu", 1);
|
||||
} else {
|
||||
setprop("/systems/electrical/gen-apu", 0);
|
||||
}
|
||||
|
||||
# Battery Amps
|
||||
if (battery1_sw) {
|
||||
setprop("/systems/electrical/battery1-amps", dc_amps_std);
|
||||
|
|
|
@ -21,7 +21,8 @@ var n1_wm = 0;
|
|||
var n2_wm = 0;
|
||||
var apu_max = 99.8;
|
||||
var apu_egt_max = 513;
|
||||
var spinup_time = 15;
|
||||
var spinup_time = 49; # Measured from youtube video
|
||||
# For future, APU FLAP also takes 15 extra seconds to open before startup
|
||||
var start_time = 10;
|
||||
var egt_lightup_time = 2;
|
||||
var egt_lightdn_time = 8;
|
||||
|
@ -157,6 +158,7 @@ setlistener("/controls/APU/start", func {
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
############
|
||||
# Stop APU #
|
||||
############
|
||||
|
|
|
@ -86,6 +86,10 @@
|
|||
<type>float</type>
|
||||
<property>/controls/flight/rudder-fdm</property>
|
||||
</signal>
|
||||
<signal>
|
||||
<type>float</type>
|
||||
<property>/fdm/jsbsim/fcs/slat-pos-norm</property>
|
||||
</signal>
|
||||
</signals>
|
||||
</config>
|
||||
|
||||
|
|
Reference in a new issue