1
0
Fork 0

Merge branch '3D' into 3D-canvas

This commit is contained in:
fly 2020-11-13 09:34:26 +11:00
commit 4954a43ded
136 changed files with 73658 additions and 60686 deletions

View file

@ -6,11 +6,54 @@
<PropertyList include="Aircraft/Generic/Human/Include/walker-include.xml">
<sim>
<animation>
<fire-services type="bool">0</fire-services>
</animation>
<author>Josh Davidson/Octal450 (Flight Dynamics, Systems, Displays), Jonathan Redpath/legoboyvdlp, merspieler, Matthew Maring/mattmaring (Systems, Displays), Thorsten Herrmann/TH-555, Semir Gebran/CaptB (3D, Textures)</author>
<authors>
<author>
<name>Josh Davidson</name>
<description>Flight Dynamics, Systems, Displays</description>
<nick>Octal450</nick>
</author>
<author>
<name>Jonathan Redpath</name>
<description>Systems, Displays, FMGC</description>
<nick>legoboyvdlp</nick>
</author>
<author>
<name>merspieler</name>
<description>Systems, Displays</description>
</author>
<author>
<name>Matthew Maring</name>
<description>Fuel predictions, FMGC</description>
<nick>mattmaring</nick>
</author>
<author>
<name>Thorsten Herrmann</name>
<description>Cockpit 3D model</description>
<nick>TH-555</nick>
</author>
<author>
<name>Semir Gebran</name>
<description>3D model</description>
<nick>CaptB</nick>
</author>
<author>
<name>vezza</name>
<description>Systems, Displays</description>
</author>
</authors>
<checklists include="A32X-Checklists.xml"/>
<status>Pre V1.0</status>
<description>Airbus A320</description>
<long-description>The Airbus A320 is a family of narrow body airliners built by Airbus Industrie. First flown in 1987,
the aircraft is the most produced airliner ever, with over 9,500 built to date. It was one of the first airliners
to use digital flight controls and fly by wire, and a fully glass cockpit.</long-description>
<hud n="0">
<enable3d n="0">false</enable3d>
@ -112,32 +155,37 @@
<preview>
<type>exterior</type>
<splash type="bool">true</splash>
<path>Splash/cockpit.png</path>
<path>Aircraft/A320-family/Splash/cockpit.png</path>
</preview>
<preview>
<type>exterior</type>
<splash type="bool">true</splash>
<path>Splash/cockpit2.png</path>
<path>Aircraft/A320-family/Splash/cockpit2.png</path>
</preview>
<preview>
<type>exterior</type>
<splash type="bool">true</splash>
<path>Splash/cockpit3.png</path>
<path>Aircraft/A320-family/Splash/cockpit3.png</path>
</preview>
<preview>
<type>exterior</type>
<splash type="bool">true</splash>
<path>Splash/wing1.png</path>
<path>Aircraft/A320-family/Splash/wing1.png</path>
</preview>
<preview>
<type>exterior</type>
<splash type="bool">true</splash>
<path>Splash/wing2.png</path>
<path>Aircraft/A320-family/Splash/wing2.png</path>
</preview>
<preview>
<type>exterior</type>
<splash type="bool">true</splash>
<path>Splash/wing3.png</path>
<path>Aircraft/A320-family/Splash/ext1.png</path>
</preview>
<preview>
<type>exterior</type>
<splash type="bool">true</splash>
<path>Aircraft/A320-family/Splash/ext2.png</path>
</preview>
</previews>
@ -148,6 +196,8 @@
<model type="int">4</model>
</rating>
<status>Pre V1.0</status>
<tags>
<tag>transport</tag>
<tag>airbus</tag>
@ -163,6 +213,13 @@
<tag>2-engine</tag>
</tags>
<urls>
<home-page>http://wiki.flightgear.org/Airbus_A320_Family</home-page>
<support>https://forum.flightgear.org</support>
<wikipedia>https://en.wikipedia.org/wiki/Airbus_A320_family</wikipedia>
<code-repository>https://github.com/legoboyvdlp/A320-family</code-repository>
</urls>
<systems n="0">
<electrical>
<path></path>
@ -205,11 +262,6 @@
<autopilot n="13">
<path>Aircraft/A320-family/Systems/ecam-proprules.xml</path>
</autopilot>
<wingflexer include="Systems/wingflexer-params.xml"/>
<property-rule n="100">
<name>Generic Wing Flexer</name>
<path>Aircraft/Generic/wingflexer.xml</path>
</property-rule>
<path>Aircraft/A320-family/Systems/pitot-static.xml</path>
</systems>
@ -227,6 +279,7 @@
<oh-btn type="bool">0</oh-btn>
<switch1 type="bool">0</switch1>
<flaps-click type="bool">0</flaps-click>
<pushbutton type="bool">0</pushbutton>
<spdbrk-click type="bool">0</spdbrk-click>
<relay-batt-1 type="bool">0</relay-batt-1>
<relay-batt-2 type="bool">0</relay-batt-2>
@ -474,6 +527,15 @@
<value>1</value>
</binding>
</item>
<item>
<label>Canvas QRH</label>
<binding>
<command>nasal</command>
<script>
canvas_qrh.createCanvasQRH();
</script>
</binding>
</item>
</menu>
</default>
</menubar>
@ -520,8 +582,33 @@
</current-view>
<minimum-fg-version>2019.2.0</minimum-fg-version>
<navdb>
<min-runway-length-ft>3000</min-runway-length-ft>
</navdb>
</sim>
<aircraft>
<icao>
<wake-turbulence-category>M</wake-turbulence-category>
<type type="string">A320</type>
<equipment type="string">SDE2FGHIRWXY</equipment>
<surveillance type="string">S</surveillance>
</icao>
<performance>
<minimum>
<takeoff-length-ft type="int">4500</takeoff-length-ft>
<landing-length-ft type="int">4500</landing-length-ft>
</minimum>
<maximum>
<altitude-ft type="int">41000</altitude-ft>
<mach type="double">0.82</mach>
<airspeed-knots type="int">350</airspeed-knots>
</maximum>
</performance>
</aircraft>
<consumables>
<fuel>
<tank n="0">
@ -551,6 +638,39 @@
</fuel>
</consumables>
<ECAM>
<Upper>
<FlapX type="double">0</FlapX>
<FlapY type="double">0</FlapY>
<SlatX type="double">0</SlatX>
<SlatY type="double">0</SlatY>
<FlapXtrans type="double">0</FlapXtrans>
<FlapYtrans type="double">0</FlapYtrans>
<SlatXtrans type="double">0</SlatXtrans>
<SlatYtrans type="double">0</SlatYtrans>
</Upper>
<msg>
<line1 type="string"></line1>
<line2 type="string"></line2>
<line3 type="string"></line3>
<line4 type="string"></line4>
<line5 type="string"></line5>
<line6 type="string"></line6>
<line7 type="string"></line7>
<line8 type="string"></line8>
</msg>
<rightmsg>
<line1 type="string"></line1>
<line2 type="string"></line2>
<line3 type="string"></line3>
<line4 type="string"></line4>
<line5 type="string"></line5>
<line6 type="string"></line6>
<line7 type="string"></line7>
<line8 type="string"></line8>
</rightmsg>
</ECAM>
<environment>
<aircraft-effects>
<frost-inch type="double">0</frost-inch>
@ -727,6 +847,9 @@
</electrical>
<engines>
<engine-start-switch type="int">1</engine-start-switch>
<epr-limit type="double">0.0</epr-limit>
<n1-limit type="double">0.0</n1-limit>
<thrust-limit type="string">TOGA</thrust-limit>
<engine n="0">
<cutoff type="bool">true</cutoff>
<cutoff-switch type="bool">true</cutoff-switch>
@ -739,6 +862,11 @@
<max-athr-thrust type="double">0.94</max-athr-thrust>
<throttle-output type="double">0</throttle-output>
<throttle-fdm type="double">0</throttle-fdm>
<throttle-rev type="double">0</throttle-rev>
<reverser type="double">0</reverser>
<igniter-a type="bool">0</igniter-a>
<igniter-b type="bool">0</igniter-b>
<last-igniter type="string">B</last-igniter>
</engine>
<engine n="1">
<cutoff type="bool">true</cutoff>
@ -752,6 +880,11 @@
<max-athr-thrust type="double">0.94</max-athr-thrust>
<throttle-output type="double">0</throttle-output>
<throttle-fdm type="double">0</throttle-fdm>
<throttle-rev type="double">0</throttle-rev>
<reverser type="double">0</reverser>
<igniter-a type="bool">0</igniter-a>
<igniter-b type="bool">0</igniter-b>
<last-igniter type="string">B</last-igniter>
</engine>
<engine n="2">
<cutoff type="bool">true</cutoff>
@ -809,6 +942,7 @@
</refuel>
</fuel>
<gear>
<brake-fans type="bool">0</brake-fans>
<brake-parking type="bool">0</brake-parking>
<tiller-cmd-norm type="double">0</tiller-cmd-norm>
<tiller-enabled type="bool">0</tiller-enabled>
@ -843,6 +977,7 @@
<du4 type="double">1</du4>
<du5 type="double">1</du5>
<du6 type="double">1</du6>
<iesi type="double">1</iesi>
<mcdu1 type="double">1</mcdu1>
<mcdu2 type="double">1</mcdu2>
<dcdul type="double">1</dcdul>
@ -920,8 +1055,8 @@
<eng2-manstart type="bool">0</eng2-manstart>
<eng1-n1 type="bool">0</eng1-n1>
<eng2-n1 type="bool">0</eng2-n1>
<IDG1 type="bool">0</IDG1>
<IDG2 type="bool">0</IDG2>
<idg1 type="bool">0</idg1>
<idg2 type="bool">0</idg2>
<maskman type="bool">0</maskman>
<ramair type="bool">0</ramair>
<ratman type="bool">0</ratman>
@ -1013,12 +1148,18 @@
<caster-angle-deg-damped type="double">0</caster-angle-deg-damped>
</gear>
<gear n="1">
<Lbrake-smoke type="double">0</Lbrake-smoke>
<L1brake-temp-degc type="double">15</L1brake-temp-degc>
<L2brake-temp-degc type="double">15</L2brake-temp-degc>
<tyre-smoke type="int">0</tyre-smoke>
<sprayspeed-ms type="double">0</sprayspeed-ms>
<spray-density type="double">0</spray-density>
<caster-angle-deg-damped type="double">0</caster-angle-deg-damped>
</gear>
<gear n="2">
<Rbrake-smoke type="double">0</Rbrake-smoke>
<R3brake-temp-degc type="double">15</R3brake-temp-degc>
<R4brake-temp-degc type="double">15</R4brake-temp-degc>
<tyre-smoke type="int">0</tyre-smoke>
<sprayspeed-ms type="double">0</sprayspeed-ms>
<spray-density type="double">0</spray-density>
@ -1082,6 +1223,10 @@
<transponder-code type="string">2000</transponder-code>
<failed type="bool">0</failed>
</atc>
<atsu>
<atis-server type="string">faa</atis-server>
<wxr-server type="string">faa</wxr-server>
</atsu>
<apu>
<oil>
<level-l type="double">5.4</level-l>
@ -1106,6 +1251,7 @@
</comm>
<electrical n="0">
<bus>
<ac-ess type="double">0</ac-ess>
<dc-1 type="double">0</dc-1>
<dc-2 type="double">0</dc-2>
</bus>
@ -1129,6 +1275,12 @@
</bat-2>
</sources>
</electrical>
<fadec>
<n1mode1 type="bool">0</n1mode1>
<n1mode2 type="bool">0</n1mode2>
</fadec>
<failures n="0">
<aileron-left type="bool">0</aileron-left>
<aileron-right type="bool">0</aileron-right>
@ -1176,6 +1328,7 @@
<right-tank-pump-1 type="bool">0</right-tank-pump-1>
<right-tank-pump-2 type="bool">0</right-tank-pump-2>
</fuel>
<gear type="bool">0</gear>
<hydraulic>
<blue-edp type="bool">0</blue-edp>
<blue-elec type="bool">0</blue-elec>
@ -1229,6 +1382,7 @@
<cargo-fwd-fire type="bool">0</cargo-fwd-fire>
<cargo-aft-fire type="bool">0</cargo-aft-fire>
</failures>
<fctl n="0">
<elac1 type="bool">0</elac1>
<elac2 type="bool">0</elac2>
@ -1239,6 +1393,7 @@
<fac2 type="bool">0</fac2>
<yawdamper-active type="bool">0</yawdamper-active>
</fctl>
<fire n="0">
<apu>
<temperature type="double">0</temperature>
@ -1286,6 +1441,7 @@
<fuel-used-2 type="double">0</fuel-used-2>
<mode-fault type="bool">0</mode-fault>
</fuel>
<hydraulic n="0">
<sources>
<ptu>
@ -1368,6 +1524,7 @@
</pneumatics>
<pressurization>
<cabinalt-norm type="double">0</cabinalt-norm>
<cabinpsi type="double">14.7</cabinpsi>
<ditchingpb type="double">14.7</ditchingpb>
</pressurization>
@ -1395,6 +1552,23 @@
<serviceable type="bool">1</serviceable>
</static>
<thrust>
<alpha-floor type="bool">0</alpha-floor>
<clbreduc-ft type="double">1500</clbreduc-ft>
<eng-out type="bool">0</eng-out>
<lim-flex type="bool">0</lim-flex>
<lvrclb type="bool">0</lvrclb>
<state1 type="string">IDLE</state1>
<state2 type="string">IDLE</state2>
<toga-lk type="bool">0</toga-lk>
<thr-locked type="bool">0</thr-locked>
<thr-locked-alert type="bool">0</thr-locked-alert>
<thr-lock-cmd n="0" type="double">0</thr-lock-cmd>
<thr-lock-cmd n="1" type="double">0</thr-lock-cmd>
<thr-locked-flash type="bool">0</thr-locked-flash>
<thr-locked-time type="double">0</thr-locked-time>
</thrust>
<navigation>
<aligned-1 type="bool">0</aligned-1>
<aligned-2 type="bool">0</aligned-2>
@ -1550,6 +1724,10 @@
<range type="double">1.0</range>
</groundradar>
<iesi>
<att-reset-cmd type="bool">false</att-reset-cmd>
</iesi>
<marker-beacon n="0">
<serviceable type="bool">true</serviceable>
</marker-beacon>
@ -1699,6 +1877,10 @@
<max-range-m type="int">1219</max-range-m>
<serviceable type="bool">true</serviceable>
</radar-altimeter>
<wxr>
<enabled type="bool">false</enabled>
</wxr>
</instrumentation>
<modes>
@ -4230,6 +4412,9 @@
</options>
<nasal>
<notifications>
<file>Aircraft/A320-family/Nasal/emesary/M_frame_notification.nas</file>
</notifications>
<pts>
<file>Aircraft/A320-family/Nasal/Libraries/property-tree-setup.nas</file>
</pts>
@ -4292,21 +4477,22 @@
</fmgc>
<mcdu>
<file>Aircraft/A320-family/Nasal/MCDU/DUPLICATE.nas</file> <!-- dynamic page - init before others as used in various pages -->
<file>Aircraft/A320-family/Nasal/MCDU/DIRTO.nas</file> <!-- dynamic page - init before MCDU -->
<file>Aircraft/A320-family/Nasal/MCDU/LATREV.nas</file> <!-- dynamic page - init before MCDU -->
<file>Aircraft/A320-family/Nasal/MCDU/VERTREV.nas</file> <!-- dynamic page - init before MCDU -->
<file>Aircraft/A320-family/Nasal/MCDU/DEPARTURE.nas</file> <!-- dynamic page - init before MCDU -->
<file>Aircraft/A320-family/Nasal/MCDU/ARRIVAL.nas</file> <!-- dynamic page - init before MCDU -->
<file>Aircraft/A320-family/Nasal/MCDU/AIRWAYS.nas</file> <!-- dynamic page - init before MCDU -->
<file>Aircraft/A320-family/Nasal/MCDU/CLOSESTAIRPORT.nas</file> <!-- dynamic page - init before MCDU -->
<file>Aircraft/A320-family/Nasal/MCDU/RECEIVEDMESSAGES.nas</file> <!-- dynamic page - init before MCDU -->
<file>Aircraft/A320-family/Nasal/MCDU/PILOTWAYPOINT.nas</file> <!-- dynamic page - init before MCDU -->
<file>Aircraft/A320-family/Nasal/MCDU/HOLD.nas</file> <!-- dynamic page - init before MCDU -->
<file>Aircraft/A320-family/Nasal/MCDU/F-PLN.nas</file> <!-- dynamic page - init before MCDU -->
<file>Aircraft/A320-family/Nasal/MCDU/WINDCLB.nas</file> <!-- dynamic page - init before MCDU -->
<file>Aircraft/A320-family/Nasal/MCDU/WINDCRZ.nas</file> <!-- dynamic page - init before MCDU -->
<file>Aircraft/A320-family/Nasal/MCDU/WINDDES.nas</file> <!-- dynamic page - init before MCDU -->
<file>Aircraft/A320-family/Nasal/MCDU/WINDHIST.nas</file> <!-- dynamic page - init before MCDU -->
<file>Aircraft/A320-family/Nasal/MCDU/DIRTO.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/LATREV.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/VERTREV.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/DEPARTURE.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/ARRIVAL.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/AIRWAYS.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/CLOSESTAIRPORT.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/RECEIVEDMESSAGES.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/PILOTWAYPOINT.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/HOLD.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/F-PLN.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/WINDCLB.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/WINDCRZ.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/WINDDES.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/WINDHIST.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/ATIS.nas</file> <!-- Last Dynamic Page -->
<file>Aircraft/A320-family/Nasal/MCDU/MCDU.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/INITA.nas</file>
<file>Aircraft/A320-family/Nasal/MCDU/IRSINIT.nas</file>
@ -4336,6 +4522,7 @@
<file>Aircraft/A320-family/Models/Instruments/ND/canvas/ND.nas</file>
</canvas_nd>
<canvas_ecam>
<file>Aircraft/A320-family/Nasal/emesary/exec.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Upper-ECAM/Upper-ECAM.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM.nas</file>
</canvas_ecam>
@ -4351,6 +4538,9 @@
<canvas_qnh>
<file>Aircraft/A320-family/Nasal/Displays/CanvasQNH.nas</file>
</canvas_qnh>
<canvas_qrh>
<file>Aircraft/A320-family/Nasal/QRH/QRH.nas</file>
</canvas_qrh>
<mcdu_scratchpad> <!-- delay till after canvas mcdu -->
<file>Aircraft/A320-family/Nasal/FMGC/mcdu-messages.nas</file>
</mcdu_scratchpad>
@ -4378,6 +4568,7 @@
<file>Aircraft/A320-family/Nasal/Panels/atc.nas</file>
</atc>
<atsu>
<file>Aircraft/A320-family/Nasal/Systems/Comm/Dictionary.nas</file>
<file>Aircraft/A320-family/Nasal/Systems/Comm/Notification.nas</file>
</atsu>
<dmc>

View file

@ -76,6 +76,8 @@ setprop("/systems/acconfig/options/keyboard-mode", 0);
setprop("/systems/acconfig/options/weight-kgs", 0);
setprop("/systems/acconfig/options/adirs-skip", 0);
setprop("/systems/acconfig/options/allow-oil-consumption", 0);
setprop("/systems/acconfig/options/atis-server", "faa");
setprop("/systems/acconfig/options/wxr-server", "noaa");
setprop("/systems/acconfig/options/welcome-skip", 0);
setprop("/systems/acconfig/options/no-rendering-warn", 0);
setprop("/systems/acconfig/options/save-state", 0);
@ -232,6 +234,8 @@ var readSettings = func {
setprop("/sim/model/autopush/route/show-wingtip", getprop("/systems/acconfig/options/autopush/show-wingtip"));
setprop("/options/system/fo-view", getprop("/systems/acconfig/options/fo-view"));
setprop("/FMGC/simbrief-username", getprop("/systems/acconfig/options/simbrief-username"));
setprop("/systems/atsu/atis-server", getprop("/systems/acconfig/options/atis-server"));
setprop("/systems/atsu/wxr-server", getprop("/systems/acconfig/options/wxr-server"));
}
var writeSettings = func {
@ -244,6 +248,8 @@ var writeSettings = func {
setprop("/systems/acconfig/options/autopush/show-wingtip", getprop("/sim/model/autopush/route/show-wingtip"));
setprop("/systems/acconfig/options/fo-view", getprop("/options/system/fo-view"));
setprop("/systems/acconfig/options/simbrief-username", getprop("/FMGC/simbrief-username"));
setprop("/systems/acconfig/options/atis-server", getprop("/systems/atsu/atis-server"));
setprop("/systems/acconfig/options/wxr-server", getprop("/systems/atsu/wxr-server"));
io.write_properties(getprop("/sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options");
}
@ -513,7 +519,7 @@ var takeoff = func {
# The same as taxi, except we set some things afterwards.
taxi();
var eng_one_chk_c = setlistener("/engines/engine[0]/state", func {
if (getprop("/engines/engine[0]/state") == 3) {
if (pts.Engines.Engine.state[0].getValue() == 3) {
removelistener(eng_one_chk_c);
setprop("/controls/switches/strobe", 1.0);
setprop("/controls/lighting/taxi-light-switch", 1);

View file

@ -74,6 +74,10 @@
<halign>left</halign>
<label>If you have a NAVIGRAPH subcription, we reccomend to load them in the MCDU instead of here.</label>
</text>
<text>
<halign>left</halign>
<label>Minimum FGFS version for use of this feature (due to bugs in prior versions) is 2020.1.3.</label>
</text>
<group>
<layout>hbox</layout>
<text>
@ -85,7 +89,29 @@
<legend>Load flightplan</legend>
<equal>true</equal>
<enable>
<and>
<property>FMGC/internal/tofrom-set</property>
<not>
<or>
<equals>
<property>/sim/version/flightgear</property>
<value>2019.2.0</value>
</equals>
<equals>
<property>/sim/version/flightgear</property>
<value>2020.1.0</value>
</equals>
<equals>
<property>/sim/version/flightgear</property>
<value>2020.1.1</value>
</equals>
<equals>
<property>/sim/version/flightgear</property>
<value>2020.1.2</value>
</equals>
</or>
</not>
</and>
</enable>
<binding>
<command>nasal</command>

View file

@ -243,7 +243,7 @@
</checkbox>
<!-- TODO Comment back in, when fully implemented -->
<!-- checkbox>
<checkbox>
<label>Weight in KG</label>
<halign>left</halign>
<property>/options/system/weight-kgs</property>
@ -261,7 +261,7 @@
</script>
</binding>
<live>true</live>
</checkbox -->
</checkbox>
<checkbox>
<label>ADIRS Aligns Instantly</label>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 KiB

After

Width:  |  Height:  |  Size: 495 KiB

View file

@ -73,7 +73,7 @@
<offsets>
<x-m>-7.432</x-m>
<y-m>-5.63029</y-m>
<z-m>-2.16465</z-m>
<z-m>-2.76465</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
@ -104,7 +104,7 @@
<offsets>
<x-m>-7.432</x-m>
<y-m> 5.63029</y-m>
<z-m>-2.16465</z-m>
<z-m>-2.76465</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View file

@ -6159,9 +6159,8 @@
<button>3</button>
<repeatable>true</repeatable>
<binding>
<command>property-adjust</command>
<property>controls/flight/elevator-trim</property>
<step>0.01</step>
<command>nasal</command>
<script>libraries.slewPitchWheel(1);</script>
</binding>
</action>
<action>
@ -6169,9 +6168,8 @@
<button>4</button>
<repeatable>true</repeatable>
<binding>
<command>property-adjust</command>
<property>controls/flight/elevator-trim</property>
<step>-0.01</step>
<command>nasal</command>
<script>libraries.slewPitchWheel(-1);</script>
</binding>
</action>
</animation>
@ -7238,6 +7236,128 @@
<object-name>iesi_btn_rst</object-name>
</effect>
<animation>
<type>pick</type>
<object-name>iesi_btn_rst</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/instrumentation/iesi/att-reset-cmd</property>
<value>1</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/instrumentation/iesi/att-reset-cmd</property>
<value>0</value>
</binding>
</mod-up>
</action>
</animation>
<animation>
<type>translate</type>
<object-name>iesi_btn_rst</object-name>
<property>/instrumentation/iesi/att-reset-cmd</property>
<factor>0.0025</factor>
<axis>
<x1-m>-0.53312</x1-m>
<y1-m>-0.16166</y1-m>
<z1-m>0.16956</z1-m>
<x2-m>-0.53977</x2-m>
<y2-m>-0.16166</y2-m>
<z2-m>0.16765</z2-m>
</axis>
</animation>
<animation>
<type>pick</type>
<object-name>iesi_btn_plus</object-name>
<action>
<button>0</button>
<repeatable>true</repeatable>
<binding>
<command>property-assign</command>
<property>/instrumentation/iesi/plus</property>
<value>1</value>
</binding>
<binding>
<command>property-adjust</command>
<property>controls/lighting/DU/iesi</property>
<step>0.05</step>
<min>0</min>
<max>1</max>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/instrumentation/iesi/plus</property>
<value>0</value>
</binding>
</mod-up>
</action>
</animation>
<animation>
<type>translate</type>
<object-name>iesi_btn_plus</object-name>
<property>/instrumentation/iesi/plus</property>
<factor>0.0025</factor>
<axis>
<x1-m>-0.53312</x1-m>
<y1-m>-0.16166</y1-m>
<z1-m>0.16956</z1-m>
<x2-m>-0.53977</x2-m>
<y2-m>-0.16166</y2-m>
<z2-m>0.16765</z2-m>
</axis>
</animation>
<animation>
<type>pick</type>
<object-name>iesi_btn_minus</object-name>
<action>
<button>0</button>
<repeatable>true</repeatable>
<binding>
<command>property-assign</command>
<property>/instrumentation/iesi/minus</property>
<value>1</value>
</binding>
<binding>
<command>property-adjust</command>
<property>controls/lighting/DU/iesi</property>
<step>-0.05</step>
<min>0</min>
<max>1</max>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>/instrumentation/iesi/minus</property>
<value>0</value>
</binding>
</mod-up>
</action>
</animation>
<animation>
<type>translate</type>
<object-name>iesi_btn_minus</object-name>
<property>/instrumentation/iesi/minus</property>
<factor>0.0025</factor>
<axis>
<x1-m>-0.53312</x1-m>
<y1-m>-0.16166</y1-m>
<z1-m>0.16956</z1-m>
<x2-m>-0.53977</x2-m>
<y2-m>-0.16166</y2-m>
<z2-m>0.16765</z2-m>
</axis>
</animation>
<effect>
<inherits-from>Aircraft/A320-family/Models/Effects/clock</inherits-from>
<!-- <object-name>clock</object-name>-->
@ -8813,4 +8933,48 @@
</action>
</animation>
<!-- WX Radar -->
<animation>
<type>pick</type>
<object-name>radar_sys</object-name>
<action>
<button>0</button>
<repeatable>true</repeatable>
<binding>
<command>property-toggle</command>
<property>/instrumentation/efis[0]/inputs/wxr</property>
</binding>
<binding>
<command>property-toggle</command>
<property>/instrumentation/efis[1]/inputs/wxr</property>
</binding>
<binding>
<command>property-toggle</command>
<property>/instrumentation/wxr/enabled</property>
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/switch1", 1);</script>
</binding>
</action>
</animation>
<animation>
<type>rotate</type>
<object-name>radar_sys</object-name>
<factor>-20</factor>
<property>/instrumentation/wxr/enabled</property>
<center>
<x-m>0.020282</x-m>
<y-m>-0.210647</y-m>
<z-m>-0.140496</z-m>
</center>
<axis>
<x>1</x>
<y>0</y>
<z>0</z>
</axis>
</animation>
</PropertyList>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 KiB

After

Width:  |  Height:  |  Size: 534 KiB

View file

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 127 KiB

View file

@ -72787,7 +72787,7 @@ name "ecam_glare_down"
data 15
CU1_curve_.1252
crease 40.0
texture "ECAM_glare.png"
texture "ecam_glare_tex.png"
texrep 1 1
numvert 8
-0.40392 -0.06108 -0.10745
@ -72819,7 +72819,7 @@ name "ecam_glare_up"
data 15
CU1_curve_.1253
crease 40.0
texture "ECAM_glare.png"
texture "ecam_glare_tex.png"
texrep 1 1
numvert 4
-0.40892 -0.06801 0.10755

View file

@ -100,6 +100,16 @@
<object-name>MLGFittingR</object-name>
<object-name>SideStayL1</object-name>
<object-name>SideStayR1</object-name>
<object-name>SpoilerActuatorRodL5</object-name>
<object-name>SpoilerActuatorRodL4</object-name>
<object-name>SpoilerActuatorRodL3</object-name>
<object-name>SpoilerActuatorRodL2</object-name>
<object-name>SpoilerActuatorRodL1</object-name>
<object-name>SpoilerActuatorRodR5</object-name>
<object-name>SpoilerActuatorRodR4</object-name>
<object-name>SpoilerActuatorRodR3</object-name>
<object-name>SpoilerActuatorRodR2</object-name>
<object-name>SpoilerActuatorRodR1</object-name>
</effect>
@ -252,7 +262,9 @@
<animation>
<type>rotate</type>
<object-name>NLGFitting</object-name>
<object-name>NLGFitting.Placards</object-name>
<object-name>NLGFittingLower</object-name>
<object-name>NLGFittingLower.Placards</object-name>
<object-name>NLGFittingPanel</object-name>
<object-name>NLGSlidingTubeAxle</object-name>
<object-name>NLGWheels</object-name>
@ -347,6 +359,7 @@
<animation>
<type>rotate</type>
<object-name>MLGFittingL</object-name>
<object-name>MLGFittingL.Placards</object-name>
<object-name>MLGWheelsL</object-name>
<object-name>MLGCablesL1</object-name>
<object-name>MLGCablesL2</object-name>
@ -683,6 +696,7 @@
<animation>
<type>rotate</type>
<object-name>MLGFittingR</object-name>
<object-name>MLGFittingR.Placards</object-name>
<object-name>MLGWheelsR</object-name>
<object-name>MLGCablesR1</object-name>
<object-name>MLGCablesR2</object-name>
@ -1012,6 +1026,7 @@
<object-name>NLGSlidingTubeAxle</object-name>
<object-name>NLGWheels</object-name>
<object-name>NLGFittingLower</object-name>
<object-name>NLGFittingLower.Placards</object-name>
<object-name>NLGTorqueLink1</object-name>
<property>sim/multiplay/generic/float[1]</property>
<factor>75</factor>
@ -2221,6 +2236,44 @@
<z2-m>-0.854871</z2-m>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>SpoilerActuatorR1</object-name>
<property>fdm/jsbsim/hydraulics/spoiler-r1/final-deg</property>
<factor>0.675</factor>
<axis>
<x1-m>-1.23482</x1-m>
<y1-m>5.41613</y1-m>
<z1-m>-0.827841</z1-m>
<x2-m>-1.22903</x2-m>
<y2-m>5.26015</y2-m>
<z2-m>-0.851441</z2-m>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>SpoilerActuatorRodR1</object-name>
<property>fdm/jsbsim/hydraulics/spoiler-r1/final-deg</property>
<interpolation>
<entry><ind>0.0</ind><dep> -0.020</dep></entry>
<entry><ind>10.0</ind><dep>-0.008</dep></entry>
<entry><ind>20.0</ind><dep> 0.004</dep></entry>
<entry><ind>30.0</ind><dep> 0.016</dep></entry>
<entry><ind>40.0</ind><dep> 0.024</dep></entry>
<entry><ind>50.0</ind><dep> 0.033</dep></entry>
</interpolation>
<axis>
<x1-m>-1.16562</x1-m>
<y1-m>5.33617</y1-m>
<z1-m>-0.810292</z1-m>
<x2-m>-1.04003</x2-m>
<y2-m>5.33242</y2-m>
<z2-m>-0.754702</z2-m>
</axis>
</animation>
<animation>
<name>Right spoiler 2</name>
<type>rotate</type>
@ -2236,6 +2289,44 @@
<z2-m>-0.557443</z2-m>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>SpoilerActuatorR2</object-name>
<property>fdm/jsbsim/hydraulics/spoiler-r2/final-deg</property>
<factor>0.80</factor>
<axis>
<x1-m>-0.68752</x1-m>
<y1-m>7.80725</y1-m>
<z1-m>-0.533886</z1-m>
<x2-m>-0.74039</x2-m>
<y2-m>7.65932</y2-m>
<z2-m>-0.549421</z2-m>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>SpoilerActuatorRodR2</object-name>
<property>fdm/jsbsim/hydraulics/spoiler-r2/final-deg</property>
<interpolation>
<entry><ind>0.0</ind><dep> -0.020</dep></entry>
<entry><ind>10.0</ind><dep>-0.008</dep></entry>
<entry><ind>20.0</ind><dep> 0.004</dep></entry>
<entry><ind>30.0</ind><dep> 0.016</dep></entry>
<entry><ind>40.0</ind><dep> 0.024</dep></entry>
<entry><ind>50.0</ind><dep> 0.033</dep></entry>
</interpolation>
<axis>
<x1-m>1.01962</x1-m>
<y1-m>12.3207</y1-m>
<z1-m>-0.075614</z1-m>
<x2-m>1.12682</x2-m>
<y2-m>12.2782</y2-m>
<z2-m>-0.036176</z2-m>
</axis>
</animation>
<animation>
<name>Right spoiler 3</name>
<type>rotate</type>
@ -2251,6 +2342,44 @@
<z2-m>-0.399324</z2-m>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>SpoilerActuatorR3</object-name>
<property>fdm/jsbsim/hydraulics/spoiler-r3/final-deg</property>
<factor>0.80</factor>
<axis>
<x1-m>-0.105045</x1-m>
<y1-m>9.42908</y1-m>
<z1-m>-0.379897</z1-m>
<x2-m>-0.157915</x2-m>
<y2-m>9.28115</y2-m>
<z2-m>-0.395427</z2-m>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>SpoilerActuatorRodR3</object-name>
<property>fdm/jsbsim/hydraulics/spoiler-r3/final-deg</property>
<interpolation>
<entry><ind>0.0</ind><dep> -0.020</dep></entry>
<entry><ind>10.0</ind><dep>-0.008</dep></entry>
<entry><ind>20.0</ind><dep> 0.004</dep></entry>
<entry><ind>30.0</ind><dep> 0.016</dep></entry>
<entry><ind>40.0</ind><dep> 0.024</dep></entry>
<entry><ind>50.0</ind><dep> 0.033</dep></entry>
</interpolation>
<axis>
<x1-m>1.01962</x1-m>
<y1-m>12.3207</y1-m>
<z1-m>-0.075614</z1-m>
<x2-m>1.12682</x2-m>
<y2-m>12.2782</y2-m>
<z2-m>-0.036176</z2-m>
</axis>
</animation>
<animation>
<name>Right spoiler 4</name>
<type>rotate</type>
@ -2266,6 +2395,44 @@
<z2-m>-0.251904</z2-m>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>SpoilerActuatorR4</object-name>
<property>fdm/jsbsim/hydraulics/spoiler-r4/final-deg</property>
<factor>0.80</factor>
<axis>
<x1-m>0.444885</x1-m>
<y1-m>10.9603</y1-m>
<z1-m>-0.234507</z1-m>
<x2-m>0.39202</x2-m>
<y2-m>10.8124</y2-m>
<z2-m>-0.250037</z2-m>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>SpoilerActuatorRodR4</object-name>
<property>fdm/jsbsim/hydraulics/spoiler-r4/final-deg</property>
<interpolation>
<entry><ind>0.0</ind><dep> -0.020</dep></entry>
<entry><ind>10.0</ind><dep>-0.008</dep></entry>
<entry><ind>20.0</ind><dep> 0.004</dep></entry>
<entry><ind>30.0</ind><dep> 0.016</dep></entry>
<entry><ind>40.0</ind><dep> 0.024</dep></entry>
<entry><ind>50.0</ind><dep> 0.033</dep></entry>
</interpolation>
<axis>
<x1-m>1.01962</x1-m>
<y1-m>12.3207</y1-m>
<z1-m>-0.075614</z1-m>
<x2-m>1.12682</x2-m>
<y2-m>12.2782</y2-m>
<z2-m>-0.036176</z2-m>
</axis>
</animation>
<animation>
<name>Right spoiler 5</name>
<type>rotate</type>
@ -2282,6 +2449,43 @@
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>SpoilerActuatorR5</object-name>
<property>fdm/jsbsim/hydraulics/spoiler-r5/final-deg</property>
<factor>0.80</factor>
<axis>
<x1-m>0.96858</x1-m>
<y1-m>12.4253</y1-m>
<z1-m>-0.096347</z1-m>
<x2-m>0.91571</x2-m>
<y2-m>12.2774</y2-m>
<z2-m>-0.111877</z2-m>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>SpoilerActuatorRodR5</object-name>
<property>fdm/jsbsim/hydraulics/spoiler-r5/final-deg</property>
<interpolation>
<entry><ind>0.0</ind><dep> -0.020</dep></entry>
<entry><ind>10.0</ind><dep>-0.008</dep></entry>
<entry><ind>20.0</ind><dep> 0.004</dep></entry>
<entry><ind>30.0</ind><dep> 0.016</dep></entry>
<entry><ind>40.0</ind><dep> 0.024</dep></entry>
<entry><ind>50.0</ind><dep> 0.033</dep></entry>
</interpolation>
<axis>
<x1-m>1.01962</x1-m>
<y1-m>12.3207</y1-m>
<z1-m>-0.075614</z1-m>
<x2-m>1.12682</x2-m>
<y2-m>12.2782</y2-m>
<z2-m>-0.036176</z2-m>
</axis>
</animation>
<!-- Tail -->
<animation>
@ -2445,6 +2649,7 @@
<type>pick</type>
<object-name>DoorL1</object-name>
<object-name>DoorL1.Inner</object-name>
<object-name>DoorL1.Placards</object-name>
<action>
<button>0</button>
<repeatable type="bool">false</repeatable>
@ -2502,6 +2707,7 @@
<type>translate</type>
<object-name>DoorL1</object-name>
<object-name>DoorL1.Inner</object-name>
<object-name>DoorL1.Placards</object-name>
<property>sim/model/door-positions/doorl1/position-norm</property>
<interpolation>
<entry><ind>0</ind><dep>0</dep></entry>
@ -2520,6 +2726,7 @@
<type>translate</type>
<object-name>DoorL1</object-name>
<object-name>DoorL1.Inner</object-name>
<object-name>DoorL1.Placards</object-name>
<property>sim/model/door-positions/doorl1/position-norm</property>
<interpolation>
<entry><ind>0</ind><dep>0</dep></entry>
@ -2539,6 +2746,7 @@
<type>pick</type>
<object-name>DoorL4</object-name>
<object-name>DoorL4.Inner</object-name>
<object-name>DoorL4.Placards</object-name>
<action>
<button>0</button>
<repeatable type="bool">false</repeatable>
@ -2596,6 +2804,7 @@
<type>translate</type>
<object-name>DoorL4</object-name>
<object-name>DoorL4.Inner</object-name>
<object-name>DoorL4.Placards</object-name>
<property>sim/model/door-positions/doorl4/position-norm</property>
<interpolation>
<entry><ind>0</ind><dep>0</dep></entry>
@ -2614,6 +2823,7 @@
<type>translate</type>
<object-name>DoorL4</object-name>
<object-name>DoorL4.Inner</object-name>
<object-name>DoorL4.Placards</object-name>
<property>sim/model/door-positions/doorl4/position-norm</property>
<interpolation>
<entry><ind>0</ind><dep>0</dep></entry>
@ -2633,6 +2843,7 @@
<type>pick</type>
<object-name>DoorR1</object-name>
<object-name>DoorR1.Inner</object-name>
<object-name>DoorR1.Placards</object-name>
<action>
<button>0</button>
<repeatable type="bool">false</repeatable>
@ -2690,6 +2901,7 @@
<type>translate</type>
<object-name>DoorR1</object-name>
<object-name>DoorR1.Inner</object-name>
<object-name>DoorR1.Placards</object-name>
<property>sim/model/door-positions/doorr1/position-norm</property>
<interpolation>
<entry><ind>0</ind><dep>0</dep></entry>
@ -2708,6 +2920,7 @@
<type>translate</type>
<object-name>DoorR1</object-name>
<object-name>DoorR1.Inner</object-name>
<object-name>DoorR1.Placards</object-name>
<property>sim/model/door-positions/doorr1/position-norm</property>
<interpolation>
<entry><ind>0</ind><dep>0</dep></entry>
@ -2727,6 +2940,7 @@
<type>pick</type>
<object-name>DoorR4</object-name>
<object-name>DoorR4.Inner</object-name>
<object-name>DoorR4.Placards</object-name>
<action>
<button>0</button>
<repeatable type="bool">false</repeatable>
@ -2784,6 +2998,7 @@
<type>translate</type>
<object-name>DoorR4</object-name>
<object-name>DoorR4.Inner</object-name>
<object-name>DoorR4.Placards</object-name>
<property>sim/model/door-positions/doorr4/position-norm</property>
<interpolation>
<entry><ind>0</ind><dep>0</dep></entry>
@ -2802,6 +3017,7 @@
<type>translate</type>
<object-name>DoorR4</object-name>
<object-name>DoorR4.Inner</object-name>
<object-name>DoorR4.Placards</object-name>
<property>sim/model/door-positions/doorr4/position-norm</property>
<interpolation>
<entry><ind>0</ind><dep>0</dep></entry>

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 KiB

After

Width:  |  Height:  |  Size: 470 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 834 KiB

After

Width:  |  Height:  |  Size: 1,010 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

View file

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="DCDU-test.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
id="svg2"
version="1.1"
viewBox="0 0 766 511.99999"
height="512pt"
width="766pt">
<metadata
id="metadata375">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs373" />
<sodipodi:namedview
inkscape:document-rotation="0"
fit-margin-bottom="0"
fit-margin-right="0"
fit-margin-left="0"
fit-margin-top="0"
units="pt"
inkscape:snap-global="false"
showguides="true"
inkscape:current-layer="svg2"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:cy="195.55698"
inkscape:cx="9.3859482"
inkscape:zoom="0.45254834"
showgrid="true"
id="namedview371"
inkscape:window-height="705"
inkscape:window-width="1366"
inkscape:pageshadow="2"
inkscape:pageopacity="1"
guidetolerance="10"
gridtolerance="10"
objecttolerance="20"
borderopacity="1"
bordercolor="#666666"
pagecolor="#000000"
inkscape:document-units="px">
<inkscape:grid
originy="0"
originx="0"
id="grid5153"
type="xygrid" />
</sodipodi:namedview>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:6px;line-height:1.5;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.5px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="384.00595"
y="195.90379"
id="Test_text"
inkscape:label="#text4335"><tspan
sodipodi:role="line"
id="tspan4337"
x="384.00595"
y="195.90379"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:46px;line-height:1.25;font-family:'Lucida Sans';-inkscape-font-specification:'Lucida Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.5px">WAITING FOR DATA</tspan><tspan
sodipodi:role="line"
x="384.00595"
y="253.40379"
id="tspan4339"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:46px;line-height:1.25;font-family:'Lucida Sans';-inkscape-font-specification:'Lucida Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.5px">(MAX 30 SECONDS)</tspan></text>
</svg>

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -3,12 +3,19 @@
# Copyright (c) 2020 Josh Davidson (Octal450)
var DCDU = nil;
var DCDU_test = nil;
var DCDU_display = nil;
var elapsedtime = 0;
var et = 0;
var acconfig = props.globals.getNode("/systems/acconfig/autoconfig-running", 1);
# props.nas nodes
var dcdu_rate = props.globals.getNode("/systems/acconfig/options/dcdu-rate", 1);
var dcdu_test = props.globals.initNode("/instrumentation/du/dcdu-test", 0, "BOOL");
var dcdu_test_time = props.globals.initNode("/instrumentation/du/dcdu-test-time", 0.0, "DOUBLE");
var dcdu_offtime = props.globals.initNode("/instrumentation/du/dcdu-off-time", 0.0, "DOUBLE");
var dcdu_test_amount = props.globals.initNode("/instrumentation/du/dcdu-test-amount", 0.0, "DOUBLE");
var canvas_DCDU_base = {
init: func(canvas_group, file) {
var font_mapper = func(family, weight) {
@ -48,12 +55,44 @@ var canvas_DCDU_base = {
getKeys: func() {
return [];
},
update: func() {
updateTest: func() {
if (systems.ELEC.Bus.dc1.getValue() >= 25 or systems.ELEC.Bus.ac1.getValue() >= 110) {
if (dcdu_offtime.getValue() + 3 < et) {
if (pts.Gear.wow[0].getValue() == 1) {
if (acconfig.getValue() != 1 and dcdu_test.getValue() != 1) {
dcdu_test.setValue(1);
dcdu_test_amount.setValue(math.round((rand() * 5 ) + 25, 0.1));
dcdu_test_time.setValue(et);
} else if (acconfig.getValue() == 1 and dcdu_test.getValue() != 1) {
dcdu_test.setValue(1);
dcdu_test_amount.setValue(math.round((rand() * 5 ) + 25, 0.1));
dcdu_test_time.setValue(et - 20);
}
} else {
dcdu_test.setValue(1);
dcdu_test_amount.setValue(0);
dcdu_test_time.setValue(-100);
}
}
} else {
dcdu_test.setValue(0);
dcdu_offtime.setValue(et);
}
},
update: func() {
et = pts.Sim.Time.elapsedSec.getValue();
if (systems.ELEC.Bus.dc1.getValue() >= 25 or systems.ELEC.Bus.ac1.getValue() >= 110) {
if (dcdu_test_time.getValue() + dcdu_test_amount.getValue() >= et) {
DCDU.page.hide();
DCDU_test.page.show();
} else {
DCDU.page.show();
DCDU_test.page.hide();
DCDU.update();
}
} else {
DCDU.page.hide();
DCDU_test.page.hide();
}
},
};
@ -90,6 +129,34 @@ var canvas_DCDU = {
}
};
var canvas_DCDU_test = {
init: func(canvas_group, file) {
var font_mapper = func(family, weight) {
return "LiberationFonts/LiberationSans-Regular.ttf";
};
canvas.parsesvg(canvas_group, file, {"font-mapper": font_mapper});
var svg_keys = me.getKeys();
foreach(var key; svg_keys) {
me[key] = canvas_group.getElementById(key);
}
me.page = canvas_group;
return me;
},
new: func(canvas_group, file) {
var m = {parents: [canvas_DCDU_test]};
m.init(canvas_group, file);
return m;
},
getKeys: func() {
return ["Test_white","Test_text"];
},
};
setlistener("sim/signals/fdm-initialized", func {
DCDU_display = canvas.new({
"name": "DCDU",
@ -100,8 +167,11 @@ setlistener("sim/signals/fdm-initialized", func {
DCDU_display.addPlacement({"node": "dcduScreenL"});
DCDU_display.addPlacement({"node": "dcduScreenR"});
var group_DCDU = DCDU_display.createGroup();
var group_DCDU_test = DCDU_display.createGroup();
DCDU = canvas_DCDU.new(group_DCDU, "Aircraft/A320-family/Models/Instruments/DCDU/DCDU.svg");
DCDU_test = canvas_DCDU_test.new(group_DCDU_test, "Aircraft/A320-family/Models/Instruments/DCDU/DCDU-test.svg");
DCDU_update.start();
if (dcdu_rate.getValue() > 1) {
@ -117,6 +187,14 @@ var DCDU_update = maketimer(0.05, func {
canvas_DCDU_base.update();
});
setlistener("/systems/electrical/bus/dc-1", func() {
canvas_DCDU_base.updateTest();
}, 0, 0);
setlistener("/systems/electrical/bus/ac-1", func() {
canvas_DCDU_base.updateTest();
}, 0, 0);
var showDCDU = func {
var dlg = canvas.Window.new([383, 256], "dialog").set("resize", 1);
dlg.setCanvas(DCDU_display);

View file

@ -13,16 +13,16 @@ var mach_act = 0;
# props.nas nodes
var iesi_init = props.globals.initNode("/instrumentation/iesi/iesi-init", 0, "BOOL");
var iesi_time = props.globals.initNode("/instrumentation/iesi/iesi-init-time", 0.0, "DOUBLE");
var iesi_reset = props.globals.initNode("/instrumentation/iesi/att-reset", 0, "DOUBLE");
var iesi_brt = props.globals.getNode("/controls/lighting/DU/iesi", 1);
var iesi_rate = props.globals.getNode("/systems/acconfig/options/iesi-rate", 1);
var et = props.globals.getNode("/sim/time/elapsed-sec", 1);
var aconfig = props.globals.getNode("/systems/acconfig/autoconfig-running", 1);
var airspeed = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt", 1);
var mach = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach", 1);
var pitch = props.globals.getNode("/orientation/pitch-deg", 1);
var roll = props.globals.getNode("/orientation/roll-deg", 1);
var skid = props.globals.getNode("/instrumentation/slip-skid-ball/indicated-slip-skid", 1);
var pitch = props.globals.getNode("/instrumentation/iesi/pitch-deg", 1);
var skid = props.globals.getNode("/instrumentation/iesi/slip-skid", 1);
var altitude = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft", 1);
var altitude_ind = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft-pfd", 1);
@ -30,6 +30,10 @@ var altimeter_mode = props.globals.getNode("/instrumentation/altimeter[0]/std",
var qnh_hpa = props.globals.getNode("/instrumentation/altimeter/setting-hpa", 1);
var qnh_inhg = props.globals.getNode("/instrumentation/altimeter/setting-inhg", 1);
var _showIESI = 0;
var _fast = 0;
var _IESITime = 0;
var canvas_IESI_base = {
init: func(canvas_group, file) {
var font_mapper = func(family, weight) {
@ -66,6 +70,10 @@ var canvas_IESI_base = {
me.AI_horizon_trans = me["AI_horizon"].createTransform();
me.AI_horizon_rot = me["AI_horizon"].createTransform();
_showIESI = 0;
_fast = 0;
_IESITime = 0.0;
me.page = canvas_group;
return me;
@ -75,19 +83,42 @@ var canvas_IESI_base = {
},
update: func() {
cur_time = et.getValue();
# todo consider relay 7XB for power of DC HOT 1
# todo transient max 0.2s
# todo 20W power consumption
if (iesi_reset.getValue() == 1) {
if (iesi_init.getBoolValue() and _IESITime + 90 >= et.getValue()) {
_fast = 1;
} else {
_fast = 0;
}
iesi_init.setBoolValue(0);
}
if (systems.ELEC.Bus.dcEss.getValue() >= 25 or (systems.ELEC.Bus.dcHot1.getValue() >= 25 and airspeed.getValue() >= 50 and cur_time >= 5)) {
IESI.page.show();
_showIESI = 1;
IESI.update();
if (aconfig.getValue() != 1 and iesi_init.getValue() != 1) {
iesi_init.setBoolValue(1);
iesi_time.setValue(cur_time);
if (_fast) {
_IESITime = cur_time - 80;
_fast = 0;
} else {
_IESITime = cur_time;
}
} else if (aconfig.getValue() == 1 and iesi_init.getValue() != 1) {
iesi_init.setBoolValue(1);
iesi_time.setValue(cur_time - 87);
_IESITime = cur_time - 87;
}
} else {
_showIESI = 0;
iesi_init.setBoolValue(0);
}
if (_showIESI and iesi_brt.getValue() > 0.01) {
IESI.page.show();
} else {
IESI.page.hide();
}
},
@ -98,14 +129,20 @@ var canvas_IESI = {
var m = {parents: [canvas_IESI, canvas_IESI_base]};
m.init(canvas_group, file);
m._cachedInhg = -99;
m._machWasAbove50 = 0;
m._roll = 0;
return m;
},
getKeys: func() {
return ["IESI","IESI_Init","ASI_scale","ASI_mach","ASI_mach_decimal","AI_center","AI_horizon","AI_bank","AI_slipskid","ALT_scale","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_meters","QNH_setting","QNH_std"];
return ["IESI","IESI_Init","ASI_scale","ASI_mach","ASI_mach_decimal","AI_center","AI_horizon","AI_bank","AI_slipskid","ALT_scale","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_meters","QNH_setting","QNH_std","negText","negText2","AI_bank_scale"];
},
update: func() {
if (iesi_time.getValue() + 90 >= et.getValue()) {
if (qnh_inhg.getValue() != me._cachedInhg) {
me._cachedInhg = qnh_inhg.getValue();
me.updateQNH();
}
if (_IESITime + 90 >= et.getValue()) {
me["IESI"].hide();
me["IESI_Init"].show();
return;
@ -115,22 +152,27 @@ var canvas_IESI = {
}
# Airspeed
# Subtract 30, since the scale starts at 30, but don"t allow less than 0, or more than 420 situations
# Subtract 30, since the scale starts at 30, but don't allow less than 0, or more than 520 knots
airspeed_act = airspeed.getValue();
mach_act = mach.getValue();
if (airspeed_act <= 30) {
ASI = 0;
} else if (airspeed_act >= 420) {
ASI = 390;
} else if (airspeed_act >= 520) {
ASI = 490;
} else {
ASI = airspeed_act - 30;
}
me["ASI_scale"].setTranslation(0, ASI * 8.295);
if (mach_act >= 0.5) {
me._machWasAbove50 = 1;
me["ASI_mach_decimal"].show();
me["ASI_mach"].show();
} elsif (mach_act >= 0.45 and me._machWasAbove50) {
me["ASI_mach_decimal"].show();
me["ASI_mach"].show();
} else {
me._machWasAbove50 = 0;
me["ASI_mach_decimal"].hide();
me["ASI_mach"].hide();
}
@ -142,14 +184,29 @@ var canvas_IESI = {
}
# Attitude
me._roll = pts.Orientation.roll.getValue();
me.AI_horizon_trans.setTranslation(0, pitch.getValue() * 16.74);
me.AI_horizon_rot.setRotation(-roll.getValue() * D2R, me["AI_center"].getCenter());
me.AI_horizon_rot.setRotation(-me._roll * D2R, me["AI_center"].getCenter());
me["AI_slipskid"].setTranslation(math.clamp(skid.getValue(), -7, 7) * -15, 0);
me["AI_bank"].setRotation(-roll.getValue() * D2R);
me["AI_slipskid"].setTranslation(skid.getValue(), 0);
me["AI_bank"].setRotation(-me._roll * D2R);
# Altitude
me.altitude = altitude.getValue();
if (me.altitude > 50000) {
me.altitude = 50000;
} elsif (me.altitude < -2000) {
me.altitude = -2000;
}
if (me.altitude < 0) {
me["negText"].show();
me["negText2"].show();
} else {
me["negText"].hide();
me["negText2"].hide();
}
me.altOffset = me.altitude / 500 - int(me.altitude / 500);
me.middleAltText = roundaboutAlt(me.altitude / 100);
me.middleAltOffset = nil;
@ -166,15 +223,17 @@ var canvas_IESI = {
me["ALT_two"].setText(sprintf("%03d", abs(me.middleAltText-5)));
me["ALT_one"].setText(sprintf("%03d", abs(me.middleAltText-10)));
me["ALT_digits"].setText(sprintf("%s", altitude_ind.getValue()));
me["ALT_meters"].setText(sprintf("%5.0f", me.altitude * 0.3048));
altTens = num(right(sprintf("%02d", altitude.getValue()), 2));
me["ALT_tens"].setTranslation(0, altTens * 3.16);
if (qnh_inhg.getValue() != me._cachedInhg) {
me._cachedInhg = qnh_inhg.getValue();
me.updateQNH();
me.altitudeText = altitude_ind.getValue();
if (me.altitude < 0 and me.altitudeText > 20) {
me.altitudeText = 20;
} elsif (me.altitude > 0 and me.altitudeText > 500) {
me.altitudeText = 500;
}
me["ALT_digits"].setText(sprintf("%s", me.altitudeText));
me["ALT_meters"].setText(sprintf("%5.0f", math.round(me.altitude * 0.3048, 10)));
altTens = num(right(sprintf("%02d", me.altitude), 2));
me["ALT_tens"].setTranslation(0, altTens * 3.16);
},
updateQNH: func() {
if (altimeter_mode.getBoolValue()) {

View file

@ -19,15 +19,15 @@
</action>
</animation>
<!--animation>
<animation>
<type>material</type>
<object-name>pfd1.screen</object-name>
<object-name>iesi.screen</object-name>
<emission>
<red>1</red>
<green>1</green>
<blue>1</blue>
<factor-prop>controls/lighting/DU/iesi</factor-prop>
</emission>
</animation-->
</animation>
</PropertyList>

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 115 KiB

File diff suppressed because it is too large Load diff

View file

@ -25,6 +25,7 @@ var myCLBWIND = [nil, nil];
var myCRZWIND = [nil, nil];
var myDESWIND = [nil, nil];
var myHISTWIND = [nil, nil];
var myAtis = [nil, nil];
var default = "BoeingCDU-Large.ttf";
#var symbol = "helvetica_medium.txf";
var symbol = "LiberationMonoCustom.ttf";
@ -72,6 +73,7 @@ var MAGENTA = [0.6902,0.3333,0.7541];
# Fetch nodes:
var mcdu_keyboard_left = props.globals.getNode("/FMGC/keyboard-left", 0);
var mcdu_keyboard_right = props.globals.getNode("/FMGC/keyboard-right", 0);
var acconfig_weight_kgs = props.globals.getNode("/systems/acconfig/options/weight-kgs", 1);
#ACCONFIG
var mcdu1_lgt = props.globals.getNode("/controls/lighting/DU/mcdu1", 1);
@ -144,13 +146,9 @@ var activate_twice = props.globals.getNode("/FMGC/internal/activate-twice", 1);
# APPR PERF
var dest_qnh = props.globals.getNode("/FMGC/internal/dest-qnh", 1);
var dest_temp = props.globals.getNode("/FMGC/internal/dest-temp", 1);
var vapp_speed_set = props.globals.getNode("/FMGC/internal/vapp-speed-set", 1);
var final = props.globals.getNode("/FMGC/internal/final", 1);
var radio = props.globals.getNode("/FMGC/internal/radio", 1);
var baro = props.globals.getNode("/FMGC/internal/baro", 1);
var radio_no = props.globals.getNode("/FMGC/internal/radio-no", 1);
var ldg_config_3_set = props.globals.getNode("/FMGC/internal/ldg-config-3-set", 1);
var ldg_config_f_set = props.globals.getNode("/FMGC/internal/ldg-config-f-set", 1);
# GA PERF
@ -159,6 +157,10 @@ var pageProp = [props.globals.getNode("/MCDU[0]/page", 1), props.globals.getNode
var active = [props.globals.getNode("/MCDU[0]/active", 1), props.globals.getNode("/MCDU[1]/active", 1)];
var activeAtsu = [props.globals.getNode("/MCDU[0]/atsu-active", 1), props.globals.getNode("/MCDU[1]/atsu-active", 1)];
# Conversion factor pounds to kilogram
var LBS2KGS = 0.4535924;
# Create Nodes:
var pageSwitch = [props.globals.initNode("/MCDU[0]/internal/switch", 0, "BOOL"), props.globals.initNode("/MCDU[1]/internal/switch", 0, "BOOL")];
@ -232,7 +234,8 @@ var canvas_MCDU_base = {
"PERFAPPR_FE","PERFAPPR_SE","PERFAPPR_OE","PERFAPPR_LDG_3","PERFAPPR_LDG_F","PERFGA","PERFGA_FE","PERFGA_SE","PERFGA_OE","FPLN","FPLN_From",
"FPLN_TMPY_group","FPLN_FROM","FPLN_Callsign","departureTMPY", "arrowsDepArr","arrow1L","arrow2L","arrow3L","arrow4L","arrow5L","arrow1R","arrow2R",
"arrow3R","arrow4R","arrow5R","DIRTO_TMPY_group","IRSINIT","IRSINIT_1","IRSINIT_2","IRSINIT_star","NOTIFY","NOTIFY_FLTNBR","NOTIFY_AIRPORT","WEATHERREQSEND",
"WIND","WIND_CANCEL","WIND_INSERT_star","WIND_UPDOWN","MODEVHF3","PRINTPAGE","COMM-ADS","COCALL","COCALLTUNE"];
"WIND","WIND_CANCEL","WIND_INSERT_star","WIND_UPDOWN","MODEVHF3","PRINTPAGE","COMM-ADS","COCALL","COCALLTUNE","ATISSend1","ATISSend2","ATISSend3","ATISSend4",
"ATISArrows"];
},
update: func() {
if (systems.ELEC.Bus.ac1.getValue() >= 110 and mcdu1_lgt.getValue() > 0.01) {
@ -363,6 +366,15 @@ var canvas_MCDU_base = {
me["PRINTPAGE"].setColor(WHITE);
}
}
if (page != "ATIS") {
me["ATISSend1"].hide();
me["ATISSend2"].hide();
me["ATISSend3"].hide();
me["ATISSend4"].hide();
}
if (page != "ATISDETAIL") {
me["ATISArrows"].hide();
}
if (page == "F-PLNA" or page == "F-PLNB") {
if (!pageSwitch[i].getBoolValue()) {
me["Simple"].show();
@ -546,12 +558,14 @@ var canvas_MCDU_base = {
me.showLeftArrow(1, 1, 1, -1, 1, 1);
me.showRight(1, 1, 1, 1, 1, -1);
me.showRightS(-1, -1, -1, -1, -1, -1);
me.showRightArrow(1, 1, 1, 1, 1, -1);
me.showRightArrow(1, 1, 1, 1, 1, 1);
me["Simple_C3B"].hide();
me["Simple_C4B"].hide();
me.standardFontSize();
me.standardFontColour();
me["Simple_R6"].setColor(BLUE);
me["Simple_R6_Arrow"].setColor(BLUE);
me["Simple_L1"].setText(" PREFLIGHT");
me["Simple_L2"].setText(" ENROUTE");
@ -565,8 +579,72 @@ var canvas_MCDU_base = {
me["Simple_R3"].setText("RCVD MSGS ");
me["Simple_R4"].setText("REPORTS ");
me["Simple_R5"].setText("CONFIG ");
me["Simple_R6"].setText("MESSAGE ");
pageSwitch[i].setBoolValue(1);
}
if (mcdu.ReceivedMessagesDatabase.firstUnviewed() != -99) {
me["Simple_R6"].show();
me["Simple_R6_Arrow"].show();
} else {
me["Simple_R6"].hide();
me["Simple_R6_Arrow"].hide();
}
} else if (page == "AOCCONFIG") {
if (!pageSwitch[i].getBoolValue()) {
me.defaultHideWithCenter();
me["Simple_Title"].setText("AOC CONFIGURATION");
me.defaultPageNumbers();
me.showLeft(1, -1, -1, -1, -1, 1);
me["Simple_L0S"].hide();
me.showLeftS(1, -1, -1, -1, -1, 1);
me.showLeftArrow(-1, -1, -1, -1, -1, 1);
me.showCenter(1, 1, 1, 1, 1, -1);
me.showCenterS(1, -1, 1, -1, 1, -1);
me.showRight(1, -1, -1, -1, -1, 1);
me.showRightS(1, -1, -1, -1, -1, -1);
me.showRightArrow(-1, -1, -1, -1, -1, -1);
me["Simple_C3B"].hide();
me["Simple_C4B"].hide();
me.standardFontSize();
me.standardFontColour();
me["Simple_L1S"].setText("A/C REG");
me["Simple_L1"].setFontSize(small);
me["Simple_L1"].setColor(GREEN);
me["Simple_C1S"].setColor(GREEN);
me["Simple_R1"].setFontSize(small);
me["Simple_R1"].setColor(GREEN);
me["Simple_R1S"].setText("TYPE");
me["Simple_L6S"].setText(" RETURN TO");
me["Simple_L6"].setText(" AOC MENU");
me["Simple_C2"].setText("ATSU SW AND DB PN");
me["Simple_C3S"].setText("998.2459.501");
me["Simple_C3S"].setFontSize(small);
me["Simple_C3S"].setColor(GREEN);
me["Simple_C3"].setText("998.2460.501");
me["Simple_C3"].setFontSize(small);
me["Simple_C3"].setColor(GREEN);
me["Simple_C4"].setText("ATSU AOC ID");
me["Simple_C5S"].setText("AS2TOC1015010F1");
me["Simple_C5S"].setFontSize(small);
me["Simple_C5S"].setColor(GREEN);
me["Simple_C5"].setText("AS2TOC1012001F2");
me["Simple_C5"].setFontSize(small);
me["Simple_C5"].setColor(GREEN);
me["Simple_R6"].setText("PRINT ");
me["Simple_R6"].setColor(BLUE);
me["Simple_C1"].setFontSize(small);
me["Simple_C1"].setColor(GREEN);
pageSwitch[i].setBoolValue(1);
}
me["Simple_L1"].setText(getprop("/options/model-options/registration"));
me["Simple_C1S"].setText(sprintf("%02.0f", getprop("/sim/time/utc/hour")) ~ sprintf("%02.0f", getprop("/sim/time/utc/minute")));
me["Simple_C1"].setText(sprintf("%02.0f", getprop("/sim/time/utc/day")) ~ "/" ~ sprintf("%02.0f", getprop("/sim/time/utc/month")) ~ "/" ~ right(sprintf(getprop("/sim/time/utc/year")), 2));
me["Simple_R1S"].setText("TYPE");
me["Simple_R1"].setText(getprop("/MCDUC/type"));
} else if (page == "WEATHERREQ") {
if (!pageSwitch[i].getBoolValue()) {
me.defaultHide();
@ -880,7 +958,7 @@ var canvas_MCDU_base = {
}
} else if (page == "ATCMENU2") {
if (!pageSwitch[i].getBoolValue()) {
me.defaultHide();
me.defaultHideWithCenter();
me["Simple_Title"].setText("ATC MENU");
me["Simple_Title"].setColor(1, 1, 1);
me["Simple_PageNum"].setText("2/2");
@ -892,6 +970,8 @@ var canvas_MCDU_base = {
me["Simple_L0S"].hide();
me.showLeftS(-1, -1, -1, -1, -1, 1);
me.showLeftArrow(1, 1, -1, -1, -1, 1);
me.showCenter(-1, -1, -1, -1, -1, -1);
me.showCenterS(1, -1, -1, -1, -1, -1);
me.showRight(1, -1, -1, -1, -1, -1);
me.showRightS(-1, -1, -1, -1, -1, -1);
me.showRightArrow(1, -1, -1, -1, -1, -1);
@ -899,16 +979,230 @@ var canvas_MCDU_base = {
me["Simple_C4B"].hide();
me.standardFontSize();
me.fontSizeCenter(normal, normal, normal, normal, normal, normal);
me.standardFontColour();
me.colorCenterS("wht", "wht", "wht", "wht", "wht", "wht");
me["Simple_L1"].setText(" DEPART REQ");
me["Simple_L2"].setText(" OCEANIC REQ");
me["Simple_C1S"].setText(" -------- ATS623 PAGE -------- ");
me["Simple_L6S"].setText(" ATSU DLK");
me["Simple_L6"].setText(" RETURN");
me["Simple_R1"].setText("ATIS ");
pageSwitch[i].setBoolValue(1);
}
} else if (page == "ATISDETAIL") {
if (!pageSwitch[i].getBoolValue()) {
me.defaultHide();
me["Simple_PageNum"].hide();
me["ArrowLeft"].hide();
me["ArrowRight"].hide();
me["Simple_L0S"].hide();
me["Simple_C3B"].hide();
me["Simple_C4B"].hide();
me.fontLeft(default, default, default, default, default, default);
me.fontLeftS(default, default, default, default, default, default);
me.fontRight(default, default, default, default, default, default);
me.fontRightS(default, default, default, default, default, default);
me.fontSizeLeft(small, small, small, small, normal, normal);
me.fontSizeCenter(normal, normal, normal, normal, normal, normal);
me.fontSizeRight(normal, normal, normal, normal, normal, normal);
me.colorLeftS("grn", "wht", "wht", "wht", "wht", "wht");
me.colorRightS("grn", "wht", "wht", "wht", "wht", "wht");
if (myAtis[i] != nil) {
me["Simple_Title"].setText(sprintf("%s", myAtis[i].title));
me.dynamicPageArrowFunc(myAtis[i]);
me.colorLeftArrow(myAtis[i].arrowsColour[0][0],myAtis[i].arrowsColour[0][1],myAtis[i].arrowsColour[0][2],myAtis[i].arrowsColour[0][3],myAtis[i].arrowsColour[0][4],myAtis[i].arrowsColour[0][5]);
me.colorRightArrow(myAtis[i].arrowsColour[1][0],myAtis[i].arrowsColour[1][1],myAtis[i].arrowsColour[1][2],myAtis[i].arrowsColour[1][3],myAtis[i].arrowsColour[1][4],myAtis[i].arrowsColour[1][5]);
me.dynamicPageFunc(myAtis[i].L1, "Simple_L1");
me.dynamicPageFunc(myAtis[i].L2, "Simple_L2");
me.dynamicPageFunc(myAtis[i].L3, "Simple_L3");
me.dynamicPageFunc(myAtis[i].L4, "Simple_L4");
me.dynamicPageFunc(myAtis[i].L5, "Simple_L5");
me.dynamicPageFunc(myAtis[i].L6, "Simple_L6");
me.colorLeft(myAtis[i].L1[2],myAtis[i].L2[2],myAtis[i].L3[2],myAtis[i].L4[2],myAtis[i].L5[2],myAtis[i].L6[2]);
me.dynamicPageFunc(myAtis[i].R1, "Simple_R1");
me.dynamicPageFunc(myAtis[i].R2, "Simple_R2");
me.dynamicPageFunc(myAtis[i].R3, "Simple_R3");
me.dynamicPageFunc(myAtis[i].R4, "Simple_R4");
me.dynamicPageFunc(myAtis[i].R5, "Simple_R5");
me.dynamicPageFunc(myAtis[i].R6, "Simple_R6");
me.colorRight(myAtis[i].R1[2],myAtis[i].R2[2],myAtis[i].R3[2],myAtis[i].R4[2],myAtis[i].R5[2],myAtis[i].R6[2]);
}
if (myAtis[i].getNumPages() > 1) {
me["Simple_PageNum"].show();
me["ATISArrows"].show();
me["Simple_PageNum"].setText(myAtis[i].page ~ "/" ~ myAtis[i].getNumPages());
} else {
me["Simple_PageNum"].hide();
me["ATISArrows"].hide();
}
pageSwitch[i].setBoolValue(1);
}
} else if (page == "ATIS") {
if (!pageSwitch[i].getBoolValue()) {
me.defaultHideWithCenter();
me["Simple_Title"].setText("ATS623 ATIS MENU");
me["Simple_Title"].setColor(1, 1, 1);
me["Simple_PageNum"].hide();
me["ArrowLeft"].hide();
me["ArrowRight"].hide();
me.showLeft(1, 1, 1, 1, -1, 1);
me["Simple_L0S"].hide();
me.showLeftS(1, -1, -1, -1, -1, 1);
me.showLeftArrow(1, 1, 1, -1, -1, 1);
me.showCenter(-1, -1, -1, -1, -1, -1);
me.showCenterS(-1, -1, -1, -1, -1, -1);
me.showRight(1, 1, 1, 1, 1, 1);
me.showRightS(1, 1, 1, 1, 1, 1);
me.showRightArrow(-1, -1, -1, -1, 1, -1);
me["Simple_C3B"].hide();
me["Simple_C4B"].hide();
me.standardFontSize();
me.colorLeft("blu", "blu", "blu", "blu", "wht", "wht");
me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht");
me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht");
me.colorCenter("grn", "grn", "grn", "grn", "wht", "wht");
me.colorCenterS("wht", "wht", "wht", "wht", "wht", "wht");
me.colorRight("wht", "wht", "wht", "wht", "wht", "wht");
me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht");
me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht");
me["Simple_L1S"].setText(" ARPT/TYPE");
me["Simple_L6S"].setText(" ATC MENU");
me["Simple_L4"].setText(" [ ]/[ ]");
me["Simple_L4"].setFont(symbol);
me["Simple_L6"].setText(" RETURN");
me["Simple_C1"].setFontSize(small);
me["Simple_C2"].setFontSize(small);
me["Simple_C3"].setFontSize(small);
me["Simple_C4"].setFontSize(small);
me["Simple_R1S"].setText("REQ ");
me["Simple_R1"].setText("SEND ");
me["Simple_R2S"].setText("REQ ");
me["Simple_R2"].setText("SEND ");
me["Simple_R3S"].setText("REQ ");
me["Simple_R3"].setText("SEND ");
me["Simple_R4S"].setText("REQ ");
me["Simple_R4"].setText("SEND ");
me["Simple_R5S"].setText("AUTO ");
me["Simple_R5"].setText("UPDATE ");
me["Simple_R6S"].setText("PRINT MANUAL ");
me["Simple_R6"].setText("SET AUTO ");
pageSwitch[i].setBoolValue(1);
}
if (atsu.ATISInstances[0].station != nil) {
me["Simple_L1"].setText(" " ~ atsu.ATISInstances[0].station ~ "/" ~ (atsu.ATISInstances[0].type == 0 ? "ARR" : "DEP"));
me["Simple_L1"].setFont(default);
me["Simple_L1_Arrow"].show();
} else {
me["Simple_L1"].setText(" [ ]/[ ]");
me["Simple_L1"].setFont(symbol);
me["Simple_L1_Arrow"].hide();
}
if (atsu.ATISInstances[0].received) {
me["Simple_C1"].setText(" " ~ atsu.ATISInstances[0].receivedCode ~ " " ~ atsu.ATISInstances[0].receivedTime);
me["Simple_C1"].show();
} else {
me["Simple_C1"].hide();
}
if (atsu.ATISInstances[1].station != nil) {
me["Simple_L2"].setText(" " ~ atsu.ATISInstances[1].station ~ "/" ~ (atsu.ATISInstances[1].type == 0 ? "ARR" : "DEP"));
me["Simple_L2"].setFont(default);
me["Simple_L2_Arrow"].show();
} else {
me["Simple_L2"].setText(" [ ]/[ ]");
me["Simple_L2"].setFont(symbol);
me["Simple_L2_Arrow"].hide();
}
if (atsu.ATISInstances[1].received) {
me["Simple_C2"].setText(" " ~ atsu.ATISInstances[1].receivedCode ~ " " ~ atsu.ATISInstances[1].receivedTime);
me["Simple_C2"].show();
} else {
me["Simple_C2"].hide();
}
if (atsu.ATISInstances[2].station != nil) {
me["Simple_L3"].setText(" " ~ atsu.ATISInstances[2].station ~ "/" ~ (atsu.ATISInstances[2].type == 0 ? "ARR" : "DEP"));
me["Simple_L3"].setFont(default);
me["Simple_L3_Arrow"].show();
} else {
me["Simple_L3"].setText(" [ ]/[ ]");
me["Simple_L3"].setFont(symbol);
me["Simple_L3_Arrow"].hide();
}
if (atsu.ATISInstances[2].received) {
me["Simple_C3"].setText(" " ~ atsu.ATISInstances[2].receivedCode ~ " " ~ atsu.ATISInstances[2].receivedTime);
me["Simple_C3"].show();
} else {
me["Simple_C3"].hide();
}
if (atsu.ATISInstances[3].station != nil) {
me["Simple_L4"].setText(" " ~ atsu.ATISInstances[3].station ~ "/" ~ (atsu.ATISInstances[3].type == 0 ? "ARR" : "DEP"));
me["Simple_L4"].setFont(default);
me["Simple_L4_Arrow"].show();
} else {
me["Simple_L4"].setText(" [ ]/[ ]");
me["Simple_L4"].setFont(symbol);
me["Simple_L4_Arrow"].hide();
}
if (atsu.ATISInstances[3].received) {
me["Simple_C4"].setText(" " ~ atsu.ATISInstances[3].receivedCode ~ " " ~ atsu.ATISInstances[3].receivedTime);
me["Simple_C4"].show();
} else {
me["Simple_C4"].hide();
}
if (atsu.ATISInstances[0].sent) {
me["ATISSend1"].hide();
} else {
me["ATISSend1"].show();
}
if (atsu.ATISInstances[1].sent) {
me["ATISSend2"].hide();
} else {
me["ATISSend2"].show();
}
if (atsu.ATISInstances[2].sent) {
me["ATISSend3"].hide();
} else {
me["ATISSend3"].show();
}
if (atsu.ATISInstances[3].sent) {
me["ATISSend4"].hide();
} else {
me["ATISSend4"].show();
}
} else if (page == "NOTIFICATION") {
if (!pageSwitch[i].getBoolValue()) {
me.defaultHideWithCenter();
@ -1185,41 +1479,35 @@ var canvas_MCDU_base = {
me["Simple_Title"].setText("VHF3 DATA MODE");
me.defaultPageNumbers();
me.showLeft(-1, 1, 1, 1, -1, 1);
me.showLeft(1, 1, 1, -1, -1, 1);
me["Simple_L0S"].hide();
me.showLeftS(1, 1, 1, 1, -1, -1);
me.showLeftArrow(-1, 1, 1, 1, -1, 1);
me.showLeftS(1, -1, -1, -1, -1, -1);
me.showLeftArrow(-1, 1, 1, -1, -1, 1);
me.showCenter(-1, -1, -1, -1, -1, -1);
me.showCenterS(1, -1, -1, -1, -1, -1);
me.showRight(-1, 1, 1, -1, -1, 1);
me.showRightS(1, 1, 1, -1, -1, 1);
me.showRight(1, 1, 1, -1, -1, 1);
me.showRightS(1, -1, -1, -1, -1, 1);
me.showRightArrow(-1, 1, 1, -1, -1, -1);
me["Simple_C3B"].hide();
me["Simple_C4B"].hide();
me.standardFontSize();
me.colorLeft("wht", "blu", "blu", "blu", "wht", "wht");
me.colorLeftS("grn", "blu", "blu", "blu", "wht", "wht");
me.colorLeft("grn", "blu", "blu", "blu", "wht", "wht");
me.colorLeftS("wht", "blu", "blu", "blu", "wht", "wht");
me.colorLeftArrow("wht", "blu", "blu", "blu", "wht", "wht");
me.colorCenterS("grn", "wht", "wht", "wht", "wht", "wht");
me.colorRight("wht", "blu", "blu", "wht", "wht", "blu");
me.colorRightS("grn", "blu", "blu", "wht", "wht", "blu");
me.colorRight("grn", "blu", "blu", "wht", "wht", "blu");
me.colorRightS("wht", "blu", "blu", "wht", "wht", "blu");
me.colorRightArrow("wht", "blu", "blu", "wht", "wht", "wht");
me["Simple_L1S"].setText(" AUTO");
me["Simple_C1S"].setText("SITA725 ");
me["Simple_L2S"].setText(" SITA725");
me["Simple_L2"].setText(" EUROPE");
me["Simple_L3S"].setText(" SITA550");
me["Simple_L3"].setText(" ASIA/AUST");
me["Simple_L4S"].setText(" AVICOM");
me["Simple_L4"].setText(" JAPAN");
me["Simple_R1S"].setText(" 131.725");
me["Simple_R2S"].setText("ARINC ");
me["Simple_R2"].setText("USA ");
me["Simple_R3S"].setText("AIRCANADA ");
me["Simple_R3"].setText("CANADA ");
me["Simple_L1S"].setText(" ATIS");
me["Simple_C1S"].setText("ACTIVE SERVERS");
me["Simple_L2"].setText(" FAA");
me["Simple_L3"].setText(" VATSIM");
me["Simple_R1S"].setText("METAR ");
me["Simple_R2"].setText("NOAA ");
me["Simple_R3"].setText("VATSIM ");
me["Simple_L6S"].setText(" RETURN TO");
me["Simple_L6"].setText(" COMM MENU");
me["Simple_R6S"].setText("PAGE ");
@ -1227,6 +1515,25 @@ var canvas_MCDU_base = {
pageSwitch[i].setBoolValue(1);
}
if (atsu.AOC.server.getValue() == "vatsim") {
me["Simple_R1"].setText("VATSIM ");
me["Simple_R2_Arrow"].show();
me["Simple_R3_Arrow"].hide();
} elsif (atsu.AOC.server.getValue() == "noaa") {
me["Simple_R1"].setText("NOAA ");
me["Simple_R2_Arrow"].hide();
me["Simple_R3_Arrow"].show();
}
if (atsu.ATIS.serverSel.getValue() == "vatsim") {
me["Simple_L1"].setText(" VATSIM");
me["Simple_L2_Arrow"].show();
me["Simple_L3_Arrow"].hide();
} elsif (atsu.ATIS.serverSel.getValue() == "faa") {
me["Simple_L1"].setText(" FAA");
me["Simple_L2_Arrow"].hide();
me["Simple_L3_Arrow"].show();
}
} else if (page == "COMMINIT") {
if (!pageSwitch[i].getBoolValue()) {
me.defaultHide();
@ -2254,7 +2561,11 @@ var canvas_MCDU_base = {
}
me["Simple_L1S"].setText("TAXI");
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L1"].setText(sprintf("%2.1f", fmgc.FMGCInternal.taxiFuel * LBS2KGS));
} else {
me["Simple_L1"].setText(sprintf("%2.1f", fmgc.FMGCInternal.taxiFuel));
}
me["Simple_L2S"].setText("TRIP/TIME");
me["Simple_L3S"].setText("RTE RSV/PCT");
me["Simple_L4S"].setText("ALTN/TIME");
@ -2268,7 +2579,7 @@ var canvas_MCDU_base = {
me["Simple_Title"].setColor(1, 1, 1);
if (!getprop("/FMGC/internal/fuel-request-set")) {
if (!fmgc.FMGCInternal.fuelRequest) {
me["Simple_L2"].setText("---.-/----");
me["Simple_L3"].setText("---.-");
me["Simple_C3"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));
@ -2280,7 +2591,11 @@ var canvas_MCDU_base = {
if (fmgc.FMGCInternal.blockSet) {
me["Simple_R2"].show();
me["INITB_Block"].hide();
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block * LBS2KGS));
} else {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block));
}
} else {
me["Simple_R2"].hide();
me["INITB_Block"].show();
@ -2311,7 +2626,7 @@ var canvas_MCDU_base = {
me["Simple_Title"].setText("INIT FUEL PREDICTION ");
if (getprop("/FMGC/internal/block-calculating")) {
if (fmgc.FMGCInternal.blockCalculating) {
me["Simple_L2"].setText("---.-/----");
me["Simple_L3"].setText("---.-");
me["Simple_C3"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));
@ -2337,7 +2652,7 @@ var canvas_MCDU_base = {
me.colorRight("ack", "wht", "grn", "wht", "ack", "wht");
me["Simple_R3S"].setColor(GREEN);
} else {
if (!getprop("/FMGC/internal/block-confirmed")) {
if (!fmgc.FMGCInternal.blockConfirmed) {
me["Simple_L2"].setText("---.-/----");
me["Simple_L3"].setText("---.-");
me["Simple_C3"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));
@ -2348,7 +2663,11 @@ var canvas_MCDU_base = {
me["Simple_L6"].setText("---.-");
me["Simple_R2"].show();
me["INITB_Block"].hide();
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block * LBS2KGS));
} else {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block));
}
me["Simple_R3S"].show();
me["Simple_R3"].show();
me["Simple_R3S"].setText("BLOCK");
@ -2357,10 +2676,18 @@ var canvas_MCDU_base = {
me["Simple_R3_Arrow"].setColor(AMBER);
me["Simple_C4B"].show();
if (num(fmgc.FMGCInternal.tow) >= 100.0) {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow * LBS2KGS));
} else {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow));
}
} else {
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow * LBS2KGS));
} else {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow));
}
}
me["Simple_R4"].setText("---.-");
me["Simple_R6"].setText("---.-/----");
@ -2368,7 +2695,7 @@ var canvas_MCDU_base = {
me.colorRight("ack", "blu", "amb", "wht", "ack", "wht");
me["Simple_R3S"].setColor(AMBER);
} else {
if (getprop("/FMGC/internal/fuel-calculating")) {
if (fmgc.FMGCInternal.fuelCalculating) {
me["Simple_L2"].setText("---.-/----");
me["Simple_L3"].setText("---.-");
if (fmgc.FMGCInternal.rteRsvSet) {
@ -2393,24 +2720,44 @@ var canvas_MCDU_base = {
me["Simple_L6"].setText("---.-");
me["Simple_R2"].show();
me["INITB_Block"].hide();
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block * LBS2KGS));
} else {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block));
}
me["Simple_R3S"].hide();
me["Simple_R3"].hide();
me["Simple_R3_Arrow"].hide();
me["Simple_C4B"].show();
if (num(fmgc.FMGCInternal.tow) >= 100.0) {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow * LBS2KGS));
} else {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow));
}
} else {
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow * LBS2KGS));
} else {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow));
}
}
me["Simple_R4"].setText("---.-");
me["Simple_R6"].setText("---.-/----");
me.colorLeft("ack", "wht", "wht", "wht", "wht", "wht");
me.colorRight("ack", "blu", "ack", "wht", "ack", "wht");
} else {
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L2"].setText(sprintf("%.1f/" ~ fmgc.FMGCInternal.tripTime, fmgc.FMGCInternal.tripFuel * LBS2KGS));
} else {
me["Simple_L2"].setText(sprintf("%.1f/" ~ fmgc.FMGCInternal.tripTime, fmgc.FMGCInternal.tripFuel));
}
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L3"].setText(sprintf("%.1f", fmgc.FMGCInternal.rteRsv * LBS2KGS));
} else {
me["Simple_L3"].setText(sprintf("%.1f", fmgc.FMGCInternal.rteRsv));
}
if (fmgc.FMGCInternal.rteRsvSet) {
if (num(fmgc.FMGCInternal.rteRsv) > 9.9 and num(fmgc.FMGCInternal.rtePercent) > 9.9) {
me["Simple_C3"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));
@ -2443,7 +2790,11 @@ var canvas_MCDU_base = {
}
}
if (fmgc.FMGCInternal.altAirportSet) {
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L4"].setText(sprintf("%.1f", fmgc.FMGCInternal.altFuel * LBS2KGS));
} else {
me["Simple_L4"].setText(sprintf("%.1f", fmgc.FMGCInternal.altFuel));
}
me["Simple_L4"].setColor(BLUE);
me["Simple_C4"].show();
if (fmgc.FMGCInternal.altFuelSet) {
@ -2464,7 +2815,11 @@ var canvas_MCDU_base = {
me["Simple_L4"].setColor(WHITE);
me["Simple_C4"].hide();
}
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L5"].setText(sprintf("%.1f", fmgc.FMGCInternal.finalFuel * LBS2KGS));
} else {
me["Simple_L5"].setText(sprintf("%.1f", fmgc.FMGCInternal.finalFuel));
}
if (fmgc.FMGCInternal.finalTimeSet and fmgc.FMGCInternal.finalFuelSet) {
if (num(fmgc.FMGCInternal.finalFuel) > 9.9) {
me["Simple_C5"].setText(sprintf("/%s ", fmgc.FMGCInternal.finalTime));
@ -2490,16 +2845,30 @@ var canvas_MCDU_base = {
me["Simple_C5"].setText(sprintf("/%s ", fmgc.FMGCInternal.finalTime));
}
}
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L6"].setText(sprintf("%.1f", fmgc.FMGCInternal.minDestFob * LBS2KGS));
} else {
me["Simple_L6"].setText(sprintf("%.1f", fmgc.FMGCInternal.minDestFob));
}
me["Simple_R2"].show();
me["INITB_Block"].hide();
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block * LBS2KGS));
} else {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block));
}
me["Simple_R3S"].hide();
me["Simple_R3"].hide();
me["Simple_R3_Arrow"].hide();
me["Simple_C4B"].hide();
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_R4"].setText(sprintf("%4.1f/", fmgc.FMGCInternal.tow * LBS2KGS) ~ sprintf("%4.1f", fmgc.FMGCInternal.lw * LBS2KGS));
me["Simple_R6"].setText(sprintf("%.1f/" ~ fmgc.FMGCInternal.extraTime, fmgc.FMGCInternal.extraFuel * LBS2KGS));
} else {
me["Simple_R4"].setText(sprintf("%4.1f/", fmgc.FMGCInternal.tow) ~ sprintf("%4.1f", fmgc.FMGCInternal.lw));
me["Simple_R6"].setText(sprintf("%.1f/" ~ fmgc.FMGCInternal.extraTime, fmgc.FMGCInternal.extraFuel));
}
me.colorLeft("ack", "grn", "blu", "ack", "blu", "blu");
me.colorRight("ack", "blu", "ack", "grn", "ack", "grn");
@ -2521,10 +2890,18 @@ var canvas_MCDU_base = {
if (fmgc.FMGCInternal.zfwSet) {
if (fmgc.FMGCInternal.zfw < 100) {
me["Simple_C1"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C1"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw * LBS2KGS));
} else {
me["Simple_C1"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw));
}
} else {
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C1"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw * LBS2KGS));
} else {
me["Simple_C1"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw));
}
}
me["Simple_C1"].show();
me["INITB_ZFW"].hide();
} else {
@ -2664,7 +3041,7 @@ var canvas_MCDU_base = {
me["Simple_R5S"].setText(" GW/ CG");
me["Simple_R6S"].setText("EXTRA/TIME");
if (!getprop("/FMGC/internal/fuel-request-set") or !getprop("/FMGC/internal/block-confirmed") or getprop("/FMGC/internal/fuel-calculating")) {
if (!fmgc.FMGCInternal.fuelRequest or !fmgc.FMGCInternal.blockConfirmed or fmgc.FMGCInternal.fuelCalculating) {
me["Simple_L3"].setText("---.-");
if (fmgc.FMGCInternal.rteRsvSet) {
me["Simple_C3B"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));
@ -2689,8 +3066,12 @@ var canvas_MCDU_base = {
me.colorLeft("ack", "ack", "wht", "wht", "wht", "wht");
me.colorRight("ack", "ack", "ack", "wht", "wht", "wht");
} else {
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L3"].setText(sprintf("%.1f", fmgc.FMGCInternal.rteRsv * LBS2KGS));
} else {
me["Simple_L3"].setText(sprintf("%.1f", fmgc.FMGCInternal.rteRsv));
}
if (fmgc.FMGCInternal.rteRsvSet) {
if (num(fmgc.FMGCInternal.rteRsv) > 9.9 and num(fmgc.FMGCInternal.rtePercent) > 9.9) {
me["Simple_C3B"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));
@ -2723,7 +3104,11 @@ var canvas_MCDU_base = {
}
}
if (fmgc.FMGCInternal.altAirportSet) {
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L4"].setText(sprintf("%.1f", fmgc.FMGCInternal.altFuel * LBS2KGS));
} else {
me["Simple_L4"].setText(sprintf("%.1f", fmgc.FMGCInternal.altFuel));
}
me["Simple_L4"].setColor(BLUE);
me["Simple_C4"].show();
if (fmgc.FMGCInternal.altFuelSet) {
@ -2744,7 +3129,11 @@ var canvas_MCDU_base = {
me["Simple_L4"].setColor(WHITE);
me["Simple_C4"].hide();
}
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L5"].setText(sprintf("%.1f", fmgc.FMGCInternal.finalFuel * LBS2KGS));
} else {
me["Simple_L5"].setText(sprintf("%.1f", fmgc.FMGCInternal.finalFuel));
}
if (fmgc.FMGCInternal.finalTimeSet and fmgc.FMGCInternal.finalFuelSet) {
if (num(fmgc.FMGCInternal.finalFuel) > 9.9) {
me["Simple_C5"].setText(sprintf("/%s ", fmgc.FMGCInternal.finalTime));
@ -2770,10 +3159,17 @@ var canvas_MCDU_base = {
me["Simple_C5"].setText(sprintf("/%s ", fmgc.FMGCInternal.finalTime));
}
}
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L6"].setText(sprintf("%.1f", fmgc.FMGCInternal.minDestFob * LBS2KGS));
me["Simple_R4"].setText(sprintf("%4.1f/" ~ fmgc.FMGCInternal.fffqSensor, fmgc.FMGCInternal.fob * LBS2KGS));
me["Simple_R5"].setText(sprintf("%4.1f/", fmgc.FMGCInternal.fuelPredGw * LBS2KGS) ~ sprintf("%4.1f", fmgc.FMGCInternal.cg));
me["Simple_R6"].setText(sprintf("%4.1f/" ~ fmgc.FMGCInternal.extraTime, fmgc.FMGCInternal.extraFuel * LBS2KGS));
} else {
me["Simple_L6"].setText(sprintf("%.1f", fmgc.FMGCInternal.minDestFob));
me["Simple_R4"].setText(sprintf("%4.1f/" ~ fmgc.FMGCInternal.fffqSensor, fmgc.FMGCInternal.fob));
me["Simple_R5"].setText(sprintf("%4.1f/", fmgc.FMGCInternal.fuelPredGw) ~ sprintf("%4.1f", fmgc.FMGCInternal.cg));
me["Simple_R6"].setText(sprintf("%4.1f/" ~ fmgc.FMGCInternal.extraTime, fmgc.FMGCInternal.extraFuel));
}
me.colorLeft("ack", "ack", "blu", "ack", "blu", "blu");
me.colorRight("ack", "ack", "blu", "grn", "grn", "grn");
@ -2792,10 +3188,18 @@ var canvas_MCDU_base = {
if (fmgc.FMGCInternal.zfwSet) {
if (fmgc.FMGCInternal.zfw < 100) {
me["Simple_C3"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C3"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw * LBS2KGS));
} else {
me["Simple_C3"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw));
}
} else {
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C3"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw * LBS2KGS));
} else {
me["Simple_C3"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw));
}
}
me["Simple_C3"].show();
me["FUELPRED_ZFW"].hide();
} else {
@ -3273,7 +3677,7 @@ var canvas_MCDU_base = {
me.fontLeft(0, 0, 0, symbol, 0, 0);
} else {
me["Simple_L1"].setText("SELECTED");
if (getprop("/it-autoflight/input/kts-mach")) {
if (fmgc.Input.ktsMach.getValue()) {
me["Simple_L4"].setText(sprintf(" %3.3f", getprop("/it-autoflight/input/mach")));
} else {
me["Simple_L4"].setText(sprintf(" %s", int(getprop("/it-autoflight/input/kts"))));
@ -3291,10 +3695,10 @@ var canvas_MCDU_base = {
}
me["Simple_L3S"].setText(" MANAGED");
if (getprop("/it-autoflight/input/kts-mach")) {
me["Simple_L3"].setText(sprintf(" %3.3f", getprop("/FMGC/internal/mng-spd")));
if (fmgc.Input.ktsMach.getValue()) {
me["Simple_L3"].setText(sprintf(" %3.3f", fmgc.FMGCInternal.mngSpd));
} else {
me["Simple_L3"].setText(sprintf(" %s", int(getprop("/FMGC/internal/mng-spd"))));
me["Simple_L3"].setText(sprintf(" %s", int(fmgc.FMGCInternal.mngSpd)));
}
me["Simple_L5S"].setText(" EXPEDITE");
@ -3414,7 +3818,7 @@ var canvas_MCDU_base = {
me.fontLeft(0, 0, 0, symbol, 0, 0);
} else {
me["Simple_L1"].setText("SELECTED");
if (getprop("/it-autoflight/input/kts-mach")) {
if (fmgc.Input.ktsMach.getValue()) {
me["Simple_L4"].setText(sprintf(" %3.3f", getprop("/it-autoflight/input/mach")));
} else {
me["Simple_L4"].setText(sprintf(" %s", int(getprop("/it-autoflight/input/kts"))));
@ -3434,10 +3838,10 @@ var canvas_MCDU_base = {
me["Simple_L2S"].setText(" CI");
me["Simple_L3S"].setText(" MANAGED");
if (getprop("/it-autoflight/input/kts-mach")) {
me["Simple_L3"].setText(sprintf(" %3.3f", getprop("/FMGC/internal/mng-spd")));
if (fmgc.Input.ktsMach.getValue()) {
me["Simple_L3"].setText(sprintf(" %3.3f", fmgc.FMGCInternal.mngSpd));
} else {
me["Simple_L3"].setText(sprintf(" %s", int(getprop("/FMGC/internal/mng-spd"))));
me["Simple_L3"].setText(sprintf(" %s", int(fmgc.FMGCInternal.mngSpd)));
}
me["Simple_R1S"].setText("DEST EFOB");
@ -3562,7 +3966,7 @@ var canvas_MCDU_base = {
me.fontLeft(0, 0, 0, symbol, 0, 0);
} else {
me["Simple_L1"].setText("SELECTED");
if (getprop("/it-autoflight/input/kts-mach")) {
if (fmgc.Input.ktsMach.getValue()) {
me["Simple_L4"].setText(sprintf(" %3.3f", getprop("/it-autoflight/input/mach")));
} else {
me["Simple_L4"].setText(sprintf(" %3.0f", getprop("/it-autoflight/input/kts")));
@ -3582,10 +3986,10 @@ var canvas_MCDU_base = {
me["Simple_L2S"].setText(" CI");
me["Simple_L3S"].setText(" MANAGED");
if (getprop("/it-autoflight/input/kts-mach")) {
me["Simple_L3"].setText(sprintf(" %3.3f", getprop("/FMGC/internal/mng-spd")));
if (fmgc.Input.ktsMach.getValue()) {
me["Simple_L3"].setText(sprintf(" %3.3f", fmgc.FMGCInternal.mngSpd));
} else {
me["Simple_L3"].setText(sprintf(" %3.0f", getprop("/FMGC/internal/mng-spd")));
me["Simple_L3"].setText(sprintf(" %3.0f", fmgc.FMGCInternal.mngSpd));
}
me["Simple_L5"].setText(" EXPEDITE");
@ -3732,7 +4136,7 @@ var canvas_MCDU_base = {
me["Simple_R3"].setText(sprintf("%.0f", getprop("/FMGC/internal/radio")));
me.fontRight(0, 0, default, 0, 0, 0);
me.fontSizeRight(0, 0, normal, 0, 0, 0);
} else if (getprop("/FMGC/internal/radio-no")) {
} else if (fmgc.FMGCInternal.radioNo) {
me["Simple_R3"].setText("NO");
me.fontRight(0, 0, default, 0, 0, 0);
me.fontSizeRight(0, 0, normal, 0, 0, 0);
@ -3745,7 +4149,7 @@ var canvas_MCDU_base = {
me["Simple_R4S"].setText("LDG CONF ");
me["Simple_R4"].setText("CONF3 ");
me["Simple_R5"].setText("FULL ");
if (ldg_config_3_set.getValue() == 1 and ldg_config_f_set.getValue() == 0) {
if (fmgc.FMGCInternal.ldgConfig3 == 1 and fmgc.FMGCInternal.ldgConfigFull == 0) {
me["PERFAPPR_LDG_3"].hide();
me["PERFAPPR_LDG_F"].show();
me.fontSizeRight(0, 0, 0, normal, small, 0);
@ -3769,7 +4173,7 @@ var canvas_MCDU_base = {
me["Simple_C5"].setText(sprintf("%3.0f", fmgc.FMGCInternal.vls_appr));
me["Simple_L5"].setText(sprintf("%3.0f", fmgc.FMGCInternal.vapp_appr));
me.fontLeft(0, 0, 0, 0, default, 0);
if (vapp_speed_set.getValue()) {
if (fmgc.FMGCInternal.vappSpeedSet) {
me.fontSizeLeft(0, 0, 0, 0, normal, 0);
} else {
me.fontSizeLeft(0, 0, 0, 0, small, 0);
@ -3779,7 +4183,7 @@ var canvas_MCDU_base = {
me["Simple_C2"].setText(" ---");
me["Simple_C3"].setText(" ---");
me["Simple_C5"].setText(" ---");
if (vapp_speed_set.getValue()) {
if (fmgc.FMGCInternal.vappSpeedSet) {
me["Simple_L5"].setText(sprintf("%3.0f", fmgc.FMGCInternal.vapp_appr));
me.fontLeft(0, 0, 0, 0, default, 0);
me.fontSizeLeft(0, 0, 0, 0, normal, 0);

View file

@ -12,7 +12,7 @@
viewBox="0 0 1024 864"
version="1.1"
id="svg2"
inkscape:version="1.0beta2 (2b71d25, 2019-12-03)"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="mcdu.svg">
<metadata
id="metadata375">
@ -37,17 +37,17 @@
guidetolerance="20"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1440"
inkscape:window-height="819"
inkscape:window-width="1366"
inkscape:window-height="705"
id="namedview371"
showgrid="true"
inkscape:zoom="0.78947164"
inkscape:cx="929.63178"
inkscape:cy="751.57487"
inkscape:window-x="481"
inkscape:window-y="23"
inkscape:window-maximized="0"
inkscape:current-layer="WIND"
inkscape:zoom="3.1578866"
inkscape:cx="1122.1906"
inkscape:cy="986.92422"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="false"
inkscape:snap-global="false"
units="px"
@ -1016,7 +1016,7 @@
inkscape:label="#g4241"
id="g4241">
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 952.4036,47.432743 H 923.87395"
id="path4480-4"
inkscape:connector-curvature="0"
@ -1026,9 +1026,9 @@
inkscape:connector-curvature="0"
id="path4482-0"
d="M 936.70791,32.6968 921.8587,47.4328"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 936.70791,62.1688 921.8587,47.4328"
id="path4484-0"
inkscape:connector-curvature="0"
@ -1069,7 +1069,7 @@
inkscape:label="#g4324"
id="g4324">
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 998.71909,284.70793 H 970.18944"
id="path4490-7"
inkscape:connector-curvature="0"
@ -1079,9 +1079,9 @@
inkscape:connector-curvature="0"
id="path4318-2"
d="m 994.54102,294.79468 -20.17351,-20.1735"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 984.45427,298.97275 -10e-6,-28.52964"
id="path4320-1"
inkscape:connector-curvature="0"
@ -1091,7 +1091,7 @@
inkscape:connector-curvature="0"
id="path4322-2"
d="m 974.36752,294.79468 20.17349,-20.1735"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</g>
</g>
@ -1103,7 +1103,7 @@
x="177.72771"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ffff00;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:51.2px;line-height:1.25;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:51.20000076px;line-height:1.25;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1"
y="68.861366"
x="177.72771"
id="tspan1240"
@ -1147,7 +1147,7 @@
inkscape:label="#g4241"
id="g186">
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 952.4036,47.432743 H 923.87395"
id="path180"
inkscape:connector-curvature="0"
@ -1157,9 +1157,9 @@
inkscape:connector-curvature="0"
id="path182"
d="M 936.70791,32.6968 921.8587,47.4328"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 936.70791,62.1688 921.8587,47.4328"
id="path184"
inkscape:connector-curvature="0"
@ -1200,7 +1200,7 @@
inkscape:label="#g4324"
id="g205">
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 998.71909,284.70793 H 970.18944"
id="path197"
inkscape:connector-curvature="0"
@ -1210,9 +1210,9 @@
inkscape:connector-curvature="0"
id="path199"
d="m 994.54102,294.79468 -20.17351,-20.1735"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 984.45427,298.97275 -10e-6,-28.52964"
id="path201"
inkscape:connector-curvature="0"
@ -1222,7 +1222,7 @@
inkscape:connector-curvature="0"
id="path203"
d="m 974.36752,294.79468 20.17349,-20.1735"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</g>
</g>
@ -1235,7 +1235,7 @@
inkscape:label="arrow5L"
id="arrow5L">
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 952.4036,47.432743 H 923.87395"
id="path301"
inkscape:connector-curvature="0"
@ -1245,9 +1245,9 @@
inkscape:connector-curvature="0"
id="path303"
d="M 936.70791,32.6968 921.8587,47.4328"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 936.70791,62.1688 921.8587,47.4328"
id="path305"
inkscape:connector-curvature="0"
@ -1263,9 +1263,9 @@
inkscape:connector-curvature="0"
id="path417"
d="M 952.4036,47.432743 H 923.87395"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 936.70791,32.6968 921.8587,47.4328"
id="path419"
inkscape:connector-curvature="0"
@ -1275,7 +1275,7 @@
inkscape:connector-curvature="0"
id="path421"
d="M 936.70791,62.1688 921.8587,47.4328"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
style="stroke:#bb6100;stroke-opacity:1"
@ -1283,7 +1283,7 @@
inkscape:label="arrow3L"
id="arrow3L">
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 952.4036,47.432743 H 923.87395"
id="path425"
inkscape:connector-curvature="0"
@ -1293,9 +1293,9 @@
inkscape:connector-curvature="0"
id="path427"
d="M 936.70791,32.6968 921.8587,47.4328"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 936.70791,62.1688 921.8587,47.4328"
id="path429"
inkscape:connector-curvature="0"
@ -1311,9 +1311,9 @@
inkscape:connector-curvature="0"
id="path433"
d="M 952.4036,47.432743 H 923.87395"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 936.70791,32.6968 921.8587,47.4328"
id="path435"
inkscape:connector-curvature="0"
@ -1323,7 +1323,7 @@
inkscape:connector-curvature="0"
id="path437"
d="M 936.70791,62.1688 921.8587,47.4328"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
style="stroke:#bb6100;stroke-opacity:1"
@ -1331,7 +1331,7 @@
inkscape:label="arrow1L"
id="arrow1L">
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 952.4036,47.432743 H 923.87395"
id="path471"
inkscape:connector-curvature="0"
@ -1341,9 +1341,9 @@
inkscape:connector-curvature="0"
id="path473"
d="M 936.70791,32.6968 921.8587,47.4328"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 936.70791,62.1688 921.8587,47.4328"
id="path475"
inkscape:connector-curvature="0"
@ -1359,9 +1359,9 @@
inkscape:connector-curvature="0"
id="path479"
d="M 952.4036,47.432743 H 923.87395"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 936.70791,32.6968 921.8587,47.4328"
id="path481"
inkscape:connector-curvature="0"
@ -1371,7 +1371,7 @@
inkscape:connector-curvature="0"
id="path483"
d="M 936.70791,62.1688 921.8587,47.4328"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
style="stroke:#bb6100;stroke-opacity:1"
@ -1379,7 +1379,7 @@
inkscape:label="arrow4R"
id="arrow4R">
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 952.4036,47.432743 H 923.87395"
id="path487"
inkscape:connector-curvature="0"
@ -1389,9 +1389,9 @@
inkscape:connector-curvature="0"
id="path489"
d="M 936.70791,32.6968 921.8587,47.4328"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 936.70791,62.1688 921.8587,47.4328"
id="path491"
inkscape:connector-curvature="0"
@ -1407,9 +1407,9 @@
inkscape:connector-curvature="0"
id="path495"
d="M 952.4036,47.432743 H 923.87395"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 936.70791,32.6968 921.8587,47.4328"
id="path497"
inkscape:connector-curvature="0"
@ -1419,7 +1419,7 @@
inkscape:connector-curvature="0"
id="path499"
d="M 936.70791,62.1688 921.8587,47.4328"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
style="stroke:#bb6100;stroke-opacity:1"
@ -1427,7 +1427,7 @@
inkscape:label="arrow2R"
id="arrow2R">
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 952.4036,47.432743 H 923.87395"
id="path503"
inkscape:connector-curvature="0"
@ -1437,9 +1437,9 @@
inkscape:connector-curvature="0"
id="path505"
d="M 936.70791,32.6968 921.8587,47.4328"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 936.70791,62.1688 921.8587,47.4328"
id="path507"
inkscape:connector-curvature="0"
@ -1455,9 +1455,9 @@
inkscape:connector-curvature="0"
id="path511"
d="M 952.4036,47.432743 H 923.87395"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 936.70791,32.6968 921.8587,47.4328"
id="path513"
inkscape:connector-curvature="0"
@ -1467,7 +1467,7 @@
inkscape:connector-curvature="0"
id="path515"
d="M 936.70791,62.1688 921.8587,47.4328"
style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#bb6100;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</g>
</g>
@ -2617,7 +2617,7 @@
id="tspan1088"
x="478.87796"
y="171.04486"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:63.9924px;line-height:1.25;font-family:'Helvetica Medium';-inkscape-font-specification:'Helvetica Medium, Medium';text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1">=</tspan></text>
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:63.99240112px;line-height:1.25;font-family:'Helvetica Medium';-inkscape-font-specification:'Helvetica Medium, Medium';text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1">=</tspan></text>
<text
inkscape:label="#text4244"
transform="scale(0.90642126,1.1032398)"
@ -2626,7 +2626,7 @@
x="478.87796"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:start;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:63.9924px;line-height:1.25;font-family:'Helvetica Medium';-inkscape-font-specification:'Helvetica Medium, Medium';text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:63.99240112px;line-height:1.25;font-family:'Helvetica Medium';-inkscape-font-specification:'Helvetica Medium, Medium';text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1"
y="278.32764"
x="478.87796"
id="tspan1091"
@ -2643,7 +2643,7 @@
id="tspan1094"
x="478.87796"
y="385.6102"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:63.9924px;line-height:1.25;font-family:'Helvetica Medium';-inkscape-font-specification:'Helvetica Medium, Medium';text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1">=</tspan></text>
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:63.99240112px;line-height:1.25;font-family:'Helvetica Medium';-inkscape-font-specification:'Helvetica Medium, Medium';text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1">=</tspan></text>
<g
style="stroke:#179ab7;stroke-opacity:1"
id="PERFAPPR_LDG_3"
@ -2654,9 +2654,9 @@
inkscape:connector-curvature="0"
id="path4376-0"
d="M 998.71909,284.70793 H 970.18944"
style="fill:none;stroke:#179ab7;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#179ab7;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 994.54102,294.79468 -20.17351,-20.1735"
id="path4378-3"
inkscape:connector-curvature="0"
@ -2666,9 +2666,9 @@
inkscape:connector-curvature="0"
id="path4380-9"
d="m 984.45427,298.97275 -10e-6,-28.52964"
style="fill:none;stroke:#179ab7;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#179ab7;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 974.36752,294.79468 20.17349,-20.1735"
id="path4382-8"
inkscape:connector-curvature="0"
@ -2680,7 +2680,7 @@
id="PERFAPPR_LDG_F"
style="stroke:#179ab7;stroke-opacity:1">
<path
style="fill:none;stroke:#179ab7;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 998.71909,284.70793 H 970.18944"
id="path1181"
inkscape:connector-curvature="0"
@ -2690,9 +2690,9 @@
inkscape:connector-curvature="0"
id="path1183"
d="m 994.54102,294.79468 -20.17351,-20.1735"
style="fill:none;stroke:#179ab7;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#179ab7;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 984.45427,298.97275 -10e-6,-28.52964"
id="path1185"
inkscape:connector-curvature="0"
@ -2702,7 +2702,7 @@
inkscape:connector-curvature="0"
id="path1187"
d="m 974.36752,294.79468 20.17349,-20.1735"
style="fill:none;stroke:#179ab7;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</g>
<g
@ -2825,7 +2825,7 @@
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:63.9924px;line-height:1.25;font-family:'Helvetica Medium';-inkscape-font-specification:'Helvetica Medium, Medium';text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1">=</tspan></text>
</g>
<g
style="stroke:#179ab7;stroke-opacity:1;opacity:0.94000004"
style="opacity:0.94000005;stroke:#179ab7;stroke-opacity:1"
id="NOTIFY"
inkscape:label="#g4324"
transform="matrix(1.0807111,0,0,1.0807111,-76.372598,-23.411021)">
@ -2833,7 +2833,7 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1243"
d="m 998.71909,284.70793 -28.52965,0"
d="M 998.71909,284.70793 H 970.18944"
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
@ -3129,4 +3129,177 @@
d="m 974.36752,294.79468 20.17349,-20.1735"
style="fill:none;stroke:#179ab7;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
transform="matrix(1.0807111,0,0,1.0807111,-76.372598,-141.09805)"
inkscape:label="#g4324"
id="ATISSend1"
style="opacity:0.94000005;stroke:#179ab7;stroke-opacity:1">
<path
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 998.71909,284.70793 H 970.18944"
id="path506"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path508"
d="m 994.54102,294.79468 -20.17351,-20.1735"
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 984.45427,298.97275 -10e-6,-28.52964"
id="path510"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path512"
d="m 974.36752,294.79468 20.17349,-20.1735"
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
transform="matrix(1.0807111,0,0,1.0807111,-76.372598,-23.411021)"
inkscape:label="#g4324"
id="ATISSend2"
style="opacity:0.94000005;stroke:#179ab7;stroke-opacity:1">
<path
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 998.71909,284.70793 H 970.18944"
id="path1321"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1323"
d="m 994.54102,294.79468 -20.17351,-20.1735"
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 984.45427,298.97275 -10e-6,-28.52964"
id="path1325"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1327"
d="m 974.36752,294.79468 20.17349,-20.1735"
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
transform="matrix(1.0807111,0,0,1.0807111,-76.462145,213.12578)"
inkscape:label="#g4324"
id="ATISSend4"
style="stroke:#179ab7;stroke-opacity:1">
<path
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 998.71909,284.70793 H 970.18944"
id="path1331"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1333"
d="m 994.54102,294.79468 -20.17351,-20.1735"
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 984.45427,298.97275 -10e-6,-28.52964"
id="path1335"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1337"
d="m 974.36752,294.79468 20.17349,-20.1735"
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
style="stroke:#179ab7;stroke-opacity:1"
id="ATISSend3"
inkscape:label="#g4324"
transform="matrix(1.0807111,0,0,1.0807111,-76.462145,94.951839)">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1341"
d="M 998.71909,284.70793 H 970.18944"
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 994.54102,294.79468 -20.17351,-20.1735"
id="path1343"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1345"
d="m 984.45427,298.97275 -10e-6,-28.52964"
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 974.36752,294.79468 20.17349,-20.1735"
id="path1347"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
<g
transform="translate(220.36572,-474.55648)"
id="ATISArrows"
inkscape:label="#WIND_UPDOWN">
<g
id="g1338"
inkscape:label="#g4241"
transform="matrix(0,1,1,0,667.65035,-414.17373)"
style="stroke:#ffffff;stroke-opacity:1">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1332"
d="M 952.4036,47.432743 H 923.87395"
style="fill:none;stroke:#ffffff;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#ffffff;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 936.70791,32.6968 921.8587,47.4328"
id="path1334"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1336"
d="M 936.70791,62.1688 921.8587,47.4328"
style="fill:none;stroke:#ffffff;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
style="stroke:#ffffff;stroke-opacity:1"
transform="matrix(0,-1,-1,0,801.59015,1459.2436)"
inkscape:label="#g4241"
id="g1346">
<path
style="fill:none;stroke:#ffffff;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 952.4036,47.432743 H 923.87395"
id="path1340"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path1342"
d="M 936.70791,32.6968 921.8587,47.4328"
style="fill:none;stroke:#ffffff;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:none;stroke:#ffffff;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 936.70791,62.1688 921.8587,47.4328"
id="path1344"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 171 KiB

View file

@ -335,12 +335,12 @@ canvas.NavDisplay.update_sub = func(){
canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft specific, cannot easily be reused by other aircraft
{
var _time = systime();
# Disables WXR Live if it"s not enabled. The toggle_weather_live should be common to all
# Disables WXR Live if it's not enabled. The toggle_weather_live should be common to all
# ND instances.
var wxr_live_enabled = getprop(wxr_live_tree~"/enabled");
if(wxr_live_enabled == nil or wxr_live_enabled == "")
var wxr_live_enabled = getprop(wxr_live_tree~'/enabled');
if(wxr_live_enabled == nil or wxr_live_enabled == '')
wxr_live_enabled = 0;
me.set_switch("toggle_weather_live", wxr_live_enabled);
me.set_switch('toggle_weather_live', wxr_live_enabled);
call(me.update_sub, nil, nil, caller(0)[0]); # call this in the same namespace to "steal" its variables
# MapStructure update!

View file

@ -25,16 +25,9 @@ var new = func(layer) {
};
layer.searcher._equals = func(l,r) l.equals(r);
m.addVisibilityListener();
var aircraft_dir = split('/', getprop("sim/aircraft-dir"))[-1];
var saved_conf = getprop("sim/fg-home") ~ "/Export/wxr_api.xml";
var df_conf = getprop("sim/fg-root") ~ "/Aircraft/" ~ aircraft_dir ~
"/Models/Instruments/ND/canvas/wxr_api.xml";
if(io.stat(saved_conf) != nil)
io.read_properties(saved_conf, wxr_tree);
else
io.read_properties(df_conf, wxr_tree);
return m;
};
var del = func() {
#print(name~".lcontroller.del()");
foreach (var l; me.listeners)
@ -43,9 +36,6 @@ var del = func() {
var searchCmd = func {
if(me.map.getRange() == nil) return [];
var api_key = getprop(wxr_tree~"/api-key");
if(!api_key or api_key == '' or api_key == 'YOUR API KEY')
return [];
var lat = getprop(wxr_tree~"/center/latitude-deg");
var lon = getprop(wxr_tree~"/center/longitude-deg");
@ -58,14 +48,9 @@ var searchCmd = func {
var result = geo.Coord.new();
result.set_latlon(lat, lon);
result.rangeNm = me.map.getRange();
result.key = api_key;
result.res = getprop(wxr_tree~"/resolution");
result.ltype = getprop(wxr_tree~"/layer-type");
result.smooth = getprop(wxr_tree~"/smooth");
result.fetchRad = getprop(wxr_tree~"/fetch-radius");
result.fetchRad = 184; # is this number accurate?
result.equals = func(r){
me.ltype == r.ltype and me.fetchRad == r.fetchRad and
me.lat == r.lat and me.lon == r.lon
me.fetchRad == r.fetchRad and me.lat == r.lat and me.lon == r.lon
};
return [result];

View file

@ -11,19 +11,18 @@ var getWXRImageFilePath = func(){
var home = getprop('sim/fg-home');
var aircraft = getprop('sim/aircraft');
var idx = me.layer.getCanvas()._node.getIndex();
return home ~ '/Export/' ~ aircraft ~ '-wxr-'~me.ltype~'-'~idx~'.png';
return home ~ '/Export/' ~ aircraft ~ '-wxr-'~idx~'.png';
};
var processRequest = func(r) {
var splitVector = split(",", r.response);
var timeStamp = split("]",splitVector[size(splitVector) - 1]);
return timeStamp[0];
};
var getWXRAPIUrl = func(lat, lon){
var res = me.res;
if(me.ltype == "radar"){
return "http://api.wunderground.com/api/"~me.key~
"/radar/image.png?centerlat="~lat~"&centerlon="~lon~
"&radius="~me.fetchRad~"&width="~res~"&height="~res~
"&smooth="~me.smooth;
} else {
return nil;
}
if (me.timeStamp == nil) { return nil; }
return "https://tilecache.rainviewer.com/v2/radar/" ~ sprintf("%s",me.timeStamp) ~ "/512/5/" ~ lat ~ "/" ~ lon ~ "/7/0_0.png";
};
var fetchWXRMap = func(size){
@ -34,15 +33,14 @@ var fetchWXRMap = func(size){
var url = me.getWXRAPIUrl(lat, lon);
var filePath = me.getWXRImageFilePath();
if(url == nil) {
print(me.name~': No URL!');
logprint(3,me.name,": No URL!");
return;
}
me.fetching = 1;
http.save(url, filePath)
.fail(func(){
print(me.name~': Download failed!');
me.wxlayer.hide();
})
logprint(3,me.name,":Download failed!");}
)
.done(func(){
var sz = size * 2;
var transl = -size;
@ -57,28 +55,28 @@ var fetchWXRMap = func(size){
setprop("instrumentation/wxr/center/latitude-deg", lat);
setprop("instrumentation/wxr/center/longitude-deg", lon);
me.fetching = 0;
print("[WXR] Live Layer Request: "~url); # Debugging
logprint(4,me.name,": Layer Request: ",url);
});
};
var init = func {
#print('WXR init');
me.fetching = 0;
me.key = me.model.key; # API Key from Wunderground API Subscription
me.res = me.model.res; # Resolution of image to fetch (default 2048)
me.ltype = me.model.ltype; # Layer Type - radar, satellite
me.smooth = me.model.smooth; # If we should fetch a smoothened image or the original
me.timeStamp = nil;
me.fetchRad = me.model.fetchRad; # Radius of radar layer to fetch
me.range = me.model.rangeNm; # Range of Navigation Display
me.viewport_radius = me.getOption('viewport_radius', 670);
me.wxlayer = me.element.createChild("image").set("z-index", -100).hide();
me.last_request = -210;
me.update_interval = 240;
me.last_request = -600;
me.update_interval = 600;
var r_scaled = (me.fetchRad*me.viewport_radius)/me.range;
me.fetchWXRMap(r_scaled);
me.timeStamp = nil;
http.load("https://api.rainviewer.com/public/maps.json").done(func(r) me.timeStamp = processRequest(r));
};
var draw = func {
@ -86,15 +84,12 @@ var draw = func {
var update_size = (range != me.range);
me.range = range;
me.fetchRad = me.model.fetchRad; # Radius of radar layer to fetch
#var r_scaled = (me.fetchRad*670)/me.range;
var r_scaled = (me.fetchRad*me.viewport_radius)/me.range;
var hdg = me.layer.map.getHdg();
var rot = 0 - hdg;
if(rot < 0) rot = 360 + rot;
if(rot < 0) rot = 360 + rot + -getprop("/environment/magnetic-variation-deg");
me.element.setRotation(rot*D2R);
if(update_size){
print('WXR draw range:'~ me.range);
print('Update size: '~r_scaled~'x2 = '~(r_scaled*2));
me.wxlayer.hide();
me.wxlayer.setSize(2*r_scaled, 2*r_scaled)
.setTranslation(-r_scaled, -r_scaled);
@ -102,12 +97,6 @@ var draw = func {
}
if(getprop("sim/time/elapsed-sec") - me.last_request > me.update_interval) {
#print('Fetching WXR map...');
me.key = me.model.key; # API Key from Wunderground API Subscription
me.res = me.model.res; # Resolution of image to fetch (default 2048)
me.ltype = me.model.ltype; # Layer Type - radar, satellite
me.smooth = me.model.smooth; # If we should fetch a smoothened image or the original
me.fetchWXRMap(r_scaled);
}
};

View file

@ -11,8 +11,6 @@
<!-- No button lights without power! -->
<animation>
<type>select</type>
<object-name>ACESSFeedBtn1F</object-name>
<object-name>ACESSFeedBtn2A</object-name>
<object-name>ACPack1Btn1F</object-name>
<object-name>ACPack1Btn2O</object-name>
<object-name>ACPack2Btn1F</object-name>
@ -95,6 +93,8 @@
<animation>
<type>select</type>
<object-name>ACESSFeedBtn1F</object-name>
<object-name>ACESSFeedBtn2A</object-name>
<object-name>AftCargoIsoBtn1F</object-name>
<object-name>AftCargoIsoBtn2O</object-name>
<object-name>AftCargoSmkBtn1S</object-name>
@ -355,7 +355,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
<mod-up>
<binding>
@ -416,7 +416,7 @@
</equals>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -464,7 +464,7 @@
</equals>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -872,7 +872,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -934,7 +934,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -996,7 +996,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -1230,7 +1230,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -1297,7 +1297,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -1364,7 +1364,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -1431,7 +1431,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -1498,7 +1498,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -1565,7 +1565,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -1632,7 +1632,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -1700,7 +1700,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -1767,7 +1767,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -1833,7 +1833,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -1876,7 +1876,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -1919,7 +1919,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -1964,7 +1964,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -2040,7 +2040,7 @@
</equals>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
<binding>
<condition>
@ -2126,7 +2126,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -2193,7 +2193,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -2260,7 +2260,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -2327,7 +2327,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -2395,7 +2395,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -2454,7 +2454,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -2519,7 +2519,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -2584,7 +2584,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -2648,7 +2648,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -2713,7 +2713,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -2778,7 +2778,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -2843,7 +2843,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -2909,7 +2909,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -2970,7 +2970,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -3037,7 +3037,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -3088,6 +3088,42 @@
</condition>
</animation>
<animation>
<type>pick</type>
<object-name>IDG1Prot</object-name>
<action>
<button>0</button>
<binding>
<command>property-toggle</command>
<property>controls/OH/protectors/idg1</property>
</binding>
<binding>
<condition>
<not>
<property>controls/OH/protectors/idg1</property>
</not>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-cover", 1);</script>
</binding>
</action>
</animation>
<animation>
<type>rotate</type>
<object-name>IDG1Prot</object-name>
<property>controls/OH/protectors/idg1</property>
<factor>-145</factor>
<axis>
<x1-m>-0.00898</x1-m>
<y1-m>-0.14623</y1-m>
<z1-m>-0.03502</z1-m>
<x2-m>-0.00898</x2-m>
<y2-m>-0.12327</y2-m>
<z2-m>-0.03502</z2-m>
</axis>
</animation>
<animation>
<name>IDG 1 pick</name>
<type>pick</type>
@ -3098,16 +3134,32 @@
<repeatable>false</repeatable>
<binding>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<property>/engines/engine[0]/n2-actual</property>
<value>14.0</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc-bat</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/OH/protectors/idg1</property>
<value>1</value>
</equals>
</and>
</condition>
<command>property-assign</command>
<property>controls/electrical/switches/idg-1-disc</property>
<value>0</value>
</binding>
<binding>
<condition>
<equals>
<property>controls/OH/protectors/idg1</property>
<value>1</value>
</equals>
</condition>
<command>property-assign</command>
<property>controls/electrical/switches/idg-1-disc-momentary</property>
<value>1</value>
@ -3118,6 +3170,17 @@
<property>controls/electrical/switches/idg-1-disc-momentary</property>
<value>0</value>
</binding>
<binding>
<condition>
<equals>
<property>controls/OH/protectors/idg1</property>
<value>1</value>
</equals>
</condition>
<command>property-assign</command>
<property>controls/OH/protectors/idg1</property>
<value>0</value>
</binding>
</mod-up>
</action>
</animation>
@ -3151,23 +3214,14 @@
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc-bat</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</or>
<property>/systems/electrical/sources/idg-1/gcu-1-powered</property>
</condition>
<command>property-toggle</command>
<property>controls/electrical/switches/gen-1</property>
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -3219,12 +3273,12 @@
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc-bat</property>
<value>25</value>
<property>systems/electrical/bus/ac-1</property>
<value>110</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
<property>systems/electrical/bus/ac-2</property>
<value>110</value>
</greater-than-equals>
</or>
</condition>
@ -3233,7 +3287,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -3284,17 +3338,14 @@
<repeatable>false</repeatable>
<binding>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/dc-bat</property>
<value>25</value>
</greater-than-equals> <!-- control is on DC BAT bus 301PP via 11 PB - so if you enter EMER ELEC with it turned off, too bad -->
<property>/systems/electrical/sources/apu/gcu-powered</property>
</condition>
<command>property-toggle</command>
<property>controls/electrical/switches/apu</property>
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -3365,7 +3416,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -3409,7 +3460,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -3473,23 +3524,14 @@
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>systems/electrical/bus/dc-bat</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<value>25</value>
</greater-than-equals>
</or>
<property>/systems/electrical/sources/idg-2/gcu-2-powered</property>
</condition>
<command>property-toggle</command>
<property>controls/electrical/switches/gen-2</property>
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -3528,6 +3570,42 @@
</condition>
</animation>
<animation>
<type>pick</type>
<object-name>IDG2Prot</object-name>
<action>
<button>0</button>
<binding>
<command>property-toggle</command>
<property>controls/OH/protectors/idg2</property>
</binding>
<binding>
<condition>
<not>
<property>controls/OH/protectors/idg2</property>
</not>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-cover", 1);</script>
</binding>
</action>
</animation>
<animation>
<type>rotate</type>
<object-name>IDG2Prot</object-name>
<property>controls/OH/protectors/idg2</property>
<factor>-145</factor>
<axis>
<x1-m>-0.00898</x1-m>
<y1-m> 0.12327</y1-m>
<z1-m>-0.03502</z1-m>
<x2-m>-0.00898</x2-m>
<y2-m> 0.14623</y2-m>
<z2-m>-0.03502</z2-m>
</axis>
</animation>
<animation>
<name>IDG 2 pick</name>
<type>pick</type>
@ -3538,16 +3616,32 @@
<repeatable>false</repeatable>
<binding>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/dc-ess</property>
<property>/engines/engine[1]/n2-actual</property>
<value>14.0</value>
</greater-than-equals>
<greater-than-equals>
<property>systems/electrical/bus/dc-bat</property>
<value>25</value>
</greater-than-equals>
<equals>
<property>controls/OH/protectors/idg2</property>
<value>1</value>
</equals>
</and>
</condition>
<command>property-assign</command>
<property>controls/electrical/switches/idg-2-disc</property>
<value>0</value>
</binding>
<binding>
<condition>
<equals>
<property>controls/OH/protectors/idg2</property>
<value>1</value>
</equals>
</condition>
<command>property-assign</command>
<property>controls/electrical/switches/idg-2-disc-momentary</property>
<value>1</value>
@ -3558,6 +3652,17 @@
<property>controls/electrical/switches/idg-2-disc-momentary</property>
<value>0</value>
</binding>
<binding>
<condition>
<equals>
<property>controls/OH/protectors/idg2</property>
<value>1</value>
</equals>
</condition>
<command>property-assign</command>
<property>controls/OH/protectors/idg2</property>
<value>0</value>
</binding>
</mod-up>
</action>
</animation>
@ -3607,7 +3712,7 @@
</equals>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
<mod-up>
<binding>
@ -3769,7 +3874,7 @@
</equals>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
<binding>
<condition>
@ -4130,7 +4235,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -4194,7 +4299,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -4267,7 +4372,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -4340,7 +4445,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -4406,7 +4511,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -4479,7 +4584,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -4553,7 +4658,7 @@
</equals>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
<binding>
<condition>
@ -4744,7 +4849,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -4821,7 +4926,7 @@
</equals>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
<binding>
<condition>
@ -5330,7 +5435,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -5391,7 +5496,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -5452,7 +5557,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -5517,7 +5622,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -5560,7 +5665,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -5611,7 +5716,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -5675,7 +5780,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -5747,7 +5852,7 @@
</equals>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
<binding>
<condition>
@ -5852,7 +5957,7 @@
</equals>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
<binding>
<condition>
@ -7237,7 +7342,7 @@
</mod-up>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -7283,7 +7388,7 @@
</mod-up>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -7403,7 +7508,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -7444,7 +7549,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
@ -7496,7 +7601,7 @@
</equals>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
<binding>
<condition>

View file

@ -55,6 +55,11 @@
<command>property-toggle</command>
<property>controls/fadec/n1mode1</property>
</binding>
<binding>
<command>property-assign</command>
<property>controls/OH/protectors/eng1-n1</property>
<value>0</value>
</binding>
<binding>
<condition>
<equals>
@ -63,35 +68,30 @@
</equals>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>Eng1N1Btn</object-name>
<object-name>Eng1N1Btn2O</object-name>
<object-name>Eng1N1Prot</object-name>
<action>
<button>1</button>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<command>property-toggle</command>
<property>controls/OH/protectors/eng1-n1</property>
<value>1</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>controls/OH/protectors/eng1-n1</property>
<value>0</value>
</binding>
<binding>
<condition>
<not>
<property>controls/OH/protectors/eng1-n1</property>
</not>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-cover", 1);</script>
</binding>
</mod-up>
</action>
</animation>
@ -156,6 +156,11 @@
<command>property-toggle</command>
<property>controls/fadec/n1mode2</property>
</binding>
<binding>
<command>property-assign</command>
<property>controls/OH/protectors/eng2-n1</property>
<value>0</value>
</binding>
<binding>
<condition>
<equals>
@ -164,35 +169,30 @@
</equals>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>Eng2N1Btn</object-name>
<object-name>Eng2N1Btn2O</object-name>
<object-name>Eng2N1Prot</object-name>
<action>
<button>1</button>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<command>property-toggle</command>
<property>controls/OH/protectors/eng2-n1</property>
<value>1</value>
</binding>
<mod-up>
<binding>
<command>property-assign</command>
<property>controls/OH/protectors/eng2-n1</property>
<value>0</value>
</binding>
<binding>
<condition>
<not>
<property>controls/OH/protectors/eng2-n1</property>
</not>
</condition>
<command>nasal</command>
<script>setprop("sim/sounde/oh-cover", 1);</script>
</binding>
</mod-up>
</action>
</animation>

View file

@ -53,7 +53,7 @@
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/oh-btn", 1);</script>
<script>libraries.pushbutton();</script>
</binding>
</action>
</animation>

View file

@ -12,9 +12,11 @@ var PFD1_display = nil;
var PFD2_display = nil;
var updateL = 0;
var updateR = 0;
var elapsedtime = 0;
var et = 0;
var altTens = 0;
var altPolarity = "";
var track_diff = 0;
var AICenter = nil;
# Fetch nodes:
var state1 = props.globals.getNode("/systems/thrust/state1", 1);
@ -34,7 +36,7 @@ var thr2 = props.globals.getNode("/controls/engines/engine[1]/throttle-pos", 1);
var wow0 = props.globals.getNode("/gear/gear[0]/wow");
var wow1 = props.globals.getNode("/gear/gear[1]/wow");
var wow2 = props.globals.getNode("/gear/gear[2]/wow");
var pitch = props.globals.getNode("/orientation/pitch-deg", 1);
var pitch = props.globals.getNode("/instrumentation/pfd/pitch-deg-non-linear", 1);
var roll = props.globals.getNode("/orientation/roll-deg", 1);
var elapsedtime = props.globals.getNode("/sim/time/elapsed-sec", 1);
var du1_lgt = props.globals.getNode("/controls/lighting/DU/du1", 1);
@ -126,6 +128,16 @@ var inner_marker = props.globals.getNode("/instrumentation/marker-beacon/inner",
var flap_config = props.globals.getNode("/controls/flight/flaps-input", 1);
var hundredAbove = props.globals.getNode("/instrumentation/pfd/hundred-above", 1);
var minimum = props.globals.getNode("/instrumentation/pfd/minimums", 1);
var aoa_1 = props.globals.getNode("/systems/navigation/adr/output/aoa-1", 1);
var aoa_2 = props.globals.getNode("/systems/navigation/adr/output/aoa-2", 1);
var aoa_3 = props.globals.getNode("/systems/navigation/adr/output/aoa-3", 1);
var adr_1_switch = props.globals.getNode("/controls/navigation/adirscp/switches/adr-1", 1);
var adr_2_switch = props.globals.getNode("/controls/navigation/adirscp/switches/adr-2", 1);
var adr_3_switch = props.globals.getNode("/controls/navigation/adirscp/switches/adr-3", 1);
var adr_1_fault = props.globals.getNode("/controls/navigation/adirscp/lights/adr-1-fault", 1);
var adr_2_fault = props.globals.getNode("/controls/navigation/adirscp/lights/adr-2-fault", 1);
var adr_3_fault = props.globals.getNode("/controls/navigation/adirscp/lights/adr-3-fault", 1);
var air_data_switch = props.globals.getNode("/controls/navigation/switching/air-data", 1);
# Create Nodes:
var alt_diff = props.globals.initNode("/instrumentation/pfd/alt-diff", 0.0, "DOUBLE");
@ -137,7 +149,7 @@ var horizon_ground = props.globals.initNode("/instrumentation/pfd/horizon-ground
var hdg_diff = props.globals.initNode("/instrumentation/pfd/hdg-diff", 0.0, "DOUBLE");
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 track_diff = props.globals.initNode("/instrumentation/pfd/track-hdg-diff", 0.0, "DOUBLE"); # returns incorrect value
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_offtime = props.globals.initNode("/instrumentation/du/du1-off-time", 0.0, "DOUBLE");
@ -200,6 +212,9 @@ var canvas_PFD_base = {
me.AI_horizon_hdg_trans = me["AI_heading"].createTransform();
me.AI_horizon_hdg_rot = me["AI_heading"].createTransform();
me.AI_fpv_trans = me["FPV"].createTransform();
me.AI_fpv_rot = me["FPV"].createTransform();
me.page = canvas_group;
return me;
@ -212,7 +227,7 @@ var canvas_PFD_base = {
"AI_agl_g","AI_agl","AI_error","AI_group","FD_roll","FD_pitch","ALT_box_flash","ALT_box","ALT_box_amber","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","machError","ilsError","ils_code","ils_freq","dme_dist","dme_dist_legend","ILS_HDG_R","ILS_HDG_L",
"ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","FS_targets","flap_max","clean_speed","ground","ground_ref"];
"ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError"];
},
updateDu1: func() {
var elapsedtime_act = elapsedtime.getValue();
@ -794,7 +809,7 @@ var canvas_PFD_base = {
} else {
me["AI_agl"].setColor(0.0509,0.7529,0.2941);
}
} else if (getprop("/FMGC/internal/radio-no")) {
} else if (fmgc.FMGCInternal.radioNo) {
me["FMA_dh"].setText("BARO");
me["FMA_dh"].show();
me["FMA_dhn"].setText("100");
@ -835,7 +850,7 @@ var canvas_PFD_base = {
me["FMA_dhn"].setText(sprintf("%.0f", getprop("/FMGC/internal/baro")));
me["FMA_dhn"].show();
me["FMA_nodh"].hide();
} else if (getprop("/FMGC/internal/radio-no")) {
} else if (fmgc.FMGCInternal.radioNo) {
me["FMA_dh"].setText("BARO");
me["FMA_dh"].show();
me["FMA_dhn"].setText("100");
@ -961,12 +976,15 @@ var canvas_PFD_base = {
me["HDG_target"].hide();
}
me["TRK_pointer"].setTranslation((math.clamp(track_diff.getValue(), -23.62, 23.62) / 10) * 98.5416, 0);
var heading_deg = heading.getValue();
track_diff = geo.normdeg180(track.getValue() - heading_deg);
me["TRK_pointer"].setTranslation(me.getTrackDiffPixels(track_diff),0);
split_ils = split("/", ils_data1.getValue());
if (ap_ils_mode.getValue() == 1 and size(split_ils) == 2) {
magnetic_hdg = ils_crs.getValue();
magnetic_hdg_dif = geo.normdeg180(magnetic_hdg - heading.getValue());
magnetic_hdg_dif = geo.normdeg180(magnetic_hdg - heading_deg);
if (magnetic_hdg_dif >= -23.62 and magnetic_hdg_dif <= 23.62) {
me["CRS_pointer"].setTranslation((magnetic_hdg_dif / 10) * 98.5416, 0);
me["ILS_HDG_R"].hide();
@ -1010,6 +1028,28 @@ var canvas_PFD_base = {
me.AI_horizon_hdg_rot.setRotation(-roll_cur * D2R, me["AI_center"].getCenter());
me["AI_heading"].update();
},
# Get Angle of Attack from ADR1 or, depending on Switching panel, ADR3
getAOAForPFD1: func() {
if (air_data_switch.getValue() != -1 and adr_1_switch.getValue() and !adr_1_fault.getValue()) return aoa_1.getValue();
if (air_data_switch.getValue() == -1 and adr_3_switch.getValue() and !adr_3_fault.getValue()) return aoa_3.getValue();
return nil;
},
# Get Angle of Attack from ADR2 or, depending on Switching panel, ADR3
getAOAForPFD2: func() {
if (air_data_switch.getValue() != 1 and adr_2_switch.getValue() and !adr_2_fault.getValue()) return aoa_2.getValue();
if (air_data_switch.getValue() == 1 and adr_3_switch.getValue() and !adr_3_fault.getValue()) return aoa_3.getValue();
return nil;
},
# Convert difference between magnetic heading and track measured in degrees to pixel for display on PFDs
# And set max and minimum values
getTrackDiffPixels: func(track_diff_deg) {
return ((math.clamp(track_diff_deg, -23.62, 23.62) / 10) * 98.5416);
},
};
var canvas_PFD_1 = {
@ -1066,6 +1106,14 @@ var canvas_PFD_1 = {
me["VS_group"].hide();
}
# Apparently SPD LIM only on captains PFD. I find this odd. But manual says it.
# Spd Lim Error
if (!fbw.FBW.Computers.fac1.getValue() and !fbw.FBW.Computers.fac2.getValue()) {
me["spdLimError"].show();
} else {
me["spdLimError"].hide();
}
# FD
if (fd1_act == 1 and ((!wow1_act and !wow2_act and roll_mode_cur != " ") or roll_mode_cur != " ") and ap_trk_sw.getValue() == 0 and pitch_cur < 25 and pitch_cur > -13 and roll_cur < 45 and roll_cur > -45) {
me["FD_roll"].show();
@ -1079,6 +1127,26 @@ var canvas_PFD_1 = {
me["FD_pitch"].hide();
}
# If TRK FPA selected, display FPV on PFD1
if (ap_trk_sw.getValue() == 0 ) {
me["FPV"].hide();
} else {
var aoa = me.getAOAForPFD1();
if (aoa == nil or (systems.ADIRS.ADIRunits[0].aligned != 1 and att_switch.getValue() == 0) or (systems.ADIRS.ADIRunits[2].aligned != 1 and att_switch.getValue() == -1)){
me["FPV"].hide();
} else {
var roll_deg = roll.getValue() or 0;
AICenter = me["AI_center"].getCenter();
var track_x_translation = me.getTrackDiffPixels(track_diff);
me.AI_fpv_trans.setTranslation(track_x_translation, math.clamp(aoa, -20, 20) * 12.5);
me.AI_fpv_rot.setRotation(-roll_deg * D2R, AICenter);
me["FPV"].setRotation(roll_deg * D2R); # It shouldn't be rotated, only the axis should be
me["FPV"].show();
}
}
# ILS
if (ap_ils_mode.getValue() == 1) {
me["LOC_scale"].show();
@ -1202,7 +1270,13 @@ var canvas_PFD_1 = {
}
me["ASI_scale"].setTranslation(0, me.ASI * 6.6);
if (fbw.FBW.Computers.fac1.getValue() or fbw.FBW.Computers.fac2.getValue()) {
me["ASI_max"].setTranslation(0, me.ASImax * -6.6);
me["ASI_max"].show();
} else {
me["ASI_max"].hide();
}
if (!fmgc.FMGCInternal.takeoffState and fmgc.FMGCInternal.phase >= 1 and !wow1.getValue() and !wow2.getValue()) {
me.FMGC_vls = fmgc.FMGCInternal.vls_min;
@ -1237,20 +1311,28 @@ var canvas_PFD_1 = {
} else {
me.ALPHAvsw = me.FMGC_vsw - 30 - me.ASI;
}
if (fbw.FBW.Computers.fac1.getValue() or fbw.FBW.Computers.fac2.getValue()) {
me["VLS_min"].setTranslation(0, me.VLSmin * -6.6);
me["VLS_min"].show();
if (getprop("/it-fbw/law") == 0) {
me["ALPHA_PROT"].setTranslation(0, me.ALPHAprot * -6.6);
me["ALPHA_MAX"].setTranslation(0, me.ALPHAmax * -6.6);
me["ALPHA_SW"].setTranslation(0, me.ALPHAvsw * -6.6);
if (getprop("/it-fbw/law") == 0) {
me["ALPHA_PROT"].show();
me["ALPHA_MAX"].show();
me["ALPHA_SW"].hide();
} else {
me["ALPHA_PROT"].hide();
me["ALPHA_MAX"].hide();
me["ALPHA_SW"].setTranslation(0, me.ALPHAvsw * -6.6);
me["ALPHA_SW"].show();
}
} else {
me["VLS_min"].hide();
me["ALPHA_PROT"].hide();
me["ALPHA_MAX"].hide();
me["ALPHA_SW"].hide();
}
}
tgt_ias = at_tgt_ias.getValue();
@ -1259,7 +1341,7 @@ var canvas_PFD_1 = {
if (managed_spd.getValue() == 1) {
if (getprop("/FMGC/internal/decel") == 1) {
if (getprop("/FMGC/internal/vapp-speed-set")) {
if (fmgc.FMGCInternal.vappSpeedSet) {
vapp = fmgc.FMGCInternal.vapp_appr;
} else {
vapp = fmgc.FMGCInternal.vapp;
@ -1403,6 +1485,7 @@ var canvas_PFD_1 = {
}
}
if (fbw.FBW.Computers.fac1.getValue() or fbw.FBW.Computers.fac2.getValue()) {
if (flap_config.getValue() == '1') {
me["F_target"].hide();
me["clean_speed"].hide();
@ -1419,7 +1502,7 @@ var canvas_PFD_1 = {
me.SPDstrgtdiff = tgt_S - ind_spd;
if (me.SPDstrgtdiff >= -42 and me.SPDstrgtdiff <= 42) {
if (me.SPDstrgtdiff >= -42 and me.SPDstrgtdiff <= 42 and gear_agl.getValue() >= 400) {
me["S_target"].show();
me["S_target"].setTranslation(0, me.Strgt * -6.6);
} else {
@ -1453,7 +1536,7 @@ var canvas_PFD_1 = {
me.SPDftrgtdiff = tgt_F - ind_spd;
if (me.SPDftrgtdiff >= -42 and me.SPDftrgtdiff <= 42) {
if (me.SPDftrgtdiff >= -42 and me.SPDftrgtdiff <= 42 and gear_agl.getValue() >= 400) {
me["F_target"].show();
me["F_target"].setTranslation(0, me.Ftrgt * -6.6);
} else {
@ -1487,7 +1570,7 @@ var canvas_PFD_1 = {
me.SPDftrgtdiff = tgt_F - ind_spd;
if (me.SPDftrgtdiff >= -42 and me.SPDftrgtdiff <= 42) {
if (me.SPDftrgtdiff >= -42 and me.SPDftrgtdiff <= 42 and gear_agl.getValue() >= 400) {
me["F_target"].show();
me["F_target"].setTranslation(0, me.Ftrgt * -6.6);
} else {
@ -1538,10 +1621,11 @@ var canvas_PFD_1 = {
me["flap_max"].hide();
}
}
if (gear_agl.getValue() < 400) {
} else {
me["S_target"].hide();
me["F_target"].hide();
me["clean_speed"].hide();
me["flap_max"].hide();
}
me.ASItrend = dmc.DMController.DMCs[0].outputs[6].getValue() - me.ASI;
@ -1690,13 +1774,13 @@ var canvas_PFD_1 = {
me["ground"].hide();
}
if (!getprop("/ECAM/alt-alert-flash") and !getprop("/ECAM/alt-alert-steady")) {
if (!ecam.altAlertFlash and !ecam.altAlertSteady) {
alt_going1 = 0;
amber_going1 = 0;
me["ALT_box_flash"].hide();
me["ALT_box_amber"].hide();
} else {
if (getprop("/ECAM/alt-alert-flash")) {
if (ecam.altAlertFlash) {
if (alt_going1 == 1) {
me["ALT_box_flash"].hide();
altTimer1.stop();
@ -1714,7 +1798,7 @@ var canvas_PFD_1 = {
} else {
me["ALT_box_amber"].show();
}
} elsif (getprop("/ECAM/alt-alert-steady")) {
} elsif (ecam.altAlertSteady) {
if (amber_going1 == 1) {
me["ALT_box"].show();
me["ALT_box_amber"].hide();
@ -1803,6 +1887,7 @@ var canvas_PFD_2 = {
me["VS_error"].show();
me["VS_group"].hide();
}
me["spdLimError"].hide();
# FD
if (fd2_act == 1 and ((!wow1_act and !wow2_act and roll_mode_cur != " ") or roll_mode_cur != " ") and ap_trk_sw.getValue() == 0 and pitch_cur < 25 and pitch_cur > -13 and roll_cur < 45 and roll_cur > -45) {
@ -1817,6 +1902,25 @@ var canvas_PFD_2 = {
me["FD_pitch"].hide();
}
# If TRK FPA selected, display FPV on PFD2
if (ap_trk_sw.getValue() == 0 ) {
me["FPV"].hide();
} else {
var aoa = me.getAOAForPFD2();
if (aoa == nil or (systems.ADIRS.ADIRunits[1].aligned != 1 and att_switch.getValue() == 0) or (systems.ADIRS.ADIRunits[2].aligned != 1 and att_switch.getValue() == 1)) {
me["FPV"].hide();
} else {
var roll_deg = roll.getValue() or 0;
AICenter = me["AI_center"].getCenter();
var track_x_translation = me.getTrackDiffPixels(track_diff);
me.AI_fpv_trans.setTranslation(track_x_translation, math.clamp(aoa, -20, 20) * 12.5);
me.AI_fpv_rot.setRotation(-roll_deg * D2R, AICenter);
me["FPV"].setRotation(roll_deg * D2R); # It shouldn't be rotated, only the axis should be
me["FPV"].show();
}
}
# ILS
if (ap_ils_mode2.getValue() == 1) {
me["LOC_scale"].show();
@ -1940,7 +2044,12 @@ var canvas_PFD_2 = {
}
me["ASI_scale"].setTranslation(0, me.ASI * 6.6);
if (fbw.FBW.Computers.fac1.getValue() or fbw.FBW.Computers.fac2.getValue()) {
me["ASI_max"].setTranslation(0, me.ASImax * -6.6);
me["ASI_max"].show();
} else {
me["ASI_max"].hide();
}
if (!fmgc.FMGCInternal.takeoffState and fmgc.FMGCInternal.phase >= 1 and !wow1.getValue() and !wow2.getValue()) {
me.FMGC_vls = fmgc.FMGCInternal.vls_min;
@ -1975,20 +2084,28 @@ var canvas_PFD_2 = {
} else {
me.ALPHAvsw = me.FMGC_vsw - 30 - me.ASI;
}
if (fbw.FBW.Computers.fac1.getValue() or fbw.FBW.Computers.fac2.getValue()) {
me["VLS_min"].setTranslation(0, me.VLSmin * -6.6);
me["VLS_min"].show();
if (getprop("/it-fbw/law") == 0) {
me["ALPHA_PROT"].setTranslation(0, me.ALPHAprot * -6.6);
me["ALPHA_MAX"].setTranslation(0, me.ALPHAmax * -6.6);
me["ALPHA_SW"].setTranslation(0, me.ALPHAvsw * -6.6);
if (getprop("/it-fbw/law") == 0) {
me["ALPHA_PROT"].show();
me["ALPHA_MAX"].show();
me["ALPHA_SW"].hide();
} else {
me["ALPHA_PROT"].hide();
me["ALPHA_MAX"].hide();
me["ALPHA_SW"].setTranslation(0, me.ALPHAvsw * -6.6);
me["ALPHA_SW"].show();
}
} else {
me["VLS_min"].hide();
me["ALPHA_PROT"].hide();
me["ALPHA_MAX"].hide();
me["ALPHA_SW"].hide();
}
}
tgt_ias = at_tgt_ias.getValue();
@ -1997,7 +2114,7 @@ var canvas_PFD_2 = {
if (managed_spd.getValue() == 1) {
if (getprop("/FMGC/internal/decel") == 1) {
if (getprop("/FMGC/internal/vapp-speed-set")) {
if (fmgc.FMGCInternal.vappSpeedSet) {
vapp = fmgc.FMGCInternal.vapp_appr;
} else {
vapp = fmgc.FMGCInternal.vapp;
@ -2023,7 +2140,6 @@ var canvas_PFD_2 = {
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) {
@ -2142,11 +2258,12 @@ var canvas_PFD_2 = {
}
}
if (fbw.FBW.Computers.fac1.getValue() or fbw.FBW.Computers.fac2.getValue()) {
if (flap_config.getValue() == '1') {
me["F_target"].hide();
me["clean_speed"].hide();
tgt_S = tgt_S = fmgc.FMGCInternal.slat;
tgt_S = fmgc.FMGCInternal.slat;
if (tgt_S <= 30) {
me.Strgt = 0 - me.ASI;
@ -2158,7 +2275,7 @@ var canvas_PFD_2 = {
me.SPDstrgtdiff = tgt_S - ind_spd;
if (me.SPDstrgtdiff >= -42 and me.SPDstrgtdiff <= 42) {
if (me.SPDstrgtdiff >= -42 and me.SPDstrgtdiff <= 42 and gear_agl.getValue() >= 400) {
me["S_target"].show();
me["S_target"].setTranslation(0, me.Strgt * -6.6);
} else {
@ -2180,7 +2297,7 @@ var canvas_PFD_2 = {
me["S_target"].hide();
me["clean_speed"].hide();
tgt_F = tgt_S = fmgc.FMGCInternal.flap2;
tgt_F = fmgc.FMGCInternal.flap2;
if (tgt_F <= 30) {
me.Ftrgt = 0 - me.ASI;
@ -2192,7 +2309,7 @@ var canvas_PFD_2 = {
me.SPDftrgtdiff = tgt_F - ind_spd;
if (me.SPDftrgtdiff >= -42 and me.SPDftrgtdiff <= 42) {
if (me.SPDftrgtdiff >= -42 and me.SPDftrgtdiff <= 42 and gear_agl.getValue() >= 400) {
me["F_target"].show();
me["F_target"].setTranslation(0, me.Ftrgt * -6.6);
} else {
@ -2214,7 +2331,7 @@ var canvas_PFD_2 = {
me["S_target"].hide();
me["clean_speed"].hide();
tgt_F = tgt_S = fmgc.FMGCInternal.flap3;
tgt_F = fmgc.FMGCInternal.flap3;
if (tgt_F <= 30) {
me.Ftrgt = 0 - me.ASI;
@ -2226,7 +2343,7 @@ var canvas_PFD_2 = {
me.SPDftrgtdiff = tgt_F - ind_spd;
if (me.SPDftrgtdiff >= -42 and me.SPDftrgtdiff <= 42) {
if (me.SPDftrgtdiff >= -42 and me.SPDftrgtdiff <= 42 and gear_agl.getValue() >= 400) {
me["F_target"].show();
me["F_target"].setTranslation(0, me.Ftrgt * -6.6);
} else {
@ -2253,7 +2370,7 @@ var canvas_PFD_2 = {
me["S_target"].hide();
me["F_target"].hide();
tgt_clean = tgt_S = fmgc.FMGCInternal.clean;
tgt_clean = fmgc.FMGCInternal.clean;
me.cleantrgt = tgt_clean - 30 - me.ASI;
me.SPDcleantrgtdiff = tgt_clean - ind_spd;
@ -2277,10 +2394,11 @@ var canvas_PFD_2 = {
me["flap_max"].hide();
}
}
if (gear_agl.getValue() < 400) {
} else {
me["S_target"].hide();
me["F_target"].hide();
me["clean_speed"].hide();
me["flap_max"].hide();
}
me.ASItrend = dmc.DMController.DMCs[1].outputs[6].getValue() - me.ASI;
@ -2428,13 +2546,13 @@ var canvas_PFD_2 = {
me["ground"].hide();
}
if (!getprop("/ECAM/alt-alert-flash") and !getprop("/ECAM/alt-alert-steady")) {
if (!ecam.altAlertFlash and !ecam.altAlertSteady) {
alt_going2 = 0;
amber_going2 = 0;
me["ALT_box_flash"].hide();
me["ALT_box_amber"].hide();
} else {
if (getprop("/ECAM/alt-alert-flash")) {
if (ecam.altAlertFlash) {
if (alt_going2 == 1) {
me["ALT_box_flash"].hide();
altTimer2.stop();
@ -2452,7 +2570,7 @@ var canvas_PFD_2 = {
} else {
me["ALT_box_amber"].hide();
}
} elsif (getprop("/ECAM/alt-alert-steady")) {
} elsif (ecam.altAlertSteady) {
if (amber_going2 == 1) {
me["ALT_box"].show();
me["ALT_box_amber"].hide();

View file

@ -0,0 +1,13 @@
Heading Tape:
123.177
61.5885
98.5416 is 123.177 in 1024
49.2708 is 61.5885 in 1024
Altitude Tape:
304.178
60.8357
243.3424 is 304.178 in 1024
48.66856 is 60.8357 in 1024

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 367 KiB

After

Width:  |  Height:  |  Size: 339 KiB

File diff suppressed because it is too large Load diff

View file

@ -41,9 +41,9 @@
inkscape:window-height="705"
id="namedview371"
showgrid="true"
inkscape:zoom="1.4142136"
inkscape:cx="832.32702"
inkscape:cy="561.61738"
inkscape:zoom="0.25"
inkscape:cx="971.41703"
inkscape:cy="1420.8195"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -76,11 +76,6 @@
height="8.496521"
x="691.55396"
y="692.57446" />
<path
id="path4447"
style="fill:none;fill-rule:evenodd;stroke:#575757;stroke-width:5.19999981;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 718.11442,596.89138 11.4047,16.81213 m -36.4425,-17.34853 -10.5797,15.51213 m 11.1047,-15.46213 24.4703,0.46213 m -35.5703,14.98787 47.0582,1.94289"
inkscape:connector-curvature="0" />
<text
inkscape:label="#text4219"
id="FlapTxt"
@ -94,6 +89,13 @@
x="729.04968"
id="tspan4331"
sodipodi:role="line">1+F</tspan></text>
<path
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.23279285;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 917.38445,644.30596 720.66027,597.47244"
id="FlapLine"
sodipodi:nodetypes="cc"
inkscape:label="#path1103"
inkscape:connector-curvature="0" />
<g
id="FlapDots"
inkscape:label="#g4344"
@ -102,11 +104,11 @@
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="rect4346"
d="m 636.15001,595.05001 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
d="m 636.16173,590.75725 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 590.60001,606.45001 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
d="m 590.60001,605.24377 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
id="path4349"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
@ -118,7 +120,7 @@
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 821.6363,589.13181 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
d="m 821.6363,592.59471 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
id="path4353"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
@ -126,11 +128,11 @@
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path4355"
d="m 867.18574,600.69907 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
d="m 867.18574,603.7664 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 913.00626,612.50775 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
d="m 913.00626,615.19254 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
id="path4357"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
@ -1264,485 +1266,6 @@
y="943.73566"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#cecdce">LINE 8</tspan></text>
</g>
<g
id="TO_Memo"
inkscape:label="#g4517">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4412"
y="686.0564"
x="14.033532"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="686.0564"
x="14.033532"
id="tspan4414"
sodipodi:role="line">T.O</tspan></text>
<path
style="fill:none;stroke:#0dc04b;stroke-width:2.4000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 13.8216,741.99564 77.932201,0"
id="path4556"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="686.0564"
id="TO_Autobrake"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4421"
x="104.6523"
y="686.0564"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">AUTO BRK</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="TO_Signs"
y="722.50458"
x="104.6523"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="722.50458"
x="104.6523"
id="tspan4425"
sodipodi:role="line">SIGNS</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="759.67883"
id="TO_Spoilers"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4429"
x="104.6523"
y="759.67883"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">SPLRS</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="TO_Flaps"
y="796.12726"
x="104.6523"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="796.12726"
x="104.6523"
id="tspan4436"
sodipodi:role="line">FLAPS </tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="833.30151"
id="TO_Config"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4440"
x="104.6523"
y="833.30151"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">T.O CONFIG</tspan></text>
<g
inkscape:label="#g4487"
id="TO_Autobrake_B">
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="686.41925"
id="text4442"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4444"
x="489.9281"
y="686.41925"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">MAX</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4462"
y="686.41925"
x="403.6488"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="686.41925"
x="403.6488"
id="tspan4465"
sodipodi:role="line">. . . . .</tspan></text>
</g>
<g
inkscape:label="#g4493"
id="TO_Signs_B">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4446"
y="722.50458"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="722.50458"
x="489.9281"
id="tspan4448"
sodipodi:role="line"> ON</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="424.27417"
y="722.86768"
id="text4471"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"
inkscape:transform-center-y="-46.367479"><tspan
sodipodi:role="line"
id="tspan4473"
x="424.27417"
y="722.86768"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4499"
id="TO_Spoilers_B">
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="760.04193"
id="text4450"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4452"
x="489.9281"
y="760.04193"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">ARM</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="403.6488"
y="760.04193"
id="text4475"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4477"
x="403.6488"
y="760.04193"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4505"
id="TO_Flaps_B">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4454"
y="796.12726"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.12726"
x="489.9281"
id="tspan4456"
sodipodi:role="line">T.O</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="424.27417"
y="796.49036"
id="text4479"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4481"
x="424.27417"
y="796.49036"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4511"
id="TO_Config_B">
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="833.30151"
id="text4458"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4460"
x="489.9281"
y="833.30151"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">TEST</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4483"
y="833.66461"
x="383.02429"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="833.66461"
x="383.02429"
id="tspan4485"
sodipodi:role="line">. . .</tspan></text>
</g>
</g>
<g
inkscape:label="#g4517"
id="LDG_Memo">
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="14.033532"
y="686.0564"
id="text4418"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan233"
x="14.033532"
y="686.0564"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">LDG</tspan></text>
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4424"
d="M 13.8216,741.99564 H 91.753801"
style="fill:none;stroke:#0dc04b;stroke-width:2.4000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="LDG_Gear"
y="686.0564"
x="104.6523"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="686.0564"
x="104.6523"
id="tspan4428"
sodipodi:role="line">LDG GEAR</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="722.50458"
id="LDG_Signs"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4432"
x="104.6523"
y="722.50458"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">SIGNS</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="759.37872"
id="LDG_Cabin"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan241"
x="104.6523"
y="759.37872"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">CABIN READY</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="LDG_Spoilers"
y="796.12726"
x="104.6523"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="796.12726"
x="104.6523"
id="tspan4438"
sodipodi:role="line">SPLRS</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="833.30151"
id="LDG_Flaps"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4442"
x="104.6523"
y="833.30151"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">FLAPS </tspan></text>
<g
id="LDG_Gear_B"
inkscape:label="#g4487">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4451"
y="686.41925"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="686.41925"
x="489.9281"
id="tspan4453"
sodipodi:role="line">DN</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="424.27417"
y="686.41925"
id="text4455"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4457"
x="424.27417"
y="686.41925"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . .</tspan></text>
</g>
<g
id="LDG_Signs_B"
inkscape:label="#g4493">
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="722.50458"
id="text4461"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4463"
x="489.9281"
y="722.50458"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"> ON</tspan></text>
<text
inkscape:transform-center-y="-46.367479"
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4465"
y="722.86768"
x="424.27417"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="722.86768"
x="424.27417"
id="tspan4467"
sodipodi:role="line">. . . . . . . . . .</tspan></text>
</g>
<g
id="LDG_Spoilers_B"
inkscape:label="#g4499">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4472"
y="796.49036"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.49036"
x="489.9281"
id="tspan4474"
sodipodi:role="line">ARM</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4476"
y="796.49036"
x="403.6488"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.49036"
x="403.6488"
id="tspan4478"
sodipodi:role="line">. . . . . . . . .</tspan></text>
</g>
<g
id="LDG_Flaps_B"
inkscape:label="#g4505"
transform="translate(0,39.990378)">
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="796.12726"
id="text4482"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4484"
x="489.9281"
y="796.12726"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">FULL</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4486"
y="796.49036"
x="383.02411"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.49036"
x="383.02411"
id="tspan4488"
sodipodi:role="line">. . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4505"
id="LDG_Flaps_B3">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text5125"
y="833.30151"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="833.30151"
x="489.9281"
id="tspan5127"
sodipodi:role="line">3</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="465.52426"
y="833.66461"
id="text5129"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan5131"
x="465.52426"
y="833.66461"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . . . . .</tspan></text>
</g>
</g>
<g
inkscape:label="#g4376"
id="ECAM_Right"
@ -1864,4 +1387,84 @@
x="650.08069"
y="575.68427"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.25px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">A-LOCK</tspan></text>
<path
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.44862556;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
d="M 555.26245,639.8335 691.24239,597.33411"
id="SlatLine"
inkscape:original-d="m 555.22993,639.86602 135.34892,-43.9598"
inkscape:label="#path1119"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
id="path4447"
style="fill:none;fill-rule:evenodd;stroke:#575757;stroke-width:5.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m 718.11442,596.89138 11.4047,16.81213 m -35.92874,-17.24909 -11.09346,15.41269 m 11.13785,-15.41241 24.43715,0.41241 m -35.5703,14.98787 47.0582,1.94289"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 928.84849,661.23101 -11.44541,-16.90649 38.53701,7.25587 v 15.15993 l -27.0916,-5.50931"
id="FlapIndicator"
sodipodi:nodetypes="ccccc"
inkscape:label="#path1093" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 530.43575,645.52404 24.69434,-5.55908 -11.10498,15.46142 -24.69434,5.56055 z"
id="SlatIndicator"
inkscape:label="#path1114" />
<rect
style="opacity:0.5;fill:none;fill-opacity:1;stroke:none;stroke-width:4.08072662;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
id="FlapLine_clip"
width="195.52469"
height="50.843338"
x="718.86694"
y="594.42938"
inkscape:label="#rect1023" />
<rect
inkscape:label="#rect1023"
y="594.05438"
x="554.93781"
height="48.089657"
width="137.63597"
id="SlatLine_clip"
style="opacity:0.5;fill:none;fill-opacity:1;stroke:none;stroke-width:3.34691048;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.71383667px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.7928459"
x="38.122616"
y="47.904297"
id="aFloor"
transform="scale(0.94595932,1.0571279)"
inkscape:label="#text1027"><tspan
sodipodi:role="line"
id="tspan1025"
x="38.122616"
y="47.904297"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:39.99999902px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#c56100;fill-opacity:1;stroke-width:0.7928459">A FLOOR</tspan></text>
<text
transform="scale(0.97051272,1.0303832)"
inkscape:label="#text4314"
id="FlxLimTemp"
y="122.78025"
x="919.25299"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40.71494293px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;"
y="122.78025"
x="919.25299"
id="tspan1029"
sodipodi:role="line">00</tspan></text>
<text
inkscape:label="#text4443"
id="FlxLimDegreesC"
y="108.14707"
x="1061.88"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
transform="scale(0.87983286,1.1365795)"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.25978088px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#179ab7;fill-opacity:1"
y="108.14707"
x="1061.88"
id="tspan1033"
sodipodi:role="line">°C</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 89 KiB

View file

@ -12,7 +12,7 @@
viewBox="0 0 1024 1024"
version="1.1"
id="svg2"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="iae-eis2.svg">
<metadata
id="metadata375">
@ -42,8 +42,8 @@
id="namedview371"
showgrid="false"
inkscape:zoom="0.43942712"
inkscape:cx="568.82143"
inkscape:cy="433.53356"
inkscape:cx="623.25944"
inkscape:cy="936.15332"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -97,11 +97,6 @@
height="8.496521"
x="691.55396"
y="692.57446" />
<path
id="path4447"
style="fill:none;fill-rule:evenodd;stroke:#575757;stroke-width:5.19999981;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 718.11442,596.89138 11.4047,16.81213 m -36.4425,-17.34853 -10.5797,15.51213 m 11.1047,-15.46213 24.4703,0.46213 m -35.5703,14.98787 47.0582,1.94289"
inkscape:connector-curvature="0" />
<text
inkscape:label="#text4219"
id="FlapTxt"
@ -115,6 +110,13 @@
x="729.04968"
id="tspan4331"
sodipodi:role="line">1+F</tspan></text>
<path
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.23279285;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 917.38445,644.30596 720.66027,597.47244"
id="FlapLine"
sodipodi:nodetypes="cc"
inkscape:label="#path1103"
inkscape:connector-curvature="0" />
<g
id="FlapDots"
inkscape:label="#g4344"
@ -123,11 +125,11 @@
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="rect4346"
d="m 636.15001,595.05001 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
d="m 636.16173,590.75725 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 590.60001,606.45001 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
d="m 590.60001,605.24377 9.50347,-2.225 -1.075,3.72508 -9.90347,2.525 z"
id="path4349"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
@ -139,7 +141,7 @@
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 821.6363,589.13181 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
d="m 821.6363,592.59471 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
id="path4353"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
@ -147,11 +149,11 @@
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path4355"
d="m 867.18574,600.69907 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
d="m 867.18574,603.7664 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#cecdce;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 913.00626,612.50775 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
d="m 913.00626,615.19254 -9.50347,-2.225 1.075,3.72508 9.90347,2.525 z"
id="path4357"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
@ -1632,485 +1634,6 @@
y="943.73566"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#cecdce">LINE 8</tspan></text>
</g>
<g
id="TO_Memo"
inkscape:label="#g4517">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4412"
y="686.0564"
x="14.033532"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="686.0564"
x="14.033532"
id="tspan4414"
sodipodi:role="line">T.O</tspan></text>
<path
style="fill:none;stroke:#0dc04b;stroke-width:2.4000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 13.8216,741.99564 77.932201,0"
id="path4556"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="686.0564"
id="TO_Autobrake"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4421"
x="104.6523"
y="686.0564"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">AUTO BRK</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="TO_Signs"
y="722.50458"
x="104.6523"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="722.50458"
x="104.6523"
id="tspan4425"
sodipodi:role="line">SIGNS</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="759.67883"
id="TO_Spoilers"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4429"
x="104.6523"
y="759.67883"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">SPLRS</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="TO_Flaps"
y="796.12726"
x="104.6523"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="796.12726"
x="104.6523"
id="tspan4436"
sodipodi:role="line">FLAPS </tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="833.30151"
id="TO_Config"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4440"
x="104.6523"
y="833.30151"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">T.O CONFIG</tspan></text>
<g
inkscape:label="#g4487"
id="TO_Autobrake_B">
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="686.41925"
id="text4442"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4444"
x="489.9281"
y="686.41925"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">MAX</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4462"
y="686.41925"
x="403.6488"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="686.41925"
x="403.6488"
id="tspan4465"
sodipodi:role="line">. . . . .</tspan></text>
</g>
<g
inkscape:label="#g4493"
id="TO_Signs_B">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4446"
y="722.50458"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="722.50458"
x="489.9281"
id="tspan4448"
sodipodi:role="line"> ON</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="424.27417"
y="722.86768"
id="text4471"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"
inkscape:transform-center-y="-46.367479"><tspan
sodipodi:role="line"
id="tspan4473"
x="424.27417"
y="722.86768"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4499"
id="TO_Spoilers_B">
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="760.04193"
id="text4450"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4452"
x="489.9281"
y="760.04193"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">ARM</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="403.6488"
y="760.04193"
id="text4475"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4477"
x="403.6488"
y="760.04193"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4505"
id="TO_Flaps_B">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4454"
y="796.12726"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.12726"
x="489.9281"
id="tspan4456"
sodipodi:role="line">T.O</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="424.27417"
y="796.49036"
id="text4479"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4481"
x="424.27417"
y="796.49036"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4511"
id="TO_Config_B">
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="833.30151"
id="text4458"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4460"
x="489.9281"
y="833.30151"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">TEST</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4483"
y="833.66461"
x="383.02429"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="833.66461"
x="383.02429"
id="tspan4485"
sodipodi:role="line">. . .</tspan></text>
</g>
</g>
<g
inkscape:label="#g4517"
id="LDG_Memo">
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="14.033532"
y="686.0564"
id="text4418"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4422"
x="14.033532"
y="686.0564"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">LDG</tspan></text>
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4424"
d="m 13.8216,741.99564 77.932201,0"
style="fill:none;stroke:#0dc04b;stroke-width:2.4000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="LDG_Gear"
y="686.0564"
x="104.6523"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="686.0564"
x="104.6523"
id="tspan4428"
sodipodi:role="line">LDG GEAR</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="722.50458"
id="LDG_Signs"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4432"
x="104.6523"
y="722.50458"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">SIGNS</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="759.37872"
id="LDG_Cabin"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4455"
x="104.6523"
y="759.37872"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">CABIN READY</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="LDG_Spoilers"
y="796.12726"
x="104.6523"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="796.12726"
x="104.6523"
id="tspan4438"
sodipodi:role="line">SPLRS</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="833.30151"
id="LDG_Flaps"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4442"
x="104.6523"
y="833.30151"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">FLAPS </tspan></text>
<g
id="LDG_Gear_B"
inkscape:label="#g4487">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4451"
y="686.41925"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="686.41925"
x="489.9281"
id="tspan4453"
sodipodi:role="line">DN</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="424.27417"
y="686.41925"
id="text4455"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4457"
x="424.27417"
y="686.41925"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . .</tspan></text>
</g>
<g
id="LDG_Signs_B"
inkscape:label="#g4493">
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="722.50458"
id="text4461"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4463"
x="489.9281"
y="722.50458"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"> ON</tspan></text>
<text
inkscape:transform-center-y="-46.367479"
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4465"
y="722.86768"
x="424.27417"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="722.86768"
x="424.27417"
id="tspan4467"
sodipodi:role="line">. . . . . . . . . .</tspan></text>
</g>
<g
id="LDG_Spoilers_B"
inkscape:label="#g4499">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4472"
y="796.49036"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.49036"
x="489.9281"
id="tspan4474"
sodipodi:role="line">ARM</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4476"
y="796.49036"
x="403.6488"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.49036"
x="403.6488"
id="tspan4478"
sodipodi:role="line">. . . . . . . . .</tspan></text>
</g>
<g
id="LDG_Flaps_B"
inkscape:label="#g4505"
transform="translate(0,39.990378)">
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="796.12726"
id="text4482"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4484"
x="489.9281"
y="796.12726"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">FULL</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4486"
y="796.49036"
x="383.02411"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.49036"
x="383.02411"
id="tspan4488"
sodipodi:role="line">. . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4505"
id="LDG_Flaps_B3">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text5125"
y="833.30151"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="833.30151"
x="489.9281"
id="tspan5127"
sodipodi:role="line">3</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="465.52426"
y="833.66461"
id="text5129"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan5131"
x="465.52426"
y="833.66461"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . . . . .</tspan></text>
</g>
</g>
<g
inkscape:label="#g4376"
id="ECAM_Right"
@ -2232,4 +1755,84 @@
x="650.08069"
y="575.68427"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.25px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">A-LOCK</tspan></text>
<path
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.44862556;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
d="M 555.26245,639.8335 691.24239,597.33411"
id="SlatLine"
inkscape:original-d="m 555.22993,639.86602 135.34892,-43.9598"
inkscape:label="#path1119"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
id="path4447"
style="fill:none;fill-rule:evenodd;stroke:#575757;stroke-width:5.19999981;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
d="m 718.11442,596.89138 11.4047,16.81213 m -35.92874,-17.24909 -11.09346,15.41269 m 11.13785,-15.41241 24.43715,0.41241 m -35.5703,14.98787 47.0582,1.94289"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 928.84849,661.23101 -11.44541,-16.90649 38.53701,7.25587 v 15.15993 l -27.0916,-5.50931"
id="FlapIndicator"
sodipodi:nodetypes="ccccc"
inkscape:label="#path1093" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 530.43575,645.52404 24.69434,-5.55908 -11.10498,15.46142 -24.69434,5.56055 z"
id="SlatIndicator"
inkscape:label="#path1114" />
<rect
style="opacity:0.5;fill:none;fill-opacity:1;stroke:none;stroke-width:4.08072662;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
id="FlapLine_clip"
width="195.52469"
height="50.843338"
x="718.86694"
y="594.42938"
inkscape:label="#rect1023" />
<rect
inkscape:label="#rect1023"
y="594.05438"
x="554.93781"
height="48.089657"
width="137.63597"
id="SlatLine_clip"
style="opacity:0.5;fill:none;fill-opacity:1;stroke:none;stroke-width:3.34691048;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.71383667px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.7928459"
x="38.122616"
y="47.904297"
id="aFloor"
transform="scale(0.94595932,1.0571279)"
inkscape:label="#text1027"><tspan
sodipodi:role="line"
id="tspan1025"
x="38.122616"
y="47.904297"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:39.99999902px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#c56100;fill-opacity:1;stroke-width:0.7928459">A FLOOR</tspan></text>
<text
transform="scale(0.97051272,1.0303832)"
inkscape:label="#text4314"
id="FlxLimTemp"
y="122.78025"
x="919.25299"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40.71494293px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;"
y="122.78025"
x="919.25299"
id="tspan1029"
sodipodi:role="line">00</tspan></text>
<text
inkscape:label="#text4443"
id="FlxLimDegreesC"
y="108.14707"
x="1061.88"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
transform="scale(0.87983286,1.1365795)"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.25978088px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#179ab7;fill-opacity:1"
y="108.14707"
x="1061.88"
id="tspan1033"
sodipodi:role="line">°C</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 KiB

After

Width:  |  Height:  |  Size: 604 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

View file

@ -4,7 +4,7 @@
<sim>
<model>
<livery>
<name>SWISS</name>
<name>Swiss (HB-JLS)</name>
<texture-fuselage>Liveries/A320/CFM/SWR-fuselage.png</texture-fuselage>
<texture-engine>Liveries/A320/CFM/SWR-engine.png</texture-engine>
</livery>
@ -12,8 +12,17 @@
</sim>
<options>
<EIS2 type="bool">0</EIS2>
<engine-name type="string">CFM56-5B4/P</engine-name>
<model-number type="string">A320-214</model-number>
<EIS2 type="bool">1</EIS2>
<company-options>
<idle-factor>+0.0</idle-factor>
<perf-factor>+1.0</perf-factor>
</company-options>
<model-options>
<registration type="string">HB-JLS</registration>
<three-letter type="string">SWR</three-letter>
<two-letter type="string">LX</two-letter>
<sharklet type="bool">0</sharklet>
<wifi-aft type="bool">0</wifi-aft>
<wifi-fwd type="bool">0</wifi-fwd>

View file

@ -17,7 +17,7 @@
<EIS2 type="bool">1</EIS2>
<company-options>
<idle-factor>+0.0</idle-factor>
<perf-factor>+1.0</perf-factor>
<perf-factor>+1.0</perf-factor> <!-- please see https://www.cockpitseeker.com/wp-content/uploads/goodies/ac/a320/pdf/data/PerfoMonitoring.pdf -->
</company-options>
<model-options>
<registration type="string">AB-CDE</registration>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

View file

@ -12,8 +12,17 @@
</sim>
<options>
<engine-name type="string">V2527-A5</engine-name>
<model-number type="string">A320-232</model-number>
<EIS2 type="bool">1</EIS2>
<company-options>
<idle-factor>+0.0</idle-factor>
<perf-factor>+0.0</perf-factor>
</company-options>
<model-options>
<registration type="string">N680AW</registration>
<three-letter type="string">AWE</three-letter>
<two-letter type="string">HP</two-letter>
<sharklet type="bool">0</sharklet>
<wifi-aft type="bool">0</wifi-aft>
<wifi-fwd type="bool">0</wifi-fwd>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 522 KiB

After

Width:  |  Height:  |  Size: 606 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 2.7 MiB

View file

@ -12,8 +12,17 @@
</sim>
<options>
<engine-name type="string">V2527-A5</engine-name>
<model-number type="string">A320-232</model-number>
<EIS2 type="bool">1</EIS2>
<company-options>
<idle-factor>+0.0</idle-factor>
<perf-factor>+0.0</perf-factor>
</company-options>
<model-options>
<registration type="string">OY-KAM</registration>
<three-letter type="string">SAS</three-letter>
<two-letter type="string">SK</two-letter>
<sharklet type="bool">0</sharklet>
<wifi-aft type="bool">1</wifi-aft>
<wifi-fwd type="bool">0</wifi-fwd>

View file

@ -26,7 +26,7 @@ var _unitconv = M2FT / 3.6;
var _debug = nil;
var _loop = func() {
if (!getprop("sim/model/autopush/available")) {
if (!getprop("/sim/model/autopush/available")) {
_stop();
return;
}
@ -37,9 +37,9 @@ var _loop = func() {
# Rollspeed is only adequate if the wheel is touching the ground.
if (getprop("gear/gear[0]/wow")) {
var V = getprop("gear/gear[0]/rollspeed-ms") * 3.6;
var deltaV = getprop("sim/model/autopush/target-speed-km_h") - V;
var deltaV = getprop("/sim/model/autopush/target-speed-km_h") - V;
var minus_dV = _V - V;
var time = getprop("sim/time/elapsed-sec");
var time = getprop("/sim/time/elapsed-sec");
var prop = math.min(math.max(_K_p * deltaV, -_F_p), _F_p);
var dt = time - _time;
var deriv = 0.0;
@ -63,24 +63,24 @@ var _loop = func() {
} else {
force = accel * getprop("fdm/yasim/gross-weight-lbs") * _unitconv;
}
var pitch = getprop("sim/model/autopush/pitch-deg") * D2R;
var pitch = getprop("/sim/model/autopush/pitch-deg") * D2R;
z = math.sin(pitch);
var pz = math.cos(pitch);
var yaw = getprop("sim/model/autopush/yaw") * _K_yaw;
var yaw = getprop("/sim/model/autopush/yaw") * _K_yaw;
x = math.cos(yaw) * pz;
y = math.sin(yaw) * pz;
setprop("sim/model/autopush/force-x", x);
setprop("sim/model/autopush/force-y", y);
setprop("/sim/model/autopush/force-x", x);
setprop("/sim/model/autopush/force-y", y);
# JSBSim force's z is down.
setprop("sim/model/autopush/force-z", -z);
setprop("/sim/model/autopush/force-z", -z);
}
setprop("sim/model/autopush/force-lbf", force);
setprop("/sim/model/autopush/force-lbf", force);
if (_yasim) {
# The force is divided by YASim thrust="100000.0" setting.
setprop("sim/model/autopush/force-x-yasim", x * force * 0.00001);
setprop("/sim/model/autopush/force-x-yasim", x * force * 0.00001);
# YASim force's y is to the left.
setprop("sim/model/autopush/force-y-yasim", -y * force * 0.00001);
setprop("sim/model/autopush/force-z-yasim", z * force * 0.00001);
setprop("/sim/model/autopush/force-y-yasim", -y * force * 0.00001);
setprop("/sim/model/autopush/force-z-yasim", z * force * 0.00001);
}
}
@ -89,26 +89,26 @@ var _timer = maketimer(0.0167, func{_loop()});
var _start = func() {
# Else overwritten by dialog.
settimer(func() {
setprop("sim/model/autopush/target-speed-km_h", 0.0)
setprop("/sim/model/autopush/target-speed-km_h", 0.0)
}, 0.1);
_K_p = getprop("sim/model/autopush/K_p");
_F_p = getprop("sim/model/autopush/F_p");
_K_i = getprop("sim/model/autopush/K_i");
_F_i = getprop("sim/model/autopush/F_i");
_K_d = getprop("sim/model/autopush/K_d");
_F_d = getprop("sim/model/autopush/F_d");
_F = getprop("sim/model/autopush/F");
_T_f = getprop("sim/model/autopush/T_f");
_K_yaw = getprop("sim/model/autopush/yaw-mult") * D2R;
_yasim = (getprop("sim/flight-model") == "yasim");
_debug = getprop("sim/model/autopush/debug") or 0;
_K_p = getprop("/sim/model/autopush/K_p");
_F_p = getprop("/sim/model/autopush/F_p");
_K_i = getprop("/sim/model/autopush/K_i");
_F_i = getprop("/sim/model/autopush/F_i");
_K_d = getprop("/sim/model/autopush/K_d");
_F_d = getprop("/sim/model/autopush/F_d");
_F = getprop("/sim/model/autopush/F");
_T_f = getprop("/sim/model/autopush/T_f");
_K_yaw = getprop("/sim/model/autopush/yaw-mult") * D2R;
_yasim = (getprop("/sim/flight-model") == "yasim");
_debug = getprop("/sim/model/autopush/debug") or 0;
_int = 0.0;
_V = 0.0;
_time = getprop("sim/time/elapsed-sec");
setprop("sim/model/autopush/connected", 1);
_time = getprop("/sim/time/elapsed-sec");
setprop("/sim/model/autopush/connected", 1);
if (!_timer.isRunning) {
if (getprop("sim/model/autopush/chocks")) {
setprop("sim/model/autopush/chocks", 0);
if (getprop("/sim/model/autopush/chocks")) {
setprop("/sim/model/autopush/chocks", 0);
screen.log.write("(pushback): Pushback connected, chocks removed. Please release brakes.");
} else {
screen.log.write("(pushback): Pushback connected, please release brakes.");
@ -122,18 +122,18 @@ var _stop = func() {
screen.log.write("(pushback): Pushback and bypass pin removed.");
}
_timer.stop();
setprop("sim/model/autopush/force-lbf", 0.0);
setprop("/sim/model/autopush/force-lbf", 0.0);
if (_yasim) {
setprop("sim/model/autopush/force-x-yasim", 0.0);
setprop("sim/model/autopush/force-y-yasim", 0.0);
setprop("/sim/model/autopush/force-x-yasim", 0.0);
setprop("/sim/model/autopush/force-y-yasim", 0.0);
}
setprop("sim/model/autopush/connected", 0);
setprop("sim/model/autopush/enabled", 0);
setprop("/sim/model/autopush/connected", 0);
setprop("/sim/model/autopush/enabled", 0);
}
setlistener("/sim/model/autopush/enabled", func(p) {
var enabled = p.getValue();
if ((enabled) and getprop("sim/model/autopush/available")) {
if ((enabled) and getprop("/sim/model/autopush/available")) {
_start();
} else {
_stop();

View file

@ -46,7 +46,7 @@ var _advance_wp = func(flip_sign = 0) {
}
var _loop = func() {
if (!getprop("sim/model/autopush/connected")) {
if (!getprop("/sim/model/autopush/connected")) {
stop();
return;
}
@ -56,7 +56,7 @@ var _loop = func() {
var deltapsi = geo.normdeg180(A - psi_leg);
var psi = getprop("orientation/heading-deg") + _push * 180.0;
var deltaA = math.min(math.max(_K_psi * geo.normdeg180(A - psi), -_F_psi), _F_psi);
var time = getprop("sim/time/elapsed-sec");
var time = getprop("/sim/time/elapsed-sec");
var dt = time - _time;
var minus_psidot = (dt > 0.002) * math.min(math.max(_K_psidot * (_psi - psi) / dt, -_F_psidot), _F_psidot);
_psi = psi;
@ -83,8 +83,8 @@ var _loop = func() {
if (_debug > 1) {
print("autopush_driver to_wp " ~ _to_wp ~ ", A " ~ geo.normdeg(A) ~ ", deltaA " ~ deltaA ~ ", minus_psidot " ~ minus_psidot);
}
setprop("sim/model/autopush/target-speed-km_h", _sign * V);
setprop("sim/model/autopush/steer-cmd-norm", steering);
setprop("/sim/model/autopush/target-speed-km_h", _sign * V);
setprop("/sim/model/autopush/steer-cmd-norm", steering);
}
var _timer = maketimer(0.051, func{_loop()});
@ -100,7 +100,7 @@ var start = func() {
gui.popupTip("Already moving");
return;
}
if (!getprop("sim/model/autopush/connected")) {
if (!getprop("/sim/model/autopush/connected")) {
gui.popupTip("Pushback not connected");
return;
}
@ -112,15 +112,15 @@ var start = func() {
} else {
autopush_route.done();
}
_K_V = getprop("sim/model/autopush/driver/K_V");
_F_V = getprop("sim/model/autopush/driver/F_V");
_R_turn_min = getprop("sim/model/autopush/min-turn-radius-m");
_D_stop = getprop("sim/model/autopush/stopping-distance-m");
_K_psi = getprop("sim/model/autopush/driver/K_psi");
_F_psi = getprop("sim/model/autopush/driver/F_psi");
_K_psidot = getprop("sim/model/autopush/driver/K_psidot");
_F_psidot = getprop("sim/model/autopush/driver/F_psidot");
_debug = getprop("sim/model/autopush/debug") or 0;
_K_V = getprop("/sim/model/autopush/driver/K_V");
_F_V = getprop("/sim/model/autopush/driver/F_V");
_R_turn_min = getprop("/sim/model/autopush/min-turn-radius-m");
_D_stop = getprop("/sim/model/autopush/stopping-distance-m");
_K_psi = getprop("/sim/model/autopush/driver/K_psi");
_F_psi = getprop("/sim/model/autopush/driver/F_psi");
_K_psidot = getprop("/sim/model/autopush/driver/K_psidot");
_F_psidot = getprop("/sim/model/autopush/driver/F_psidot");
_debug = getprop("/sim/model/autopush/debug") or 0;
if (!_to_wp) {
var (psi_park, D_park) = courseAndDistance(_route[0], _route[1]);
_push = (abs(geo.normdeg180(getprop("orientation/heading-deg") - psi_park)) > 90.0);
@ -128,7 +128,7 @@ var start = func() {
_advance_wp();
_psi = 0.0;
}
_time = getprop("sim/time/elapsed-sec");
_time = getprop("/sim/time/elapsed-sec");
_timer.start();
var endsign = _sign;
for (ii = _to_wp; ii < size(_route_reverse); ii += 1) {
@ -146,7 +146,7 @@ var start = func() {
var pause = func() {
_timer.stop();
setprop("sim/model/autopush/target-speed-km_h", 0.0);
setprop("/sim/model/autopush/target-speed-km_h", 0.0);
}
var stop = func() {

View file

@ -29,7 +29,7 @@ var _R_turn_min = 0;
var _invalid = 0;
# Make top-down view point north in old FG.
var __fg_version = num(string.replace(getprop("sim/version/flightgear"),".",""));
var __fg_version = num(string.replace(getprop("/sim/version/flightgear"),".",""));
if (__fg_version < 201920) {
_top_view_heading_offset_deg = 94.5;
}
@ -144,14 +144,14 @@ var top_view = func() {
return;
}
_top_view_index = view.indexof("Chase View Without Yaw");
_reset_view_index = getprop("sim/current-view/view-number");
setprop("sim/current-view/view-number", _top_view_index);
_view_pitch_offset_deg = getprop("sim/current-view/pitch-offset-deg");
_view_heading_offset_deg = getprop("sim/current-view/heading-offset-deg");
_view_z_offset = getprop("sim/current-view/z-offset-m");
setprop("sim/current-view/z-offset-m", -500.0);
setprop("sim/current-view/heading-offset-deg", _top_view_heading_offset_deg);
setprop("sim/current-view/pitch-offset-deg", 90.0);
_reset_view_index = getprop("/sim/current-view/view-number");
setprop("/sim/current-view/view-number", _top_view_index);
_view_pitch_offset_deg = getprop("/sim/current-view/pitch-offset-deg");
_view_heading_offset_deg = getprop("/sim/current-view/heading-offset-deg");
_view_z_offset = getprop("/sim/current-view/z-offset-m");
setprop("/sim/current-view/z-offset-m", -500.0);
setprop("/sim/current-view/heading-offset-deg", _top_view_heading_offset_deg);
setprop("/sim/current-view/pitch-offset-deg", 90.0);
_view_listener = setlistener("/sim/current-view/name", func {
_finalize_top_view();
}, 0, 0);
@ -164,11 +164,11 @@ var _finalize_top_view = func() {
removelistener(_view_listener);
_view_listener = nil;
# Go back to the view to restore settings, in case user has switched away.
setprop("sim/current-view/view-number", _top_view_index);
setprop("sim/current-view/z-offset-m", _view_z_offset);
setprop("sim/current-view/heading-offset-deg", _view_heading_offset_deg);
setprop("sim/current-view/pitch-offset-deg", _view_pitch_offset_deg);
setprop("sim/current-view/view-number", _reset_view_index);
setprop("/sim/current-view/view-number", _top_view_index);
setprop("/sim/current-view/z-offset-m", _view_z_offset);
setprop("/sim/current-view/heading-offset-deg", _view_heading_offset_deg);
setprop("/sim/current-view/pitch-offset-deg", _view_pitch_offset_deg);
setprop("/sim/current-view/view-number", _reset_view_index);
if (!_show) {
_clear_user_point_models();
_clear_waypoint_models();
@ -330,7 +330,7 @@ var _check_turn_radius = func() {
}
}
setprop("sim/model/autopush/route/invalid", _invalid);
setprop("/sim/model/autopush/route/invalid", _invalid);
}
setlistener("/sim/model/autopush/route/show", func(p) {
@ -351,7 +351,7 @@ setlistener("/sim/model/autopush/route/show", func(p) {
var enter = func() {
clear();
top_view();
_R_turn_min = getprop("sim/model/autopush/min-turn-radius-m");
_R_turn_min = getprop("/sim/model/autopush/min-turn-radius-m");
var wp = geo.aircraft_position();
var H = geo.elevation(wp.lat(), wp.lon());
if (H != nil) {
@ -362,7 +362,7 @@ var enter = func() {
_add(geo.click_position());
});
# This property can be overridden manually, if needed.
var wingspan = getprop("sim/model/autopush/route/wingspan-m");
var wingspan = getprop("/sim/model/autopush/route/wingspan-m");
if ((wingspan == nil) or (wingspan == 0.0)) {
# JSBSim
wingspan = getprop("fdm/jsbsim/metrics/bw-ft");
@ -372,7 +372,7 @@ var enter = func() {
# YAsim
wingspan = getprop("fdm/yasim/model/wings/wing/wing-span");
}
setprop("sim/model/autopush/route/wingspan-m", wingspan);
setprop("/sim/model/autopush/route/wingspan-m", wingspan);
}
}

View file

@ -10,12 +10,12 @@ var DMC = {
new: func(num) {
var d = { parents:[DMC] };
d.activeADIRS = num;
d.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)];
d.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)];
d.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)];
d.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)];
d.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)];
d.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)];
d.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)];
d.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)];
d.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)];
d.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)];
d.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)];
d.trends = [props.globals.getNode("instrumentation/pfd/speed-lookahead-1", 1), props.globals.getNode("instrumentation/pfd/speed-lookahead-2", 1), props.globals.getNode("instrumentation/pfd/speed-lookahead-3", 1)];
d.outputs = [nil, nil, nil, nil, nil, nil, nil]; # airspeed, altitude, mach, pfd altitude, sat, tat, speed trend
return d;
@ -70,7 +70,7 @@ var DMController = {
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].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;

View file

@ -12,10 +12,10 @@ var leftOverflow = props.globals.initNode("/ECAM/warnings/overflow-left", 0, "B
var rightOverflow = props.globals.initNode("/ECAM/warnings/overflow-right", 0, "BOOL");
var overflow = props.globals.initNode("/ECAM/warnings/overflow", 0, "BOOL");
var dc_ess = props.globals.getNode("systems/electrical/bus/dc-ess", 1);
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"), props.globals.initNode("/sim/sound/warnings/cricket", 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"), props.globals.initNode("/sim/sound/warnings/retard", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cchord", 0, "BOOL")];
var warningFlash = props.globals.initNode("/ECAM/warnings/master-warning-flash", 0, "BOOL");
var lineIndex = 0;
@ -31,6 +31,9 @@ var storeFirstWarning = nil;
var warningNodes = {
Logic: {
altitudeAlert: props.globals.initNode("/ECAM/warnings/altitude-alert/c-chord"),
altitudeAlertSteady: props.globals.initNode("/ECAM/warnings/altitude-alert/altitude-alert-steady"),
altitudeAlertFlash: props.globals.initNode("/ECAM/warnings/altitude-alert/altitude-alert-flash"),
crossbleedFault: props.globals.initNode("/ECAM/warnings/logic/crossbleed-fault"),
crossbleedWai: props.globals.initNode("/ECAM/warnings/logic/crossbleed-wai"),
bleed1LoTempUnsuc: props.globals.initNode("/ECAM/warnings/logic/bleed-1-lo-temp-unsucc"),
@ -58,7 +61,18 @@ var warningNodes = {
fac12Fault: props.globals.initNode("/ECAM/warnings/logic/fac-12-fault"),
fac1Fault: props.globals.initNode("/ECAM/warnings/logic/fac-1-fault"),
fac2Fault: props.globals.initNode("/ECAM/warnings/logic/fac-2-fault"),
stallWarn: props.globals.initNode("/ECAM/warnings/logic/stall/stall-warn-on"),
yawDamper12Fault: props.globals.initNode("/ECAM/warnings/logic/yaw-damper-12-fault"),
gearNotDown1: props.globals.initNode("/ECAM/warnings/fctl/gear-not-down-not-cancellable"),
gearNotDown2: props.globals.initNode("/ECAM/warnings/fctl/gear-not-down-cancellable"),
gearNotDownLocked: props.globals.initNode("/ECAM/warnings/fctl/gear-not-down-locked"),
gearNotDownLockedFlipflop: props.globals.initNode("/ECAM/warnings/fctl/gear-not-downlocked-output"),
blueGreen: props.globals.initNode("/ECAM/warnings/hyd/blue-green-failure"),
blueGreenFuel: props.globals.initNode("/ECAM/warnings/hyd/blue-green-fuel-consumpt"),
blueYellow: props.globals.initNode("/ECAM/warnings/hyd/blue-yellow-failure"),
blueYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/blue-yellow-fuel-consumpt"),
greenYellow: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-failure"),
greenYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-fuel-consumpt"),
},
Timers: {
apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"),
@ -78,6 +92,7 @@ var warningNodes = {
eng2AiceNotClsd: props.globals.initNode("/ECAM/warnings/timer/eng-aice-2-open-output"),
eng1AiceNotOpen: props.globals.initNode("/ECAM/warnings/timer/eng-aice-1-closed-output"),
eng2AiceNotOpen: props.globals.initNode("/ECAM/warnings/timer/eng-aice-2-closed-output"),
LRElevFault: props.globals.initNode("/ECAM/warnings/fctl/lrElevFault-output"),
waiLhiPr: props.globals.initNode("/ECAM/warnings/timer/wing-hi-pr-left"),
waiRhiPr: props.globals.initNode("/ECAM/warnings/timer/wing-hi-pr-right"),
pack1Fault: props.globals.initNode("/ECAM/warnings/timer/pack-1-fault-2"),
@ -90,10 +105,19 @@ var warningNodes = {
navTerrFault: props.globals.initNode("/ECAM/warnings/timer/nav-gpws-terr-fault"),
},
Flipflops: {
apuGenFault: props.globals.initNode("/ECAM/warnings/flipflop/apu-gen-fault"),
apuGenFaultOnOff: props.globals.initNode("/ECAM/warnings/flipflop/apu-gen-fault-on-off"),
bleed1LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-1-low-temp-flipflop-output"),
bleed2LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-2-low-temp-flipflop-output"),
gen1Fault: props.globals.initNode("/ECAM/warnings/flipflop/gen-1-fault"),
gen2Fault: props.globals.initNode("/ECAM/warnings/flipflop/gen-2-fault"),
gen1FaultOnOff: props.globals.initNode("/ECAM/warnings/flipflop/gen-1-fault-on-off"),
gen2FaultOnOff: props.globals.initNode("/ECAM/warnings/flipflop/gen-2-fault-on-off"),
pack1Ovht: props.globals.initNode("/ECAM/warnings/flipflop/pack-1-ovht"),
pack2Ovht: props.globals.initNode("/ECAM/warnings/flipflop/pack-2-ovht"),
parkBrk: props.globals.initNode("/ECAM/warnings/config/park-brk/park-brk-output"),
eng1ThrLvrAbvIdle: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-thr-lvr-abv-idle"),
eng2ThrLvrAbvIdle: props.globals.initNode("/ECAM/warnings/logic/eng/eng-2-thr-lvr-abv-idle"),
},
};
@ -152,7 +176,7 @@ var warning = {
me.noRepeat = 1;
},
sound: func() {
if (me.aural > 2) { return; }
if (me.aural > 3) { return; }
if (me.active == 0 and me.wasActive == 1) {
aural[me.aural].setBoolValue(0);
me.wasActive = 0;
@ -236,14 +260,21 @@ var status = {
var ECAM_controller = {
_recallCounter: 0,
_noneActive: 0,
counter: 0,
init: func() {
ECAMloopTimer.start();
me.counter = 0;
me.reset();
},
loop: func() {
if ((systems.ELEC.Bus.acEss.getValue() >= 110 or systems.ELEC.Bus.ac2.getValue() >= 110) and !getprop("systems/acconfig/acconfig-running")) {
if ((systems.ELEC.Bus.acEss.getValue() >= 110 or systems.ELEC.Bus.ac2.getValue() >= 110) and !pts.Acconfig.running.getBoolValue()) {
# update FWC phases
if (me.counter == 0) {
phaseLoop();
me.counter = 1;
return;
}
me.counter = 0;
# check active messages
messages_priority_3();
@ -274,7 +305,7 @@ var ECAM_controller = {
# write to ECAM
var counter = 0;
if (!getprop("systems/acconfig/autoconfig-running")) {
if (!pts.Acconfig.running.getBoolValue()) {
foreach (var w; warnings.vector) {
if (w.active == 1) {
if (counter < 9) {

File diff suppressed because it is too large Load diff

View file

@ -20,8 +20,6 @@ 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;
@ -42,7 +40,7 @@ var clrLight = 0;
var ECAM = {
_cachePage: "",
init: func() {
setprop("systems/gear/landing-gear-warning-light", 0);
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");
@ -61,8 +59,6 @@ var ECAM = {
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");

View file

@ -11,42 +11,33 @@
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 flap_not_zero = warning.new(msg: "F/CTL FLAP LVR NOT ZERO", colour: "r", aural: 0, light: 0, isMainMsg: 1),
var overspeed = warning.new(msg: "OVER SPEED", colour: "r", aural: 0, light: 0, isMainMsg: 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, isMainMsg: 1),
var dualFailModeSel = warning.new(msg: " -ENG MODE SEL.......IGN", colour: "c"),
var dualFailLevers = warning.new(msg: " -THR LEVERS........IDLE", colour: "c"),
var dualFailRelightSPD = warning.new(msg: " OPTIMUM RELIGHT SPD.280", colour: "c"),
var dualFailRelightSPDCFM = warning.new(msg: " OPTIMUM RELIGHT SPD.300", colour: "c"),
var dualFailElec = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"),
var dualFailRadio = warning.new(msg: " -VHF1/ATC1..........USE", colour: "c"),
var dualFailFAC = warning.new(msg: " -FAC 1......OFF THEN ON", colour: "c"),
var dualFailRelight = warning.new(msg: "•IF NO RELIGHT AFTER 30S", colour: "w", isMainMsg: 1),
var dualFailMasters = warning.new(msg: " -ENG MASTERS.OFF 30S/ON", colour: "c"),
var dualFailSuccess = warning.new(msg: " •IF UNSUCCESSFUL : ", colour: "w", isMainMsg: 1),
var dualFailAPU = warning.new(msg: " -APU (IF AVAIL)...START", colour: "c"),
var dualFailAPUwing = warning.new(msg: " -WING ANTI ICE......OFF", colour: "c"),
var dualFailAPUbleed = warning.new(msg: " -APU BLEED...........ON", colour: "c"),
var dualFailMastersAPU = warning.new(msg: " -ENG MASTERS.OFF 30S/ON", colour: "c"),
var dualFailSPDGD = warning.new(msg: " OPTIMUM SPEED.....G DOT", colour: "c"),
var dualFailAPPR = warning.new(msg: " •EARLY IN APPR : ", colour: "w", isMainMsg: 1),
var dualFailcabin = warning.new(msg: " -CAB SECURE.......ORDER", colour: "c"),
var dualFailrudd = warning.new(msg: " -USE RUDDER WITH CARE ", colour: "c"),
var dualFailflap = warning.new(msg: " -FOR LDG.....USE FLAP 3", colour: "c"),
var dualFail5000 = warning.new(msg: " •AT 5000 FT AGL : ", colour: "w", isMainMsg: 1),
var dualFailgear = warning.new(msg: " -L/G.........GRVTY EXTN", colour: "c"),
var dualFailfinalspeed = warning.new(msg: " TARGET SPEED.....150 KT", colour: "c"),
var dualFailtouch = warning.new(msg: " •AT TOUCH DOWN : ", colour: "w", isMainMsg: 1),
var dualFailmasteroff = warning.new(msg: " -ENG MASTERS........OFF", colour: "c"),
var dualFailapuoff = warning.new(msg: " -APU MASTER SW......OFF", colour: "c"),
var dualFailevac = warning.new(msg: " -EVAC..........INITIATE", colour: "c"),
var dualFailbatt = warning.new(msg: " -BAT 1+2............OFF", colour: "c"),
var allEngFail = warning.new(msg: "ENG ALL ENGINES FAILURE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
var allEngFailElec = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"),
var allEngFailSPD1 = warning.new(msg: " OPT RELIGHT SPD.260/.77", colour: "c"),
var allEngFailSPD2 = warning.new(msg: " OPT RELIGHT SPD.270/.77", colour: "c"),
var allEngFailSPD3 = warning.new(msg: " OPT RELIGHT SPD.280/.77", colour: "c"),
var allEngFailSPD4 = warning.new(msg: " OPT RELIGHT SPD.300/.77", colour: "c"),
var allEngFailAPU = warning.new(msg: " -APU..............START", colour: "c"),
var allEngFailLevers = warning.new(msg: " -THR LEVERS........IDLE", colour: "c"),
var allEngFailFAC = warning.new(msg: " -FAC 1......OFF THEN ON", colour: "c"),
var allEngFailGlide = warning.new(msg: " GLDG DIST: 2NM/1000FT", colour: "c"),
var allEngFailDiversion = warning.new(msg: " -DIVERSION.....INITIATE", colour: "c"),
var allEngFailProc = warning.new(msg: " -ALL ENG FAIL PROC.APPLY", colour: "c"),
# ENG 1 THR LEVER ABV IDLE
var eng1ThrLvrAbvIdle = warning.new(msg: "ENG 1 THR LEVER ABV IDLE", colour: "r", aural: 3, light: 0, isMainMsg: 1),
var eng1ThrLvrAbvIdle2 = warning.new(msg: " -THR LEVER 1.......IDLE", colour: "c"),
# ENG 2 THR LEVER ABV IDLE
var eng2ThrLvrAbvIdle = warning.new(msg: "ENG 2 THR LEVER ABV IDLE", colour: "r", aural: 3, light: 0, isMainMsg: 1),
var eng2ThrLvrAbvIdle2 = warning.new(msg: " -THR LEVER 2.......IDLE", colour: "c"),
# ENG 1 FIRE (flight)
var eng1Fire = warning.new(msg: "ENG 1 FIRE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
@ -63,17 +54,13 @@ var warnings = std.Vector.new([
var eng1FireGnlever = warning.new(msg: " -THR LEVERS........IDLE", colour: "c"),
var eng1FireGnstopped = warning.new(msg: " •WHEN A/C IS STOPPED:", colour: "w", isMainMsg: 1),
var eng1FireGnparkbrk = warning.new(msg: " -PARKING BRK.........ON", colour: "c"),
var eng1FireGnATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"),
var eng1FireGncrew = warning.new(msg: " -CABIN CREW.......ALERT", colour: "c"),
var eng1FireGnmaster = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"),
var eng1FireGnPB = warning.new(msg: " -ENG 1 FIRE P/B....PUSH", colour: "c"),
var eng1FireGnAgent1 = warning.new(msg: " -AGENT 1..........DISCH", colour: "c"),
var eng1FireGnAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"),
var eng1FireGnmaster2 = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"),
var eng1FireGnATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"),
var eng1FireGncrew = warning.new(msg: " -CABIN CREW.......ALERT", colour: "c"),
var eng1FireGnevac = warning.new(msg: " •IF EVAC RQRD:", colour: "w", isMainMsg: 1),
var eng1FireGnevacSw = warning.new(msg: " -EVAC COMMAND........ON", colour: "c"),
var eng1FireGnevacApu = warning.new(msg: " -APU MASTER SW......OFF", colour: "c"),
var eng1FireGnevacBat = warning.new(msg: " -BAT 1+2............OFF", colour: "c"),
var eng1FireGnEvac = warning.new(msg: " -EMER EVAC PROC...APPLY", colour: "c"),
# ENG 2 FIRE (flight)
var eng2Fire = warning.new(msg: "ENG 2 FIRE", colour: "r", aural: 0, light: 0, isMainMsg: 1),
@ -90,17 +77,13 @@ var warnings = std.Vector.new([
var eng2FireGnlever = warning.new(msg: " -THR LEVERS........IDLE", colour: "c"),
var eng2FireGnstopped = warning.new(msg: " •WHEN A/C IS STOPPED:", colour: "w", isMainMsg: 1),
var eng2FireGnparkbrk = warning.new(msg: " -PARKING BRK.........ON", colour: "c"),
var eng2FireGnATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"),
var eng2FireGncrew = warning.new(msg: " -CABIN CREW.......ALERT", colour: "c"),
var eng2FireGnmaster = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"),
var eng2FireGnPB = warning.new(msg: " -ENG 2 FIRE P/B....PUSH", colour: "c"),
var eng2FireGnAgent1 = warning.new(msg: " -AGENT 1..........DISCH", colour: "c"),
var eng2FireGnAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"),
var eng2FireGnmaster2 = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"),
var eng2FireGnATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"),
var eng2FireGncrew = warning.new(msg: " -CABIN CREW.......ALERT", colour: "c"),
var eng2FireGnevac = warning.new(msg: " •IF EVAC RQRD:", colour: "w", isMainMsg: 1),
var eng2FireGnevacSw = warning.new(msg: " -EVAC COMMAND........ON", colour: "c"),
var eng2FireGnevacApu = warning.new(msg: " -APU MASTER SW......OFF", colour: "c"),
var eng2FireGnevacBat = warning.new(msg: " -BAT 1+2............OFF", colour: "c"),
var eng2FireGnEvac = warning.new(msg: " -EMER EVAC PROC...APPLY", colour: "c"),
# APU FIRE
var apuFire = warning.new(msg: "APU FIRE ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "apu"),
@ -122,6 +105,21 @@ var warnings = std.Vector.new([
var rud_trim_config_1 = warning.new(msg: " NOT IN T.O. RANGE", colour: "r", aural: 0, light: 0),
var park_brk_config = warning.new(msg: "CONFIG PARK BRK ON", colour: "r", aural: 0, light: 0),
# FCTL L+R ELEV FAULT
var lrElevFault = warning.new(msg: "F/CTL L+R ELEV FAULT", colour: "r", aural: 0, light: 0, isMainMsg: 1),
var lrElevFaultSpeed = warning.new(msg: " MAX SPEED.......320/.77", colour: "c"),
var lrElevFaultTrim = warning.new(msg: " -MAN PITCH TRIM.....USE", colour: "c"),
var lrElevFaultSpdBrk = warning.new(msg: " SPD BRK......DO NOT USE", colour: "c"),
# Gear not down
var gearNotDown = warning.new(msg: "L/G GEAR NOT DOWN", colour: "r", aural: 0, light: 0, isMainMsg: 1),
var gearNotDownLocked = warning.new(msg: "L/G GEAR NOT DOWNLOCKED", colour: "r", aural: 0, light: 0, isMainMsg: 1),
var gearNotDownLockedRec = warning.new(msg: " -L/G LEVER......RECYCLE", colour: "c"),
var gearNotDownLockedWork = warning.new(msg: " •IF UNSUCCESSFUL:", colour: "c"),
var gearNotDownLocked120 = warning.new(msg: " AFTER 120S:", colour: "c"),
var gearNotDownLockedGrav = warning.new(msg: " -L/G.........GRVTY EXTN", colour: "c"),
# Autopilot off involuntary
var ap_offw = warning.new(msg: "AUTO FLT AP OFF", colour: "r", light: 0, isMainMsg: 1),
@ -161,6 +159,40 @@ var warnings = std.Vector.new([
var emerconfigProt = warning.new(msg: " (PROT LOST)", colour: "a"),
var emerconfigMaxSpeed = warning.new(msg: " MAX SPEED........320 KT", colour: "c"),
# B + Y LO PR
var hydBYloPr = warning.new(msg: "HYD B+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1),
var hydBYloPrRat = warning.new(msg: " MIN RAT SPD......140 KT", colour: "c"),
var hydBYloPrYElec = warning.new(msg: " -YELLOW ELEC PUMP....ON", colour: "c"),
var hydBYloPrRatOn = warning.new(msg: " -RAT.............MAN ON", colour: "c"),
var hydBYloPrBElec = warning.new(msg: " -BLUE ELEC PUMP.....OFF", colour: "c"),
var hydBYloPrYEng = warning.new(msg: " -YELLOW ENG 2 PUMP..OFF", colour: "c"),
var hydBYloPrMaxSpd = warning.new(msg: " MAX SPEED.......320/.77", colour: "c"),
var hydBYloPrMnvrCare = warning.new(msg: " MANEUVER WITH CARE", colour: "c"),
var hydBYloPrGaPitch = warning.new(msg: " FOR GA:MAX PITCH 15 DEG", colour: "c"),
var hydBYloPrFuelCnsmpt = warning.new(msg: " FUEL CONSUMPT INCRSD", colour: "c"),
var hydBYloPrFmsPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"),
# G + B LO PR
var hydGBloPr = warning.new(msg: "HYD G+B SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1),
var hydGBloPrRat = warning.new(msg: " MIN RAT SPD......140 KT", colour: "c"),
var hydGBloPrRatOn = warning.new(msg: " -RAT.............MAN ON", colour: "c"),
var hydGBloPrBElec = warning.new(msg: " -BLUE ELEC PUMP.....OFF", colour: "c"),
var hydGBloPrGEng = warning.new(msg: " -GREEN ENG 1 PUMP...OFF", colour: "c"),
var hydGBloPrMnvrCare = warning.new(msg: " MANEUVER WITH CARE", colour: "c"),
var hydGBloPrGaPitch = warning.new(msg: " FOR GA:MAX PITCH 15 DEG", colour: "c"),
var hydGBloPrFuelCnsmpt = warning.new(msg: " FUEL CONSUMPT INCRSD", colour: "c"),
var hydGBloPrFmsPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"),
# G + Y LO PR
var hydGYloPr = warning.new(msg: "HYD G+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1),
var hydGYloPrPtu = warning.new(msg: " -PTU................OFF", colour: "c"),
var hydGYloPrGEng = warning.new(msg: " -GREEN ENG 1 PUMP...OFF", colour: "c"),
var hydGYloPrYEng = warning.new(msg: " -YELLOW ENG 2 PUMP..OFF", colour: "c"),
var hydGYloPrYElec = warning.new(msg: " -YELLOW ELEC PUMP....ON", colour: "c"),
var hydGYloPrMnvrCare = warning.new(msg: " MANEUVER WITH CARE", colour: "c"),
var hydGYloPrFuelCnsmpt = warning.new(msg: " FUEL CONSUMPT INCRSD", colour: "c"),
var hydGYloPrFmsPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"),
# DC EMER CONFIG
var dcEmerconfig = warning.new(msg: "ELEC DC EMER CONFIG", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var dcEmerconfigManOn = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"),
@ -212,9 +244,27 @@ var warnings = std.Vector.new([
var dcBusEssShedIcing = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"),
# AC ESS BUS SHED
var acBusEssShed = warning.new(msg: "ELEC DC ESS BUS SHED", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var acBusEssShed = warning.new(msg: "ELEC AC ESS BUS SHED", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var acBusEssShedAtc = warning.new(msg: " -ATC..............SYS 2", colour: "c"),
# GEN 1 FAULT
var gen1fault = warning.new(msg: "ELEC GEN 1 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var gen1faultGen = warning.new(msg: "-GEN 1......OFF THEN ON", colour: "c"),
var gen1faultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
var gen1faultGen3 = warning.new(msg: "-GEN 1..............OFF", colour: "c"),
# GEN 2 FAULT
var gen2fault = warning.new(msg: "ELEC GEN 2 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var gen2faultGen = warning.new(msg: "-GEN 2......OFF THEN ON", colour: "c"),
var gen2faultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
var gen2faultGen3 = warning.new(msg: "-GEN 2..............OFF", colour: "c"),
# APU GEN FAULT
var apuGenfault = warning.new(msg: "ELEC APU GEN FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var apuGenfaultGen = warning.new(msg: "-APU GEN....OFF THEN ON", colour: "c"),
var apuGenfaultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
var apuGenfaultGen3 = warning.new(msg: "-APU GEN............OFF", colour: "c"),
# Autothrust
var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var athr_offw_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
@ -237,7 +287,8 @@ var warnings = std.Vector.new([
var fac12FaultSuccess = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
var fac12FaultFacOff = warning.new(msg: " -FAC 1+2............OFF", colour: "c"),
var yawDamperSysFault = warning.new(msg: "AUTO FLT YAW DAMPER SYS", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var yawDamperSysFaultFac = warning.new(msg: " -FAC 1+2....OFF THEN ON", colour: "c"),
var yawDamperSysFaultFac1 = warning.new(msg: " -FAC 1......OFF THEN ON", colour: "c"),
var yawDamperSysFaultFac2 = warning.new(msg: " -FAC 2......OFF THEN ON", colour: "c"),
# var rudderTrimSysFault = warning.new(msg: "AUTO FLT RUD TRIM SYS", colour: "a", aural: 1, light: 1, isMainMsg: 1), not implemented
# var rudderTrimSysFaultFac = warning.new(msg: " -FAC 1+2....OFF THEN ON", colour: "c"),
var rudTravLimSysFault = warning.new(msg: "AUTO FLT RUD TRV LIM SYS", colour: "a", aural: 1, light: 1, isMainMsg: 1),
@ -492,11 +543,9 @@ var memos = std.Vector.new([
var pred_ws_off = memo.new(msg: "PRED W/S OFF"), # Not yet implemented
var terr_stby = memo.new(msg: "TERR STBY" ), # Not yet implemented
var tcas_stby = memo.new(msg: "TCAS STBY" ), # Not yet implemented
var acars_call = memo.new(msg: "ACARS CALL" ), # Not yet implemented
var company_call = memo.new(msg: "COMPANY CALL"),
var satcom_alert = memo.new(msg: "SATCOM ALERT"), # Not yet implemented
var acars_msg = memo.new(msg: "ACARS MSG" ), # Not yet implemented
var company_msg = memo.new(msg: "COMPANY MSG" ), # Not yet implemented
var company_msg = memo.new(msg: "COMPANY MSG" ),
var eng_aice = memo.new(msg: "ENG A.ICE" ),
var wing_aice = memo.new(msg: "WING A.ICE" ),
var ice_not_det = memo.new(msg: "ICE NOT DET" ), # Not yet implemented
@ -510,7 +559,6 @@ var memos = std.Vector.new([
var gpws_flap3 = memo.new(msg: "GPWS FLAP 3" ),
var hf_data_ovrd = memo.new(msg: "HF DATA OVRD"), # Not yet implemented
var hf_voice = memo.new(msg: "HF VOICE" ), # Not yet implemented
var acars_stby = memo.new(msg: "ACARS STBY" ), # Not yet implemented
var vhf3_voice = memo.new(msg: "VHF3 VOICE" ),
var auto_brk_lo = memo.new(msg: "AUTO BRK LO" ),
var auto_brk_med = memo.new(msg: "AUTO BRK MED"),

View file

@ -2,19 +2,14 @@
# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
var twoEngOff = 0;
var myPhase = nil;
var eng = nil;
var eng1epr = nil;
var eng2epr = nil;
var eng1n1 = nil;
var eng2n1 = nil;
var eng1n2 = nil;
var eng2n2 = nil;
var eprlim = nil;
var master1 = nil;
var master2 = nil;
var n1lim = nil;
var gear_agl_cur = nil;
var FWC = {
@ -29,7 +24,7 @@ var FWC = {
phase5: props.globals.initNode("/ECAM/phases/monostable/phase-5", 0, "BOOL"),
phase7: props.globals.initNode("/ECAM/phases/monostable/phase-7", 0, "BOOL"),
phase9: props.globals.initNode("/ECAM/phases/monostable/phase-9", 0, "BOOL"),
phase1Output: props.globals.initNode("/ECAM/phases/monostable/phase-1-output"),
phase1Output: props.globals.initNode("/ECAM/phases/monostable/phase-1-300-output"),
phase5Output: props.globals.initNode("/ECAM/phases/monostable/phase-5-output"),
phase7Output: props.globals.initNode("/ECAM/phases/monostable/phase-7-output"),
phase9Output: props.globals.initNode("/ECAM/phases/monostable/phase-9-output"),
@ -53,24 +48,28 @@ var FWC = {
Logic: {
gnd: props.globals.getNode("/ECAM/ground-calc-immediate"),
IRSinAlign: props.globals.initNode("/ECAM/irs-in-align", 0, "BOOL"),
feet1500: props.globals.getNode("/ECAM/phases/phase-calculation/altitude-ge-1500"),
feet800: props.globals.getNode("/ECAM/phases/phase-calculation/altitude-ge-800"),
},
Timer: {
eng1idle: props.globals.initNode("/ECAM/phases/timer/eng1idle", 0, "INT"),
eng2idle: props.globals.initNode("/ECAM/phases/timer/eng2idle", 0, "INT"),
eng1or2: props.globals.initNode("/ECAM/phases/timer/eng1or2", 0, "INT"),
eng1idle: props.globals.getNode("/ECAM/phases/timer/eng1idle"),
eng2idle: props.globals.getNode("/ECAM/phases/timer/eng2idle"),
eng1or2: props.globals.getNode("/ECAM/phases/phase-calculation/one-engine-running"),
toInhibit: props.globals.initNode("/ECAM/phases/timer/to-inhibit", 0, "INT"),
ldgInhibit: props.globals.initNode("/ECAM/phases/timer/ldg-inhibit", 0, "INT"),
eng1idleOutput: props.globals.getNode("/ECAM/phases/timer/eng1idle-output"),
eng2idleOutput: props.globals.getNode("/ECAM/phases/timer/eng2idle-output"),
eng1or2Output: props.globals.initNode("/ECAM/phases/timer/eng1or2-output", 0, "INT"),
eng1and2Off: props.globals.getNode("/ECAM/phases/phase-calculation/engines-1-2-not-running"),
eng1or2Output: props.globals.getNode("/ECAM/phases/phase-calculation/engine-1-or-2-running"),
toInhibitOutput: props.globals.getNode("/ECAM/phases/timer/to-inhibit-output"),
ldgInhibitOutput: props.globals.getNode("/ECAM/phases/timer/ldg-inhibit-output"),
gnd: props.globals.getNode("/ECAM/timer/ground-calc"),
gnd: props.globals.getNode("/ECAM/timer/ground-calc"), # ZGND
gnd2Sec: props.globals.getNode("/ECAM/phases/monostable/gnd-output"),
gnd2SecHalf: props.globals.getNode("/ECAM/phases/monostable/gnd-output-2"), # hack to prevent getting confused between phase 5 / 6
},
speed80: props.globals.initNode("/ECAM/phases/speed-gt-80", 0, "BOOL"),
toPower: props.globals.initNode("/ECAM/phases/to-power-set", 0, "BOOL"),
altChg: props.globals.getNode("it-autoflight/input/alt-is-changing", 1),
toPower: props.globals.getNode("/ECAM/phases/phase-calculation/takeoff-power"),
altChg: props.globals.getNode("/it-autoflight/input/alt-is-changing", 1),
};
var phaseLoop = func() {
@ -82,53 +81,12 @@ var phaseLoop = func() {
eng2epr = pts.Engines.Engine.eprActual[1].getValue();
eng1n1 = pts.Engines.Engine.n1Actual[0].getValue();
eng2n1 = pts.Engines.Engine.n1Actual[1].getValue();
eng1n2 = pts.Engines.Engine.n2Actual[0].getValue();
eng2n2 = pts.Engines.Engine.n2Actual[1].getValue();
master1 = pts.Controls.Engines.Engine.cutoffSw[0].getBoolValue();
master2 = pts.Controls.Engines.Engine.cutoffSw[1].getBoolValue();
FWC.Flipflop.recallReset.setValue(0);
# Various things
if (eng1n2 >= 59.4 and !master1) {
FWC.Timer.eng1idle.setValue(1);
} else {
FWC.Timer.eng1idle.setValue(0);
}
if (eng2n2 >= 59.4 and !master2) {
FWC.Timer.eng2idle.setValue(1);
} else {
FWC.Timer.eng2idle.setValue(0);
}
if (eng1n2 >= 59.4 or eng2n2 >= 59.4) {
FWC.Timer.eng1or2.setValue(1);
} else {
FWC.Timer.eng1or2.setValue(0);
}
if ((FWC.Timer.eng1idleOutput.getBoolValue() == 0 or master1) and (FWC.Timer.eng2idleOutput.getBoolValue() == 0 or master2)) {
twoEngOff = 1;
} else {
twoEngOff = 0;
}
if (eng == "IAE") {
eprlim = getprop("controls/engines/epr-limit");
if ((!getprop("controls/engines/engine[0]/reverser") and !getprop("controls/engines/engine[1]/reverser")) and (((pts.Controls.Engines.Engine.throttle[0].getValue() >= 0.78 or pts.Controls.Engines.Engine.throttle[1].getValue() >= 0.779) and fadec.Output.limFlex.getBoolValue()) or (pts.Controls.Engines.Engine.throttle[0].getValue() >= 0.99 or pts.Controls.Engines.Engine.throttle[1].getValue() >= 0.99))) {
FWC.toPower.setBoolValue(1);
} else {
FWC.toPower.setBoolValue(0);
}
} else {
n1lim = getprop("controls/engines/n1-limit");
if ((!getprop("controls/engines/engine[0]/reverser") and !getprop("controls/engines/engine[1]/reverser")) and (((pts.Controls.Engines.Engine.throttle[0].getValue() >= 0.78 or pts.Controls.Engines.Engine.throttle[1].getValue() >= 0.779) and fadec.Output.limFlex.getBoolValue()) or (pts.Controls.Engines.Engine.throttle[0].getValue() >= 0.99 or pts.Controls.Engines.Engine.throttle[1].getValue() >= 0.99))) {
FWC.toPower.setBoolValue(1);
} else {
FWC.toPower.setBoolValue(0);
}
}
if (myPhase == 9) {
FWC.Monostable.phase9.setBoolValue(1);
@ -149,8 +107,8 @@ var phaseLoop = func() {
FWC.Flipflop.phase10Reset.setBoolValue(0);
}
if ((FWC.Logic.gnd.getBoolValue() and twoEngOff and myPhase == 9) and FWC.Flipflop.phase10Output.getBoolValue()) {
FWC.Monostable.phase1.setBoolValue(1);
if ((FWC.Logic.gnd.getBoolValue() and FWC.Timer.eng1and2Off.getValue() and myPhase == 9) and FWC.Flipflop.phase10Output.getBoolValue()) {
FWC.Monostable.phase1.setBoolValue(1); # true for 300 sec then false
} else {
FWC.Monostable.phase1.setBoolValue(0);
}
@ -171,21 +129,21 @@ var phaseLoop = func() {
gear_agl_cur = pts.Position.gearAglFt.getValue();
# Phase 5 monostable
if (FWC.toPower.getBoolValue() and (gear_agl_cur <= 1500 and !FWC.Logic.gnd.getBoolValue() and FWC.Timer.gnd2Sec.getValue() != 1)) {
if (FWC.toPower.getBoolValue() and (!FWC.Logic.feet1500.getBoolValue() and !FWC.Logic.gnd.getBoolValue() and FWC.Timer.gnd2Sec.getValue() != 1)) {
FWC.Monostable.phase5.setBoolValue(1);
} else {
FWC.Monostable.phase5.setBoolValue(0);
}
# Phase 7 monostable
if (!FWC.toPower.getBoolValue() and gear_agl_cur <= 1500 and gear_agl_cur <= 800 and !FWC.Logic.gnd.getBoolValue() and FWC.Timer.gnd2Sec.getValue() != 1) {
if (!FWC.toPower.getBoolValue() and !FWC.Logic.feet1500.getBoolValue() and !FWC.Logic.feet800.getBoolValue() and !FWC.Logic.gnd.getBoolValue() and FWC.Timer.gnd2Sec.getValue() != 1) {
FWC.Monostable.phase7.setBoolValue(1);
} else {
FWC.Monostable.phase7.setBoolValue(0);
}
# Actual Phases
if ((!FWC.Logic.gnd.getBoolValue() and FWC.Timer.gnd2Sec.getValue() != 1 and twoEngOff and myPhase != 9) and !FWC.Monostable.phase1Output.getBoolValue()) {
if ((!FWC.Logic.gnd.getBoolValue() and FWC.Timer.gnd2Sec.getValue() != 1 and FWC.Timer.eng1and2Off.getValue() and myPhase != 9) and !FWC.Monostable.phase1Output.getBoolValue()) {
setPhase(1);
}
@ -205,7 +163,7 @@ var phaseLoop = func() {
setPhase(5);
}
if (!FWC.Logic.gnd.getValue() and FWC.Timer.gnd2Sec.getValue() != 1 and !(FWC.Monostable.phase5.getBoolValue() and FWC.Monostable.phase5Output.getBoolValue()) and !(FWC.Monostable.phase7.getBoolValue() and FWC.Monostable.phase7Output.getBoolValue())) {
if (!FWC.Logic.gnd.getValue() and FWC.Timer.gnd2SecHalf.getValue() != 1 and (!FWC.Monostable.phase5.getBoolValue() or !FWC.Monostable.phase5Output.getBoolValue()) and (!FWC.Monostable.phase7.getBoolValue() or !FWC.Monostable.phase7Output.getBoolValue())) {
setPhase(6);
}
@ -221,7 +179,7 @@ var phaseLoop = func() {
setPhase(9);
}
if ((FWC.Logic.gnd.getBoolValue() and twoEngOff and myPhase == 9) and FWC.Monostable.phase1Output.getBoolValue()) {
if ((FWC.Logic.gnd.getBoolValue() and FWC.Timer.eng1and2Off.getValue() and myPhase == 9) and FWC.Monostable.phase1Output.getBoolValue()) {
setPhase(10);
}

View file

@ -120,7 +120,7 @@ var PitotIcing = [props.globals.getNode("/systems/pitot[0]/icing"),props.globals
var PitotServicable = [props.globals.getNode("/systems/pitot[0]/serviceable", 1),props.globals.getNode("/systems/pitot[1]/serviceable", 1),props.globals.getNode("/systems/pitot[2]/serviceable"), 1];
var icingInit = func {
iceables = props.globals.getNode("sim/model/icing", 1).getChildren("iceable");
iceables = props.globals.getNode("/sim/model/icing", 1).getChildren("iceable");
forindex(var i; iceables) {
iceables[i] = Iceable.new(iceables[i]);
}

View file

@ -3,7 +3,7 @@
# Thanks to BAWV12 / Thorsten
var als_on = props.globals.getNode("sim/rendering/shaders/skydome");
var als_on = props.globals.getNode("/sim/rendering/shaders/skydome");
var alt_agl = props.globals.getNode("position/gear-agl-ft");
var cur_alt = 0;
@ -67,30 +67,30 @@ var light_manager = {
flcpt: 0,
prev_view : 1,
nd_ref_light1_x: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-x-m", 1),
nd_ref_light1_y: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-y-m", 1),
nd_ref_light1_z: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-z-m", 1),
nd_ref_light1_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir", 1),
nd_ref_light1_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m", 1),
nd_ref_light1_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m", 1),
nd_ref_light1_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m", 1),
nd_ref_light1_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir", 1),
nd_ref_light2_x: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[1]", 1),
nd_ref_light2_y: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[1]", 1),
nd_ref_light2_z: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[1]", 1),
nd_ref_light2_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir[1]", 1),
nd_ref_light2_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[1]", 1),
nd_ref_light2_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[1]", 1),
nd_ref_light2_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[1]", 1),
nd_ref_light2_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[1]", 1),
nd_ref_light3_x: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[2]", 1),
nd_ref_light3_y: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[2]", 1),
nd_ref_light3_z: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[2]", 1),
nd_ref_light3_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir[2]", 1),
nd_ref_light3_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[2]", 1),
nd_ref_light3_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[2]", 1),
nd_ref_light3_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[2]", 1),
nd_ref_light3_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[2]", 1),
nd_ref_light4_x: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[3]", 1),
nd_ref_light4_y: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[3]", 1),
nd_ref_light4_z: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[3]", 1),
nd_ref_light4_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir[3]", 1),
nd_ref_light4_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[3]", 1),
nd_ref_light4_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[3]", 1),
nd_ref_light4_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[3]", 1),
nd_ref_light4_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[3]", 1),
nd_ref_light5_x: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[4]", 1),
nd_ref_light5_y: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[4]", 1),
nd_ref_light5_z: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[4]", 1),
nd_ref_light5_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir[4]", 1),
nd_ref_light5_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[4]", 1),
nd_ref_light5_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[4]", 1),
nd_ref_light5_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[4]", 1),
nd_ref_light5_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[4]", 1),
init: func {
# define your lights here
@ -146,22 +146,22 @@ var light_manager = {
me.light5_size = 6;
setprop("sim/rendering/als-secondary-lights/flash-radius", 13);
setprop("/sim/rendering/als-secondary-lights/flash-radius", 13);
me.start();
},
start: func {
setprop("sim/rendering/als-secondary-lights/num-lightspots", 5);
setprop("/sim/rendering/als-secondary-lights/num-lightspots", 5);
setprop("sim/rendering/als-secondary-lights/lightspot/size", me.light1_size);
setprop("sim/rendering/als-secondary-lights/lightspot/size[1]", me.light2_size);
setprop("sim/rendering/als-secondary-lights/lightspot/size[2]", me.light3_size);
setprop("sim/rendering/als-secondary-lights/lightspot/size[3]", me.light4_size);
setprop("sim/rendering/als-secondary-lights/lightspot/size[4]", me.light5_size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size", me.light1_size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[1]", me.light2_size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[2]", me.light3_size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[3]", me.light4_size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[4]", me.light5_size);
setprop("sim/rendering/als-secondary-lights/lightspot/stretch", me.light1_stretch);
setprop("sim/rendering/als-secondary-lights/lightspot/stretch[1]", me.light2_stretch);
setprop("/sim/rendering/als-secondary-lights/lightspot/stretch", me.light1_stretch);
setprop("/sim/rendering/als-secondary-lights/lightspot/stretch[1]", me.light2_stretch);
me.run = 1;
me.update();
@ -178,10 +178,10 @@ var light_manager = {
cur_alt = alt_agl.getValue();
if (als_on.getValue() == 1 and alt_agl.getValue() < 100.0) {
ll1 = getprop("controls/lighting/landing-lights[1]");
ll2 = getprop("controls/lighting/landing-lights[2]");
ll3 = getprop("sim/model/lights/nose-lights");
nav = getprop("sim/model/lights/nav-lights");
ll1 = getprop("/controls/lighting/landing-lights[1]");
ll2 = getprop("/controls/lighting/landing-lights[2]");
ll3 = getprop("/sim/model/lights/nose-lights");
nav = getprop("/sim/model/lights/nav-lights");
var apos = geo.aircraft_position();
var vpos = geo.viewer_position();
@ -197,15 +197,15 @@ var light_manager = {
var sh = math.sin(heading);
var ch = math.cos(heading);
if ((ll1 == 1 and getprop("systems/electrical/bus/ac-1") != 0) and (ll2 == 1 and getprop("systems/electrical/bus/ac-2") !=0)) {
if ((ll1 == 1 and systems.ELEC.Bus.ac1.getValue() != 0) and (ll2 == 1 and systems.ELEC.Bus.ac2.getValue() != 0)) {
me.light1_ypos = 0.0;
me.light1_setSize(16);
me.light1_on();
} else if (ll1 == 1 and getprop("systems/electrical/bus/ac-1") != 0) {
} else if (ll1 == 1 and systems.ELEC.Bus.ac1.getValue() != 0) {
me.light1_ypos = 3.0;
me.light1_setSize(12);
me.light1_on();
} else if (ll2 == 1 and getprop("systems/electrical/bus/ac-2") !=0) {
} else if (ll2 == 1 and systems.ELEC.Bus.ac2.getValue() != 0) {
me.light1_ypos = -3.0;
me.light1_setSize(12);
me.light1_on();
@ -320,89 +320,89 @@ var light_manager = {
light1_on : func {
if (me.light1_is_on == 1) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r", me.light1_r);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g", me.light1_g);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b", me.light1_b);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r", me.light1_r);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g", me.light1_g);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b", me.light1_b);
me.light1_is_on = 1;
},
light1_off : func {
if (me.light1_is_on == 0) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b", 0.0);
me.light1_is_on = 0;
},
light1_setSize : func(size) {
setprop("sim/rendering/als-secondary-lights/lightspot/size[0]", size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[0]", size);
},
light2_on : func {
if (me.light2_is_on == 1) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[1]", me.light2_r);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[1]", me.light2_g);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", me.light2_b);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[1]", me.light2_r);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[1]", me.light2_g);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", me.light2_b);
me.light2_is_on = 1;
},
light2_off : func {
if (me.light2_is_on == 0) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[1]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[1]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[1]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[1]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", 0.0);
me.light2_is_on = 0;
},
light2_setSize : func(size) {
setprop("sim/rendering/als-secondary-lights/lightspot/size[1]", size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[1]", size);
},
light3_on : func {
if (me.light3_is_on == 1) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[2]", me.light3_r);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[2]", me.light3_g);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", me.light3_b);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[2]", me.light3_r);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[2]", me.light3_g);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", me.light3_b);
me.light3_is_on = 1;
},
light3_off : func {
if (me.light3_is_on == 0) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[2]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[2]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[2]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[2]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", 0.0);
me.light3_is_on = 0;
},
light4_on : func {
if (me.light4_is_on == 1) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[3]", me.light4_r);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[3]", me.light4_g);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", me.light4_b);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[3]", me.light4_r);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[3]", me.light4_g);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", me.light4_b);
me.light4_is_on = 1;
},
light4_off : func {
if (me.light4_is_on == 0) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[3]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[3]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[3]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[3]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", 0.0);
me.light4_is_on = 0;
},
light5_on : func {
if (me.light5_is_on == 1) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[4]", me.light5_r);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[4]", me.light5_g);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", me.light5_b);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[4]", me.light5_r);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[4]", me.light5_g);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", me.light5_b);
me.light5_is_on = 1;
},
light5_off : func {
if (me.light5_is_on == 0) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[4]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[4]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[4]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[4]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", 0.0);
me.light5_is_on = 0;
},
};

View file

@ -38,26 +38,26 @@ var thunder_listener = func {
var lightning_distance_norm = std.min(1.0, 1 / math.pow(lightning_distance / 5000.0, 2));
settimer(func {
var thunder1 = getprop("sim/sound/thunder1");
var thunder2 = getprop("sim/sound/thunder2");
var thunder3 = getprop("sim/sound/thunder3");
var thunder4 = getprop("sim/sound/thunder4");
var vol = getprop("sim/current-view/internal");
var thunder1 = getprop("/sim/sound/thunder1");
var thunder2 = getprop("/sim/sound/thunder2");
var thunder3 = getprop("/sim/sound/thunder3");
var thunder4 = getprop("/sim/sound/thunder4");
var vol = getprop("/sim/current-view/internal");
if (!thunder1) {
thunderCalls = 1;
setprop("sim/sound/dist-thunder1", lightning_distance_norm * vol * 1.75);
setprop("/sim/sound/dist-thunder1", lightning_distance_norm * vol * 1.75);
}
else if (!thunder2) {
thunderCalls = 2;
setprop("sim/sound/dist-thunder2", lightning_distance_norm * vol * 1.75);
setprop("/sim/sound/dist-thunder2", lightning_distance_norm * vol * 1.75);
}
else if (!thunder3) {
thunderCalls = 3;
setprop("sim/sound/dist-thunder3", lightning_distance_norm * vol * 1.75);
setprop("/sim/sound/dist-thunder3", lightning_distance_norm * vol * 1.75);
}
else if (!thunder4) {
thunderCalls = 4;
setprop("sim/sound/dist-thunder4", lightning_distance_norm * vol * 1.75);
setprop("/sim/sound/dist-thunder4", lightning_distance_norm * vol * 1.75);
}
else
return;

View file

@ -157,13 +157,13 @@ var FCUController = {
if (ap1.getBoolValue() or ap2.getBoolValue()) {
apOff("soft", 0);
} else {
if (getprop("it-autoflight/sound/apoffsound") == 1 or getprop("it-autoflight/sound/apoffsound2") == 1) {
setprop("it-autoflight/sound/apoffsound", 0);
setprop("it-autoflight/sound/apoffsound2", 0);
if (getprop("/it-autoflight/sound/apoffsound") == 1 or getprop("/it-autoflight/sound/apoffsound2") == 1) {
setprop("/it-autoflight/sound/apoffsound", 0);
setprop("/it-autoflight/sound/apoffsound2", 0);
}
if (getprop("it-autoflight/output/ap-warning") != 0) {
setprop("it-autoflight/output/ap-warning", 0);
setprop("ECAM/warnings/master-warning-light", 0);
if (getprop("/it-autoflight/output/ap-warning") != 0) {
setprop("/it-autoflight/output/ap-warning", 0);
ecam.lights[0].setValue(0);
}
}
}
@ -178,11 +178,11 @@ var FCUController = {
if (me.FCUworking) {
if (athr.getBoolValue()) {
athrOff("soft");
setprop("ECAM/warnings/master-caution-light", 1);
ecam.lights[1].setValue(1);
} else {
if (getprop("it-autoflight/output/athr-warning") == 1) {
setprop("it-autoflight/output/athr-warning", 0);
setprop("ECAM/warnings/master-caution-light", 0);
if (getprop("/it-autoflight/output/athr-warning") == 1) {
setprop("/it-autoflight/output/athr-warning", 0);
ecam.lights[1].setValue(0);
}
}
}
@ -349,7 +349,7 @@ var FCUController = {
},
ALTPush: func() {
if (me.FCUworking) {
# setprop("it-autoflight/input/vert", 8); # He don't work yet m8
# setprop("/it-autoflight/input/vert", 8); # He don't work yet m8
}
},
ALTPull: func() {
@ -523,7 +523,7 @@ var athrOff = func(type) {
var hdgInput = func {
if (latMode.getValue() != 0) {
showHDG.setBoolValue(1);
var hdgnow = getprop("it-autoflight/input/hdg");
setprop("modes/fcu/hdg-time", getprop("sim/time/elapsed-sec"));
var hdgnow = fmgc.Input.hdg.getValue();
fmgc.Custom.hdgTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
}

View file

@ -1027,12 +1027,12 @@ setlistener("/sim/signals/fdm-initialized", func {
# For Canvas Nav Display.
setlistener("/it-autoflight/input/hdg", func {
setprop("autopilot/settings/heading-bug-deg", getprop("it-autoflight/input/hdg"));
});
setprop("/autopilot/settings/heading-bug-deg", Input.hdg.getValue());
}, 0, 0);
setlistener("/it-autoflight/internal/alt", func {
setprop("autopilot/settings/target-altitude-ft", getprop("it-autoflight/internal/alt"));
});
setprop("/autopilot/settings/target-altitude-ft", Internal.alt.getValue());
}, 0, 0);
var loopTimer = maketimer(0.1, ITAF, ITAF.loop);
var slowLoopTimer = maketimer(1, ITAF, ITAF.slowLoop);

View file

@ -3,91 +3,166 @@
# Copyright (c) 2020 Josh Davidson (Octal450)
setprop("/it-autoflight/internal/alt", 10000);
setprop("/modes/pfd/fma/throttle-mode", " ");
setprop("/modes/pfd/fma/pitch-mode", " ");
setprop("/modes/pfd/fma/pitch-mode-armed", " ");
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
setprop("/modes/pfd/fma/roll-mode", " ");
setprop("/modes/pfd/fma/roll-mode-armed", " ");
setprop("/modes/pfd/fma/ap-mode", " ");
setprop("/modes/pfd/fma/fd-mode", " ");
setprop("/modes/pfd/fma/at-mode", " ");
setprop("/modes/pfd/fma/athr-armed", 0);
setprop("/modes/pfd/fma/throttle-mode-box", 0);
setprop("/modes/pfd/fma/pitch-mode-box", 0);
setprop("/modes/pfd/fma/pitch-mode-armed-box", 0);
setprop("/modes/pfd/fma/pitch-mode2-armed-box", 0);
setprop("/modes/pfd/fma/roll-mode-box", 0);
setprop("/modes/pfd/fma/roll-mode-armed-box", 0);
setprop("/modes/pfd/fma/ap-mode-box", 0);
setprop("/modes/pfd/fma/fd-mode-box", 0);
setprop("/modes/pfd/fma/athr-mode-box", 0);
setprop("/modes/pfd/fma/throttle-mode-time", 0);
setprop("/modes/pfd/fma/pitch-mode-time", 0);
setprop("/modes/pfd/fma/pitch-mode-armed-time", 0);
setprop("/modes/pfd/fma/pitch-mode2-armed-time", 0);
setprop("/modes/pfd/fma/roll-mode-time", 0);
setprop("/modes/pfd/fma/roll-mode-armed-time", 0);
setprop("/modes/pfd/fma/ap-mode-time", 0);
setprop("/modes/pfd/fma/fd-mode-time", 0);
setprop("/modes/pfd/fma/athr-mode-time", 0);
setprop("/modes/fcu/hdg-time", -45);
var at = nil;
var athr = nil;
var ap1 = nil;
var ap2 = nil;
var elapsedtime = nil;
var engout = nil;
var engstate1 = nil;
var engstate2 = nil;
var fd1 = nil;
var fd2 = nil;
var flx = nil;
var gear1 = nil;
var gear2 = nil;
var gs_defl = nil;
var latText = nil;
var MCPalt = nil;
var nav_defl = nil;
var newfd = nil;
var newarm = nil;
var newap = nil;
var newlat = nil;
var newvert = nil;
var newvert2arm = nil;
var newvertarm = nil;
var newthr = nil;
var state1 = nil;
var state2 = nil;
var thr = nil;
var thr1 = nil;
var thr2 = nil;
var trk = nil;
var vert = nil;
var vertText = nil;
setlistener("sim/signals/fdm-initialized", func {
var Modes = {
FCU: {
hdgTime: props.globals.initNode("/modes/fcu/hdg-time", -45, "DOUBLE")
},
PFD: {
FMA: {
athr: props.globals.initNode("/modes/pfd/fma/athr-armed", 0, "BOOL"),
athrBox: props.globals.initNode("/modes/pfd/fma/athr-armed-box", 0, "BOOL"),
athrMode: props.globals.initNode("/modes/pfd/fma/at-mode", " ", "STRING"),
athrModeBox: props.globals.initNode("/modes/pfd/fma/athr-mode-box", 0, "BOOL"),
apMode: props.globals.initNode("/modes/pfd/fma/ap-mode", " ", "STRING"),
apModeBox: props.globals.initNode("/modes/pfd/fma/ap-mode-box", 0, "BOOL"),
apModeTime: props.globals.initNode("/modes/pfd/fma/ap-mode-time", 0, "DOUBLE"),
athrModeTime: props.globals.initNode("/modes/pfd/fma/athr-mode-time", 0, "DOUBLE"),
fdMode: props.globals.initNode("/modes/pfd/fma/fd-mode", " ", "STRING"),
fdModeBox: props.globals.initNode("/modes/pfd/fma/fd-mode-box", 0, "BOOL"),
fdModeTime: props.globals.initNode("/modes/pfd/fma/fd-mode-time", 0, "DOUBLE"),
rollMode: props.globals.initNode("/modes/pfd/fma/roll-mode", " ", "STRING"),
rollModeBox: props.globals.initNode("/modes/pfd/fma/roll-mode-box", 0, "BOOL"),
rollModeArmed: props.globals.initNode("/modes/pfd/fma/roll-mode-armed", " ", "STRING"),
rollModeArmedBox: props.globals.initNode("/modes/pfd/fma/roll-mode-armed-box", 0, "BOOL"),
rollModeTime: props.globals.initNode("/modes/pfd/fma/roll-mode-time", 0, "DOUBLE"),
rollModeArmedTime: props.globals.initNode("/modes/pfd/fma/roll-mode-armed-time", 0, "DOUBLE"),
pitchMode: props.globals.initNode("/modes/pfd/fma/pitch-mode", " ", "STRING"),
pitchModeBox: props.globals.initNode("/modes/pfd/fma/pitch-mode-box", 0, "BOOL"),
pitchModeArmed: props.globals.initNode("/modes/pfd/fma/pitch-mode-armed", " ", "STRING"),
pitchModeArmedBox: props.globals.initNode("/modes/pfd/fma/pitch-mode-armed-box", 0, "BOOL"),
pitchMode2Armed: props.globals.initNode("/modes/pfd/fma/pitch-mode2-armed", " ", "STRING"),
pitchModeTime: props.globals.initNode("/modes/pfd/fma/pitch-mode-time", 0, "DOUBLE"),
pitchModeArmedTime: props.globals.initNode("/modes/pfd/fma/pitch-mode-armed-time", 0, "DOUBLE"),
pitchMode2ArmedTime: props.globals.initNode("/modes/pfd/fma/pitch-mode2-armed-time", 0, "DOUBLE"),
pitchMode2ArmedBox: props.globals.initNode("/modes/pfd/fma/pitch-mode2-armed-box", 0, "BOOL"),
throttle: props.globals.initNode("/modes/pfd/fma/throttle-mode", " ", "STRING"),
throttleModeBox: props.globals.initNode("/modes/pfd/fma/throttle-mode-box", 0, "BOOL"),
throttleModeTime: props.globals.initNode("/modes/pfd/fma/throttle-mode-time", 0, "DOUBLE"),
},
},
};
var init = func() {
Internal.alt.setValue(10000);
Modes.PFD.FMA.throttle.setValue(" ");
Modes.PFD.FMA.pitchMode.setValue(" ");
Modes.PFD.FMA.pitchModeArmed.setValue(" ");
Modes.PFD.FMA.pitchMode2Armed.setValue(" ");
Modes.PFD.FMA.rollMode.setValue(" ");
Modes.PFD.FMA.rollModeArmed.setValue(" ");
Modes.PFD.FMA.apMode.setValue(" ");
Modes.PFD.FMA.fdMode.setValue(" ");
Modes.PFD.FMA.athrMode.setValue(" ");
Modes.PFD.FMA.athr.setValue(0);
Modes.PFD.FMA.throttleModeBox.setValue(0);
Modes.PFD.FMA.pitchModeBox.setValue(0);
Modes.PFD.FMA.pitchModeArmedBox.setValue(0);
Modes.PFD.FMA.pitchMode2ArmedBox.setValue(0);
Modes.PFD.FMA.rollModeBox.setValue(0);
Modes.PFD.FMA.rollModeArmedBox.setValue(0);
Modes.PFD.FMA.apModeBox.setValue(0);
Modes.PFD.FMA.fdModeBox.setValue(0);
Modes.PFD.FMA.athrModeBox.setValue(0);
Modes.PFD.FMA.throttleModeTime.setValue(0);
Modes.PFD.FMA.pitchModeTime.setValue(0);
Modes.PFD.FMA.pitchModeArmedTime.setValue(0);
Modes.PFD.FMA.pitchMode2ArmedTime.setValue(0);
Modes.PFD.FMA.rollModeTime.setValue(0);
Modes.PFD.FMA.rollModeArmedTime.setValue(0);
Modes.PFD.FMA.apModeTime.setValue(0);
Modes.PFD.FMA.fdModeTime.setValue(0);
Modes.PFD.FMA.athrModeTime.setValue(0);
loopFMA.start();
});
};
# Master Thrust
var loopFMA = maketimer(0.05, func {
var state1 = getprop("systems/thrust/state1");
var state2 = getprop("systems/thrust/state2");
var newthr = getprop("/modes/pfd/fma/throttle-mode");
var thr1 = getprop("controls/engines/engine[0]/throttle-pos");
var thr2 = getprop("controls/engines/engine[1]/throttle-pos");
state1 = pts.Systems.Thrust.state[0].getValue();
state2 = pts.Systems.Thrust.state[1].getValue();
thr1 = pts.Controls.Engines.Engine.throttlePos[0].getValue();
thr2 = pts.Controls.Engines.Engine.throttlePos[1].getValue();
newthr = Modes.PFD.FMA.throttle.getValue();
engout = pts.Systems.Thrust.engOut.getValue();
if (state1 == "TOGA" or state2 == "TOGA") {
if (newthr != " ") {
setprop("/modes/pfd/fma/throttle-mode", " ");
Modes.PFD.FMA.throttle.setValue(" ");
}
} else if ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)) {
if (newthr != " ") {
setprop("/modes/pfd/fma/throttle-mode", " ");
Modes.PFD.FMA.throttle.setValue(" ");
}
} else if ((state1 == "MCT" or state2 == "MCT") and getprop("systems/thrust/eng-out") != 1) {
} else if ((state1 == "MCT" or state2 == "MCT") and !engout) {
if (newthr != " ") {
setprop("/modes/pfd/fma/throttle-mode", " ");
Modes.PFD.FMA.throttle.setValue(" ");
}
} else if (((state1 == "MAN THR" and thr1 < 0.83) or (state2 == "MAN THR" and thr2 < 0.83)) and getprop("systems/thrust/eng-out") != 1) {
} else if (((state1 == "MAN THR" and thr1 < 0.83) or (state2 == "MAN THR" and thr2 < 0.83)) and !engout) {
if (newthr != " ") {
setprop("/modes/pfd/fma/throttle-mode", " ");
Modes.PFD.FMA.throttle.setValue(" ");
}
} else {
if ((getprop("/it-autoflight/output/vert") == 4) or (getprop("/it-autoflight/output/vert") == 6) or (getprop("/it-autoflight/output/vert") == 7) or (getprop("/it-autoflight/output/vert") == 8)) {
if (getprop("/it-autoflight/output/fd1") == 0 and getprop("/it-autoflight/output/fd2") == 0 and getprop("/it-autoflight/output/ap1") == 0 and getprop("/it-autoflight/output/ap2") == 0) {
loopFMA_b();
} else {
var thr = getprop("/it-autoflight/output/thr-mode");
vert = Output.vert.getValue();
if (vert == 4 or vert >= 6 or vert <= 8) {
if (Output.ap1.getBoolValue() or Output.ap2.getBoolValue() or Output.fd1.getBoolValue() or Output.fd2.getBoolValue()) {
thr = Output.thrMode.getValue();
if (thr == 0) {
loopFMA_b();
} else if (thr == 1) {
if (newthr != "THR IDLE") {
setprop("/modes/pfd/fma/throttle-mode", "THR IDLE");
Modes.PFD.FMA.throttle.setValue("THR IDLE");
}
} else if (thr == 2) {
if (state1 == "MCT" or state2 == "MCT" and getprop("systems/thrust/eng-out") == 1) {
if (state1 == "MCT" or state2 == "MCT" and engout) {
if (newthr != "THR MCT") {
setprop("/modes/pfd/fma/throttle-mode", "THR MCT");
Modes.PFD.FMA.throttle.setValue("THR MCT");
}
} else if (state1 == "CL" or state2 == "CL") {
if (newthr != "THR CLB") {
setprop("/modes/pfd/fma/throttle-mode", "THR CLB");
Modes.PFD.FMA.throttle.setValue("THR CLB");
}
} else {
if (newthr != "THR LVR") {
setprop("/modes/pfd/fma/throttle-mode", "THR LVR");
Modes.PFD.FMA.throttle.setValue("THR LVR");
}
}
}
} else {
loopFMA_b();
}
} else {
loopFMA_b();
@ -95,164 +170,161 @@ var loopFMA = maketimer(0.05, func {
}
# A/THR Armed/Active
if (getprop("/it-autoflight/output/athr") == 1 and (state1 == "MAN THR" or state2 == "MAN THR" or state1 == "MCT" or state2 == "MCT" or state1 == "TOGA" or state2 == "TOGA") and getprop("systems/thrust/eng-out") != 1) {
if (getprop("/modes/pfd/fma/athr-armed") != 1) {
setprop("/modes/pfd/fma/athr-armed", 1);
athr = Output.athr.getValue();
if (athr and (state1 == "MAN THR" or state2 == "MAN THR" or state1 == "MCT" or state2 == "MCT" or state1 == "TOGA" or state2 == "TOGA") and engout != 1) {
if (!Modes.PFD.FMA.athr.getValue()) {
Modes.PFD.FMA.athr.setValue(1);
}
} else if (getprop("/it-autoflight/output/athr") == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83) or (state1 == "MCT" and getprop("controls/engines/thrust-limit") == "FLX") or
(state2 == "MCT" and getprop("controls/engines/thrust-limit") == "FLX") or state1 == "TOGA" or state2 == "TOGA") and getprop("systems/thrust/eng-out") == 1) {
if (getprop("/modes/pfd/fma/athr-armed") != 1) {
setprop("/modes/pfd/fma/athr-armed", 1);
} else if (athr and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83) or (fadec.Thrust.thrustLimit.getValue() == "FLX" and (state1 == "MCT" or state2 == "MCT"))
or state1 == "TOGA" or state2 == "TOGA") and engout) {
if (!Modes.PFD.FMA.athr.getValue()) {
Modes.PFD.FMA.athr.setValue(1);
}
} else {
if (getprop("/modes/pfd/fma/athr-armed") != 0) {
setprop("/modes/pfd/fma/athr-armed", 0);
if (Modes.PFD.FMA.athr.getValue()) {
Modes.PFD.FMA.athr.setValue(0);
}
}
# SRS RWY Engagement
var flx = getprop("systems/thrust/lim-flex");
var lat = getprop("/it-autoflight/mode/lat");
var newlat = getprop("/modes/pfd/fma/roll-mode");
var vert = getprop("/it-autoflight/mode/vert");
var newvert = getprop("/modes/pfd/fma/pitch-mode");
var newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
var thr1 = getprop("controls/engines/engine[0]/throttle-pos");
var thr2 = getprop("controls/engines/engine[1]/throttle-pos");
var wow = getprop("gear/gear[0]/wow");
var engstate1 = getprop("engines/engine[0]/state");
var engstate2 = getprop("engines/engine[1]/state");
flx = fadec.Thrust.limFlex.getValue();
newlat = Modes.PFD.FMA.rollMode.getValue();
engstate1 = pts.Engines.Engine.state[0].getValue();
engstate2 = pts.Engines.Engine.state[1].getValue();
if (((state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)))) and (engstate1 == 3 or engstate2 == 3)) {
# RWY Engagement would go here, but automatic ILS selection is not simulated yet.
if (wow and FMGCInternal.v2set and getprop("/it-autoflight/output/vert") != 7) {
gear1 = pts.Gear.wow[0].getValue();
if (gear1 and FMGCInternal.v2set and Output.vert.getValue() != 7) {
ITAF.setVertMode(7);
setprop("/it-autoflight/mode/vert", "T/O CLB");
Text.vert.setValue("T/O CLB");
}
} else {
var gear1 = getprop("gear/gear[1]/wow");
var gear2 = getprop("gear/gear[2]/wow");
if (getprop("/it-autoflight/input/lat") == 5 and (gear1 or gear2)) {
gear1 = pts.Gear.wow[0].getValue();
gear2 = pts.Gear.wow[2].getValue();
if (Input.lat.getValue() == 5 and (gear1 or gear2)) {
ITAF.setLatMode(9);
}
if (getprop("/it-autoflight/output/vert") == 7 and (gear1 or gear2)) {
if (Input.vert.getValue() == 7 and (gear1 or gear2)) {
ITAF.setVertMode(9);
}
}
var trk = getprop("/it-autoflight/custom/trk-fpa");
if (lat == "HDG" and trk == 0) {
trk = Custom.trkFpa.getValue();
latText = Text.lat.getValue();
if (latText == "HDG" and trk == 0) {
if (newlat != "HDG") {
setprop("/modes/pfd/fma/roll-mode", "HDG");
Modes.PFD.FMA.rollMode.setValue("HDG");
}
} else if (lat == "HDG" and trk == 1) {
} else if (latText == "HDG" and trk == 1) {
if (newlat != "TRACK") {
setprop("/modes/pfd/fma/roll-mode", "TRACK");
Modes.PFD.FMA.rollMode.setValue("TRACK");
}
}
# Boxes
var elapsedtime = getprop("sim/time/elapsed-sec");
if (getprop("/modes/pfd/fma/ap-mode-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/ap-mode-box", 1);
elapsedtime = pts.Sim.Time.elapsedSec.getValue();
if (Modes.PFD.FMA.apModeTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.apModeBox.setValue(1);
} else {
setprop("/modes/pfd/fma/ap-mode-box", 0);
Modes.PFD.FMA.apModeBox.setValue(0);
}
if (getprop("/modes/pfd/fma/fd-mode-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/fd-mode-box", 1);
if (Modes.PFD.FMA.fdModeTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.fdModeBox.setValue(1);
} else {
setprop("/modes/pfd/fma/fd-mode-box", 0);
Modes.PFD.FMA.fdModeBox.setValue(0);
}
if (getprop("/modes/pfd/fma/athr-mode-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/athr-mode-box", 1);
if (Modes.PFD.FMA.athrModeTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.athrModeBox.setValue(1);
} else {
setprop("/modes/pfd/fma/athr-mode-box", 0);
Modes.PFD.FMA.athrModeBox.setValue(0);
}
if (getprop("/modes/pfd/fma/throttle-mode-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/throttle-mode-box", 1);
if (Modes.PFD.FMA.throttleModeTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.throttleModeBox.setValue(1);
} else {
setprop("/modes/pfd/fma/throttle-mode-box", 0);
Modes.PFD.FMA.throttleModeBox.setValue(0);
}
if (getprop("/modes/pfd/fma/roll-mode-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/roll-mode-box", 1);
if (Modes.PFD.FMA.rollModeTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.rollModeBox.setValue(1);
} else {
setprop("/modes/pfd/fma/roll-mode-box", 0);
Modes.PFD.FMA.rollModeBox.setValue(0);
}
if (getprop("/modes/pfd/fma/pitch-mode-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/pitch-mode-box", 1);
if (Modes.PFD.FMA.pitchModeTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.pitchModeBox.setValue(1);
} else {
setprop("/modes/pfd/fma/pitch-mode-box", 0);
Modes.PFD.FMA.pitchModeBox.setValue(0);
}
if (getprop("/modes/pfd/fma/roll-mode-armed-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/roll-mode-armed-box", 1);
if (Modes.PFD.FMA.rollModeArmedTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.rollModeArmedBox.setValue(1);
} else {
setprop("/modes/pfd/fma/roll-mode-armed-box", 0);
Modes.PFD.FMA.rollModeArmedBox.setValue(0);
}
if (getprop("/modes/pfd/fma/pitch-mode-armed-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/pitch-mode-armed-box", 1);
if (Modes.PFD.FMA.pitchModeArmedTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.pitchModeArmedBox.setValue(1);
} else {
setprop("/modes/pfd/fma/pitch-mode-armed-box", 0);
Modes.PFD.FMA.pitchModeArmedBox.setValue(0);
}
if (getprop("/modes/pfd/fma/pitch-mode2-armed-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/pitch-mode2-armed-box", 1);
if (Modes.PFD.FMA.pitchMode2ArmedTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.pitchMode2ArmedBox.setValue(1);
} else {
setprop("/modes/pfd/fma/pitch-mode2-armed-box", 0);
Modes.PFD.FMA.pitchMode2ArmedBox.setValue(0);
}
});
var loopFMA_b = func {
var newthr = getprop("/modes/pfd/fma/throttle-mode");
if (getprop("/it-autoflight/input/kts-mach") == 0) {
newthr = Modes.PFD.FMA.throttle.getValue();
if (!Input.ktsMach.getValue()) {
if (newthr != "SPEED") {
setprop("/modes/pfd/fma/throttle-mode", "SPEED");
Modes.PFD.FMA.throttle.setValue("SPEED");
}
} else if (getprop("/it-autoflight/input/kts-mach") == 1) {
} else {
if (newthr != "MACH") {
setprop("/modes/pfd/fma/throttle-mode", "MACH");
Modes.PFD.FMA.throttle.setValue("MACH");
}
}
}
# Master Lateral
setlistener("/it-autoflight/mode/lat", func {
var lat = getprop("/it-autoflight/mode/lat");
var newlat = getprop("/modes/pfd/fma/roll-mode");
if (lat == "LNAV") {
latText = Text.lat.getValue();
newlat = Modes.PFD.FMA.rollMode.getValue();
if (latText == "LNAV") {
if (newlat != "NAV") {
setprop("/modes/pfd/fma/roll-mode", "NAV");
Modes.PFD.FMA.rollMode.setValue("NAV");
}
} else if (lat == "LOC") {
} else if (latText == "LOC") {
if (newlat != "LOC*" and newlat != "LOC") {
setprop("/modes/pfd/fma/roll-mode", "LOC*");
Modes.PFD.FMA.rollMode.setValue("LOC*");
locupdate.start();
}
} else if (lat == "ALGN") {
} else if (latText == "ALGN") {
if (newlat != " ") {
setprop("/modes/pfd/fma/roll-mode", " ");
Modes.PFD.FMA.rollMode.setValue(" ");
}
} else if (lat == "RLOU") {
} else if (latText == "RLOU") {
if (newlat != " ") {
setprop("/modes/pfd/fma/roll-mode", " ");
Modes.PFD.FMA.rollMode.setValue(" ");
}
} else if (lat == "T/O") {
} else if (latText == "T/O") {
if (newlat != "RWY") {
setprop("/modes/pfd/fma/roll-mode", "RWY");
Modes.PFD.FMA.rollMode.setValue("RWY");
}
} else if (lat == " ") {
} else if (latText == " ") {
if (newlat != " ") {
setprop("/modes/pfd/fma/roll-mode", " ");
Modes.PFD.FMA.rollMode.setValue(" ");
}
}
});
var locupdate = maketimer(0.5, func {
var lat = getprop("/it-autoflight/mode/lat");
var newlat = getprop("/modes/pfd/fma/roll-mode");
var nav_defl = getprop("/instrumentation/nav[0]/heading-needle-deflection-norm");
if (lat == "LOC") {
latText = Text.lat.getValue();
newlat = Modes.PFD.FMA.rollMode.getValue();
nav_defl = pts.Instrumentation.Nav.locDeflection.getValue();
if (latText == "LOC") {
if (nav_defl > -0.06 and nav_defl < 0.06) {
locupdate.stop();
if (newlat != "LOC") {
setprop("/modes/pfd/fma/roll-mode", "LOC");
Modes.PFD.FMA.rollMode.setValue("LOC");
}
}
}
@ -260,82 +332,82 @@ var locupdate = maketimer(0.5, func {
# Master Vertical
setlistener("/it-autoflight/mode/vert", func {
var vert = getprop("/it-autoflight/mode/vert");
var newvert = getprop("/modes/pfd/fma/pitch-mode");
var newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
if (vert == "ALT HLD") {
vertText = Text.vert.getValue();
newvert = Modes.PFD.FMA.pitchMode.getValue();
newvertarm = Modes.PFD.FMA.pitchMode2Armed.getValue();
if (vertText == "ALT HLD") {
altvert();
if (newvertarm != " ") {
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
Modes.PFD.FMA.pitchMode2Armed.setValue(" ");
}
} else if (vert == "ALT CAP") {
} else if (vertText == "ALT CAP") {
altvert();
if (newvertarm != " ") {
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
Modes.PFD.FMA.pitchMode2Armed.setValue(" ");
}
} else if (vert == "V/S") {
} else if (vertText == "V/S") {
if (newvert != "V/S") {
setprop("/modes/pfd/fma/pitch-mode", "V/S");
Modes.PFD.FMA.pitchMode.setValue("V/S");
}
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
Modes.PFD.FMA.pitchMode2Armed.setValue("ALT");
}
} else if (vert == "G/S") {
} else if (vertText == "G/S") {
if (newvert != "G/S*" and newvert != "G/S") {
setprop("/modes/pfd/fma/pitch-mode", "G/S*");
Modes.PFD.FMA.pitchMode.setValue("G/S*");
gsupdate.start();
}
if (newvertarm != " ") {
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
Modes.PFD.FMA.pitchMode2Armed.setValue(" ");
}
} else if (vert == "SPD CLB") {
} else if (vertText == "SPD CLB") {
if (newvert != "OP CLB") {
setprop("/modes/pfd/fma/pitch-mode", "OP CLB");
Modes.PFD.FMA.pitchMode.setValue("OP CLB");
}
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
Modes.PFD.FMA.pitchMode2Armed.setValue("ALT");
}
} else if (vert == "SPD DES") {
} else if (vertText == "SPD DES") {
if (newvert != "OP DES") {
setprop("/modes/pfd/fma/pitch-mode", "OP DES");
Modes.PFD.FMA.pitchMode.setValue("OP DES");
}
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
Modes.PFD.FMA.pitchMode2Armed.setValue("ALT");
}
} else if (vert == "FPA") {
} else if (vertText == "FPA") {
if (newvert != "FPA") {
setprop("/modes/pfd/fma/pitch-mode", "FPA");
Modes.PFD.FMA.pitchMode.setValue("FPA");
}
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
Modes.PFD.FMA.pitchMode2Armed.setValue("ALT");
}
} else if (vert == "LAND") {
} else if (vertText == "LAND") {
if (newvert != "LAND") {
setprop("/modes/pfd/fma/pitch-mode", "LAND");
Modes.PFD.FMA.pitchMode.setValue("LAND");
}
} else if (vert == "FLARE") {
} else if (vertText == "FLARE") {
if (newvert != "FLARE") {
setprop("/modes/pfd/fma/pitch-mode", "FLARE");
Modes.PFD.FMA.pitchMode.setValue("FLARE");
}
} else if (vert == "ROLLOUT") {
} else if (vertText == "ROLLOUT") {
if (newvert != "ROLL OUT") {
setprop("/modes/pfd/fma/pitch-mode", "ROLL OUT");
Modes.PFD.FMA.pitchMode.setValue("ROLL OUT");
}
} else if (vert == "T/O CLB") {
} else if (vertText == "T/O CLB") {
if (newvert != "SRS") {
setprop("/modes/pfd/fma/pitch-mode", "SRS");
Modes.PFD.FMA.pitchMode.setValue("SRS");
}
updatePitchArm2();
} else if (vert == "G/A CLB") {
} else if (vertText == "G/A CLB") {
if (newvert != "SRS") {
setprop("/modes/pfd/fma/pitch-mode", "SRS");
Modes.PFD.FMA.pitchMode.setValue("SRS");
}
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
Modes.PFD.FMA.pitchMode2Armed.setValue("ALT");
}
} else if (vert == " ") {
} else if (vertText == " ") {
if (newvert != " ") {
setprop("/modes/pfd/fma/pitch-mode", " ");
Modes.PFD.FMA.pitchMode.setValue(" ");
}
updatePitchArm2();
}
@ -343,51 +415,51 @@ setlistener("/it-autoflight/mode/vert", func {
});
var updatePitchArm2 = func {
var newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
newvertarm = Modes.PFD.FMA.pitchMode2Armed.getValue();
if (newvertarm != "CLB" and FMGCInternal.v2set) {
setprop("/modes/pfd/fma/pitch-mode2-armed", "CLB");
} else if (newvertarm != " " and FMGCInternal.v2set != 1) {
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
Modes.PFD.FMA.pitchMode2Armed.setValue("CLB");
} else if (newvertarm != " " and !FMGCInternal.v2set) {
Modes.PFD.FMA.pitchMode2Armed.setValue(" ");
}
}
var gsupdate = maketimer(0.5, func {
var vert = getprop("/it-autoflight/mode/vert");
var newvert = getprop("/modes/pfd/fma/pitch-mode");
var gs_defl = getprop("/instrumentation/nav[0]/gs-needle-deflection-norm");
if (vert == "G/S") {
vertText = Text.vert.getValue();
newvert = Modes.PFD.FMA.pitchMode.getValue();
gs_defl = pts.Instrumentation.Nav.gsDeflection.getValue();
if (vertText == "G/S") {
if (gs_defl > -0.06 and gs_defl < 0.06) {
gsupdate.stop();
if (newvert != "G/S") {
setprop("/modes/pfd/fma/pitch-mode", "G/S");
Modes.PFD.FMA.pitchMode.setValue("G/S");
}
}
}
});
var altvert = func {
var MCPalt = getprop("/it-autoflight/internal/alt");
var ALTdif = abs(fmgc.FMGCInternal.crzFt - MCPalt);
var vert = getprop("/it-autoflight/mode/vert");
var newvert = getprop("/modes/pfd/fma/pitch-mode");
if (ALTdif <= 20) {
if (vert == "ALT HLD") {
MCPalt = Internal.alt.getValue();
vertText = Text.vert.getValue();
newvert = Modes.PFD.FMA.pitchMode.getValue();
if (abs(fmgc.FMGCInternal.crzFt - MCPalt) <= 20) {
if (vertText == "ALT HLD") {
if (newvert != "ALT CRZ") {
setprop("/modes/pfd/fma/pitch-mode", "ALT CRZ");
Modes.PFD.FMA.pitchMode.setValue("ALT CRZ");
}
} else if (vert == "ALT CAP") {
} else if (vertText == "ALT CAP") {
if (newvert != "ALT CRZ*") {
setprop("/modes/pfd/fma/pitch-mode", "ALT CRZ*");
Modes.PFD.FMA.pitchMode.setValue("ALT CRZ*");
}
}
} else {
if (vert == "ALT HLD") {
if (vertText == "ALT HLD") {
if (newvert != "ALT") {
setprop("/modes/pfd/fma/pitch-mode", "ALT");
Modes.PFD.FMA.pitchMode.setValue("ALT");
}
} else if (vert == "ALT CAP") {
} else if (vertText == "ALT CAP") {
if (newvert != "ALT*") {
setprop("/modes/pfd/fma/pitch-mode", "ALT*");
Modes.PFD.FMA.pitchMode.setValue("ALT*");
}
}
}
@ -395,123 +467,115 @@ var altvert = func {
# Arm HDG or NAV
setlistener("/it-autoflight/mode/arm", func {
var arm = getprop("/it-autoflight/mode/arm");
var newarm = getprop("/modes/pfd/fma/roll-mode-armed");
arm = Text.arm.getValue();
newarm = Modes.PFD.FMA.rollModeArmed.getValue();
if (arm == "HDG") {
if (newarm != "HDG") {
setprop("/modes/pfd/fma/roll-mode-armed", " ");
Modes.PFD.FMA.rollModeArmed.setValue(" ");
}
} else if (arm == "LNV") {
if (newarm != "NAV") {
setprop("/modes/pfd/fma/roll-mode-armed", "NAV");
Modes.PFD.FMA.rollModeArmed.setValue("NAV");
}
} else if (arm == " ") {
if (newarm != " ") {
setprop("/modes/pfd/fma/roll-mode-armed", " ");
Modes.PFD.FMA.rollModeArmed.setValue(" ");
}
}
});
# Arm LOC
setlistener("/it-autoflight/output/loc-armed", func {
var loca = getprop("/it-autoflight/output/loc-armed");
var newarm = getprop("/modes/pfd/fma/roll-mode-armed");
if (loca) {
newarm = Modes.PFD.FMA.rollModeArmed.getValue();
if (Output.locArm.getValue()) {
if (newarm != "LOC") {
setprop("/modes/pfd/fma/roll-mode-armed", "LOC");
Modes.PFD.FMA.rollModeArmed.setValue("LOC");
}
} else {
if (newarm != " ") {
setprop("/modes/pfd/fma/roll-mode-armed", " ");
Modes.PFD.FMA.rollModeArmed.setValue(" ");
}
}
});
# Arm G/S
setlistener("/it-autoflight/output/appr-armed", func {
var appa = getprop("/it-autoflight/output/appr-armed");
var newvert2arm = getprop("/modes/pfd/fma/pitch-mode-armed");
if (appa) {
newvert2arm = Modes.PFD.FMA.pitchModeArmed.getValue();
if (Output.apprArm.getValue()) {
if (newvert2arm != "G/S") {
setprop("/modes/pfd/fma/pitch-mode-armed", "G/S");
Modes.PFD.FMA.pitchModeArmed.setValue("G/S");
}
} else {
if (newvert2arm != " ") {
setprop("/modes/pfd/fma/pitch-mode-armed", " ");
Modes.PFD.FMA.pitchModeArmed.setValue(" ");
}
}
});
# AP
var ap = func {
var ap1 = getprop("/it-autoflight/output/ap1");
var ap2 = getprop("/it-autoflight/output/ap2");
var newap = getprop("/modes/pfd/fma/ap-mode");
ap1 = Output.ap1.getValue();
ap2 = Output.ap2.getValue();
newap = Modes.PFD.FMA.apMode.getValue();
if (ap1 and ap2 and newap != "AP1+2") {
setprop("/modes/pfd/fma/ap-mode", "AP 1+2");
Modes.PFD.FMA.apMode.setValue("AP 1+2");
} else if (ap1 and !ap2 and newap != "AP 1") {
setprop("/modes/pfd/fma/ap-mode", "AP 1");
Modes.PFD.FMA.apMode.setValue("AP 1");
} else if (ap2 and !ap1 and newap != "AP 2") {
setprop("/modes/pfd/fma/ap-mode", "AP 2");
Modes.PFD.FMA.apMode.setValue("AP 2");
} else if (!ap1 and !ap2) {
setprop("/modes/pfd/fma/ap-mode", " ");
Modes.PFD.FMA.apMode.setValue(" ");
}
}
# FD
var fd = func {
var fd1 = getprop("/it-autoflight/output/fd1");
var fd2 = getprop("/it-autoflight/output/fd2");
var newfd = getprop("/modes/pfd/fma/fd-mode");
fd1 = Output.fd1.getValue();
fd2 = Output.fd2.getValue();
newfd = Modes.PFD.FMA.fdMode.getValue();
if (fd1 and fd2 and newfd != "1FD2") {
setprop("/modes/pfd/fma/fd-mode", "1 FD 2");
Modes.PFD.FMA.fdMode.setValue("1 FD 2");
} else if (fd1 and !fd2 and newfd != "1 FD -") {
setprop("/modes/pfd/fma/fd-mode", "1 FD -");
Modes.PFD.FMA.fdMode.setValue("1 FD -");
} else if (fd2 and !fd1 and newfd != "- FD 2") {
setprop("/modes/pfd/fma/fd-mode", "- FD 2");
Modes.PFD.FMA.fdMode.setValue("- FD 2");
} else if (!fd1 and !fd2) {
setprop("/modes/pfd/fma/fd-mode", " ");
Modes.PFD.FMA.fdMode.setValue(" ");
}
}
# AT
var at = func {
var at = getprop("/it-autoflight/output/athr");
var newat = getprop("/modes/pfd/fma/at-mode");
if (at and newat != "A/THR") {
setprop("/modes/pfd/fma/at-mode", "A/THR");
var atMode = func {
at = Output.athr.getValue();
if (at and Modes.PFD.FMA.athrMode.getValue() != "A/THR") {
Modes.PFD.FMA.athrMode.setValue("A/THR");
} else if (!at) {
setprop("/modes/pfd/fma/at-mode", " ");
Modes.PFD.FMA.athrMode.setValue(" ");
}
}
var boxchk = func {
if ((getprop("/it-autoflight/output/ap1") or getprop("/it-autoflight/output/ap2") or getprop("/it-autoflight/output/fd1") or getprop("/it-autoflight/output/fd2")) and getprop("/it-autoflight/output/fma-pwr") == 0) {
setprop("/it-autoflight/input/lat", 3);
if ((Output.ap1.getValue() or Output.ap2.getValue() or Output.fd1.getValue() or Output.fd2.getValue()) and !Custom.Output.fmaPower.getValue()) {
Input.lat.setValue(3);
boxchk_b();
}
}
var boxchk_b = func {
var newlat = getprop("/modes/pfd/fma/roll-mode");
if (newlat != " ") {
setprop("/modes/pfd/fma/roll-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.rollMode.getValue() != " ") {
Modes.PFD.FMA.rollModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
var newvert = getprop("/modes/pfd/fma/pitch-mode");
if (newvert != " ") {
setprop("/modes/pfd/fma/pitch-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.pitchMode.getValue() != " ") {
Modes.PFD.FMA.pitchModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
var newarmr = getprop("/modes/pfd/fma/roll-mode-armed");
if (newarmr != " ") {
setprop("/modes/pfd/fma/roll-mode-armed-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.rollModeArmed.getValue() != " ") {
Modes.PFD.FMA.rollModeArmedTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
var newarmp = getprop("/modes/pfd/fma/pitch-mode-armed");
if (newarmp != " ") {
setprop("/modes/pfd/fma/pitch-mode-armed-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.pitchModeArmed.getValue() != " ") {
Modes.PFD.FMA.pitchModeArmedTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
var newarmp2 = getprop("/modes/pfd/fma/pitch-mode2-armed");
if (newarmp2 != " ") {
setprop("/modes/pfd/fma/pitch-mode2-armed-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.pitchMode2Armed.getValue() != " ") {
Modes.PFD.FMA.pitchMode2ArmedTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
}
@ -533,79 +597,79 @@ setlistener("/it-autoflight/output/fd2", func {
boxchk();
});
setlistener("/it-autoflight/output/athr", func {
at();
atMode();
});
# Boxes
setlistener("/modes/pfd/fma/ap-mode", func {
if (getprop("/modes/pfd/fma/ap-mode") != " ") {
setprop("/modes/pfd/fma/ap-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.apMode.getValue() != " ") {
Modes.PFD.FMA.apModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/fd-mode", func {
if (getprop("/modes/pfd/fma/fd-mode") != " ") {
setprop("/modes/pfd/fma/fd-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.fdMode.getValue() != " ") {
Modes.PFD.FMA.fdModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/at-mode", func {
if (getprop("/modes/pfd/fma/at-mode") != " ") {
setprop("/modes/pfd/fma/throttle-mode-time", getprop("sim/time/elapsed-sec"));
setprop("/modes/pfd/fma/athr-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.athrMode.getValue() != " ") {
Modes.PFD.FMA.throttleModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
Modes.PFD.FMA.athrModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/athr-armed", func {
if (getprop("/modes/pfd/fma/at-mode") != " ") {
setprop("/modes/pfd/fma/athr-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.athrMode.getValue() != " ") {
Modes.PFD.FMA.athrModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/throttle-mode", func {
var state1 = getprop("systems/thrust/state1");
var state2 = getprop("systems/thrust/state2");
if (getprop("/it-autoflight/output/athr") == 1 and state1 != "MCT" and state2 != "MCT" and state1 != "MAN THR" and state2 != "MAN THR" and state1 != "TOGA" and state2 != "TOGA" and state1 != "IDLE" and state2 != "IDLE" and
getprop("systems/thrust/eng-out") != 1) {
setprop("/modes/pfd/fma/throttle-mode-time", getprop("sim/time/elapsed-sec"));
} else if (getprop("/it-autoflight/output/athr") == 1 and state1 != "TOGA" and state2 != "TOGA" and state1 != "IDLE" and state2 != "IDLE" and getprop("systems/thrust/eng-out") == 1) {
if (getprop("controls/engines/engine[0]/throttle-pos") < 0.83 and getprop("controls/engines/engine[1]/throttle-pos") < 0.83) {
setprop("/modes/pfd/fma/throttle-mode-time", getprop("sim/time/elapsed-sec"));
state1 = pts.Systems.Thrust.state[0].getValue();
state2 = pts.Systems.Thrust.state[1].getValue();
athr = Output.athr.getValue();
if (athr == 1 and state1 != "MCT" and state2 != "MCT" and state1 != "MAN THR" and state2 != "MAN THR" and state1 != "TOGA" and state2 != "TOGA" and state1 != "IDLE" and state2 != "IDLE" and
!pts.Systems.Thrust.engOut.getValue()) {
Modes.PFD.FMA.throttleModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
} else if (athr == 1 and state1 != "TOGA" and state2 != "TOGA" and state1 != "IDLE" and state2 != "IDLE" and pts.Systems.Thrust.engOut.getValue()) {
if (pts.Controls.Engines.Engine.throttlePos[0].getValue() < 0.83 and pts.Controls.Engines.Engine.throttlePos[1].getValue() < 0.83) {
Modes.PFD.FMA.throttleModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
}
});
setlistener("/modes/pfd/fma/roll-mode", func {
var newlat = getprop("/modes/pfd/fma/roll-mode");
if (newlat != " ") {
setprop("/modes/pfd/fma/roll-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.rollMode.getValue() != " ") {
Modes.PFD.FMA.rollModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/pitch-mode", func {
var newvert = getprop("/modes/pfd/fma/pitch-mode");
if (newvert != " ") {
setprop("/modes/pfd/fma/pitch-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.pitchMode.getValue() != " ") {
Modes.PFD.FMA.pitchModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/roll-mode-armed", func {
var newarm = getprop("/modes/pfd/fma/roll-mode-armed");
if (newarm != " ") {
setprop("/modes/pfd/fma/roll-mode-armed-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.rollModeArmed.getValue() != " ") {
Modes.PFD.FMA.rollModeArmedTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/pitch-mode-armed", func {
var newarm = getprop("/modes/pfd/fma/pitch-mode-armed");
if (newarm != " ") {
setprop("/modes/pfd/fma/pitch-mode-armed-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.pitchModeArmed.getValue() != " ") {
Modes.PFD.FMA.pitchModeArmedTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/pitch-mode2-armed", func {
var newarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
if (newarm != " ") {
setprop("/modes/pfd/fma/pitch-mode2-armed-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.pitchMode2Armed != " ") {
Modes.PFD.FMA.pitchMode2ArmedTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("sim/signals/fdm-initialized", func {
init();
});

View file

@ -12,31 +12,18 @@ var code2 = 0;
var gear0 = 0;
var state1 = 0;
var state2 = 0;
var flaps = 0;
var dep = "";
var arr = "";
var n1_left = 0;
var n1_right = 0;
var flaps = 0;
var modelat = 0;
var mode = 0;
var modeI = 0;
var gs = 0;
var aglalt = 0;
var cruiseft = 0;
var cruiseft_b = 0;
var newcruise = 0;
var phase = 0;
var state1 = 0;
var state2 = 0;
var wowl = 0;
var wowr = 0;
var targetalt = 0;
var targetvs = 0;
var targetfpa = 0;
var accel_agl_ft = 0;
var locarm = 0;
var apprarm = 0;
var fd1 = 0;
var fd2 = 0;
var spd = 0;
@ -65,37 +52,17 @@ var nameadf1 = "XX";
var ias = 0;
var mach = 0;
var ktsmach = 0;
var mngktsmach = 0;
var mng_spd = 0;
var mng_spd_cmd = 0;
var kts_sel = 0;
var mach_sel = 0;
var srsSPD = 0;
var mach_switchover = 0;
var decel = 0;
var mng_alt_spd_cmd = 0;
var mng_alt_spd = 0;
var mng_alt_mach_cmd = 0;
var mng_alt_mach = 0;
var mng_spd_cmd = 0;
var mng_spd = 0;
var ap1 = 0;
var ap2 = 0;
var flx = 0;
var lat = 0;
var newlat = 0;
var vert = 0;
var newvert = 0;
var newvertarm = 0;
var thr1 = 0;
var thr2 = 0;
var altsel = 0;
var crzFl = 0;
var windHdg = 0;
var windSpeed = 0;
setprop("position/gear-agl-ft", 0);
setprop("/FMGC/internal/mng-spd", 157);
setprop("/FMGC/internal/mng-spd-cmd", 157);
setprop("/FMGC/internal/mng-kts-mach", 0);
setprop("/FMGC/internal/mach-switchover", 0);
setprop("/it-autoflight/settings/accel-agl-ft", 1500); #eventually set to 1500 above runway
setprop("/it-autoflight/internal/vert-speed-fpm", 0);
setprop("/it-autoflight/output/fma-pwr", 0);
@ -108,15 +75,18 @@ setprop("/FMGC/internal/vor2-mcdu", "999.99/XXX");
setprop("/FMGC/internal/adf1-mcdu", "XXX/999.99");
setprop("/FMGC/internal/adf2-mcdu", "999.99/XXX");
var blockCalculating = props.globals.initNode("/FMGC/internal/block-calculating", 0, "BOOL");
var fuelCalculating = props.globals.initNode("/FMGC/internal/fuel-calculating", 0, "BOOL");
var FMGCinit = func {
FMGCInternal.takeoffState = 0;
FMGCInternal.minspeed = 0;
FMGCInternal.maxspeed = 338;
FMGCInternal.phase = 0; # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done
setprop("/FMGC/internal/mng-spd", 157);
setprop("/FMGC/internal/mng-spd-cmd", 157);
setprop("/FMGC/internal/mng-kts-mach", 0);
setprop("/FMGC/internal/mach-switchover", 0);
FMGCInternal.mngSpd = 157;
FMGCInternal.mngSpdCmd = 157;
FMGCInternal.mngKtsMach = 0;
FMGCInternal.machSwitchover = 0;
setprop("/FMGC/internal/loc-source", "NAV0");
setprop("/FMGC/internal/optalt", 0);
setprop("/FMGC/internal/landing-time", -99);
@ -168,6 +138,7 @@ var FMGCInternal = {
flap2_appr: 0,
vls_appr: 0,
vapp_appr: 0,
vappSpeedSet: 0,
# PERF
transAlt: 18000,
@ -186,6 +157,9 @@ var FMGCInternal = {
destMagSet: 0,
destWind: 0,
destWindSet: 0,
radioNo: 0,
ldgConfig3: 0,
ldgConfigFull: 0,
# INIT A
altAirport: "",
@ -215,6 +189,10 @@ var FMGCInternal = {
zfwcgSet: 0,
block: 0.0,
blockSet: 0,
blockCalculating: 0,
blockConfirmed: 0,
fuelCalculating: 0,
fuelRequest: 0,
taxiFuel: 0.4,
taxiFuelSet: 0,
tripFuel: 0,
@ -248,6 +226,13 @@ var FMGCInternal = {
fob: 0,
fuelPredGw: 0,
cg: 0,
# Managed Speed
machSwitchover: 0,
mngKtsMach: 0,
mngSpd: 0,
mngSpdCmd: 0,
};
var postInit = func() {
@ -259,10 +244,14 @@ var postInit = func() {
var FMGCNodes = {
costIndex: props.globals.initNode("/FMGC/internal/cost-index", 0, "DOUBLE"),
flexSet: props.globals.initNode("/FMGC/internal/flex-set", 0, "BOOL"),
flexTemp: props.globals.initNode("/FMGC/internal/flex", 0, "INT"),
mngSpdAlt: props.globals.getNode("/FMGC/internal/mng-alt-spd"),
mngMachAlt: props.globals.getNode("/FMGC/internal/mng-alt-mach"),
toFromSet: props.globals.initNode("/FMGC/internal/tofrom-set", 0, "BOOL"),
toState: props.globals.initNode("/FMGC/internal/to-state", 0, "BOOL"),
v1: props.globals.initNode("/FMGC/internal/v1", 0, "DOUBLE"),
v1set: props.globals.initNode("/FMGC/internal/v1-set", 0, "BOOL"),
toState: props.globals.initNode("/FMGC/internal/to-state", 0, "BOOL"),
};
############
@ -274,8 +263,8 @@ setlistener("/gear/gear[0]/wow", func {
}, 0, 0);
var trimReset = func {
flaps = getprop("/controls/flight/flaps-pos");
if (pts.Gear.wow[0].getBoolValue() and !FMGCInternal.takeoffState and (flaps >= 5 or (flaps >= 4 and getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap3-override") == 1))) {
flaps = pts.Controls.Flight.flapsPos.getValue();
if (pts.Gear.wow[0].getBoolValue() and !FMGCInternal.takeoffState and (flaps >= 5 or (flaps >= 4 and pts.Instrumentation.MKVII.Inputs.Discretes.flap3Override.getValue() == 1))) {
interpolate("/controls/flight/elevator-trim", 0.0, 1.5);
}
}
@ -479,16 +468,16 @@ var updateFuel = func {
}
# Misc fuel claclulations
if (getprop("/FMGC/internal/block-calculating")) {
if (fmgc.FMGCInternal.blockCalculating) {
FMGCInternal.block = num(FMGCInternal.altFuel + FMGCInternal.finalFuel + FMGCInternal.tripFuel + FMGCInternal.rteRsv + FMGCInternal.taxiFuel);
FMGCInternal.blockSet = 1;
}
fmgc.FMGCInternal.fob = num(getprop("/consumables/fuel/total-fuel-lbs") / 1000);
fmgc.FMGCInternal.fuelPredGw = num(getprop("/fdm/jsbsim/inertia/weight-lbs") / 1000);
fmgc.FMGCInternal.fob = num(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000);
fmgc.FMGCInternal.fuelPredGw = num(pts.Fdm.JSBsim.Inertia.weightLbs.getValue() / 1000);
fmgc.FMGCInternal.cg = fmgc.FMGCInternal.zfwcg;
# Calcualte extra fuel
if (num(getprop("/engines/engine[0]/n1-actual")) > 0 or num(getprop("/engines/engine[1]/n1-actual")) > 0) {
if (num(pts.Engines.Engine.n1Actual[0].getValue()) > 0 or num(pts.Engines.Engine.n1Actual[1].getValue()) > 0) {
extra_fuel = 1000 * num(FMGCInternal.fob - FMGCInternal.tripFuel - FMGCInternal.minDestFob - FMGCInternal.taxiFuel - FMGCInternal.rteRsv);
} else {
extra_fuel = 1000 * num(FMGCInternal.block - FMGCInternal.tripFuel - FMGCInternal.minDestFob - FMGCInternal.taxiFuel - FMGCInternal.rteRsv);
@ -607,71 +596,49 @@ var radios = maketimer(1, func() {
});
var masterFMGC = maketimer(0.2, func {
n1_left = getprop("/engines/engine[0]/n1-actual");
n1_right = getprop("/engines/engine[1]/n1-actual");
flaps = getprop("/controls/flight/flaps-pos");
modelat = getprop("/modes/pfd/fma/roll-mode");
mode = getprop("/modes/pfd/fma/pitch-mode");
modeI = getprop("/it-autoflight/mode/vert");
gs = getprop("/velocities/groundspeed-kt");
alt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
aglalt = pts.Position.gearAglFt.getValue();
n1_left = pts.Engines.Engine.n1Actual[0].getValue();
n1_right = pts.Engines.Engine.n1Actual[1].getValue();
modelat = Modes.PFD.FMA.rollMode.getValue();
mode = Modes.PFD.FMA.pitchMode.getValue();
gs = pts.Velocities.groundspeed.getValue();
alt = pts.Instrumentation.Altimeter.indicatedFt.getValue();
# cruiseft = FMGCInternal.crzFt;
# cruiseft_b = FMGCInternal.crzFt - 200;
newcruise = getprop("/it-autoflight/internal/alt");
phase = FMGCInternal.phase;
state1 = getprop("/systems/thrust/state1");
state2 = getprop("/systems/thrust/state2");
wowl = getprop("/gear/gear[1]/wow");
wowr = getprop("/gear/gear[2]/wow");
targetalt = getprop("/it-autoflight/internal/alt");
targetvs = getprop("/it-autoflight/input/vs");
targetfpa = getprop("/it-autoflight/input/fpa");
accel_agl_ft = getprop("/it-autoflight/settings/accel-agl-ft");
locarm = getprop("/it-autopilot/output/loc-armed");
apprarm = getprop("/it-autopilot/output/appr-armed");
state1 = pts.Systems.Thrust.state[0].getValue();
state2 = pts.Systems.Thrust.state[1].getValue();
accel_agl_ft = Setting.reducAglFt.getValue();
gear0 = pts.Gear.wow[0].getBoolValue();
ap1 = getprop("/it-autoflight/output/ap1");
ap2 = getprop("/it-autoflight/output/ap2");
flx = getprop("/systems/thrust/lim-flex");
lat = getprop("/it-autoflight/mode/lat");
newlat = getprop("/modes/pfd/fma/roll-mode");
vert = getprop("/it-autoflight/mode/vert");
newvert = getprop("/modes/pfd/fma/pitch-mode");
newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
altSel = getprop("/it-autoflight/input/alt");
altSel = Input.alt.getValue();
if ((n1_left < 85 or n1_right < 85) and gs < 90 and mode == " " and gear0 and FMGCInternal.phase == 1) { # rejected takeoff
FMGCInternal.phase = 0;
setprop("systems/pressurization/mode", "GN");
systems.PNEU.pressMode.setValue("GN");
}
if (gear0 and FMGCInternal.phase == 0 and ((n1_left >= 85 and n1_right >= 85 and mode == "SRS") or gs >= 90)) {
FMGCInternal.phase = 1;
setprop("systems/pressurization/mode", "TO");
systems.PNEU.pressMode.setValue("TO");
}
if (FMGCInternal.phase == 1 and ((mode != "SRS" and mode != " ") or alt >= accel_agl_ft)) {
FMGCInternal.phase = 2;
setprop("systems/pressurization/mode", "TO");
systems.PNEU.pressMode.setValue("TO");
}
if (FMGCInternal.phase == 2 and (mode == "ALT CRZ" or mode == "ALT CRZ*")) {
FMGCInternal.phase = 3;
setprop("systems/pressurization/mode", "CR");
systems.PNEU.pressMode.setValue("CR");
}
if (FMGCInternal.crzFl >= 200) {
if (FMGCInternal.phase == 3 and (flightPlanController.arrivalDist <= 200 or altSel < 20000)) {
FMGCInternal.phase = 4;
setprop("systems/pressurization/mode", "DE");
systems.PNEU.pressMode.setValue("DE");
}
} else {
if (FMGCInternal.phase == 3 and (flightPlanController.arrivalDist <= 200 or altSel < (FMGCInternal.crzFl * 100))) { # todo - not sure about crzFl condition, investigate what happens!
FMGCInternal.phase = 4;
setprop("systems/pressurization/mode", "DE");
systems.PNEU.pressMode.setValue("DE");
}
}
@ -679,7 +646,7 @@ var masterFMGC = maketimer(0.2, func {
FMGCInternal.phase = 5;
}
if (flightPlanController.num[2].getValue() > 0 and getprop("/FMGC/flightplan[2]/active") == 1 and flightPlanController.arrivalDist <= 15 and (modelat == "NAV" or modelat == "LOC" or modelat == "LOC*") and aglalt < 9500) { #todo decel pseudo waypoint
if (flightPlanController.num[2].getValue() > 0 and getprop("/FMGC/flightplan[2]/active") == 1 and flightPlanController.arrivalDist <= 15 and (modelat == "NAV" or modelat == "LOC" or modelat == "LOC*") and pts.Position.gearAglFt.getValue() < 9500) { #todo decel pseudo waypoint
setprop("/FMGC/internal/decel", 1);
} else if (getprop("/FMGC/internal/decel") == 1 and (FMGCInternal.phase == 0 or FMGCInternal.phase == 6)) {
setprop("/FMGC/internal/decel", 0);
@ -687,8 +654,8 @@ var masterFMGC = maketimer(0.2, func {
if ((FMGCInternal.phase == 5) and state1 == "TOGA" and state2 == "TOGA") {
FMGCInternal.phase = 6;
setprop("systems/pressurization/mode", "TO");
setprop("/it-autoflight/input/toga", 1);
systems.PNEU.pressMode.setValue("TO");
Input.toga.setValue(1);
}
if (FMGCInternal.phase == 6 and alt >= accel_agl_ft) { # todo when insert altn or new dest
@ -711,36 +678,38 @@ var masterFMGC = maketimer(0.2, func {
############################
# wind
############################
windHdg = pts.Environment.windFromHdg.getValue();
windSpeed = pts.Environment.windSpeedKt.getValue();
if (FMGCInternal.phase == 3 or FMGCInternal.phase == 4 or FMGCInternal.phase == 6) {
var windsDidChange = 0;
if (FMGCInternal.crzFt > 5000 and alt > 4980 and alt < 5020) {
if (sprintf("%03d", getprop("/environment/wind-from-heading-deg/")) != fmgc.windController.fl50_wind[0] or sprintf("%03d", getprop("/environment/wind-speed-kt/")) != fmgc.windController.fl50_wind[1]) {
fmgc.windController.fl50_wind[0] = sprintf("%03d", getprop("/environment/wind-from-heading-deg/"));
fmgc.windController.fl50_wind[1] = sprintf("%03d", getprop("/environment/wind-speed-kt/"));
if (sprintf("%03d", windHdg) != fmgc.windController.fl50_wind[0] or sprintf("%03d", windSpeed) != fmgc.windController.fl50_wind[1]) {
fmgc.windController.fl50_wind[0] = sprintf("%03d", windHdg);
fmgc.windController.fl50_wind[1] = sprintf("%03d", windSpeed);
fmgc.windController.fl50_wind[2] = "FL50";
windsDidChange = 1;
}
}
if (FMGCInternal.crzFt > 15000 and alt > 14980 and alt < 15020) {
if (sprintf("%03d", getprop("/environment/wind-from-heading-deg/")) != fmgc.windController.fl150_wind[0] or sprintf("%03d", getprop("/environment/wind-speed-kt/")) != fmgc.windController.fl150_wind[1]) {
fmgc.windController.fl150_wind[0] = sprintf("%03d", getprop("/environment/wind-from-heading-deg/"));
fmgc.windController.fl150_wind[1] = sprintf("%03d", getprop("/environment/wind-speed-kt/"));
if (sprintf("%03d", windHdg) != fmgc.windController.fl150_wind[0] or sprintf("%03d", windSpeed) != fmgc.windController.fl150_wind[1]) {
fmgc.windController.fl150_wind[0] = sprintf("%03d", windHdg);
fmgc.windController.fl150_wind[1] = sprintf("%03d", windSpeed);
fmgc.windController.fl150_wind[2] = "FL150";
windsDidChange = 1;
}
}
if (FMGCInternal.crzFt > 25000 and alt > 24980 and alt < 25020) {
if (sprintf("%03d", getprop("/environment/wind-from-heading-deg/")) != fmgc.windController.fl250_wind[0] or sprintf("%03d", getprop("/environment/wind-speed-kt/")) != fmgc.windController.fl250_wind[1]) {
fmgc.windController.fl250_wind[0] = sprintf("%03d", getprop("/environment/wind-from-heading-deg/"));
fmgc.windController.fl250_wind[1] = sprintf("%03d", getprop("/environment/wind-speed-kt/"));
if (sprintf("%03d", windHdg) != fmgc.windController.fl250_wind[0] or sprintf("%03d", windSpeed) != fmgc.windController.fl250_wind[1]) {
fmgc.windController.fl250_wind[0] = sprintf("%03d", windHdg);
fmgc.windController.fl250_wind[1] = sprintf("%03d", windSpeed);
fmgc.windController.fl250_wind[2] = "FL250";
windsDidChange = 1;
}
}
if (FMGCInternal.crzSet and alt > FMGCInternal.crzFt - 20 and alt < FMGCInternal.crzFt + 20) {
if (sprintf("%03d", getprop("/environment/wind-from-heading-deg/")) != fmgc.windController.flcrz_wind[0] or sprintf("%03d", getprop("/environment/wind-speed-kt/")) != fmgc.windController.flcrz_wind[1]) {
fmgc.windController.flcrz_wind[0] = sprintf("%03d", getprop("/environment/wind-from-heading-deg/"));
fmgc.windController.flcrz_wind[1] = sprintf("%03d", getprop("/environment/wind-speed-kt/"));
if (sprintf("%03d", windHdg) != fmgc.windController.flcrz_wind[0] or sprintf("%03d", windSpeed) != fmgc.windController.flcrz_wind[1]) {
fmgc.windController.flcrz_wind[0] = sprintf("%03d", windHdg);
fmgc.windController.flcrz_wind[1] = sprintf("%03d", windSpeed);
fmgc.windController.flcrz_wind[2] = "FL" ~ FMGCInternal.crzFl;
windsDidChange = 1;
}
@ -753,9 +722,9 @@ var masterFMGC = maketimer(0.2, func {
############################
# calculate speeds
############################
flap = getprop("/controls/flight/flaps-pos");
weight_lbs = getprop("/fdm/jsbsim/inertia/weight-lbs") / 1000;
altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
flap = pts.Controls.Flight.flapsPos.getValue();
weight_lbs = pts.Fdm.JSBsim.Inertia.weightLbs.getValue() / 1000;
altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue();
# current speeds
FMGCInternal.clean = 2 * weight_lbs * 0.45359237 + 85;
@ -771,7 +740,7 @@ var masterFMGC = maketimer(0.2, func {
FMGCInternal.slat = FMGCInternal.vs1g_clean * 1.23;
FMGCInternal.flap2 = FMGCInternal.vs1g_conf_2 * 1.47;
FMGCInternal.flap3 = FMGCInternal.vs1g_conf_3 * 1.36;
if (getprop("/FMGC/internal/ldg-config-3-set")) {
if (FMGCInternal.ldgConfig3) {
FMGCInternal.vls = FMGCInternal.vs1g_conf_3 * 1.23;
} else {
FMGCInternal.vls = FMGCInternal.vs1g_conf_full * 1.23
@ -779,7 +748,7 @@ var masterFMGC = maketimer(0.2, func {
if (FMGCInternal.vls < 113) {
FMGCInternal.vls = 113;
}
if (!getprop("/FMGC/internal/vapp-speed-set")) {
if (!fmgc.FMGCInternal.vappSpeedSet) {
if (FMGCInternal.destWind < 5) {
FMGCInternal.vapp = FMGCInternal.vls + 5;
} else if (FMGCInternal.destWind > 15) {
@ -821,7 +790,7 @@ var masterFMGC = maketimer(0.2, func {
FMGCInternal.slat_appr = FMGCInternal.slat;
FMGCInternal.flap2_appr = FMGCInternal.flap2;
FMGCInternal.vls_appr = FMGCInternal.vls;
if (!getprop("/FMGC/internal/vapp-speed-set")) {
if (!fmgc.FMGCInternal.vappSpeedSet) {
FMGCInternal.vapp_appr = FMGCInternal.vapp;
}
} else {
@ -835,7 +804,7 @@ var masterFMGC = maketimer(0.2, func {
FMGCInternal.vs1g_conf_full_appr = -0.0007 * FMGCInternal.lw * FMGCInternal.lw + 0.6002 * FMGCInternal.lw + 38.479;
FMGCInternal.slat_appr = FMGCInternal.vs1g_clean_appr * 1.23;
FMGCInternal.flap2_appr = FMGCInternal.vs1g_conf_2_appr * 1.47;
if (getprop("/FMGC/internal/ldg-config-3-set")) {
if (FMGCInternal.ldgConfig3) {
FMGCInternal.vls_appr = FMGCInternal.vs1g_conf_3_appr * 1.23;
} else {
FMGCInternal.vls_appr = FMGCInternal.vs1g_conf_full_appr * 1.23
@ -843,7 +812,7 @@ var masterFMGC = maketimer(0.2, func {
if (FMGCInternal.vls_appr < 113) {
FMGCInternal.vls_appr = 113;
}
if (!getprop("/FMGC/internal/vapp-speed-set")) {
if (!fmgc.FMGCInternal.vappSpeedSet) {
if (FMGCInternal.destWind < 5) {
FMGCInternal.vapp_appr = FMGCInternal.vls_appr + 5;
} else if (FMGCInternal.destWind > 15) {
@ -920,7 +889,11 @@ var masterFMGC = maketimer(0.2, func {
}
} else if (flap == 5) { # FULL
FMGCInternal.vsw = FMGCInternal.vs1g_conf_full;
if (FMGCInternal.vappSpeedSet) {
FMGCInternal.minspeed = FMGCInternal.vapp_appr;
} else {
FMGCInternal.minspeed = FMGCInternal.vapp;
}
if (FMGCInternal.takeoffState) {
FMGCInternal.vls_min = FMGCInternal.vs1g_clean * 1.13;
@ -929,7 +902,7 @@ var masterFMGC = maketimer(0.2, func {
}
}
if (gear0 and flaps < 5 and (state1 == "MCT" or state1 == "MAN THR" or state1 == "TOGA") and (state2 == "MCT" or state2 == "MAN THR" or state2 == "TOGA")) {
if (gear0 and pts.Controls.Flight.flapsPos.getValue() < 5 and (state1 == "MCT" or state1 == "MAN THR" or state1 == "TOGA") and (state2 == "MCT" or state2 == "MAN THR" or state2 == "TOGA")) {
if (!FMGCInternal.takeoffState) {
fmgc.FMGCNodes.toState.setValue(1);
}
@ -947,7 +920,7 @@ var masterFMGC = maketimer(0.2, func {
departure_rwy = fmgc.flightPlanController.flightplans[2].departure_runway;
destination_rwy = fmgc.flightPlanController.flightplans[2].destination_runway;
if (destination_rwy != nil and phase >= 2) {
if (destination_rwy != nil and FMGCInternal.phase >= 2) {
var airport = airportinfo(FMGCInternal.arrApt);
setprop("/FMGC/internal/ldg-elev", airport.elevation * M2FT); # eventually should be runway elevation
magnetic_hdg = geo.normdeg(destination_rwy.heading - getprop("/environment/magnetic-variation-deg"));
@ -962,7 +935,7 @@ var masterFMGC = maketimer(0.2, func {
} else if (!getprop("/FMGC/internal/ils1crs-set")) {
setprop("instrumentation/nav[0]/radials/selected-deg", magnetic_hdg);
}
} else if (departure_rwy != nil and phase <= 1) {
} else if (departure_rwy != nil and FMGCInternal.phase <= 1) {
magnetic_hdg = geo.normdeg(departure_rwy.heading - getprop("/environment/magnetic-variation-deg"));
runway_ils = departure_rwy.ils_frequency_mhz;
if (runway_ils != nil and !getprop("/FMGC/internal/ils1freq-set") and !getprop("/FMGC/internal/ils1crs-set")) {
@ -980,43 +953,45 @@ var masterFMGC = maketimer(0.2, func {
var reset_FMGC = func {
FMGCInternal.phase = 0;
fd1 = getprop("/it-autoflight/input/fd1");
fd2 = getprop("/it-autoflight/input/fd2");
spd = getprop("/it-autoflight/input/kts");
hdg = getprop("/it-autoflight/input/hdg");
alt = getprop("/it-autoflight/input/alt");
fd1 = Input.fd1.getValue();
fd2 = Input.fd2.getValue();
spd = Input.kts.getValue();
hdg = Input.hdg.getValue();
alt = Input.alt.getValue();
ITAF.init();
FMGCinit();
flightPlanController.reset();
windController.reset();
windController.init();
mcdu.MCDU_reset(0);
mcdu.MCDU_reset(1);
setprop("it-autoflight/input/fd1", fd1);
setprop("it-autoflight/input/fd2", fd2);
setprop("it-autoflight/input/kts", spd);
setprop("it-autoflight/input/hdg", hdg);
setprop("it-autoflight/input/alt", alt);
setprop("systems/pressurization/mode", "GN");
setprop("systems/pressurization/vs", "0");
setprop("systems/pressurization/targetvs", "0");
setprop("systems/pressurization/vs-norm", "0");
setprop("systems/pressurization/auto", 1);
setprop("systems/pressurization/deltap", "0");
setprop("systems/pressurization/outflowpos", "0");
setprop("systems/pressurization/deltap-norm", "0");
setprop("systems/pressurization/outflowpos-norm", "0");
altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
setprop("systems/pressurization/cabinalt", altitude);
setprop("systems/pressurization/targetalt", altitude);
setprop("systems/pressurization/diff-to-target", "0");
setprop("systems/pressurization/ditchingpb", 0);
setprop("systems/pressurization/targetvs", "0");
setprop("systems/pressurization/ambientpsi", "0");
setprop("systems/pressurization/cabinpsi", "0");
mcdu.ReceivedMessagesDatabase.clearDatabase();
Input.fd1.setValue(fd1);
Input.fd2.setValue(fd2);
Input.kts.setValue(spd);
Input.hdg.setValue(hdg);
Input.alt.setValue(alt);
systems.PNEU.pressMode.setValue("GN");
setprop("/systems/pressurization/vs", "0");
setprop("/systems/pressurization/targetvs", "0");
setprop("/systems/pressurization/vs-norm", "0");
setprop("/systems/pressurization/auto", 1);
setprop("/systems/pressurization/deltap", "0");
setprop("/systems/pressurization/outflowpos", "0");
setprop("/systems/pressurization/deltap-norm", "0");
setprop("/systems/pressurization/outflowpos-norm", "0");
altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue();
setprop("/systems/pressurization/cabinalt", altitude);
setprop("/systems/pressurization/targetalt", altitude);
setprop("/systems/pressurization/diff-to-target", "0");
setprop("/systems/pressurization/ditchingpb", 0);
setprop("/systems/pressurization/targetvs", "0");
setprop("/systems/pressurization/ambientpsi", "0");
setprop("/systems/pressurization/cabinpsi", "0");
}
#################
@ -1025,121 +1000,110 @@ var reset_FMGC = func {
var ManagedSPD = maketimer(0.25, func {
if (FMGCInternal.crzSet and FMGCInternal.costIndexSet) {
if (getprop("/it-autoflight/input/spd-managed") == 1) {
altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
mode = getprop("/modes/pfd/fma/pitch-mode");
ias = getprop("/instrumentation/airspeed-indicator/indicated-speed-kt");
mach = getprop("/instrumentation/airspeed-indicator/indicated-mach");
ktsmach = getprop("/it-autoflight/input/kts-mach");
mngktsmach = getprop("/FMGC/internal/mng-kts-mach");
mng_spd = getprop("/FMGC/internal/mng-spd");
mng_spd_cmd = getprop("/FMGC/internal/mng-spd-cmd");
kts_sel = getprop("/it-autoflight/input/kts");
mach_sel = getprop("/it-autoflight/input/mach");
if (Custom.Input.spdManaged.getBoolValue()) {
altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue();
mode = Modes.PFD.FMA.pitchMode.getValue();
ias = pts.Instrumentation.AirspeedIndicator.indicatedSpdKt.getValue();
mach = pts.Instrumentation.AirspeedIndicator.indicatedMach.getValue();
ktsmach = Input.ktsMach.getValue();
kts_sel = Input.kts.getValue();
mach_sel = Input.mach.getValue();
srsSPD = getprop("/it-autoflight/settings/togaspd");
phase = FMGCInternal.phase; # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done
flap = getprop("/controls/flight/flaps-pos");
mach_switchover = getprop("/FMGC/internal/mach-switchover");
flap = pts.Controls.Flight.flapsPos.getValue();
decel = getprop("/FMGC/internal/decel");
mng_alt_spd_cmd = getprop("/FMGC/internal/mng-alt-spd");
mng_alt_spd = math.round(mng_alt_spd_cmd, 1);
mng_alt_mach_cmd = getprop("/FMGC/internal/mng-alt-mach");
mng_alt_mach = math.round(mng_alt_mach_cmd, 0.001);
mng_alt_spd = math.round(FMGCNodes.mngSpdAlt.getValue(), 1);
mng_alt_mach = math.round(FMGCNodes.mngMachAlt.getValue(), 0.001);
if (mach > mng_alt_mach and (FMGCInternal.phase == 2 or FMGCInternal.phase == 3)) {
setprop("/FMGC/internal/mach-switchover", 1);
FMGCInternal.machSwitchover = 1;
}
if (ias > mng_alt_spd and (FMGCInternal.phase == 4 or FMGCInternal.phase == 5)) {
setprop("/FMGC/internal/mach-switchover", 0);
FMGCInternal.machSwitchover = 0;
}
if ((mode == " " or mode == "SRS") and (FMGCInternal.phase == 0 or FMGCInternal.phase == 1)) {
if (mngktsmach) {
setprop("/FMGC/internal/mng-kts-mach", 0);
if (FMGCInternal.mngKtsMach) {
FMGCInternal.mngKtsMach = 0;
}
if (mng_spd_cmd != srsSPD) {
setprop("/FMGC/internal/mng-spd-cmd", srsSPD);
if (FMGCInternal.mngSpdCmd != srsSPD) {
FMGCInternal.mngSpdCmd = srsSPD;
}
} else if ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude <= 10050) {
if (mngktsmach) {
setprop("/FMGC/internal/mng-kts-mach", 0);
if (FMGCInternal.mngKtsMach) {
FMGCInternal.mngKtsMach = 0;
}
if (mng_spd_cmd != 250 and !decel) {
setprop("/FMGC/internal/mng-spd-cmd", 250);
} else if (mng_spd_cmd != FMGCInternal.minspeed and decel) {
setprop("/FMGC/internal/mng-spd-cmd", FMGCInternal.minspeed);
if (FMGCInternal.mngSpdCmd != 250 and !decel) {
FMGCInternal.mngSpdCmd = 250;
} else if (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) {
FMGCInternal.mngSpdCmd = FMGCInternal.minspeed;
}
} else if ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and !mach_switchover) {
if (mngktsmach) {
setprop("/FMGC/internal/mng-kts-mach", 0);
} else if ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and !FMGCInternal.machSwitchover) {
if (FMGCInternal.mngKtsMach) {
FMGCInternal.mngKtsMach = 0;
}
if (mng_spd_cmd != mng_alt_spd) {
setprop("/FMGC/internal/mng-spd-cmd", mng_alt_spd);
if (FMGCInternal.mngSpdCmd != mng_alt_spd) {
FMGCInternal.mngSpdCmd = mng_alt_spd;
}
} else if ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and mach_switchover) {
if (!mngktsmach) {
setprop("/FMGC/internal/mng-kts-mach", 1);
} else if ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and FMGCInternal.machSwitchover) {
if (!FMGCInternal.mngKtsMach) {
FMGCInternal.mngKtsMach = 1;
}
if (mng_spd_cmd != mng_alt_mach) {
setprop("/FMGC/internal/mng-spd-cmd", mng_alt_mach);
if (FMGCInternal.mngSpdCmd != mng_alt_mach) {
FMGCInternal.mngSpdCmd = mng_alt_mach;
}
} else if (FMGCInternal.phase == 4 and altitude > 11000 and !mach_switchover) {
if (mngktsmach) {
setprop("/FMGC/internal/mng-kts-mach", 0);
} else if (FMGCInternal.phase == 4 and altitude > 11000 and !FMGCInternal.machSwitchover) {
if (FMGCInternal.mngKtsMach) {
FMGCInternal.mngKtsMach = 0;
}
if (mng_spd_cmd != mng_alt_spd) {
setprop("/FMGC/internal/mng-spd-cmd", mng_alt_spd);
if (FMGCInternal.mngSpdCmd != mng_alt_spd) {
FMGCInternal.mngSpdCmd = mng_alt_spd;
}
} else if (FMGCInternal.phase == 4 and altitude > 11000 and mach_switchover) {
if (!mngktsmach) {
setprop("/FMGC/internal/mng-kts-mach", 1);
} else if (FMGCInternal.phase == 4 and altitude > 11000 and FMGCInternal.machSwitchover) {
if (!FMGCInternal.mngKtsMach) {
FMGCInternal.mngKtsMach = 1;
}
if (mng_spd_cmd != mng_alt_mach) {
setprop("/FMGC/internal/mng-spd-cmd", mng_alt_mach);
if (FMGCInternal.mngSpdCmd != mng_alt_mach) {
FMGCInternal.mngSpdCmd = mng_alt_mach;
}
} else if ((FMGCInternal.phase == 4 or FMGCInternal.phase == 5 or FMGCInternal.phase == 6) and altitude > 11000 and !mach_switchover) {
if (mngktsmach) {
setprop("/FMGC/internal/mng-kts-mach", 0);
} else if ((FMGCInternal.phase == 4 or FMGCInternal.phase == 5 or FMGCInternal.phase == 6) and altitude > 11000 and !FMGCInternal.machSwitchover) {
if (FMGCInternal.mngKtsMach) {
FMGCInternal.mngKtsMach = 0;
}
if (mng_spd_cmd != mng_alt_spd and !decel) {
setprop("/FMGC/internal/mng-spd-cmd", mng_alt_spd);
} else if (mng_spd_cmd != FMGCInternal.minspeed and decel) {
setprop("/FMGC/internal/mng-spd-cmd", FMGCInternal.minspeed);
if (FMGCInternal.mngSpdCmd != mng_alt_spd and !decel) {
FMGCInternal.mngSpdCmd = mng_alt_spd;
} else if (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) {
FMGCInternal.mngSpdCmd = FMGCInternal.minspeed;
}
} else if ((FMGCInternal.phase == 4 or FMGCInternal.phase == 5 or FMGCInternal.phase == 6) and altitude <= 10980) {
if (mngktsmach) {
setprop("/FMGC/internal/mng-kts-mach", 0);
if (FMGCInternal.mngKtsMach) {
FMGCInternal.mngKtsMach = 0;
}
if (mng_spd_cmd != 250 and !decel) {
setprop("/FMGC/internal/mng-spd-cmd", 250);
} else if (mng_spd_cmd != FMGCInternal.minspeed and decel) {
setprop("/FMGC/internal/mng-spd-cmd", FMGCInternal.minspeed);
if (FMGCInternal.mngSpdCmd != 250 and !decel) {
FMGCInternal.mngSpdCmd = 250;
} else if (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) {
FMGCInternal.mngSpdCmd = FMGCInternal.minspeed;
}
}
mng_spd_cmd = getprop("/FMGC/internal/mng-spd-cmd");
if (mng_spd_cmd > FMGCInternal.maxspeed - 5) {
setprop("/FMGC/internal/mng-spd", FMGCInternal.maxspeed - 5);
if (FMGCInternal.mngSpdCmd > FMGCInternal.maxspeed - 5) {
FMGCInternal.mngSpd = (FMGCInternal.maxspeed - 5);
} else {
setprop("/FMGC/internal/mng-spd", mng_spd_cmd);
FMGCInternal.mngSpd = FMGCInternal.mngSpdCmd;
}
if (ktsmach and !mngktsmach) {
setprop("/it-autoflight/input/kts-mach", 0);
} else if (!ktsmach and mngktsmach) {
setprop("/it-autoflight/input/kts-mach", 1);
if (ktsmach and !FMGCInternal.mngKtsMach) {
Input.ktsMach.setValue(0);
} else if (!ktsmach and FMGCInternal.mngKtsMach) {
Input.ktsMach.setValue(1);
}
mng_spd = getprop("/FMGC/internal/mng-spd");
if (kts_sel != mng_spd and !ktsmach) {
setprop("/it-autoflight/input/kts", mng_spd);
} else if (mach_sel != mng_spd and ktsmach) {
setprop("/it-autoflight/input/mach", mng_spd);
if (kts_sel != FMGCInternal.mngSpd and !ktsmach) {
Input.kts.setValue(FMGCInternal.mngSpd);
} else if (mach_sel != FMGCInternal.mngSpd and ktsmach) {
Input.mach.setValue(FMGCInternal.mngSpd);
}
} else {
ManagedSPD.stop();
@ -1168,7 +1132,7 @@ setlistener("/gear/gear[1]/wow", func() {
setprop("/FMGC/internal/landing-time", -99);
}
if (getprop("/gear/gear[1]/wow") == 1 and getprop("/FMGC/internal/landing-time") == -99) {
if (pts.Gear.wow[1].getValue() and getprop("/FMGC/internal/landing-time") == -99) {
timer30secLanding.start();
setprop("/FMGC/internal/landing-time", pts.Sim.Time.elapsedSec.getValue());
}
@ -1279,7 +1243,8 @@ var timer48gpsAlign3 = maketimer(1, func() {
var timer3blockFuel = maketimer(1, func() {
if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/block-fuel-time") + 3) {
#updateFuel();
setprop("/FMGC/internal/block-calculating", 0);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
setprop("/FMGC/internal/block-fuel-time", -99);
timer3blockFuel.stop();
}
@ -1288,7 +1253,8 @@ var timer3blockFuel = maketimer(1, func() {
var timer5fuelPred = maketimer(1, func() {
if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/fuel-pred-time") + 5) {
#updateFuel();
setprop("/FMGC/internal/fuel-calculating", 0);
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
setprop("/FMGC/internal/fuel-pred-time", -99);
timer5fuelPred.stop();
}

View file

@ -1,6 +1,8 @@
# A3XX Simbrief Parser
# Copyright (c) 2020 Jonathan Redpath (legoboyvdlp)
var LBS2KGS = 0.4535924;
var SimbriefParser = {
node: nil,
OFP: nil,
@ -12,7 +14,14 @@ var SimbriefParser = {
var stamp = systime();
http.save("https://www.simbrief.com/api/xml.fetcher.php?username=" ~ username, getprop('/sim/fg-home') ~ "/Export/A320-family-simbrief.xml")
.fail(func me.failure(i))
.done(func me.read(getprop('/sim/fg-home') ~ "/Export/A320-family-simbrief.xml", i));
.done(func {
var errs = [];
call(me.read, [(getprop('/sim/fg-home') ~ "/Export/A320-family-simbrief.xml"),i], SimbriefParser, {}, errs);
if (size(errs) > 0) {
debug.printerror(errs);
me.failure(i);
}
});
},
failure: func(i) {
mcdu.mcdu_message(i, "SIMBRIEF DOWNLOAD FAILED");
@ -23,137 +32,202 @@ var SimbriefParser = {
if (data != nil) {
if (data.getChild("OFP") == nil) {
print("XML file " ~ xml ~ " not a valid Simbrief file");
me.failure(i);
return;
} else {
me.node = data;
me.parseOFP();
if (me.parseOFP() == nil) {
print("Failure to parse Simbrief OFP");
me.failure(i);
} else {
mcdu.mcdu_message(i, "AOC ACT F-PLN UPLINK");
}
}
} else {
print("Error reading " ~ xml);
me.failure(i);
}
},
tryFindByCoord: func(coords, id, type) {
var result = nil;
if (type == "nav") {
result = findNavaidsByID(id);
} elsif (type == "fix") {
result = findFixesByID(id);
} else {
return nil;
}
if (size(result) == 0) { return nil; }
foreach (var test; result) {
if (math.abs(test.lat - coords.lat()) < 0.01666666666 and math.abs(test.lon - coords.lon()) < 0.01666666666) {
return test;
}
}
return nil;
},
buildFlightplan: func() {
# Flightplan stuff
fmgc.flightPlanController.flightplans[3] = createFlightplan();
fmgc.flightPlanController.flightplans[3].cleanPlan();
# INITA
var departureID = me.OFP.getNode("origin/icao_code").getValue();
var departures = findAirportsByICAO(departureID);
var destinationID = me.OFP.getNode("destination/icao_code").getValue();
var destinations = findAirportsByICAO(destinationID);
if (departures != nil and size(departures) != 0 and destinations != nil and size(destinations) != 0) {
fmgc.flightPlanController.flightplans[3].departure = departures[0];
fmgc.flightPlanController.flightplans[3].destination = destinations[0];
fmgc.FMGCInternal.depApt = departureID;
fmgc.FMGCInternal.arrApt = destinationID;
atsu.ATISInstances[0].newStation(departureID);
atsu.ATISInstances[1].newStation(destinationID);
fmgc.FMGCInternal.toFromSet = 1;
fmgc.FMGCNodes.toFromSet.setValue(1);
fmgc.updateArptLatLon();
fmgc.updateARPT();
} else {
me.cleanupInvalid();
return nil;
}
var runwayStore = departures[0].runways[me.OFP.getNode("origin/plan_rwy").getValue()];
if (runwayStore != nil) {
fmgc.flightPlanController.flightplans[3].departure_runway = runwayStore;
}
runwayStore = destinations[0].runways[me.OFP.getNode("destination/plan_rwy").getValue()];
if (runwayStore != nil) {
fmgc.flightPlanController.flightplans[3].destination_runway = runwayStore;
}
var alternateID = me.OFP.getNode("alternate/icao_code").getValue();
var alternates = findAirportsByICAO(alternateID);
if (alternates != nil and size(alternates) != 0) {
fmgc.FMGCInternal.altAirport = alternateID;
atsu.ATISInstances[2].newStation(alternateID);
fmgc.FMGCInternal.altAirportSet = 1;
}
var wps = [];
var ofpNavlog = me.OFP.getNode("navlog");
var ofpFixes = ofpNavlog.getChildren("fix");
var ident = "";
var coords = nil;
var wp = nil;
var _foundSID = 0;
var _foundSTAR = 0;
var _foundTOC = 0;
var _foundTOD = 0;
var _sid = nil;
var _star = nil;
foreach (var ofpFix; ofpFixes) {
if (ofpFix.getNode("is_sid_star").getBoolValue()) {
if (!_foundSID) {
_sid = fmgc.flightPlanController.flightplans[3].departure.getSid(ofpFix.getNode("via_airway").getValue());
if (_sid != nil) {
_foundSID = 1;
}
}
}
if (ofpFix.getNode("is_sid_star").getBoolValue()) {
if (!_foundSTAR) {
_star = fmgc.flightPlanController.flightplans[3].destination.getStar(ofpFix.getNode("via_airway").getValue());
if (_star != nil) {
_foundSTAR = 1;
}
}
}
if (ofpFix.getNode("is_sid_star").getBoolValue() and _foundSID and _foundSTAR) {
continue;
} # todo what happens if you don't find one but find the other
ident = ofpFix.getNode("ident").getValue();
if (find(departureID, ident) != -1 or find(destinationID, ident) != -1) {
continue;
}
if (ident == "TOC") {
_foundTOC = 1;
continue;
}
if (ident == "TOD") {
_foundTOC = 1;
continue;
}
coords = geo.Coord.new();
coords.set_latlon(
ofpFix.getNode("pos_lat").getValue(),
ofpFix.getNode("pos_long").getValue());
wp = me.tryFindByCoord(coords,ident,"fix");
wp = me.tryFindByCoord(coords,ident,"nav");
if (wp == nil) {
wp = createWP(coords, ident);
}
append(wps, wp);
}
fmgc.flightPlanController.flightplans[3].insertWaypoints(wps, 1);
if (_sid != nil) {
fmgc.flightPlanController.flightplans[3].sid = _sid;
}
if (_star != nil) {
fmgc.flightPlanController.flightplans[3].star = _star;
}
fmgc.flightPlanController.destroyTemporaryFlightPlan(3, 1);
fmgc.windController.updatePlans();
fmgc.updateRouteManagerAlt();
return 1;
},
parseOFP: func() {
me.OFP = me.node.getChild("OFP");
me.store1 = nil;
me.store2 = nil;
me.store1 = me.OFP.getChild("general");
me.store2 = me.OFP.getChild("alternate");
fmgc.FMGCInternal.flightNum = (me.store1.getChild("icao_airline").getValue() or "") ~ (me.store1.getChild("flight_number").getValue() or "");
if (me.buildFlightplan() == nil) {
return nil;
}
fmgc.FMGCInternal.flightNum = (me.OFP.getNode("general/icao_airline").getValue() or "") ~ (me.OFP.getNode("general/flight_number").getValue() or "");
fmgc.FMGCInternal.flightNumSet = 1;
fmgc.FMGCInternal.costIndex = me.store1.getChild("costindex").getValue();
fmgc.FMGCInternal.costIndex = me.OFP.getNode("general/costindex").getValue();
fmgc.FMGCInternal.costIndexSet = 1;
fmgc.FMGCNodes.costIndex.setValue(fmgc.FMGCInternal.costIndex);
fmgc.FMGCInternal.tropo = me.store1.getChild("avg_tropopause").getValue();
fmgc.FMGCInternal.tropo = me.OFP.getNode("general/avg_tropopause").getValue();
fmgc.FMGCInternal.tropoSet = 1;
fmgc.FMGCInternal.crzFt = me.store1.getChild("initial_altitude").getValue();
fmgc.FMGCInternal.crzFl = me.store1.getChild("initial_altitude").getValue() / 100;
fmgc.altvert();
fmgc.FMGCInternal.crzSet = 1;
# Set cruise altitude
fmgc.FMGCInternal.crzFt = me.OFP.getNode("general/initial_altitude").getValue();
fmgc.FMGCInternal.crzFl = fmgc.FMGCInternal.crzFt / 100;
fmgc.FMGCInternal.crzTemp = (((fmgc.FMGCInternal.crzFt / 1000) * -2) + 15) + me.OFP.getNode("general/avg_temp_dev").getValue();
fmgc.FMGCInternal.crzProg = fmgc.FMGCInternal.crzFt / 100;
mcdu.updateCrzLvlCallback();
fmgc.FMGCInternal.crzTemp = (((me.store1.getChild("initial_altitude").getValue() / 1000) * -2) + 15) + me.store1.getChild("avg_temp_dev").getValue();
fmgc.FMGCInternal.crzTempSet = 1;
fmgc.FMGCInternal.crzProg = me.store1.getChild("initial_altitude").getValue() / 100;
if (me.store1.getChild("avg_wind_comp").getValue() >= 0) {
fmgc.FMGCInternal.tripWind = "TL" ~ me.store1.getChild("avg_wind_comp").getValue();
fmgc.FMGCInternal.crzSet = 1;
fmgc.altvert();
var windComp = me.OFP.getNode("general/avg_wind_comp").getValue();
if (num(windComp) >= 0) {
fmgc.FMGCInternal.tripWind = "TL" ~ abs(windComp);
} else {
fmgc.FMGCInternal.tripWind = "HD" ~ me.store1.getChild("avg_wind_comp").getValue();
fmgc.FMGCInternal.tripWind = "HD" ~ abs(windComp);
}
fmgc.FMGCInternal.tripWindValue = me.store1.getChild("avg_wind_comp").getValue();
fmgc.FMGCInternal.altAirport = me.store2.getChild("icao_code").getValue();
fmgc.FMGCInternal.altAirportSet = 1;
# Flightplan stuff
fmgc.flightPlanController.flightplans[3] = createFlightplan();
# INITA
me.store1 = me.OFP.getChild("origin");
me.store2 = me.OFP.getChild("destination");
fmgc.FMGCInternal.depApt = me.store1.getChild("icao_code").getValue();
fmgc.FMGCInternal.arrApt = me.store2.getChild("icao_code").getValue();
fmgc.FMGCInternal.toFromSet = 1;
fmgc.FMGCNodes.toFromSet.setValue(1);
fmgc.flightPlanController.flightplans[3].departure = airportinfo(fmgc.FMGCInternal.depApt);
fmgc.flightPlanController.flightplans[3].destination = airportinfo(fmgc.FMGCInternal.arrApt);
fmgc.FMGCInternal.altSelected = 0;
fmgc.updateArptLatLon();
fmgc.updateARPT();
call(func() {
fmgc.flightPlanController.flightplans[3].departure_runway = airportinfo(fmgc.FMGCInternal.depApt).runways[me.store1.getChild("plan_rwy").getValue()];
fmgc.flightPlanController.flightplans[3].destination_runway = airportinfo(fmgc.FMGCInternal.arrApt).runways[me.store2.getChild("plan_rwy").getValue()];
});
me.store1 = me.OFP.getChild("navlog").getChildren();
if (size(me.store1) != 0) {
var firstIsSID = 0;
var SIDID = "";
if (me.store1[0].getChild("is_sid_star").getValue() == 1) {
if (fmgc.flightPlanController.flightplans[3].departure.getSid(me.store1[0].getChild("via_airway").getValue()) != nil) {
firstIsSID = 1;
SIDID = me.store1[0].getChild("via_airway").getValue();
}
}
var lastIsSTAR = 0;
var STARID = "";
if (me.store1[-1].getChild("is_sid_star").getValue() == 1) {
if (fmgc.flightPlanController.flightplans[3].destination.getStar(me.store1[-1].getChild("via_airway").getValue()) != nil) {
lastIsSTAR = 1;
STARID = me.store1[-1].getChild("via_airway").getValue();
}
}
var lastSIDIndex = -999;
var firstSTARIndex = -999;
var TOCinSIDflag = 0;
var TODinSTARflag = 0;
for (var i = 0; i < size(me.store1); i = i + 1) {
if (firstIsSID) {
if (me.store1[i].getChild("is_sid_star").getValue() == 0 or me.store1[i].getChild("via_airway").getValue() != SIDID) {
lastSIDIndex = i - 1;
break;
}
}
}
for (var i = lastSIDIndex == -999 ? 0 : lastSIDIndex; i < size(me.store1); i = i + 1) {
if (STARID != "") {
if (me.store1[i].getChild("is_sid_star").getValue() == 1 and me.store1[i].getChild("via_airway").getValue() == STARID) {
firstSTARIndex = i;
break;
}
}
}
var max = firstSTARIndex == -999 ? size(me.store1) - 1 : firstSTARIndex - 1;
for (var i = lastSIDIndex == -999 ? 0 : lastSIDIndex + 2; i < max; i = i + 1) {
if (me.store1[i].getChild("ident").getValue() == "TOC" or me.store1[i].getChild("ident").getValue() == "TOD") { continue; }
var coord = geo.Coord.new();
coord.set_latlon(me.store1[i].getChild("pos_lat").getValue(), me.store1[i].getChild("pos_long").getValue());
var fixes = findFixesByID(coord, me.store1[i].getChild("ident").getValue());
var navaids = findNavaidsByID(coord, me.store1[i].getChild("ident").getValue());
if (size(fixes) > 0) {
fmgc.flightPlanController.flightplans[3].appendWP(createWPFrom(fixes[0]));
} else if (size(navaids) > 0) {
fmgc.flightPlanController.flightplans[3].appendWP(createWPFrom(navaids[0]));
} else {
var WP = createWP(coord, me.store1[i].getChild("ident").getValue());
fmgc.flightPlanController.flightplans[3].appendWP(WP);
}
}
fmgc.flightPlanController.flightplans[3].sid = fmgc.flightPlanController.flightplans[3].departure.getSid(SIDID);
fmgc.flightPlanController.flightplans[3].star = fmgc.flightPlanController.flightplans[3].destination.getStar(STARID);
}
fmgc.flightPlanController.destroyTemporaryFlightPlan(3, 1);
fmgc.windController.updatePlans();
fmgc.updateRouteManagerAlt();
fmgc.FMGCInternal.tripWindValue = abs(windComp);
# INITB
me.store1 = me.OFP.getChild("fuel");
me.store2 = me.OFP.getChild("weights");
if (me.OFP.getNode("params/units").getValue() == "lbs") {
fmgc.FMGCInternal.taxiFuel = me.store1.getChild("taxi").getValue() / 1000;
fmgc.FMGCInternal.taxiFuelSet = 1;
fmgc.FMGCInternal.altFuel = me.store1.getChild("alternate_burn").getValue() / 1000;
@ -173,10 +247,34 @@ var SimbriefParser = {
fmgc.FMGCInternal.zfw = me.store2.getChild("est_zfw").getValue() / 1000;
fmgc.FMGCInternal.zfwSet = 1;
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
} else {
fmgc.FMGCInternal.taxiFuel = (me.store1.getChild("taxi").getValue() / LBS2KGS) / 1000;
fmgc.FMGCInternal.taxiFuelSet = 1;
fmgc.FMGCInternal.altFuel = (me.store1.getChild("alternate_burn").getValue() / LBS2KGS) / 1000;
fmgc.FMGCInternal.altFuelSet = 1;
fmgc.FMGCInternal.finalFuel = (me.store1.getChild("reserve").getValue() / LBS2KGS) / 1000;
fmgc.FMGCInternal.finalFuelSet = 1;
fmgc.FMGCInternal.rteRsv = (me.store1.getChild("contingency").getValue() / LBS2KGS) / 1000;
fmgc.FMGCInternal.rteRsvSet = 1;
if (((me.store1.getChild("contingency").getValue() / LBS2KGS) / 1000) / num(fmgc.FMGCInternal.tripFuel) * 100 <= 15.0) {
fmgc.FMGCInternal.rtePercent = ((me.store1.getChild("contingency").getValue() / LBS2KGS) / 1000) / num(fmgc.FMGCInternal.tripFuel) * 100;
} else {
fmgc.FMGCInternal.rtePercent = 15.0
}
fmgc.FMGCInternal.rtePercentSet = 0;
fmgc.FMGCInternal.block = (me.store1.getChild("plan_ramp").getValue() / LBS2KGS) / 1000;
fmgc.FMGCInternal.blockSet = 1;
fmgc.FMGCInternal.zfw = (me.store2.getChild("est_zfw").getValue() / LBS2KGS) / 1000;
fmgc.FMGCInternal.zfwSet = 1;
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
}
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
return 1;
},
};

View file

@ -758,9 +758,11 @@ var flightPlanController = {
fmgc.windController.updatePlans();
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
canvas_nd.A3XXRouteDriver.triggerSignal("fp-added");
},

View file

@ -173,6 +173,7 @@ var MessageController = {
TypeIMessage.new("USING COST INDEX N", 1),TypeIMessage.new("WAIT FOR SYSTEM RESPONSE"),TypeIMessage.new("RWY/LS MISMATCH"),
TypeIMessage.new("VHF3 VOICE MSG NOT GEN"),TypeIMessage.new("NO COMM MSG NOT GEN"),TypeIMessage.new("WX UPLINK"),
TypeIMessage.new("SIMBRIEF DOWNLOAD FAILED"),TypeIMessage.new("MISSING USERNAME"),TypeIMessage.new("AOC ACT F-PLN UPLINK"),
TypeIMessage.new("NO ANSWER TO REQUEST"),TypeIMessage.new("NO D-ATIS AVAILABLE"),TypeIMessage.new("BAD SERVER RESPONSE")
]),
typeIIMessages: std.Vector.new([
TypeIIMessage.new("LAT DISCONT AHEAD", "amb", 0),TypeIIMessage.new("MORE DRAG"),TypeIIMessage.new("RWY/LS MISMATCH", "amb", 0),TypeIIMessage.new("STEP DELETED"),

View file

@ -150,3 +150,9 @@ var toggleSTD = func {
pts.Instrumentation.Altimeter.std.setBoolValue(1);
}
}
var pushbuttonSound = props.globals.getNode("/sim/sounde/pushbutton");
var pushbutton = func {
pushbuttonSound.setValue(1);
settimer(func {pushbuttonSound.setValue(0);},0.20);
}

View file

@ -7,7 +7,6 @@ print("------------------------------------------------");
print("Copyright (c) 2016-2020 Josh Davidson (Octal450)");
print("------------------------------------------------");
setprop("/sim/menubar/default/menu[0]/item[0]/enabled", 0);
setprop("/sim/menubar/default/menu[2]/item[0]/enabled", 0);
setprop("/sim/menubar/default/menu[2]/item[2]/enabled", 0);
@ -206,6 +205,7 @@ var systemsInit = func {
systems.ADIRS.init();
systems.eng_init();
systems.APUController.init();
systems.BrakeSys.reset();
systems.Autobrake.init();
systems.fire_init();
fmgc.flightPlanController.reset();
@ -254,6 +254,7 @@ var systemsLoop = maketimer(0.1, func {
systems.HYD.loop();
systems.ADIRS.loop();
systems.APUController.loop();
systems.BrakeSys.update();
ecam.ECAM.loop();
fadec.FADEC.loop();
rmp.rmpUpdate();
@ -382,7 +383,7 @@ controls.stepSpoilers = func(step) {
}
var deploySpeedbrake = func {
if (pts.Gear.Wow[1].getBoolValue() or pts.Gear.Wow[2].getBoolValue()) {
if (pts.Gear.wow[1].getBoolValue() or pts.Gear.wow[2].getBoolValue()) {
if (pts.Controls.Flight.speedbrake.getValue() < 1.0) {
pts.Controls.Flight.speedbrake.setValue(1.0);
}
@ -396,7 +397,7 @@ var deploySpeedbrake = func {
}
var retractSpeedbrake = func {
if (pts.Gear.Wow[1].getBoolValue() or pts.Gear.Wow[2].getBoolValue()) {
if (pts.Gear.wow[1].getBoolValue() or pts.Gear.wow[2].getBoolValue()) {
if (pts.Controls.Flight.speedbrake.getValue() > 0.0) {
pts.Controls.Flight.speedbrake.setValue(0.0);
}
@ -457,6 +458,23 @@ setlistener("/controls/flight/elevator-trim", func {
}
}, 0, 0);
# For the cockpit rotation and anywhere else you want to use it
var cmdDegCalc = 0;
var slewPitchWheel = func(d) {
cmdDegCalc = math.round(pts.Fdm.JSBsim.Hydraulics.ElevatorTrim.cmdDeg.getValue(), 0.1);
if (d > 0) { # DN
if (cmdDegCalc < 4) {
cmdDegCalc = (cmdDegCalc + 0.1) / 13.5; # Add and normalize, NOT 4! 13.5 = 1 on either polarity
pts.Controls.Flight.elevatorTrim.setValue(cmdDegCalc);
}
} else { # UP
if (cmdDegCalc > -13.5) {
cmdDegCalc = (cmdDegCalc - 0.1) / 13.5; # Subtract and normalize
pts.Controls.Flight.elevatorTrim.setValue(cmdDegCalc);
}
}
}
##########
# Lights #
##########

View file

@ -25,6 +25,12 @@ var Controls = {
cutoffSw: [props.globals.getNode("/controls/engines/engine[0]/cutoff-switch"), props.globals.getNode("/controls/engines/engine[1]/cutoff-switch")],
firePb: [props.globals.getNode("/controls/engines/engine[0]/fire-btn"), props.globals.getNode("/controls/engines/engine[1]/fire-btn")],
throttle: [props.globals.getNode("/controls/engines/engine[0]/throttle"), props.globals.getNode("/controls/engines/engine[1]/throttle")],
throttleFdm: [props.globals.getNode("/controls/engines/engine[0]/throttle-fdm"), props.globals.getNode("/controls/engines/engine[1]/throttle-fdm")],
throttleLever: [props.globals.getNode("/controls/engines/engine[0]/throttle-lever"), props.globals.getNode("/controls/engines/engine[1]/throttle-lever")],
throttleOutput: [props.globals.getNode("/controls/engines/engine[0]/throttle-output"), props.globals.getNode("/controls/engines/engine[1]/throttle-output")],
throttlePos: [props.globals.getNode("/controls/engines/engine[0]/throttle-pos"), props.globals.getNode("/controls/engines/engine[1]/throttle-pos")],
throttleRev: [props.globals.getNode("/controls/engines/engine[0]/throttle-rev"), props.globals.getNode("/controls/engines/engine[1]/throttle-rev")],
reverser: [props.globals.getNode("/controls/engines/engine[0]/reverser"), props.globals.getNode("/controls/engines/engine[1]/reverser")],
},
},
Flight: {
@ -34,6 +40,7 @@ var Controls = {
elevatorTrim: props.globals.getNode("/controls/flight/elevator-trim"),
flaps: props.globals.getNode("/controls/flight/flaps"),
flapsTemp: 0,
flapsInput: props.globals.getNode("/controls/flight/flaps-input"),
flapsPos: props.globals.getNode("/controls/flight/flaps-pos"),
speedbrake: props.globals.getNode("/controls/flight/speedbrake"),
speedbrakeArm: props.globals.getNode("/controls/flight/speedbrake-arm"),
@ -43,6 +50,10 @@ var Controls = {
brake: [props.globals.getNode("/controls/gear/brake-left"),props.globals.getNode("/controls/gear/brake-right")],
gearDown: props.globals.getNode("/controls/gear/gear-down"),
parkingBrake: props.globals.getNode("/controls/gear/brake-parking"),
chocks: props.globals.getNode("/services/chocks/enable"),
},
Switches: {
annunTest: props.globals.getNode("/controls/switches/annun-test"),
},
};
@ -52,33 +63,60 @@ var ECAM = {
var Engines = {
Engine: {
egtActual: [props.globals.getNode("/engines/engine[0]/egt-actual"), props.globals.getNode("/engines/engine[1]/egt-actual")],
eprActual: [props.globals.getNode("/engines/engine[0]/epr-actual"), props.globals.getNode("/engines/engine[1]/epr-actual")],
fuelFlow: [props.globals.getNode("/engines/engine[0]/fuel-flow_actual"), props.globals.getNode("/engines/engine[1]/fuel-flow_actual")],
n1Actual: [props.globals.getNode("/engines/engine[0]/n1-actual"), props.globals.getNode("/engines/engine[1]/n1-actual")],
n2Actual: [props.globals.getNode("/engines/engine[0]/n2-actual"), props.globals.getNode("/engines/engine[1]/n2-actual")],
oilPsi: [props.globals.getNode("/engines/engine[0]/oil-psi-actual"), props.globals.getNode("/engines/engine[1]/oil-psi-actual")],
thrust: [props.globals.getNode("/engines/engine[0]/thrust-lb"), props.globals.getNode("/engines/engine[1]/thrust-lb")],
reverser: [props.globals.getNode("/engines/engine[0]/reverser-pos-norm"), props.globals.getNode("/engines/engine[1]/reverser-pos-norm")],
state: [props.globals.getNode("/engines/engine[0]/state"), props.globals.getNode("/engines/engine[1]/state")],
},
};
var Environment = {
magVar: props.globals.getNode("/environment/magnetic-variation-deg"),
tempDegC: props.globals.getNode("/environment/temperature-degc"),
windFromHdg: props.globals.getNode("/environment/wind-from-heading-deg"),
windSpeedKt: props.globals.getNode("/environment/wind-speed-kt"),
};
var Fdm = {
JSBsim: {
Aero: {
alpha: props.globals.getNode("/fdm/jsbsim/aero/alpha-deg"),
alphaNorm: props.globals.getNode("/fdm/jsbsim/aero/alpha-deg-norm"),
},
Fcs: {
brake: [props.globals.getNode("/fdm/jsbsim/fcs/left-brake-cmd-norm"),props.globals.getNode("/fdm/jsbsim/fcs/right-brake-cmd-norm")],
flapDeg: props.globals.getNode("/fdm/jsbsim/fcs/flap-pos-deg"),
slatDeg: props.globals.getNode("/fdm/jsbsim/fcs/slat-pos-deg"),
slatLocked: props.globals.getNode("/fdm/jsbsim/fcs/slat-locked"),
},
Fbw: {
aileron: props.globals.getNode("/fdm/jsbsim/fbw/aileron-sidestick"),
elevator: props.globals.getNode("/fdm/jsbsim/fbw/elevator-sidestick"),
},
Hydraulics: {
ElevatorTrim: {
cmdDeg: props.globals.getNode("/fdm/jsbsim/hydraulics/elevator-trim/cmd-deg"),
},
Rudder: {
trimDeg: props.globals.getNode("/fdm/jsbsim/hydraulics/rudder/trim-deg"),
},
},
Inertia: {
weightLbs: props.globals.getNode("/fdm/jsbsim/inertia/weight-lbs"),
},
Position: {
wow: props.globals.getNode("/fdm/jsbsim/position/wow"),
},
Propulsion: {
tatC: props.globals.getNode("/fdm/jsbsim/propulsion/tat-c"),
Engine: {
fuelUsed: [props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/fuel-used-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/engine[1]/fuel-used-lbs")],
reverserAngle: [props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad"), props.globals.getNode("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad")],
},
},
},
@ -92,9 +130,9 @@ var FMGC = {
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")],
position: [props.globals.getNode("/gear/gear[0]/position-norm"), props.globals.getNode("/gear/gear[1]/position-norm"), props.globals.getNode("/gear/gear[2]/position-norm")],
rollspeed: [props.globals.getNode("/gear/gear[0]/rollspeed-ms"), props.globals.getNode("/gear/gear[1]/rollspeed-ms"), props.globals.getNode("/gear/gear[2]/rollspeed-ms")],
wow: [props.globals.getNode("/gear/gear[0]/wow"), props.globals.getNode("/gear/gear[1]/wow"), props.globals.getNode("/gear/gear[2]/wow")],
};
var Instrumentation = {
@ -108,6 +146,10 @@ var Instrumentation = {
settingInhg: props.globals.getNode("/instrumentation/altimeter[0]/setting-inhg"),
std: props.globals.getNode("/instrumentation/altimeter[0]/std"),
},
Clock: {
indicatedString: props.globals.getNode("/instrumentation/clock/indicated-string"),
indicatedStringShort: props.globals.getNode("/instrumentation/clock/indicated-short-string"),
},
Efis: {
Inputs: {
arpt: [props.globals.initNode("/instrumentation/efis[0]/inputs/arpt", 0, "BOOL"), props.globals.initNode("/instrumentation/efis[1]/inputs/arpt", 0, "BOOL")],
@ -126,6 +168,17 @@ var Instrumentation = {
pnlModeNum: [props.globals.initNode("/instrumentation/efis[0]/mfd/pnl_mode-num", 2, "INT"), props.globals.initNode("/instrumentation/efis[1]/mfd/pnl_mode-num", 2, "INT")],
},
},
MKVII: {
Inputs: {
Discretes: {
flap3Override: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap3-override"),
},
},
},
Nav: {
gsDeflection: props.globals.getNode("/instrumentation/nav[0]/gs-needle-deflection-norm"),
locDeflection: props.globals.getNode("/instrumentation/nav[0]/heading-needle-deflection-norm"),
},
TCAS: {
Inputs: {
mode: props.globals.getNode("/instrumentation/tcas/inputs/mode"),
@ -160,17 +213,33 @@ var Sim = {
online: props.globals.getNode("/sim/multiplay/online"),
},
pause: props.globals.getNode("/sim/freeze/master"),
replayState: props.globals.getNode("/sim/freeze/replay-state"),
Replay: {
replayActive: props.globals.getNode("/sim/replay/replay-state"),
},
Time: {
deltaRealtimeSec: props.globals.getNode("/sim/time/delta-realtime-sec"),
elapsedSec: props.globals.getNode("/sim/time/elapsed-sec"),
UTC: {
day: props.globals.getNode("/sim/time/utc/day"),
month: props.globals.getNode("/sim/time/utc/month"),
year: props.globals.getNode("/sim/time/utc/year"),
},
},
Version: props.globals.getNode("/sim/version/flightgear"),
};
var Systems = {
Thrust: {
engOut: props.globals.getNode("/systems/thrust/eng-out"),
state: [props.globals.getNode("/systems/thrust/state1"), props.globals.getNode("/systems/thrust/state2")],
},
};
var Velocities = {
airspeed: props.globals.getNode("/velocities/airspeed-kt"),
groundspeed: props.globals.getNode("/velocities/groundspeed-kt"),
mach: props.globals.getNode("/velocities/mach"),
};
setprop("/systems/acconfig/property-tree-setup-loaded", 1);

View file

@ -11,16 +11,16 @@ var incStep = 1;
var viewName = "XX";
var fovZoom = func(d) {
viewName = getprop("sim/current-view/name");
canChangeZOffset = getprop("sim/current-view/type") == "lookat" and viewName != "Tower View" and viewName != "Tower View AGL" and viewName != "Fly-By View" and viewName != "Chase View" and viewName != "Chase View Without Yaw" and viewName != "Walk View" and viewName != "Walker Orbit View";
viewName = getprop("/sim/current-view/name");
canChangeZOffset = getprop("/sim/current-view/type") == "lookat" and viewName != "Tower View" and viewName != "Tower View AGL" and viewName != "Fly-By View" and viewName != "Chase View" and viewName != "Chase View Without Yaw" and viewName != "Walk View" and viewName != "Walker Orbit View";
if (getprop("sim/current-view/z-offset-m") <= -20) {
if (getprop("/sim/current-view/z-offset-m") <= -20) {
decStep = -2;
} else {
decStep = -1;
}
if (getprop("sim/current-view/z-offset-m") < -20) { # Not a typo, the conditions are different
if (getprop("/sim/current-view/z-offset-m") < -20) { # Not a typo, the conditions are different
incStep = 2;
} else {
incStep = 1;
@ -28,11 +28,11 @@ var fovZoom = func(d) {
if (d == -1) {
if (canChangeZOffset) {
distance = getprop("sim/current-view/z-offset-m");
min_dist = getprop("sim/current-view/z-offset-min-m");
distance = getprop("/sim/current-view/z-offset-m");
min_dist = getprop("/sim/current-view/z-offset-min-m");
distance = math.round(std.min(-min_dist, distance + incStep) / incStep, 0.1) * incStep;
setprop("sim/current-view/z-offset-m", distance);
setprop("/sim/current-view/z-offset-m", distance);
gui.popupTip(sprintf("%d meters", abs(distance)));
} else {
@ -40,11 +40,11 @@ var fovZoom = func(d) {
}
} else if (d == 1) {
if (canChangeZOffset) {
distance = getprop("sim/current-view/z-offset-m");
max_dist = getprop("sim/current-view/z-offset-max-m");
distance = getprop("/sim/current-view/z-offset-m");
max_dist = getprop("/sim/current-view/z-offset-max-m");
distance = math.round(std.max(-max_dist, distance + decStep) / decStep, 0.1) * decStep;
setprop("sim/current-view/z-offset-m", distance);
setprop("/sim/current-view/z-offset-m", distance);
gui.popupTip(sprintf("%d meters", abs(distance)));
} else {
@ -52,11 +52,11 @@ var fovZoom = func(d) {
}
} else if (d == 0) {
if (canChangeZOffset) {
setprop("sim/current-view/z-offset-m", getprop("sim/current-view/z-offset-default") * -1);
gui.popupTip(sprintf("%d meters", getprop("sim/current-view/z-offset-default")));
setprop("/sim/current-view/z-offset-m", getprop("/sim/current-view/z-offset-default") * -1);
gui.popupTip(sprintf("%d meters", getprop("/sim/current-view/z-offset-default")));
} else {
setprop("sim/current-view/field-of-view", getprop("sim/view/config/default-field-of-view-deg"));
gui.popupTip(sprintf("FOV: %.1f", getprop("sim/current-view/field-of-view")))
setprop("/sim/current-view/field-of-view", getprop("/sim/view/config/default-field-of-view-deg"));
gui.popupTip(sprintf("FOV: %.1f", getprop("/sim/current-view/field-of-view")))
}
}
}

View file

@ -2,6 +2,8 @@ var isNoStar = [0, 0, 0];
var isNoTransArr = [0, 0, 0];
var isNoVia = [0, 0, 0];
var version = nil;
var arrivalPage = {
title: [nil, nil, nil],
subtitle: [nil, nil],
@ -74,7 +76,8 @@ var arrivalPage = {
if (fmgc.flightPlanController.flightplans[2].approach != nil) {
me.selectedApproach = fmgc.flightPlanController.flightplans[2].approach;
if (getprop("/sim/version/flightgear") == "2020.2.0" or getprop("/sim/version/flightgear") == "2020.2.1" or getprop("/sim/version/flightgear") == "2020.3.0") {
version = pts.Sim.Version.getValue();
if (version == "2020.2.0" or version == "2020.2.1" or version == "2020.3.0") {
if (fmgc.flightPlanController.flightplans[2].approach_trans != nil) {
me.selectedVIA = fmgc.flightPlanController.flightplans[2].approach_trans;
} elsif (isNoVia[2] == 1) {
@ -98,7 +101,8 @@ var arrivalPage = {
} else {
if (fmgc.flightPlanController.flightplans[me.computer].approach != nil) {
me.selectedApproach = fmgc.flightPlanController.flightplans[me.computer].approach;
if (getprop("/sim/version/flightgear") == "2020.2.0" or getprop("/sim/version/flightgear") == "2020.2.1" or getprop("/sim/version/flightgear") == "2020.3.0") {
version = pts.Sim.Version.getValue();
if (version == "2020.2.0" or version == "2020.2.1" or version == "2020.3.0") {
if (fmgc.flightPlanController.flightplans[me.computer].approach_trans != nil) {
me.selectedVIA = fmgc.flightPlanController.flightplans[me.computer].approach_trans;
} elsif (isNoVia[me.computer] == 1) {
@ -107,7 +111,8 @@ var arrivalPage = {
}
} elsif (fmgc.flightPlanController.flightplans[2].approach != nil) {
me.selectedApproach = fmgc.flightPlanController.flightplans[2].approach;
if (getprop("/sim/version/flightgear") == "2020.2.0" or getprop("/sim/version/flightgear") == "2020.2.1" or getprop("/sim/version/flightgear") == "2020.3.0") {
version = pts.Sim.Version.getValue();
if (version == "2020.2.0" or version == "2020.2.1" or version == "2020.3.0") {
if (fmgc.flightPlanController.flightplans[2].approach_trans != nil) {
me.selectedVIA = fmgc.flightPlanController.flightplans[2].approach_trans;
}
@ -232,7 +237,8 @@ var arrivalPage = {
},
updateActiveVIAs: func() {
if (getprop("/sim/version/flightgear") != "2020.2.0" and getprop("/sim/version/flightgear") != "2020.2.1" and getprop("/sim/version/flightgear") != "2020.3.0") { return; }
version = pts.Sim.Version.getValue();
if (version != "2020.2.0" and version != "2020.2.1" and version != "2020.3.0") { return; }
if (me.selectedVIA == "NO VIA") {
if (!fmgc.flightPlanController.temporaryFlag[me.computer]) {
@ -503,7 +509,8 @@ var arrivalPage = {
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
},
updateVIAs: func() {
if (getprop("/sim/version/flightgear") != "2020.2.0" and getprop("/sim/version/flightgear") != "2020.2.1" and getprop("/sim/version/flightgear") != "2020.3.0") { return; }
version = pts.Sim.Version.getValue();
if (version != "2020.2.0" and version != "2020.2.1" and version != "2020.3.0") { return; }
if (me.selectedApproach == nil or me.activePage != 2) {
me.clearVias();
return;
@ -746,7 +753,8 @@ var arrivalPage = {
},
arrPushbuttonLeft: func(index) {
if (index == 2 and me.activePage == 1 and me.selectedApproach != nil) {
if (getprop("/sim/version/flightgear") != "2020.2.0" and getprop("/sim/version/flightgear") != "2020.2.1" and getprop("/sim/version/flightgear") != "2020.3.0") { return; }
version = pts.Sim.Version.getValue();
if (version != "2020.2.0" and version != "2020.2.1" and version != "2020.3.0") { return; }
me.oldPage = me.activePage;
me.activePage = 2;
me.updatePage();
@ -778,7 +786,7 @@ var arrivalPage = {
}
setprop("FMGC/internal/baro", 99999);
setprop("FMGC/internal/radio", 99999);
setprop("FMGC/internal/radio-no", 0);
fmgc.FMGCInternal.radioNo = 0;
me.updateApproaches();
me.updatePage();
fmgc.flightPlanController.flightPlanChanged(me.computer);

111
Nasal/MCDU/ATIS.nas Normal file
View file

@ -0,0 +1,111 @@
var atisPage = {
title: nil,
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
L1: [nil, nil, "ack"], # content, title, colour
L2: [nil, nil, "ack"],
L3: [nil, nil, "ack"],
L4: [nil, nil, "ack"],
L5: [nil, nil, "ack"],
L6: [nil, nil, "ack"],
C1: [nil, nil, "ack"],
C2: [nil, nil, "ack"],
C3: [nil, nil, "ack"],
C4: [nil, nil, "ack"],
C5: [nil, nil, "ack"],
C6: [nil, nil, "ack"],
R1: [nil, nil, "ack"],
R2: [nil, nil, "ack"],
R3: [nil, nil, "ack"],
R4: [nil, nil, "ack"],
R5: [nil, nil, "ack"],
R6: [nil, nil, "ack"],
computer: nil,
size: 0,
new: func(computer, index) {
var ap = {parents:[atisPage]};
ap.computer = computer;
ap.page = 1;
ap.index = index;
ap.message = atsu.ATISInstances[index].lastATIS;
ap._setupPageWithData();
ap._numPages = 1;
ap.update();
return ap;
},
del: func() {
return nil;
},
getNumPages: func() {
me._numPages = math.ceil(size(me.message) / 210);
return me._numPages;
},
scrollUp: func() {
me.page -= 1;
if (me.page < 1) {
me.page = me.getNumPages();
}
me.update();
},
scrollDown: func() {
me.page += 1;
if (me.page > me.getNumPages()) {
me.page = 1;
}
me.update();
},
_clearPage: func() {
me.L2 = [nil, nil, "wht"];
me.L3 = [nil, nil, "wht"];
me.L4 = [nil, nil, "wht"];
me.C1 = [nil, nil, "ack"];
me.C2 = [nil, nil, "ack"];
me.C3 = [nil, nil, "ack"];
me.C4 = [nil, nil, "ack"];
me.C5 = [nil, nil, "ack"];
me.R2 = [nil, nil, "ack"];
me.R3 = [nil, nil, "ack"];
me.R4 = [nil, nil, "ack"];
me.R5 = [nil, nil, "ack"];
me.arrowsMatrix = [[0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0]];
},
_setupPageWithData: func() {
me.title = atsu.ATISInstances[me.index].station ~ "/" ~ (atsu.ATISInstances[me.index].type == 0 ? "ARR" : "DEP") ~ " ATIS ";
me.L5 = [" PREV ATIS", nil, "wht"];
me.L6 = [" RETURN", " ATIS MENU", "wht"];
me.R6 = ["PRINT ", nil, "blu"];
me.arrowsMatrix = [[0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 1]];
me.arrowsColour = [["ack", "ack", "ack", "ack", "wht", "wht"], ["ack", "ack", "ack", "ack", "ack", "blu"]];
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
},
update: func() {
me._clearPage();
var message = atsu.ATISInstances[me.index].lastATIS;
var pageMinusOne = (me.page - 1);
var numberExtraChar = pageMinusOne * 210;
me.L1 = [substr(message, numberExtraChar, 30), atsu.ATISInstances[me.index].station ~ "/" ~ (atsu.ATISInstances[me.index].type == 0 ? "ARR" : "DEP"), "wht"];
me.R1 = [" ",atsu.DictionaryString.fetchString1(atsu.ATISInstances[me.index].receivedCode).string2 ~ " " ~ atsu.ATISInstances[me.index].receivedTime ~ "Z", "wht"];
if (size(message) > 30) {
me.L2[1] = substr(message, numberExtraChar + 30, 30);
}
if (size(message) > 60) {
me.L2[0] = substr(message, numberExtraChar + 60, 30);
}
if (size(message) > 90) {
me.L3[1] = substr(message, numberExtraChar + 90, 30);
}
if (size(message) > 120) {
me.L3[0] = substr(message, numberExtraChar + 120, 30);
}
if (size(message) > 150) {
me.L4[1] = substr(message, numberExtraChar + 150, 30);
}
if (size(message) > 180) {
me.L4[0] = substr(message, numberExtraChar + 180, 30);
}
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
},
};

View file

@ -436,9 +436,11 @@ var fplnPage = { # this one is only created once, and then updated - remember th
if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
} else {
if (canvas_mcdu.myLatRev[me.computer] != nil) {
@ -477,9 +479,11 @@ var fplnPage = { # this one is only created once, and then updated - remember th
if (dirToFlag) { dirToFlag = 0; }
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
} else {
mcdu_message(me.computer, "NOT ALLOWED");

View file

@ -5,16 +5,20 @@
# From INIT-B
var fuelPredInput = func(key, i) {
var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad;
if (key == "L3" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
if (key == "L3" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.rteRsv = 0.05 * fmgc.FMGCInternal.tripFuel;
fmgc.FMGCInternal.rteRsvSet = 0;
fmgc.FMGCInternal.rtePercent = 5.0;
fmgc.FMGCInternal.rtePercentSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (fmgc.FMGCInternal.tripFuel != 0) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 2 and tfs <= 5 and find("/", scratchpad) == 0) {
var perc = num(split("/", scratchpad)[1]);
@ -23,7 +27,8 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.rteRsvSet = 0;
fmgc.FMGCInternal.rtePercent = perc;
fmgc.FMGCInternal.rtePercentSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
}
} else if (tfs >= 1 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 21.7) {
@ -35,7 +40,8 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.rtePercent = 15.0; # need reasearch on this value
}
fmgc.FMGCInternal.rtePercentSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -43,21 +49,26 @@ var fuelPredInput = func(key, i) {
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "L4" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating") and fmgc.FMGCInternal.altAirportSet) {
} else if (key == "L4" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and fmgc.FMGCInternal.altAirportSet) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.altFuel = 0.0;
fmgc.FMGCInternal.altTime = "0000";
fmgc.FMGCInternal.altFuelSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 10.0) {
fmgc.FMGCInternal.altFuel = tf;
fmgc.FMGCInternal.altTime = "0000";
fmgc.FMGCInternal.altFuelSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -65,50 +76,64 @@ var fuelPredInput = func(key, i) {
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "L5" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "L5" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.finalFuel = 0.0;
fmgc.FMGCInternal.finalTime = "0030";
fmgc.FMGCInternal.finalFuelSet = 0;
fmgc.FMGCInternal.finalTimeSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 10.0) {
fmgc.FMGCInternal.finalFuel = tf;
fmgc.FMGCInternal.finalFuelSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs == 4 and tf != nil and ((tf >= 0 and tf <= 59) or (tf >= 100 and tf <= 130))) {
fmgc.FMGCInternal.finalTime = scratchpad;
fmgc.FMGCInternal.finalTimeSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
}
}
} else if (key == "L6" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "L6" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.minDestFob = 0;
fmgc.FMGCInternal.minDestFobSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 5 and tf != nil and tf >= 0 and tf <= 80.0) {
fmgc.FMGCInternal.minDestFob = tf;
fmgc.FMGCInternal.minDestFobSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
if (fmgc.FMGCInternal.minDestFob < fmgc.FMGCInternal.finalFuel + fmgc.FMGCInternal.altFuel) {
mcdu_message(i, "CHECK MIN DEST FOB");
@ -119,29 +144,35 @@ var fuelPredInput = func(key, i) {
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "R3" and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "R3" and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
mcdu_message(i, "NOT ALLOWED");
} else {
var zfw_min = 80.6; #make based on performance
var zfw_max = 134.5; #61,000 kg, make based on performance
if (size(scratchpad) == 0) {
var zfw = getprop("/fdm/jsbsim/inertia/weight-lbs") - getprop("/consumables/fuel/total-fuel-lbs");
var zfw = pts.Fdm.JSBsim.Inertia.weightLbs.getValue() - pts.Consumables.Fuel.totalFuelLbs.getValue();
fmgc.FMGCInternal.zfw = sprintf("%3.1f", math.round(zfw / 1000, 0.1));
fmgc.FMGCInternal.zfwSet = 1;
if (fmgc.FMGCInternal.blockSet != 1) {
fmgc.FMGCInternal.block = getprop("consumables/fuel/total-fuel-lbs") / 1000;
fmgc.FMGCInternal.block = pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000;
fmgc.FMGCInternal.blockSet = 1;
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
} else if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else if (find("/", scratchpad) != -1) {
if (acconfig_weight_kgs.getValue() == 1) {
scratchpad = scratchpad / LBS2KGS;
}
var zfwi = split("/", scratchpad);
var zfw = num(zfwi[0]);
var zfwcg = num(zfwi[1]);
@ -154,15 +185,18 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.zfwcg = zfwcg;
fmgc.FMGCInternal.zfwcgSet = 1;
if (fmgc.FMGCInternal.blockSet != 1) {
fmgc.FMGCInternal.block = getprop("consumables/fuel/total-fuel-lbs") / 1000;
fmgc.FMGCInternal.block = pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000;
fmgc.FMGCInternal.blockSet = 1;
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
} else if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -180,19 +214,25 @@ var fuelPredInput = func(key, i) {
mcdu_message(i, "NOT ALLOWED");
}
} else if (num(scratchpad) != nil and size(scratchpad) > 0 and size(scratchpad) <= 5 and (find(".", scratchpad) == -1 or size(split(".", scratchpad)[1]) <= 1)) {
if (acconfig_weight_kgs.getValue() == 1) {
scratchpad = scratchpad / LBS2KGS;
}
if (scratchpad >= zfw_min and scratchpad <= zfw_max) {
fmgc.FMGCInternal.zfw = scratchpad;
fmgc.FMGCInternal.zfwSet = 1;
if (fmgc.FMGCInternal.blockSet != 1) {
fmgc.FMGCInternal.block = getprop("consumables/fuel/total-fuel-lbs") / 1000;
fmgc.FMGCInternal.block = pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000;
fmgc.FMGCInternal.blockSet = 1;
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
} else if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {

View file

@ -10,9 +10,11 @@ var initInputA = func(key, i) {
fmgc.FMGCInternal.altAirport = "";
fmgc.FMGCInternal.altAirportSet = 0;
fmgc.windController.updatePlans();
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
fmgc.updateARPT();
@ -25,10 +27,13 @@ var initInputA = func(key, i) {
if (tfs == 4) {
fmgc.FMGCInternal.altAirport = scratchpad;
fmgc.FMGCInternal.altAirportSet = 1;
atsu.ATISInstances[2].newStation(scratchpad);
fmgc.windController.updatePlans();
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
fmgc.updateARPT();
@ -90,9 +95,11 @@ var initInputA = func(key, i) {
updateCrzLvlCallback();
fmgc.FMGCInternal.crzTemp = 15;
fmgc.FMGCInternal.crzTempSet = 0;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else if (find("/", scratchpad) != -1) {
@ -110,9 +117,11 @@ var initInputA = func(key, i) {
if (temp >= -99 and temp <= 99) {
fmgc.FMGCInternal.crzTemp = temp;
fmgc.FMGCInternal.crzTempSet = 1;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -129,9 +138,11 @@ var initInputA = func(key, i) {
fmgc.FMGCInternal.crzTemp = temp;
fmgc.FMGCInternal.crzTempSet = 1;
fmgc.FMGCInternal.crzProg = crz;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -157,9 +168,11 @@ var initInputA = func(key, i) {
fmgc.FMGCInternal.crzSet = 1;
updateCrzLvlCallback();
fmgc.FMGCInternal.crzProg = crz;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -180,9 +193,11 @@ var initInputA = func(key, i) {
setprop("/FMGC/internal/align-ref-long", 0);
setprop("/FMGC/internal/align-ref-lat-edit", 0);
setprop("/FMGC/internal/align-ref-long-edit", 0);
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
fmgc.flightPlanController.reset(2);
fmgc.flightPlanController.init();
@ -205,6 +220,8 @@ var initInputA = func(key, i) {
}
fmgc.FMGCInternal.depApt = fromto[0];
fmgc.FMGCInternal.arrApt = fromto[1];
atsu.ATISInstances[0].newStation(fromto[0]);
atsu.ATISInstances[1].newStation(fromto[1]);
fmgc.FMGCInternal.toFromSet = 1;
fmgc.FMGCNodes.toFromSet.setValue(1);
#scratchpad
@ -224,7 +241,7 @@ var initInputA = func(key, i) {
}
}
} else if (key == "R2") {
if (getprop("engines/engine[0]/state") != 3 and getprop("engines/engine[1]/state") != 3) {
if (pts.Engines.Engine.state[0].getValue() != 3 and pts.Engines.Engine.state[1].getValue() != 3) {
if (!ecam.vhf3_voice.active) {
if (atsu.ATSU.working) {
if (getprop("/FMGC/simbrief-username") == "") {

View file

@ -2,28 +2,39 @@
# Copyright (c) 2020 Matthew Maring (mattmaring)
var acconfig_weight_kgs = props.globals.getNode("/systems/acconfig/options/weight-kgs", 1);
# Conversion factor pounds to kilogram
var LBS2KGS = 0.4535924;
var initInputB = func(key, i) {
var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad;
if (key == "L1" and !getprop("/FMGC/internal/fuel-calculating")) {
if (key == "L1" and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.taxiFuel = 0.4;
fmgc.FMGCInternal.taxiFuelSet = 0;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
} else if (getprop("/FMGC/internal/fuel-request-set")) {
setprop("/FMGC/internal/block-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else if (fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
var tfs = size(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
scratchpad = scratchpad / LBS2KGS;
}
if (tfs >= 1 and tfs <= 4) {
if (num(scratchpad) != nil and scratchpad >= 0.0 and scratchpad <= 9.9) {
fmgc.FMGCInternal.taxiFuel = scratchpad;
fmgc.FMGCInternal.taxiFuelSet = 1;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
} else if (getprop("/FMGC/internal/fuel-request-set")) {
setprop("/FMGC/internal/block-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else if (fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -33,16 +44,20 @@ var initInputB = func(key, i) {
mcdu_message(i, "NOT ALLOWED");
}
}
} else if (key == "L3" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "L3" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.rteRsv = 0.05 * fmgc.FMGCInternal.tripFuel;
fmgc.FMGCInternal.rteRsvSet = 0;
fmgc.FMGCInternal.rtePercent = 5.0;
fmgc.FMGCInternal.rtePercentSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (fmgc.FMGCInternal.tripFuel != 0) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 2 and tfs <= 5 and find("/", scratchpad) == 0) {
var perc = num(split("/", scratchpad)[1]);
@ -51,7 +66,8 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.rteRsvSet = 0;
fmgc.FMGCInternal.rtePercent = perc;
fmgc.FMGCInternal.rtePercentSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
}
} else if (tfs >= 1 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 21.7) {
@ -63,7 +79,8 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.rtePercent = 15.0; # need reasearch on this value
}
fmgc.FMGCInternal.rtePercentSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -71,21 +88,26 @@ var initInputB = func(key, i) {
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "L4" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating") and fmgc.FMGCInternal.altAirportSet) {
} else if (key == "L4" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and fmgc.FMGCInternal.altAirportSet) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.altFuel = 0.0;
fmgc.FMGCInternal.altTime = "0000";
fmgc.FMGCInternal.altFuelSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 10.0) {
fmgc.FMGCInternal.altFuel = tf;
fmgc.FMGCInternal.altTime = "0000";
fmgc.FMGCInternal.altFuelSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -93,21 +115,26 @@ var initInputB = func(key, i) {
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "L5" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "L5" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.finalFuel = 0.0;
fmgc.FMGCInternal.finalTime = "0030";
fmgc.FMGCInternal.finalFuelSet = 0;
fmgc.FMGCInternal.finalTimeSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 10.0) {
fmgc.FMGCInternal.finalFuel = tf;
fmgc.FMGCInternal.finalFuelSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -118,25 +145,31 @@ var initInputB = func(key, i) {
if (tfs == 4 and tf != nil and ((tf >= 0 and tf <= 59) or (tf >= 100 and tf <= 130))) {
fmgc.FMGCInternal.finalTime = scratchpad;
fmgc.FMGCInternal.finalTimeSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
}
}
} else if (key == "L6" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "L6" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.minDestFob = 0;
fmgc.FMGCInternal.minDestFobSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 5 and tf != nil and tf >= 0 and tf <= 80.0) {
fmgc.FMGCInternal.minDestFob = tf;
fmgc.FMGCInternal.minDestFobSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
if (fmgc.FMGCInternal.minDestFob < fmgc.FMGCInternal.finalFuel + fmgc.FMGCInternal.altFuel) {
mcdu_message(i, "CHECK MIN DEST FOB");
@ -147,29 +180,37 @@ var initInputB = func(key, i) {
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "R1" and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "R1" and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
mcdu_message(i, "NOT ALLOWED");
} else {
var zfw_min = 80.6; #make based on performance
var zfw_max = 134.5; #61,000 kg, make based on performance
if (size(scratchpad) == 0) {
var zfw = getprop("/fdm/jsbsim/inertia/weight-lbs") - getprop("/consumables/fuel/total-fuel-lbs");
var zfw = pts.Fdm.JSBsim.Inertia.weightLbs.getValue() - pts.Consumables.Fuel.totalFuelLbs.getValue();
fmgc.FMGCInternal.zfw = sprintf("%3.1f", math.round(zfw / 1000, 0.1));
fmgc.FMGCInternal.zfwSet = 1;
if (!getprop("/FMGC/internal/block-confirmed") and fmgc.FMGCInternal.blockSet) {
if (!fmgc.FMGCInternal.blockConfirmed and fmgc.FMGCInternal.blockSet) {
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
} else if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
} else if (getprop("/FMGC/internal/fuel-request-set")) {
setprop("/FMGC/internal/block-calculating", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else if (fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else if (find("/", scratchpad) != -1) {
if (acconfig_weight_kgs.getValue() == 1) {
scratchpad = scratchpad / LBS2KGS;
}
var zfwi = split("/", scratchpad);
var zfw = num(zfwi[0]);
var zfwcg = num(zfwi[1]);
@ -181,16 +222,20 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.zfwSet = 1;
fmgc.FMGCInternal.zfwcg = zfwcg;
fmgc.FMGCInternal.zfwcgSet = 1;
if (!getprop("/FMGC/internal/block-confirmed") and fmgc.FMGCInternal.blockSet) {
if (!fmgc.FMGCInternal.blockConfirmed and fmgc.FMGCInternal.blockSet) {
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
} else if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
} else if (getprop("/FMGC/internal/fuel-request-set")) {
setprop("/FMGC/internal/block-calculating", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else if (fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -208,19 +253,26 @@ var initInputB = func(key, i) {
mcdu_message(i, "NOT ALLOWED");
}
} else if (num(scratchpad) != nil and size(scratchpad) > 0 and size(scratchpad) <= 5 and (find(".", scratchpad) == -1 or size(split(".", scratchpad)[1]) <= 1)) {
if (acconfig_weight_kgs.getValue() == 1) {
scratchpad = scratchpad / LBS2KGS;
}
if (scratchpad >= zfw_min and scratchpad <= zfw_max) {
fmgc.FMGCInternal.zfw = scratchpad;
fmgc.FMGCInternal.zfwSet = 1;
if (!getprop("/FMGC/internal/block-confirmed") and fmgc.FMGCInternal.blockSet) {
if (!fmgc.FMGCInternal.blockConfirmed and fmgc.FMGCInternal.blockSet) {
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
} else if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
} else if (getprop("/FMGC/internal/fuel-request-set")) {
setprop("/FMGC/internal/block-calculating", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else if (fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -237,7 +289,7 @@ var initInputB = func(key, i) {
fmgc.FMGCNodes.costIndex.setValue(fmgc.FMGCInternal.costIndex);
}
}
} else if (key == "R2" and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "R2" and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.block = 0.0;
fmgc.FMGCInternal.blockSet = 0;
@ -265,34 +317,44 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.fffqSensor = "FF+FQ";
fmgc.FMGCInternal.extraFuel = 0;
fmgc.FMGCInternal.extraTime = "0000";
setprop("/FMGC/internal/fuel-request-set", 0);
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 0);
fmgc.FMGCInternal.fuelRequest = 0;
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 0;
mcdu_scratchpad.scratchpads[i].empty();
} else {
var tfs = size(scratchpad);
var maxblock = getprop("/options/maxblock");
if (tfs == 0) {
fmgc.FMGCInternal.block = sprintf("%3.1f", math.round(getprop("/consumables/fuel/total-fuel-lbs") / 1000, 0.1));
fmgc.FMGCInternal.block = sprintf("%3.1f", math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1));
fmgc.FMGCInternal.blockSet = 1;
if (fmgc.FMGCInternal.zfwSet) {
fmgc.FMGCInternal.tow = num(fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel);
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
}
} else if (tfs >= 1 and tfs <= 5) {
if (acconfig_weight_kgs.getValue() == 1) {
scratchpad = scratchpad / LBS2KGS;
}
if (num(scratchpad) != nil and scratchpad >= 1.0 and scratchpad <= maxblock) {
fmgc.FMGCInternal.block = scratchpad;
fmgc.FMGCInternal.blockSet = 1;
if (fmgc.FMGCInternal.zfwSet) {
fmgc.FMGCInternal.tow = num(fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel);
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -303,21 +365,24 @@ var initInputB = func(key, i) {
}
}
} else if (key == "R3") {
if (scratchpad == "" and fmgc.FMGCInternal.zfwSet and !getprop("/FMGC/internal/fuel-request-set")) {
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/block-calculating", 1);
} else if (scratchpad == "" and fmgc.FMGCInternal.zfwSet and getprop("/FMGC/internal/fuel-request-set") and !getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/block-calculating")) {
setprop("/FMGC/internal/block-confirmed", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
if (scratchpad == "" and fmgc.FMGCInternal.zfwSet and !fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
} else if (scratchpad == "" and fmgc.FMGCInternal.zfwSet and fmgc.FMGCInternal.fuelRequest and !fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.blockCalculating) {
fmgc.FMGCInternal.blockConfirmed = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "R5" and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "R5" and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.tripWind = "HD000";
fmgc.FMGCInternal.tripWindValue = 0;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -326,8 +391,9 @@ var initInputB = func(key, i) {
if (int(effwind) != nil and effwind >= 0 and effwind <= 500) {
fmgc.FMGCInternal.tripWind = scratchpad;
fmgc.FMGCInternal.tripWindValue = effwind;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -338,8 +404,9 @@ var initInputB = func(key, i) {
if (int(effwind) != nil and effwind >= 0 and effwind <= 500) {
fmgc.FMGCInternal.tripWind = scratchpad;
fmgc.FMGCInternal.tripWindValue = effwind;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -349,8 +416,9 @@ var initInputB = func(key, i) {
if (num(scratchpad) != nil and scratchpad >= 0 and scratchpad <= 500) {
fmgc.FMGCInternal.tripWind = scratchpad;
fmgc.FMGCInternal.tripWindValue = scratchpad;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {

View file

@ -82,17 +82,17 @@ var initInputIRS = func(key, i) {
} else if (key == "R6") {
setprop("FMGC/internal/align-ref-lat-edit", 0);
setprop("FMGC/internal/align-ref-long-edit", 0);
if (fmgc.FMGCInternal.toFromSet and getprop("systems/navigation/adr/any-adr-on") == 1) {
if (fmgc.FMGCInternal.toFromSet and getprop("/systems/navigation/adr/any-adr-on") == 1) {
if (getprop("FMGC/internal/align-set") == 0) {
setprop("FMGC/internal/align-set", 1);
} else {
setprop("controls/adirs/mcducbtn", 1);
setprop("/controls/adirs/mcducbtn", 1);
setprop("FMGC/internal/align-set", 0);
setprop("MCDU[" ~ i ~ "]/page", "INITA");
}
} else if (!fmgc.FMGCInternal.toFromSet) {
# setprop("MCDU[" ~ i ~ "]/scratchpad", "SELECT REFERENCE");
} else if (getprop("systems/navigation/adr/any-adr-on") == 0) {
} else if (getprop("/systems/navigation/adr/any-adr-on") == 0) {
# setprop("MCDU[" ~ i ~ "]/scratchpad", "IRS NOT ALIGNED");
} else {
mcdu_message(i, "NOT ALLOWED");

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,6 @@
# Copyright (c) 2020 Matthew Maring (mattmaring)
# APPR PERF
var ldg_config_3_set = props.globals.getNode("/FMGC/internal/ldg-config-3-set", 1);
var ldg_config_f_set = props.globals.getNode("/FMGC/internal/ldg-config-f-set", 1);
var perfAPPRInput = func(key, i) {
var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad;
@ -77,10 +75,10 @@ var perfAPPRInput = func(key, i) {
}
} else if (key == "L5") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vapp-speed-set", 0);
fmgc.FMGCInternal.vappSpeedSet = 0;
mcdu_scratchpad.scratchpads[i].empty();
} else if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 350) {
setprop("/FMGC/internal/vapp-speed-set", 1);
fmgc.FMGCInternal.vappSpeedSet = 1;
fmgc.FMGCInternal.vapp_appr = scratchpad;
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -93,7 +91,7 @@ var perfAPPRInput = func(key, i) {
setprop("/FMGC/internal/baro", 99999);
mcdu_scratchpad.scratchpads[i].empty();
} else if (int(scratchpad) != nil and scratchpad >= getprop("/FMGC/internal/ldg-elev") and scratchpad <= 5000 + getprop("/FMGC/internal/ldg-elev")) {
if (getprop("/FMGC/internal/radio-no") == 0) {
if (!fmgc.FMGCInternal.radioNo) {
setprop("/FMGC/internal/radio", 99999);
}
setprop("/FMGC/internal/baro", scratchpad);
@ -104,31 +102,31 @@ var perfAPPRInput = func(key, i) {
} else if (key == "R3") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/radio", 99999);
setprop("/FMGC/internal/radio-no", 0);
fmgc.FMGCInternal.radioNo = 0;
mcdu_scratchpad.scratchpads[i].empty();
} else if (scratchpad == "NO") {
setprop("/FMGC/internal/radio", 99999);
setprop("/FMGC/internal/radio-no", 1);
fmgc.FMGCInternal.radioNo = 1;
mcdu_scratchpad.scratchpads[i].empty();
} else if (int(scratchpad) != nil and scratchpad >= 0 and scratchpad <= 700) {
setprop("/FMGC/internal/baro", 99999);
setprop("/FMGC/internal/radio-no", 0);
fmgc.FMGCInternal.radioNo = 0;
setprop("/FMGC/internal/radio", scratchpad);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "R4") {
if (scratchpad == "" and ldg_config_f_set.getValue() == 1 and ldg_config_3_set.getValue() == 0) {
setprop("/FMGC/internal/ldg-config-3-set", 1);
setprop("/FMGC/internal/ldg-config-f-set", 0);
if (scratchpad == "" and fmgc.FMGCInternal.ldgConfigFull == 1 and fmgc.FMGCInternal.ldgConfig3 == 0) {
fmgc.FMGCInternal.ldgConfig3 = 1;
fmgc.FMGCInternal.ldgConfigFull = 0;
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "R5") {
if (scratchpad == "" and ldg_config_3_set.getValue() == 1 and ldg_config_f_set.getValue() == 0) {
setprop("/FMGC/internal/ldg-config-3-set", 0);
setprop("/FMGC/internal/ldg-config-f-set", 1);
if (scratchpad == "" and fmgc.FMGCInternal.ldgConfig3 == 1 and fmgc.FMGCInternal.ldgConfigFull == 0) {
fmgc.FMGCInternal.ldgConfig3 = 0;
fmgc.FMGCInternal.ldgConfigFull = 1;
} else {
mcdu_message(i, "NOT ALLOWED");
}

View file

@ -6,8 +6,8 @@ var perfGAInput = func(key, i) {
var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad;
if (key == "L5") {
if (scratchpad == "CLR") {
setprop("systems/thrust/clbreduc-ft", "1500");
setprop("/FMGC/internal/accel-agl-ft", "1500");
setprop("/systems/thrust/clbreduc-ft", 1500);
setprop("/FMGC/internal/accel-agl-ft", 1500);
setprop("MCDUC/thracc-set", 0);
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -17,7 +17,7 @@ var perfGAInput = func(key, i) {
var thrred = size(thracc[0]);
var acc = size(thracc[1]);
if (int(thrred) != nil and int(acc) != nil and (thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5)) {
setprop("systems/thrust/clbreduc-ft", thracc[0]);
setprop("/systems/thrust/clbreduc-ft", thracc[0]);
setprop("/FMGC/internal/accel-agl-ft", thracc[1]);
setprop("MCDUC/thracc-set", 1);
mcdu_scratchpad.scratchpads[i].empty();

View file

@ -100,8 +100,8 @@ var perfTOInput = func(key, i) {
}
} else if (key == "L5") {
if (scratchpad == "CLR") {
setprop("systems/thrust/clbreduc-ft", "1500");
setprop("/FMGC/internal/accel-agl-ft", "1500");
setprop("/systems/thrust/clbreduc-ft", 1500);
setprop("/FMGC/internal/accel-agl-ft", 1500);
setprop("MCDUC/thracc-set", 0);
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -113,7 +113,7 @@ var perfTOInput = func(key, i) {
var acc = thracc[1];
var accs = size(acc);
if (int(thrred) != nil and (thrreds >= 3 and thrreds <= 5) and thrred >= 400 and thrred <= 39000 and int(acc) != nil and (accs == 3 or accs == 4 or accs == 5) and acc >= 400 and acc <= 39000) {
setprop("systems/thrust/clbreduc-ft", int(thrred / 10) * 10);
setprop("/systems/thrust/clbreduc-ft", int(thrred / 10) * 10);
setprop("/FMGC/internal/accel-agl-ft", int(acc / 10) * 10);
setprop("MCDUC/thracc-set", 1);
mcdu_scratchpad.scratchpads[i].empty();
@ -124,7 +124,7 @@ var perfTOInput = func(key, i) {
mcdu_message(i, "NOT ALLOWED");
}
} else if (num(scratchpad) != nil and (tfs >= 3 and tfs <= 5) and scratchpad >= 400 and scratchpad <= 39000) {
setprop("systems/thrust/clbreduc-ft", int(scratchpad / 10) * 10);
setprop("/systems/thrust/clbreduc-ft", int(scratchpad / 10) * 10);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");

View file

@ -4,7 +4,7 @@
var radnavInput = func(key, i) {
var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad;
if (!getprop("systems/radio/rmp[0]/nav") and !getprop("systems/radio/rmp[1]/nav")) {
if (!getprop("/systems/radio/rmp[0]/nav") and !getprop("/systems/radio/rmp[1]/nav")) {
if (key == "L1") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vor1freq-set", 0);

View file

@ -73,7 +73,7 @@ var receivedMessagesPage = {
if (me.size >= (me.curPage * 5) + -4) {
message = ReceivedMessagesDatabase.database.vector[-5 + (me.curPage * 5)];
me.L1[0] = " " ~ left(message.body, 23);
me.L1[0] = " " ~ left(message.body, size(message.body) > 23 ? 23 : size(message.body));
me.L1[2] = "blu";
if (!message.viewed) {
me.L1[1] = " " ~ message.time ~ " NEW";
@ -85,7 +85,7 @@ var receivedMessagesPage = {
if (me.size >= (me.curPage * 5) + -3) {
message = ReceivedMessagesDatabase.database.vector[-4 + (me.curPage * 5)];
me.L2[0] = " " ~ left(message.body, 23);
me.L2[0] = " " ~ left(message.body, size(message.body) > 23 ? 23 : size(message.body));
me.L2[2] = "blu";
if (!message.viewed) {
me.L2[1] = " " ~ message.time ~ " NEW";
@ -97,7 +97,7 @@ var receivedMessagesPage = {
if (me.size >= (me.curPage * 5) + -2) {
message = ReceivedMessagesDatabase.database.vector[-3 + (me.curPage * 5)];
me.L3[0] = " " ~ left(message.body, 23);
me.L3[0] = " " ~ left(message.body, size(message.body) > 23 ? 23 : size(message.body));
me.L3[2] = "blu";
if (!message.viewed) {
me.L3[1] = " " ~ message.time ~ " NEW";
@ -109,7 +109,7 @@ var receivedMessagesPage = {
if (me.size >= (me.curPage * 5) + -1) {
message = ReceivedMessagesDatabase.database.vector[-2 + (me.curPage * 5)];
me.L4[0] = " " ~ left(message.body, 23);
me.L4[0] = " " ~ left(message.body, size(message.body) > 23 ? 23 : size(message.body));
me.L4[2] = "blu";
if (!message.viewed) {
me.L4[1] = " " ~ message.time ~ " NEW";
@ -121,7 +121,7 @@ var receivedMessagesPage = {
if (me.size >= (me.curPage * 5) + 0) {
message = ReceivedMessagesDatabase.database.vector[-1 + (me.curPage * 5)];
me.L5[0] = " " ~ left(message.body, 23);
me.L5[0] = " " ~ left(message.body, size(message.body) > 23 ? 23 : size(message.body));
me.L5[2] = "blu";
if (!message.viewed) {
me.L5[1] = " " ~ message.time ~ " NEW";
@ -134,11 +134,22 @@ var receivedMessagesPage = {
},
leftKey: func(index) {
if (ReceivedMessagesDatabase.getSize() >= (-5 + index + (me.curPage * 5))) {
if (mcdu_scratchpad.scratchpads[me.computer].scratchpad == "CLR") {
ReceivedMessagesDatabase.removeAtIndex(-6 + index + (me.curPage * 5));
me.update();
if (ReceivedMessagesDatabase.getSize() < (me.curPage * 5) and ReceivedMessagesDatabase.getSize() >= 5) {
me.scrollLeft();
}
mcdu_scratchpad.scratchpads[me.computer].empty();
} elsif (size(mcdu_scratchpad.scratchpads[me.computer].scratchpad) == 0) {
canvas_mcdu.myReceivedMessage[me.computer] = receivedMessagePage.new(me.computer, (-6 + index + (me.curPage * 5)));
setprop("MCDU[" ~ me.computer ~ "]/page", "RECEIVEDMSG");
} else {
mcdu_message(me.computer, "NOT ALLOWED");
}
} else {
mcdu_message(me.computer, "NOT ALLOWED");
}
},
};
@ -288,12 +299,23 @@ var ReceivedMessagesDatabase = {
canvas_mcdu.myReceivedMessages[1].update();
}
},
firstUnviewed: func() {
for (var i = 0; i < me.getSize(); i = i + 1) {
if (!me.database.vector[i].viewed) {
return i;
}
}
return -99;
},
getCountPages: func() {
return math.ceil(me.database.size() / 5);
return math.ceil(me.getSize() / 5);
},
getSize: func() {
return me.database.size();
},
removeAtIndex: func(index) {
return me.database.pop(index);
},
clearDatabase: func() {
me.database.clear();
},

View file

@ -178,9 +178,11 @@ var windCLBPage = {
} else {
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();
@ -316,9 +318,11 @@ var windCLBPage = {
} else {
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();

View file

@ -269,9 +269,11 @@ var windCRZPage = {
} else {
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();
@ -504,9 +506,11 @@ var windCRZPage = {
} else {
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();

View file

@ -2,6 +2,9 @@
# Copyright (c) 2020 Matthew Maring (mattmaring)
var wind = nil;
var magVar = nil;
var windDESPage = {
title: nil,
titleColour: "wht",
@ -188,17 +191,18 @@ var windDESPage = {
me.updateTmpy();
},
returnGRND: func() {
var wind = fmgc.windController.des_winds[2];
wind = fmgc.windController.des_winds[2];
magVar = pts.Environment.magVar.getValue();
if (wind.wind5.altitude == "GRND") {
return [geo.normdeg(wind.wind5.heading - getprop("/environment/magnetic-variation-deg")), wind.wind5.magnitude];
return [geo.normdeg(wind.wind5.heading - magVar), wind.wind5.magnitude];
} else if (wind.wind4.altitude == "GRND") {
return [geo.normdeg(wind.wind4.heading - getprop("/environment/magnetic-variation-deg")), wind.wind4.magnitude];
return [geo.normdeg(wind.wind4.heading - magVar), wind.wind4.magnitude];
} else if (wind.wind3.altitude == "GRND") {
return [geo.normdeg(wind.wind3.heading - getprop("/environment/magnetic-variation-deg")), wind.wind3.magnitude];
return [geo.normdeg(wind.wind3.heading - magVar), wind.wind3.magnitude];
} else if (wind.wind2.altitude == "GRND") {
return [geo.normdeg(wind.wind2.heading - getprop("/environment/magnetic-variation-deg")), wind.wind2.magnitude];
return [geo.normdeg(wind.wind2.heading - magVar), wind.wind2.magnitude];
} else if (wind.wind1.altitude == "GRND") {
return [geo.normdeg(wind.wind1.heading - getprop("/environment/magnetic-variation-deg")), wind.wind1.magnitude];
return [geo.normdeg(wind.wind1.heading - magVar), wind.wind1.magnitude];
} else {
return nil;
}
@ -210,9 +214,11 @@ var windDESPage = {
} else {
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();
@ -382,9 +388,11 @@ var windDESPage = {
} else {
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();

View file

@ -5,9 +5,9 @@
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"),
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) {

View file

@ -32,7 +32,7 @@ var init = func() {
}
var update_com1 = func() {
if (getprop("systems/acconfig/options/fo-view") == 1) {
if (getprop("/systems/acconfig/options/fo-view") == 1) {
if (vhf1_fo_recive.getValue()) {
com1_volume.setValue(vhf1_fo_volume.getValue());
} else {
@ -48,7 +48,7 @@ var update_com1 = func() {
}
var update_com2 = func() {
if (getprop("systems/acconfig/options/fo-view") == 1) {
if (getprop("/systems/acconfig/options/fo-view") == 1) {
if (vhf2_fo_recive.getValue()) {
com2_volume.setValue(vhf2_fo_volume.getValue());
} else {

View file

@ -6,7 +6,7 @@
var idCode = props.globals.getNode("instrumentation/transponder/id-code", 1);
var guiModes = ['OFF', 'STANDBY', 'TEST', 'GROUND', 'ON', 'ALTITUDE'];
var guiNode = props.globals.getNode("sim/gui/dialogs/radios/transponder-mode", 1);
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");
@ -24,10 +24,10 @@ var Transponder = {
serviceableNode: props.globals.getNode("instrumentation/transponder/serviceable", 1),
knobNode: props.globals.getNode("instrumentation/transponder/inputs/knob-mode", 1),
identNode: props.globals.getNode("instrumentation/transponder/inputs/ident-btn", 1),
ac1Node: props.globals.getNode("systems/electrical/bus/ac-1", 1),
ac1Node: props.globals.getNode("/systems/electrical/bus/ac-1", 1),
tcasNode: props.globals.getNode("instrumentation/tcas/inputs/mode"),
aglNode: props.globals.getNode("position/gear-agl-ft", 1),
electricNode: props.globals.getNode("systems/electrical/outputs/transponder", 1), # communicate to generic systems
electricNode: props.globals.getNode("/systems/electrical/outputs/transponder", 1), # communicate to generic systems
new: func(elecSrc, ADIRS) {
var t = {parents:[Transponder]};
t.mode = 1;
@ -145,7 +145,7 @@ var transponderPanel = {
failLight: 0,
clearFlag: 0,
keypad: func(keyNum) {
if (props.globals.getNode("controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("systems/electrical/bus/dc-ess", 1).getValue() < 25) {
if (props.globals.getNode("/controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("/systems/electrical/bus/dc-ess", 1).getValue() < 25) {
return;
}
if (keyNum < 0 or keyNum > 7) {
@ -163,7 +163,7 @@ var transponderPanel = {
}
},
clearKey: func() {
if (props.globals.getNode("controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("systems/electrical/bus/dc-ess", 1).getValue() < 25) {
if (props.globals.getNode("/controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("/systems/electrical/bus/dc-ess", 1).getValue() < 25) {
return;
}
if (me.codeDisp != "") {
@ -215,7 +215,7 @@ var transponderPanel = {
return;
}
me.failLight = newFail;
props.globals.getNode("systems/atc/failed").setBoolValue(me.failLight);
props.globals.getNode("/systems/atc/failed").setBoolValue(me.failLight);
},
identSwitch: func() {
Transponders.vector[me.atcSel - 1].ident();

View file

@ -4,89 +4,124 @@
var chr = aircraft.timer.new("instrumentation/chrono[0]/elapsetime-sec",1);
var clk = aircraft.timer.new("instrumentation/clock/elapsetime-sec",1);
var chr_min = nil;
var chr_sec = nil;
var chr_tmp = nil;
var clock2_1 = nil;
var clock2_2 = nil;
var day = nil;
var et_hr = nil;
var et_min = nil;
var et_tmp = nil;
var month = nil;
var rudder_val = nil;
var tmp = nil;
var tmp1 = nil;
var UTC_date = nil;
var UTC_date1 = nil;
var UTC_date2 = nil;
var UTC_date3 = nil;
var year = nil;
var et_selector = props.globals.initNode("/instrumentation/clock/et-selector", 1, "INT");
var utc_selector = props.globals.initNode("/instrumentation/clock/utc-selector",0,"INT");
var set_knob = props.globals.initNode("/instrumentation/clock/set-knob",0,"INT");
var clock = {
elapsedHour: props.globals.initNode("/instrumentation/clock/et-hr", 0, "INT"),
elapsedMin: props.globals.initNode("/instrumentation/clock/et-min", 0, "INT"),
elapsedString: props.globals.initNode("/instrumentation/clock/elapsed-string", 0, "STRING"),
elapsedSec: props.globals.initNode("/instrumentation/clock/elapsetime-sec", 0, "INT"),
indicatedSec: props.globals.getNode("/instrumentation/clock/indicated-seconds"),
hhMM: props.globals.initNode("/instrumentation/clock/clock_hh_mm", 0, "STRING"),
utcDate: [props.globals.initNode("/instrumentation/clock/utc-date", "", "STRING"), props.globals.initNode("/instrumentation/clock/utc-date1", "", "STRING"),
props.globals.initNode("/instrumentation/clock/utc-date2", "", "STRING"),props.globals.initNode("/instrumentation/clock/utc-date3", "", "STRING")],
};
var chrono = {
chronoReset: props.globals.initNode("/instrumentation/chrono[0]/chrono-reset", 1, "INT"),
elapseTime: props.globals.initNode("/instrumentation/chrono[0]/elapsetime-sec", 0, "INT"),
etMin: props.globals.initNode("/instrumentation/chrono[0]/chr-et-min", 0, "INT"),
etSec: props.globals.initNode("/instrumentation/chrono[0]/chr-et-sec", 0, "INT"),
etString: props.globals.initNode("/instrumentation/chrono[0]/chr-et-string", 0, "STRING"),
paused: props.globals.getNode("/instrumentation/chrono[0]/paused"),
started: props.globals.getNode("/instrumentation/chrono[0]/started"),
};
var rudderTrim = {
rudderTrimDisplay: props.globals.initNode("/controls/flight/rudder-trim-display", 0, "STRING"),
rudderTrimDisplayLetter: props.globals.initNode("/controls/flight/rudder-trim-letter-display", "", "STRING"),
};
setlistener("sim/signals/fdm-initialized", func {
chr.stop();
chr.reset();
clk.stop();
clk.reset();
props.globals.initNode("instrumentation/clock/clock_hh_mm", 0,"STRING");
props.globals.initNode("instrumentation/clock/indicated-string",0,"STRING");
props.globals.initNode("instrumentation/clock/elapsed-string",0,"STRING");
props.globals.initNode("instrumentation/clock/elapsetime-sec",0,"INT");
props.globals.initNode("instrumentation/clock/et-selector",1,"INT");
props.globals.initNode("instrumentation/clock/utc-selector",0,"INT");
props.globals.initNode("instrumentation/clock/set-knob",0,"INT");
props.globals.initNode("instrumentation/clock/et-hr",0,"INT");
props.globals.initNode("instrumentation/clock/et-min",0,"INT");
props.globals.initNode("instrumentation/chrono[0]/chr-et-string",0,"STRING");
props.globals.initNode("instrumentation/chrono[0]/elapsetime-sec",0,"INT");
props.globals.initNode("instrumentation/chrono[0]/chrono-reset",1,"INT");
props.globals.initNode("instrumentation/chrono[0]/chr-et-min",0,"INT");
props.globals.initNode("instrumentation/chrono[0]/chr-et-sec",0,"INT");
props.globals.initNode("controls/flight/rudder-trim-display",0,"STRING");
setprop("/controls/flight/rudder-trim-display", sprintf("%2.1f", getprop("fdm/jsbsim/hydraulics/rudder/trim-deg")));
rudderTrim.rudderTrimDisplay.setValue(sprintf("%2.1f", pts.Fdm.JSBsim.Hydraulics.Rudder.trimDeg.getValue()));
start_loop.start();
});
setlistener("instrumentation/chrono[0]/chrono-reset", func(et){
var tmp = et.getValue();
setlistener("/instrumentation/chrono[0]/chrono-reset", func(et){
tmp = et.getValue();
if (tmp == 2) {
if (getprop("instrumentation/chrono[0]/started") == 1) {
if (getprop("instrumentation/chrono[0]/paused") == 0) {
setprop("/instrumentation/chrono[0]/elapsetime-sec", 0);
setprop("/instrumentation/chrono[0]/chrono-reset", 0);
if (chrono.started.getBoolValue()) {
if (!chrono.paused.getBoolValue()) {
chrono.elapseTime.setValue(0);
chrono.chronoReset.setBoolValue(0);
} else {
chr.stop();
chr.reset();
setprop("/instrumentation/chrono[0]/chrono-reset", 1);
setprop("/instrumentation/chrono[0]/started", 0);
setprop("/instrumentation/chrono[0]/paused", 0);
chrono.chronoReset.setBoolValue(1);
chrono.started.setBoolValue(0);
chrono.paused.setBoolValue(0);
};
} else {
if (getprop("instrumentation/chrono[0]/paused") == 0) {
if (!chrono.paused.getBoolValue()) {
# No action required
} else {
setprop("/instrumentation/chrono[0]/paused", 0);
chrono.paused.setBoolValue(0);
};
};
} elsif (tmp == 1) {
if (getprop("instrumentation/chrono[0]/started") == 1) {
if (getprop("instrumentation/chrono[0]/paused") == 0) {
if (chrono.started.getBoolValue()) {
if (!chrono.paused.getBoolValue()) {
chr.stop();
setprop("/instrumentation/chrono[0]/paused", 1);
chrono.paused.setBoolValue(1);
} else {
chr.stop();
};
} else {
if (getprop("instrumentation/chrono[0]/paused") == 0) {
if (!chrono.paused.getBoolValue()) {
chr.stop();
} else {
chr.stop();
setprop("/instrumentation/chrono[0]/paused", 0);
chrono.paused.setBoolValue(0);
};
};
} elsif (tmp == 0) {
if (getprop("instrumentation/chrono[0]/started") == 0) {
if (getprop("instrumentation/chrono[0]/paused") == 0) {
if (!chrono.started.getBoolValue()) {
if (!chrono.paused.getBoolValue()) {
chr.start();
setprop("/instrumentation/chrono[0]/started", 1);
chrono.started.setBoolValue(1);
} else {
chr.start();
setprop("/instrumentation/chrono[0]/paused", 0);
chrono.paused.setBoolValue(0);
};
} else {
if (getprop("instrumentation/chrono[0]/paused") == 0) {
if (!chrono.paused.getBoolValue()) {
# No action required
} else {
chr.start();
setprop("/instrumentation/chrono[0]/paused", 0);
chrono.paused.setBoolValue(0);
};
};
};
}, 0, 0);
setlistener("instrumentation/clock/et-selector", func(et){
var tmp1 = et.getValue();
tmp1 = et.getValue();
if (tmp1 == 2){
clk.reset();
} elsif (tmp1 == 1){
@ -98,106 +133,115 @@ setlistener("instrumentation/clock/et-selector", func(et){
var start_loop = maketimer(0.1, func {
if (systems.ELEC.Bus.dcEss.getValue() < 25) { return; }
# Annun-test
if (getprop("controls/switches/annun-test") == 1) {
var UTC_date = sprintf("%02d %02d %02d", "88", "88", "88");
var UTC_date1 = sprintf("%02d", "88");
var UTC_date2 = sprintf("%02d", "88");
var UTC_date3 = sprintf("%02d", "88");
var clock2_1 = "88:88";
var clock2_2 = sprintf("%02d", 88);
setprop("/instrumentation/clock/clock_hh_mm", clock2_1);
setprop("/instrumentation/clock/indicated-seconds", clock2_2);
setprop("/instrumentation/clock/utc-date", UTC_date);
setprop("/instrumentation/clock/utc-date1", UTC_date1);
setprop("/instrumentation/clock/utc-date2", UTC_date2);
setprop("/instrumentation/clock/utc-date3", UTC_date3);
setprop("/instrumentation/chrono[0]/chr-et-string", "88 88");
setprop("/instrumentation/clock/elapsed-string", "88:88");
if (pts.Controls.Switches.annunTest.getBoolValue()) {
UTC_date = sprintf("%02d %02d %02d", "88", "88", "88");
UTC_date1 = sprintf("%02d", "88");
UTC_date2 = sprintf("%02d", "88");
UTC_date3 = sprintf("%02d", "88");
clock2_1 = "88:88";
clock2_2 = sprintf("%02d", 88);
clock.hhMM.setValue(clock2_1);
clock.indicatedSec.setValue(clock2_2);
clock.utcDate[0].setValue(UTC_date);
clock.utcDate[1].setValue(UTC_date1);
clock.utcDate[2].setValue(UTC_date2);
clock.utcDate[3].setValue(UTC_date3);
chrono.etString.setValue("88 88");
clock.elapsedString.setValue("88:88");
} else {
day = pts.Sim.Time.UTC.day.getValue();
month = pts.Sim.Time.UTC.month.getValue();
year = pts.Sim.Time.UTC.year.getValue();
# Clock
var UTC_date = sprintf("%02d %02d %02d", getprop("sim/time/utc/month"), getprop("sim/time/utc/day"), substr(sprintf("%2d", getprop("sim/time/utc/year")),1,2));
setprop("/instrumentation/clock/utc-date", UTC_date);
var UTC_date1 = sprintf("%02d", getprop("sim/time/utc/month"));
var UTC_date2 = sprintf("%02d", getprop("sim/time/utc/day"));
var UTC_date3 = substr(sprintf("%2d", getprop("sim/time/utc/year")),2,2);
var clock2_1 = getprop("instrumentation/clock/indicated-short-string");
var clock2_2 = sprintf("%02d", substr(getprop("instrumentation/clock/indicated-string"),6,2));
setprop("/instrumentation/clock/clock_hh_mm", clock2_1);
setprop("/instrumentation/clock/indicated-seconds", clock2_2);
setprop("/instrumentation/clock/utc-date", UTC_date);
setprop("/instrumentation/clock/utc-date1", UTC_date1);
setprop("/instrumentation/clock/utc-date2", UTC_date2);
setprop("/instrumentation/clock/utc-date3", UTC_date3);
if (getprop("instrumentation/clock/set-knob") == "") {
setprop("/instrumentation/clock/set-knob", 0);
};
if (getprop("instrumentation/clock/utc-selector") == "") {
setprop("/instrumentation/clock/utc-selector", 0);
};
# if (getprop("instrumentation/clock/utc-selector") == 0) {
UTC_date = sprintf("%02d %02d %02d", month, day, substr(sprintf("%2d", year),1,2));
UTC_date1 = sprintf("%02d", month);
UTC_date2 = sprintf("%02d", day);
UTC_date3 = substr(sprintf("%2d", year),2,2);
clock2_1 = pts.Instrumentation.Clock.indicatedStringShort.getValue();
clock2_2 = sprintf("%02d", substr(pts.Instrumentation.Clock.indicatedString.getValue(),6,2));
clock.hhMM.setValue(clock2_1);
clock.indicatedSec.setValue(clock2_2);
clock.utcDate[0].setValue(UTC_date);
clock.utcDate[1].setValue(UTC_date1);
clock.utcDate[2].setValue(UTC_date2);
clock.utcDate[3].setValue(UTC_date3);
if (set_knob.getValue() == "") {
set_knob.setValue(0);
}
if (utc_selector.getValue() == "") {
utc_selector.setValue(0);
}
# if (getprop("/instrumentation/clock/utc-selector") == 0) {
# # To do - GPS mode
# };
# if (getprop("instrumentation/clock/utc-selector") == 1) {
# if (getprop("/instrumentation/clock/utc-selector") == 1) {
# # To do - INT mode
# };
# if (getprop("instrumentation/clock/utc-selector") == 2) {
# if (getprop("/instrumentation/clock/utc-selector") == 2) {
# # To do - SET mode
# };
# Chrono
var chr_tmp = getprop("instrumentation/chrono[0]/elapsetime-sec");
chr_tmp = chrono.elapseTime.getValue();
if (chr_tmp >= 6000) {
setprop("/instrumentation/chrono[0]/elapsetime-sec", chr_tmp-6000);
};
var chr_min = int(chr_tmp * 0.0166666666667);
chrono.elapseTime.setValue(chr_tmp - 6000);
}
chr_min = int(chr_tmp * 0.0166666666667);
if (chr_tmp >= 60) {
var chr_sec = int(chr_tmp - (chr_min * 60));
chr_sec = int(chr_tmp - (chr_min * 60));
} else {
var chr_sec = int(chr_tmp);
};
setprop("/instrumentation/chrono[0]/chr-et-min",chr_min);
setprop("/instrumentation/chrono[0]/chr-et-sec",chr_sec);
chr_tmp = sprintf("%02d:%02d", chr_min, chr_sec);
setprop("/instrumentation/chrono[0]/chr-et-string", chr_tmp);
chr_sec = int(chr_tmp);
}
chrono.etMin.setValue(chr_min);
chrono.etSec.setValue(chr_sec);
chrono.etString.setValue(sprintf("%02d:%02d", chr_min, chr_sec));
# ET clock
var et_tmp = getprop("instrumentation/clock/elapsetime-sec");
et_tmp = clock.elapsedSec.getValue();
if (et_tmp >= 360000) {
setprop("/instrumentation/clock/elapsetime-sec", et_tmp-360000);
};
var et_min = int(et_tmp * 0.0166666666667);
var et_hr = int(et_min * 0.0166666666667);
clock.elapsedSec.setValue(et_tmp - 360000);
}
et_min = int(et_tmp * 0.0166666666667);
et_hr = int(et_min * 0.0166666666667);
et_min = et_min - (et_hr * 60);
setprop("/instrumentation/clock/et-hr",et_hr);
setprop("/instrumentation/clock/et-min",et_min);
et_tmp = sprintf("%02d:%02d", et_hr, et_min);
setprop("/instrumentation/clock/elapsed-string", et_tmp);
clock.elapsedHour.setValue(et_hr);
clock.elapsedMin.setValue(et_min);
clock.elapsedString.setValue(sprintf("%02d:%02d", et_hr, et_min));
foreach (item; update_items) {
item.update(nil);
}
};
}
});
var updateRudderTrim = func() {
var rudder_val = getprop("fdm/jsbsim/hydraulics/rudder/trim-deg");
if (getprop("/controls/switches/annun-test") == 1) {
setprop("/controls/flight/rudder-trim-display", sprintf("%3.1f", "88.8"));
setprop("/controls/flight/rudder-trim-letter-display", sprintf("%1.0f", "8"));
if (pts.Controls.Switches.annunTest.getBoolValue()) {
rudderTrim.rudderTrimDisplay.setValue(sprintf("%3.1f", "88.8"));
rudderTrim.rudderTrimDisplayLetter.setValue(sprintf("%1.0f", "8"));
} else {
rudder_val = pts.Fdm.JSBsim.Hydraulics.Rudder.trimDeg.getValue();
if (rudder_val > -0.05 and rudder_val < 0.05) {
setprop("/controls/flight/rudder-trim-display", sprintf("%2.1f", abs(rudder_val)));
setprop("/controls/flight/rudder-trim-letter-display", "");
rudderTrim.rudderTrimDisplay.setValue(sprintf("%2.1f", abs(rudder_val)));
rudderTrim.rudderTrimDisplayLetter.setValue("");
} else {
rudderTrim.rudderTrimDisplay.setValue(sprintf("%2.1f", abs(rudder_val)));
if (rudder_val >= 0.05) {
setprop("/controls/flight/rudder-trim-display", sprintf("%2.1f", abs(rudder_val)));
setprop("/controls/flight/rudder-trim-letter-display", "R");
} else {
if (rudder_val <= -0.05) {
setprop("/controls/flight/rudder-trim-display", sprintf("%2.1f", abs(rudder_val)));
setprop("/controls/flight/rudder-trim-letter-display", "L");
}
rudderTrim.rudderTrimDisplayLetter.setValue("R");
} elsif (rudder_val <= -0.05) {
rudderTrim.rudderTrimDisplayLetter.setValue("L");
}
}
}

View file

@ -395,23 +395,23 @@ var update_chan_sel = func(rmp_no) {
var transfer = func(rmp_no) {
rmp_no = rmp_no - 1;
var sel_chan = getprop("systems/radio/rmp[" ~ rmp_no ~ "]/sel_chan");
var sel_crs = getprop("systems/radio/rmp[" ~ rmp_no ~ "]/select-crs");
var sel_chan = getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/sel_chan");
var sel_crs = getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs");
if (string.match(sel_chan, "vhf[1-3]")) {
var mod1 = int(string.replace(sel_chan, "vhf", ""));
var mod = mod1 - 1;
var mem = getprop("instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz");
setprop("instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz", getprop("systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby"));
setprop("systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby", mem);
setprop("instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz", getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby"));
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby", mem);
} elsif (string.match(sel_chan, "hf[1-2]")) {
var mod1 = int(string.replace(sel_chan, "hf", ""));
var mod = mod1 - 1;
var mem = systems.HFS[mod].selectedChannelKhz;
systems.HFS[mod].selectChannel(getprop("systems/radio/rmp[" ~ rmp_no ~ "]/hf" ~ mod1 ~ "-standby"));
setprop("systems/radio/rmp[" ~ rmp_no ~ "]/hf" ~ mod1 ~ "-standby", mem);
systems.HFS[mod].selectChannel(getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/hf" ~ mod1 ~ "-standby"));
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/hf" ~ mod1 ~ "-standby", mem);
} elsif (sel_chan == "adf") {
var mem = getprop("instrumentation/adf[" ~ rmp_no ~ "]/frequencies/selected-khz");
setprop("instrumentation/adf[" ~ rmp_no ~ "]/frequencies/selected-khz", getprop("instrumentation/adf[" ~ rmp_no ~ "]/frequencies/standby-khz"));
@ -420,21 +420,21 @@ var transfer = func(rmp_no) {
} elsif (sel_chan == "vor") {
if (sel_crs) {
setprop("instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/standby-mhz", getprop("instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/selected-mhz"));
setprop("systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 0);
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 0);
update_displays_nav(rmp_no + 3);
} else {
setprop("instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/selected-mhz", getprop("instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/standby-mhz"));
setprop("systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 1);
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 1);
update_displays_nav(rmp_no + 3);
}
} elsif (sel_chan == "ls") {
if (sel_crs) {
setprop("instrumentation/nav[0]/frequencies/standby-mhz", getprop("instrumentation/nav[0]/frequencies/selected-mhz"));
setprop("systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 0);
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 0);
update_displays_nav(1);
} else {
setprop("instrumentation/nav[0]/frequencies/selected-mhz", getprop("instrumentation/nav[0]/frequencies/standby-mhz"));
setprop("systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 1);
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 1);
update_displays_nav(1);
}
}

94
Nasal/QRH/QRH.nas Normal file
View file

@ -0,0 +1,94 @@
# A3XX Canvas QRH
# Jonathan Redpath (legoboyvdlp)
# Copyright (c) 2020 Jonathan Redpath (legoboyvdlp)
var QRHpageNo = props.globals.initNode("/canvas/canvasQRH/page-number", 1, "INT");
var _pageNo = 1;
var _MAXPAGE = 3;
var width = 550;
var height = 625;
var QRH = nil;
var prevPage = func() {
_pageNo = QRHpageNo.getValue();
if (_pageNo == 1) { return; }
QRHpageNo.setValue(_pageNo - 1);
};
var nextPage = func() {
_pageNo = QRHpageNo.getValue();
if (_pageNo == _MAXPAGE) { return; }
QRHpageNo.setValue(_pageNo + 1);
};
var createCanvasQRH = func() {
var window = canvas.Window.new([width,height],"dialog")
.set("title","A320 QRH");
var qrhCanvas = window.createCanvas().set("background", canvas.style.getColor("bg_color"));
var root = qrhCanvas.createGroup();
var myHBox = canvas.HBoxLayout.new();
qrhCanvas.setLayout(myHBox);
QRH = canvas.gui.widgets.Label.new(root, canvas.style, {} )
.setImage(resolvepath("Aircraft/A320-family/Models/FlightDeck/QRH/" ~ QRHpageNo.getValue() ~ ".jpeg"))
.move(0,-25)
.setSize(400,625);
myHBox.addItem(QRH);
var verticalGroup = canvas.VBoxLayout.new();
myHBox.addItem(verticalGroup);
var buttonInc = canvas.gui.widgets.Button.new(root, canvas.style, {})
.setText("Size Up")
.setFixedSize(75,25);
var buttonReset = canvas.gui.widgets.Button.new(root, canvas.style, {})
.setText("Reset Size")
.setFixedSize(75,25);
var buttonDec = canvas.gui.widgets.Button.new(root, canvas.style, {})
.setText("Size Down")
.setFixedSize(75,25);
var buttonPrev = canvas.gui.widgets.Button.new(root, canvas.style, {})
.setText("Prev Page")
.setFixedSize(75,25);
var buttonNext = canvas.gui.widgets.Button.new(root, canvas.style, {})
.setText("Next Page")
.setFixedSize(75,25);
buttonInc.listen("clicked", func {
width = width * 1.10;
height = height * 1.10;
window.setSize(width, height);
});
buttonReset.listen("clicked", func {
width = 550;
height = 650;
window.setSize(width, height);
});
buttonDec.listen("clicked", func {
width = width * 0.91;
height = height * 0.91;
window.setSize(width, height);
});
buttonPrev.listen("clicked", func {
prevPage();
QRH.setImage(resolvepath("Aircraft/A320-family/Models/FlightDeck/QRH/" ~ QRHpageNo.getValue() ~ ".jpeg"));
});
buttonNext.listen("clicked", func {
nextPage();
QRH.setImage(resolvepath("Aircraft/A320-family/Models/FlightDeck/QRH/" ~ QRHpageNo.getValue() ~ ".jpeg"));
});
verticalGroup.addItem(buttonInc);
verticalGroup.addItem(buttonReset);
verticalGroup.addItem(buttonDec);
verticalGroup.addItem(buttonPrev);
verticalGroup.addItem(buttonNext);
}

View file

@ -2,41 +2,6 @@
# Jonathan Redpath
# Copyright (c) 2020 Josh Davidson (Octal450)
var DictionaryItem = {
new: func(item, string) {
var DI = {parents: [DictionaryItem]};
DI.item = item;
DI.string = string;
return DI;
},
};
var Dictionary = {
database: std.Vector.new(),
addToDatabase: func(dictItem) {
me.database.append(dictItem);
},
fetchString: func(string) {
foreach (var item; me.database.vector) {
if (me.item.string == string) {
return item;
}
}
},
fetchItem: func(itemObj) {
foreach (var item; me.database.vector) {
if (item.item == itemObj) {
return item;
}
}
},
};
makeNewDictionaryItem = func(item, string) {
var dictItem = DictionaryItem.new(item, string);
Dictionary.addToDatabase(dictItem);
};
var CPDLCmessage = {
new: func(text) {
var cpdlcMessage = {parents: [CPDLCmessage] };

View file

@ -0,0 +1,75 @@
# A3XX Dictionary
# Jonathan Redpath
# Copyright (c) 2020 Josh Davidson (Octal450)
var DictionaryItemObj = {
new: func(item, string) {
var DI = {parents: [DictionaryItemObj]};
DI.item = item;
DI.string = string;
return DI;
},
};
var DictionaryObj = {
database: std.Vector.new(),
addToDatabase: func(dictItem) {
me.database.append(dictItem);
},
fetchString: func(string) {
foreach (var item; me.database.vector) {
if (me.item.string == string) {
return item;
}
}
},
fetchItem: func(itemObj) {
foreach (var item; me.database.vector) {
if (item.item == itemObj) {
return item;
}
}
},
};
var makeNewDictionaryItem = func(item, string) {
var dictItem = DictionaryItemObj.new(item, string);
DictionaryObj.addToDatabase(dictItem);
};
var DictionaryItemString = {
new: func(string1, string2) {
var DI = {parents: [DictionaryItemString]};
DI.string1 = string1;
DI.string2 = string2;
return DI;
},
};
var DictionaryString = {
database: std.Vector.new(),
addToDatabase: func(dictItem) {
me.database.append(dictItem);
},
fetchString1: func(stringSearch) {
foreach (var item; me.database.vector) {
if (string.uc(item.string1) == string.uc(stringSearch)) {
return item;
}
}
return "";
},
fetchString2: func(stringSearch) {
foreach (var item; me.database.vector) {
if (string.uc(item.string2) == string.uc(stringSearch)) {
return item;
}
}
return "";
},
};
var makeNewDictionaryString = func(string1, string2) {
var dictItem = DictionaryItemString.new(string1, string2);
DictionaryString.addToDatabase(dictItem);
};

View file

@ -2,6 +2,9 @@
# Jonathan Redpath
# Copyright (c) 2020 Josh Davidson (Octal450)
var defaultServer = "https://www.aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&mostRecent=true&hoursBeforeNow=12&stationString=";
var result = nil;
var ATSU = {
working: 0,
loop: func() {
@ -93,21 +96,17 @@ var CompanyCall = {
var AOC = {
station: nil,
selectedType: "HOURLY WX", # 0 = METAR 1 = TAF
selectedType: "HOURLY WX",
lastMETAR: nil,
lastTAF: nil,
sent: 0,
sentTime: nil,
received: 0,
receivedTime: nil,
server: props.globals.getNode("/systems/atsu/wxr-server"),
newStation: func(airport) {
if (size(airport) == 3 or size(airport) == 4) {
if (size(findAirportsByICAO(airport)) == 0) {
return 2;
} else {
me.station = airport;
return 0;
}
} else {
return 1;
}
@ -118,9 +117,18 @@ var AOC = {
}
me.sent = 1;
me.received = 0;
var sentTime = left(getprop("/sim/time/gmt-string"), 5);
me.sentTime = split(":", sentTime)[0] ~ "." ~ split(":", sentTime)[1] ~ "Z";
if (size(findAirportsByICAO(me.station)) == 0) {
me.received = 1;
me.receivedTime = me.sentTime;
var message = mcdu.ACARSMessage.new(me.receivedTime, "INVALID STATION " ~ me.station);
mcdu.ReceivedMessagesDatabase.addMessage(message);
return 0;
}
if (me.selectedType == "HOURLY WX") {
var result = me.fetchMETAR(atsu.AOC.station, i);
if (result == 0) {
@ -143,8 +151,13 @@ var AOC = {
}
}
},
downloadFail: func(i, r = nil) {
mcdu.mcdu_message(i,"NO ANSWER TO REQUEST");
debug.dump("HTTP failure " ~ r.status);
me.sent = 0;
},
fetchMETAR: func(airport, i) {
if (!ATSU.working) {
if (!ATSU.working or !fmgc.FMGCInternal.flightNumSet) {
me.sent = 0;
return 2;
}
@ -152,13 +165,30 @@ var AOC = {
me.sent = 0;
return 1;
}
http.load("https://www.aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&mostRecent=true&hoursBeforeNow=12&stationString=" ~ airport)
.fail(func print("Download failed!"))
.done(func(r) me.processMETAR(r, i));
var serverString = "";
if (me.server.getValue() == "vatsim") {
serverString = "https://api.flybywiresim.com/metar?source=vatsim&icao=";
} else {
serverString = defaultServer;
}
http.load(serverString ~ airport)
.fail(func(r) me.downloadFail(i, r))
.done(func(r) {
var errs = [];
call(me.processMETAR, [r, i], me, {}, errs);
if (size(errs) > 0) {
print("Failed to parse METAR for " ~ airport);
debug.dump(r.response);
debug.printerror(errs);
mcdu.mcdu_message(i, "BAD SERVER RESPONSE");
}
});
return 0;
},
fetchTAF: func(airport, i) {
if (!ATSU.working) {
if (!ATSU.working or !fmgc.FMGCInternal.flightNumSet) {
me.sent = 0;
return 2;
}
@ -167,15 +197,33 @@ var AOC = {
return 1;
}
http.load("https://www.aviationweather.gov/adds/dataserver_current/httpparam?dataSource=tafs&requestType=retrieve&format=xml&timeType=issue&mostRecent=true&hoursBeforeNow=12&stationString=" ~ airport)
.fail(func print("Download failed!"))
.done(func(r) me.processTAF(r, i));
.fail(func(r) me.downloadFail(i))
.done(func(r) {
var errs = [];
call(me.processTAF, [r, i], me, {}, errs);
if (size(errs) > 0) {
print("Failed to parse TAF for " ~ airport);
debug.dump(r.response);
debug.printerror(errs);
mcdu.mcdu_message(i, "BAD SERVER RESPONSE");
}
});
return 0;
},
processMETAR: func(r, i) {
var raw = r.response;
if (me.server.getValue() == "vatsim") {
me.lastMETAR = raw;
} else if (find("<raw_text>", raw) != -1) {
raw = split("<raw_text>", raw)[1];
raw = split("</raw_text>", raw)[0];
me.lastMETAR = raw;
} else {
me.received = 0;
me.sent = 0;
mcdu.mcdu_message(i, "BAD SERVER RESPONSE");
return;
}
settimer(func() {
me.received = 1;
mcdu.mcdu_message(i, "WX UPLINK");
@ -188,9 +236,17 @@ var AOC = {
},
processTAF: func(r, i) {
var raw = r.response;
if (find("<raw_text>", raw) != -1) {
raw = split("<raw_text>", raw)[1];
raw = split("</raw_text>", raw)[0];
me.lastTAF = raw;
} else {
me.received = 0;
me.sent = 0;
mcdu.mcdu_message(i, "BAD SERVER RESPONSE");
return;
}
me.lastTAF = raw;
settimer(func() {
me.received = 1;
mcdu.mcdu_message(i, "WX UPLINK");
@ -202,3 +258,193 @@ var AOC = {
}, math.max(rand()*6, 2.25));
},
};
var ATIS = {
serverSel: props.globals.getNode("/systems/atsu/atis-server"),
new: func() {
var ATIS = { parents: [ATIS] };
ATIS.station = nil;
ATIS.lastATIS = nil;
ATIS.sent = 0;
ATIS.received = 0;
ATIS.receivedTime = nil;
ATIS.receivedCode = nil;
ATIS.type = 0; # 0 = arr, 1 = dep
return ATIS;
},
newStation: func(airport) {
me.sent = 0;
me.received = 0;
if (size(airport) == 3 or size(airport) == 4) {
if (size(findAirportsByICAO(airport)) == 0) {
return 2;
} else {
me.station = airport;
return 0;
}
} else {
return 1;
}
},
sendReq: func(i) {
if (me.station == nil or (me.sent and !me.received)) {
return 1;
}
me.sent = 1;
me.received = 0;
result = me.fetchATIS(me.station, i);
if (result == 0) {
return 0;
} elsif (result == 1) {
return 3;
} elsif (result == 2) {
return 4;
}
},
fetchATIS: func(airport, i) {
if (!ATSU.working) {
me.sent = 0;
return 2;
}
if (ecam.vhf3_voice.active) {
me.sent = 0;
return 1;
}
var serverString = "https://api.flybywiresim.com/atis?source=" ~ me.serverSel.getValue() ~ "&icao=";
http.load(serverString ~ airport)
.fail(func(r) return 3)
.done(func(r) {
var errs = [];
call(me.processATIS, [r, i], me, {}, errs);
if (size(errs) > 0) {
print("Failed to parse ATIS for " ~ airport);
debug.dump(r.response);
debug.printerror(errs);
mcdu.mcdu_message(i, "BAD SERVER RESPONSE");
}
});
return 0;
},
processATIS: func(r, i) {
var raw = r.response;
if (r.response == "FBW_ERROR: D-ATIS not available at this airport" or find("atis not avail",r.response) != -1) {
me.received = 0;
me.sent = 0;
mcdu.mcdu_message(i,"NO D-ATIS AVAILABLE");
return;
}
if (find("combined", raw) != -1) {
raw = split('{"combined":"', raw)[1];
raw = split('"}', raw)[0];
} else {
if (me.type == 0) {
raw = split('{"arr":"', raw)[1];
raw = split('","dep":', raw)[0];
} else {
raw = split('","dep":"', raw)[1];
raw = split('"}', raw)[0];
}
}
var code = "";
if (find("INFO ", raw) != -1) {
code = split("INFO ", raw)[1];
code = split(" ", code)[0];
} else if (find("information ", raw) != -1) {
code = split("information ", raw)[1];
code = split(" ", code)[0];
} else if (find("INFORMATION ", raw) != -1) {
code = split("INFORMATION ", raw)[1];
code = split(" ", code)[0];
} else if (find("ATIS ", raw) != -1) {
code = split("ATIS ", raw)[1];
code = split(" ", code)[0];
} else if (find("info ", raw) != -1) {
code = split("info ", raw)[1];
code = split(" ", code)[0];
} else {
print("Failed to find a valid ATIS code for " ~ me.station);
debug.dump(raw);
}
if (find(".", code) != -1) {
code = split(".", code)[0];
}
me.receivedCode = code;
var time = "";
if (find("Time ", raw) != -1) {
time = split("Time ", raw)[1];
time = split(" ", time)[0];
} else if (find("time ", raw) != -1) {
time = split("time ", raw)[1];
time = split(" ", time)[0];
} else if (find("TIME ", raw) != -1) {
time = split("TIME ", raw)[1];
time = split(" ", time)[0];
} else if (find("Z.", raw) != -1) {
time = split("Z.", raw)[0];
time = right(time, 4);
} else if (find("Z SPECIAL", raw) != -1) {
time = split("Z SPECIAL", raw)[0];
time = right(time, 4);
} else if (find("metreport", raw) != -1) {
time = split("metreport", raw)[0];
time = right(time, 4);
} else if (find((code ~ " "), raw) != -1) {
if (size(split(" ",split(code ~ " ", raw)[1])[0]) == 4) {
time = split(" ",split(code ~ " ", raw)[1])[0];
}
} else {
print("Failed to find a valid ATIS time for " ~ me.station);
debug.dump(raw);
}
if (size(time) == 3) {
time ~= " ";
}
raw = string.uc(raw);
raw = string.replace(raw, ",", "");
settimer(func() {
me.sent = 0;
me.received = 1;
me.receivedTime = time;
me.lastATIS = raw;
}, math.max(rand()*10, 4.5));
},
};
makeNewDictionaryString("A", "ALPHA");
makeNewDictionaryString("B", "BRAVO");
makeNewDictionaryString("C", "CHARLIE");
makeNewDictionaryString("D", "DELTA");
makeNewDictionaryString("E", "ECHO");
makeNewDictionaryString("F", "FOXTROT");
makeNewDictionaryString("G", "GOLF");
makeNewDictionaryString("H", "HOTEL");
makeNewDictionaryString("I", "INDIA");
makeNewDictionaryString("J", "JULIET");
makeNewDictionaryString("K", "KILO");
makeNewDictionaryString("L", "LIMA");
makeNewDictionaryString("M", "MIKE");
makeNewDictionaryString("N", "NOVEMBER");
makeNewDictionaryString("O", "OSCAR");
makeNewDictionaryString("P", "PAPA");
makeNewDictionaryString("Q", "QUEBEC");
makeNewDictionaryString("R", "ROMEO");
makeNewDictionaryString("S", "SIERRA");
makeNewDictionaryString("T", "TANGO");
makeNewDictionaryString("U", "UNIFORM");
makeNewDictionaryString("V", "VICTOR");
makeNewDictionaryString("W", "WHISKEY");
makeNewDictionaryString("X", "XRAY");
makeNewDictionaryString("Y", "YANKEE");
makeNewDictionaryString("Z", "ZULU");
var ATISInstances = [ATIS.new(), ATIS.new(), ATIS.new(), ATIS.new()];

View file

@ -17,15 +17,6 @@ var egt_lightdn_time = 10;
var shutdown_time = 20;
var egt_shutdown_time = 20;
setprop("/controls/engines/engine[0]/reverser", 0);
setprop("/controls/engines/engine[1]/reverser", 0);
setprop("/controls/engines/engine[0]/igniter-a", 0);
setprop("/controls/engines/engine[1]/igniter-a", 0);
setprop("/controls/engines/engine[0]/igniter-b", 0);
setprop("/controls/engines/engine[1]/igniter-b", 0);
setprop("/controls/engines/engine[0]/last-igniter", "B");
setprop("/controls/engines/engine[1]/last-igniter", "B");
var eng_init = func {
setprop("/controls/engines/engine[0]/man-start", 0);
setprop("/controls/engines/engine[1]/man-start", 0);
@ -34,7 +25,7 @@ var eng_init = func {
# Trigger Startups and Stops
setlistener("/controls/engines/engine[0]/cutoff-switch", func {
if (getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
if (pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) {
if (getprop("/systems/acconfig/autoconfig-running") == 1) {
fast_start_one();
} else {
@ -44,7 +35,7 @@ setlistener("/controls/engines/engine[0]/cutoff-switch", func {
eng_one_man_start.start();
}
}
} else if (getprop("/controls/engines/engine[0]/cutoff-switch") == 1) {
} else if (pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 1) {
cutoff_one();
}
});
@ -84,12 +75,12 @@ setlistener("/controls/engines/engine[0]/man-start", func {
var start_one_mancheck = func {
if (getprop("/controls/engines/engine[0]/man-start") == 1) {
if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[0]/cutoff-switch") == 1)) {
if (getprop("/controls/engines/engine-start-switch") == 2 and (pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 1)) {
setprop("/systems/pneumatics/valves/starter-valve-1", 1);
settimer(start_one_mancheck_b, 0.5);
}
} else {
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
setprop("/engines/engine[0]/state", 0);
setprop("/controls/engines/engine[0]/starter", 0);
@ -105,20 +96,20 @@ var start_one_mancheck_b = func {
}
var start_one_check = func {
if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
if (getprop("/controls/engines/engine-start-switch") == 2 and pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) {
setprop("/systems/pneumatics/valves/starter-valve-1", 1);
settimer(start_one_check_b, 0.5);
}
}
var start_one_check_b = func {
if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine1.getValue() and !getprop("/controls/engines/engine[0]/cutoff-switch")) {
if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine1.getValue() and !pts.Controls.Engines.Engine.cutoffSw[0].getValue()) {
auto_start_one();
}
}
setlistener("/controls/engines/engine[1]/cutoff-switch", func {
if (getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
if (pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) {
if (getprop("/systems/acconfig/autoconfig-running") == 1) {
fast_start_two();
} else {
@ -128,7 +119,7 @@ setlistener("/controls/engines/engine[1]/cutoff-switch", func {
eng_two_man_start.start();
}
}
} else if (getprop("/controls/engines/engine[1]/cutoff-switch") == 1) {
} else if (pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 1) {
cutoff_two();
}
});
@ -167,12 +158,12 @@ setlistener("/controls/engines/engine[1]/man-start", func {
var start_two_mancheck = func {
if (getprop("/controls/engines/engine[1]/man-start") == 1) {
if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[1]/cutoff-switch") == 1)) {
if (getprop("/controls/engines/engine-start-switch") == 2 and (pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 1)) {
setprop("/systems/pneumatics/valves/starter-valve-2", 1);
settimer(start_two_mancheck_b, 0.5);
}
} else {
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
setprop("/engines/engine[1]/state", 0);
setprop("/controls/engines/engine[1]/starter", 0);
@ -188,14 +179,14 @@ var start_two_mancheck_b = func {
}
var start_two_check = func {
if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
if (getprop("/controls/engines/engine-start-switch") == 2 and pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) {
setprop("/systems/pneumatics/valves/starter-valve-2", 1);
settimer(start_two_check_b, 0.5);
}
}
var start_two_check_b = func {
if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine2.getValue() >= 25 and !getprop("/controls/engines/engine[1]/cutoff-switch")) {
if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine2.getValue() >= 25 and !pts.Controls.Engines.Engine.cutoffSw[1].getValue()) {
auto_start_two();
}
}
@ -208,7 +199,7 @@ var auto_start_one = func {
}
var eng_one_auto_start = maketimer(0.5, func {
if (getprop("/engines/engine[0]/n2-actual") >= 22) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 22) {
eng_one_auto_start.stop();
setprop("/engines/engine[0]/state", 2);
setprop("/controls/engines/engine[0]/cutoff", 0);
@ -228,7 +219,7 @@ var eng_one_auto_start = maketimer(0.5, func {
});
var eng_one_man_start = maketimer(0.5, func {
if (getprop("/engines/engine[0]/n2-actual") >= 16.7) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 16.7) {
eng_one_man_start.stop();
setprop("/engines/engine[0]/state", 2);
setprop("/controls/engines/engine[0]/cutoff", 0);
@ -248,7 +239,7 @@ var eng_one_egt_check = maketimer(0.5, func {
});
var eng_one_n2_check = maketimer(0.5, func {
if (getprop("/engines/engine[0]/n2-actual") >= 43.0) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 43.0) {
if (getprop("/controls/engines/engine[0]/igniter-a") != 0) {
setprop("/controls/engines/engine[0]/igniter-a", 0);
}
@ -256,7 +247,7 @@ var eng_one_n2_check = maketimer(0.5, func {
setprop("/controls/engines/engine[0]/igniter-b", 0);
}
}
if (getprop("/engines/engine[0]/n2-actual") >= 57.0) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 57.0) {
eng_one_n2_check.stop();
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
setprop("/engines/engine[0]/state", 3);
@ -271,7 +262,7 @@ var auto_start_two = func {
}
var eng_two_auto_start = maketimer(0.5, func {
if (getprop("/engines/engine[1]/n2-actual") >= 22) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 22) {
eng_two_auto_start.stop();
setprop("/engines/engine[1]/state", 2);
setprop("/controls/engines/engine[1]/cutoff", 0);
@ -291,7 +282,7 @@ var eng_two_auto_start = maketimer(0.5, func {
});
var eng_two_man_start = maketimer(0.5, func {
if (getprop("/engines/engine[1]/n2-actual") >= 16.7) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 16.7) {
eng_two_man_start.stop();
setprop("/engines/engine[1]/state", 2);
setprop("/controls/engines/engine[1]/cutoff", 0);
@ -311,7 +302,7 @@ var eng_two_egt_check = maketimer(0.5, func {
});
var eng_two_n2_check = maketimer(0.5, func {
if (getprop("/engines/engine[1]/n2-actual") >= 50.0) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 50.0) {
if (getprop("/controls/engines/engine[1]/igniter-a") != 0) {
setprop("/controls/engines/engine[1]/igniter-a", 0);
}
@ -319,7 +310,7 @@ var eng_two_n2_check = maketimer(0.5, func {
setprop("/controls/engines/engine[1]/igniter-b", 0);
}
}
if (getprop("/engines/engine[1]/n2-actual") >= 57.0) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 57.0) {
eng_two_n2_check.stop();
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
setprop("/engines/engine[1]/state", 3);
@ -328,23 +319,23 @@ var eng_two_n2_check = maketimer(0.5, func {
# Various Other Stuff
setlistener("/controls/engines/engine-start-switch", func {
if (getprop("/engines/engine[0]/state") == 0) {
if (pts.Engines.Engine.state[0].getValue() == 0) {
start_one_check();
start_one_mancheck();
}
if (getprop("/engines/engine[1]/state") == 0) {
if (pts.Engines.Engine.state[1].getValue() == 0) {
start_two_check();
start_two_mancheck();
}
if ((getprop("/controls/engines/engine-start-switch") == 0) or (getprop("/controls/engines/engine-start-switch") == 1)) {
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
setprop("/controls/engines/engine[0]/starter", 0);
setprop("/controls/engines/engine[0]/cutoff", 1);
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
setprop("/engines/engine[0]/state", 0);
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
}
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
setprop("/controls/engines/engine[1]/starter", 0);
setprop("/controls/engines/engine[1]/cutoff", 1);
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
@ -356,7 +347,7 @@ setlistener("/controls/engines/engine-start-switch", func {
setlistener("/systems/pneumatics/psi/engine-1-psi", func {
if (systems.PNEU.Psi.engine1.getValue() < 24.5) {
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
setprop("/controls/engines/engine[0]/starter", 0);
setprop("/controls/engines/engine[0]/cutoff", 1);
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
@ -368,7 +359,7 @@ setlistener("/systems/pneumatics/psi/engine-1-psi", func {
setlistener("/systems/pneumatics/psi/engine-2-psi", func {
if (systems.PNEU.Psi.engine2.getValue() < 24.5) {
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
setprop("/controls/engines/engine[1]/starter", 0);
setprop("/controls/engines/engine[1]/cutoff", 1);
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
@ -379,10 +370,10 @@ setlistener("/systems/pneumatics/psi/engine-2-psi", func {
}, 0, 0);
setlistener("/engines/engine[0]/state", func() {
setprop("/sim/sound/shutdown[0]", getprop("/engines/engine[0]/state"));
setprop("/sim/sound/shutdown[0]", pts.Engines.Engine.state[0].getValue());
}, 0, 0);
setlistener("/engines/engine[1]/state", func() {
setprop("/sim/sound/shutdown[1]", getprop("/engines/engine[1]/state"));
setprop("/sim/sound/shutdown[1]", pts.Engines.Engine.state[1].getValue());
}, 0, 0);

View file

@ -3,7 +3,7 @@
# Copyright (c) 2020 Josh Davidson (Octal450)
if (getprop("/options/eng") == "IAE") {
if (pts.Options.eng.getValue() == "IAE") {
io.include("engines-iae.nas");
} else {
io.include("engines-cfm.nas");
@ -50,87 +50,84 @@ var doTOGAThrust = func {
# Reverse Thrust System
var toggleFastRevThrust = func {
var state1 = getprop("/systems/thrust/state1");
var state2 = getprop("/systems/thrust/state2");
if (state1 == "IDLE" and state2 == "IDLE" and getprop("/controls/engines/engine[0]/reverser") == "0" and getprop("/controls/engines/engine[1]/reverser") == "0" and getprop("/gear/gear[1]/wow") == 1 and getprop("/gear/gear[2]/wow") == 1) {
if (getprop("/sim/input/selected/engine[0]") == 1) {
if (pts.Systems.Thrust.state[0].getValue() == "IDLE" and pts.Systems.Thrust.state[1].getValue() == "IDLE" and pts.Controls.Engines.Engine.reverser[0].getValue() == 0 and pts.Controls.Engines.Engine.reverser[1].getValue() == 0 and pts.Gear.wow[1].getValue() == 1 and pts.Gear.wow[2].getValue() == 1) {
if (pts.Sim.Input.Selected.engine[0].getBoolValue()) {
interpolate("/engines/engine[0]/reverser-pos-norm", 1, 1.4);
setprop("/controls/engines/engine[0]/reverser", 1);
setprop("/controls/engines/engine[0]/throttle-rev", 0.65);
setprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 3.14);
pts.Controls.Engines.Engine.reverser[0].setValue(1);
pts.Controls.Engines.Engine.throttleRev[0].setValue(0.65);
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[0].setValue(3.14);
}
if (getprop("/sim/input/selected/engine[1]") == 1) {
if (pts.Sim.Input.Selected.engine[1].getBoolValue()) {
interpolate("/engines/engine[1]/reverser-pos-norm", 1, 1.4);
setprop("/controls/engines/engine[1]/reverser", 1);
setprop("/controls/engines/engine[1]/throttle-rev", 0.65);
setprop("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 3.14);
pts.Controls.Engines.Engine.reverser[1].setValue(1);
pts.Controls.Engines.Engine.throttleRev[1].setValue(0.65);
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[1].setValue(3.14);
}
} else if ((getprop("/controls/engines/engine[0]/reverser") == "1") or (getprop("/controls/engines/engine[1]/reverser") == "1")) {
setprop("/controls/engines/engine[0]/throttle-rev", 0);
setprop("/controls/engines/engine[1]/throttle-rev", 0);
} else if (pts.Controls.Engines.Engine.reverser[0].getValue() == 1 or pts.Controls.Engines.Engine.reverser[1].getValue() == 1) {
interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
setprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 0);
setprop("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 0);
setprop("/controls/engines/engine[0]/reverser", 0);
setprop("/controls/engines/engine[1]/reverser", 0);
pts.Controls.Engines.Engine.throttleRev[0].setValue(0);
pts.Controls.Engines.Engine.throttleRev[1].setValue(0);
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[0].setValue(0);
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[1].setValue(0);
pts.Controls.Engines.Engine.reverser[0].setValue(0);
pts.Controls.Engines.Engine.reverser[1].setValue(0);
}
}
var doRevThrust = func {
if (getprop("/gear/gear[1]/wow") != 1 and getprop("/gear/gear[2]/wow") != 1) {
if (pts.Gear.wow[1].getValue() != 1 and pts.Gear.wow[2].getValue() != 1) {
# Can't select reverse if not on the ground
return;
}
if (getprop("/sim/input/selected/engine[0]") == 1 and getprop("/controls/engines/engine[0]/reverser") == "1") {
var pos = getprop("/controls/engines/engine[0]/throttle-rev");
if (pts.Sim.Input.Selected.engine[0].getBoolValue() and pts.Controls.Engines.Engine.reverser[0].getValue() == 1) {
var pos = pts.Controls.Engines.Engine.throttleRev[0].getValue();
if (pos < 0.649) {
setprop("/controls/engines/engine[0]/throttle-rev", pos + 0.15);
pts.Controls.Engines.Engine.throttleRev[0].setValue(pos + 0.15);
}
}
if (getprop("/sim/input/selected/engine[1]") == 1 and getprop("/controls/engines/engine[1]/reverser") == "1") {
var pos = getprop("/controls/engines/engine[1]/throttle-rev");
if (pts.Sim.Input.Selected.engine[1].getBoolValue() and pts.Controls.Engines.Engine.reverser[1].getValue() == 1) {
var pos = pts.Controls.Engines.Engine.throttleRev[1].getValue();
if (pos < 0.649) {
setprop("/controls/engines/engine[1]/throttle-rev", pos + 0.15);
pts.Controls.Engines.Engine.throttleRev[1].setValue(pos + 0.15);
}
}
var state1 = getprop("/systems/thrust/state1");
var state2 = getprop("/systems/thrust/state2");
if (getprop("/sim/input/selected/engine[0]") == 1 and state1 == "IDLE" and getprop("/controls/engines/engine[0]/reverser") == "0") {
setprop("/controls/engines/engine[0]/throttle-rev", 0.05);
if (pts.Sim.Input.Selected.engine[0].getBoolValue() and pts.Systems.Thrust.state[0].getValue() == "IDLE" and pts.Controls.Engines.Engine.reverser[0].getValue() == 0) {
interpolate("/engines/engine[0]/reverser-pos-norm", 1, 1.4);
setprop("/controls/engines/engine[0]/reverser", 1);
setprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 3.14);
pts.Controls.Engines.Engine.throttleRev[0].setValue(0.05);
pts.Controls.Engines.Engine.reverser[0].setValue(1);
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[0].setValue(3.14);
}
if (getprop("/sim/input/selected/engine[1]") == 1 and state2 == "IDLE" and getprop("/controls/engines/engine[1]/reverser") == "0") {
setprop("/controls/engines/engine[1]/throttle-rev", 0.05);
if (pts.Sim.Input.Selected.engine[1].getBoolValue() and pts.Systems.Thrust.state[1].getValue() == "IDLE" and pts.Controls.Engines.Engine.reverser[1].getValue() == 0) {
interpolate("/engines/engine[1]/reverser-pos-norm", 1, 1.4);
setprop("/controls/engines/engine[1]/reverser", 1);
setprop("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 3.14);
pts.Controls.Engines.Engine.throttleRev[1].setValue(0.05);
pts.Controls.Engines.Engine.reverser[1].setValue(1);
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[1].setValue(3.14);
}
}
var unRevThrust = func {
if (getprop("/sim/input/selected/engine[0]") == 1 and getprop("/controls/engines/engine[0]/reverser") == "1") {
var pos = getprop("/controls/engines/engine[0]/throttle-rev");
if (pts.Sim.Input.Selected.engine[0].getBoolValue() and pts.Controls.Engines.Engine.reverser[0].getValue() == 1) {
var pos = pts.Controls.Engines.Engine.throttleRev[0].getValue();
if (pos > 0.051) {
setprop("/controls/engines/engine[0]/throttle-rev", pos - 0.15);
pts.Controls.Engines.Engine.throttleRev[0].setValue(pos - 0.15);
} else {
setprop("/controls/engines/engine[0]/throttle-rev", 0);
interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
setprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 0);
setprop("/controls/engines/engine[0]/reverser", 0);
pts.Controls.Engines.Engine.throttleRev[0].setValue(0);
pts.Controls.Engines.Engine.reverser[0].setValue(0);
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[0].setValue(0);
}
}
if (getprop("/sim/input/selected/engine[1]") == 1 and getprop("/controls/engines/engine[1]/reverser") == "1") {
var pos = getprop("/controls/engines/engine[1]/throttle-rev");
if (pts.Sim.Input.Selected.engine[1].getBoolValue() and pts.Controls.Engines.Engine.reverser[1].getValue() == 1) {
var pos = pts.Controls.Engines.Engine.throttleRev[1].getValue();
if (pos > 0.051) {
setprop("/controls/engines/engine[1]/throttle-rev", pos - 0.15);
pts.Controls.Engines.Engine.throttleRev[1].setValue(pos - 0.15);
} else {
setprop("/controls/engines/engine[1]/throttle-rev", 0);
interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
setprop("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 0);
setprop("/controls/engines/engine[1]/reverser", 0);
pts.Controls.Engines.Engine.throttleRev[1].setValue(0);
pts.Controls.Engines.Engine.reverser[1].setValue(0);
pts.Fdm.JSBsim.Propulsion.Engine.reverserAngle[1].setValue(0);
}
}
}

View file

@ -17,15 +17,6 @@ var egt_lightdn_time = 10;
var shutdown_time = 20;
var egt_shutdown_time = 20;
setprop("/controls/engines/engine[0]/reverser", 0);
setprop("/controls/engines/engine[1]/reverser", 0);
setprop("/controls/engines/engine[0]/igniter-a", 0);
setprop("/controls/engines/engine[1]/igniter-a", 0);
setprop("/controls/engines/engine[0]/igniter-b", 0);
setprop("/controls/engines/engine[1]/igniter-b", 0);
setprop("/controls/engines/engine[0]/last-igniter", "B");
setprop("/controls/engines/engine[1]/last-igniter", "B");
var eng_init = func {
setprop("/controls/engines/engine[0]/man-start", 0);
setprop("/controls/engines/engine[1]/man-start", 0);
@ -34,7 +25,7 @@ var eng_init = func {
# Trigger Startups and Stops
setlistener("/controls/engines/engine[0]/cutoff-switch", func {
if (getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
if (pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) {
if (getprop("/systems/acconfig/autoconfig-running") == 1) {
fast_start_one();
} else {
@ -44,7 +35,7 @@ setlistener("/controls/engines/engine[0]/cutoff-switch", func {
eng_one_man_start.start();
}
}
} else if (getprop("/controls/engines/engine[0]/cutoff-switch") == 1) {
} else if (pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 1) {
cutoff_one();
}
});
@ -84,12 +75,12 @@ setlistener("/controls/engines/engine[0]/man-start", func {
var start_one_mancheck = func {
if (getprop("/controls/engines/engine[0]/man-start") == 1) {
if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[0]/cutoff-switch") == 1)) {
if (getprop("/controls/engines/engine-start-switch") == 2 and (pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 1)) {
setprop("/systems/pneumatics/valves/starter-valve-1", 1);
settimer(start_one_mancheck_b, 0.5);
}
} else {
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
setprop("/engines/engine[0]/state", 0);
setprop("/controls/engines/engine[0]/starter", 0);
@ -105,20 +96,20 @@ var start_one_mancheck_b = func {
}
var start_one_check = func {
if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
if (getprop("/controls/engines/engine-start-switch") == 2 and pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) {
setprop("/systems/pneumatics/valves/starter-valve-1", 1);
settimer(start_one_check_b, 0.5);
}
}
var start_one_check_b = func {
if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine1.getValue() and !getprop("/controls/engines/engine[0]/cutoff-switch")) {
if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine1.getValue() and !pts.Controls.Engines.Engine.cutoffSw[0].getValue()) {
auto_start_one();
}
}
setlistener("/controls/engines/engine[1]/cutoff-switch", func {
if (getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
if (pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) {
if (getprop("/systems/acconfig/autoconfig-running") == 1) {
fast_start_two();
} else {
@ -128,7 +119,7 @@ setlistener("/controls/engines/engine[1]/cutoff-switch", func {
eng_two_man_start.start();
}
}
} else if (getprop("/controls/engines/engine[1]/cutoff-switch") == 1) {
} else if (pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 1) {
cutoff_two();
}
});
@ -167,12 +158,12 @@ setlistener("/controls/engines/engine[1]/man-start", func {
var start_two_mancheck = func {
if (getprop("/controls/engines/engine[1]/man-start") == 1) {
if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[1]/cutoff-switch") == 1)) {
if (getprop("/controls/engines/engine-start-switch") == 2 and (pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 1)) {
setprop("/systems/pneumatics/valves/starter-valve-2", 1);
settimer(start_two_mancheck_b, 0.5);
}
} else {
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
setprop("/engines/engine[1]/state", 0);
setprop("/controls/engines/engine[1]/starter", 0);
@ -188,14 +179,14 @@ var start_two_mancheck_b = func {
}
var start_two_check = func {
if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
if (getprop("/controls/engines/engine-start-switch") == 2 and pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) {
setprop("/systems/pneumatics/valves/starter-valve-2", 1);
settimer(start_two_check_b, 0.5);
}
}
var start_two_check_b = func {
if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine2.getValue() >= 25 and !getprop("/controls/engines/engine[1]/cutoff-switch")) {
if (getprop("/controls/engines/engine-start-switch") == 2 and systems.PNEU.Psi.engine2.getValue() >= 25 and !pts.Controls.Engines.Engine.cutoffSw[1].getValue()) {
auto_start_two();
}
}
@ -208,7 +199,7 @@ var auto_start_one = func {
}
var eng_one_auto_start = maketimer(0.5, func {
if (getprop("/engines/engine[0]/n1-actual") >= 4.7) {
if (pts.Engines.Engine.n1Actual[0].getValue() >= 4.7) {
eng_one_auto_start.stop();
setprop("/engines/engine[0]/state", 2);
setprop("/controls/engines/engine[0]/cutoff", 0);
@ -228,7 +219,7 @@ var eng_one_auto_start = maketimer(0.5, func {
});
var eng_one_man_start = maketimer(0.5, func {
if (getprop("/engines/engine[0]/n2-actual") >= 16.7) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 16.7) {
eng_one_man_start.stop();
setprop("/engines/engine[0]/state", 2);
setprop("/controls/engines/engine[0]/cutoff", 0);
@ -248,7 +239,7 @@ var eng_one_egt_check = maketimer(0.5, func {
});
var eng_one_n2_check = maketimer(0.5, func {
if (getprop("/engines/engine[0]/n2-actual") >= 43.0) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 43.0) {
if (getprop("/controls/engines/engine[0]/igniter-a") != 0) {
setprop("/controls/engines/engine[0]/igniter-a", 0);
}
@ -256,7 +247,7 @@ var eng_one_n2_check = maketimer(0.5, func {
setprop("/controls/engines/engine[0]/igniter-b", 0);
}
}
if (getprop("/engines/engine[0]/n2-actual") >= 57.0) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 57.0) {
eng_one_n2_check.stop();
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
setprop("/engines/engine[0]/state", 3);
@ -271,7 +262,7 @@ var auto_start_two = func {
}
var eng_two_auto_start = maketimer(0.5, func {
if (getprop("/engines/engine[1]/n1-actual") >= 4.7) {
if (pts.Engines.Engine.n1Actual[1].getValue() >= 4.7) {
eng_two_auto_start.stop();
setprop("/engines/engine[1]/state", 2);
setprop("/controls/engines/engine[1]/cutoff", 0);
@ -291,7 +282,7 @@ var eng_two_auto_start = maketimer(0.5, func {
});
var eng_two_man_start = maketimer(0.5, func {
if (getprop("/engines/engine[1]/n2-actual") >= 16.7) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 16.7) {
eng_two_man_start.stop();
setprop("/engines/engine[1]/state", 2);
setprop("/controls/engines/engine[1]/cutoff", 0);
@ -311,7 +302,7 @@ var eng_two_egt_check = maketimer(0.5, func {
});
var eng_two_n2_check = maketimer(0.5, func {
if (getprop("/engines/engine[1]/n2-actual") >= 43.0) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 43.0) {
if (getprop("/controls/engines/engine[1]/igniter-a") != 0) {
setprop("/controls/engines/engine[1]/igniter-a", 0);
}
@ -319,7 +310,7 @@ var eng_two_n2_check = maketimer(0.5, func {
setprop("/controls/engines/engine[1]/igniter-b", 0);
}
}
if (getprop("/engines/engine[1]/n2-actual") >= 57.0) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 57.0) {
eng_two_n2_check.stop();
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
setprop("/engines/engine[1]/state", 3);
@ -328,23 +319,23 @@ var eng_two_n2_check = maketimer(0.5, func {
# Various Other Stuff
setlistener("/controls/engines/engine-start-switch", func {
if (getprop("/engines/engine[0]/state") == 0) {
if (pts.Engines.Engine.state[0].getValue() == 0) {
start_one_check();
start_one_mancheck();
}
if (getprop("/engines/engine[1]/state") == 0) {
if (pts.Engines.Engine.state[1].getValue() == 0) {
start_two_check();
start_two_mancheck();
}
if ((getprop("/controls/engines/engine-start-switch") == 0) or (getprop("/controls/engines/engine-start-switch") == 1)) {
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
setprop("/controls/engines/engine[0]/starter", 0);
setprop("/controls/engines/engine[0]/cutoff", 1);
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
setprop("/engines/engine[0]/state", 0);
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
}
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
setprop("/controls/engines/engine[1]/starter", 0);
setprop("/controls/engines/engine[1]/cutoff", 1);
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
@ -356,7 +347,7 @@ setlistener("/controls/engines/engine-start-switch", func {
setlistener("/systems/pneumatics/psi/engine-1-psi", func {
if (systems.PNEU.Psi.engine1.getValue() < 24.5) {
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
if (pts.Engines.Engine.state[0].getValue() == 1 or pts.Engines.Engine.state[0].getValue() == 2) {
setprop("/controls/engines/engine[0]/starter", 0);
setprop("/controls/engines/engine[0]/cutoff", 1);
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
@ -368,7 +359,7 @@ setlistener("/systems/pneumatics/psi/engine-1-psi", func {
setlistener("/systems/pneumatics/psi/engine-2-psi", func {
if (systems.PNEU.Psi.engine2.getValue() < 24.5) {
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
if (pts.Engines.Engine.state[1].getValue() == 1 or pts.Engines.Engine.state[1].getValue() == 2) {
setprop("/controls/engines/engine[1]/starter", 0);
setprop("/controls/engines/engine[1]/cutoff", 1);
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
@ -379,10 +370,10 @@ setlistener("/systems/pneumatics/psi/engine-2-psi", func {
}, 0, 0);
setlistener("/engines/engine[0]/state", func() {
setprop("/sim/sound/shutdown[0]", getprop("/engines/engine[0]/state"));
setprop("/sim/sound/shutdown[0]", pts.Engines.Engine.state[0].getValue());
}, 0, 0);
setlistener("/engines/engine[1]/state", func() {
setprop("/sim/sound/shutdown[1]", getprop("/engines/engine[1]/state"));
setprop("/sim/sound/shutdown[1]", pts.Engines.Engine.state[1].getValue());
}, 0, 0);

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