1
0
Fork 0

Merge master

Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
fly 2019-12-04 05:32:39 +00:00
commit ffc76b9112
105 changed files with 7286 additions and 2571 deletions

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
@ -163,6 +163,14 @@
</config>
</view>
<systems>
<wingflexer include="Systems/wingflexer-params.xml"/>
<property-rule n="100">
<name>wing flexer property rule</name>
<path>Aircraft/Generic/wingflexer.xml</path>
</property-rule>
</systems>
<systems n="0">
<autopilot n="0">
<path>Aircraft/A320-family/Systems/fadec-cfm.xml</path>
@ -171,7 +179,7 @@
<path>Aircraft/A320-family/Systems/cfm56-sound.xml</path>
</autopilot>
</systems>
</sim>
<limits>
@ -197,7 +205,7 @@
<nasal>
<specific>
<file>Aircraft/A320-family/Nasal/a320livery-cfm-100.nas</file>
<file>Aircraft/A320-family/Nasal/Sim/a320livery-cfm-100.nas</file>
</specific>
</nasal>

View file

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://jsbsim.sourceforge.net/JSBSim.xsl"?>
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
@ -29,7 +29,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<pitch> 2.2 </pitch>
<yaw> 1 </yaw>
</orient>
<feed>4</feed>
<feed>5</feed>
<thruster file="direct">
<location unit="M">
<x> 14.3962788 </x>
@ -55,7 +55,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<pitch> 2.2 </pitch>
<yaw> -1 </yaw>
</orient>
<feed>5</feed>
<feed>6</feed>
<thruster file="direct">
<location unit="M">
<x> 14.3962788 </x>
@ -162,13 +162,15 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="glass-effect1"/>
<system file="a320-fcs"/>
<system file="a320-100-fuel"/>
<system file="a320-fuel"/>
<system file="a320-fwc"/>
<system file="a320-spoiler"/>
<system file="a320-electrical"/>
<system file="a320-hydraulic"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<system file="a320-adr"/>
<system file="a320-fmgc"/>
<flight_control name="none"/>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
@ -163,6 +163,14 @@
</config>
</view>
<systems>
<wingflexer include="Systems/wingflexer-params.xml"/>
<property-rule n="100">
<name>wing flexer property rule</name>
<path>Aircraft/Generic/wingflexer.xml</path>
</property-rule>
</systems>
<systems n="0">
<autopilot n="0">
<path>Aircraft/A320-family/Systems/fadec-cfm.xml</path>
@ -171,7 +179,7 @@
<path>Aircraft/A320-family/Systems/cfm56-sound.xml</path>
</autopilot>
</systems>
</sim>
<limits>
@ -197,7 +205,7 @@
<nasal>
<specific>
<file>Aircraft/A320-family/Nasal/a320livery-cfm.nas</file>
<file>Aircraft/A320-family/Nasal/Sim/a320livery-cfm.nas</file>
</specific>
</nasal>

View file

@ -79,7 +79,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<capacity unit="LBS"> 1523.00 </capacity>
<contents unit="LBS"> 1523.00 </contents>
<unusable-volume unit="LTR"> 4.0 </unusable-volume>
<priority>0</priority>
<priority>1</priority>
<density unit="LBS/GAL">6.71</density>
<temperature>50</temperature>
</tank>
@ -92,7 +92,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<capacity unit="LBS"> 12591.95 </capacity>
<contents unit="LBS"> 6000.00 </contents>
<unusable-volume unit="LTR"> 28.0 </unusable-volume>
<priority>0</priority>
<priority>1</priority>
<density unit="LBS/GAL">6.71</density>
<temperature>50</temperature>
</tank>
@ -105,7 +105,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<capacity unit="LBS"> 14623.00 </capacity>
<contents unit="LBS"> 42 </contents>
<unusable-volume unit="LTR"> 23.20 </unusable-volume>
<priority>0</priority>
<priority>1</priority>
<density unit="LBS/GAL">6.71</density>
<temperature>50</temperature>
</tank>
@ -118,7 +118,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<capacity unit="LBS"> 12591.95 </capacity>
<contents unit="LBS"> 6000.00 </contents>
<unusable-volume unit="LTR"> 28.0 </unusable-volume>
<priority>0</priority>
<priority>1</priority>
<density unit="LBS/GAL">6.71</density>
<temperature>50</temperature>
</tank>
@ -131,7 +131,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<capacity unit="LBS"> 1523.00 </capacity>
<contents unit="LBS"> 1523.00 </contents>
<unusable-volume unit="LTR"> 4.0 </unusable-volume>
<priority>0</priority>
<priority>1</priority>
<density unit="LBS/GAL">6.71</density>
<temperature>50</temperature>
</tank>
@ -161,6 +161,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="glass-effect1"/>
<system file="a320-fcs"/>
<system file="a320-adr"/>
<system file="a320-fuel"/>
<system file="a320-fwc"/>
<system file="a320-spoiler"/>
@ -168,6 +169,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="a320-hydraulic"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<system file="a320-adr"/>
<system file="a320-fmgc"/>
<flight_control name="none"/>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
@ -163,6 +163,14 @@
</config>
</view>
<systems>
<wingflexer include="Systems/wingflexer-params.xml"/>
<property-rule n="100">
<name>wing flexer property rule</name>
<path>Aircraft/Generic/wingflexer.xml</path>
</property-rule>
</systems>
<systems n="0">
<autopilot n="0">
<path>Aircraft/A320-family/Systems/fadec-iae.xml</path>
@ -171,7 +179,7 @@
<path>Aircraft/A320-family/Systems/v2500-sound.xml</path>
</autopilot>
</systems>
</sim>
<limits>
@ -197,7 +205,7 @@
<nasal>
<specific>
<file>Aircraft/A320-family/Nasal/a320livery-iae.nas</file>
<file>Aircraft/A320-family/Nasal/Sim/a320livery-iae.nas</file>
</specific>
</nasal>

View file

@ -168,6 +168,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="a320-hydraulic"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<system file="a320-adr"/>
<system file="a320-fmgc"/>
<flight_control name="none"/>
<aerodynamics file="Systems/a320-aerodynamics.xml"/>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
@ -139,6 +139,10 @@
<autopilot n="12">
<path>Aircraft/A320-family/Systems/a320-lights-proprules.xml</path>
</autopilot>
<autopilot n="13">
<path>Aircraft/A320-family/Systems/ecam-proprules.xml</path>
</autopilot>
<path>Aircraft/A320-family/Systems/pitot-static.xml</path>
</systems>
<sound>
@ -319,6 +323,15 @@
</script>
</binding>
</item>
<item>
<label>Refuel Panel</label>
<binding>
<command>nasal</command>
<script><![CDATA[
Dialogs.refuelDialog.openDialog();
]]></script>
</binding>
</item>
<item>
<label>Pushback</label>
<binding>
@ -493,13 +506,19 @@
<it-fbw n="0">
<alpha-hld type="bool">0</alpha-hld>
<degrade-law type="int">0</degrade-law>
<law type="int">0</law>
<roll-lim type="double">33</roll-lim>
<roll-lim type="string">33</roll-lim>
<roll-back type="bool">0</roll-back>
<override type="bool">0</override>
<protections n="0">
<overspeed type="bool">0</overspeed>
<overspeed-roll-back type="bool">0</overspeed-roll-back>
</protections>
<spd-hld type="bool">0</spd-hld>
<speeds>
<vmo-mmo type="int">350</vmo-mmo>
</speeds>
</it-fbw>
<apu>
@ -508,6 +527,7 @@
</apu>
<FMGC n="0">
<active-fmgc-channel type="int">0</active-fmgc-channel>
<internal>
<cost-index type="int">0</cost-index>
</internal>
@ -627,6 +647,26 @@
<throttle-fdm type="double">0</throttle-fdm>
</engine>
</engines>
<fctl>
<lights>
<elac1-fault type="bool">0</elac1-fault>
<elac2-fault type="bool">0</elac2-fault>
<sec1-fault type="bool">0</sec1-fault>
<sec2-fault type="bool">0</sec2-fault>
<sec3-fault type="bool">0</sec3-fault>
<fac1-fault type="bool">0</fac1-fault>
<fac2-fault type="bool">0</fac2-fault>
</lights>
<switches>
<elac1 type="bool">0</elac1>
<elac2 type="bool">0</elac2>
<sec1 type="bool">0</sec1>
<sec2 type="bool">0</sec2>
<sec3 type="bool">0</sec3>
<fac1 type="bool">0</fac1>
<fac2 type="bool">0</fac2>
</switches>
</fctl>
<fire>
<apu-test-btn type="bool">0</apu-test-btn>
<test-btn-1 type="bool">0</test-btn-1>
@ -651,6 +691,19 @@
<pump-right-1 type="bool">0</pump-right-1>
<pump-right-2 type="bool">0</pump-right-2>
</switches>
<refuel>
<valve-l-guard type="bool">0</valve-l-guard>
<valve-c-guard type="bool">0</valve-c-guard>
<valve-r-guard type="bool">0</valve-r-guard>
<mode-guard type="bool">0</mode-guard>
<valve-l type="double">0.5</valve-l>
<valve-c type="double">0.5</valve-c>
<valve-r type="double">0.5</valve-r>
<mode type="double">0.5</mode>
<power type="bool">0</power>
<test type="double">0.5</test>
<amount type="double">12.0</amount>
</refuel>
</fuel>
<gear>
<brake-parking type="bool">0</brake-parking>
@ -705,6 +758,40 @@
<seatbelt-sign type="bool">0</seatbelt-sign>
<taxi-light-switch type="float">0</taxi-light-switch>
</lighting>
<navigation>
<adirscp>
<switches>
<adr-1 type="bool">0</adr-1>
<adr-2 type="bool">0</adr-2>
<adr-3 type="bool">0</adr-3>
<ir-1 type="bool">0</ir-1>
<ir-2 type="bool">0</ir-2>
<ir-3 type="bool">0</ir-3>
<ir-1-mode type="int">0</ir-1-mode>
<ir-2-mode type="int">0</ir-2-mode>
<ir-3-mode type="int">0</ir-3-mode>
</switches>
<lights>
<adr-1-fault type="bool">0</adr-1-fault>
<adr-2-fault type="bool">0</adr-2-fault>
<adr-3-fault type="bool">0</adr-3-fault>
<adr-1-off type="bool">1</adr-1-off>
<adr-2-off type="bool">1</adr-2-off>
<adr-3-off type="bool">1</adr-3-off>
<ir-1-fault type="bool">0</ir-1-fault>
<ir-2-fault type="bool">0</ir-2-fault>
<ir-3-fault type="bool">0</ir-3-fault>
<ir-1-off type="bool">0</ir-1-off>
<ir-2-off type="bool">0</ir-2-off>
<ir-3-off type="bool">0</ir-3-off>
<on-bat type="bool">0</on-bat>
</lights>
</adirscp>
<switching>
<att-hdg type="int">0</att-hdg>
<air-data type="int">0</air-data>
</switching>
</navigation>
<OH>
<protectors>
<ditching type="bool">0</ditching>
@ -877,6 +964,15 @@
<tr-1 type="bool">0</tr-1>
<tr-2 type="bool">0</tr-2>
</electrical>
<fctl>
<elac1 type="bool">0</elac1>
<elac2 type="bool">0</elac2>
<sec1 type="bool">0</sec1>
<sec2 type="bool">0</sec2>
<sec3 type="bool">0</sec3>
<fac1 type="bool">0</fac1>
<fac2 type="bool">0</fac2>
</fctl>
<hydraulic>
<blue-edp type="bool">0</blue-edp>
<blue-elec type="bool">0</blue-elec>
@ -906,6 +1002,11 @@
<cargo-aft-fire type="bool">0</cargo-aft-fire>
</failures>
<fctl n="0">
<elac1 type="bool">0</elac1>
<elac2 type="bool">0</elac2>
<sec1 type="bool">0</sec1>
<sec2 type="bool">0</sec2>
<sec3 type="bool">0</sec3>
<fac1 type="bool">0</fac1>
<fac2 type="bool">0</fac2>
</fctl>
@ -955,6 +1056,30 @@
<green-psi>0</green-psi>
<yellow-psi>0</yellow-psi>
</hydraulic>
<pitot n="1">
<serviceable>1</serviceable>
</pitot>
<pitot n="2">
<serviceable>1</serviceable>
</pitot>
<static n="1">
<serviceable>1</serviceable>
</static>
<static n="2">
<serviceable>1</serviceable>
</static>
<navigation>
<adr>
<operating-1 type="bool">0</operating-1>
<operating-2 type="bool">0</operating-2>
<operating-3 type="bool">0</operating-3>
</adr>
</navigation>
</systems>
<options n="0">
@ -968,6 +1093,26 @@
</options>
<instrumentation n="0">
<altimeter n="1">
<serviceable type="bool">true</serviceable>
</altimeter>
<altimeter n="2">
<serviceable type="bool">true</serviceable>
</altimeter>
<altimeter n="3">
<serviceable type="bool">true</serviceable>
</altimeter>
<altimeter n="4">
<serviceable type="bool">true</serviceable>
</altimeter>
<altimeter n="5">
<serviceable type="bool">true</serviceable>
</altimeter>
<chrono n="0">
<started type="bool">0</started>
<paused type="bool">0</paused>
@ -1056,6 +1201,10 @@
<range type="double">1.0</range>
</groundradar>
<marker-beacon n="0">
<serviceable type="bool">true</serviceable>
</marker-beacon>
<nav n="0">
<frequencies>
<selected-mhz type="double">111.15</selected-mhz>
@ -1126,6 +1275,11 @@
</speaker>
</tcas>
<transponder>
<airspeed-input-src type="int">0</airspeed-input-src>
<altimeter-input-src type="int">0</altimeter-input-src>
</transponder>
<!-- See http://wiki.flightgear.org/index.php/GPWS -->
<mk-viii n="0">
<serviceable type="bool">true</serviceable>
@ -1157,6 +1311,34 @@
<file-prefix>Aircraft/A320-family/Sounds/GPWS/</file-prefix>
</voice>
</mk-viii>
<radar-altimeter n="0">
<antenna>
<x-offset-m type="double">-1</x-offset-m>
<y-offset-m type="double">0</y-offset-m>
<z-offset-m type="double">2.52</z-offset-m>
</antenna>
<az-step-deg type="int">10</az-step-deg>
<az-limit-deg type="int">30</az-limit-deg>
<elev-step-deg type="int">10</elev-step-deg>
<elev-limit type="int">30</elev-limit>
<max-range-m type="int">1219</max-range-m>
<serviceable type="bool">true</serviceable>
</radar-altimeter>
<radar-altimeter n="1">
<antenna>
<x-offset-m type="double">-1</x-offset-m>
<y-offset-m type="double">0</y-offset-m>
<z-offset-m type="double">2.52</z-offset-m>
</antenna>
<az-step-deg type="int">10</az-step-deg>
<az-limit-deg type="int">30</az-limit-deg>
<elev-step-deg type="int">10</elev-step-deg>
<elev-limit type="int">30</elev-limit>
<max-range-m type="int">1219</max-range-m>
<serviceable type="bool">true</serviceable>
</radar-altimeter>
</instrumentation>
<modes>
@ -1616,46 +1798,50 @@
<nasal>
<pts>
<file>Aircraft/A320-family/Nasal/property-tree-setup.nas</file>
<file>Aircraft/A320-family/Nasal/Sim/property-tree-setup.nas</file>
</pts>
<libraries>
<file>Aircraft/A320-family/Nasal/libraries.nas</file>
<file>Aircraft/A320-family/Nasal/buttons.nas</file>
<file>Aircraft/A320-family/Nasal/efis.nas</file>
<file>Aircraft/A320-family/Nasal/ECAM.nas</file>
<file>Aircraft/A320-family/Nasal/shake.nas</file>
<file>Aircraft/A320-family/Nasal/light-manager.nas</file>
<file>Aircraft/A320-family/Nasal/zoom-views.nas</file>
<file>Aircraft/A320-family/Nasal/ECAM/ECAM-main.nas</file>
<file>Aircraft/A320-family/Nasal/Effects/light-manager.nas</file>
<file>Aircraft/A320-family/Nasal/Sim/libraries.nas</file>
<file>Aircraft/A320-family/Nasal/Sim/buttons.nas</file>
<file>Aircraft/A320-family/Nasal/Sim/shake.nas</file>
<file>Aircraft/A320-family/Nasal/Sim/zoom-views.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/efis.nas</file>
</libraries>
<acconfig>
<file>Aircraft/A320-family/AircraftConfig/acconfig.nas</file>
</acconfig>
<systems>
<file>Aircraft/A320-family/Nasal/electrical.nas</file>
<file>Aircraft/A320-family/Nasal/pneumatics.nas</file>
<file>Aircraft/A320-family/Nasal/hydraulics.nas</file>
<file>Aircraft/A320-family/Nasal/fuel.nas</file>
<file>Aircraft/A320-family/Nasal/engines-common.nas</file>
<file>Aircraft/A320-family/Nasal/ADIRS.nas</file>
<file>Aircraft/A320-family/Nasal/fire.nas</file>
<file>Aircraft/A320-family/Nasal/brakes.nas</file>
<file>Aircraft/A320-family/Nasal/ground_services.nas</file>
<file>Aircraft/A320-family/Nasal/payload.nas</file>
<file>Aircraft/A320-family/Nasal/effects.nas</file>
<file>Aircraft/A320-family/Nasal/Effects/effects.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/electrical.nas</file>
<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/FADEC/engines-common.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/ADIRS/ADIRS.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/ADIRS/ADR.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/ADIRS/SwitchingPanel.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/fire.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/brakes.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/brakesystem.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/tyresmoke.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/ground_services.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/payload.nas</file>
</systems>
<fadec>
<file>Aircraft/A320-family/Nasal/fadec-common.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/FADEC/fadec-common.nas</file>
</fadec>
<fbw>
<file>Aircraft/A320-family/Nasal/it-fbw.nas</file>
<file>Aircraft/A320-family/Nasal/FBW/it-fbw.nas</file>
</fbw>
<fcu>
<file>Aircraft/A320-family/Nasal/FMGC/FCU.nas</file>
</fcu>
<fmgc>
<file>Aircraft/A320-family/Nasal/FMGC.nas</file>
<file>Aircraft/A320-family/Nasal/FMGC-b.nas</file>
<file>Aircraft/A320-family/Nasal/FMGC-c.nas</file>
<file>Aircraft/A320-family/Nasal/FMGC/FMGC.nas</file>
<file>Aircraft/A320-family/Nasal/FMGC/FMGC-b.nas</file>
<file>Aircraft/A320-family/Nasal/FMGC/FMGC-c.nas</file>
</fmgc>
<mcdu>
<file>Aircraft/A320-family/Nasal/MCDU/MCDU.nas</file>
@ -1692,29 +1878,35 @@
<file>Aircraft/A320-family/Nasal/ECAM/ECAM-phases.nas</file>
</ecam>
<icing>
<file>Aircraft/A320-family/Nasal/icing.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/icing.nas</file>
</icing>
<autopush>
<file>Aircraft/A320-family/Nasal/autopush.nas</file>
<file>Aircraft/A320-family/Nasal/Autopush/autopush.nas</file>
</autopush>
<autopush_driver>
<file>Aircraft/A320-family/Nasal/autopush_driver.nas</file>
<file>Aircraft/A320-family/Nasal/Autopush/autopush_driver.nas</file>
</autopush_driver>
<dynarr>
<file>Aircraft/A320-family/Nasal/dynarr.nas</file>
<file>Aircraft/A320-family/Nasal/Autopush/dynarr.nas</file>
</dynarr>
<autopush_route>
<file>Aircraft/A320-family/Nasal/autopush_route.nas</file>
<file>Aircraft/A320-family/Nasal/Autopush/autopush_route.nas</file>
</autopush_route>
<rmp>
<file>Aircraft/A320-family/Nasal/rmp.nas</file>
<file>Aircraft/A320-family/Nasal/Panels/rmp.nas</file>
</rmp>
<acp>
<file>Aircraft/A320-family/Nasal/acp.nas</file>
<file>Aircraft/A320-family/Nasal/Panels/acp.nas</file>
</acp>
<atc>
<file>Aircraft/A320-family/Nasal/atc.nas</file>
<file>Aircraft/A320-family/Nasal/Panels/atc.nas</file>
</atc>
<dmc>
<file>Aircraft/A320-family/Nasal/Systems/DMC.nas</file>
</dmc>
<Dialogs>
<file>Aircraft/A320-family/gui/dialogs/refuel.nas</file>
</Dialogs>
</nasal>
</PropertyList>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
@ -163,6 +163,14 @@
</config>
</view>
<systems>
<wingflexer include="Systems/wingflexer-params.xml"/>
<property-rule n="100">
<name>wing flexer property rule</name>
<path>Aircraft/Generic/wingflexer.xml</path>
</property-rule>
</systems>
<systems n="0">
<autopilot n="0">
<path>Aircraft/A320-family/Systems/fadec-cfm.xml</path>
@ -171,7 +179,7 @@
<path>Aircraft/A320-family/Systems/leapx-sound.xml</path>
</autopilot>
</systems>
</sim>
<limits>
@ -197,7 +205,7 @@
<nasal>
<specific>
<file>Aircraft/A320-family/Nasal/a320livery-neocfm.nas</file>
<file>Aircraft/A320-family/Nasal/Sim/a320livery-neocfm.nas</file>
</specific>
</nasal>

View file

@ -168,6 +168,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="a320-hydraulic"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<system file="a320-adr"/>
<system file="a320-fmgc"/>
<flight_control name="none"/>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
@ -163,6 +163,14 @@
</config>
</view>
<systems>
<wingflexer include="Systems/wingflexer-params.xml"/>
<property-rule n="100">
<name>wing flexer property rule</name>
<path>Aircraft/Generic/wingflexer.xml</path>
</property-rule>
</systems>
<systems n="0">
<autopilot n="0"> <!-- Apparently PW PurePower uses N1, not EPR.... sooo I use CFM FADEC -->
<path>Aircraft/A320-family/Systems/fadec-cfm.xml</path>
@ -171,7 +179,7 @@
<path>Aircraft/A320-family/Systems/leapx-sound.xml</path>
</autopilot>
</systems>
</sim>
<limits>
@ -197,7 +205,7 @@
<nasal>
<specific>
<file>Aircraft/A320-family/Nasal/a320livery-neopw.nas</file>
<file>Aircraft/A320-family/Nasal/Sim/a320livery-neopw.nas</file>
</specific>
</nasal>

View file

@ -168,6 +168,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<system file="a320-hydraulic"/>
<system file="a320-lights"/>
<system file="a320-engine-fire"/>
<system file="a320-adr"/>
<system file="a320-fmgc"/>
<flight_control name="none"/>

View file

@ -135,9 +135,9 @@ setlistener("/systems/acconfig/new-revision", func {
});
var mismatch_chk = func {
if (num(string.replace(getprop("/sim/version/flightgear"),".","")) < 201910) {
if (num(string.replace(getprop("/sim/version/flightgear"),".","")) < 201912) {
setprop("/systems/acconfig/mismatch-code", "0x121");
setprop("/systems/acconfig/mismatch-reason", "FGFS version is too old! Please update FlightGear to at least 2019.1.0.");
setprop("/systems/acconfig/mismatch-reason", "FGFS version is too old! Please update FlightGear to at least 2019.1.2.");
if (getprop("/systems/acconfig/out-of-date") != 1) {
error_mismatch.open();
}
@ -273,6 +273,9 @@ var colddark = func {
setprop("/controls/switches/landing-lights-l", 0.0);
setprop("/controls/switches/landing-lights-r", 0.0);
setprop("/controls/atc/mode-knob", 0);
setprop("/controls/lighting/fcu-panel-knb", 0);
setprop("/controls/lighting/main-panel-knb", 0);
setprop("/controls/lighting/overhead-panel-knb", 0);
atc.transponderPanel.modeSwitch(1);
libraries.systemsInit();
failResetOld();
@ -345,12 +348,15 @@ var beforestart = func {
}
var beforestart_b = func {
# Continue with engine start prep.
setprop("/controls/fuel/tank0pump1", 1);
setprop("/controls/fuel/tank0pump2", 1);
setprop("/controls/fuel/tank1pump1", 1);
setprop("/controls/fuel/tank1pump2", 1);
setprop("/controls/fuel/tank2pump1", 1);
setprop("/controls/fuel/tank2pump2", 1);
systems.FUEL.Switches.pumpLeft1.setValue(1);
systems.FUEL.Switches.pumpLeft2.setValue(1);
systems.FUEL.Switches.pumpCenter1.setValue(1);
systems.FUEL.Switches.pumpCenter2.setValue(1);
systems.FUEL.Switches.pumpRight1.setValue(1);
systems.FUEL.Switches.pumpRight2.setValue(1);
setprop("/controls/lighting/fcu-panel-knb", 1);
setprop("/controls/lighting/main-panel-knb", 1);
setprop("/controls/lighting/overhead-panel-knb", 1);
setprop("/controls/electrical/switches/apu", 1);
setprop("/controls/electrical/switches/galley", 1);
setprop("/controls/electrical/switches/gen-1", 1);
@ -363,6 +369,12 @@ var beforestart_b = func {
setprop("/controls/adirs/ir[0]/knob","1");
setprop("/controls/adirs/ir[1]/knob","1");
setprop("/controls/adirs/ir[2]/knob","1");
systems.ADIRSControlPanel.adrSw(0);
systems.ADIRSControlPanel.adrSw(1);
systems.ADIRSControlPanel.adrSw(2);
systems.ADIRSControlPanel.irModeSw(0, 1);
systems.ADIRSControlPanel.irModeSw(1, 1);
systems.ADIRSControlPanel.irModeSw(2, 1);
systems.ADIRS.skip(0);
systems.ADIRS.skip(1);
systems.ADIRS.skip(2);
@ -427,12 +439,15 @@ var taxi = func {
}
var taxi_b = func {
# Continue with engine start prep, and start engines.
setprop("/controls/fuel/tank0pump1", 1);
setprop("/controls/fuel/tank0pump2", 1);
setprop("/controls/fuel/tank1pump1", 1);
setprop("/controls/fuel/tank1pump2", 1);
setprop("/controls/fuel/tank2pump1", 1);
setprop("/controls/fuel/tank2pump2", 1);
systems.FUEL.Switches.pumpLeft1.setValue(1);
systems.FUEL.Switches.pumpLeft2.setValue(1);
systems.FUEL.Switches.pumpCenter1.setValue(1);
systems.FUEL.Switches.pumpCenter2.setValue(1);
systems.FUEL.Switches.pumpRight1.setValue(1);
systems.FUEL.Switches.pumpRight2.setValue(1);
setprop("/controls/lighting/fcu-panel-knb", 1);
setprop("/controls/lighting/main-panel-knb", 1);
setprop("/controls/lighting/overhead-panel-knb", 1);
setprop("/controls/electrical/switches/apu", 1);
setprop("/controls/electrical/switches/galley", 1);
setprop("/controls/electrical/switches/gen-1", 1);
@ -445,6 +460,12 @@ var taxi_b = func {
setprop("/controls/adirs/ir[0]/knob","1");
setprop("/controls/adirs/ir[1]/knob","1");
setprop("/controls/adirs/ir[2]/knob","1");
systems.ADIRSControlPanel.adrSw(0);
systems.ADIRSControlPanel.adrSw(1);
systems.ADIRSControlPanel.adrSw(2);
systems.ADIRSControlPanel.irModeSw(0, 1);
systems.ADIRSControlPanel.irModeSw(1, 1);
systems.ADIRSControlPanel.irModeSw(2, 1);
systems.ADIRS.skip(0);
systems.ADIRS.skip(1);
systems.ADIRS.skip(2);

View file

@ -57,7 +57,7 @@
<checkbox>
<label>ELAC1</label>
<halign>left</halign>
<property>/systems/failures/elac1</property>
<property>/systems/failures/fctl/elac1</property>
<binding>
<command>dialog-apply</command>
</binding>
@ -67,7 +67,7 @@
<checkbox>
<label>ELAC2</label>
<halign>left</halign>
<property>/systems/failures/elac2</property>
<property>/systems/failures/fctl/elac2</property>
<binding>
<command>dialog-apply</command>
</binding>
@ -77,7 +77,7 @@
<checkbox>
<label>SEC1</label>
<halign>left</halign>
<property>/systems/failures/sec1</property>
<property>/systems/failures/fctl/sec1</property>
<binding>
<command>dialog-apply</command>
</binding>
@ -87,7 +87,7 @@
<checkbox>
<label>SEC2</label>
<halign>left</halign>
<property>/systems/failures/sec2</property>
<property>/systems/failures/fctl/sec2</property>
<binding>
<command>dialog-apply</command>
</binding>
@ -97,17 +97,7 @@
<checkbox>
<label>SEC3</label>
<halign>left</halign>
<property>/systems/failures/sec3</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>FAC2</label>
<halign>left</halign>
<property>/systems/failures/fac2</property>
<property>/systems/failures/fctl/sec3</property>
<binding>
<command>dialog-apply</command>
</binding>
@ -117,7 +107,17 @@
<checkbox>
<label>FAC1</label>
<halign>left</halign>
<property>/systems/failures/fac1</property>
<property>/systems/failures/fctl/fac1</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>FAC2</label>
<halign>left</halign>
<property>/systems/failures/fctl/fac2</property>
<binding>
<command>dialog-apply</command>
</binding>

View file

@ -6,6 +6,15 @@
<PropertyList>
<nasal>
<close>
<![CDATA[
systems.FUEL.Nodes.requestLbs.setValue(0);
]]>
</close>
</nasal>
<name>fuel-dlg</name>
<layout>vbox</layout>
@ -132,11 +141,22 @@
<binding>
<command>nasal</command>
<script>
if ((getprop("/services/fuel-truck/enable") == 1) and (getprop("/services/fuel-truck/connect") == 1)) {
systems.fuelSvc.refuel();
screen.log.write("Refueling process started.", 0, 0.584, 1);
} else
screen.log.write("Please Enable and Connect the Fuel Truck First!", 1, 0, 0);
<![CDATA[
if (systems.fuelSvc.Nodes.requestLbs.getValue() > 0) {
if ((getprop("/services/fuel-truck/enable") == 1) and getprop("/services/fuel-truck/connect") == 1) {
if (systems.fuelSvc.Nodes.requestTotalLbs.getValue() - pts.Consumables.Fuel.totalFuelLbs.getValue() > 0) {
systems.fuelSvc.refuel();
screen.log.write("Refueling process started.", 0, 0.584, 1);
} else {
screen.log.write("Refuelling complete.", 0, 0.584, 1);
}
} else {
screen.log.write("Please Enable and Connect the Fuel Truck First!", 1, 0, 0);
}
} else {
screen.log.write("Refuelling quantity incorrect.", 0, 0.584, 1);
}
]]>
</script>
</binding>
</button>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
@ -308,6 +308,87 @@
</offsets>
</model>
<!-- Tire smoke and spray effects -->
<model>
<path>Aircraft/Generic/Effects/tyre-smoke-nose.xml</path>
<name>tyre-smoke-n</name>
<offsets>
<x-m>7.83</x-m>
<y-m>0</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/tyre-smoke-port.xml</path>
<name>tyre-smoke-p</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>-3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/tyre-smoke-stbd.xml</path>
<name>tyre-smoke-s</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/rain-nose.xml</path>
<name>rain-splash-n</name>
<offsets>
<x-m>7.83</x-m>
<y-m>0</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/rain-port.xml</path>
<name>rain-splash-p</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>-3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/rain-stbd.xml</path>
<name>rain-splash-s</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/A320-family/Models/Effects/tire-smoke-left.xml</path>
<name>tire-smoke-l</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>-3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/A320-family/Models/Effects/tire-smoke-right.xml</path>
<name>tire-smoke-r</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<!-- Other non-aircraft models -->
<model>
<name>Pushback</name>
@ -319,6 +400,43 @@
</offsets>
</model>
<!--Firetruck-->
<model>
<name>Firetruck1</name>
<path>Models/Airport/Vehicle/hoskosh-ti-1500.ac</path>
<offsets>
<x-m>60.0</x-m>
<y-m>10.0</y-m>
<z-m>-4.4</z-m>
</offsets>
</model>
<model>
<name>Firetruck2</name>
<path>Models/Airport/Vehicle/hoskosh-ti-1500.ac</path>
<offsets>
<x-m>80.0</x-m>
<y-m>-8.0</y-m>
<z-m>-4.4</z-m>
</offsets>
</model>
<animation>
<type>select</type>
<object-name>Firetruck1</object-name>
<object-name>Firetruck2</object-name>
<condition>
<and>
<property>sim/animation/fire-services</property>
<less-than>
<property>velocities/groundspeed-kt</property>
<value>40</value>
</less-than>
</and>
</condition>
</animation>
<!-- LIVERY SELECT -->
<!-- Animation -->
<animation>

View file

@ -338,6 +338,87 @@
</offsets>
</model>
<!-- Tire smoke and spray effects -->
<model>
<path>Aircraft/Generic/Effects/tyre-smoke-nose.xml</path>
<name>tyre-smoke-n</name>
<offsets>
<x-m>7.83</x-m>
<y-m>0</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/tyre-smoke-port.xml</path>
<name>tyre-smoke-p</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>-3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/tyre-smoke-stbd.xml</path>
<name>tyre-smoke-s</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/rain-nose.xml</path>
<name>rain-splash-n</name>
<offsets>
<x-m>7.83</x-m>
<y-m>0</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/rain-port.xml</path>
<name>rain-splash-p</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>-3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/rain-stbd.xml</path>
<name>rain-splash-s</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/A320-family/Models/Effects/tire-smoke-left.xml</path>
<name>tire-smoke-l</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>-3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/A320-family/Models/Effects/tire-smoke-right.xml</path>
<name>tire-smoke-r</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<!-- Other non-aircraft models -->
<model>
<name>Pushback</name>
@ -349,6 +430,43 @@
</offsets>
</model>
<!--Firetruck-->
<model>
<name>Firetruck1</name>
<path>Models/Airport/Vehicle/hoskosh-ti-1500.ac</path>
<offsets>
<x-m>60.0</x-m>
<y-m>10.0</y-m>
<z-m>-4.4</z-m>
</offsets>
</model>
<model>
<name>Firetruck2</name>
<path>Models/Airport/Vehicle/hoskosh-ti-1500.ac</path>
<offsets>
<x-m>80.0</x-m>
<y-m>-8.0</y-m>
<z-m>-4.4</z-m>
</offsets>
</model>
<animation>
<type>select</type>
<object-name>Firetruck1</object-name>
<object-name>Firetruck2</object-name>
<condition>
<and>
<property>sim/animation/fire-services</property>
<less-than>
<property>velocities/groundspeed-kt</property>
<value>40</value>
</less-than>
</and>
</condition>
</animation>
<!-- LIVERY SELECT -->
<!-- Animation -->
<animation>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
@ -115,6 +115,7 @@
<x-m>32.2535728</x-m>
</offsets>
</model>
<!-- Lights -->
<model>
@ -336,7 +337,88 @@
<z-m>-1.25</z-m>
</offsets>
</model>
<!-- Tire smoke and spray effects -->
<model>
<path>Aircraft/Generic/Effects/tyre-smoke-nose.xml</path>
<name>tyre-smoke-n</name>
<offsets>
<x-m>7.83</x-m>
<y-m>0</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/tyre-smoke-port.xml</path>
<name>tyre-smoke-p</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>-3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/tyre-smoke-stbd.xml</path>
<name>tyre-smoke-s</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/rain-nose.xml</path>
<name>rain-splash-n</name>
<offsets>
<x-m>7.83</x-m>
<y-m>0</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/rain-port.xml</path>
<name>rain-splash-p</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>-3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/rain-stbd.xml</path>
<name>rain-splash-s</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/A320-family/Models/Effects/tire-smoke-left.xml</path>
<name>tire-smoke-l</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>-3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/A320-family/Models/Effects/tire-smoke-right.xml</path>
<name>tire-smoke-r</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<!-- Other non-aircraft models -->
<model>
<name>Pushback</name>
@ -348,6 +430,43 @@
</offsets>
</model>
<!--Firetruck-->
<model>
<name>Firetruck1</name>
<path>Models/Airport/Vehicle/hoskosh-ti-1500.ac</path>
<offsets>
<x-m>60.0</x-m>
<y-m>10.0</y-m>
<z-m>-4.4</z-m>
</offsets>
</model>
<model>
<name>Firetruck2</name>
<path>Models/Airport/Vehicle/hoskosh-ti-1500.ac</path>
<offsets>
<x-m>80.0</x-m>
<y-m>-8.0</y-m>
<z-m>-4.4</z-m>
</offsets>
</model>
<animation>
<type>select</type>
<object-name>Firetruck1</object-name>
<object-name>Firetruck2</object-name>
<condition>
<and>
<property>sim/animation/fire-services</property>
<less-than>
<property>velocities/groundspeed-kt</property>
<value>40</value>
</less-than>
</and>
</condition>
</animation>
<!-- LIVERY SELECT -->
<!-- Animation -->
<animation>

View file

@ -317,6 +317,87 @@
</offsets>
</model>
<!-- Tire smoke and spray effects -->
<model>
<path>Aircraft/Generic/Effects/tyre-smoke-nose.xml</path>
<name>tyre-smoke-n</name>
<offsets>
<x-m>7.83</x-m>
<y-m>0</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/tyre-smoke-port.xml</path>
<name>tyre-smoke-p</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>-3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/tyre-smoke-stbd.xml</path>
<name>tyre-smoke-s</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/rain-nose.xml</path>
<name>rain-splash-n</name>
<offsets>
<x-m>7.83</x-m>
<y-m>0</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/rain-port.xml</path>
<name>rain-splash-p</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>-3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/rain-stbd.xml</path>
<name>rain-splash-s</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/A320-family/Models/Effects/tire-smoke-left.xml</path>
<name>tire-smoke-l</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>-3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/A320-family/Models/Effects/tire-smoke-right.xml</path>
<name>tire-smoke-r</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<!-- Other non-aircraft models -->
<model>
<name>Pushback</name>
@ -328,6 +409,43 @@
</offsets>
</model>
<!--Firetruck-->
<model>
<name>Firetruck1</name>
<path>Models/Airport/Vehicle/hoskosh-ti-1500.ac</path>
<offsets>
<x-m>60.0</x-m>
<y-m>10.0</y-m>
<z-m>-4.4</z-m>
</offsets>
</model>
<model>
<name>Firetruck2</name>
<path>Models/Airport/Vehicle/hoskosh-ti-1500.ac</path>
<offsets>
<x-m>80.0</x-m>
<y-m>-8.0</y-m>
<z-m>-4.4</z-m>
</offsets>
</model>
<animation>
<type>select</type>
<object-name>Firetruck1</object-name>
<object-name>Firetruck2</object-name>
<condition>
<and>
<property>sim/animation/fire-services</property>
<less-than>
<property>velocities/groundspeed-kt</property>
<value>40</value>
</less-than>
</and>
</condition>
</animation>
<!-- LIVERY SELECT -->
<!-- Animation -->
<animation>
@ -358,7 +476,6 @@
</unload>
</nasal>
<!-- Ground Services -->
<model>
<name>ground_services</name>

View file

@ -317,6 +317,87 @@
</offsets>
</model>
<!-- Tire smoke and spray effects -->
<model>
<path>Aircraft/Generic/Effects/tyre-smoke-nose.xml</path>
<name>tyre-smoke-n</name>
<offsets>
<x-m>7.83</x-m>
<y-m>0</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/tyre-smoke-port.xml</path>
<name>tyre-smoke-p</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>-3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/tyre-smoke-stbd.xml</path>
<name>tyre-smoke-s</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/rain-nose.xml</path>
<name>rain-splash-n</name>
<offsets>
<x-m>7.83</x-m>
<y-m>0</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/rain-port.xml</path>
<name>rain-splash-p</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>-3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/Generic/Effects/rain-stbd.xml</path>
<name>rain-splash-s</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/A320-family/Models/Effects/tire-smoke-left.xml</path>
<name>tire-smoke-l</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>-3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<model>
<path>Aircraft/A320-family/Models/Effects/tire-smoke-right.xml</path>
<name>tire-smoke-r</name>
<offsets>
<x-m>20.3180764</x-m>
<y-m>3.795</y-m>
<z-m>-3.9669424</z-m>
</offsets>
</model>
<!-- Other non-aircraft models -->
<model>
<name>Pushback</name>
@ -328,6 +409,43 @@
</offsets>
</model>
<!--Firetruck-->
<model>
<name>Firetruck1</name>
<path>Models/Airport/Vehicle/hoskosh-ti-1500.ac</path>
<offsets>
<x-m>60.0</x-m>
<y-m>10.0</y-m>
<z-m>-4.4</z-m>
</offsets>
</model>
<model>
<name>Firetruck2</name>
<path>Models/Airport/Vehicle/hoskosh-ti-1500.ac</path>
<offsets>
<x-m>80.0</x-m>
<y-m>-8.0</y-m>
<z-m>-4.4</z-m>
</offsets>
</model>
<animation>
<type>select</type>
<object-name>Firetruck1</object-name>
<object-name>Firetruck2</object-name>
<condition>
<and>
<property>sim/animation/fire-services</property>
<less-than>
<property>velocities/groundspeed-kt</property>
<value>40</value>
</less-than>
</and>
</condition>
</animation>
<!-- LIVERY SELECT -->
<!-- Animation -->
<animation>

View file

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0"?>
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
@ -17,8 +17,10 @@
</offsets>
<condition>
<property>gear/gear[1]/tyre-smoke</property>
<value>1</value>
<equals>
<property>gear/Lbrake-smoke</property>
<value>1</value>
</equals>
</condition>
<attach>world</attach>
@ -48,9 +50,9 @@
<counter>
<particles-per-sec>
<property>velocities/speed-down-fps</property>
<factor>1</factor>
<spread>50</spread>
<property>gear/Lbrake-thermal-energy</property>
<factor>20</factor>
<spread>70</spread>
</particles-per-sec>
</counter>
@ -110,4 +112,4 @@
</particlesystem>
</PropertyList>
</PropertyList>

View file

@ -1,113 +0,0 @@
<?xml version="1.0"?>
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
<PropertyList>
<particlesystem>
<name>tyre-smoke-n</name>
<texture>tiresmoke.png</texture>
<emissive>false</emissive>
<lighting>false</lighting>
<offsets>
<x-m>0</x-m>
<y-m>0</y-m>
<z-m>0</z-m>
</offsets>
<condition>
<property>gear/gear[0]/tyre-smoke</property>
<value>1</value>
</condition>
<attach>world</attach>
<placer>
<type>point</type>
</placer>
<shooter>
<theta-min-deg>45</theta-min-deg>
<theta-max-deg>85</theta-max-deg>
<phi-min-deg>-60</phi-min-deg>
<phi-max-deg>60</phi-max-deg>
<speed-mps>
<value>50</value>
<spread>5</spread>
</speed-mps>
<rotation-speed>
<x-max-deg-sec>15</x-max-deg-sec>
<x-min-deg-sec>-15</x-min-deg-sec>
<y-max-deg-sec>15</y-max-deg-sec>
<y-min-deg-sec>-15</y-min-deg-sec>
<z-max-deg-sec>15</z-max-deg-sec>
<z-min-deg-sec>-15</z-min-deg-sec>
</rotation-speed>
</shooter>
<counter>
<particles-per-sec>
<property>velocities/speed-down-fps</property>
<factor>1</factor>
<spread>50</spread>
</particles-per-sec>
</counter>
<align>billboard</align>
<particle>
<start>
<color>
<red>
<value>0.8</value>
</red>
<green>
<value>0.8</value>
</green>
<blue>
<value>0.8</value>
</blue>
<alpha>
<value>0.5</value>
</alpha>
</color>
<size>
<value>1.5</value>
</size>
</start>
<end>
<color>
<red>
<value>0.7</value>
</red>
<green>
<value>0.7</value>
</green>
<blue>
<value>0.7</value>
</blue>
<alpha>
<value>0.005</value>
</alpha>
</color>
<size>
<value>10</value>
</size>
</end>
<life-sec>
<value>1</value>
</life-sec>
<mass-kg>0.025</mass-kg>
<radius-m>0.175</radius-m>
</particle>
<program>
<fluid>air</fluid>
<gravity>false</gravity>
<wind>true</wind>
</program>
</particlesystem>
</PropertyList>

View file

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0"?>
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
@ -17,8 +17,10 @@
</offsets>
<condition>
<property>gear/gear[2]/tyre-smoke</property>
<value>1</value>
<equals>
<property>gear/Rbrake-smoke</property>
<value>1</value>
</equals>
</condition>
<attach>world</attach>
@ -48,9 +50,9 @@
<counter>
<particles-per-sec>
<property>velocities/speed-down-fps</property>
<factor>1</factor>
<spread>50</spread>
<property>gear/Rbrake-thermal-energy</property>
<factor>20</factor>
<spread>70</spread>
</particles-per-sec>
</counter>
@ -110,4 +112,4 @@
</particlesystem>
</PropertyList>
</PropertyList>

View file

@ -1,122 +0,0 @@
<?xml version="1.0"?>
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
<PropertyList>
<particlesystem>
<name>tyre-smoke-l</name>
<texture>tiresmoke.png</texture>
<emissive>false</emissive>
<lighting>false</lighting>
<offsets>
<x-m>0</x-m>
<y-m>0</y-m>
<z-m>0</z-m>
</offsets>
<condition>
<and>
<greater-than>
<property>environment/rain-norm</property>
<value>0.2</value>
</greater-than>
<greater-than>
<property>velocities/groundspeed-kt</property>
<value>60</value>
</greater-than>
<property>gear/gear[0]/wow</property>
<value>1</value>
</and>
</condition>
<attach>world</attach>
<placer>
<type>point</type>
</placer>
<shooter>
<theta-min-deg>45</theta-min-deg>
<theta-max-deg>85</theta-max-deg>
<phi-min-deg>-60</phi-min-deg>
<phi-max-deg>60</phi-max-deg>
<speed-mps>
<value>50</value>
<spread>5</spread>
</speed-mps>
<rotation-speed>
<x-max-deg-sec>15</x-max-deg-sec>
<x-min-deg-sec>-15</x-min-deg-sec>
<y-max-deg-sec>15</y-max-deg-sec>
<y-min-deg-sec>-15</y-min-deg-sec>
<z-max-deg-sec>15</z-max-deg-sec>
<z-min-deg-sec>-15</z-min-deg-sec>
</rotation-speed>
</shooter>
<counter>
<particles-per-sec>
<value>40</value>
<spread>70</spread>
</particles-per-sec>
</counter>
<align>billboard</align>
<particle>
<start>
<color>
<red>
<value>0.8</value>
</red>
<green>
<value>0.8</value>
</green>
<blue>
<value>0.8</value>
</blue>
<alpha>
<value>0.8</value>
</alpha>
</color>
<size>
<value>1.5</value>
</size>
</start>
<end>
<color>
<red>
<value>0.7</value>
</red>
<green>
<value>0.7</value>
</green>
<blue>
<value>0.7</value>
</blue>
<alpha>
<value>0.005</value>
</alpha>
</color>
<size>
<value>10</value>
</size>
</end>
<life-sec>
<value>1</value>
</life-sec>
<mass-kg>0.001</mass-kg>
<radius-m>0.25</radius-m>
</particle>
<program>
<fluid>air</fluid>
<gravity>false</gravity>
<wind>true</wind>
</program>
</particlesystem>
</PropertyList>

View file

@ -1,122 +0,0 @@
<?xml version="1.0"?>
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
<PropertyList>
<particlesystem>
<name>tyre-smoke-l</name>
<texture>tiresmoke.png</texture>
<emissive>false</emissive>
<lighting>false</lighting>
<offsets>
<x-m>0</x-m>
<y-m>0</y-m>
<z-m>0</z-m>
</offsets>
<condition>
<and>
<greater-than>
<property>environment/rain-norm</property>
<value>0.2</value>
</greater-than>
<greater-than>
<property>velocities/groundspeed-kt</property>
<value>60</value>
</greater-than>>
<property>gear/gear[1]/wow</property>
<value>1</value>
</and>
</condition>
<attach>world</attach>
<placer>
<type>point</type>
</placer>
<shooter>
<theta-min-deg>45</theta-min-deg>
<theta-max-deg>85</theta-max-deg>
<phi-min-deg>-60</phi-min-deg>
<phi-max-deg>60</phi-max-deg>
<speed-mps>
<value>50</value>
<spread>5</spread>
</speed-mps>
<rotation-speed>
<x-max-deg-sec>15</x-max-deg-sec>
<x-min-deg-sec>-15</x-min-deg-sec>
<y-max-deg-sec>15</y-max-deg-sec>
<y-min-deg-sec>-15</y-min-deg-sec>
<z-max-deg-sec>15</z-max-deg-sec>
<z-min-deg-sec>-15</z-min-deg-sec>
</rotation-speed>
</shooter>
<counter>
<particles-per-sec>
<value>40</value>
<spread>70</spread>
</particles-per-sec>
</counter>
<align>billboard</align>
<particle>
<start>
<color>
<red>
<value>0.8</value>
</red>
<green>
<value>0.8</value>
</green>
<blue>
<value>0.8</value>
</blue>
<alpha>
<value>0.8</value>
</alpha>
</color>
<size>
<value>1.5</value>
</size>
</start>
<end>
<color>
<red>
<value>0.7</value>
</red>
<green>
<value>0.7</value>
</green>
<blue>
<value>0.7</value>
</blue>
<alpha>
<value>0.005</value>
</alpha>
</color>
<size>
<value>10</value>
</size>
</end>
<life-sec>
<value>0.8</value>
</life-sec>
<mass-kg>0.0005</mass-kg>
<radius-m>0.4</radius-m>
</particle>
<program>
<fluid>air</fluid>
<gravity>false</gravity>
<wind>true</wind>
</program>
</particlesystem>
</PropertyList>

View file

@ -6,6 +6,19 @@
<path>../Models/a320.nacelle.cfm.ac</path>
<!-- Reverse thrust animation -->
<animation>
<type>translate</type>
<object-name>Reverser</object-name>
<property alias="../../params/reverser-pos-norm" />
<factor>0.50</factor>
<axis>
<x>1</x>
<y>0</y>
<z>0</z>
</axis>
</animation>
<!-- Chrome shader -->
<animation>
<name>Chrome shader</name>

View file

@ -1209,7 +1209,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>libraries.LowerECAM.button("sts");</script>
<script>libraries.ECAMControlPanel.sysPageBtn("sts");</script>
</binding>
</action>
</animation>
@ -1228,7 +1228,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>libraries.LowerECAM.button("apu");</script>
<script>libraries.ECAMControlPanel.sysPageBtn("apu");</script>
</binding>
</action>
</animation>
@ -1247,7 +1247,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>libraries.LowerECAM.button("bleed");</script>
<script>libraries.ECAMControlPanel.sysPageBtn("bleed");</script>
</binding>
</action>
</animation>
@ -1266,7 +1266,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>libraries.LowerECAM.button("press");</script>
<script>libraries.ECAMControlPanel.sysPageBtn("press");</script>
</binding>
</action>
</animation>
@ -1285,7 +1285,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>libraries.LowerECAM.button("elec");</script>
<script>libraries.ECAMControlPanel.sysPageBtn("elec");</script>
</binding>
</action>
</animation>
@ -1304,7 +1304,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>libraries.LowerECAM.button("hyd");</script>
<script>libraries.ECAMControlPanel.sysPageBtn("hyd");</script>
</binding>
</action>
</animation>
@ -1323,7 +1323,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>libraries.LowerECAM.button("fuel");</script>
<script>libraries.ECAMControlPanel.sysPageBtn("fuel");</script>
</binding>
</action>
</animation>
@ -1342,7 +1342,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>libraries.LowerECAM.button("eng");</script>
<script>libraries.ECAMControlPanel.sysPageBtn("eng");</script>
</binding>
</action>
</animation>
@ -1361,7 +1361,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>libraries.LowerECAM.button("cond");</script>
<script>libraries.ECAMControlPanel.sysPageBtn("cond");</script>
</binding>
</action>
</animation>
@ -1380,7 +1380,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>libraries.LowerECAM.button("door");</script>
<script>libraries.ECAMControlPanel.sysPageBtn("door");</script>
</binding>
</action>
</animation>
@ -1399,7 +1399,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>libraries.LowerECAM.button("wheel");</script>
<script>libraries.ECAMControlPanel.sysPageBtn("wheel");</script>
</binding>
</action>
</animation>
@ -1418,7 +1418,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>libraries.LowerECAM.button("fctl");</script>
<script>libraries.ECAMControlPanel.sysPageBtn("fctl");</script>
</binding>
</action>
</animation>
@ -1655,6 +1655,23 @@
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>ecam_sts_led</object-name>
<condition>
<or>
<equals>
<property>ECAM/Lower/light/sts</property>
<value>1</value>
</equals>
<equals>
<property>controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>pick</type>
@ -1671,7 +1688,7 @@
</condition>
<command>nasal</command>
<script>
ecam.ECAM_controller.recall();
libraries.ECAMControlPanel.rclBtn();
ecam.FWC.Btn.recall.setValue(1);
</script>
</binding>
@ -1702,7 +1719,7 @@
</condition>
<command>nasal</command>
<script>
libraries.LowerECAM.button("clr");
libraries.ECAMControlPanel.clrBtn();
ecam.FWC.Btn.clr.setValue(1);
</script>
</binding>
@ -6070,7 +6087,66 @@
</binding>
</action>
</animation>
<animation>
<type>rotate</type>
<object-name>ecam_air_data</object-name>
<object-name>ecam_air_data.mark</object-name>
<factor>30</factor>
<property>/controls/navigation/switching/air-data</property>
<axis>
<x1-m>-0.428673</x1-m>
<y1-m>-0.022557</y1-m>
<z1-m>-0.051784</z1-m>
<x2-m>-0.430086</x2-m>
<y2-m>-0.022557</y2-m>
<z2-m>-0.060321</z2-m>
</axis>
</animation>
<animation>
<type>pick</type>
<object-name>ecam_air_data</object-name>
<action>
<button>0</button>
<button>3</button>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>
if (systems.SwitchingPanel.Switches.airData.getValue() != 1) {
systems.SwitchingPanel.doAirData(systems.SwitchingPanel.Switches.airData.getValue() + 1);
} else {
systems.SwitchingPanel.doAirData(-1);
}
</script>
</binding>
<binding>
<command>nasal</command>
<script>setprop("/sim/sounde/knb1", 1);</script>
</binding>
</action>
<action>
<button>2</button>
<button>4</button>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>
if (systems.SwitchingPanel.Switches.airData.getValue() != -1) {
systems.SwitchingPanel.doAirData(systems.SwitchingPanel.Switches.airData.getValue() - 1);
} else {
systems.SwitchingPanel.doAirData(1);
}
</script>
</binding>
<binding>
<command>nasal</command>
<script>setprop("/sim/sounde/knb1", 1);</script>
</binding>
</action>
</animation>
<!-- Z Colors/Effects -->
<animation>
<type>material</type>

View file

@ -548,8 +548,22 @@ var canvas_lowerECAM_base = {
}
},
updateBottomStatus: func() {
me["TAT"].setText(sprintf("%2.0f", temperature_degc.getValue()));
me["SAT"].setText(sprintf("%2.0f", temperature_degc.getValue()));
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setColor(0.7333,0.3803,0);
}
me["UTCh"].setText(sprintf("%02d", hour.getValue()));
me["UTCm"].setText(sprintf("%02d", minute.getValue()));
if (acconfig_weight_kgs.getValue() == 1) {
@ -989,8 +1003,14 @@ var canvas_lowerECAM_crz = {
if (acconfig_weight_kgs.getValue() == 1) {
me["Fused-weight-unit"].setText("KG");
me["FUsed1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue() * LBS2KGS, 10)));
me["FUsed2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue() * LBS2KGS, 10)));
me["FUsed"].setText(sprintf("%s", (math.round(fuel_used_lbs1.getValue() * LBS2KGS, 10) + math.round(fuel_used_lbs2.getValue(), 10))));
} else {
me["Fused-weight-unit"].setText("LBS");
me["FUsed1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue(), 10)));
me["FUsed2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue(), 10)));
me["FUsed"].setText(sprintf("%s", (math.round(fuel_used_lbs1.getValue(), 10) + math.round(fuel_used_lbs2.getValue(), 10))));
}
me.updateBottomStatus();

View file

@ -61,7 +61,6 @@
<object-name>IR2Btn2A</object-name>
<object-name>IR3Btn1F</object-name>
<object-name>IR3Btn2A</object-name>
<object-name>IrsOnBatLightOB</object-name>
<object-name>RamAirBtn2O</object-name>
<object-name>SEC1Btn1F</object-name>
<object-name>SEC1Btn2O</object-name>
@ -521,11 +520,14 @@
<button>3</button>
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>controls/adirs/ir[0]/knob</property>
<value>0</value>
<value>1</value>
<value>2</value>
<command>nasal</command>
<script>
if (systems.ADIRSnew.Switches.irModeSw[0].getValue() != 2) {
systems.ADIRSControlPanel.irModeSw(0, systems.ADIRSnew.Switches.irModeSw[0].getValue() + 1);
} else {
systems.ADIRSControlPanel.irModeSw(0, 0);
}
</script>
</binding>
<binding>
<command>nasal</command>
@ -537,11 +539,14 @@
<button>4</button>
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>controls/adirs/ir[0]/knob</property>
<value>2</value>
<value>1</value>
<value>0</value>
<command>nasal</command>
<script>
if (systems.ADIRSnew.Switches.irModeSw[0].getValue() != 0) {
systems.ADIRSControlPanel.irModeSw(0, systems.ADIRSnew.Switches.irModeSw[0].getValue() - 1);
} else {
systems.ADIRSControlPanel.irModeSw(0, 2);
}
</script>
</binding>
<binding>
<command>nasal</command>
@ -553,7 +558,7 @@
<animation>
<type>rotate</type>
<object-name>IR1ModeKnb</object-name>
<property>controls/adirs/ir[0]/knob</property>
<property>controls/navigation/adirscp/switches/ir-1-mode</property>
<interpolation>
<entry><ind>0</ind><dep>-35</dep></entry>
<entry><ind>1</ind><dep>0</dep></entry>
@ -575,7 +580,7 @@
<condition>
<or>
<equals>
<property>controls/adirs/ir[0]/fault</property>
<property>controls/navigation/adirscp/lights/ir-1-fault</property>
<value>1</value>
</equals>
<equals>
@ -591,7 +596,7 @@
<condition>
<or>
<equals>
<property>controls/adirs/ir[0]/align</property>
<property>controls/navigation/adirscp/lights/ir-1-off</property>
<value>1</value>
</equals>
<equals>
@ -611,11 +616,14 @@
<button>3</button>
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>controls/adirs/ir[1]/knob</property>
<value>0</value>
<value>1</value>
<value>2</value>
<command>nasal</command>
<script>
if (systems.ADIRSnew.Switches.irModeSw[1].getValue() != 2) {
systems.ADIRSControlPanel.irModeSw(1, systems.ADIRSnew.Switches.irModeSw[1].getValue() + 1);
} else {
systems.ADIRSControlPanel.irModeSw(1, 0);
}
</script>
</binding>
<binding>
<command>nasal</command>
@ -627,11 +635,14 @@
<button>4</button>
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>controls/adirs/ir[1]/knob</property>
<value>2</value>
<value>1</value>
<value>0</value>
<command>nasal</command>
<script>
if (systems.ADIRSnew.Switches.irModeSw[1].getValue() != 0) {
systems.ADIRSControlPanel.irModeSw(1, systems.ADIRSnew.Switches.irModeSw[1].getValue() - 1);
} else {
systems.ADIRSControlPanel.irModeSw(1, 2);
}
</script>
</binding>
<binding>
<command>nasal</command>
@ -643,7 +654,7 @@
<animation>
<type>rotate</type>
<object-name>IR2ModeKnb</object-name>
<property>controls/adirs/ir[1]/knob</property>
<property>controls/navigation/adirscp/switches/ir-2-mode</property>
<interpolation>
<entry><ind>0</ind><dep>-35</dep></entry>
<entry><ind>1</ind><dep>0</dep></entry>
@ -665,7 +676,7 @@
<condition>
<or>
<equals>
<property>controls/adirs/ir[1]/fault</property>
<property>controls/navigation/adirscp/lights/ir-2-fault</property>
<value>1</value>
</equals>
<equals>
@ -681,7 +692,7 @@
<condition>
<or>
<equals>
<property>controls/adirs/ir[1]/align</property>
<property>controls/navigation/adirscp/lights/ir-2-off</property>
<value>1</value>
</equals>
<equals>
@ -701,11 +712,14 @@
<button>3</button>
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>controls/adirs/ir[2]/knob</property>
<value>0</value>
<value>1</value>
<value>2</value>
<command>nasal</command>
<script>
if (systems.ADIRSnew.Switches.irModeSw[2].getValue() != 2) {
systems.ADIRSControlPanel.irModeSw(2, systems.ADIRSnew.Switches.irModeSw[2].getValue() + 1);
} else {
systems.ADIRSControlPanel.irModeSw(2, 0);
}
</script>
</binding>
<binding>
<command>nasal</command>
@ -717,11 +731,14 @@
<button>4</button>
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>controls/adirs/ir[2]/knob</property>
<value>2</value>
<value>1</value>
<value>0</value>
<command>nasal</command>
<script>
if (systems.ADIRSnew.Switches.irModeSw[2].getValue() != 0) {
systems.ADIRSControlPanel.irModeSw(2, systems.ADIRSnew.Switches.irModeSw[2].getValue() - 1);
} else {
systems.ADIRSControlPanel.irModeSw(2, 2);
}
</script>
</binding>
<binding>
<command>nasal</command>
@ -733,7 +750,7 @@
<animation>
<type>rotate</type>
<object-name>IR3ModeKnb</object-name>
<property>controls/adirs/ir[2]/knob</property>
<property>controls/navigation/adirscp/switches/ir-3-mode</property>
<interpolation>
<entry><ind>0</ind><dep>-35</dep></entry>
<entry><ind>1</ind><dep>0</dep></entry>
@ -755,7 +772,7 @@
<condition>
<or>
<equals>
<property>controls/adirs/ir[2]/fault</property>
<property>controls/navigation/adirscp/lights/ir-3-fault</property>
<value>1</value>
</equals>
<equals>
@ -771,7 +788,7 @@
<condition>
<or>
<equals>
<property>controls/adirs/ir[2]/align</property>
<property>controls/navigation/adirscp/lights/ir-3-off</property>
<value>1</value>
</equals>
<equals>
@ -789,7 +806,7 @@
<condition>
<or>
<equals>
<property>controls/adirs/onbat</property>
<property>controls/navigation/adirscp/lights/on-bat</property>
<value>1</value>
</equals>
<equals>
@ -818,8 +835,8 @@
<value>25</value>
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>controls/adirs/adr[0]/off</property>
<command>nasal</command>
<script>systems.ADIRSControlPanel.adrSw(0);</script>
</binding>
<binding>
<command>nasal</command>
@ -834,7 +851,7 @@
<condition>
<or>
<equals>
<property>controls/adirs/adr[0]/fault</property>
<property>controls/navigation/adirscp/lights/adr-1-fault</property>
<value>1</value>
</equals>
<equals>
@ -844,13 +861,14 @@
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>ADR1Btn2O</object-name>
<condition>
<or>
<equals>
<property>controls/adirs/adr[0]/off</property>
<property>controls/navigation/adirscp/lights/adr-1-off</property>
<value>1</value>
</equals>
<equals>
@ -879,8 +897,8 @@
<value>25</value>
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>controls/adirs/adr[1]/off</property>
<command>nasal</command>
<script>systems.ADIRSControlPanel.adrSw(1);</script>
</binding>
<binding>
<command>nasal</command>
@ -895,7 +913,7 @@
<condition>
<or>
<equals>
<property>controls/adirs/adr[1]/fault</property>
<property>controls/navigation/adirscp/lights/adr-2-fault</property>
<value>1</value>
</equals>
<equals>
@ -905,13 +923,14 @@
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>ADR2Btn2O</object-name>
<condition>
<or>
<equals>
<property>controls/adirs/adr[1]/off</property>
<property>controls/navigation/adirscp/lights/adr-2-off</property>
<value>1</value>
</equals>
<equals>
@ -940,8 +959,8 @@
<value>25</value>
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>controls/adirs/adr[2]/off</property>
<command>nasal</command>
<script>systems.ADIRSControlPanel.adrSw(2);</script>
</binding>
<binding>
<command>nasal</command>
@ -956,7 +975,7 @@
<condition>
<or>
<equals>
<property>controls/adirs/adr[2]/fault</property>
<property>controls/navigation/adirscp/lights/adr-3-fault</property>
<value>1</value>
</equals>
<equals>
@ -966,13 +985,14 @@
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>ADR3Btn2O</object-name>
<condition>
<or>
<equals>
<property>controls/adirs/adr[2]/off</property>
<property>controls/navigation/adirscp/lights/adr-3-off</property>
<value>1</value>
</equals>
<equals>
@ -1174,7 +1194,7 @@
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>controls/fctl/elac1</property>
<property>controls/fctl/switches/elac1</property>
</binding>
<binding>
<command>nasal</command>
@ -1208,7 +1228,7 @@
<condition>
<or>
<equals>
<property>controls/fctl/elac1</property>
<property>controls/fctl/switches/elac1</property>
<value>0</value>
</equals>
<equals>
@ -1237,7 +1257,7 @@
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>controls/fctl/sec1</property>
<property>controls/fctl/switches/sec1</property>
</binding>
<binding>
<command>nasal</command>
@ -1257,7 +1277,7 @@
<value>1</value>
</equals>
<equals>
<property>controls/fctl/sec1</property>
<property>controls/fctl/switches/sec1</property>
<value>1</value>
</equals>
</and>
@ -1275,7 +1295,7 @@
<condition>
<or>
<equals>
<property>controls/fctl/sec1</property>
<property>controls/fctl/switches/sec1</property>
<value>0</value>
</equals>
<equals>
@ -1304,7 +1324,7 @@
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>controls/fctl/fac1</property>
<property>controls/fctl/switches/fac1</property>
</binding>
<binding>
<command>nasal</command>
@ -1324,7 +1344,7 @@
<value>1</value>
</equals>
<equals>
<property>controls/fctl/fac1</property>
<property>controls/fctl/switches/fac1</property>
<value>1</value>
</equals>
</and>
@ -1342,7 +1362,7 @@
<condition>
<or>
<equals>
<property>controls/fctl/fac1</property>
<property>controls/fctl/switches/fac1</property>
<value>0</value>
</equals>
<equals>
@ -1371,7 +1391,7 @@
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>controls/fctl/elac2</property>
<property>controls/fctl/switches/elac2</property>
</binding>
<binding>
<command>nasal</command>
@ -1391,7 +1411,7 @@
<value>1</value>
</equals>
<equals>
<property>controls/fctl/elac2</property>
<property>controls/fctl/switches/elac2</property>
<value>1</value>
</equals>
</and>
@ -1409,7 +1429,7 @@
<condition>
<or>
<equals>
<property>controls/fctl/elac2</property>
<property>controls/fctl/switches/elac2</property>
<value>0</value>
</equals>
<equals>
@ -1438,7 +1458,7 @@
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>controls/fctl/sec2</property>
<property>controls/fctl/switches/sec2</property>
</binding>
<binding>
<command>nasal</command>
@ -1458,7 +1478,7 @@
<value>1</value>
</equals>
<equals>
<property>controls/fctl/sec2</property>
<property>controls/fctl/switches/sec2</property>
<value>1</value>
</equals>
</and>
@ -1476,7 +1496,7 @@
<condition>
<or>
<equals>
<property>controls/fctl/sec2</property>
<property>controls/fctl/switches/sec2</property>
<value>0</value>
</equals>
<equals>
@ -1505,7 +1525,7 @@
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>controls/fctl/sec3</property>
<property>controls/fctl/switches/sec3</property>
</binding>
<binding>
<command>nasal</command>
@ -1525,7 +1545,7 @@
<value>1</value>
</equals>
<equals>
<property>controls/fctl/sec3</property>
<property>controls/fctl/switches/sec3</property>
<value>1</value>
</equals>
</and>
@ -1543,7 +1563,7 @@
<condition>
<or>
<equals>
<property>controls/fctl/sec3</property>
<property>controls/fctl/switches/sec3</property>
<value>0</value>
</equals>
<equals>
@ -1572,7 +1592,7 @@
</greater-than-equals>
</condition>
<command>property-toggle</command>
<property>controls/fctl/fac2</property>
<property>controls/fctl/switches/fac2</property>
</binding>
<binding>
<command>nasal</command>
@ -1592,7 +1612,7 @@
<value>1</value>
</equals>
<equals>
<property>controls/fctl/fac2</property>
<property>controls/fctl/switches/fac2</property>
<value>1</value>
</equals>
</and>
@ -1610,7 +1630,7 @@
<condition>
<or>
<equals>
<property>controls/fctl/fac2</property>
<property>controls/fctl/switches/fac2</property>
<value>0</value>
</equals>
<equals>

View file

@ -13,11 +13,6 @@ var PFD2_display = nil;
var updateL = 0;
var updateR = 0;
var elapsedtime = 0;
var ASI = 0;
var ASItrgt = 0;
var ASItrgtdiff = 0;
var ASImax = 0;
var ASItrend = 0;
var altTens = 0;
var altPolarity = "";
@ -133,7 +128,9 @@ var hdg_diff = props.globals.initNode("/instrumentation/pfd/hdg-diff", 0.0, "DOU
var hdg_scale = props.globals.initNode("/instrumentation/pfd/heading-scale", 0.0, "DOUBLE");
var track = props.globals.initNode("/instrumentation/pfd/track-deg", 0.0, "DOUBLE");
var track_diff = props.globals.initNode("/instrumentation/pfd/track-hdg-diff", 0.0, "DOUBLE");
var speed_pred = props.globals.initNode("/instrumentation/pfd/speed-lookahead", 0.0, "DOUBLE");
var speed_pred_1 = props.globals.initNode("/instrumentation/pfd/speed-lookahead-1", 0.0, "DOUBLE");
var speed_pred_2 = props.globals.initNode("/instrumentation/pfd/speed-lookahead-2", 0.0, "DOUBLE");
var speed_pred_3 = props.globals.initNode("/instrumentation/pfd/speed-lookahead-3", 0.0, "DOUBLE");
var du1_test = props.globals.initNode("/instrumentation/du/du1-test", 0, "BOOL");
var du1_test_time = props.globals.initNode("/instrumentation/du/du1-test-time", 0.0, "DOUBLE");
var du1_test_amount = props.globals.initNode("/instrumentation/du/du1-test-amount", 0.0, "DOUBLE");
@ -197,7 +194,7 @@ var canvas_PFD_base = {
"AI_bank_lim","AI_bank_lim_X","AI_pitch_lim","AI_pitch_lim_X","AI_slipskid","AI_horizon","AI_horizon_ground","AI_horizon_sky","AI_stick","AI_stick_pos","AI_heading","AI_agl_g","AI_agl","AI_error","AI_group","FD_roll","FD_pitch","ALT_scale","ALT_target",
"ALT_target_digit","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_digit_UP","ALT_digit_DN","ALT_error","ALT_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting",
"QNH_std","QNH_box","LOC_pointer","LOC_scale","GS_scale","GS_pointer","CRS_pointer","HDG_target","HDG_scale","HDG_one","HDG_two","HDG_three","HDG_four","HDG_five","HDG_six","HDG_seven","HDG_digit_L","HDG_digit_R","HDG_error","HDG_group","HDG_frame",
"TRK_pointer"];
"TRK_pointer","machError"];
},
update: func() {
elapsedtime_act = elapsedtime.getValue();
@ -609,119 +606,6 @@ var canvas_PFD_base = {
}
},
updateCommonFast: func() {
# Airspeed
ind_spd = ind_spd_kt.getValue();
# Subtract 30, since the scale starts at 30, but don"t allow less than 0, or more than 420 situations
if (ind_spd <= 30) {
ASI = 0;
} else if (ind_spd >= 420) {
ASI = 390;
} else {
ASI = ind_spd - 30;
}
FMGC_max = FMGC_max_spd.getValue();
if (FMGC_max <= 30) {
ASImax = 0 - ASI;
} else if (FMGC_max >= 420) {
ASImax = 390 - ASI;
} else {
ASImax = FMGC_max - 30 - ASI;
}
me["ASI_scale"].setTranslation(0, ASI * 6.6);
me["ASI_max"].setTranslation(0, ASImax * -6.6);
ind_mach = ind_spd_mach.getValue();
if (ind_mach >= 0.5) {
me["ASI_mach_decimal"].show();
me["ASI_mach"].show();
} else {
me["ASI_mach_decimal"].hide();
me["ASI_mach"].hide();
}
if (ind_mach >= 0.999) {
me["ASI_mach"].setText("999");
} else {
me["ASI_mach"].setText(sprintf("%3.0f", ind_mach * 1000));
}
if (managed_spd.getValue() == 1) {
me["ASI_target"].setColor(0.6901,0.3333,0.7450);
me["ASI_digit_UP"].setColor(0.6901,0.3333,0.7450);
me["ASI_decimal_UP"].setColor(0.6901,0.3333,0.7450);
me["ASI_digit_DN"].setColor(0.6901,0.3333,0.7450);
me["ASI_decimal_DN"].setColor(0.6901,0.3333,0.7450);
} else {
me["ASI_target"].setColor(0.0901,0.6039,0.7176);
me["ASI_digit_UP"].setColor(0.0901,0.6039,0.7176);
me["ASI_decimal_UP"].setColor(0.0901,0.6039,0.7176);
me["ASI_digit_DN"].setColor(0.0901,0.6039,0.7176);
me["ASI_decimal_DN"].setColor(0.0901,0.6039,0.7176);
}
tgt_ias = at_tgt_ias.getValue();
if (tgt_ias <= 30) {
ASItrgt = 0 - ASI;
} else if (tgt_ias >= 420) {
ASItrgt = 390 - ASI;
} else {
ASItrgt = tgt_ias - 30 - ASI;
}
ASItrgtdiff = tgt_ias - ind_spd;
if (ASItrgtdiff >= -42 and ASItrgtdiff <= 42) {
me["ASI_target"].setTranslation(0, ASItrgt * -6.6);
me["ASI_digit_UP"].hide();
me["ASI_decimal_UP"].hide();
me["ASI_digit_DN"].hide();
me["ASI_decimal_DN"].hide();
me["ASI_target"].show();
} else if (ASItrgtdiff < -42) {
if (at_mach_mode.getValue() == 1) {
me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
me["ASI_decimal_UP"].hide();
me["ASI_decimal_DN"].show();
} else {
me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
me["ASI_decimal_UP"].hide();
me["ASI_decimal_DN"].hide();
}
me["ASI_digit_DN"].show();
me["ASI_digit_UP"].hide();
me["ASI_target"].hide();
} else if (ASItrgtdiff > 42) {
if (at_mach_mode.getValue() == 1) {
me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
me["ASI_decimal_UP"].show();
me["ASI_decimal_DN"].hide();
} else {
me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
me["ASI_decimal_UP"].hide();
me["ASI_decimal_DN"].hide();
}
me["ASI_digit_UP"].show();
me["ASI_digit_DN"].hide();
me["ASI_target"].hide();
}
ASItrend = speed_pred.getValue() - ASI;
me["ASI_trend_up"].setTranslation(0, math.clamp(ASItrend, 0, 50) * -6.6);
me["ASI_trend_down"].setTranslation(0, math.clamp(ASItrend, -50, 0) * -6.6);
if (ASItrend >= 2) {
me["ASI_trend_up"].show();
me["ASI_trend_down"].hide();
} else if (ASItrend <= -2) {
me["ASI_trend_down"].show();
me["ASI_trend_up"].hide();
} else {
me["ASI_trend_up"].hide();
me["ASI_trend_down"].hide();
}
# Attitude Indicator
pitch_cur = pitch.getValue();
roll_cur = roll.getValue();
@ -789,69 +673,6 @@ var canvas_PFD_base = {
me["AI_stick_pos"].setTranslation(aileron_input.getValue() * 196.8, elevator_input.getValue() * 151.5);
# Altitude
me.altitude = altitude.getValue();
me.altOffset = me.altitude / 500 - int(me.altitude / 500);
me.middleAltText = roundaboutAlt(me.altitude / 100);
me.middleAltOffset = nil;
if (me.altOffset > 0.5) {
me.middleAltOffset = -(me.altOffset - 1) * 243.3424;
} else {
me.middleAltOffset = -me.altOffset * 243.3424;
}
me["ALT_scale"].setTranslation(0, -me.middleAltOffset);
me["ALT_scale"].update();
me["ALT_five"].setText(sprintf("%03d", abs(me.middleAltText+10)));
me["ALT_four"].setText(sprintf("%03d", abs(me.middleAltText+5)));
me["ALT_three"].setText(sprintf("%03d", abs(me.middleAltText)));
me["ALT_two"].setText(sprintf("%03d", abs(me.middleAltText-5)));
me["ALT_one"].setText(sprintf("%03d", abs(me.middleAltText-10)));
if (altitude.getValue() < 0) {
altPolarity = "-";
} else {
altPolarity = "";
}
me["ALT_digits"].setText(sprintf("%s%d", altPolarity, altitude_pfd.getValue()));
altTens = num(right(sprintf("%02d", altitude.getValue()), 2));
me["ALT_tens"].setTranslation(0, altTens * 1.392);
ap_alt_cur = ap_alt.getValue();
alt_diff_cur = alt_diff.getValue();
if (alt_diff_cur >= -565 and alt_diff_cur <= 565) {
me["ALT_target"].setTranslation(0, (alt_diff_cur / 100) * -48.66856);
me["ALT_target_digit"].setText(sprintf("%03d", math.round(ap_alt_cur / 100)));
me["ALT_digit_UP"].hide();
me["ALT_digit_DN"].hide();
me["ALT_target"].show();
} else if (alt_diff_cur < -565) {
if (alt_std_mode.getValue() == 1) {
if (ap_alt_cur < 10000) {
me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
} else {
me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
}
} else {
me["ALT_digit_DN"].setText(sprintf("%5.0f", ap_alt_cur));
}
me["ALT_digit_DN"].show();
me["ALT_digit_UP"].hide();
me["ALT_target"].hide();
} else if (alt_diff_cur > 565) {
if (alt_std_mode.getValue() == 1) {
if (ap_alt_cur < 10000) {
me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
} else {
me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
}
} else {
me["ALT_digit_UP"].setText(sprintf("%5.0f", ap_alt_cur));
}
me["ALT_digit_UP"].show();
me["ALT_digit_DN"].hide();
me["ALT_target"].hide();
}
# Vertical Speed
me["VS_pointer"].setRotation(vs_needle.getValue() * D2R);
@ -947,6 +768,12 @@ var canvas_PFD_base = {
};
var canvas_PFD_1 = {
ASI: 0,
ASImax: 0,
ASItrend: 0,
ASItrgt: 0,
ASItrgtdiff: 0,
FMGC_max: 0,
new: func(canvas_group, file) {
var m = {parents: [canvas_PFD_1, canvas_PFD_base]};
m.init(canvas_group, file);
@ -964,26 +791,10 @@ var canvas_PFD_1 = {
# Errors
if ((adirs0_active.getValue() == 1) or (air_switch.getValue() == -1 and adirs2_active.getValue() == 1)) {
me["ASI_group"].show();
me["ALT_group"].show();
me["ALT_group2"].show();
me["ALT_scale"].show();
me["VS_group"].show();
me["ASI_error"].hide();
me["ASI_frame"].setColor(1,1,1);
me["ALT_error"].hide();
me["ALT_frame"].setColor(1,1,1);
me["VS_error"].hide();
} else {
me["ASI_error"].show();
me["ASI_frame"].setColor(1,0,0);
me["ALT_error"].show();
me["ALT_frame"].setColor(1,0,0);
me["VS_error"].show();
me["ASI_group"].hide();
me["ALT_group"].hide();
me["ALT_group2"].hide();
me["ALT_scale"].hide();
me["VS_group"].hide();
}
@ -1037,11 +848,225 @@ var canvas_PFD_1 = {
me.updateCommon();
},
updateFast: func() {
# Airspeed
# ind_spd = ind_spd_kt.getValue();
# Subtract 30, since the scale starts at 30, but don"t allow less than 0, or more than 420 situations
if (dmc.DMController.DMCs[0].outputs[0] != nil) {
ind_spd = dmc.DMController.DMCs[0].outputs[0].getValue();
me["ASI_error"].hide();
me["ASI_frame"].setColor(1,1,1);
me["ASI_group"].show();
if (ind_spd <= 30) {
me.ASI = 0;
} else if (ind_spd >= 420) {
me.ASI = 390;
} else {
me.ASI = ind_spd - 30;
}
me.FMGC_max = FMGC_max_spd.getValue();
if (me.FMGC_max <= 30) {
me.ASImax = 0 - me.ASI;
} else if (me.FMGC_max >= 420) {
me.ASImax = 390 - me.ASI;
} else {
me.ASImax = me.FMGC_max - 30 - me.ASI;
}
me["ASI_scale"].setTranslation(0, me.ASI * 6.6);
me["ASI_max"].setTranslation(0, me.ASImax * -6.6);
if (managed_spd.getValue() == 1) {
me["ASI_target"].setColor(0.6901,0.3333,0.7450);
me["ASI_digit_UP"].setColor(0.6901,0.3333,0.7450);
me["ASI_decimal_UP"].setColor(0.6901,0.3333,0.7450);
me["ASI_digit_DN"].setColor(0.6901,0.3333,0.7450);
me["ASI_decimal_DN"].setColor(0.6901,0.3333,0.7450);
} else {
me["ASI_target"].setColor(0.0901,0.6039,0.7176);
me["ASI_digit_UP"].setColor(0.0901,0.6039,0.7176);
me["ASI_decimal_UP"].setColor(0.0901,0.6039,0.7176);
me["ASI_digit_DN"].setColor(0.0901,0.6039,0.7176);
me["ASI_decimal_DN"].setColor(0.0901,0.6039,0.7176);
}
tgt_ias = at_tgt_ias.getValue();
if (tgt_ias <= 30) {
me.ASItrgt = 0 - me.ASI;
} else if (tgt_ias >= 420) {
me.ASItrgt = 390 - me.ASI;
} else {
me.ASItrgt = tgt_ias - 30 - me.ASI;
}
me.ASItrgtdiff = tgt_ias - ind_spd;
if (me.ASItrgtdiff >= -42 and me.ASItrgtdiff <= 42) {
me["ASI_target"].setTranslation(0, me.ASItrgt * -6.6);
me["ASI_digit_UP"].hide();
me["ASI_decimal_UP"].hide();
me["ASI_digit_DN"].hide();
me["ASI_decimal_DN"].hide();
me["ASI_target"].show();
} else if (me.ASItrgtdiff < -42) {
if (at_mach_mode.getValue() == 1) {
me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
me["ASI_decimal_UP"].hide();
me["ASI_decimal_DN"].show();
} else {
me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
me["ASI_decimal_UP"].hide();
me["ASI_decimal_DN"].hide();
}
me["ASI_digit_DN"].show();
me["ASI_digit_UP"].hide();
me["ASI_target"].hide();
} else if (me.ASItrgtdiff > 42) {
if (at_mach_mode.getValue() == 1) {
me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
me["ASI_decimal_UP"].show();
me["ASI_decimal_DN"].hide();
} else {
me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
me["ASI_decimal_UP"].hide();
me["ASI_decimal_DN"].hide();
}
me["ASI_digit_UP"].show();
me["ASI_digit_DN"].hide();
me["ASI_target"].hide();
}
me.ASItrend = speed_pred_1.getValue() - me.ASI;
me["ASI_trend_up"].setTranslation(0, math.clamp(me.ASItrend, 0, 50) * -6.6);
me["ASI_trend_down"].setTranslation(0, math.clamp(me.ASItrend, -50, 0) * -6.6);
if (me.ASItrend >= 2) {
me["ASI_trend_up"].show();
me["ASI_trend_down"].hide();
} else if (me.ASItrend <= -2) {
me["ASI_trend_down"].show();
me["ASI_trend_up"].hide();
} else {
me["ASI_trend_up"].hide();
me["ASI_trend_down"].hide();
}
} else {
me["ASI_group"].hide();
me["ASI_error"].show();
me["ASI_frame"].setColor(1,0,0);
}
if (dmc.DMController.DMCs[0].outputs[2] != nil) {
ind_mach = dmc.DMController.DMCs[0].outputs[2].getValue();
me["machError"].hide();
if (ind_mach >= 0.5) {
me["ASI_mach_decimal"].show();
me["ASI_mach"].show();
} else {
me["ASI_mach_decimal"].hide();
me["ASI_mach"].hide();
}
if (ind_mach >= 0.999) {
me["ASI_mach"].setText("999");
} else {
me["ASI_mach"].setText(sprintf("%3.0f", ind_mach * 1000));
}
} else {
me["machError"].show();
}
# Altitude
if (dmc.DMController.DMCs[0].outputs[1] != nil) {
me["ALT_error"].hide();
me["ALT_frame"].setColor(1,1,1);
me["ALT_group"].show();
me["ALT_group2"].show();
me["ALT_scale"].show();
me.altitude = dmc.DMController.DMCs[0].outputs[1].getValue();
me.altOffset = me.altitude / 500 - int(me.altitude / 500);
me.middleAltText = roundaboutAlt(me.altitude / 100);
me.middleAltOffset = nil;
if (me.altOffset > 0.5) {
me.middleAltOffset = -(me.altOffset - 1) * 243.3424;
} else {
me.middleAltOffset = -me.altOffset * 243.3424;
}
me["ALT_scale"].setTranslation(0, -me.middleAltOffset);
me["ALT_scale"].update();
me["ALT_five"].setText(sprintf("%03d", abs(me.middleAltText+10)));
me["ALT_four"].setText(sprintf("%03d", abs(me.middleAltText+5)));
me["ALT_three"].setText(sprintf("%03d", abs(me.middleAltText)));
me["ALT_two"].setText(sprintf("%03d", abs(me.middleAltText-5)));
me["ALT_one"].setText(sprintf("%03d", abs(me.middleAltText-10)));
if (altitude.getValue() < 0) {
altPolarity = "-";
} else {
altPolarity = "";
}
me["ALT_digits"].setText(sprintf("%s%d", altPolarity, dmc.DMController.DMCs[0].outputs[3].getValue()));
altTens = num(right(sprintf("%02d", me.altitude), 2));
me["ALT_tens"].setTranslation(0, altTens * 1.392);
ap_alt_cur = ap_alt.getValue();
alt_diff_cur = alt_diff.getValue();
if (alt_diff_cur >= -565 and alt_diff_cur <= 565) {
me["ALT_target"].setTranslation(0, (alt_diff_cur / 100) * -48.66856);
me["ALT_target_digit"].setText(sprintf("%03d", math.round(ap_alt_cur / 100)));
me["ALT_digit_UP"].hide();
me["ALT_digit_DN"].hide();
me["ALT_target"].show();
} else if (alt_diff_cur < -565) {
if (alt_std_mode.getValue() == 1) {
if (ap_alt_cur < 10000) {
me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
} else {
me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
}
} else {
me["ALT_digit_DN"].setText(sprintf("%5.0f", ap_alt_cur));
}
me["ALT_digit_DN"].show();
me["ALT_digit_UP"].hide();
me["ALT_target"].hide();
} else if (alt_diff_cur > 565) {
if (alt_std_mode.getValue() == 1) {
if (ap_alt_cur < 10000) {
me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
} else {
me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
}
} else {
me["ALT_digit_UP"].setText(sprintf("%5.0f", ap_alt_cur));
}
me["ALT_digit_UP"].show();
me["ALT_digit_DN"].hide();
me["ALT_target"].hide();
}
} else {
me["ALT_error"].show();
me["ALT_frame"].setColor(1,0,0);
me["ALT_group"].hide();
me["ALT_group2"].hide();
me["ALT_scale"].hide();
}
me.updateCommonFast();
},
};
var canvas_PFD_2 = {
ASI: 0,
ASImax: 0,
ASItrend: 0,
ASItrgt: 0,
ASItrgtdiff: 0,
FMGC_max: 0,
new: func(canvas_group, file) {
var m = {parents: [canvas_PFD_2, canvas_PFD_base]};
m.init(canvas_group, file);
@ -1059,19 +1084,14 @@ var canvas_PFD_2 = {
# Errors
if ((adirs1_active.getValue() == 1) or (air_switch.getValue() == 1 and adirs2_active.getValue() == 1)) {
me["ASI_group"].show();
me["ALT_group"].show();
me["ALT_group2"].show();
me["ALT_scale"].show();
me["VS_group"].show();
me["ASI_error"].hide();
me["ASI_frame"].setColor(1,1,1);
me["ALT_error"].hide();
me["ALT_frame"].setColor(1,1,1);
me["VS_error"].hide();
} else {
me["ASI_error"].show();
me["ASI_frame"].setColor(1,0,0);
me["ALT_error"].show();
me["ALT_frame"].setColor(1,0,0);
me["VS_error"].show();
@ -1132,6 +1152,213 @@ var canvas_PFD_2 = {
me.updateCommon();
},
updateFast: func() {
# Airspeed
# ind_spd = ind_spd_kt.getValue();
# Subtract 30, since the scale starts at 30, but don"t allow less than 0, or more than 420 situations
if (dmc.DMController.DMCs[1].outputs[0] != nil) {
ind_spd = dmc.DMController.DMCs[1].outputs[0].getValue();
me["ASI_error"].hide();
me["ASI_frame"].setColor(1,1,1);
me["ASI_group"].show();
if (ind_spd <= 30) {
me.ASI = 0;
} else if (ind_spd >= 420) {
me.ASI = 390;
} else {
me.ASI = ind_spd - 30;
}
me.FMGC_max = FMGC_max_spd.getValue();
if (me.FMGC_max <= 30) {
me.ASImax = 0 - me.ASI;
} else if (me.FMGC_max >= 420) {
me.ASImax = 390 - me.ASI;
} else {
me.ASImax = me.FMGC_max - 30 - me.ASI;
}
me["ASI_scale"].setTranslation(0, me.ASI * 6.6);
me["ASI_max"].setTranslation(0, me.ASImax * -6.6);
if (managed_spd.getValue() == 1) {
me["ASI_target"].setColor(0.6901,0.3333,0.7450);
me["ASI_digit_UP"].setColor(0.6901,0.3333,0.7450);
me["ASI_decimal_UP"].setColor(0.6901,0.3333,0.7450);
me["ASI_digit_DN"].setColor(0.6901,0.3333,0.7450);
me["ASI_decimal_DN"].setColor(0.6901,0.3333,0.7450);
} else {
me["ASI_target"].setColor(0.0901,0.6039,0.7176);
me["ASI_digit_UP"].setColor(0.0901,0.6039,0.7176);
me["ASI_decimal_UP"].setColor(0.0901,0.6039,0.7176);
me["ASI_digit_DN"].setColor(0.0901,0.6039,0.7176);
me["ASI_decimal_DN"].setColor(0.0901,0.6039,0.7176);
}
tgt_ias = at_tgt_ias.getValue();
if (tgt_ias <= 30) {
me.ASItrgt = 0 - me.ASI;
} else if (tgt_ias >= 420) {
me.ASItrgt = 390 - me.ASI;
} else {
me.ASItrgt = tgt_ias - 30 - me.ASI;
}
me.ASItrgtdiff = tgt_ias - ind_spd;
if (me.ASItrgtdiff >= -42 and me.ASItrgtdiff <= 42) {
me["ASI_target"].setTranslation(0, me.ASItrgt * -6.6);
me["ASI_digit_UP"].hide();
me["ASI_decimal_UP"].hide();
me["ASI_digit_DN"].hide();
me["ASI_decimal_DN"].hide();
me["ASI_target"].show();
} else if (me.ASItrgtdiff < -42) {
if (at_mach_mode.getValue() == 1) {
me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
me["ASI_decimal_UP"].hide();
me["ASI_decimal_DN"].show();
} else {
me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
me["ASI_decimal_UP"].hide();
me["ASI_decimal_DN"].hide();
}
me["ASI_digit_DN"].show();
me["ASI_digit_UP"].hide();
me["ASI_target"].hide();
} else if (me.ASItrgtdiff > 42) {
if (at_mach_mode.getValue() == 1) {
me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
me["ASI_decimal_UP"].show();
me["ASI_decimal_DN"].hide();
} else {
me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
me["ASI_decimal_UP"].hide();
me["ASI_decimal_DN"].hide();
}
me["ASI_digit_UP"].show();
me["ASI_digit_DN"].hide();
me["ASI_target"].hide();
}
me.ASItrend = speed_pred_2.getValue() - me.ASI;
me["ASI_trend_up"].setTranslation(0, math.clamp(me.ASItrend, 0, 50) * -6.6);
me["ASI_trend_down"].setTranslation(0, math.clamp(me.ASItrend, -50, 0) * -6.6);
if (me.ASItrend >= 2) {
me["ASI_trend_up"].show();
me["ASI_trend_down"].hide();
} else if (me.ASItrend <= -2) {
me["ASI_trend_down"].show();
me["ASI_trend_up"].hide();
} else {
me["ASI_trend_up"].hide();
me["ASI_trend_down"].hide();
}
} else {
me["ASI_error"].show();
me["ASI_frame"].setColor(1,0,0);
me["ASI_group"].hide();
}
if (dmc.DMController.DMCs[1].outputs[2] != nil) {
ind_mach = dmc.DMController.DMCs[1].outputs[2].getValue();
me["machError"].hide();
if (ind_mach >= 0.5) {
me["ASI_mach_decimal"].show();
me["ASI_mach"].show();
} else {
me["ASI_mach_decimal"].hide();
me["ASI_mach"].hide();
}
if (ind_mach >= 0.999) {
me["ASI_mach"].setText("999");
} else {
me["ASI_mach"].setText(sprintf("%3.0f", ind_mach * 1000));
}
} else {
me["machError"].show();
}
if (dmc.DMController.DMCs[1].outputs[1] != nil) {
me["ALT_error"].hide();
me["ALT_frame"].setColor(1,1,1);
me["ALT_group"].show();
me["ALT_group2"].show();
me["ALT_scale"].show();
me.altitude = dmc.DMController.DMCs[1].outputs[1].getValue();
me.altOffset = me.altitude / 500 - int(me.altitude / 500);
me.middleAltText = roundaboutAlt(me.altitude / 100);
me.middleAltOffset = nil;
if (me.altOffset > 0.5) {
me.middleAltOffset = -(me.altOffset - 1) * 243.3424;
} else {
me.middleAltOffset = -me.altOffset * 243.3424;
}
me["ALT_scale"].setTranslation(0, -me.middleAltOffset);
me["ALT_scale"].update();
me["ALT_five"].setText(sprintf("%03d", abs(me.middleAltText+10)));
me["ALT_four"].setText(sprintf("%03d", abs(me.middleAltText+5)));
me["ALT_three"].setText(sprintf("%03d", abs(me.middleAltText)));
me["ALT_two"].setText(sprintf("%03d", abs(me.middleAltText-5)));
me["ALT_one"].setText(sprintf("%03d", abs(me.middleAltText-10)));
if (altitude.getValue() < 0) {
altPolarity = "-";
} else {
altPolarity = "";
}
me["ALT_digits"].setText(sprintf("%s%d", altPolarity, dmc.DMController.DMCs[1].outputs[3].getValue()));
altTens = num(right(sprintf("%02d", me.altitude), 2));
me["ALT_tens"].setTranslation(0, altTens * 1.392);
ap_alt_cur = ap_alt.getValue();
alt_diff_cur = alt_diff.getValue();
if (alt_diff_cur >= -565 and alt_diff_cur <= 565) {
me["ALT_target"].setTranslation(0, (alt_diff_cur / 100) * -48.66856);
me["ALT_target_digit"].setText(sprintf("%03d", math.round(ap_alt_cur / 100)));
me["ALT_digit_UP"].hide();
me["ALT_digit_DN"].hide();
me["ALT_target"].show();
} else if (alt_diff_cur < -565) {
if (alt_std_mode.getValue() == 1) {
if (ap_alt_cur < 10000) {
me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
} else {
me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
}
} else {
me["ALT_digit_DN"].setText(sprintf("%5.0f", ap_alt_cur));
}
me["ALT_digit_DN"].show();
me["ALT_digit_UP"].hide();
me["ALT_target"].hide();
} else if (alt_diff_cur > 565) {
if (alt_std_mode.getValue() == 1) {
if (ap_alt_cur < 10000) {
me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
} else {
me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
}
} else {
me["ALT_digit_UP"].setText(sprintf("%5.0f", ap_alt_cur));
}
me["ALT_digit_UP"].show();
me["ALT_digit_DN"].hide();
me["ALT_target"].hide();
}
} else {
me["ALT_error"].show();
me["ALT_frame"].setColor(1,0,0);
me["ALT_group"].hide();
me["ALT_group2"].hide();
me["ALT_scale"].hide();
}
me.updateCommonFast();
},
};

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 277 KiB

After

Width:  |  Height:  |  Size: 276 KiB

View file

@ -484,4 +484,5 @@
</and>
</condition>
</animation>
</PropertyList>

View file

@ -32,7 +32,7 @@
<object-name>fan</object-name>
<object-name>holder</object-name>
<condition>
<property>controls/hydraulic/rat-deployed</property>
<property>/systems/hydraulic/sources/rat/position</property>
</condition>
</animation>

View file

@ -1,497 +0,0 @@
# A3XX ECAM
# Joshua Davidson (Octal450)
# Copyright (c) 2019 Joshua Davidson (Octal450)
var stateL = 0;
var stateR = 0;
var thrustL = 0;
var thrustR = 0;
var elec = 0;
var speed = 0;
var wow = 0;
var altitude = 0;
var phase = 1;
var toPowerSet = 0;
var eng = "XX";
var eprlim = 0;
var n1lim = 0;
var mode = "XX";
var modeI = "XX";
var man_sel = 0;
var fault_sel = 0;
var fault_page = "";
var warnPhase = 1;
var page = "door";
var aileron = 0;
var elevator = 0;
var elapsedSec = 0;
var fctlCounting = 0;
var fctlTime = 0;
var showAPUPage = 0;
var APUMaster = 0;
var APURPM = 0;
var APUTime = 0;
var APUCounting = 0;
var engModeSel = 0;
var showENGPage = 0;
var ENGTime = 0;
var ENGCounting = 0;
var flapLever = 0;
var CRZTime = 0;
var CRZCondition = 0;
var CRZCounting = 0;
var agl = 0;
var ap_active = 0;
var athr_active = 0;
setprop("/ECAM/left-msg", "NONE");
setprop("/position/gear-agl-ft", 0);
# w = White, b = Blue, g = Green, a = Amber, r = Red
var ECAM = {
init: func() {
setprop("/ECAM/engine-start-time", 0);
setprop("/ECAM/engine-start-time-switch", 0);
setprop("/systems/gear/landing-gear-warning-light", 0);
setprop("/ECAM/Lower/page", "door");
setprop("/ECAM/Lower/man-select", 0);
setprop("/ECAM/Lower/fault-select", 0);
setprop("/ECAM/Lower/fault-page", "");
setprop("/ECAM/Lower/apu-timer", 0);
setprop("/ECAM/Lower/eng-timer", 0);
setprop("/ECAM/Lower/fctl-timer", 0);
setprop("/ECAM/Lower/light/apu", 0);
setprop("/ECAM/Lower/light/bleed", 0);
setprop("/ECAM/Lower/light/cond", 0);
setprop("/ECAM/Lower/light/door", 0);
setprop("/ECAM/Lower/light/elec", 0);
setprop("/ECAM/Lower/light/eng", 0);
setprop("/ECAM/Lower/light/fctl", 0);
setprop("/ECAM/Lower/light/fuel", 0);
setprop("/ECAM/Lower/light/hyd", 0);
setprop("/ECAM/Lower/light/press", 0);
setprop("/ECAM/Lower/light/sts", 0);
setprop("/ECAM/Lower/light/wheel", 0);
setprop("/ECAM/Lower/light/clr", 0);
setprop("/ECAM/warning-phase", 1);
setprop("/ECAM/warning-phase-10-time", 0);
setprop("/ECAM/ap-off-time", 0);
setprop("/ECAM/athr-off-time", 0);
setprop("/it-autoflight/output/ap-warning", 0);
setprop("/it-autoflight/output/athr-warning", 0);
var ap_off_time = getprop("/ECAM/ap-off-time");
var athr_off_time = getprop("/ECAM/athr-off-time");
LowerECAM.reset();
},
MSGclr: func() {
setprop("/ECAM/ecam-checklist-active", 0);
setprop("/ECAM/left-msg", "NONE");
setprop("/ECAM/msg/line1", "");
setprop("/ECAM/msg/line2", "");
setprop("/ECAM/msg/line3", "");
setprop("/ECAM/msg/line4", "");
setprop("/ECAM/msg/line5", "");
setprop("/ECAM/msg/line6", "");
setprop("/ECAM/msg/line7", "");
setprop("/ECAM/msg/line8", "");
setprop("/ECAM/msg/linec1", "w");
setprop("/ECAM/msg/linec2", "w");
setprop("/ECAM/msg/linec3", "w");
setprop("/ECAM/msg/linec4", "w");
setprop("/ECAM/msg/linec5", "w");
setprop("/ECAM/msg/linec6", "w");
setprop("/ECAM/msg/linec7", "w");
setprop("/ECAM/msg/linec8", "w");
setprop("/ECAM/rightmsg/line1", "");
setprop("/ECAM/rightmsg/line2", "");
setprop("/ECAM/rightmsg/line3", "");
setprop("/ECAM/rightmsg/line4", "");
setprop("/ECAM/rightmsg/line5", "");
setprop("/ECAM/rightmsg/line6", "");
setprop("/ECAM/rightmsg/line7", "");
setprop("/ECAM/rightmsg/line8", "");
setprop("/ECAM/rightmsg/linec1", "w");
setprop("/ECAM/rightmsg/linec2", "w");
setprop("/ECAM/rightmsg/linec3", "w");
setprop("/ECAM/rightmsg/linec4", "w");
setprop("/ECAM/rightmsg/linec5", "w");
setprop("/ECAM/rightmsg/linec6", "w");
setprop("/ECAM/rightmsg/linec7", "w");
setprop("/ECAM/rightmsg/linec8", "w");
},
loop: func() {
stateL = getprop("/engines/engine[0]/state");
stateR = getprop("/engines/engine[1]/state");
thrustL = getprop("/systems/thrust/state1");
thrustR = getprop("/systems/thrust/state2");
elec = getprop("/systems/electrical/on");
speed = getprop("/instrumentation/airspeed-indicator/indicated-speed-kt");
wow = getprop("/gear/gear[0]/wow");
eng = getprop("/options/eng");
if (stateL != 3 or stateR != 3) {
if (getprop("/ECAM/engine-start-time-switch") != 0) {
setprop("/ECAM/engine-start-time-switch", 0);
setprop("/ECAM/engine-start-time", 0);
}
} else if (stateL == 3 and stateR == 3 and wow == 1) {
if (getprop("/ECAM/engine-start-time-switch") != 1) {
setprop("/ECAM/engine-start-time", getprop("/sim/time/elapsed-sec"));
setprop("/ECAM/engine-start-time-switch", 1);
}
} else if (wow == 1) {
if (getprop("/ECAM/engine-start-time-switch") != 0) {
setprop("/ECAM/engine-start-time-switch", 0);
}
}
if (getprop("/ECAM/show-left-msg") == 1) {
setprop("/ECAM/left-msg", "MSG");
} else {
setprop("/ECAM/left-msg", "NONE");
}
if (getprop("/ECAM/show-right-msg") == 1) {
setprop("/ECAM/right-msg", "MSG");
} else {
setprop("/ECAM/right-msg", "NONE");
}
# AP / ATHR warnings
if (ap_active == 1 and getprop("/it-autoflight/output/ap-warning") == 0) {
ap_active = 0;
} elsif (ap_active == 1 and getprop("/it-autoflight/output/ap-warning") == 1 and getprop("/sim/time/elapsed-sec") > (getprop("/ECAM/ap-off-time") + 9)) {
ap_active = 0;
setprop("/it-autoflight/output/ap-warning", 0);
} elsif (ap_active == 0 and getprop("/it-autoflight/output/ap-warning") != 0) {
ap_active = 1;
}
if (ap_active == 1 and getprop("/it-autoflight/output/ap-warning") == 1 and getprop("/sim/time/elapsed-sec") > (getprop("/ECAM/ap-off-time") + 3) and getprop("/ECAM/warnings/master-warning-light") == 1) {
setprop("/ECAM/warnings/master-warning-light", 0);
}
if (getprop("/it-autoflight/output/ap-warning") == 2 and (getprop("/it-autoflight/output/ap1") == 1 or getprop("/it-autoflight/output/ap2") == 1)) {
setprop("/it-autoflight/output/ap-warning", 0);
}
if (athr_active == 1 and getprop("/it-autoflight/output/athr-warning") == 0) {
athr_active = 0;
} elsif (athr_active == 1 and getprop("/it-autoflight/output/athr-warning") == 1 and getprop("/sim/time/elapsed-sec") > (getprop("/ECAM/athr-off-time") + 9)) {
athr_active = 0;
setprop("/it-autoflight/output/athr-warning", 0);
} elsif (athr_active == 0 and getprop("/it-autoflight/output/athr-warning") != 0) {
athr_active = 1;
}
if (athr_active == 1 and getprop("/it-autoflight/output/athr-warning") == 1 and getprop("/sim/time/elapsed-sec") > (getprop("/ECAM/athr-off-time") + 3) and getprop("/ECAM/warnings/master-caution-light") == 1) {
setprop("/ECAM/warnings/master-caution-light", 0);
}
if (getprop("/it-autoflight/output/athr-warning") == 2 and getprop("/it-autoflight/output/athr") == 1) {
setprop("/it-autoflight/output/athr-warning", 0);
}
LowerECAM.loop();
},
};
ECAM.MSGclr();
# Lower ECAM Pages
var LowerECAM = {
button: func(b) {
man_sel = getprop("/ECAM/Lower/man-select");
if (b == "clr" and getprop("/it-autoflight/output/athr-warning") == 2) {
setprop("/it-autoflight/output/athr-warning", 0);
setprop("/ECAM/Lower/light/clr", 0);
setprop("/ECAM/warnings/master-caution-light", 0);
return;
}
if (b == "clr" and getprop("/it-autoflight/output/ap-warning") == 2) {
setprop("/it-autoflight/output/ap-warning", 0);
setprop("/ECAM/Lower/light/clr", 0);
setprop("/ECAM/warnings/master-warning-light", 0);
return;
}
if (b == "clr") {
ecam.ECAM_controller.clear();
return;
}
if (getprop("/ECAM/Lower/fault-select") == 0) {
if (b != "clr") {
if (!man_sel) {
setprop("/ECAM/Lower/man-select", 1);
setprop("/ECAM/Lower/page", b);
setprop("/ECAM/Lower/light/" ~ b, 1);
} else {
if (b == getprop("/ECAM/Lower/page")) {
setprop("/ECAM/Lower/man-select", 0);
LowerECAM.loop();
setprop("/ECAM/Lower/light/" ~ b, 0);
} else {
setprop("/ECAM/Lower/light/" ~ getprop("/ECAM/Lower/page"), 0);
setprop("/ECAM/Lower/page", b);
setprop("/ECAM/Lower/light/" ~ b, 1);
}
}
} elsif (getprop("/ECAM/Lower/light/clr") == 1) {
setprop("/ECAM/Lower/light/clr", 0);
}
} else {
if (b == "clr") {
setprop("/ECAM/Lower/light/clr", 0);
setprop("/ECAM/Lower/fault-select", 0);
setprop("/ECAM/Lower/fault-page", "");
LowerECAM.loop();
} elsif (!man_sel) {
setprop("/ECAM/Lower/man-select", 1);
setprop("/ECAM/Lower/page", b);
setprop("/ECAM/Lower/light/" ~ b, 1);
} else {
if (b == getprop("/ECAM/Lower/page")) {
setprop("/ECAM/Lower/man-select", 0);
setprop("/ECAM/Lower/light/" ~ b, 0);
setprop("/ECAM/Lower/fault-select", 1);
setprop("/ECAM/Lower/page", getprop("/ECAM/Lower/fault-page"));
} else {
setprop("/ECAM/Lower/light/" ~ getprop("/ECAM/Lower/page"), 0);
setprop("/ECAM/Lower/page", b);
setprop("/ECAM/Lower/light/" ~ b, 1);
}
}
}
},
loop: func() {
man_sel = getprop("/ECAM/Lower/man-select");
fault_sel = getprop("/ECAM/Lower/fault-select");
fault_page = getprop("/ECAM/Lower/fault-page");
page = getprop("/ECAM/Lower/page");
if (!man_sel) {
if (!fault_sel) {
warnPhase = getprop("/ECAM/warning-phase");
aileron = getprop("/fdm/jsbsim/fbw/aileron-sidestick");
elevator = getprop("/fdm/jsbsim/fbw/elevator-sidestick");
APUMaster = getprop("/controls/APU/master");
APURPM = getprop("/systems/apu/rpm");
stateL = getprop("/engines/engine[0]/state");
stateR = getprop("/engines/engine[1]/state");
engModeSel = getprop("/controls/engines/engine-start-switch");
elapsedSec = getprop("/sim/time/elapsed-sec");
if (warnPhase == 2) {
if (abs(aileron) > 0.3 or abs(elevator) > 0.3) {
fctlTime = elapsedSec;
fctlCounting = 1;
} else if (fctlCounting) {
if (fctlTime + 20 < elapsedSec) {
fctlCounting = 0;
}
}
} else {
fctlCounting = 0;
}
if (APURPM > 95) {
if (APUTime + 10 < elapsedSec) {
APUCounting = 0;
}
} else {
if (APUMaster) {
APUTime = elapsedSec;
APUCounting = 1;
} else {
APUCounting = 0;
}
}
if ((APURPM <= 95 or APUCounting) and APUMaster) {
showAPUPage = 1;
} else {
showAPUPage = 0;
}
if (stateL == 3 or stateR == 3) {
if (ENGCounting and ENGTime + 10 < elapsedSec) {
ENGCounting = 0;
}
}
if (((stateL > 0 and stateL != 3) or (stateR > 0 and stateR != 3)) and engModeSel == 2) {
ENGTime = elapsedSec;
ENGCounting = 1;
} else if ((stateL == 0 and stateR == 0) or engModeSel == 1) {
ENGCounting = 0;
}
if (ENGCounting or engModeSel == 0) {
showENGPage = 1;
} else {
showENGPage = 0;
}
if (warnPhase == 1 or warnPhase == 10) {
if (showENGPage) {
if (page != "eng") {
setprop("/ECAM/Lower/page", "eng");
}
} else if (showAPUPage) {
if (page != "apu") {
setprop("/ECAM/Lower/page", "apu");
}
} else if (page != "door") {
setprop("/ECAM/Lower/page", "door");
}
} else if (warnPhase == 2) {
if (showENGPage) {
if (page != "eng") {
setprop("/ECAM/Lower/page", "eng");
}
} else if (showAPUPage) {
if (page != "apu") {
setprop("/ECAM/Lower/page", "apu");
}
} else if (fctlCounting == 1) {
if (page != "fctl") {
setprop("/ECAM/Lower/page", "fctl");
}
} else if (page != "wheel") {
setprop("/ECAM/Lower/page", "wheel");
}
} else if (warnPhase >= 3 and warnPhase <= 5) {
if (page != "eng") {
setprop("/ECAM/Lower/page", "eng");
}
} else if (warnPhase >= 7 and warnPhase <= 9) {
if (showENGPage) {
if (page != "eng") {
setprop("/ECAM/Lower/page", "eng");
}
} else if (showAPUPage) {
if (page != "apu") {
setprop("/ECAM/Lower/page", "apu");
}
} else if (page != "wheel") {
setprop("/ECAM/Lower/page", "wheel");
}
} else if (warnPhase == 6) {
flapLever = getprop("/controls/flight/flap-lever");
gearLever = getprop("/controls/gear/gear-down");
agl = pts.Position.gearAglFt.getValue();
if (CRZCounting and (toPowerSet or flapLever > 0) and !CRZCondition) {
if (CRZTime + 60 < elapsedSec) {
CRZCondition = 1;
CRZCounting = 0;
} else {
CRZCondition = 0;
}
}
if (!CRZCounting and (toPowerSet or flapLever > 0) and !CRZCondition) {
CRZTime = elapsedSec;
CRZCondition = 0;
CRZCounting = 1;
}
if (CRZCondition or (flapLever == 0 and !toPowerSet)) {
if (gearLever and agl <= 16000) {
if (page != "wheel") {
setprop("/ECAM/Lower/page", "wheel");
}
} else if (page != "crz") {
setprop("/ECAM/Lower/page", "crz");
}
} else {
if (showENGPage) {
if (page != "eng") {
setprop("/ECAM/Lower/page", "eng");
}
} else if (showAPUPage) {
if (page != "apu") {
setprop("/ECAM/Lower/page", "apu");
}
} else if (page != "eng") {
setprop("/ECAM/Lower/page", "eng");
}
}
}
} else {
setprop("/ECAM/Lower/light/apu", 0);
setprop("/ECAM/Lower/light/bleed", 0);
setprop("/ECAM/Lower/light/cond", 0);
setprop("/ECAM/Lower/light/door", 0);
setprop("/ECAM/Lower/light/elec", 0);
setprop("/ECAM/Lower/light/eng", 0);
setprop("/ECAM/Lower/light/fctl", 0);
setprop("/ECAM/Lower/light/fuel", 0);
setprop("/ECAM/Lower/light/hyd", 0);
setprop("/ECAM/Lower/light/press", 0);
setprop("/ECAM/Lower/light/sts", 0);
setprop("/ECAM/Lower/light/wheel", 0);
}
}
},
reset: func() {
setprop("/ECAM/Lower/page", "door");
setprop("/ECAM/Lower/man-select", 0);
setprop("/ECAM/Lower/fault-select", 0);
setprop("/ECAM/Lower/light/apu", 0);
setprop("/ECAM/Lower/light/bleed", 0);
setprop("/ECAM/Lower/light/cond", 0);
setprop("/ECAM/Lower/light/door", 0);
setprop("/ECAM/Lower/light/elec", 0);
setprop("/ECAM/Lower/light/eng", 0);
setprop("/ECAM/Lower/light/fctl", 0);
setprop("/ECAM/Lower/light/fuel", 0);
setprop("/ECAM/Lower/light/hyd", 0);
setprop("/ECAM/Lower/light/press", 0);
setprop("/ECAM/Lower/light/sts", 0);
setprop("/ECAM/Lower/light/wheel", 0);
},
failCall: func(page) {
setprop("/ECAM/Lower/man-select", 0);
setprop("/ECAM/Lower/fault-select", 1);
setprop("/ECAM/Lower/fault-page", page);
setprop("/ECAM/Lower/page", page);
setprop("/ECAM/Lower/light/clr", 1);
},
clrLight: func() {
setprop("/ECAM/Lower/light/clr", 1);
}
};
# Autoflight Warnings
var doAthrWarn = func(type) {
if (type == "none") {
return;
} elsif (type == "soft") {
setprop("/ECAM/athr-off-time", getprop("/sim/time/elapsed-sec"));
setprop("/it-autoflight/output/athr-warning", 1);
} else {
libraries.LowerECAM.clrLight();
setprop("/it-autoflight/output/athr-warning", 2);
}
setprop("/ECAM/warnings/master-caution-light", 1);
}
var doApWarn = func(type) {
if (type == "none") {
return;
} elsif (type == "soft") {
setprop("/ECAM/ap-off-time", getprop("/sim/time/elapsed-sec"));
setprop("/it-autoflight/output/ap-warning", 1);
setprop("/ECAM/warnings/master-warning-light", 1);
} else {
setprop("/it-autoflight/output/ap-warning", 2);
# master warning handled by warning system in this case
libraries.LowerECAM.clrLight();
}
}

View file

@ -1,9 +1,6 @@
# A3XX Electronic Centralised Aircraft Monitoring System
# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
var leftmsgEnable = props.globals.initNode("/ECAM/show-left-msg", 1, "BOOL");
var rightmsgEnable = props.globals.initNode("/ECAM/show-right-msg", 1, "BOOL");
var lines = [props.globals.getNode("/ECAM/msg/line1", 1), props.globals.getNode("/ECAM/msg/line2", 1), props.globals.getNode("/ECAM/msg/line3", 1), props.globals.getNode("/ECAM/msg/line4", 1), props.globals.getNode("/ECAM/msg/line5", 1), props.globals.getNode("/ECAM/msg/line6", 1), props.globals.getNode("/ECAM/msg/line7", 1), props.globals.getNode("/ECAM/msg/line8", 1)];
var linesCol = [props.globals.getNode("/ECAM/msg/linec1", 1), props.globals.getNode("/ECAM/msg/linec2", 1), props.globals.getNode("/ECAM/msg/linec3", 1), props.globals.getNode("/ECAM/msg/linec4", 1), props.globals.getNode("/ECAM/msg/linec5", 1), props.globals.getNode("/ECAM/msg/linec6", 1), props.globals.getNode("/ECAM/msg/linec7", 1), props.globals.getNode("/ECAM/msg/linec8", 1)];
var rightLines = [props.globals.getNode("/ECAM/rightmsg/line1", 1), props.globals.getNode("/ECAM/rightmsg/line2", 1), props.globals.getNode("/ECAM/rightmsg/line3", 1), props.globals.getNode("/ECAM/rightmsg/line4", 1), props.globals.getNode("/ECAM/rightmsg/line5", 1), props.globals.getNode("/ECAM/rightmsg/line6", 1), props.globals.getNode("/ECAM/rightmsg/line7", 1), props.globals.getNode("/ECAM/rightmsg/line8", 1)];
@ -18,7 +15,7 @@ var overflow = props.globals.initNode("/ECAM/warnings/overflow", 0, "BOOL");
var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess", 1);
var lights = [props.globals.initNode("/ECAM/warnings/master-warning-light", 0, "BOOL"), props.globals.initNode("/ECAM/warnings/master-caution-light", 0, "BOOL")];
var aural = [props.globals.initNode("/sim/sound/warnings/crc", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/chime", 0, "BOOL")];
var aural = [props.globals.initNode("/sim/sound/warnings/crc", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/chime", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cricket", 0, "BOOL")];
var warningFlash = props.globals.initNode("/ECAM/warnings/master-warning-flash", 0, "BOOL");
var lineIndex = 0;
@ -46,11 +43,13 @@ var warning = {
t.sdPage = sdPage;
t.isMemo = isMemo;
t.hasCalled = 0;
t.wasActive = 0;
return t
},
write: func() {
if (me.active == 0) { return; }
me.wasActive = 1;
lineIndex = 0;
while (lineIndex < 7 and lines[lineIndex].getValue() != "") {
lineIndex = lineIndex + 1; # go to next line until empty line
@ -68,23 +67,37 @@ var warning = {
}
},
warnlight: func() {
if (me.light > 1 or me.noRepeat == 1 or me.active == 0) {return;}
if (me.light > 1) { return; }
if (me.active == 0 and me.wasActive == 1) {
lights[me.light].setBoolValue(0);
me.wasActive = 0;
}
if (me.noRepeat == 1 or me.active == 0) { return; }
lights[me.light].setBoolValue(1);
me.noRepeat = 1;
},
sound: func() {
if (me.aural > 1 or me.noRepeat2 == 1 or me.active == 0) {return;}
if (me.aural > 2) { return; }
if (me.active == 0 and me.wasActive == 1) {
aural[me.aural].setBoolValue(0);
me.wasActive = 0;
}
if (me.noRepeat2 == 1 or me.active == 0) { return; }
if (me.aural != 0) {
aural[me.aural].setBoolValue(0);
}
me.noRepeat2 = 1;
me.noRepeat2 = 1;
settimer(func() {
aural[me.aural].setBoolValue(1);
}, 0.15);
},
callPage: func() {
if (me.sdPage == "nil" or me.hasCalled == 1) { return; }
#libraries.LowerECAM.failCall(me.sdPage);
libraries.SystemDisplay.failCall(me.sdPage);
me.hasCalled = 1;
}
};
@ -147,6 +160,7 @@ var status = {
var ECAM_controller = {
_recallCounter: 0,
_noneActive: 0,
init: func() {
ECAMloopTimer.start();
me.reset();
@ -193,6 +207,9 @@ var ECAM_controller = {
w.warnlight();
w.sound();
counter += 1;
} elsif (w.wasActive == 1) {
w.warnlight();
w.sound();
}
}
}
@ -277,6 +294,7 @@ var ECAM_controller = {
w.clearFlag = 1;
hasCleared = 1;
statusFlag = 1;
libraries.ECAMControlPanel.lightOff("clr");
}
}
} else {
@ -285,17 +303,19 @@ var ECAM_controller = {
w.clearFlag = 1;
hasCleared = 1;
statusFlag = 1;
libraries.ECAMControlPanel.lightOff("clr");
break;
}
}
}
if (statusFlag == 1) {
libraries.LowerECAM.failCall("sts");
libraries.SystemDisplay.manCall("sts");
statusFlag = 0;
}
},
recall: func() {
me._noneActive = 1;
me._recallCounter = 0;
foreach (var w; warnings.vector) {
if (w.clearFlag == 1) {
@ -303,9 +323,13 @@ var ECAM_controller = {
w.clearFlag = 0;
me._recallCounter += 1;
}
if (w.active == 1) {
me._noneActive = 0;
}
}
if (me._recallCounter == 0) {
if (me._recallCounter == 0 and me._noneActive) {
FWC.Btn.recallStsNormal.setValue(1);
settimer(func() {
if (FWC.Btn.recallStsNormal.getValue() == 1) { # catch unexpected error, trying something new here
@ -320,6 +344,9 @@ var ECAM_controller = {
warning.active = 0;
warning.noRepeat = 0;
warning.noRepeat2 = 0;
if (warning.aural == 2) {
aural[2].setValue(0);
}
},
};

View file

@ -6,12 +6,11 @@
var dualFailNode = props.globals.initNode("/ECAM/dual-failure-enabled", 0, "BOOL");
var phaseNode = props.globals.getNode("/ECAM/warning-phase", 1);
var leftMsgNode = props.globals.getNode("/ECAM/left-msg", 1);
var apWarn = props.globals.getNode("/it-autoflight/output/ap-warning", 1);
var athrWarn = props.globals.getNode("/it-autoflight/output/athr-warning", 1);
var emerGen = props.globals.getNode("/controls/electrical/switches/emer-gen", 1);
var fac1Node = props.globals.getNode("/controls/fctl/fac1", 1);
var fac1Node = props.globals.getNode("/controls/fctl/switches/fac1", 1);
var state1Node = props.globals.getNode("/engines/engine[0]/state", 1);
var state2Node = props.globals.getNode("/engines/engine[1]/state", 1);
var wowNode = props.globals.getNode("/fdm/jsbsim/position/wow", 1);
@ -22,6 +21,7 @@ var apu_bleedSw = props.globals.getNode("/controls/pneumatic/switches/bleedapu
var gear = props.globals.getNode("/gear/gear-pos-norm", 1);
var cutoff1 = props.globals.getNode("/controls/engines/engine[0]/cutoff-switch", 1);
var cutoff2 = props.globals.getNode("/controls/engines/engine[1]/cutoff-switch", 1);
var stallVoice = props.globals.initNode("/sim/sound/warnings/stall-voice", 0, "BOOL");
var engOpt = props.globals.getNode("/options/eng", 1);
# local variables
@ -29,11 +29,53 @@ var phaseVar = nil;
var dualFailFACActive = 1;
var emerConfigFACActive = 1;
var gear_agl_cur = nil;
var messages_priority_3 = func {
phaseVar = phaseNode.getValue();
# FCTL
# Stall
# todo - altn law and emer cancel flipflops page 2440
if (phaseVar >= 5 and phaseVar <= 7 and (getprop("/fdm/jsbsim/fcs/slat-pos-deg") <= 15 and (getprop("/systems/navigation/adr/output/aoa-1") > 15 or getprop("/systems/navigation/adr/output/aoa-2") > 15 or getprop("/systems/navigation/adr/output/aoa-3") > 15)) or (getprop("/fdm/jsbsim/fcs/slat-pos-deg") > 15 and (getprop("/systems/navigation/adr/output/aoa-1") > 23 or getprop("/systems/navigation/adr/output/aoa-2") > 23 or getprop("/systems/navigation/adr/output/aoa-3") > 23))) {
stall.active = 1;
} else {
ECAM_controller.warningReset(stall);
}
if (stall.active) {
stallVoice.setValue(1);
} else {
stallVoice.setValue(0);
}
if ((phaseVar == 1 or (phaseVar >= 5 and phaseVar <= 7)) and getprop("/systems/navigation/adr/output/overspeed")) {
overspeed.active = 1;
if (getprop("/systems/navigation/adr/computation/overspeed-vmo") or getprop("/systems/navigation/adr/computation/overspeed-mmo")) {
overspeedVMO.active = 1;
} else {
ECAM_controller.warningReset(overspeedVMO);
}
if (getprop("/systems/navigation/adr/computation/overspeed-vle")) {
overspeedGear.active = 1;
} else {
ECAM_controller.warningReset(overspeedGear);
}
if (getprop("/systems/navigation/adr/computation/overspeed-vfe")) {
overspeedFlap.active = 1;
overspeedFlap.msg = "-VFE................" ~ (systems.ADIRSnew.overspeedVFE.getValue() - 4);
} else {
ECAM_controller.warningReset(overspeedFlap);
overspeedFlap.msg = "-VFE................XXX";
}
} else {
ECAM_controller.warningReset(overspeed);
ECAM_controller.warningReset(overspeedVMO);
ECAM_controller.warningReset(overspeedGear);
ECAM_controller.warningReset(overspeedFlap);
overspeedFlap.msg = "-VFE................XXX";
}
# FCTL FLAPS NOT ZERO
if ((flap_not_zero.clearFlag == 0) and phaseVar == 6 and getprop("/controls/flight/flap-lever") != 0 and getprop("/instrumentation/altimeter/indicated-altitude-ft") > 22000) {
flap_not_zero.active = 1;
} else {
@ -930,7 +972,7 @@ var messages_priority_3 = func {
var messages_priority_2 = func {
phaseVar = phaseNode.getValue();
# DC EMER CONFIG
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8) {
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8 and dcEmerconfig.clearFlag == 0) {
dcEmerconfig.active = 1;
dcEmerconfigManOn.active = 1;
} else {
@ -938,7 +980,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcEmerconfigManOn);
}
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8) {
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8 and dcBus12Fault.clearFlag == 0) {
dcBus12Fault.active = 1;
dcBus12FaultBlower.active = 1;
dcBus12FaultExtract.active = 1;
@ -954,7 +996,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBus12FaultBrking);
}
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.acEss.getValue() < 110 and phaseVar != 4 and phaseVar != 8) {
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.acEss.getValue() < 110 and phaseVar != 4 and phaseVar != 8 and AcBusEssFault.clearFlag == 0) {
AcBusEssFault.active = 1;
if (!systems.ELEC.Switch.acEssFeed.getBoolValue()) {
AcBusEssFaultFeed.active = 1;
@ -968,7 +1010,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(AcBusEssFaultAtc);
}
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac1.getValue() < 110 and phaseVar != 4 and phaseVar != 8) {
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac1.getValue() < 110 and phaseVar != 4 and phaseVar != 8 and AcBus1Fault.clearFlag == 0) {
AcBus1Fault.active = 1;
AcBus1FaultBlower.active = 1;
} else {
@ -976,7 +1018,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(AcBus1FaultBlower);
}
if (!dcEmerconfig.active and systems.ELEC.Bus.dcEss.getValue() < 25 and phaseVar != 4 and phaseVar != 8) {
if (!dcEmerconfig.active and systems.ELEC.Bus.dcEss.getValue() < 25 and phaseVar != 4 and phaseVar != 8 and DcEssBusFault.clearFlag == 0) {
DcEssBusFault.active = 1;
DcEssBusFaultRadio.active = 1;
DcEssBusFaultRadio2.active = 1;
@ -990,7 +1032,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(DcEssBusFaultGPWS);
}
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac2.getValue() < 110 and phaseVar != 4 and phaseVar != 8) {
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac2.getValue() < 110 and phaseVar != 4 and phaseVar != 8 and AcBus2Fault.clearFlag == 0) {
AcBus2Fault.active = 1;
AcBus2FaultExtract.active = 1;
} else {
@ -998,7 +1040,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(AcBus2FaultExtract);
}
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() >= 25 and phaseVar != 4 and phaseVar != 8) {
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() >= 25 and phaseVar != 4 and phaseVar != 8 and dcBus1Fault.clearFlag == 0) {
dcBus1Fault.active = 1;
dcBus1FaultBlower.active = 1;
dcBus1FaultExtract.active = 1;
@ -1008,7 +1050,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBus1FaultExtract);
}
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() >= 25 and systems.ELEC.Bus.dc2.getValue() <= 25 and phaseVar != 4 and phaseVar != 8) {
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() >= 25 and systems.ELEC.Bus.dc2.getValue() <= 25 and phaseVar != 4 and phaseVar != 8 and dcBus2Fault.clearFlag == 0) {
dcBus2Fault.active = 1;
dcBus2FaultAirData.active = 1;
dcBus2FaultBaro.active = 1;
@ -1018,13 +1060,13 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBus2FaultBaro);
}
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dcBat.getValue() < 25 and phaseVar != 4 and phaseVar != 5 and phaseVar != 7 and phaseVar != 8) {
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dcBat.getValue() < 25 and phaseVar != 4 and phaseVar != 5 and phaseVar != 7 and phaseVar != 8 and dcBusBatFault.clearFlag == 0) {
dcBusBatFault.active = 1;
} else {
ECAM_controller.warningReset(dcBusBatFault);
}
if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar != 4 and phaseVar != 8) {
if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar != 4 and phaseVar != 8 and dcBusEssShed.clearFlag == 0) {
dcBusEssShed.active = 1;
dcBusEssShedExtract.active = 1;
dcBusEssShedIcing.active = 1;
@ -1034,7 +1076,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBusEssShedIcing);
}
if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar != 4 and phaseVar != 8) {
if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar != 4 and phaseVar != 8 and acBusEssShed.clearFlag == 0) {
acBusEssShed.active = 1;
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config")) {
acBusEssShedAtc.active = 1;
@ -1046,7 +1088,13 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(acBusEssShedAtc);
}
if (fcu.FCUController.FCU1.failed and fcu.FCUController.FCU2.failed and systems.ELEC.Bus.dcEss.getValue() >= 25 and systems.ELEC.Bus.dcEss.getValue() >= 25) {
if (getprop("/instrumentation/tcas/serviceable") == 0 and phaseVar != 3 and phaseVar != 4 and phaseVar != 7 and systems.ELEC.Bus.ac1.getValue() and pts.Instrumentation.TCAS.Inputs.mode.getValue() != 1 and tcasFault.clearFlag == 0) {
tcasFault.active = 1;
} else {
ECAM_controller.warningReset(tcasFault);
}
if (fcu.FCUController.FCU1.failed and fcu.FCUController.FCU2.failed and systems.ELEC.Bus.dcEss.getValue() >= 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and fcuFault.clearFlag == 0) {
fcuFault.active = 1;
fcuFaultBaro.active = 1;
} else {
@ -1054,7 +1102,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(fcuFaultBaro);
}
if (fcu.FCUController.FCU1.failed and !fcu.FCUController.FCU2.failed and systems.ELEC.Bus.dcEss.getValue() >= 25) {
if (fcu.FCUController.FCU1.failed and !fcu.FCUController.FCU2.failed and systems.ELEC.Bus.dcEss.getValue() >= 25 and fcuFault1.clearFlag == 0) {
fcuFault1.active = 1;
fcuFault1Baro.active = 1;
} else {
@ -1062,7 +1110,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(fcuFault1Baro);
}
if (fcu.FCUController.FCU2.failed and !fcu.FCUController.FCU1.failed and systems.ELEC.Bus.dc2.getValue() >= 25) {
if (fcu.FCUController.FCU2.failed and !fcu.FCUController.FCU1.failed and systems.ELEC.Bus.dc2.getValue() >= 25 and fcuFault2.clearFlag == 0) {
fcuFault2.active = 1;
fcuFault2Baro.active = 1;
} else {
@ -1574,7 +1622,7 @@ var messages_right_memo = func {
}
# Listeners
setlistener("/controls/fctl/fac1", func() {
setlistener("/controls/fctl/switches/fac1", func() {
if (dualFail.active == 0 and emerconfig.active == 0) { return; }
if (fac1Node.getBoolValue() and dualFail.active == 1) {

417
Nasal/ECAM/ECAM-main.nas Normal file
View file

@ -0,0 +1,417 @@
# A3XX ECAM
# Joshua Davidson (Octal450) and Jonathan Redpath (legoboyvdlp)
# Copyright (c) 2019 Joshua Davidson (Octal450) and Jonathan Redpath (legoboyvdlp)
var ap_active = 0;
var athr_active = 0;
var phase = 0;
var aileron = 0;
var elevator = 0;
var stateL = 0;
var stateR = 0;
var engModeSel = 0;
var APUMaster = 0;
var APURPM = 0;
var elapsedSec = 0;
var gearDown = 0;
var agl = 0;
var apOffTime = 0;
var athrOffTime = 0;
var apWarnNode = 0;
var athrWarnNode = 0;
var leftMsg = 0;
var rightMsg = 0;
var engStrtTimeSw = 0;
var engStrtTime = 0;
var page = 0;
var apuLight = 0;
var bleedLight = 0;
var condLight = 0;
var doorLight = 0;
var elecLight = 0;
var engLight = 0;
var fctlLight = 0;
var fuelLight = 0;
var hydLight = 0;
var pressLight = 0;
var stsLight = 0;
var wheelLight = 0;
var clrLight = 0;
var ECAM = {
_cachePage: "",
init: func() {
setprop("/systems/gear/landing-gear-warning-light", 0);
page = props.globals.initNode("/ECAM/Lower/page", "door", "STRING");
apuLight = props.globals.initNode("/ECAM/Lower/light/apu", 0, "BOOL");
bleedLight = props.globals.initNode("/ECAM/Lower/light/bleed", 0, "BOOL");
condLight = props.globals.initNode("/ECAM/Lower/light/cond", 0, "BOOL");
doorLight = props.globals.initNode("/ECAM/Lower/light/door", 0, "BOOL");
elecLight = props.globals.initNode("/ECAM/Lower/light/elec", 0, "BOOL");
engLight = props.globals.initNode("/ECAM/Lower/light/eng", 0, "BOOL");
fctlLight = props.globals.initNode("/ECAM/Lower/light/fctl", 0, "BOOL");
fuelLight = props.globals.initNode("/ECAM/Lower/light/fuel", 0, "BOOL");
hydLight = props.globals.initNode("/ECAM/Lower/light/hyd", 0, "BOOL");
pressLight = props.globals.initNode("/ECAM/Lower/light/press", 0, "BOOL");
stsLight = props.globals.initNode("/ECAM/Lower/light/sts", 0, "BOOL");
wheelLight = props.globals.initNode("/ECAM/Lower/light/wheel", 0, "BOOL");
clrLight = props.globals.initNode("/ECAM/Lower/light/clr", 0, "BOOL");
phase = props.globals.initNode("/ECAM/warning-phase", 0, "INT");
apOffTime = props.globals.initNode("/ECAM/ap-off-time", 0, "INT");
athrOffTime = props.globals.initNode("/ECAM/athr-off-time", 0, "INT");
leftMsg = props.globals.initNode("/ECAM/left-msg", "MSG", "STRING");
rightMsg = props.globals.initNode("/ECAM/right-msg", "MSG", "STRING");
engStrtTimeSw = props.globals.initNode("/ECAM/engine-start-time-switch", 0, "BOOL");
engStrtTime = props.globals.initNode("/ECAM/engine-start-time", 0.0, "DOUBLE");
apWarnNode = props.globals.initNode("/it-autoflight/output/ap-warning", 0, "INT");
athrWarnNode = props.globals.initNode("/it-autoflight/output/athr-warning", 0, "INT");
me.reset();
},
reset: func() {
setprop("/ECAM/msg/line1", "");
setprop("/ECAM/msg/line2", "");
setprop("/ECAM/msg/line3", "");
setprop("/ECAM/msg/line4", "");
setprop("/ECAM/msg/line5", "");
setprop("/ECAM/msg/line6", "");
setprop("/ECAM/msg/line7", "");
setprop("/ECAM/msg/line8", "");
setprop("/ECAM/msg/linec1", "w");
setprop("/ECAM/msg/linec2", "w");
setprop("/ECAM/msg/linec3", "w");
setprop("/ECAM/msg/linec4", "w");
setprop("/ECAM/msg/linec5", "w");
setprop("/ECAM/msg/linec6", "w");
setprop("/ECAM/msg/linec7", "w");
setprop("/ECAM/msg/linec8", "w");
setprop("/ECAM/rightmsg/line1", "");
setprop("/ECAM/rightmsg/line2", "");
setprop("/ECAM/rightmsg/line3", "");
setprop("/ECAM/rightmsg/line4", "");
setprop("/ECAM/rightmsg/line5", "");
setprop("/ECAM/rightmsg/line6", "");
setprop("/ECAM/rightmsg/line7", "");
setprop("/ECAM/rightmsg/line8", "");
setprop("/ECAM/rightmsg/linec1", "w");
setprop("/ECAM/rightmsg/linec2", "w");
setprop("/ECAM/rightmsg/linec3", "w");
setprop("/ECAM/rightmsg/linec4", "w");
setprop("/ECAM/rightmsg/linec5", "w");
setprop("/ECAM/rightmsg/linec6", "w");
setprop("/ECAM/rightmsg/linec7", "w");
setprop("/ECAM/rightmsg/linec8", "w");
page.setValue("door");
apuLight.setValue(0);
bleedLight.setValue(0);
condLight.setValue(0);
doorLight.setValue(0);
elecLight.setValue(0);
engLight.setValue(0);
fctlLight.setValue(0);
fuelLight.setValue(0);
hydLight.setValue(0);
pressLight.setValue(0);
stsLight.setValue(0);
wheelLight.setValue(0);
clrLight.setValue(0);
},
loop: func() {
stateL = pts.Engines.Engine1.state.getValue();
stateR = pts.Engines.Engine2.state.getValue();
wow = pts.Gear.wow[0].getValue();
elapsedTime = pts.Sim.Time.elapsedSec.getValue();
if (stateL != 3 or stateR != 3) {
if (engStrtTimeSw.getBoolValue()) {
engStrtTimeSw.setBoolValue(0);
engStrtTime.setValue(0);
}
} else if (stateL == 3 and stateR == 3 and wow == 1) {
if (!engStrtTimeSw.getBoolValue()) {
engStrtTime.setValue(elapsedTime);
engStrtTimeSw.setBoolValue(1);
}
} else if (wow == 1) {
if (engStrtTimeSw.getBoolValue()) {
engStrtTimeSw.setBoolValue(0);
}
}
# AP / ATHR warnings
if (ap_active == 1 and apWarnNode.getValue() == 0) {
ap_active = 0;
} elsif (ap_active == 1 and apWarnNode.getValue() == 1 and elapsedTime > (apOffTime.getValue() + 9)) {
ap_active = 0;
apWarnNode.setValue(0);
} elsif (ap_active == 0 and apWarnNode.getValue() != 0) {
ap_active = 1;
}
if (ap_active == 1 and apWarnNode.getValue() == 1 and elapsedTime > (apOffTime.getValue() + 3) and ecam.lights[0].getBoolValue()) {
ecam.lights[0].setBoolValue(0);
}
if (apWarnNode.getValue() == 2 and (fmgc.Output.ap1.getValue() == 1 or fmgc.Output.ap2.getValue() == 1)) {
apWarnNode.setValue(0);
}
if (athr_active == 1 and athrWarnNode.getValue() == 0) {
athr_active = 0;
} elsif (athr_active == 1 and athrWarnNode.getValue() == 1 and elapsedTime > (athrOffTime.getValue() + 9)) {
athr_active = 0;
athrWarnNode.setValue(0);
} elsif (athr_active == 0 and athrWarnNode.getValue() != 0) {
athr_active = 1;
}
if (athr_active == 1 and athrWarnNode.getValue() == 1 and elapsedTime > (athrOffTime.getValue() + 3) and ecam.lights[1].getBoolValue()) {
ecam.lights[1].setValue(0);
}
if (athrWarnNode.getValue() == 2 and fmgc.Output.athr.getValue() == 1) {
athrWarnNode.setValue(0);
}
SystemDisplay.update();
if (me._cachePage != SystemDisplay.page) {
me._cachePage = SystemDisplay.page;
page.setValue(SystemDisplay.page);
}
},
clrLight: func() {
clrLight.setValue(1);
}
};
var SystemDisplay = {
page: "",
manShownPage: 0,
failShownPage: 0,
APU10sec: 9,
eng10sec: 9,
fctl20sc: 9,
_apuTime: 0,
_engTime: 0,
_fctlTime: 0,
failCall: func(page) {
if (me.manShownPage) {
me.manShownPage = 0;
ECAMControlPanel.lightOff(me.page);
}
ECAMControlPanel.lightOn(page);
me.page = page;
me.failShownPage = 1;
},
manCall: func(page) {
ECAMControlPanel.lightOff(me.page);
ECAMControlPanel.lightOn(page);
me.page = page;
me.manShownPage = 1;
},
autoCall: func(page) {
if (me.manShownPage or me.failShownPage) { return; }
if (me.page != page) {
me.page = page;
}
},
update: func() {
phase = pts.ECAM.fwcWarningPhase.getValue();
APUMaster = pts.APU.masterSw.getValue();
APURPM = pts.APU.rpm.getValue();
engModeSel = pts.Controls.Engines.startSw.getValue();
elapsedSec = pts.Sim.Time.elapsedSec.getValue();
if (APUMaster == 1 and me.APU10sec != 1) {
me.autoCall("apu");
me.fctl20sec = 9;
if (me.APU10sec == 9 and APURPM >= 95.0) {
me.APU10sec = 0;
me._apuTime = elapsedSec;
}
if (me.APU10sec != 9 and elapsedSec > me._apuTime + 10) {
me.APU10sec = 1;
}
} elsif (engModeSel == 0 or engModeSel == 2 or (engModeSel == 1 and me.eng10sec == 0)) {
me.autoCall("eng");
me.fctl20sec = 9;
if (me.eng10sec == 9 and engModeSel == 1) {
me.eng10sec = 0;
me._engTime = elapsedSec;
}
if (me.eng10sec != 9 and elapsedSec > me._engTime + 10) {
me.eng10sec = 1;
}
} else {
# Reset variables
me.APU10sec = 9;
me.eng10sec = 9;
# Phase logic
if (phase == 1) {
me.autoCall("door");
me.fctl20sec = 9;
} elsif (phase == 2) {
aileron = pts.JSBSim.FBW.aileron.getValue();
elevator = pts.JSBSim.FBW.elevator.getValue();
if (abs(aileron) >= 0.15 or abs(elevator) >= 0.15 and me.fctl20sec == 9) {
me.autoCall("fctl");
if (me.fctl20sec == 9) {
me.fctl20sec = 0;
me._fctlTime = elapsedSec;
}
if (me.fctl20sec != 9 and elapsedSec > me._fctlTime + 20) {
me.fctl20sec = 1;
}
} elsif (me.fctl20sec == 0) {
if (me.fctl20sec != 9 and elapsedSec > me._fctlTime + 20) {
me.fctl20sec = 1;
}
} else {
me.autoCall("wheel");
me.fctl20sec = 9;
}
} elsif (phase >= 3 and phase <= 5) {
me.autoCall("eng");
me.fctl20sec = 9;
} elsif (phase == 6) {
gearLever = pts.Controls.Gear.gearDown.getValue();
agl = pts.Position.gearAglFt.getValue();
if (gearLever and agl <= 16000) {
me.autoCall("wheel");
} else {
me.autoCall("crz");
}
me.fctl20sec = 9;
} elsif (phase >= 7 and phase <= 9) {
me.autoCall("wheel");
me.fctl20sec = 9;
} elsif (phase == 10) {
me.autoCall("door");
me.fctl20sec = 9;
}
}
},
};
var ECAMControlPanel = {
sysPageBtn: func(page) {
if (SystemDisplay.page != page) {
SystemDisplay.manCall(page);
} else {
me.lightOff(SystemDisplay.page);
SystemDisplay.manShownPage = 0;
}
},
rclBtn: func() {
ecam.ECAM_controller.recall();
},
clrBtn: func() {
me.lightOff("clr");
if (athrWarnNode.getValue == 2) {
athrWarnNode.setValue(0);
return;
}
if (apWarnNode.getValue() == 2) {
apWarnNode.setValue(0);
return;
}
if (SystemDisplay.manShownPage) {
me.lightOff(SystemDisplay.page);
SystemDisplay.manShownPage = 0;
return;
}
if (SystemDisplay.failShownPage) {
me.lightOff(SystemDisplay.page);
SystemDisplay.failShownPage = 0;
return;
}
ecam.ECAM_controller.clear();
},
stsBtn: func() {
SystemDisplay.manCall("sts");
},
allBtn: func() {
# todo
},
toConfigBtn: func() {
# todo
},
emerCancBtn: func() {
# todo
},
lightOff: func(page) {
if (page == "clr") { clrLight.setBoolValue(0); }
elsif (page == "apu") { apuLight.setBoolValue(0); }
elsif (page == "bleed") { bleedLight.setBoolValue(0); }
elsif (page == "cond") { condLight.setBoolValue(0); }
elsif (page == "door") { doorLight.setBoolValue(0); }
elsif (page == "elec") { elecLight.setBoolValue(0); }
elsif (page == "eng") { engLight.setBoolValue(0); }
elsif (page == "fctl") { fctlLight.setBoolValue(0); }
elsif (page == "fuel") { fuelLight.setBoolValue(0); }
elsif (page == "hyd") { hydLight.setBoolValue(0); }
elsif (page == "press") { pressLight.setBoolValue(0); }
elsif (page == "sts") { stsLight.setBoolValue(0); }
elsif (page == "wheel") { wheelLight.setBoolValue(0); }
},
lightOn: func(page) {
if (page == "clr") { clrLight.setBoolValue(1); }
elsif (page == "apu") { apuLight.setBoolValue(1); }
elsif (page == "bleed") { bleedLight.setBoolValue(1); }
elsif (page == "cond") { condLight.setBoolValue(1); }
elsif (page == "door") { doorLight.setBoolValue(1); }
elsif (page == "elec") { elecLight.setBoolValue(1); }
elsif (page == "eng") { engLight.setBoolValue(1); }
elsif (page == "fctl") { fctlLight.setBoolValue(1); }
elsif (page == "fuel") { fuelLight.setBoolValue(1); }
elsif (page == "hyd") { hydLight.setBoolValue(1); }
elsif (page == "press") { pressLight.setBoolValue(1); }
elsif (page == "sts") { stsLight.setBoolValue(1); }
elsif (page == "wheel") { wheelLight.setBoolValue(1); }
},
};
# Autoflight Warnings
var doAthrWarn = func(type) {
if (type == "none") {
return;
} elsif (type == "soft") {
athrOffTime.setValue(pts.Sim.Time.elapsedSec.getValue());
athrWarnNode.setValue(1);
} else {
ECAMControlPanel.lightOn("clr");
athrWarnNode.setValue(2);
}
ecam.lights[1].setBoolValue(1);
}
var doApWarn = func(type) {
if (type == "none") {
return;
} elsif (type == "soft") {
apOffTime.setValue(pts.Sim.Time.elapsedSec.getValue());
apWarnNode.setValue(1);
ecam.lights[0].setBoolValue(1);
} else {
apWarnNode.setValue(2);
# master warning handled by warning system in this case
}
}

View file

@ -10,8 +10,14 @@
# Left E/WD
var warnings = std.Vector.new([
var stall = warning.new(msg: "", aural: 2),
var flap_not_zero = warning.new(msg: "F/CTL FLAP LVR NOT ZERO", colour: "r", aural: 0, light: 0),
var overspeed = warning.new(msg: "OVER SPEED", colour: "r", aural: 0, light: 0, hasSubmsg: 1),
var overspeedVMO = warning.new(msg: "-VMO/MMO.......350 /.82", colour: "r"),
var overspeedGear = warning.new(msg: "-VLE...........280 /.67", colour: "r"),
var overspeedFlap = warning.new(msg: "-VFE................XXX", colour: "r"),
# DUAL ENG FAIL
var dualFail = warning.new(msg: "ENG DUAL FAILURE", colour: "r", aural: 0, light: 0, hasSubmsg: 1),
var dualFailModeSel = warning.new(msg: " -ENG MODE SEL.......IGN", colour: "c"),
@ -118,11 +124,11 @@ var warnings = std.Vector.new([
# Autopilot
var ap_offw = warning.new(msg: "AUTO FLT AP OFF", colour: "r", light: 0),
var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1),
var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var athr_offw_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
var athr_lock = warning.new(msg: "ENG THRUST LOCKED", colour: "a", aural: 1, light: 1),
var athr_lock = warning.new(msg: "ENG THRUST LOCKED", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var athr_lock_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
var athr_lim = warning.new(msg: "AUTO FLT A/THR LIMITED", colour: "a", aural: 1, light: 1),
var athr_lim = warning.new(msg: "AUTO FLT A/THR LIMITED", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var athr_lim_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
# Cargo smoke
@ -215,6 +221,9 @@ var warnings = std.Vector.new([
var acBusEssShed = warning.new(msg: "ELEC DC ESS BUS SHED", colour: "a", aural: 1, light: 1),
var acBusEssShedAtc = warning.new(msg: " -ATC..............SYS 2", colour: "c"),
# TCAS FAULT
var tcasFault = warning.new(msg: "NAV TCAS FAULT", colour: "a", aural: 1, light: 1),
# FCU fault
var fcuFault = warning.new(msg: "AUTO FLT FCU 1+2 FAULT", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var fcuFaultBaro = warning.new(msg: " -PFD BARO REF: STD ONLY", colour: "c"),
@ -239,7 +248,6 @@ var warnings = std.Vector.new([
var apuLoopBFault = warning.new(msg: "APU FIRE LOOP B FAULT", colour: "a"),
var crgFwdFireDetFault = warning.new(msg: "FWD CRG DET FAULT", colour: "a"),
var crgAftFireDetFault = warning.new(msg: "AFT CRG DET FAULT", colour: "a"),
# Recall
var recallNormal = warning.new(msg: " ", colour: "g", hasSubmsg: 1),
var recallNormal1 = warning.new(msg: " ", colour: "g", hasSubmsg: 1),

View file

@ -0,0 +1,4 @@
#============================ Tyre Smoke ===================================
aircraft.tyresmoke_system.new(0, 1, 2);
aircraft.rain.init();

View file

@ -405,9 +405,4 @@ var light_manager = {
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", 0.0);
me.light5_is_on = 0;
},
};
light_manager.init();
};

381
Nasal/FBW/it-fbw.nas Normal file
View file

@ -0,0 +1,381 @@
# Airbus A3XX FBW/Flight Control Computer System
# Joshua Davidson (Octal450)
# Copyright (c) 2019 Joshua Davidson (Octal450)
# If All ELACs Fail, Alternate Law
var mmoIAS = 0;
var elac1_sw = 0;
var elac2_sw = 0;
var sec1_sw = 0;
var sec2_sw = 0;
var sec3_sw = 0;
var fac1_sw = 0;
var fac2_sw = 0;
var elac1_fail = 0;
var elac2_fail = 0;
var sec1_fail = 0;
var sec2_fail = 0;
var sec3_fail = 0;
var fac1_fail = 0;
var fac2_fail = 0;
var ac_ess = 0;
var dc_ess = 0;
var dc_ess_shed = 0;
var ac1 = 0;
var ac2 = 0;
var dc1 = 0;
var dc2 = 0;
var dcHot1 = 0;
var dcHot2 = 0;
var blue = 0;
var green = 0;
var yellow = 0;
var ail = 0;
var roll = 0;
var rollback = 0;
var battery1_sw = 0;
var battery2_sw = 0;
var law = 0;
var FBW = {
degradeLaw: props.globals.getNode("/it-fbw/degrade-law"),
activeLaw: props.globals.getNode("/it-fbw/law"),
override: props.globals.getNode("/it-fbw/override"),
rollBack: props.globals.getNode("/it-fbw/roll-back"),
rollLim: props.globals.getNode("/it-fbw/roll-lim"),
Computers: {
elac1: props.globals.getNode("/systems/fctl/elac1"),
elac2: props.globals.getNode("/systems/fctl/elac2"),
sec1: props.globals.getNode("/systems/fctl/sec1"),
sec2: props.globals.getNode("/systems/fctl/sec2"),
sec3: props.globals.getNode("/systems/fctl/sec3"),
fac1: props.globals.getNode("/systems/fctl/fac1"),
fac2: props.globals.getNode("/systems/fctl/fac2"),
},
Failures: {
elac1: props.globals.getNode("/systems/failures/fctl/elac1"),
elac2: props.globals.getNode("/systems/failures/fctl/elac2"),
sec1: props.globals.getNode("/systems/failures/fctl/sec1"),
sec2: props.globals.getNode("/systems/failures/fctl/sec2"),
sec3: props.globals.getNode("/systems/failures/fctl/sec3"),
fac1: props.globals.getNode("/systems/failures/fctl/fac1"),
fac2: props.globals.getNode("/systems/failures/fctl/fac2"),
},
Lights: {
elac1: props.globals.getNode("/controls/fctl/lights/elac1-fault"),
elac2: props.globals.getNode("/controls/fctl/lights/elac2-fault"),
sec1: props.globals.getNode("/controls/fctl/lights/sec1-fault"),
sec2: props.globals.getNode("/controls/fctl/lights/sec2-fault"),
sec2: props.globals.getNode("/controls/fctl/lights/sec3-fault"),
fac1: props.globals.getNode("/controls/fctl/lights/fac1-fault"),
fac2: props.globals.getNode("/controls/fctl/lights/fac2-fault"),
},
Protections: {
overspeedRoll: props.globals.getNode("/it-fbw/protections/overspeed-roll-back"),
},
Switches: {
elac1Sw: props.globals.getNode("/controls/fctl/switches/elac1"),
elac2Sw: props.globals.getNode("/controls/fctl/switches/elac2"),
sec1Sw: props.globals.getNode("/controls/fctl/switches/sec1"),
sec2Sw: props.globals.getNode("/controls/fctl/switches/sec2"),
sec3Sw: props.globals.getNode("/controls/fctl/switches/sec3"),
fac1Sw: props.globals.getNode("/controls/fctl/switches/fac1"),
fac2Sw: props.globals.getNode("/controls/fctl/switches/fac2"),
},
init: func() {
if (updatet.isRunning) {
updatet.stop();
}
if (fbwt.isRunning) {
fbwt.stop();
}
me.resetFail();
me.Switches.elac1Sw.setBoolValue(1);
me.Switches.elac2Sw.setBoolValue(1);
me.Switches.sec1Sw.setBoolValue(1);
me.Switches.sec2Sw.setBoolValue(1);
me.Switches.sec3Sw.setBoolValue(1);
me.Switches.fac1Sw.setBoolValue(1);
me.Switches.fac2Sw.setBoolValue(1);
me.Computers.elac1.setBoolValue(0);
me.Computers.elac2.setBoolValue(0);
me.Computers.sec1.setBoolValue(0);
me.Computers.sec2.setBoolValue(0);
me.Computers.sec3.setBoolValue(0);
me.Computers.fac1.setBoolValue(0);
me.Computers.fac2.setBoolValue(0);
me.degradeLaw.setValue(0);
me.activeLaw.setValue(0);
me.override.setValue(0);
if (!updatet.isRunning) {
updatet.start();
}
if (!fbwt.isRunning) {
fbwt.start();
}
},
resetFail: func() {
me.Failures.elac1.setBoolValue(0);
me.Failures.elac2.setBoolValue(0);
me.Failures.sec1.setBoolValue(0);
me.Failures.sec2.setBoolValue(0);
me.Failures.sec3.setBoolValue(0);
me.Failures.fac1.setBoolValue(0);
me.Failures.fac2.setBoolValue(0);
},
};
var update_loop = func {
elac1_sw = FBW.Switches.elac1Sw.getValue();
elac2_sw = FBW.Switches.elac2Sw.getValue();
sec1_sw = FBW.Switches.sec1Sw.getValue();
sec2_sw = FBW.Switches.sec2Sw.getValue();
sec3_sw = FBW.Switches.sec3Sw.getValue();
fac1_sw = FBW.Switches.fac1Sw.getValue();
fac2_sw = FBW.Switches.fac2Sw.getValue();
elac1_fail = FBW.Failures.elac1.getValue();
elac2_fail = FBW.Failures.elac2.getValue();
sec1_fail = FBW.Failures.sec1.getValue();
sec2_fail = FBW.Failures.sec2.getValue();
sec3_fail = FBW.Failures.sec3.getValue();
fac1_fail = FBW.Failures.fac1.getValue();
fac2_fail = FBW.Failures.fac2.getValue();
ac_ess = systems.ELEC.Bus.acEss.getValue();
dc_ess = systems.ELEC.Bus.dcEss.getValue();
dc_ess_shed = systems.ELEC.Bus.dcEssShed.getValue();
ac1 = systems.ELEC.Bus.ac1.getValue();
ac2 = systems.ELEC.Bus.ac2.getValue();
dc1 = systems.ELEC.Bus.dc1.getValue();
dc2 = systems.ELEC.Bus.dc2.getValue();
dcHot1 = systems.ELEC.Bus.dcHot1.getValue();
dcHot2 = systems.ELEC.Bus.dcHot2.getValue();
battery1_sw = systems.ELEC.Switch.bat1.getValue();
battery2_sw = systems.ELEC.Switch.bat2.getValue();
if (elac1_sw and !elac1_fail and (dc_ess >= 25 or dcHot1 >= 25)) {
FBW.Computers.elac1.setValue(1);
FBW.Lights.elac1.setValue(0);
} else if (elac1_sw and (elac1_fail or (dc_ess < 25 and dcHot1 < 25))) {
FBW.Computers.elac1.setValue(0);
FBW.Lights.elac1.setValue(1);
}
if (elac2_sw and !elac2_fail and (dc2 >= 25 or dcHot2 >= 25)) {
FBW.Computers.elac2.setValue(1);
FBW.Lights.elac2.setValue(0);
} else if (elac1_sw and (elac2_fail or (dc2 < 25 and dcHot2 < 25))) {
FBW.Computers.elac2.setValue(0);
FBW.Lights.elac2.setValue(1);
}
if (sec1_sw and !sec1_fail and ac_ess >= 110) {
setprop("/systems/fctl/sec1", 1);
setprop("/systems/failures/spoiler-l3", 0);
setprop("/systems/failures/spoiler-r3", 0);
setprop("/systems/failures/spoiler-l4", 0);
setprop("/systems/failures/spoiler-r4", 0);
} else {
setprop("/systems/fctl/sec1", 0);
setprop("/systems/failures/spoiler-l3", 1);
setprop("/systems/failures/spoiler-r3", 1);
setprop("/systems/failures/spoiler-l4", 1);
setprop("/systems/failures/spoiler-r4", 1);
}
if (sec2_sw and !sec2_fail and ac_ess >= 110) {
setprop("/systems/fctl/sec2", 1);
setprop("/systems/failures/spoiler-l5", 0);
setprop("/systems/failures/spoiler-r5", 0);
} else {
setprop("/systems/fctl/sec2", 0);
setprop("/systems/failures/spoiler-l5", 1);
setprop("/systems/failures/spoiler-r5", 1);
}
if (sec3_sw and !sec3_fail and ac_ess >= 110) {
setprop("/systems/fctl/sec3", 1);
setprop("/systems/failures/spoiler-l1", 0);
setprop("/systems/failures/spoiler-r1", 0);
setprop("/systems/failures/spoiler-l2", 0);
setprop("/systems/failures/spoiler-r2", 0);
} else {
setprop("/systems/fctl/sec3", 0);
setprop("/systems/failures/spoiler-l1", 1);
setprop("/systems/failures/spoiler-r1", 1);
setprop("/systems/failures/spoiler-l2", 1);
setprop("/systems/failures/spoiler-r2", 1);
}
if (fac1_sw and !fac1_fail and (ac_ess >= 110 or dc_ess_shed >= 25)) {
setprop("/systems/fctl/fac1", 1);
setprop("/systems/failures/rudder", 0);
setprop("/systems/failures/fac1-fault", 0);
} else if (fac1_sw and (battery1_sw or battery2_sw) and (fac1_fail or ac_ess < 110 or dc_ess_shed < 25)) {
setprop("/systems/failures/fac1-fault", 1);
setprop("/systems/fctl/fac1", 0);
if (!fac2_sw or fac2_fail) {
setprop("/systems/failures/rudder", 1);
}
} else {
setprop("/systems/failures/fac1-fault", 0);
setprop("/systems/fctl/fac1", 0);
if (!fac2_sw or fac2_fail) {
setprop("/systems/failures/rudder", 1);
}
}
if (fac2_sw and !fac2_fail and (ac2 >= 110 or dc2 >= 25)) {
setprop("/systems/fctl/fac2", 1);
setprop("/systems/failures/fac2-fault", 0);
} else if (fac2_sw and (fac2_fail or ac2 < 110 or dc2 < 25)) {
setprop("/systems/failures/fac2-fault", 1);
setprop("/systems/fctl/fac2", 0);
if (!fac1_sw or fac1_fail) {
setprop("/systems/failures/rudder", 1);
}
} else {
setprop("/systems/fctl/fac2", 0);
setprop("/systems/failures/fac2-fault", 0);
if (!fac1_sw or fac1_fail) {
setprop("/systems/failures/rudder", 1);
}
}
var elac1 = getprop("/systems/fctl/elac1");
var elac2 = getprop("/systems/fctl/elac2");
var sec1 = getprop("/systems/fctl/sec1");
var sec2 = getprop("/systems/fctl/sec2");
var sec3 = getprop("/systems/fctl/sec3");
var fac1 = getprop("/systems/fctl/fac1");
var fac2 = getprop("/systems/fctl/fac2");
law = FBW.activeLaw.getValue();
# Degrade logic, all failures which degrade FBW need to go here. -JD
blue = systems.HYD.Psi.blue.getValue();
green = systems.HYD.Psi.green.getValue();
yellow = systems.HYD.Psi.yellow.getValue();
if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0) {
if (!elac1 and !elac2) {
if (law == 0) {
FBW.degradeLaw.setValue(1);
}
}
if (ac_ess >= 110 and blue >= 1500 and green < 1500 and yellow < 1500) {
if (law == 0 or law == 1) {
FBW.degradeLaw.setValue(2);
}
}
if (ac_ess < 110 or (blue < 1500 and green < 1500 and yellow < 1500)) {
FBW.degradeLaw.setValue(3);
}
}
if (getprop("/controls/gear/gear-down") == 1 and getprop("/it-autoflight/output/ap1") == 0 and getprop("/it-autoflight/output/ap2") == 0) {
if (law == 1) {
FBW.degradeLaw.setValue(2);
}
}
# degrade loop runs faster; reset this variable
law = FBW.activeLaw.getValue();
# Mech Backup can always return to direct, if it can.
if (law == 3 and ac_ess >= 110 and (green >= 1500 or blue >= 1500 or yellow >= 1500)) {
FBW.degradeLaw.setValue(2);
}
mmoIAS = (getprop("/instrumentation/airspeed-indicator/indicated-speed-kt") / getprop("/instrumentation/airspeed-indicator/indicated-mach")) * 0.82;
if (mmoIAS < 350) {
setprop("/it-fbw/speeds/vmo-mmo", mmoIAS);
} else {
setprop("/it-fbw/speeds/vmo-mmo", 350);
}
if (getprop("/instrumentation/airspeed-indicator/indicated-speed-kt") > getprop("/it-fbw/speeds/vmo-mmo") + 6 and (law == 0 or law == 1)) {
if (getprop("/it-autoflight/input/ap1") == 1 or getprop("/it-autoflight/input/ap2") == 1) {
fcu.apOff("hard", 0);
}
if (getprop("/it-fbw/protections/overspeed") != 1) {
setprop("/it-fbw/protections/overspeed", 1);
}
} else {
if (getprop("/it-fbw/protections/overspeed") != 0) {
setprop("/it-fbw/protections/overspeed", 0);
}
}
}
var fbw_loop = func {
ail = pts.Controls.Flight.aileron.getValue();
roll = pts.Orientation.roll.getValue();
rollback = FBW.rollBack.getValue();
if (ail > 0.4 and roll >= -33.5) {
FBW.rollLim.setValue("67");
if (rollback == 1 and roll <= 33.5 and roll >= -33.5) {
FBW.rollBack.setValue(0);
} elsif (rollback == 0 and (roll > 33.5 or roll < -33.5)) {
FBW.rollBack.setValue(1);
}
} else if (ail < -0.4 and roll <= 33.5) {
FBW.rollLim.setValue("67");
if (rollback == 1 and roll <= 33.5 and roll >= -33.5) {
FBW.rollBack.setValue(0);
} elsif (rollback == 0 and (roll > 33.5 or roll < -33.5)) {
FBW.rollBack.setValue(1);
}
} else if (ail < 0.04 and ail > -0.04) {
FBW.rollLim.setValue("33");
if (rollback == 1 and roll <= 33.5 and roll >= -33.5) {
FBW.rollBack.setValue(0);
}
}
if (ail > 0.04 or ail < -0.04) {
FBW.Protections.overspeedRoll.setValue(0);
} else if (ail < 0.04 and ail > -0.04) {
FBW.Protections.overspeedRoll.setValue(1);
}
if (getprop("/it-fbw/override") == 0) {
var active = FBW.activeLaw.getValue();
var degrade = FBW.degradeLaw.getValue();
if (degrade == 0) {
if (active != 0) {
FBW.activeLaw.setValue(0);
}
} else if (degrade == 1) {
if (active != 1) {
FBW.activeLaw.setValue(1);
}
} else if (degrade == 2) {
if (active != 2) {
FBW.activeLaw.setValue(2);
}
} else if (degrade == 3) {
if (active != 3) {
FBW.activeLaw.setValue(3);
}
}
}
if (FBW.activeLaw.getValue() != 0) {
if (getprop("/it-autoflight/output/ap1") == 1 or getprop("/it-autoflight/output/ap2") == 1) {
fcu.apOff("hard", 0);
}
}
}
var updatet = maketimer(0.1, update_loop);
var fbwt = maketimer(0.03, fbw_loop);

View file

@ -58,6 +58,7 @@ var FCU = {
var FCUController = {
FCU1: nil,
FCU2: nil,
activeFMGC: props.globals.getNode("/FMGC/active-fmgc-channel"),
FCUworking: 0,
_init: 0,
init: func() {
@ -77,7 +78,19 @@ var FCUController = {
} else {
me.FCUworking = 0;
}
notification = nil;
foreach (var update_item; me.update_items) {
update_item.update(notification);
}
},
update_items: [
props.UpdateManager.FromPropertyHashList(["/it-autoflight/output/fd1","/it-autoflight/output/fd2", "/it-autoflight/output/ap1", "/it-autoflight/output/ap2"], 1, func(notification)
{
updateActiveFMGC();
}
),
],
resetFail: func() {
if (me._init == 0) { return; }
me.FCU1.restore();
@ -103,7 +116,7 @@ var FCUController = {
},
ATHR: func() {
if (me.FCUworking) {
if (!athr.getBoolValue()) {
if (!athr.getBoolValue() and !pts.FMGC.CasCompare.rejectAll.getBoolValue()) {
athrInput.setValue(1);
} else {
athrOff("hard");
@ -441,6 +454,21 @@ var FCUController = {
},
};
# Master / slave principle of operation depending on the autopilot / flight director engagement
var updateActiveFMGC = func {
if (ap1.getBoolValue()) {
FCUController.activeFMGC.setValue(1);
} elsif (ap2.getBoolValue()) {
FCUController.activeFMGC.setValue(2);
} elsif (fd1.getBoolValue()) {
FCUController.activeFMGC.setValue(1);
} elsif (fd2.getBoolValue()) {
FCUController.activeFMGC.setValue(2);
} else {
FCUController.activeFMGC.setValue(1);
}
}
# Autopilot Disconnection
var apOff = func(type, side) {
if (side == 0) {

View file

@ -264,24 +264,24 @@ var masterFMGC = maketimer(0.2, func {
reset_FMGC();
}
if (getprop("/systems/navigation/adr/computation/overspeed-vfe-spd") != 1024) {
setprop("/FMGC/internal/maxspeed", getprop("/systems/navigation/adr/computation/overspeed-vfe-spd") - 4);
} else {
setprop("/FMGC/internal/maxspeed", getprop("/it-fbw/speeds/vmo-mmo"));
}
flap = getprop("/controls/flight/flap-pos");
if (flap == 0) { # 0
setprop("/FMGC/internal/maxspeed", getprop("/it-fbw/speeds/vmo-mmo"));
setprop("/FMGC/internal/minspeed", 202);
} else if (flap == 1) { # 1
setprop("/FMGC/internal/maxspeed", 230);
setprop("/FMGC/internal/minspeed", 184);
} else if (flap == 2) { # 1+F
setprop("/FMGC/internal/maxspeed", 215);
setprop("/FMGC/internal/minspeed", 171);
} else if (flap == 3) { # 2
setprop("/FMGC/internal/maxspeed", 200);
setprop("/FMGC/internal/minspeed", 156);
} else if (flap == 4) { # 3
setprop("/FMGC/internal/maxspeed", 185);
setprop("/FMGC/internal/minspeed", 147);
} else if (flap == 5) { # FULL
setprop("/FMGC/internal/maxspeed", 177);
setprop("/FMGC/internal/minspeed", 131);
}

View file

@ -9,6 +9,9 @@ var guiModes = ['OFF', 'STANDBY', 'TEST', 'GROUND', 'ON', 'ALTITUDE'];
var guiNode = props.globals.getNode("/sim/gui/dialogs/radios/transponder-mode", 1);
var forLoopFlag = 0;
var altimeter = props.globals.initNode("/instrumentation/transponder/altimeter-input-src", 0, "INT");
var airspeed = props.globals.initNode("/instrumentation/transponder/airspeed-input-src", 0, "INT");
var Transponder = {
mode: 0,
code: "2000",
@ -97,6 +100,8 @@ var Transponder = {
return;
}
me.activeADIRS = newADIRS;
altimeter.setValue(newADIRS);
airspeed.setValue(newADIRS);
},
modeSwitch: func(newMode) {
me.mode = newMode;
@ -196,6 +201,8 @@ var transponderPanel = {
# update newly selected transponder
Transponders.vector[me.atcSel - 1].modeSwitch(me.modeSel);
me.atcFailLight(Transponders.vector[me.atcSel - 1].failed);
me.updateAirData();
},
modeSwitch: func(newMode) {
if (newMode < 0 or newMode > 5) {
@ -223,11 +230,27 @@ var transponderPanel = {
me.codeDisp = me.code;
me.codeProp.setValue(sprintf("%s", me.codeDisp));
Transponders.vector[me.atcSel - 1].setCode(me.code);
}
},
updateAirData: func() {
if (me.atcSel == 1) {
if (systems.SwitchingPanel.Switches.airData.getValue() == -1) {
Transponders.vector[0].switchADIRS(3);
} else {
Transponders.vector[0].switchADIRS(1);
}
} else {
if (systems.SwitchingPanel.Switches.airData.getValue() == 1) {
Transponders.vector[1].switchADIRS(3);
} else {
Transponders.vector[1].switchADIRS(2);
}
}
},
};
var init = func() {
transponderPanel.atcSwitch(1);
transponderPanel.updateAirData();
transponderTimer.start();
}

View file

@ -194,12 +194,14 @@ var triggerDoor = func(door, doorName, doorDesc) {
#######################
var systemsInit = func {
fbw.fctlInit();
fbw.FBW.init();
light_manager.init();
systems.ELEC.init();
systems.PNEU.init();
systems.HYD.init();
systems.FUEL.init();
systems.ADIRS.init();
systems.ADIRSnew.init();
systems.eng_init();
systems.fire_init();
systems.autobrake_init();
@ -219,6 +221,7 @@ var systemsInit = func {
ecam.ECAM_controller.init();
atc.init();
fcu.FCUController.init();
dmc.DMController.init();
}
setlistener("/sim/signals/fdm-initialized", func {
@ -231,11 +234,13 @@ var systemsLoop = maketimer(0.1, func {
systems.HYD.loop();
systems.FUEL.loop();
systems.ADIRS.loop();
systems.ADIRSnew.loop();
libraries.ECAM.loop();
libraries.BUTTONS.update();
fadec.FADEC.loop();
rmp.rmpUpdate();
fcu.FCUController.loop();
dmc.DMController.loop();
if ((getprop("/controls/pneumatic/switches/groundair") or getprop("/controls/electrical/ground-cart")) and ((getprop("/velocities/groundspeed-kt") > 2) or (getprop("/controls/gear/brake-parking") == 0 and getprop("/services/chocks/nose") == 0 and getprop("/services/chocks/left") == 0 and getprop("/services/chocks/right") == 0))) {
setprop("/controls/electrical/ground-cart", 0);

View file

@ -5,6 +5,11 @@
# Anything that says Temp is set by another file to avoid multiple getValue calls
# Usage Example: pts.Class.SubClass.node.getValue()
var APU = {
masterSw: props.globals.getNode("/controls/APU/master"),
rpm: props.globals.getNode("/systems/apu/rpm"),
};
var Consumables = {
Fuel: {
totalFuelLbs: props.globals.getNode("/consumables/fuel/total-fuel-lbs"),
@ -13,6 +18,7 @@ var Consumables = {
var Controls = {
Engines: {
startSw: props.globals.getNode("/controls/engines/engine-start-switch"),
Engine1: {
cutoffSw: props.globals.getNode("/controls/engines/engine[0]/cutoff-switch"),
firePb: props.globals.getNode("/controls/engines/engine[0]/fire-btn"),
@ -24,6 +30,12 @@ var Controls = {
throttle: props.globals.getNode("/controls/engines/engine[1]/throttle"),
},
},
Flight: {
aileron: props.globals.getNode("/controls/flight/aileron"),
},
Gear: {
gearDown: props.globals.getNode("/controls/gear/gear-down"),
},
};
var ECAM = {
@ -45,17 +57,40 @@ var Engines = {
},
};
var FMGC = {
CasCompare: {
rejectAll: props.globals.getNode("/systems/fmgc/cas-compare/cas-reject-all"),
},
};
var Gear = {
compression: [props.globals.getNode("/gear/gear[0]/compression-norm"),props.globals.getNode("/gear/gear[1]/compression-norm"),props.globals.getNode("/gear/gear[2]/compression-norm")],
wow: [props.globals.getNode("/gear/gear[0]/wow"),props.globals.getNode("/gear/gear[1]/wow"),props.globals.getNode("/gear/gear[2]/wow")],
};
var Instrumentation = {
AirspeedIndicator: {
indicatedSpdKt: props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt"),
},
TCAS: {
Inputs: {
mode: props.globals.getNode("/instrumentation/tcas/inputs/mode"),
},
},
};
var JSBSIM = {
FCS: {
flapDeg: props.globals.getNode("/fdm/jsbsim/fcs/flap-pos-deg"),
slatDeg: props.globals.getNode("/fdm/jsbsim/fcs/slat-pos-deg"),
},
};
var JSBSim = {
FBW: {
aileron: props.globals.getNode("/fdm/jsbsim/fbw/aileron-sidestick"),
elevator: props.globals.getNode("/fdm/jsbsim/fbw/elevator-sidestick"),
},
Propulsion: {
Engine1: {
fuelUsed: props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/fuel-used-lbs"),
@ -84,6 +119,12 @@ var Sim = {
},
};
var Orientation = {
pitch: props.globals.getNode("/orientation/pitch-deg"),
roll: props.globals.getNode("/orientation/roll-deg"),
yaw: props.globals.getNode("/orientation/yaw-deg"),
};
var PTSSystems = {
Thrust: {
flex: props.globals.getNode("/systems/thrust/lim-flex"),

View file

@ -16,18 +16,9 @@ setprop("/controls/adirs/align-time", 600);
var ADIRS = {
init: func() {
setprop("/controls/adirs/numm", 0);
setprop("/instrumentation/adirs/adr[0]/active", 0);
setprop("/instrumentation/adirs/adr[1]/active", 0);
setprop("/instrumentation/adirs/adr[2]/active", 0);
setprop("/instrumentation/adirs/ir[0]/aligned", 0);
setprop("/instrumentation/adirs/ir[1]/aligned", 0);
setprop("/instrumentation/adirs/ir[2]/aligned", 0);
setprop("/controls/adirs/adr[0]/fault", 0);
setprop("/controls/adirs/adr[1]/fault", 0);
setprop("/controls/adirs/adr[2]/fault", 0);
setprop("/controls/adirs/adr[0]/off", 0);
setprop("/controls/adirs/adr[1]/off", 0);
setprop("/controls/adirs/adr[2]/off", 0);
setprop("/controls/adirs/ir[0]/align", 0);
setprop("/controls/adirs/ir[1]/align", 0);
setprop("/controls/adirs/ir[2]/align", 0);
@ -40,7 +31,6 @@ var ADIRS = {
setprop("/controls/adirs/ir[0]/fault", 0);
setprop("/controls/adirs/ir[1]/fault", 0);
setprop("/controls/adirs/ir[2]/fault", 0);
setprop("/controls/adirs/onbat", 0);
setprop("/controls/adirs/mcdu/mode1", ""); # INVAL ALIGN NAV ATT or off (blank)
setprop("/controls/adirs/mcdu/mode2", "");
setprop("/controls/adirs/mcdu/mode3", "");
@ -82,22 +72,6 @@ var ADIRS = {
me.stopAlign(2,1);
}
}
if (ac1 >= 110 or ac2 >= 110) {
pwr_src = "AC";
} else if (dcbat >= 25 and (getprop("/controls/adirs/ir[0]/knob") != 0 or getprop("/controls/adirs/ir[1]/knob") != 0 or getprop("/controls/adirs/ir[2]/knob") != 0)) {
pwr_src = "BATT";
} else {
pwr_src = "XX";
}
if (getprop("/controls/adirs/ir[0]/time") + 3 >= getprop("/sim/time/elapsed-sec") or getprop("/controls/adirs/ir[1]/time") + 3 >= getprop("/sim/time/elapsed-sec") or getprop("/controls/adirs/ir[2]/time") + 3 >= getprop("/sim/time/elapsed-sec")) {
setprop("/controls/adirs/onbat", 1);
} else if (pwr_src == "BATT") {
setprop("/controls/adirs/onbat", 1);
} else {
setprop("/controls/adirs/onbat", 0);
}
},
knob: func(k) {
knob = getprop("/controls/adirs/ir[" ~ k ~ "]/knob");
@ -141,7 +115,6 @@ var ADIRS = {
} else if (n == 2) {
alignThree.stop();
}
setprop("/instrumentation/adirs/adr[" ~ n ~ "]/active", 0);
setprop("/instrumentation/adirs/ir[" ~ n ~ "]/aligned", 0);
setprop("/controls/adirs/mcducbtn", 0);
},

264
Nasal/Systems/ADIRS/ADR.nas Normal file
View file

@ -0,0 +1,264 @@
# A3XX ADIRS System
# Jonathan Redpath (legoboyvdlp)
# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
var _NUMADIRU = 3;
var _selfTestTime = nil;
var ADIRU = {
# local vars
_voltageMain: 0,
_voltageBackup: 0,
_voltageLimitedTime: 0,
_noPowerTime: 0,
_timeVar: 0,
num: 0,
outputOn: 0, # 0 = disc, 1 = normal
mode: 0, # 0 = off, 1 = nav, 2 = att
energised: 0, # 0 = off, 1 = on
operative: 0, # 0 = off,
input: [],
output: [],
# methods
new: func(n) {
var adiru = { parents:[ADIRU] };
adiru.num = n;
return adiru;
},
updateEnergised: func(mode) {
me.energised = mode != 0 ? 1 : 0;
},
updatePower: func(elec) {
me._voltageMain = elec.getValue() or 0;
return me._voltageMain;
},
updateBackupPower: func(elec, isLimited) {
me._voltageBackup = elec.getValue() or 0;
me._voltageLimitedTime = isLimited;
return me._voltageBackup;
},
selfTest: func() {
ADIRSnew._selfTest = 1;
_selfTestTime = pts.Sim.Time.elapsedSec.getValue();
ADIRSnew.Lights.adrOff[me.num].setValue(1);
ADIRSnew.Lights.adrFault[me.num].setValue(1);
settimer(func() {
ADIRSnew.Lights.adrOff[me.num].setValue(0);
ADIRSnew.Lights.adrFault[me.num].setValue(0);
}, 0.1);
settimer(func() {
ADIRSnew.Lights.adrOff[me.num].setValue(1);
ADIRSnew.Lights.adrFault[me.num].setValue(1);
ADIRSnew.Lights.irFault[me.num].setValue(1);
ADIRSnew.Lights.irOff[me.num].setValue(1);
}, 1.0);
settimer(func() {
ADIRSnew.Lights.adrOff[me.num].setValue(0);
ADIRSnew.Lights.adrFault[me.num].setValue(0);
ADIRSnew.Lights.irFault[me.num].setValue(0);
ADIRSnew.Lights.irOff[me.num].setValue(0);
}, 1.1);
ADIRSnew.selfTest();
},
setOperative: func(newOperative) {
if (newOperative != me.operative) {
me.operative = newOperative;
if (newOperative) {
me.selfTest();
}
}
},
update: func() {
me._timeVar = pts.Sim.Time.elapsedSec.getValue();
if (me.energised and !me._voltageMain and me._voltageLimitedTime and me._noPowerTime == 0) {
me._noPowerTime = me._timeVar;
}
if (me.energised and me.mode) {
if (me._voltageMain) {
me._noPowerTime = 0;
me.setOperative(1);
if (!ADIRSnew._selfTest) {
ADIRSnew.Lights.onBat.setBoolValue(0);
}
} elsif (((me._timeVar < me._noPowerTime + 300 and me._voltageLimitedTime) or !me._voltageLimitedTime) and me._voltageBackup) {
me.setOperative(1);
if (!ADIRSnew._selfTest) {
ADIRSnew.Lights.onBat.setBoolValue(1);
}
} else {
me._noPowerTime = 0;
me.setOperative(0);
if (!ADIRSnew._selfTest) {
ADIRSnew.Lights.onBat.setBoolValue(0);
}
}
} else {
me._noPowerTime = 0;
me.setOperative(0);
if (!ADIRSnew._selfTest) {
ADIRSnew.Lights.onBat.setBoolValue(0);
}
}
},
};
var ADIRSControlPanel = {
adrSw: func(n) {
if (n < 0 or n > _NUMADIRU) { return; }
ADIRSnew._adrSwitchState = ADIRSnew.Switches.adrSw[n].getValue();
ADIRSnew.Switches.adrSw[n].setValue(!ADIRSnew._adrSwitchState);
if (ADIRSnew.ADIRunits[n] != nil) {
ADIRSnew.ADIRunits[n].outputOn = !ADIRSnew._adrSwitchState;
}
ADIRSnew.Lights.adrOff[n].setValue(ADIRSnew._adrSwitchState);
},
irSw: func(n) {
if (n < 0 or n > _NUMADIRU) { return; }
ADIRSnew._irSwitchState = ADIRSnew.Switches.irSw[n].getValue();
ADIRSnew.Switches.irSw[n].setValue(!ADIRSnew._irSwitchState);
if (ADIRSnew.IRunits[n] != nil) {
ADIRSnew.IRunits[n].outputOn = !ADIRSnew._irSwitchState;
}
ADIRSnew.Lights.irOff[n].setValue(ADIRSnew._adrSwitchState);
},
irModeSw: func(n, mode) {
if (n < 0 or n > _NUMADIRU) { return; }
if (mode < 0 or mode > 2) { return; }
me._irModeSwitchState = ADIRSnew.Switches.irModeSw[n].getValue();
if (ADIRSnew.ADIRunits[n] != nil) {
ADIRSnew.ADIRunits[n].mode = mode;
ADIRSnew.ADIRunits[n].updateEnergised(mode);
ADIRSnew.Switches.irModeSw[n].setValue(mode);
}
}
};
var ADIRSnew = {
# local vars
_adrSwitchState: 0,
_irSwitchState: 0,
_irModeSwitchState: 0,
_hasPower: 0,
_cacheOperative: [0, 0, 0],
_cacheOutputOn: [0, 0, 0],
_flapPos: nil,
_slatPos: nil,
_selfTest: 0,
_init: 0,
# ADIRS Units
ADIRunits: [nil, nil, nil],
#IRunits: [nil, nil, nil],
# Electrical
mainSupply: [systems.ELEC.Bus.acEss, systems.ELEC.Bus.ac2, systems.ELEC.Bus.ac1],
backupSupply: [[systems.ELEC.Bus.dcHot2, 0], [systems.ELEC.Bus.dcHot2, 1], [systems.ELEC.Bus.dcHot1, 1]],
# PTS
Lights: {
adrFault: [props.globals.getNode("/controls/navigation/adirscp/lights/adr-1-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-2-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-3-fault")],
adrOff: [props.globals.getNode("/controls/navigation/adirscp/lights/adr-1-off"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-2-off"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-3-off")],
irFault: [props.globals.getNode("/controls/navigation/adirscp/lights/ir-1-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-2-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-3-fault")],
irOff: [props.globals.getNode("/controls/navigation/adirscp/lights/ir-1-off"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-2-off"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-3-off")],
onBat: props.globals.getNode("/controls/navigation/adirscp/lights/on-bat"),
},
Switches: {
adrSw: [props.globals.getNode("/controls/navigation/adirscp/switches/adr-1"), props.globals.getNode("/controls/navigation/adirscp/switches/adr-2"), props.globals.getNode("/controls/navigation/adirscp/switches/adr-3")],
irModeSw: [props.globals.getNode("/controls/navigation/adirscp/switches/ir-1-mode"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-2-mode"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-3-mode")],
irSw: [props.globals.getNode("/controls/navigation/adirscp/switches/ir-1"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-2"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-3")],
},
Operating: {
adr: [props.globals.getNode("/systems/navigation/adr/operating-1"), props.globals.getNode("/systems/navigation/adr/operating-2"), props.globals.getNode("/systems/navigation/adr/operating-3")],
},
# Nodes
overspeedVFE: props.globals.initNode("/systems/navigation/adr/computation/overspeed-vfe-spd", 0, "INT"),
# System
init: func() {
if (!me._init) {
for (i = 0; i < _NUMADIRU; i = i + 1) {
me.ADIRunits[i] = ADIRU.new(i);
me._init = 1;
}
}
},
update_items: [
props.UpdateManager.FromPropertyHashList(["/fdm/jsbsim/fcs/flap-pos-deg","/fdm/jsbsim/fcs/slat-pos-deg"], 0.1, func(notification)
{
me._flapPos = pts.JSBSIM.FCS.flapDeg.getValue();
me._slatPos = pts.JSBSIM.FCS.slatDeg.getValue();
if (me._flapPos >= 23 and me._slatPos >= 25) {
ADIRSnew.overspeedVFE.setValue(181);
} elsif (me._flapPos >= 18) {
ADIRSnew.overspeedVFE.setValue(189);
} elsif (me._flapPos >= 13 or me._slatPos > 20) {
ADIRSnew.overspeedVFE.setValue(204);
} elsif (me._slatPos <= 20 and me._flapPos > 2) {
ADIRSnew.overspeedVFE.setValue(219);
} elsif (me._slatPos >= 2 and me._slatPos <= 20) {
ADIRSnew.overspeedVFE.setValue(234);
} else {
ADIRSnew.overspeedVFE.setValue(1024);
}
}
),
],
loop: func() {
if (me._init) {
for (i = 0; i < _NUMADIRU; i = i + 1) {
# update ADR units power
me._hasPower = me.ADIRunits[i].updatePower(me.mainSupply[i]);
if (me._hasPower == 0) {
me.ADIRunits[i].updateBackupPower(me.backupSupply[i][0],me.backupSupply[i][1])
}
# Update ADR units
me.ADIRunits[i].update();
if (me.ADIRunits[i].operative != me._cacheOperative[i] or me.ADIRunits[i].outputOn != me._cacheOutputOn[i]) {
me._cacheOperative[i] = me.ADIRunits[i].operative;
me._cacheOutputOn[i] = me.ADIRunits[i].outputOn;
if (me.ADIRunits[i].outputOn) {
me.Operating.adr[i].setValue(me.ADIRunits[i].operative);
} else {
me.Operating.adr[i].setValue(0);
}
}
}
# Update VFE
notification = nil;
foreach (var update_item; me.update_items) {
update_item.update(notification);
}
}
},
selfTest: func() {
ADIRSnew.Lights.onBat.setBoolValue(1);
selfTestLoop.start();
},
};
setlistener("/systems/fmgc/cas-compare/cas-reject-all", func() {
if (pts.FMGC.CasCompare.rejectAll.getBoolValue()) {
fcu.athrOff("hard");
}
}, 0, 0);
selfTestLoop = maketimer(0.2, func() {
if (pts.Sim.Time.elapsedSec.getValue() > _selfTestTime + 5) {
ADIRSnew.Lights.onBat.setBoolValue(0);
selfTestLoop.stop();
ADIRSnew._selfTest = 0;
}
});

View file

@ -0,0 +1,32 @@
# A3XX Switching Panel
# Jonathan Redpath (legoboyvdlp)
# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
var SwitchingPanel = {
Switches: {
attHdg: props.globals.getNode("/controls/navigation/switching/att-hdg"),
airData: props.globals.getNode("/controls/navigation/switching/air-data"),
eisDmc: props.globals.getNode("/controls/navigation/switching/eis-dmc"),
},
doAirData: func(newAirData) {
if (newAirData < -1 or newAirData > 1) { return; }
me.Switches.airData.setValue(newAirData);
atc.transponderPanel.updateAirData();
if (newAirData == -1) {
dmc.DMController.DMCs[0].changeActiveADIRS(2);
dmc.DMController.DMCs[1].changeActiveADIRS(1);
} elsif (newAirData == 1) {
dmc.DMController.DMCs[0].changeActiveADIRS(0);
dmc.DMController.DMCs[1].changeActiveADIRS(2);
} elsif (newAirData == 0) {
dmc.DMController.DMCs[0].changeActiveADIRS(0);
dmc.DMController.DMCs[1].changeActiveADIRS(1);
}
},
doEisDMC: func(newDMC) {
if (newDMC < -1 or newDMC > 1) { return; }
me.Switches.eisDMC.setValue(newDMC);
},
};

85
Nasal/Systems/DMC.nas Normal file
View file

@ -0,0 +1,85 @@
# A3XX Display System
# Jonathan Redpath (legoboyvdlp)
# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
var DMC = {
_set: 0,
_setNil: 0,
activeADIRS: -9,
airspeeds: [props.globals.getNode("/systems/navigation/adr/output/cas-1", 1), props.globals.getNode("/systems/navigation/adr/output/cas-2", 1), props.globals.getNode("/systems/navigation/adr/output/cas-3", 1)],
altitudes: [props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-1-capt", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-2-capt", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-3-capt", 1)],
machs: [props.globals.getNode("/systems/navigation/adr/output/mach-1", 1), props.globals.getNode("/systems/navigation/adr/output/mach-2", 1), props.globals.getNode("/systems/navigation/adr/output/mach-3", 1)],
altitudesPfd: [props.globals.getNode("/instrumentation/altimeter[0]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[1]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[2]/indicated-altitude-ft-pfd", 1)],
sats: [props.globals.getNode("/systems/navigation/adr/output/sat-1", 1), props.globals.getNode("/systems/navigation/adr/output/sat-2", 1), props.globals.getNode("/systems/navigation/adr/output/sat-3", 1)],
tats: [props.globals.getNode("/systems/navigation/adr/output/tat-1", 1), props.globals.getNode("/systems/navigation/adr/output/tat-2", 1), props.globals.getNode("/systems/navigation/adr/output/tat-3", 1)],
outputs: [nil, nil, nil, nil, nil, nil], # airspeed, altitude, mach, pfd altitude, sat, tat
new: func(num) {
var d = { parents:[DMC] };
d.activeADIRS = num;
d.outputs = [nil, nil, nil, nil, nil, nil];
return d;
},
changeActiveADIRS: func(newADIRS) {
me.activeADIRS = newADIRS;
me._set = 0;
},
setOutputs: func(ADIRS) {
me.outputs[0] = me.airspeeds[ADIRS];
me.outputs[1] = me.altitudes[ADIRS];
me.outputs[2] = me.machs[ADIRS];
me.outputs[3] = me.altitudesPfd[ADIRS];
me.outputs[4] = me.sats[ADIRS];
me.outputs[5] = me.tats[ADIRS];
},
setOutputsNil: func() {
me.outputs[0] = nil;
me.outputs[1] = nil;
me.outputs[2] = nil;
me.outputs[3] = nil;
me.outputs[4] = nil;
me.outputs[5] = nil;
},
update: func() {
if (systems.ADIRSnew.ADIRunits[me.activeADIRS].operative and systems.ADIRSnew.ADIRunits[me.activeADIRS].outputOn) {
if (me._set != 1) {
me._setNil = 0;
me.setOutputs(me.activeADIRS);
me._setADIRS = me.activeADIRS;
me._set = 1;
}
} else {
if (me._setNil != 1) {
me._set = 0;
me.setOutputsNil();
me._setNil = 1;
}
}
},
};
var DMController = {
_init: 0,
i: nil, # to make sure scope remains local use me.i
DMCs: [nil, nil, nil],
init: func() {
if (!me._init) {
me.DMCs = [DMC.new(0), DMC.new(1), DMC.new(2)];
# update DMC2 to correct properties for first officer PFD
me.DMCs[1].altitudes = [props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-1-fo", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-2-fo", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-3-fo", 1)];
me.DMCs[1].altitudesPfd = [props.globals.getNode("/instrumentation/altimeter[3]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[4]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[5]/indicated-altitude-ft-pfd", 1)];
me._init = 1;
}
},
loop: func() {
for (me.i = 0; me.i < 3; me.i = me.i + 1) {
me.DMCs[me.i].update();
}
},
};

View file

@ -208,7 +208,7 @@ var auto_start_one = func {
}
var eng_one_auto_start = maketimer(0.5, func {
if (getprop("/engines/engine[0]/n1-actual") >= 5.0) {
if (getprop("/engines/engine[0]/n1-actual") >= 4.7) {
eng_one_auto_start.stop();
setprop("/engines/engine[0]/state", 2);
setprop("/controls/engines/engine[0]/cutoff", 0);
@ -271,7 +271,7 @@ var auto_start_two = func {
}
var eng_two_auto_start = maketimer(0.5, func {
if (getprop("/engines/engine[1]/n1-actual") >= 5.0) {
if (getprop("/engines/engine[1]/n1-actual") >= 4.7) {
eng_two_auto_start.stop();
setprop("/engines/engine[1]/state", 2);
setprop("/controls/engines/engine[1]/cutoff", 0);

215
Nasal/Systems/brakesystem.nas Executable file
View file

@ -0,0 +1,215 @@
##########################################################################
# Simple Brake Simulation System
# 2010, Thorsten Brehm
#
# Simple simulation of brake energy absorption and cooling effects.
#
# This module computes (approximates... :-) ) an energy level which
# (faintly) resembles the kinetic energy absorption and cooling effects
# of a brake system. But instead of computing real temperatures, this
# is just meant to distinguish normal energy levels from exceptionally
# high levels. The target is to drive EICAS "brakes overheat" messages
# and gear effects only, to "reward" pilots with exceptionally bad
# landings...
#
# To avoid complicated calculations of different braking effects (roll/air
# drag, reverse thrust etc), we simply assume the brake system to cause a
# fixed deceleration (me.BrakeDecel). With this deceleration we approximate
# the speed difference which would be caused by the brake system alone for
# any given simulation interval. The difference of the kinetic energy level
# at the current speed and the decelerated speed are then added up to the
# total absorbed brake energy.
# Units (knots/lbs/Kg) do not matter much here. Eventually a magic scaling
# divisor is used to scale the output level. Any output > 1 means
# "overheated brakes", any level <=1 means "brake temperature OK".
# No exact science here - but good enough for now :-).
##########################################################################
var BrakeSystem =
{
new : func()
{
var m = { parents : [BrakeSystem]};
# deceleration caused by brakes alone (knots/s2)
m.BrakeDecel = 1.0; # kt/s^2
#m.LBrakeDecel = getprop("systems/hydraulic/brakes/pressure-left-psi") / 1000 * getprop("controls/autobrake/decel-error"); # kt/s^2
#m.RBrakeDecel = getprop("systems/hydraulic/brakes/pressure-right-psi") / 1000 * getprop("controls/autobrake/decel-error"); # kt/s^2
# Higher value means quicker cooling
m.CoolingFactor = 0.005;
# Scaling divisor. Use this to scale the energy output.
# Manually tune this value: a total energy output
# at "/gear/brake-thermal-energy" > 1.0 means overheated brakes,
# anything below <= 1.0 means energy absorbed by brakes is OK.
#m.ScalingDivisor= 700000*450.0;
m.ScalingDivisor= 1;
m.LSmokeActive = 0;
m.LSmokeToggle = 0;
m.RSmokeActive = 0;
m.RSmokeToggle = 0;
m.nCoolFactor = math.ln(1-m.CoolingFactor);
m.reset();
return m;
},
reset : func()
{
# Initial thermal energy
setprop("gear/Lbrake-thermal-energy",0.0);
setprop("gear/Rbrake-thermal-energy",0.0);
setprop("gear/Lbrake-smoke",0);
setprop("gear/Rbrake-smoke",0);
setprop("sim/animation/fire-services",0);
me.LastSimTime = 0.0;
},
# update brake energy
update : func()
{
var CurrentTime = getprop("sim/time/elapsed-sec");
var dt = CurrentTime - me.LastSimTime;
if (dt<1.0)
{
var OnGround = getprop("gear/gear[1]/wow");
var LThermalEnergy = getprop("gear/Lbrake-thermal-energy");
var RThermalEnergy = getprop("gear/Rbrake-thermal-energy");
if (getprop("controls/gear/brake-parking"))
{
var LBrakeLevel=1.0;
var RBrakeLevel=1.0;
var BrakeLevel = (LBrakeLevel + RBrakeLevel)/2;
}
else
var LBrakeLevel = getprop("fdm/jsbsim/fcs/left-brake-cmd-norm");
var RBrakeLevel = getprop("fdm/jsbsim/fcs/right-brake-cmd-norm");
var BrakeLevel = (LBrakeLevel + RBrakeLevel)/2;
if ((OnGround)and(BrakeLevel>0))
{
# absorb more energy
var V1 = getprop("velocities/groundspeed-kt");
var Mass = getprop("fdm/jsbsim/inertia/weight-lbs")/(me.ScalingDivisor*200000000);
# absorb some kinetic energy:
# dE= 1/2 * m * V1^2 - 1/2 * m * V2^2)
var V2_L = V1 - me.BrakeDecel*dt * LBrakeLevel;
var V2_R = V1 - me.BrakeDecel*dt * RBrakeLevel;
# do not absorb more energy when plane is (almost) stopped
if (V2_L>0)
LThermalEnergy += Mass * (V1*V1 - V2_L*V2_L)/2;
if (V2_R>0)
RThermalEnergy += Mass * (V1*V1 - V2_R*V2_R)/2;
}
# cooling effect: reduce thermal energy by factor (1-m.CoolingFactor)^dt
LThermalEnergy = LThermalEnergy * math.exp(me.nCoolFactor * dt);
RThermalEnergy = RThermalEnergy * math.exp(me.nCoolFactor * dt);
setprop("gear/Lbrake-thermal-energy",LThermalEnergy);
setprop("gear/Rbrake-thermal-energy",RThermalEnergy);
if ((LThermalEnergy>1)and(!me.LSmokeActive))
{
# start smoke processing
me.LSmokeActive = 1;
settimer(func { BrakeSys.Lsmoke(); },0);
}
if ((RThermalEnergy>1)and(!me.RSmokeActive))
{
# start smoke processing
me.RSmokeActive = 1;
settimer(func { BrakeSys.Rsmoke(); },0);
}
}
me.LastSimTime = CurrentTime;
# 5 updates per second are good enough
settimer(func { BrakeSys.update(); },0.2);
},
# smoke processing
Lsmoke : func()
{
if ((me.LSmokeActive)and(getprop("gear/Lbrake-thermal-energy")>1))
{
# make density of smoke effect depend on energy level
var LSmokeDelay=0;
var LThermalEnergy = getprop("gear/Lbrake-thermal-energy");
if (LThermalEnergy < 1.5)
LSmokeDelay=(1.5-LThermalEnergy);
# No smoke when gear retracted
var LSmokeValue = (getprop("gear/gear[1]/position-norm")>0.5);
# toggle smoke to interpolate different densities
if (LSmokeDelay>0.05)
{
me.LSmokeToggle = !me.LSmokeToggle;
if (!me.LSmokeToggle)
LSmokeValue = 0;
else
LSmokeDelay = 0;
}
setprop("gear/Lbrake-smoke",LSmokeValue);
settimer(func { BrakeSys.Lsmoke(); },LSmokeDelay);
}
else
{
# stop smoke processing
setprop("gear/Lbrake-smoke",0);
setprop("sim/animation/fire-services",0);
me.LSmokeActive = 0;
}
if (getprop("gear/Lbrake-thermal-energy") > 1.5)
setprop("sim/animation/fire-services",1);
else
setprop("sim/animation/fire-services",0);
},
# smoke processing
Rsmoke : func()
{
if ((me.RSmokeActive)and(getprop("gear/Rbrake-thermal-energy")>1))
{
# make density of smoke effect depend on energy level
var RSmokeDelay=0;
var RThermalEnergy = getprop("gear/Rbrake-thermal-energy");
if (RThermalEnergy < 1.5)
RSmokeDelay=(1.5-RThermalEnergy);
# No smoke when gear retracted
var RSmokeValue = (getprop("gear/gear[2]/position-norm")>0.5);
# toggle smoke to interpolate different densities
if (RSmokeDelay>0.05)
{
me.RSmokeToggle = !me.RSmokeToggle;
if (!me.RSmokeToggle)
RSmokeValue = 0;
else
RSmokeDelay = 0;
}
setprop("gear/Rbrake-smoke",RSmokeValue);
settimer(func { BrakeSys.Rsmoke(); },RSmokeDelay);
}
else
{
# stop smoke processing
setprop("gear/Rbrake-smoke",0);
me.RSmokeActive = 0;
}
if (getprop("gear/Rbrake-thermal-energy") > 1.5)
setprop("sim/animation/fire-services",1);
else
setprop("sim/animation/fire-services",0);
},
};
var BrakeSys = BrakeSystem.new();
setlistener("sim/signals/fdm-initialized",
# executed on _every_ FDM reset (but not installing new listeners)
func(idle) { BrakeSys.reset(); },
0,0);
settimer(func()
{
BrakeSys.update();
}, 5);

View file

@ -24,6 +24,7 @@ var ELEC = {
dc1: props.globals.getNode("/systems/electrical/bus/dc-1"),
dc2: props.globals.getNode("/systems/electrical/bus/dc-2"),
dcHot1: props.globals.getNode("/systems/electrical/bus/dc-hot-1"),
dcHot2: props.globals.getNode("/systems/electrical/bus/dc-hot-2"),
},
Fail: {
acEssBusFault: props.globals.getNode("/systems/failures/electrical/ac-ess-bus"),

View file

@ -2,6 +2,7 @@
# Jonathan Redpath
var fuelSvc = {
_needCenter: 0,
enable: props.globals.getNode("/services/fuel-truck/enable"),
connect: props.globals.getNode("/services/fuel-truck/connect"),
operate: props.globals.getNode("/services/fuel-truck/operate"),
@ -34,16 +35,19 @@ var fuelSvc = {
systems.FUEL.Valves.refuelRight.setBoolValue(1);
if (pts.Sim.aero.getValue() == "A320-200-CFM" and me.Nodes.requestTotalLbs.getValue() > 28229.9) {
systems.FUEL.Valves.refuelCenter.setBoolValue(1);
me._needCenter = 1;
} elsif ((pts.Sim.aero.getValue() == "A320-200-IAE" or pts.Sim.aero.getValue() == "A320-100-CFM") and me.Nodes.requestTotalLbs.getValue() > 27591.8) {
systems.FUEL.Valves.refuelCenter.setBoolValue(1);
me._needCenter = 1;
} elsif ((pts.Sim.aero.getValue() == "A320neo-CFM" or pts.Sim.aero.getValue() == "A320neo-PW") and me.Nodes.requestTotalLbs.getValue() > 27357.8) {
systems.FUEL.Valves.refuelCenter.setBoolValue(1);
me._needCenter = 1;
} else {
me._needCenter = 0;
}
},
stop: func() {
systems.FUEL.refuelling.setBoolValue(0);
# me.Nodes.requestLbs.setValue(0);
systems.FUEL.Valves.refuelLeft.setBoolValue(0);
systems.FUEL.Valves.refuelCenter.setBoolValue(0);
systems.FUEL.Valves.refuelRight.setBoolValue(0);
@ -68,19 +72,44 @@ setlistener("/services/fuel-truck/connect", func() {
}, 0, 0);
var fuelTimer = maketimer(0.25, func() {
if (systems.FUEL.Quantity.leftInnerPct.getValue() >= 0.999) {
if (Dialogs.valve_l.getValue() == 0.5) {
if (systems.FUEL.Quantity.leftInnerPct.getValue() >= 0.999) {
systems.FUEL.Valves.refuelLeft.setBoolValue(0);
} else {
systems.FUEL.Valves.refuelLeft.setBoolValue(1);
}
} elsif (Dialogs.valve_l.getValue() == 1.0 and systems.FUEL.Quantity.leftInnerPct.getValue() < 0.999) {
systems.FUEL.Valves.refuelLeft.setBoolValue(1);
} else {
systems.FUEL.Valves.refuelLeft.setBoolValue(0);
}
if (systems.FUEL.Quantity.centerPct.getValue() >= 0.999) {
systems.FUEL.Valves.refuelCenter.setBoolValue(0);
}
if (systems.FUEL.Quantity.rightInnerPct.getValue() >= 0.999) {
if (Dialogs.valve_r.getValue() == 0.5) {
if (systems.FUEL.Quantity.rightInnerPct.getValue() >= 0.999) {
systems.FUEL.Valves.refuelRight.setBoolValue(0);
} else {
systems.FUEL.Valves.refuelRight.setBoolValue(1);
}
} elsif (Dialogs.valve_r.getValue() == 1.0 and systems.FUEL.Quantity.rightInnerPct.getValue() < 0.999) {
systems.FUEL.Valves.refuelRight.setBoolValue(1);
} else {
systems.FUEL.Valves.refuelRight.setBoolValue(0);
}
if (abs(pts.Consumables.Fuel.totalFuelLbs.getValue() - fuelSvc.Nodes.requestTotalLbs.getValue()) < 5) {
if (Dialogs.valve_c.getValue() == 0.5 and fuelSvc._needCenter == 1) {
if (systems.FUEL.Quantity.centerPct.getValue() >= 0.999 or systems.FUEL.Quantity.leftInnerPct.getValue() < 0.999 or systems.FUEL.Quantity.rightInnerPct.getValue() < 0.999) {
systems.FUEL.Valves.refuelCenter.setBoolValue(0);
} else {
systems.FUEL.Valves.refuelCenter.setBoolValue(1);
}
} elsif (Dialogs.valve_c.getValue() == 1.0 and systems.FUEL.Quantity.centerPct.getValue() < 0.999) {
systems.FUEL.Valves.refuelCenter.setBoolValue(1);
} else {
systems.FUEL.Valves.refuelCenter.setBoolValue(0);
}
if (fuelSvc.Nodes.requestTotalLbs.getValue() - pts.Consumables.Fuel.totalFuelLbs.getValue() <= 0) {
screen.log.write("Refuelling complete.", 0, 0.584, 1);
fuelSvc.stop();
fuelTimer.stop();
}

55
Nasal/Systems/tyresmoke.nas Executable file
View file

@ -0,0 +1,55 @@
# ==================================== timer stuff ===============================
var run_tyresmoke0 = 0;
var run_tyresmoke1 = 0;
var run_tyresmoke2 = 0;
var tyresmoke_0 = aircraft.tyresmoke.new(0, 0, 0.8, 0);
var tyresmoke_1 = aircraft.tyresmoke.new(1, 0, 0.8, 0);
var tyresmoke_2 = aircraft.tyresmoke.new(2, 0, 0.8, 0);
# =============================== listeners ===============================
setlistener("gear/gear[0]/position-norm", func {
var gear = getprop("gear/gear[0]/position-norm");
if (gear == 1 ){
run_tyresmoke0 = 1;
}else{
run_tyresmoke0 = 0;
}
},1,0);
setlistener("gear/gear[1]/position-norm", func {
var gear = getprop("gear/gear[1]/position-norm");
if (gear == 1 ){
run_tyresmoke1 = 1;
}else{
run_tyresmoke1 = 0;
}
},1,0);
setlistener("gear/gear[2]/position-norm", func {
var gear = getprop("gear/gear[2]/position-norm");
if (gear == 1 ){
run_tyresmoke2 = 1;
}else{
run_tyresmoke2 = 0;
}
},1,0);
#============================ Rain ===================================
aircraft.rain.init();
#==================== Tyre Smoke / Rain Effects ======================
var tyresmoke_and_rain = func {
if (run_tyresmoke0)
tyresmoke_0.update();
if (run_tyresmoke1)
tyresmoke_1.update();
if (run_tyresmoke2)
tyresmoke_2.update();
aircraft.rain.update();
settimer(tyresmoke_and_rain, 0);
}# end tyresmoke_and_rain
# == fire it up ===
tyresmoke_and_rain();
# end

View file

@ -1,4 +0,0 @@
#============================ Tyre Smoke ===================================
aircraft.tyresmoke_system.new(0, 1, 2);
aircraft.rain.init();

View file

@ -1,283 +0,0 @@
# Airbus A3XX FBW/Flight Control Computer System
# Joshua Davidson (Octal450)
# Copyright (c) 2019 Joshua Davidson (Octal450)
# If All ELACs Fail, Alternate Law
setprop("/it-fbw/roll-back", 0);
setprop("/it-fbw/spd-hold", 0);
setprop("/it-fbw/protections/overspeed", 0);
setprop("/it-fbw/protections/overspeed-roll-back", 0);
setprop("/it-fbw/speeds/vmo-mmo", 350);
var mmoIAS = 0;
var fctlInit = func {
setprop("/controls/fctl/elac1", 1);
setprop("/controls/fctl/elac2", 1);
setprop("/controls/fctl/sec1", 1);
setprop("/controls/fctl/sec2", 1);
setprop("/controls/fctl/sec3", 1);
setprop("/controls/fctl/fac1", 1);
setprop("/controls/fctl/fac2", 1);
setprop("/systems/fctl/elac1", 0);
setprop("/systems/fctl/elac2", 0);
setprop("/systems/fctl/sec1", 0);
setprop("/systems/fctl/sec2", 0);
setprop("/systems/fctl/sec3", 0);
setprop("/systems/fctl/fac1", 0);
setprop("/systems/fctl/fac2", 0);
setprop("/it-fbw/degrade-law", 0);
setprop("/it-fbw/override", 0);
setprop("/it-fbw/law", 0);
updatet.start();
fbwt.start();
}
var update_loop = func {
var elac1_sw = getprop("/controls/fctl/elac1");
var elac2_sw = getprop("/controls/fctl/elac2");
var sec1_sw = getprop("/controls/fctl/sec1");
var sec2_sw = getprop("/controls/fctl/sec2");
var sec3_sw = getprop("/controls/fctl/sec3");
var fac1_sw = getprop("/controls/fctl/fac1");
var fac2_sw = getprop("/controls/fctl/fac2");
var elac1_fail = getprop("/systems/failures/elac1");
var elac2_fail = getprop("/systems/failures/elac2");
var sec1_fail = getprop("/systems/failures/sec1");
var sec2_fail = getprop("/systems/failures/sec2");
var sec3_fail = getprop("/systems/failures/sec3");
var fac1_fail = getprop("/systems/failures/fac1");
var fac2_fail = getprop("/systems/failures/fac2");
var ac_ess = props.globals.getNode("/systems/electrical/bus/ac-ess").getValue();
var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess").getValue();
var dc_ess_shed = props.globals.getNode("/systems/electrical/bus/dc-ess-shed").getValue();
var ac1 = props.globals.getNode("/systems/electrical/bus/ac-1").getValue();
var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2").getValue();
var dc1 = props.globals.getNode("/systems/electrical/bus/dc-1").getValue();
var dc2 = props.globals.getNode("/systems/electrical/bus/dc-2").getValue();
var battery1_sw = props.globals.getNode("/controls/electrical/switches/bat-1").getValue();
var battery2_sw = props.globals.getNode("/controls/electrical/switches/bat-2").getValue();
var elac1_test = getprop("/systems/electrical/elac1-test");
var elac2_test = getprop("/systems/electrical/elac2-test");
if (elac1_sw and !elac1_fail and (dc_ess >= 25 or battery1_sw) and !elac1_test) {
setprop("/systems/fctl/elac1", 1);
setprop("/systems/failures/elac1-fault", 0);
} else if (elac1_sw and (elac1_fail or (dc_ess < 25 and !battery1_sw)) and !elac1_test) {
setprop("/systems/failures/elac1-fault", 1);
setprop("/systems/fctl/elac1", 0);
} else if (!elac1_test) {
setprop("/systems/failures/elac1-fault", 0);
setprop("/systems/fctl/elac1", 1);
}
if (elac2_sw and !elac2_fail and (dc2 >= 25 or battery2_sw) and !elac2_test) {
setprop("/systems/fctl/elac2", 1);
setprop("/systems/failures/elac2-fault", 0);
} else if (elac2_sw and (elac2_fail or (dc2 < 25 and !battery2_sw)) and !elac2_test) {
setprop("/systems/failures/elac2-fault", 1);
setprop("/systems/fctl/elac2", 0);
} else if (!elac2_test) {
setprop("/systems/failures/elac2-fault", 0);
setprop("/systems/fctl/elac2", 1);
}
if (sec1_sw and !sec1_fail and ac_ess >= 110) {
setprop("/systems/fctl/sec1", 1);
setprop("/systems/failures/spoiler-l3", 0);
setprop("/systems/failures/spoiler-r3", 0);
setprop("/systems/failures/spoiler-l4", 0);
setprop("/systems/failures/spoiler-r4", 0);
} else {
setprop("/systems/fctl/sec1", 0);
setprop("/systems/failures/spoiler-l3", 1);
setprop("/systems/failures/spoiler-r3", 1);
setprop("/systems/failures/spoiler-l4", 1);
setprop("/systems/failures/spoiler-r4", 1);
}
if (sec2_sw and !sec2_fail and ac_ess >= 110) {
setprop("/systems/fctl/sec2", 1);
setprop("/systems/failures/spoiler-l5", 0);
setprop("/systems/failures/spoiler-r5", 0);
} else {
setprop("/systems/fctl/sec2", 0);
setprop("/systems/failures/spoiler-l5", 1);
setprop("/systems/failures/spoiler-r5", 1);
}
if (sec3_sw and !sec3_fail and ac_ess >= 110) {
setprop("/systems/fctl/sec3", 1);
setprop("/systems/failures/spoiler-l1", 0);
setprop("/systems/failures/spoiler-r1", 0);
setprop("/systems/failures/spoiler-l2", 0);
setprop("/systems/failures/spoiler-r2", 0);
} else {
setprop("/systems/fctl/sec3", 0);
setprop("/systems/failures/spoiler-l1", 1);
setprop("/systems/failures/spoiler-r1", 1);
setprop("/systems/failures/spoiler-l2", 1);
setprop("/systems/failures/spoiler-r2", 1);
}
if (fac1_sw and !fac1_fail and (ac_ess >= 110 or dc_ess_shed >= 25)) {
setprop("/systems/fctl/fac1", 1);
setprop("/systems/failures/rudder", 0);
setprop("/systems/failures/fac1-fault", 0);
} else if (fac1_sw and (battery1_sw or battery2_sw) and (fac1_fail or ac_ess < 110 or dc_ess_shed < 25)) {
setprop("/systems/failures/fac1-fault", 1);
setprop("/systems/fctl/fac1", 0);
if (!fac2_sw or fac2_fail) {
setprop("/systems/failures/rudder", 1);
}
} else {
setprop("/systems/failures/fac1-fault", 0);
setprop("/systems/fctl/fac1", 0);
if (!fac2_sw or fac2_fail) {
setprop("/systems/failures/rudder", 1);
}
}
if (fac2_sw and !fac2_fail and (ac2 >= 110 or dc2 >= 25)) {
setprop("/systems/fctl/fac2", 1);
setprop("/systems/failures/fac2-fault", 0);
} else if (fac2_sw and (fac2_fail or ac2 < 110 or dc2 < 25)) {
setprop("/systems/failures/fac2-fault", 1);
setprop("/systems/fctl/fac2", 0);
if (!fac1_sw or fac1_fail) {
setprop("/systems/failures/rudder", 1);
}
} else {
setprop("/systems/fctl/fac2", 0);
setprop("/systems/failures/fac2-fault", 0);
if (!fac1_sw or fac1_fail) {
setprop("/systems/failures/rudder", 1);
}
}
var elac1 = getprop("/systems/fctl/elac1");
var elac2 = getprop("/systems/fctl/elac2");
var sec1 = getprop("/systems/fctl/sec1");
var sec2 = getprop("/systems/fctl/sec2");
var sec3 = getprop("/systems/fctl/sec3");
var fac1 = getprop("/systems/fctl/fac1");
var fac2 = getprop("/systems/fctl/fac2");
var law = getprop("/it-fbw/law");
# Degrade logic, all failures which degrade FBW need to go here. -JD
if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0) {
if (!elac1 and !elac2) {
if (law == 0) {
setprop("/it-fbw/degrade-law", 1);
}
}
if (ac_ess >= 110 and getprop("/systems/hydraulic/blue-psi") >= 1500 and getprop("/systems/hydraulic/green-psi") < 1500 and getprop("/systems/hydraulic/yellow-psi") < 1500) {
if (law == 0 or law == 1) {
setprop("/it-fbw/degrade-law", 2);
}
}
if (ac_ess < 110 or (getprop("/systems/hydraulic/blue-psi") < 1500 and getprop("/systems/hydraulic/green-psi") < 1500 and getprop("/systems/hydraulic/yellow-psi") < 1500)) {
setprop("/it-fbw/degrade-law", 3);
}
}
if (getprop("/controls/gear/gear-down") == 1 and getprop("/it-autoflight/output/ap1") == 0 and getprop("/it-autoflight/output/ap2") == 0) {
if (law == 1) {
setprop("/it-fbw/degrade-law", 2);
}
}
# degrade loop runs faster; reset this variable
var law = getprop("/it-fbw/law");
# Mech Backup can always return to direct, if it can.
if (law == 3 and ac_ess >= 110 and (getprop("/systems/hydraulic/green-psi") >= 1500 or getprop("/systems/hydraulic/blue-psi") >= 1500 or getprop("/systems/hydraulic/yellow-psi") >= 1500)) {
setprop("/it-fbw/degrade-law", 2);
}
mmoIAS = (getprop("/instrumentation/airspeed-indicator/indicated-speed-kt") / getprop("/instrumentation/airspeed-indicator/indicated-mach")) * 0.82;
if (mmoIAS < 350) {
setprop("/it-fbw/speeds/vmo-mmo", mmoIAS);
} else {
setprop("/it-fbw/speeds/vmo-mmo", 350);
}
if (getprop("/instrumentation/airspeed-indicator/indicated-speed-kt") > getprop("/it-fbw/speeds/vmo-mmo") + 6 and (law == 0 or law == 1)) {
if (getprop("/it-autoflight/input/ap1") == 1 or getprop("/it-autoflight/input/ap2") == 1) {
fcu.apOff("hard", 0);
}
if (getprop("/it-fbw/protections/overspeed") != 1) {
setprop("/it-fbw/protections/overspeed", 1);
}
} else {
if (getprop("/it-fbw/protections/overspeed") != 0) {
setprop("/it-fbw/protections/overspeed", 0);
}
}
}
var fbw_loop = func {
var ail = getprop("/controls/flight/aileron");
if (ail > 0.4 and getprop("/orientation/roll-deg") >= -33.5) {
setprop("/it-fbw/roll-lim", "67");
if (getprop("/it-fbw/roll-back") == 1 and getprop("/orientation/roll-deg") <= 33.5 and getprop("/orientation/roll-deg") >= -33.5) {
setprop("/it-fbw/roll-back", 0);
}
if (getprop("/it-fbw/roll-back") == 0 and (getprop("/orientation/roll-deg") > 33.5 or getprop("/orientation/roll-deg") < -33.5)) {
setprop("/it-fbw/roll-back", 1);
}
} else if (ail < -0.4 and getprop("/orientation/roll-deg") <= 33.5) {
setprop("/it-fbw/roll-lim", "67");
if (getprop("/it-fbw/roll-back") == 1 and getprop("/orientation/roll-deg") <= 33.5 and getprop("/orientation/roll-deg") >= -33.5) {
setprop("/it-fbw/roll-back", 0);
}
if (getprop("/it-fbw/roll-back") == 0 and (getprop("/orientation/roll-deg") > 33.5 or getprop("/orientation/roll-deg") < -33.5)) {
setprop("/it-fbw/roll-back", 1);
}
} else if (ail < 0.04 and ail > -0.04) {
setprop("/it-fbw/roll-lim", "33");
if (getprop("/it-fbw/roll-back") == 1 and getprop("/orientation/roll-deg") <= 33.5 and getprop("/orientation/roll-deg") >= -33.5) {
setprop("/it-fbw/roll-back", 0);
}
}
if (ail > 0.04 or ail < -0.04) {
setprop("/it-fbw/protections/overspeed-roll-back", 0);
} else if (ail < 0.04 and ail > -0.04) {
setprop("/it-fbw/protections/overspeed-roll-back", 1);
}
if (getprop("/it-fbw/override") == 0) {
var degrade = getprop("/it-fbw/degrade-law");
if (degrade == 0) {
if (getprop("/it-fbw/law") != 0) {
setprop("/it-fbw/law", 0);
}
} else if (degrade == 1) {
if (getprop("/it-fbw/law") != 1) {
setprop("/it-fbw/law", 1);
}
} else if (degrade == 2) {
if (getprop("/it-fbw/law") != 2) {
setprop("/it-fbw/law", 2);
}
} else if (degrade == 3) {
if (getprop("/it-fbw/law") != 3) {
setprop("/it-fbw/law", 3);
}
}
}
if (getprop("/it-fbw/law") != 0) {
if (getprop("/it-autoflight/output/ap1") == 1 or getprop("/it-autoflight/output/ap2") == 1) {
fcu.apOff("hard", 0);
}
}
}
var updatet = maketimer(0.1, update_loop);
var fbwt = maketimer(0.03, fbw_loop);

View file

@ -1581,14 +1581,32 @@
<max-dist>100</max-dist>
</crc>
<cricket>
<name>Cricket</name>
<path>Aircraft/A320-family/Sounds/Cockpit/cricket.wav</path>
<mode>looped</mode>
<type>avionics</type>
<condition>
<property>/sim/sound/warnings/cricket</property>
</condition>
<volume>
<factor>0.2</factor>
</volume>
<reference-dist>10</reference-dist>
<max-dist>100</max-dist>
</cricket>
<stall-voice>
<name>stall-voice</name>
<mode>looped</mode>
<path>Aircraft/A320-family/Sounds/Cockpit/stall_voice.wav</path>
<type>avionics</type>
<condition>
<property>warnings/stall/active</property>
<property>/sim/sound/warnings/stall-voice</property>
</condition>
<volume>
<factor>2.0</factor>
</volume>
<reference-dist>10</reference-dist>
<max-dist>100.0</max-dist>
</stall-voice>

Binary file not shown.

Binary file not shown.

View file

@ -1,417 +0,0 @@
<!-- Airbus A320 Fuel (-100) -->
<!-- Copyright (c) 2019 Jonathan Redpath -->
<system name="A320: Fuel:">
<channel name="Fuel Pumps and Valves">
<!-- Pumps -->
<switch name="/systems/fuel/pumps/apu-operate">
<default value="0"/>
<test logic="AND" value="1">
/systems/fuel/pumps/all-eng-pump-off eq 1
<test logic="OR">
/systems/electrical/bus/ac-ess-shed ge 110
/systems/electrical/bus/ac-si-bus ge 110
</test>
</test>
</switch>
<switch name="/systems/fuel/pumps/wing-pump-left-1-operate">
<default value="0"/>
<test logic="AND" value="1">
/controls/fuel/switches/pump-left-1 eq 1
<test logic="OR">
<test logic="AND">
/systems/electrical/sources/idg-1/pmg-volt ge 110
/controls/electrical/switches/gen-1-line-contactor eq 1
</test>
/systems/electrical/bus/ac-1 ge 110
</test>
</test>
</switch>
<switch name="/systems/fuel/pumps/wing-pump-left-2-operate">
<default value="0"/>
<test logic="AND" value="1">
/controls/fuel/switches/pump-left-2 eq 1
/systems/electrical/bus/ac-2 ge 110
</test>
</switch>
<switch name="/systems/fuel/pumps/wing-pump-right-1-operate">
<default value="0"/>
<test logic="AND" value="1">
/controls/fuel/switches/pump-right-1 eq 1
<test logic="OR">
<test logic="AND">
/systems/electrical/sources/idg-1/pmg-volt ge 110
/controls/electrical/switches/gen-1-line-contactor eq 1
</test>
/systems/electrical/bus/ac-1 ge 110
</test>
</test>
</switch>
<switch name="/systems/fuel/pumps/wing-pump-right-2-operate">
<default value="0"/>
<test logic="AND" value="1">
/controls/fuel/switches/pump-right-2 eq 1
/systems/electrical/bus/ac-2 ge 110
</test>
</switch>
<switch name="/systems/fuel/left-inner-full">
<default value="0"/>
<test logic="AND" value="1">
/systems/fuel/left-inner-full eq 1
propulsion/tank[1]/contents-lbs lt 11420
propulsion/tank[1]/contents-lbs ge 10300
</test>
<test value="1">
propulsion/tank[1]/contents-lbs eq 11420
</test>
</switch>
<switch name="/systems/fuel/right-inner-full">
<default value="0"/>
<test logic="AND" value="1">
/systems/fuel/right-inner-full eq 1
propulsion/tank[2]/contents-lbs lt 11420
propulsion/tank[2]/contents-lbs ge 10300
</test>
<test value="1">
propulsion/tank[2]/contents-lbs eq 11420
</test>
</switch>
<switch name="/systems/fuel/pumps/all-eng-pump-off">
<default value="0"/>
<test logic="AND" value="1">
/systems/fuel/pumps/wing-pump-left-1-operate eq 0
/systems/fuel/pumps/wing-pump-left-2-operate eq 0
/systems/fuel/pumps/wing-pump-right-1-operate eq 0
/systems/fuel/pumps/wing-pump-right-2-operate eq 0
</test>
</switch>
<switch name="/systems/fuel/quantity/left-wing-inner-low">
<default value="0"/>
<test value="1">
propulsion/tank[1]/contents-lbs le 1650
</test>
</switch>
<switch name="/systems/fuel/quantity/right-wing-inner-low">
<default value="0"/>
<test value="1">
propulsion/tank[2]/contents-lbs le 1650
</test>
</switch>
<!-- Valves -->
<switch name="/systems/fuel/valves/outer-inner-transfer-valve-1-cmd">
<default value="0"/>
<test logic="AND" value="1">
/systems/fuel/valves/outer-inner-transfer-valve-1-cmd eq 1
/systems/fuel/refuel/refuelling eq 0
</test>
<test value="1">
/systems/fuel/quantity/left-wing-inner-low eq 1
</test>
</switch>
<switch name="/systems/fuel/valves/outer-inner-transfer-valve-1-power">
<default value="0"/>
<test value="0.333">
/systems/electrical/bus/dc-ess-shed ge 25
</test>
</switch>
<actuator name="/systems/fuel/valves/outer-inner-transfer-valve-1">
<input>/systems/fuel/valves/outer-inner-transfer-valve-1-cmd</input>
<rate_limit>/systems/fuel/valves/outer-inner-transfer-valve-1-power</rate_limit>
</actuator>
<switch name="/systems/fuel/valves/outer-inner-transfer-valve-2-cmd">
<default value="0"/>
<test logic="AND" value="1">
/systems/fuel/valves/outer-inner-transfer-valve-2-cmd eq 1
/systems/fuel/refuel/refuelling eq 0
</test>
<test value="1">
/systems/fuel/quantity/right-wing-inner-low eq 1
</test>
</switch>
<switch name="/systems/fuel/valves/outer-inner-transfer-valve-2-power">
<default value="0"/>
<test value="0.333">
/systems/electrical/bus/dc-ess-shed ge 25
</test>
</switch>
<actuator name="/systems/fuel/valves/outer-inner-transfer-valve-2">
<input>/systems/fuel/valves/outer-inner-transfer-valve-2-cmd</input>
<rate_limit>/systems/fuel/valves/outer-inner-transfer-valve-2-power</rate_limit>
</actuator>
<!-- XFeed Valve -->
<switch name="/systems/fuel/valves/crossfeed-valve-cmd">
<default value="0"/>
<test value="1">
/controls/fuel/switches/crossfeed eq 1
</test>
</switch>
<switch name="/systems/fuel/valves/crossfeed-valve-power">
<default value="0"/>
<test logic="OR" value="0.5">
/systems/electrical/bus/dc-2 ge 25
/systems/electrical/bus/dc-ess-shed ge 25
</test>
</switch>
<actuator name="/systems/fuel/valves/crossfeed-valve">
<input>/systems/fuel/valves/crossfeed-valve-cmd</input>
<rate_limit>/systems/fuel/valves/crossfeed-valve-power</rate_limit>
</actuator>
<!-- Engine LP Valves -->
<switch name="/systems/fuel/valves/engine-1-lp-valve-cmd">
<default value="0"/>
<test logic="AND" value="1">
/controls/engines/engine[0]/fire-btn eq 0
/controls/engines/engine[0]/cutoff-switch eq 0
</test>
</switch>
<switch name="/systems/fuel/valves/engine-1-lp-valve-power">
<default value="0"/>
<test logic="OR" value="1.0">
/systems/electrical/bus/dc-ess-shed ge 25
/systems/electrical/bus/dc-2 ge 25
</test>
</switch>
<actuator name="/systems/fuel/valves/engine-1-lp-valve">
<input>/systems/fuel/valves/engine-1-lp-valve-cmd</input>
<rate_limit>/systems/fuel/valves/engine-1-lp-valve-power</rate_limit>
</actuator>
<switch name="/systems/fuel/valves/engine-2-lp-valve-cmd">
<default value="0"/>
<test logic="AND" value="1">
/controls/engines/engine[1]/fire-btn eq 0
/controls/engines/engine[1]/cutoff-switch eq 0
</test>
</switch>
<switch name="/systems/fuel/valves/engine-2-lp-valve-power">
<default value="0"/>
<test logic="OR" value="1.0">
/systems/electrical/bus/dc-ess-shed ge 25
/systems/electrical/bus/dc-2 ge 25
</test>
</switch>
<actuator name="/systems/fuel/valves/engine-2-lp-valve">
<input>/systems/fuel/valves/engine-2-lp-valve-cmd</input>
<rate_limit>/systems/fuel/valves/engine-2-lp-valve-power</rate_limit>
</actuator>
<switch name="/systems/fuel/valves/apu-lp-valve-cmd">
<default value="0"/>
<test logic="AND" value="1">
/controls/APU/master eq 1
/controls/APU/fire-btn eq 0
</test>
</switch>
<switch name="/systems/fuel/valves/apu-lp-valve-power">
<default value="0"/>
<test logic="OR" value="1.0">
/systems/electrical/bus/dc-bat ge 25
/systems/electrical/bus/dc-hot-1 ge 25
</test>
</switch>
<actuator name="/systems/fuel/valves/apu-lp-valve">
<input>/systems/fuel/valves/apu-lp-valve-cmd</input>
<rate_limit>/systems/fuel/valves/apu-lp-valve-power</rate_limit>
</actuator>
<!-- Pump PSI -->
<pure_gain name="/systems/fuel/pumps/apu-psi-cmd">
<input>/systems/fuel/pumps/apu-operate</input>
<gain>25.3</gain> <!-- 9600 lb/h (guess) -->
</pure_gain>
<actuator name="/systems/fuel/pumps/apu-psi">
<input>/systems/fuel/pumps/apu-psi-cmd</input>
<rate_limit sense="incr">5</rate_limit>
<rate_limit sense="decr">10</rate_limit>
</actuator>
<pure_gain name="/systems/fuel/pumps/wing-pump-left-1-psi-cmd">
<input>/systems/fuel/pumps/wing-pump-left-1-operate</input>
<gain>25.3</gain> <!-- 9600 lb/h (guess) -->
</pure_gain>
<actuator name="/systems/fuel/pumps/wing-pump-left-1-psi">
<input>/systems/fuel/pumps/wing-pump-left-1-psi-cmd</input>
<rate_limit sense="incr">5</rate_limit>
<rate_limit sense="decr">10</rate_limit>
</actuator>
<pure_gain name="/systems/fuel/pumps/wing-pump-left-2-psi-cmd">
<input>/systems/fuel/pumps/wing-pump-left-2-operate</input>
<gain>25.3</gain> <!-- 9600 lb/h (guess) -->
</pure_gain>
<actuator name="/systems/fuel/pumps/wing-pump-left-2-psi">
<input>/systems/fuel/pumps/wing-pump-left-2-psi-cmd</input>
<rate_limit sense="incr">5</rate_limit>
<rate_limit sense="decr">10</rate_limit>
</actuator>
<pure_gain name="/systems/fuel/pumps/wing-pump-right-1-psi-cmd">
<input>/systems/fuel/pumps/wing-pump-right-1-operate</input>
<gain>25.3</gain> <!-- 9600 lb/h (guess) -->
</pure_gain>
<actuator name="/systems/fuel/pumps/wing-pump-right-1-psi">
<input>/systems/fuel/pumps/wing-pump-right-1-psi-cmd</input>
<rate_limit sense="incr">5</rate_limit>
<rate_limit sense="decr">10</rate_limit>
</actuator>
<pure_gain name="/systems/fuel/pumps/wing-pump-right-2-psi-cmd">
<input>/systems/fuel/pumps/wing-pump-right-2-operate</input>
<gain>25.3</gain> <!-- 9600 lb/h (guess) -->
</pure_gain>
<actuator name="/systems/fuel/pumps/wing-pump-right-2-psi">
<input>/systems/fuel/pumps/wing-pump-right-2-psi-cmd</input>
<rate_limit sense="incr">5</rate_limit>
<rate_limit sense="decr">10</rate_limit>
</actuator>
</channel>
<channel name="Flow Rates">
<switch name="/systems/fuel/feed-left-inner">
<default value="0"/>
<test logic="OR" value="1">
/systems/fuel/pumps/wing-pump-left-1-operate eq 1
/systems/fuel/pumps/wing-pump-left-2-operate eq 1
</test>
<test logic="AND" value="1"> <!-- Suction/Gravity feed if G is not to far below 1 -->
/accelerations/pilot-gdamped ge 0.5
</test>
</switch>
<switch name="/systems/fuel/feed-right-inner">
<default value="0"/>
<test logic="OR" value="1">
/systems/fuel/pumps/wing-pump-right-1-operate eq 1
/systems/fuel/pumps/wing-pump-right-2-operate eq 1
</test>
<test logic="AND" value="1"> <!-- Suction/Gravity feed if G is not to far below 1 -->
/accelerations/pilot-gdamped ge 0.5
</test>
</switch>
<switch name="/systems/fuel/internal/left-wing-tank-eng-1">
<default value="0"/>
<test logic="AND" value="9">
/systems/fuel/feed-left-inner eq 1
propulsion/tank[1]/contents-lbs gt 31.24
propulsion/tank[4]/contents-lbs lt 9
</test>
</switch>
<switch name="/systems/fuel/internal/right-wing-tank-eng-1">
<default value="0"/>
<test logic="AND" value="9">
/systems/fuel/valves/crossfeed-valve eq 1
propulsion/tank[2]/contents-lbs gt 31.24
propulsion/tank[4]/contents-lbs lt 9
</test>
</switch>
<switch name="/systems/fuel/internal/left-wing-tank-eng-2">
<default value="0"/>
<test logic="AND" value="9">
/systems/fuel/valves/crossfeed-valve eq 1
/systems/fuel/feed-left-inner eq 1
propulsion/tank[1]/contents-lbs gt 31.24
propulsion/tank[5]/contents-lbs lt 9
</test>
</switch>
<switch name="/systems/fuel/internal/right-wing-tank-eng-2">
<default value="0"/>
<test logic="AND" value="9">
/systems/fuel/feed-right-inner eq 1
propulsion/tank[2]/contents-lbs gt 31.24
propulsion/tank[5]/contents-lbs lt 9
</test>
</switch>
<switch name="/systems/fuel/internal/left-wing-outer-to-inner-tank">
<default value="0"/>
<test logic="AND" value="9">
/systems/fuel/valves/outer-inner-transfer-valve-1 eq 1
/accelerations/pilot-gdamped ge 0.5
</test>
</switch>
<switch name="/systems/fuel/internal/right-wing-outer-to-inner-tank">
<default value="0"/>
<test logic="AND" value="9">
/systems/fuel/valves/outer-inner-transfer-valve-2 eq 1
/accelerations/pilot-gdamped ge 0.5
</test>
</switch>
<summer name="/systems/fuel/internal/left-outer-flow-rate">
<input>-/systems/fuel/internal/left-wing-outer-to-inner-tank</input>
<output>propulsion/tank[0]/external-flow-rate-pps</output>
</summer>
<summer name="/systems/fuel/internal/left-inner-flow-rate">
<input>/systems/fuel/internal/left-wing-outer-to-inner-tank</input>
<input>-/systems/fuel/internal/left-wing-tank-eng-1</input>
<input>-/systems/fuel/internal/left-wing-tank-eng-2</input>
<output>propulsion/tank[1]/external-flow-rate-pps</output>
</summer>
<summer name="/systems/fuel/internal/right-inner-flow-rate">
<input>/systems/fuel/internal/right-wing-outer-to-inner-tank</input>
<input>-/systems/fuel/internal/right-wing-tank-eng-1</input>
<input>-/systems/fuel/internal/right-wing-tank-eng-2</input>
<output>propulsion/tank[2]/external-flow-rate-pps</output>
</summer>
<summer name="/systems/fuel/internal/right-outer-flow-rate">
<input>-/systems/fuel/internal/right-wing-outer-to-inner-tank</input>
<output>propulsion/tank[3]/external-flow-rate-pps</output>
</summer>
<summer name="/systems/fuel/internal/eng-1-flow-rate">
<input>/systems/fuel/internal/left-wing-tank-eng-1</input>
<input>/systems/fuel/internal/right-wing-tank-eng-1</input>
<output>propulsion/tank[4]/external-flow-rate-pps</output>
</summer>
<summer name="/systems/fuel/internal/eng-2-flow-rate">
<input>/systems/fuel/internal/left-wing-tank-eng-2</input>
<input>/systems/fuel/internal/right-wing-tank-eng-2</input>
<output>propulsion/tank[5]/external-flow-rate-pps</output>
</summer>
</channel>
</system>

1015
Systems/a320-adr.xml Normal file

File diff suppressed because it is too large Load diff

View file

@ -1348,8 +1348,8 @@
<test value="/systems/electrical/bus/dc-2">
/systems/electrical/bus/dc-2 ge 25
</test>
<output>/systems/electrical/outputs/adf</output>
<output>/systems/electrical/outputs/dme</output>
<!--<output>/systems/electrical/outputs/adf</output>
<output>/systems/electrical/outputs/dme</output>-->
<output>/systems/electrical/outputs/efis</output>
<output>/systems/electrical/outputs/fcp-power</output>
<output>/systems/electrical/outputs/fuel-pump[0]</output>
@ -1357,10 +1357,10 @@
<output>/systems/electrical/outputs/fuel-pump[2]</output>
<output>/systems/electrical/outputs/gps</output>
<output>/systems/electrical/outputs/mk-viii</output>
<output>/systems/electrical/outputs/nav[0]</output>
<!--<output>/systems/electrical/outputs/nav[0]</output>
<output>/systems/electrical/outputs/nav[1]</output>
<output>/systems/electrical/outputs/nav[2]</output>
<output>/systems/electrical/outputs/nav[3]</output>
<output>/systems/electrical/outputs/nav[3]</output>-->
<output>/systems/electrical/outputs/tacan</output>
<output>/systems/electrical/outputs/turn-coordinator</output>
</switch>
@ -1368,9 +1368,7 @@
<!-- Notes -->
<!-- Priority: eng, ext, apu but EXT ON lt stays on even when not feeding a/c -->
<!-- Ground service bus connected directly to input-volt -->
<!-- TR 2 fail leads to loss of gnd FLT bus -->
<!-- TODO: Galley: During single generator is off, if GALY AND CAB pb is off (TODO: Do we have this?) is off -->
<channel name="Overhead Lights" execrate="8">

161
Systems/a320-fmgc.xml Normal file
View file

@ -0,0 +1,161 @@
<!-- Airbus A320 FMGC -->
<!-- Copyright (c) 2019 Jonathan Redpath -->
<system name="A320: FMGC">
<channel name="FMGC" execrate="8">
<fcs_function name="/systems/fmgc/cas-compare/cas-1-to-3">
<function>
<abs>
<difference>
<property>/systems/navigation/adr/output/cas-1</property>
<property>/systems/navigation/adr/output/cas-3</property>
</difference>
</abs>
</function>
</fcs_function>
<fcs_function name="/systems/fmgc/cas-compare/cas-2-to-3">
<function>
<abs>
<difference>
<property>/systems/navigation/adr/output/cas-2</property>
<property>/systems/navigation/adr/output/cas-3</property>
</difference>
</abs>
</function>
</fcs_function>
<fcs_function name="/systems/fmgc/cas-compare/cas-2-to-1">
<function>
<abs>
<difference>
<property>/systems/navigation/adr/output/cas-2</property>
<property>/systems/navigation/adr/output/cas-1</property>
</difference>
</abs>
</function>
</fcs_function>
<fcs_function name="/systems/fmgc/cas-compare/cas-reject-all">
<function>
<ifthen>
<and>
<gt>
<property>/systems/fmgc/cas-compare/cas-1-to-3</property>
<value>5</value> <!-- todo - find proper value -->
</gt>
<gt>
<property>/systems/fmgc/cas-compare/cas-2-to-1</property>
<value>5</value>
</gt>
<gt>
<property>/systems/fmgc/cas-compare/cas-2-to-3</property>
<value>5</value>
</gt>
</and>
<value>1</value>
<value>0</value>
</ifthen>
</function>
</fcs_function>
<fcs_function name="/systems/fmgc/cas-compare/cas-reject-1"> <!-- 2 and 3 are the same but 1 is different -->
<function>
<ifthen>
<and>
<gt>
<property>/systems/fmgc/cas-compare/cas-1-to-3</property>
<value>5</value> <!-- todo - find proper value -->
</gt>
<gt>
<property>/systems/fmgc/cas-compare/cas-2-to-1</property>
<value>5</value>
</gt>
<lt>
<property>/systems/fmgc/cas-compare/cas-2-to-3</property>
<value>5</value>
</lt>
</and>
<value>1</value>
<value>0</value>
</ifthen>
</function>
</fcs_function>
<fcs_function name="/systems/fmgc/cas-compare/cas-reject-2"> <!-- 1 and 3 are the same but 2 is different -->
<function>
<ifthen>
<and>
<gt>
<property>/systems/fmgc/cas-compare/cas-2-to-3</property>
<value>5</value> <!-- todo - find proper value -->
</gt>
<gt>
<property>/systems/fmgc/cas-compare/cas-2-to-1</property>
<value>5</value>
</gt>
<lt>
<property>/systems/fmgc/cas-compare/cas-1-to-3</property>
<value>5</value>
</lt>
</and>
<value>1</value>
<value>0</value>
</ifthen>
</function>
</fcs_function>
<fcs_function name="/systems/fmgc/cas-compare/cas-reject-3"> <!-- 1 and 2 are the same but 3 is different -->
<function>
<ifthen>
<and>
<gt>
<property>/systems/fmgc/cas-compare/cas-1-to-3</property>
<value>5</value> <!-- todo - find proper value -->
</gt>
<gt>
<property>/systems/fmgc/cas-compare/cas-2-to-3</property>
<value>5</value>
</gt>
<lt>
<property>/systems/fmgc/cas-compare/cas-2-to-1</property>
<value>5</value>
</lt>
</and>
<value>1</value>
<value>0</value>
</ifthen>
</function>
</fcs_function>
<fcs_function name="/systems/fmgc/active-airspeed-src-1">
<function>
<ifthen>
<eq>
<property>/systems/fmgc/cas-compare/cas-reject-1</property>
<value>1</value>
</eq>
<value>3</value>
<value>1</value>
</ifthen>
</function>
</fcs_function>
<fcs_function name="/systems/fmgc/active-airspeed-src-2">
<function>
<ifthen>
<eq>
<property>/systems/fmgc/cas-compare/cas-reject-2</property>
<value>1</value>
</eq>
<value>3</value>
<value>2</value>
</ifthen>
</function>
</fcs_function>
</channel>
</system>

View file

@ -194,6 +194,7 @@
/systems/fuel/refuel/refuelling eq 0
</test>
<test logic="AND" value="1">
/systems/fuel/valves/outer-inner-transfer-valve-1-power ne 0
<test logic="OR">
/systems/fuel/quantity/left-wing-inner-low eq 1
/systems/fuel/quantity/right-wing-inner-low eq 1
@ -204,8 +205,9 @@
<switch name="/systems/fuel/valves/outer-inner-transfer-valve-1-power">
<default value="0"/>
<test value="0.333">
<test logic="OR" value="0.333">
/systems/electrical/bus/dc-ess-shed ge 25
/systems/electrical/bus/dc-2 ge 25
</test>
</switch>
@ -221,6 +223,7 @@
/systems/fuel/refuel/refuelling eq 0
</test>
<test logic="AND" value="1">
/systems/fuel/valves/outer-inner-transfer-valve-2-power ne 0
<test logic="OR">
/systems/fuel/quantity/left-wing-inner-low eq 1
/systems/fuel/quantity/right-wing-inner-low eq 1
@ -231,8 +234,9 @@
<switch name="/systems/fuel/valves/outer-inner-transfer-valve-2-power">
<default value="0"/>
<test value="0.333">
<test logic="OR" value="0.333">
/systems/electrical/bus/dc-ess-shed ge 25
/systems/electrical/bus/dc-2 ge 25
</test>
</switch>
@ -619,21 +623,35 @@
<switch name="/systems/fuel/internal/left-wing-outer-to-inner-tank">
<default value="0"/>
<test logic="AND" value="/systems/fuel/internal/left-outer-wing-tank-refuel">
/systems/fuel/valves/outer-inner-transfer-valve-1 eq 1
/accelerations/pilot-gdamped ge 0.5
/consumables/fuel/tank[0]/level-gal_us gt /consumables/fuel/tank[0]/unusable-gal_us
/consumables/fuel/tank[1]/level-norm lt 0.9999
/systems/fuel/refuel/refuelling eq 1
</test>
<test logic="AND" value="9">
/systems/fuel/valves/outer-inner-transfer-valve-1 eq 1
/accelerations/pilot-gdamped ge 0.5
/consumables/fuel/tank[0]/level-gal_us gt /consumables/fuel/tank[0]/unusable-gal_us
/consumables/fuel/tank[1]/level-norm lt 0.999
/consumables/fuel/tank[1]/level-norm lt 0.9999
</test>
</switch>
<switch name="/systems/fuel/internal/right-wing-outer-to-inner-tank">
<default value="0"/>
<test logic="AND" value="/systems/fuel/internal/right-outer-wing-tank-refuel">
/systems/fuel/valves/outer-inner-transfer-valve-2 eq 1
/accelerations/pilot-gdamped ge 0.5
/consumables/fuel/tank[4]/level-gal_us gt /consumables/fuel/tank[0]/unusable-gal_us
/consumables/fuel/tank[3]/level-norm lt 0.9999
/systems/fuel/refuel/refuelling eq 1
</test>
<test logic="AND" value="9">
/systems/fuel/valves/outer-inner-transfer-valve-2 eq 1
/accelerations/pilot-gdamped ge 0.5
/consumables/fuel/tank[4]/level-gal_us gt /consumables/fuel/tank[4]/unusable-gal_us
/consumables/fuel/tank[3]/level-norm lt 0.999
/consumables/fuel/tank[3]/level-norm lt 0.9999
</test>
</switch>

232
Systems/ecam-proprules.xml Normal file
View file

@ -0,0 +1,232 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
<PropertyList>
<flipflop>
<type>RS</type>
<S>
<property>/systems/electrical/some-electric-thingie/emer-elec-config-generator-1-bustie</property>
</S>
<R>
<not>
<property>/systems/electrical/some-electric-thingie/emer-elec-config</property>
</not>
</R>
<output>/systems/electrical/some-electric-thingie/generator-1-reset-bustie</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/systems/electrical/some-electric-thingie/emer-elec-config-generator-2-bustie</property>
</S>
<R>
<not>
<property>/systems/electrical/some-electric-thingie/emer-elec-config</property>
</not>
</R>
<output>/systems/electrical/some-electric-thingie/generator-2-reset-bustie</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/systems/electrical/some-electric-thingie/emer-elec-config-generator-1</property>
</S>
<R>
<not>
<property>/systems/electrical/some-electric-thingie/emer-elec-config</property>
</not>
</R>
<output>/systems/electrical/some-electric-thingie/generator-1-reset</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/systems/electrical/some-electric-thingie/emer-elec-config-generator-2</property>
</S>
<R>
<not>
<property>/systems/electrical/some-electric-thingie/emer-elec-config</property>
</not>
</R>
<output>/systems/electrical/some-electric-thingie/generator-2-reset</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/to-config-set</property>
</S>
<R>
<property>/ECAM/to-config-reset</property>
</R>
<output>/ECAM/to-config-flipflop</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/to-memo-set</property>
</S>
<R>
<property>/ECAM/to-memo-reset</property>
</R>
<output>/ECAM/to-memo-flipflop</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/ldg-memo-set</property>
</S>
<R>
<property>/ECAM/ldg-memo-reset</property>
</R>
<output>/ECAM/ldg-memo-flipflop</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/ldg-memo-2200-set</property>
</S>
<R>
<property>/ECAM/ldg-memo-2200-reset</property>
</R>
<output>/ECAM/ldg-memo-2200-flipflop</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/phases/flipflop/gear-set</property>
</S>
<R>
<property>/ECAM/phases/flipflop/gear-reset</property>
</R>
<output>/ECAM/phases/flipflop/gear-output</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/phases/flipflop/phase-2-set</property>
</S>
<R>
<property>/ECAM/phases/flipflop/phase-2-reset</property>
</R>
<output>/ECAM/phases/flipflop/phase-2-output</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/phases/flipflop/phase-10-set</property>
</S>
<R>
<property>/ECAM/phases/flipflop/phase-10-reset</property>
</R>
<output>/ECAM/phases/flipflop/phase-10-output</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/flipflop/recall-set</property>
</S>
<R>
<property>/ECAM/flipflop/recall-reset</property>
</R>
<output>/ECAM/flipflop/recall-output</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
<value>2.0</value>
</time>
<S>
<not>
<property>/ECAM/phases/speed-gt-80</property>
</not>
</S>
<output>/ECAM/phases/monostable-80kt</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
<value>300.0</value>
</time>
<S>
<property>/ECAM/phases/monostable/phase-1-300</property>
</S>
<output>/ECAM/phases/monostable/phase-1-output</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
<value>120.0</value>
</time>
<S>
<property>/ECAM/phases/monostable/phase-5</property>
</S>
<output>/ECAM/phases/monostable/phase-5-output</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
<value>180.0</value>
</time>
<S>
<property>/ECAM/phases/monostable/phase-7</property>
</S>
<output>/ECAM/phases/monostable/phase-7-output</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
<value>5.0</value>
</time>
<S>
<property>/ECAM/buttons/recall-status-normal</property>
</S>
<R>
<property>/ECAM/buttons/clear-btn</property>
</R>
<output>/ECAM/buttons/recall-status-normal-output</output>
</flipflop>
<!-- falling edge detector - take inverse of following -->
<flipflop>
<type>monostable</type>
<inverted type="bool">true</inverted>
<time>
<value>3.0</value>
</time>
<S>
<property>/ECAM/phases/monostable/phase-9</property>
</S>
<output>/ECAM/phases/monostable/phase-9-output</output>
</flipflop>
<flipflop>
<type>monostable</type>
<inverted type="bool">true</inverted>
<time>
<value>1.0</value>
</time>
<S>
<property>/ECAM/phases/to-power-set</property>
</S>
<output>/ECAM/phases/monostable/to-power-set-output</output>
</flipflop>
</PropertyList>

View file

@ -216,7 +216,7 @@
</and>
</condition>
</enable>
<input>/instrumentation/airspeed-indicator/indicated-speed-kt</input>
<input>/it-autoflight/internal/current-speed-input</input>
<reference>/it-autoflight/internal/kts</reference>
<output>/controls/engines/throttle-cmd-pid</output>
<config>
@ -340,7 +340,7 @@
</condition>
</enable>
<input>
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
<property>/it-autoflight/internal/current-mach-input</property>
<scale>1000.0</scale>
</input>
<reference>

View file

@ -9,30 +9,91 @@
<adf>
<name>adf</name>
<number>0</number>
<power-supply>/systems/electrical/bus/ac-ess-shed</power-supply>
<minimum-supply-volts>109.9</minimum-supply-volts>
</adf>
<adf>
<name>adf</name>
<number>1</number>
<power-supply>/systems/electrical/bus/ac-2</power-supply>
<minimum-supply-volts>109.9</minimum-supply-volts>
</adf>
<airspeed-indicator>
<name>airspeed-indicator</name>
<name>airspeed-indicator</name> <!-- standby, measure directly, not via ADR -->
<number>0</number>
<total-pressure>/systems/pitot/total-pressure-inhg</total-pressure>
<static-pressure>/systems/static/pressure-inhg</static-pressure>
<total-pressure>/systems/pitot[2]/measured-total-pressure-inhg</total-pressure>
<static-pressure>/systems/static[2]/pressure-inhg</static-pressure>
</airspeed-indicator>
<altimeter>
<name>altimeter</name>
<number>0</number>
<static-pressure>/systems/static/pressure-inhg</static-pressure>
<quantum>0</quantum>
<tau>0</tau>
<static-pressure>/systems/static[0]/pressure-inhg</static-pressure>
<quantum>1</quantum>
<tau>0.1</tau>
<encode-mode-c>1</encode-mode-c>
<encode-mode-s>1</encode-mode-s>
</altimeter>
<altimeter>
<name>altimeter</name>
<number>1</number>
<static-pressure>/systems/static[1]/pressure-inhg</static-pressure>
<quantum>1</quantum>
<tau>0.1</tau>
<encode-mode-c>1</encode-mode-c>
<encode-mode-s>1</encode-mode-s>
</altimeter>
<altimeter>
<name>altimeter</name>
<number>2</number>
<static-pressure>/systems/static[2]/pressure-inhg</static-pressure>
<quantum>1</quantum>
<tau>0.1</tau>
<encode-mode-c>1</encode-mode-c>
<encode-mode-s>1</encode-mode-s>
</altimeter>
<altimeter>
<name>altimeter</name>
<number>3</number>
<static-pressure>/systems/static[0]/pressure-inhg</static-pressure>
<quantum>1</quantum>
<tau>0.1</tau>
<encode-mode-c>1</encode-mode-c>
<encode-mode-s>1</encode-mode-s>
</altimeter>
<altimeter>
<name>altimeter</name>
<number>4</number>
<static-pressure>/systems/static[1]/pressure-inhg</static-pressure>
<quantum>1</quantum>
<tau>0.1</tau>
<encode-mode-c>1</encode-mode-c>
<encode-mode-s>1</encode-mode-s>
</altimeter>
<altimeter>
<name>altimeter</name>
<number>5</number>
<static-pressure>/systems/static[2]/pressure-inhg</static-pressure>
<quantum>1</quantum>
<tau>0.1</tau>
<encode-mode-c>1</encode-mode-c>
<encode-mode-s>1</encode-mode-s>
</altimeter>
<altimeter>
<name>altimeter</name> <!-- standby, measure directly, not via ADR -->
<number>6</number>
<static-pressure>/systems/static[2]/pressure-inhg</static-pressure>
<tau>0.1</tau>
</altimeter>
<attitude-indicator>
<name>attitude-indicator</name>
<number>0</number>
@ -65,21 +126,29 @@
<dme>
<name>dme</name>
<number>0</number>
<power-supply>/systems/electrical/bus/ac-ess-shed</power-supply>
<minimum-supply-volts>109.9</minimum-supply-volts>
</dme>
<dme>
<name>dme</name>
<number>1</number>
<power-supply>/systems/electrical/bus/ac-2</power-supply>
<minimum-supply-volts>109.9</minimum-supply-volts>
</dme>
<dme>
<dme> <!-- fake extra dme units for the ILS -->
<name>dme</name>
<number>2</number>
<power-supply>/systems/electrical/bus/ac-ess-shed</power-supply>
<minimum-supply-volts>109.9</minimum-supply-volts>
</dme>
<dme>
<name>dme</name>
<number>3</number>
<power-supply>/systems/electrical/bus/ac-2</power-supply>
<minimum-supply-volts>109.9</minimum-supply-volts>
</dme>
<altimeter>
@ -111,24 +180,39 @@
<number>0</number>
</magnetic-compass>
<nav-radio>
<marker-beacon> <!-- part of VOR1 unit -->
<name>marker-beacon</name>
<number>0</number>
<power-supply>/systems/electrical/bus/ac-ess-shed</power-supply>
<minimum-supply-volts>109.9</minimum-supply-volts>
</marker-beacon>
<nav-radio> <!-- VOR unit -->
<name>nav</name>
<number>0</number>
<power-supply>/systems/electrical/bus/ac-ess-shed</power-supply>
<minimum-supply-volts>109.9</minimum-supply-volts>
</nav-radio>
<nav-radio>
<name>nav</name>
<number>1</number>
<power-supply>/systems/electrical/bus/ac-2</power-supply>
<minimum-supply-volts>109.9</minimum-supply-volts>
</nav-radio>
<nav-radio>
<nav-radio> <!-- ILS unit -->
<name>nav</name>
<number>2</number>
<power-supply>/systems/electrical/bus/ac-ess-shed</power-supply>
<minimum-supply-volts>109.9</minimum-supply-volts>
</nav-radio>
<nav-radio>
<name>nav</name>
<number>3</number>
<power-supply>/systems/electrical/bus/ac-2</power-supply>
<minimum-supply-volts>109.9</minimum-supply-volts>
</nav-radio>
<slip-skid-ball>
@ -140,6 +224,8 @@
<name>transponder</name>
<number>0</number>
<mode>2</mode>
<encoder-path>/instrumentation/transponder/altimeter-input</encoder-path>
<airspeed-path>/instrumentation/transponder/airspeed-input</airspeed-path>
<mode-c-altitude>/instrumentation/encoder/mode-c-alt-ft</mode-c-altitude>
<mode-s-altitude>/instrumentation/encoder/mode-s-alt-ft</mode-s-altitude>
</transponder>
@ -175,6 +261,22 @@
<number>0</number>
</radar>
<radar-altimeter>
<name>radar-altimeter</name>
<number>0</number>
<update-interval-sec>0.0666</update-interval-sec>
<power-supply>/systems/electrical/bus/ac-1</power-supply>
<minimum-supply-volts>109.9</minimum-supply-volts>
</radar-altimeter>
<radar-altimeter>
<name>radar-altimeter</name>
<number>1</number>
<update-interval-sec>0.0666</update-interval-sec>
<power-supply>/systems/electrical/bus/ac-2</power-supply>
<minimum-supply-volts>109.9</minimum-supply-volts>
</radar-altimeter>
<tacan>
<name>tacan</name>
<number>0</number>

View file

@ -121,13 +121,121 @@
<expression>
<floor>
<div>
<abs><property>/instrumentation/altimeter/indicated-altitude-ft</property></abs>
<abs><property>/instrumentation/altimeter[0]/indicated-altitude-ft</property></abs>
<value>100</value>
</div>
</floor>
</expression>
</input>
<output>/instrumentation/altimeter/indicated-altitude-ft-pfd</output>
<output>/instrumentation/altimeter[0]/indicated-altitude-ft-pfd</output>
</filter>
<filter>
<name>Altitude PFD</name>
<type>gain</type>
<gain>1.0</gain>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<expression>
<floor>
<div>
<abs><property>/instrumentation/altimeter[1]/indicated-altitude-ft</property></abs>
<value>100</value>
</div>
</floor>
</expression>
</input>
<output>/instrumentation/altimeter[1]/indicated-altitude-ft-pfd</output>
</filter>
<filter>
<name>Altitude PFD</name>
<type>gain</type>
<gain>1.0</gain>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<expression>
<floor>
<div>
<abs><property>/instrumentation/altimeter[2]/indicated-altitude-ft</property></abs>
<value>100</value>
</div>
</floor>
</expression>
</input>
<output>/instrumentation/altimeter[2]/indicated-altitude-ft-pfd</output>
</filter>
<filter>
<name>Altitude PFD</name>
<type>gain</type>
<gain>1.0</gain>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<expression>
<floor>
<div>
<abs><property>/instrumentation/altimeter[3]/indicated-altitude-ft</property></abs>
<value>100</value>
</div>
</floor>
</expression>
</input>
<output>/instrumentation/altimeter[3]/indicated-altitude-ft-pfd</output>
</filter>
<filter>
<name>Altitude PFD</name>
<type>gain</type>
<gain>1.0</gain>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<expression>
<floor>
<div>
<abs><property>/instrumentation/altimeter[4]/indicated-altitude-ft</property></abs>
<value>100</value>
</div>
</floor>
</expression>
</input>
<output>/instrumentation/altimeter[4]/indicated-altitude-ft-pfd</output>
</filter>
<filter>
<name>Altitude PFD</name>
<type>gain</type>
<gain>1.0</gain>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<expression>
<floor>
<div>
<abs><property>/instrumentation/altimeter[5]/indicated-altitude-ft</property></abs>
<value>100</value>
</div>
</floor>
</expression>
</input>
<output>/instrumentation/altimeter[5]/indicated-altitude-ft-pfd</output>
</filter>
<filter>
<name>Altitude PFD</name>
<type>gain</type>
<gain>1.0</gain>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<expression>
<floor>
<div>
<abs><property>/instrumentation/altimeter[6]/indicated-altitude-ft</property></abs>
<value>100</value>
</div>
</floor>
</expression>
</input>
<output>/instrumentation/altimeter[6]/indicated-altitude-ft-pfd</output>
</filter>
<filter>

View file

@ -174,12 +174,46 @@
<input>
<expression>
<difference>
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
<property>/systems/navigation/adr/output/cas-1</property>
<value>30</value>
</difference>
</expression>
</input>
<output>/instrumentation/pfd/speed-minus-30</output>
<output>/instrumentation/pfd/speed-minus-30-1</output>
<min>0</min>
<max>390</max>
</filter>
<filter>
<name>Speed Predictor Input</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<expression>
<difference>
<property>/systems/navigation/adr/output/cas-2</property>
<value>30</value>
</difference>
</expression>
</input>
<output>/instrumentation/pfd/speed-minus-30-2</output>
<min>0</min>
<max>390</max>
</filter>
<filter>
<name>Speed Predictor Input</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<expression>
<difference>
<property>/systems/navigation/adr/output/cas-3</property>
<value>30</value>
</difference>
</expression>
</input>
<output>/instrumentation/pfd/speed-minus-30-3</output>
<min>0</min>
<max>390</max>
</filter>
@ -193,12 +227,57 @@
<filter-gain>0.01</filter-gain>
</predict-simple>
<predict-simple>
<name>Speed Predictor (Smoothed)</name>
<debug>false</debug>
<input>/instrumentation/pfd/speed-minus-30-1</input>
<output>/instrumentation/pfd/speed-lookahead-cmd-1</output>
<seconds>10.0</seconds>
<filter-gain>0.01</filter-gain>
</predict-simple>
<predict-simple>
<name>Speed Predictor (Smoothed)</name>
<debug>false</debug>
<input>/instrumentation/pfd/speed-minus-30-2</input>
<output>/instrumentation/pfd/speed-lookahead-cmd-2</output>
<seconds>10.0</seconds>
<filter-gain>0.01</filter-gain>
</predict-simple>
<predict-simple>
<name>Speed Predictor (Smoothed)</name>
<debug>false</debug>
<input>/instrumentation/pfd/speed-minus-30-3</input>
<output>/instrumentation/pfd/speed-lookahead-cmd-3</output>
<seconds>10.0</seconds>
<filter-gain>0.01</filter-gain>
</predict-simple>
<filter>
<name>Speed Predictor Exponential</name>
<debug>false</debug>
<type>exponential</type>
<input>/instrumentation/pfd/speed-lookahead-cmd</input>
<output>/instrumentation/pfd/speed-lookahead</output>
<input>/instrumentation/pfd/speed-lookahead-cmd-1</input>
<output>/instrumentation/pfd/speed-lookahead-1</output>
<filter-time>0.32</filter-time>
</filter>
<filter>
<name>Speed Predictor Exponential</name>
<debug>false</debug>
<type>exponential</type>
<input>/instrumentation/pfd/speed-lookahead-cmd-2</input>
<output>/instrumentation/pfd/speed-lookahead-2</output>
<filter-time>0.32</filter-time>
</filter>
<filter>
<name>Speed Predictor Exponential</name>
<debug>false</debug>
<type>exponential</type>
<input>/instrumentation/pfd/speed-lookahead-cmd-3</input>
<output>/instrumentation/pfd/speed-lookahead-3</output>
<filter-time>0.32</filter-time>
</filter>

57
Systems/pitot-static.xml Normal file
View file

@ -0,0 +1,57 @@
<?xml version="1.0"?>
<PropertyList>
<pitot>
<name>pitot</name>
<number>0</number>
</pitot>
<pitot>
<name>pitot</name>
<number>1</number>
</pitot>
<pitot>
<name>pitot</name>
<number>2</number>
</pitot>
<static>
<name>static</name>
<number>0</number>
<tau>0.7</tau>
<type>1</type>
<error-factor>0.43</error-factor>
</static>
<static>
<name>static</name>
<number>1</number>
<tau>0.7</tau>
<type>1</type>
<error-factor>0.42</error-factor>
</static>
<static>
<name>static</name>
<number>2</number>
<tau>0.7</tau>
<type>1</type>
<error-factor>0.45</error-factor>
</static>
<vacuum> <!-- todo get property based on elec -->
<name>vacuum</name>
<number>0</number>
<rpm>/engines/engine[0]/rpm</rpm>
<scale>1.0</scale>
</vacuum>
<vacuum>
<name>vacuum</name>
<number>1</number>
<rpm>/engines/engine[1]/rpm</rpm>
<scale>1.0</scale>
</vacuum>
</PropertyList>

Some files were not shown because too many files have changed in this diff Show more