GIT: Merge master
This commit is contained in:
commit
38ed057104
16 changed files with 68 additions and 193 deletions
|
@ -449,16 +449,14 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
|
|||
</tank>
|
||||
</propulsion>
|
||||
|
||||
<system file="pushback" />
|
||||
<system file="fuel" />
|
||||
<system file="electrical" />
|
||||
<system file="glass-effect1" />
|
||||
<system file="fmgc" />
|
||||
<system file="a320-fcs" />
|
||||
<system file="pushback"/>
|
||||
<system file="fuel"/>
|
||||
<system file="glass-effect1"/>
|
||||
<system file="a320-fcs"/>
|
||||
|
||||
<flight_control name="none"/>
|
||||
|
||||
<aerodynamics file="Systems/a320-aerodynamics.xml" />
|
||||
<aerodynamics file="Systems/a320-aerodynamics.xml"/>
|
||||
|
||||
<external_reactions>
|
||||
<force name="pushback" frame="BODY">
|
||||
|
|
|
@ -449,16 +449,14 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
|
|||
</tank>
|
||||
</propulsion>
|
||||
|
||||
<system file="pushback" />
|
||||
<system file="fuel" />
|
||||
<system file="electrical" />
|
||||
<system file="glass-effect1" />
|
||||
<system file="fmgc" />
|
||||
<system file="a320-fcs" />
|
||||
<system file="pushback"/>
|
||||
<system file="fuel"/>
|
||||
<system file="glass-effect1"/>
|
||||
<system file="a320-fcs"/>
|
||||
|
||||
<flight_control name="none"/>
|
||||
|
||||
<aerodynamics file="Systems/a320-aerodynamics.xml" />
|
||||
<aerodynamics file="Systems/a320-aerodynamics.xml"/>
|
||||
|
||||
<external_reactions>
|
||||
<force name="pushback" frame="BODY">
|
||||
|
|
|
@ -449,16 +449,14 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
|
|||
</tank>
|
||||
</propulsion>
|
||||
|
||||
<system file="pushback" />
|
||||
<system file="fuel" />
|
||||
<system file="electrical" />
|
||||
<system file="glass-effect1" />
|
||||
<system file="fmgc" />
|
||||
<system file="a320-fcs" />
|
||||
<system file="pushback"/>
|
||||
<system file="fuel"/>
|
||||
<system file="glass-effect1"/>
|
||||
<system file="a320-fcs"/>
|
||||
|
||||
<flight_control name="none"/>
|
||||
|
||||
<aerodynamics file="Systems/a320-aerodynamics.xml" />
|
||||
<aerodynamics file="Systems/a320-aerodynamics.xml"/>
|
||||
|
||||
<external_reactions>
|
||||
<force name="pushback" frame="BODY">
|
||||
|
|
|
@ -449,16 +449,14 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
|
|||
</tank>
|
||||
</propulsion>
|
||||
|
||||
<system file="pushback" />
|
||||
<system file="fuel" />
|
||||
<system file="electrical" />
|
||||
<system file="glass-effect1" />
|
||||
<system file="fmgc" />
|
||||
<system file="a320-fcs" />
|
||||
<system file="pushback"/>
|
||||
<system file="fuel"/>
|
||||
<system file="glass-effect1"/>
|
||||
<system file="a320-fcs"/>
|
||||
|
||||
<flight_control name="none"/>
|
||||
|
||||
<aerodynamics file="Systems/a320-aerodynamics.xml" />
|
||||
<aerodynamics file="Systems/a320-aerodynamics.xml"/>
|
||||
|
||||
<external_reactions>
|
||||
<force name="pushback" frame="BODY">
|
||||
|
|
|
@ -449,16 +449,14 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
|
|||
</tank>
|
||||
</propulsion>
|
||||
|
||||
<system file="pushback" />
|
||||
<system file="fuel" />
|
||||
<system file="electrical" />
|
||||
<system file="glass-effect1" />
|
||||
<system file="fmgc" />
|
||||
<system file="a320-fcs" />
|
||||
<system file="pushback"/>
|
||||
<system file="fuel"/>
|
||||
<system file="glass-effect1"/>
|
||||
<system file="a320-fcs"/>
|
||||
|
||||
<flight_control name="none"/>
|
||||
|
||||
<aerodynamics file="Systems/a320-aerodynamics.xml" />
|
||||
<aerodynamics file="Systems/a320-aerodynamics.xml"/>
|
||||
|
||||
<external_reactions>
|
||||
<force name="pushback" frame="BODY">
|
||||
|
|
|
@ -2730,10 +2730,6 @@
|
|||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/oh-btn", 1);</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>systems.fctlpoweruptest();</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
|
@ -2795,10 +2791,6 @@
|
|||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/oh-btn", 1);</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>systems.fctlpoweruptest();</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ var initInputA = func(key) {
|
|||
}
|
||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||
} else if (ci >= 0 and ci <= 120) {
|
||||
} else if (ci >= 0 and ci <= 999) {
|
||||
setprop("/FMGC/internal/cost-index", ci);
|
||||
setprop("/FMGC/internal/cost-index-set", 1);
|
||||
setprop("/MCDU[0]/scratchpad", "");
|
||||
|
|
|
@ -22,7 +22,7 @@ var perfCLBInput = func(key) {
|
|||
}
|
||||
setprop("/MCDU[0]/scratchpad-msg", "1");
|
||||
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
|
||||
} else if (ci >= 0 and ci <= 120) {
|
||||
} else if (ci >= 0 and ci <= 999) {
|
||||
setprop("/FMGC/internal/cost-index", ci);
|
||||
setprop("/FMGC/internal/cost-index-set", 1);
|
||||
setprop("/MCDU[0]/scratchpad", "");
|
||||
|
|
|
@ -42,7 +42,7 @@ var initInputA = func(key) {
|
|||
}
|
||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||
} else if (ci >= 0 and ci <= 120) {
|
||||
} else if (ci >= 0 and ci <= 999) {
|
||||
setprop("/FMGC/internal/cost-index", ci);
|
||||
setprop("/FMGC/internal/cost-index-set", 1);
|
||||
setprop("/MCDU[1]/scratchpad", "");
|
||||
|
|
|
@ -22,7 +22,7 @@ var perfCLBInput = func(key) {
|
|||
}
|
||||
setprop("/MCDU[1]/scratchpad-msg", "1");
|
||||
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
|
||||
} else if (ci >= 0 and ci <= 120) {
|
||||
} else if (ci >= 0 and ci <= 999) {
|
||||
setprop("/FMGC/internal/cost-index", ci);
|
||||
setprop("/FMGC/internal/cost-index-set", 1);
|
||||
setprop("/MCDU[1]/scratchpad", "");
|
||||
|
|
|
@ -133,37 +133,6 @@ var light = {
|
|||
}
|
||||
};
|
||||
|
||||
var fctlpoweruptest = func {
|
||||
if (getprop("/systems/electrical/battery-available") == 0 and (getprop("/controls/electrical/switches/battery1") == 1 or getprop("/controls/electrical/switches/battery2") == 1)) {
|
||||
setprop("/systems/failures/elac1-fault", 1);
|
||||
setprop("/systems/failures/sec1", 1);
|
||||
setprop("/systems/electrical/battery-available", 1);
|
||||
setprop("/systems/electrical/elac1-test", 1);
|
||||
settimer(func() {
|
||||
setprop("/systems/failures/elac1-fault", 0);
|
||||
setprop("/systems/electrical/elac1-test", 0);
|
||||
}, 8);
|
||||
settimer(func() {
|
||||
setprop("/systems/failures/sec1", 0);
|
||||
}, 8.5);
|
||||
}
|
||||
|
||||
gen1_sw = getprop("/controls/electrical/switches/gen1");
|
||||
gen2_sw = getprop("/controls/electrical/switches/gen2");
|
||||
gen_apu_sw = getprop("/controls/electrical/switches/gen-apu");
|
||||
gen_ext_sw = getprop("/controls/electrical/switches/gen-ext");
|
||||
|
||||
if (getprop("/systems/electrical/dc2-available") == 0 and getprop("/systems/electrical/bus/dc2") > 25) {
|
||||
setprop("/systems/failures/elac2-fault", 1);
|
||||
setprop("/systems/electrical/dc2-available", 1);
|
||||
setprop("/systems/electrical/elac2-test", 1);
|
||||
settimer(func() {
|
||||
setprop("/systems/failures/elac2-fault", 0);
|
||||
setprop("/systems/electrical/elac2-test", 0);
|
||||
}, 8);
|
||||
}
|
||||
}
|
||||
|
||||
# Main Elec System
|
||||
|
||||
var ELEC = {
|
||||
|
@ -183,8 +152,8 @@ var ELEC = {
|
|||
setprop("/controls/electrical/switches/ac-ess-feed", 0);
|
||||
setprop("/controls/electrical/switches/battery1", 0);
|
||||
setprop("/controls/electrical/switches/battery2", 0);
|
||||
setprop("/systems/electrical/battery1-volts", 25.9);
|
||||
setprop("/systems/electrical/battery2-volts", 25.9);
|
||||
setprop("/systems/electrical/battery1-volts", 26.5);
|
||||
setprop("/systems/electrical/battery2-volts", 26.5);
|
||||
setprop("/systems/electrical/battery1-amps", 0);
|
||||
setprop("/systems/electrical/battery2-amps", 0);
|
||||
setprop("/systems/electrical/bus/dc1", 0);
|
||||
|
@ -335,6 +304,18 @@ var ELEC = {
|
|||
replay = getprop("/sim/replay/replay-state");
|
||||
wow = getprop("/gear/gear[1]/wow");
|
||||
|
||||
if (battery1_sw and !batt1_fail) {
|
||||
setprop("/systems/electrical/battery1-amps", dc_amps_std);
|
||||
} else {
|
||||
setprop("/systems/electrical/battery1-amps", 0);
|
||||
}
|
||||
|
||||
if (battery2_sw and !batt2_fail) {
|
||||
setprop("/systems/electrical/battery2-amps", dc_amps_std);
|
||||
} else {
|
||||
setprop("/systems/electrical/battery2-amps", 0);
|
||||
}
|
||||
|
||||
if (getprop("/systems/electrical/battery1-amps") > 120 or getprop("/systems/electrical/battery2-amps") > 120) {
|
||||
setprop("/systems/electrical/bus/dcbat", dc_volt_std);
|
||||
} else {
|
||||
|
@ -346,7 +327,7 @@ var ELEC = {
|
|||
}
|
||||
|
||||
if (dc2 >= 25) {
|
||||
fctlpoweruptest();
|
||||
setprop("/systems/electrical/dc2-available", 1);
|
||||
} else {
|
||||
setprop("/systems/electrical/dc2-available", 0);
|
||||
}
|
||||
|
@ -622,33 +603,33 @@ var ELEC = {
|
|||
dc2 = getprop("/systems/electrical/bus/dc2");
|
||||
|
||||
if (battery1_volts < 27.9 and (dc1 > 25 or dc2 > 25) and battery1_sw and !batt1_fail) {
|
||||
decharge1.stop();
|
||||
charge1.start();
|
||||
} else if (battery1_volts == 27.9 and (dc1 > 25 or dc2 > 25) and battery1_sw and !batt1_fail) {
|
||||
charge1.stop();
|
||||
decharge1.stop();
|
||||
if (getprop("/systems/electrical/battery1-time") + 60 < getprop("/sim/time/elapsed-sec")) {
|
||||
setprop("/systems/electrical/battery1-volts", battery1_volts + 0.02877666); # Roughly 15mins to 25.9
|
||||
setprop("/systems/electrical/battery1-time", getprop("/sim/time/elapsed-sec"));
|
||||
}
|
||||
} else if (battery1_sw and !batt1_fail) {
|
||||
charge1.stop();
|
||||
decharge1.start();
|
||||
if (getprop("/systems/electrical/battery1-time") + 60 < getprop("/sim/time/elapsed-sec")) {
|
||||
setprop("/systems/electrical/battery1-volts", battery1_volts - 0.01438833); # Roughly 30mins from 25.9
|
||||
setprop("/systems/electrical/battery1-time", getprop("/sim/time/elapsed-sec"));
|
||||
}
|
||||
} else {
|
||||
decharge1.stop();
|
||||
charge1.stop();
|
||||
setprop("/systems/electrical/battery1-time", getprop("/sim/time/elapsed-sec"));
|
||||
}
|
||||
|
||||
if (battery2_volts < 27.9 and (dc1 > 25 or dc2 > 25) and battery2_sw and !batt2_fail) {
|
||||
decharge2.stop();
|
||||
charge2.start();
|
||||
} else if (battery2_volts == 27.9 and (dc1 > 25 or dc2 > 25) and battery2_sw and !batt2_fail) {
|
||||
charge2.stop();
|
||||
decharge2.stop();
|
||||
if (getprop("/systems/electrical/battery2-time") + 60 < getprop("/sim/time/elapsed-sec")) {
|
||||
setprop("/systems/electrical/battery2-volts", battery2_volts + 0.02877666); # Roughly 15mins to 25.9
|
||||
setprop("/systems/electrical/battery2-time", getprop("/sim/time/elapsed-sec"));
|
||||
}
|
||||
} else if (battery2_sw and !batt2_fail) {
|
||||
charge2.stop();
|
||||
decharge2.start();
|
||||
if (getprop("/systems/electrical/battery2-time") + 60 < getprop("/sim/time/elapsed-sec")) {
|
||||
setprop("/systems/electrical/battery2-volts", battery2_volts - 0.01438833); # Roughly 30mins from 25.9
|
||||
setprop("/systems/electrical/battery2-time", getprop("/sim/time/elapsed-sec"));
|
||||
}
|
||||
} else {
|
||||
decharge2.stop();
|
||||
charge2.stop();
|
||||
setprop("/systems/electrical/battery2-time", getprop("/sim/time/elapsed-sec"));
|
||||
}
|
||||
|
||||
|
||||
if (getprop("/systems/electrical/bus/ac-ess") < 110) {
|
||||
if (getprop("/it-autoflight/output/ap1") == 1) {
|
||||
setprop("/it-autoflight/input/ap1", 0);
|
||||
|
@ -802,20 +783,3 @@ var ELEC = {
|
|||
}
|
||||
},
|
||||
};
|
||||
|
||||
var charge1 = maketimer(6, func {
|
||||
bat1_volts = getprop("/systems/electrical/battery1-volts");
|
||||
setprop("/systems/electrical/battery1-volts", bat1_volts + 0.1);
|
||||
});
|
||||
var charge2 = maketimer(6, func {
|
||||
bat2_volts = getprop("/systems/electrical/battery2-volts");
|
||||
setprop("/systems/electrical/battery2-volts", bat2_volts + 0.1);
|
||||
});
|
||||
var decharge1 = maketimer(69, func { # interval is at 69 seconds, to allow about 30 min from 25.9
|
||||
bat1_volts = getprop("/systems/electrical/battery1-volts");
|
||||
setprop("/systems/electrical/battery1-volts", bat1_volts - 0.1);
|
||||
});
|
||||
var decharge2 = maketimer(69, func {
|
||||
bat2_volts = getprop("/systems/electrical/battery2-volts");
|
||||
setprop("/systems/electrical/battery2-volts", bat2_volts - 0.1);
|
||||
});
|
|
@ -11,9 +11,4 @@ Present pack includes the following Airbus A320 Family variants:
|
|||
- A320-214
|
||||
- A320-232
|
||||
- A320-251N
|
||||
- A320-271N
|
||||
|
||||
|
||||
Thank you to:
|
||||
Amanda Santos for the sound "botaodepressao", used for the overhead panel under the CC0 license:
|
||||
https://freesound.org/people/amandasantos/sounds/392148/
|
||||
- A320-271N
|
|
@ -1,40 +0,0 @@
|
|||
<!-- Airbus A320 Electrical -->
|
||||
|
||||
<!--
|
||||
##############################################
|
||||
# Copyright (c) Joshua Davidson (it0uchpods) #
|
||||
##############################################
|
||||
-->
|
||||
|
||||
<system name="A320: Electrical">
|
||||
|
||||
<property>/controls/electrical/switches/battery1</property>
|
||||
<property>/systems/failures/elec-batt1</property>
|
||||
<property>/controls/electrical/switches/battery2</property>
|
||||
<property>/systems/failures/elec-batt2</property>
|
||||
|
||||
<channel name="Battery">
|
||||
|
||||
<switch name="electrical/battery-1">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="150">
|
||||
/controls/electrical/switches/battery1 eq 1
|
||||
/systems/failures/elec-batt1 eq 0
|
||||
</test>
|
||||
<delay type="time">0.85</delay>
|
||||
<output>/systems/electrical/battery1-amps</output>
|
||||
</switch>
|
||||
|
||||
<switch name="electrical/battery-2">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="150">
|
||||
/controls/electrical/switches/battery2 eq 1
|
||||
/systems/failures/elec-batt2 eq 0
|
||||
</test>
|
||||
<delay type="time">0.85</delay>
|
||||
<output>/systems/electrical/battery2-amps</output>
|
||||
</switch>
|
||||
|
||||
</channel>
|
||||
|
||||
</system>
|
|
@ -1,29 +0,0 @@
|
|||
<!-- Airbus A3XX FMGC System by Joshua Davidson (it0uchpods) and Jonathan Redpath (legoboyvdlp) -->
|
||||
|
||||
<!--
|
||||
##############################################
|
||||
# Copyright (c) Joshua Davidson (it0uchpods) #
|
||||
##############################################
|
||||
-->
|
||||
|
||||
<system name="fmgc">
|
||||
<property value="0">/FMGC/internal/greendot-kts</property>
|
||||
|
||||
<channel name="GreenDot">
|
||||
<fcs_function name="/FMGC/internal/greendot-kts">
|
||||
<description>GreenDot</description>
|
||||
<function>
|
||||
<sum>
|
||||
<product>
|
||||
<product>
|
||||
<property>/fdm/jsbsim/inertia/weight-lbs</property>
|
||||
<value>0.000453592</value>
|
||||
</product>
|
||||
<v>2</v>
|
||||
</product>
|
||||
<v>85</v>
|
||||
</sum>
|
||||
</function>
|
||||
</fcs_function>
|
||||
</channel>
|
||||
</system>
|
3
THANKS.md
Normal file
3
THANKS.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Thank you to:
|
||||
Amanda Santos for the sound "botaodepressao", used for the overhead panel under the CC0 license:
|
||||
https://freesound.org/people/amandasantos/sounds/392148/
|
|
@ -1 +1 @@
|
|||
4409
|
||||
4410
|
Reference in a new issue