This commit is contained in:
Jonathan Redpath 2017-06-14 08:55:18 +01:00
commit 1b020a66b3
24 changed files with 1900 additions and 868 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>
<PropertyList include="Aircraft/Generic/Human/Include/walker-include.xml">
<sim>
@ -784,6 +784,7 @@
</fbw>
<fmgc>
<file>Aircraft/A320Family/Nasal/FMGC.nas</file>
<file>Aircraft/A320Family/Nasal/FMGC-b.nas</file>
</fmgc>
<mcdu1>
<file>Aircraft/A320Family/Nasal/MCDU/MCDU1.nas</file>

View file

@ -751,6 +751,18 @@
<object-name>alt-sel</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>/it-autoflight/input/vert</property>
<value>8</value>
</binding>
<binding>
<command>nasal</command>
<script>setprop("/sim/sounde/btn1", 1);</script>
</binding>
</action>
<action>
<button>1</button>
<repeatable>false</repeatable>
<binding>

View file

@ -95,6 +95,51 @@
</font-resolution>
</text>
<text>
<name>actmode3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
<z-m>0.0705</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">SELECTED</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.0040</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>actmode2</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>1</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>actmode3</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>0</value>
</equals>
</condition>
</animation>
<text>
<name>timedest</name>
<offsets>
@ -457,6 +502,7 @@
<object-name>previous</object-name>
<object-name>phase2</object-name>
<object-name>timedest</object-name>
<object-name>presel</object-name>
<diffuse>
<red>1</red>
<green>1</green>
@ -484,6 +530,7 @@
<type>material</type>
<object-name>efob2</object-name>
<object-name>actmode2</object-name>
<object-name>actmode3</object-name>
<object-name>timedest2</object-name>
<diffuse>
<red>0.2</red>

View file

@ -48,7 +48,7 @@
</text>
<text>
<name>actmode3</name>
<name>actmode</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -72,7 +72,7 @@
</text>
<text>
<name>actmode4</name>
<name>actmode2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -95,6 +95,51 @@
</font-resolution>
</text>
<text>
<name>actmode3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
<z-m>0.0705</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">SELECTED</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.0040</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>actmode2</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>1</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>actmode3</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>0</value>
</equals>
</condition>
</animation>
<text>
<name>timedest3</name>
<offsets>
@ -192,7 +237,7 @@
</text>
<text>
<name>ci5</name>
<name>ci</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -216,7 +261,7 @@
</text>
<text>
<name>ci6</name>
<name>ci2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -239,7 +284,7 @@
</font-resolution>
</text>
<text>
<name>ci7</name>
<name>ci3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -264,14 +309,14 @@
<animation>
<type>select</type>
<object-name>ci6</object-name>
<object-name>ci2</object-name>
<condition>
<not><property>/FMGC/internal/cost-index-set</property></not>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>ci7</object-name>
<object-name>ci3</object-name>
<condition>
<property>/FMGC/internal/cost-index-set</property>
</condition>
@ -520,9 +565,9 @@
<animation>
<type>material</type>
<object-name>page</object-name>
<object-name>actmode3</object-name>
<object-name>actmode</object-name>
<object-name>managed2</object-name>
<object-name>ci5</object-name>
<object-name>ci</object-name>
<object-name>efob3</object-name>
<object-name>next2</object-name>
<object-name>phase3</object-name>
@ -558,7 +603,8 @@
<animation>
<type>material</type>
<object-name>efob4</object-name>
<object-name>actmode4</object-name>
<object-name>actmode2</object-name>
<object-name>actmode3</object-name>
<object-name>timedest4</object-name>
<diffuse>
<red>0.2</red>
@ -586,8 +632,8 @@
<animation>
<type>material</type>
<object-name>presel4</object-name>
<object-name>ci6</object-name>
<object-name>ci7</object-name>
<object-name>ci2</object-name>
<object-name>ci3</object-name>
<object-name>descabinrate</object-name>
<diffuse>
<red>0</red>

View file

@ -95,6 +95,51 @@
</font-resolution>
</text>
<text>
<name>actmode3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
<z-m>0.0705</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">SELECTED</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.0040</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>actmode2</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>1</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>actmode3</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>0</value>
</equals>
</condition>
</animation>
<text>
<name>timedest</name>
<offsets>
@ -457,6 +502,7 @@
<object-name>previous</object-name>
<object-name>phase2</object-name>
<object-name>timedest</object-name>
<object-name>presel</object-name>
<diffuse>
<red>1</red>
<green>1</green>
@ -484,6 +530,7 @@
<type>material</type>
<object-name>efob2</object-name>
<object-name>actmode2</object-name>
<object-name>actmode3</object-name>
<object-name>timedest2</object-name>
<diffuse>
<red>0.2</red>

View file

@ -48,7 +48,7 @@
</text>
<text>
<name>actmode3</name>
<name>actmode</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -72,7 +72,7 @@
</text>
<text>
<name>actmode4</name>
<name>actmode2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -95,6 +95,51 @@
</font-resolution>
</text>
<text>
<name>actmode3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
<z-m>0.0705</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">SELECTED</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.0040</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>actmode2</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>1</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>actmode3</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>0</value>
</equals>
</condition>
</animation>
<text>
<name>timedest3</name>
<offsets>
@ -192,7 +237,7 @@
</text>
<text>
<name>ci5</name>
<name>ci</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -216,7 +261,7 @@
</text>
<text>
<name>ci6</name>
<name>ci2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -239,7 +284,7 @@
</font-resolution>
</text>
<text>
<name>ci7</name>
<name>ci3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -264,14 +309,14 @@
<animation>
<type>select</type>
<object-name>ci6</object-name>
<object-name>ci2</object-name>
<condition>
<not><property>/FMGC/internal/cost-index-set</property></not>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>ci7</object-name>
<object-name>ci3</object-name>
<condition>
<property>/FMGC/internal/cost-index-set</property>
</condition>
@ -520,9 +565,9 @@
<animation>
<type>material</type>
<object-name>page</object-name>
<object-name>actmode3</object-name>
<object-name>actmode</object-name>
<object-name>managed2</object-name>
<object-name>ci5</object-name>
<object-name>ci</object-name>
<object-name>efob3</object-name>
<object-name>next2</object-name>
<object-name>phase3</object-name>
@ -558,7 +603,8 @@
<animation>
<type>material</type>
<object-name>efob4</object-name>
<object-name>actmode4</object-name>
<object-name>actmode2</object-name>
<object-name>actmode3</object-name>
<object-name>timedest4</object-name>
<diffuse>
<red>0.2</red>
@ -586,8 +632,8 @@
<animation>
<type>material</type>
<object-name>presel4</object-name>
<object-name>ci6</object-name>
<object-name>ci7</object-name>
<object-name>ci2</object-name>
<object-name>ci3</object-name>
<object-name>descabinrate</object-name>
<diffuse>
<red>0</red>

View file

@ -2733,19 +2733,73 @@
</font-resolution>
</text>
<text>
<name>mng-alt</name>
<offsets>
<x-m>0.0010</x-m>
<y-m>0.0553</y-m>
<z-m>0.0462</z-m>
</offsets>
<alignment>right-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/it-autoflight/internal/alt</property>
<truncate type="bool">false</truncate>
<font type="string">helvetica_bold.txf</font>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.006</character-size>
<font-resolution>
<width type="int">32</width>
<height type="int">32</height>
</font-resolution>
</text>
<text>
<name>mng-alt-lower</name>
<offsets>
<x-m>0.0010</x-m>
<y-m>0.0553</y-m>
<z-m>-0.0462</z-m>
</offsets>
<alignment>right-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/it-autoflight/internal/alt</property>
<truncate type="bool">false</truncate>
<font type="string">helvetica_bold.txf</font>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.006</character-size>
<font-resolution>
<width type="int">32</width>
<height type="int">32</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>man-alt</object-name>
<condition>
<greater-than-equals>
<expression>
<dif>
<property>/it-autoflight/internal/alt</property>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
</dif>
</expression>
<value>4300</value>
</greater-than-equals>
<and>
<greater-than-equals>
<expression>
<dif>
<property>/it-autoflight/internal/alt</property>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
</dif>
</expression>
<value>4300</value>
</greater-than-equals>
<not-equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</not-equals>
</and>
</condition>
</animation>
@ -2753,15 +2807,65 @@
<type>select</type>
<object-name>man-alt-lower</object-name>
<condition>
<less-than-equals>
<expression>
<dif>
<property>/it-autoflight/internal/alt</property>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
</dif>
</expression>
<value>-4300</value>
</less-than-equals>
<and>
<less-than-equals>
<expression>
<dif>
<property>/it-autoflight/internal/alt</property>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
</dif>
</expression>
<value>-4300</value>
</less-than-equals>
<not-equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</not-equals>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>mng-alt</object-name>
<condition>
<and>
<greater-than-equals>
<expression>
<dif>
<property>/it-autoflight/internal/alt</property>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
</dif>
</expression>
<value>4300</value>
</greater-than-equals>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>mng-alt-lower</object-name>
<condition>
<and>
<less-than-equals>
<expression>
<dif>
<property>/it-autoflight/internal/alt</property>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
</dif>
</expression>
<value>-4300</value>
</less-than-equals>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
</and>
</condition>
</animation>
@ -2790,6 +2894,53 @@
</transform>
</animation>
<animation>
<type>texmultiple</type>
<object-name>target-alt-mng</object-name>
<transform>
<subtype>textranslate</subtype>
<property>/it-autoflight/internal/mng-alt</property>
<factor>0.000019141</factor>
<axis>
<y>-1</y>
<x>0</x>
<z>0</z>
</axis>
</transform>
<transform>
<subtype>textranslate</subtype>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
<factor>0.000019141</factor>
<axis>
<y>1</y>
<x>0</x>
<z>0</z>
</axis>
</transform>
</animation>
<animation>
<type>select</type>
<object-name>target-alt-sel</object-name>
<condition>
<not-equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</not-equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>target-alt-mng</object-name>
<condition>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
</condition>
</animation>
<!-- VS Numbers -->
<text>
@ -3135,6 +3286,8 @@
<object-name>mng-spd-lower</object-name>
<object-name>mng-mach</object-name>
<object-name>mng-mach-lower</object-name>
<object-name>mng-alt</object-name>
<object-name>mng-alt-lower</object-name>
<diffuse>
<red>1</red>
<green>0</green>

View file

@ -2733,19 +2733,73 @@
</font-resolution>
</text>
<text>
<name>mng-alt</name>
<offsets>
<x-m>0.0010</x-m>
<y-m>0.0553</y-m>
<z-m>0.0462</z-m>
</offsets>
<alignment>right-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/it-autoflight/internal/alt</property>
<truncate type="bool">false</truncate>
<font type="string">helvetica_bold.txf</font>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.006</character-size>
<font-resolution>
<width type="int">32</width>
<height type="int">32</height>
</font-resolution>
</text>
<text>
<name>mng-alt-lower</name>
<offsets>
<x-m>0.0010</x-m>
<y-m>0.0553</y-m>
<z-m>-0.0462</z-m>
</offsets>
<alignment>right-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/it-autoflight/internal/alt</property>
<truncate type="bool">false</truncate>
<font type="string">helvetica_bold.txf</font>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.006</character-size>
<font-resolution>
<width type="int">32</width>
<height type="int">32</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>man-alt</object-name>
<condition>
<greater-than-equals>
<expression>
<dif>
<property>/it-autoflight/internal/alt</property>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
</dif>
</expression>
<value>4300</value>
</greater-than-equals>
<and>
<greater-than-equals>
<expression>
<dif>
<property>/it-autoflight/internal/alt</property>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
</dif>
</expression>
<value>4300</value>
</greater-than-equals>
<not-equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</not-equals>
</and>
</condition>
</animation>
@ -2753,15 +2807,65 @@
<type>select</type>
<object-name>man-alt-lower</object-name>
<condition>
<less-than-equals>
<expression>
<dif>
<property>/it-autoflight/internal/alt</property>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
</dif>
</expression>
<value>-4300</value>
</less-than-equals>
<and>
<less-than-equals>
<expression>
<dif>
<property>/it-autoflight/internal/alt</property>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
</dif>
</expression>
<value>-4300</value>
</less-than-equals>
<not-equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</not-equals>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>mng-alt</object-name>
<condition>
<and>
<greater-than-equals>
<expression>
<dif>
<property>/it-autoflight/internal/alt</property>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
</dif>
</expression>
<value>4300</value>
</greater-than-equals>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>mng-alt-lower</object-name>
<condition>
<and>
<less-than-equals>
<expression>
<dif>
<property>/it-autoflight/internal/alt</property>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
</dif>
</expression>
<value>-4300</value>
</less-than-equals>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
</and>
</condition>
</animation>
@ -2790,6 +2894,53 @@
</transform>
</animation>
<animation>
<type>texmultiple</type>
<object-name>target-alt-mng</object-name>
<transform>
<subtype>textranslate</subtype>
<property>/it-autoflight/internal/mng-alt</property>
<factor>0.000019141</factor>
<axis>
<y>-1</y>
<x>0</x>
<z>0</z>
</axis>
</transform>
<transform>
<subtype>textranslate</subtype>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
<factor>0.000019141</factor>
<axis>
<y>1</y>
<x>0</x>
<z>0</z>
</axis>
</transform>
</animation>
<animation>
<type>select</type>
<object-name>target-alt-sel</object-name>
<condition>
<not-equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</not-equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>target-alt-mng</object-name>
<condition>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
</condition>
</animation>
<!-- VS Numbers -->
<text>
@ -3135,6 +3286,8 @@
<object-name>mng-spd-lower</object-name>
<object-name>mng-mach</object-name>
<object-name>mng-mach-lower</object-name>
<object-name>mng-alt</object-name>
<object-name>mng-alt-lower</object-name>
<diffuse>
<red>1</red>
<green>0</green>

View file

@ -2,7 +2,26 @@ AC3Db
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0 0 0 emis 0.658824 0.670588 0.67451 spec 0 0 0 shi 128 trans 0
MATERIAL "white" rgb 1 1 1 amb 1 1 1 emis 0.798 0.798 0.798 spec 0 0 0 shi 0 trans 0
OBJECT world
kids 43
kids 44
OBJECT poly
name "target-alt-mng"
loc 0.000960576 -0.000264099 -0.0431903
texture "trgt-alt-mng.png"
crease 45.000000
numvert 4
0 0.0428304 -0.00623311
0 0.0428304 0.00772078
0 -0.0428304 0.00772078
0 -0.0428304 -0.00623311
numsurf 1
SURF 0x30
mat 0
refs 4
0 0.990386 0.217208
1 0.022378 0.217208
2 0.0223766 0.0507198
3 0.990386 0.0507198
kids 0
OBJECT poly
name "ap-mode-box"
loc 0.000380651 0.0723146 -0.0618702

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 KiB

View file

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>
<sim>
<model>
<livery>
<name>Lufthansa</name>
<texture>Liveries/A320/CFM-NEO/DLH.png</texture>
</livery>
</model>
</sim>
</PropertyList>

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 KiB

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>
<sim>
<model>
<livery>
<name>American Airlines</name>
<texture>Liveries/A321/IAE/AAL2.png</texture>
</livery>
</model>
</sim>
<options>
<EIS2 type="bool">1</EIS2>
</options>
<sharklet type="bool">1</sharklet>
</PropertyList>

1097
Nasal/FMGC-b.nas Normal file

File diff suppressed because it is too large Load diff

View file

@ -115,6 +115,7 @@ var phasecheck = maketimer(0.2, func {
if ((((n1_left >= 85) and (n1_right >= 85)) or (gs > 90 )) and flaps < 4 and (mode == "SRS")) {
setprop("/FMGC/status/phase", "1");
setprop("/systems/pressurization/mode", "TO");
}
if ((aglalt >= reduc_agl_ft) and (alt <= cruiseft) and (phase == "1") and (phase != "4") and (mode != "SRS")) {
@ -128,6 +129,7 @@ var phasecheck = maketimer(0.2, func {
if (alt <= cruiseft and (mode == "DES" or mode == "OP DES") and phase == "3") {
setprop("/FMGC/status/phase", "4");
setprop("/systems/pressurization/mode", "DE");
}
if (getprop("/FMGC/status/to-state") == 0 and flaps >= 3 and ((phase == "3") or (phase == "4")) and alt < 7200) {
@ -177,10 +179,10 @@ var phasecheck = maketimer(0.2, func {
setprop("/FMGC/internal/minspeed", 159);
} else if (flap == 4) {
setprop("/FMGC/internal/overspeed", 174);
setprop("/FMGC/internal/minspeed", 146);
setprop("/FMGC/internal/minspeed", 149);
} else if (flap == 5) {
setprop("/FMGC/internal/overspeed", 163);
setprop("/FMGC/internal/minspeed", 136);
setprop("/FMGC/internal/minspeed", 139);
}
});
@ -345,748 +347,3 @@ var ManagedSPD = maketimer(0.25, func {
libraries.mcpSPDKnbPull();
}
});
#################################
# IT-AUTOFLIGHT Based Autopilot #
#################################
var APinit = func {
setprop("/it-autoflight/custom/trk-fpa", 0);
setprop("/it-autoflight/input/kts-mach", 0);
setprop("/it-autoflight/input/ap1", 0);
setprop("/it-autoflight/input/ap2", 0);
setprop("/it-autoflight/input/athr", 0);
setprop("/it-autoflight/input/fd1", 0);
setprop("/it-autoflight/input/fd2", 0);
setprop("/it-autoflight/input/hdg", 360);
setprop("/it-autoflight/input/alt", 10000);
setprop("/it-autoflight/input/vs", 0);
setprop("/it-autoflight/input/fpa", 0);
setprop("/it-autoflight/input/lat", 5);
setprop("/it-autoflight/input/lat-arm", 0);
setprop("/it-autoflight/input/vert", 7);
setprop("/it-autoflight/input/bank-limit", 25);
setprop("/it-autoflight/input/trk", 0);
setprop("/it-autoflight/input/toga", 0);
setprop("/it-autoflight/input/spd-managed", 0);
setprop("/it-autoflight/output/ap1", 0);
setprop("/it-autoflight/output/ap2", 0);
setprop("/it-autoflight/output/athr", 0);
setprop("/it-autoflight/output/fd1", 0);
setprop("/it-autoflight/output/fd2", 0);
setprop("/it-autoflight/output/loc-armed", 0);
setprop("/it-autoflight/output/appr-armed", 0);
setprop("/it-autoflight/output/thr-mode", 2);
setprop("/it-autoflight/output/lat", 5);
setprop("/it-autoflight/output/vert", 7);
setprop("/it-autoflight/output/fma-pwr", 0);
setprop("/it-autoflight/settings/use-backcourse", 0);
setprop("/it-autoflight/internal/min-vs", -500);
setprop("/it-autoflight/internal/max-vs", 500);
setprop("/it-autoflight/internal/alt", 10000);
setprop("/it-autoflight/internal/alt", 10000);
setprop("/it-autoflight/internal/fpa", 0);
setprop("/it-autoflight/internal/top-of-des-nm", 0);
setprop("/it-autoflight/mode/thr", "PITCH");
setprop("/it-autoflight/mode/arm", "HDG");
setprop("/it-autoflight/mode/lat", "T/O");
setprop("/it-autoflight/mode/vert", "T/O CLB");
setprop("/it-autoflight/input/spd-kts", 100);
setprop("/it-autoflight/input/spd-mach", 0.50);
update_armst.start();
thrustmode();
}
# AP 1 Master System
setlistener("/it-autoflight/input/ap1", func {
var apmas = getprop("/it-autoflight/input/ap1");
var ac_ess = getprop("/systems/electrical/bus/ac-ess");
if (apmas == 0) {
fmabox();
setprop("/it-autoflight/output/ap1", 0);
if (getprop("/it-autoflight/sound/enableapoffsound") == 1) {
setprop("/it-autoflight/sound/apoffsound", 1);
setprop("/it-autoflight/sound/enableapoffsound", 0);
}
} else if (apmas == 1 and ac_ess >= 110) {
if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
fmabox();
setprop("/it-autoflight/output/ap1", 1);
setprop("/it-autoflight/sound/enableapoffsound", 1);
setprop("/it-autoflight/sound/apoffsound", 0);
}
}
});
# AP 2 Master System
setlistener("/it-autoflight/input/ap2", func {
var apmas = getprop("/it-autoflight/input/ap2");
var ac_ess = getprop("/systems/electrical/bus/ac-ess");
if (apmas == 0) {
fmabox();
setprop("/it-autoflight/output/ap2", 0);
if (getprop("/it-autoflight/sound/enableapoffsound2") == 1) {
setprop("/it-autoflight/sound/apoffsound2", 1);
setprop("/it-autoflight/sound/enableapoffsound2", 0);
}
} else if (apmas == 1 and ac_ess >= 110) {
if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
fmabox();
setprop("/it-autoflight/output/ap2", 1);
setprop("/it-autoflight/sound/enableapoffsound2", 1);
setprop("/it-autoflight/sound/apoffsound2", 0);
}
}
});
# AT Master System
setlistener("/it-autoflight/input/athr", func {
var atmas = getprop("/it-autoflight/input/athr");
if (atmas == 0) {
setprop("/it-autoflight/output/athr", 0);
} else if (atmas == 1) {
thrustmode();
setprop("/it-autoflight/output/athr", 1);
}
});
# Flight Director 1 Master System
setlistener("/it-autoflight/input/fd1", func {
var fdmas = getprop("/it-autoflight/input/fd1");
if (fdmas == 0) {
fmabox();
setprop("/it-autoflight/output/fd1", 0);
} else if (fdmas == 1) {
fmabox();
setprop("/it-autoflight/output/fd1", 1);
}
});
# Flight Director 2 Master System
setlistener("/it-autoflight/input/fd2", func {
var fdmas = getprop("/it-autoflight/input/fd2");
if (fdmas == 0) {
fmabox();
setprop("/it-autoflight/output/fd2", 0);
} else if (fdmas == 1) {
fmabox();
setprop("/it-autoflight/output/fd2", 1);
}
});
# FMA Boxes and Mode
var fmabox = func {
var ap1 = getprop("/it-autoflight/output/ap1");
var ap2 = getprop("/it-autoflight/output/ap2");
var fd1 = getprop("/it-autoflight/output/fd1");
var fd2 = getprop("/it-autoflight/output/fd2");
if (!ap1 and !ap2 and !fd1 and !fd2) {
setprop("/it-autoflight/input/trk", 0);
setprop("/it-autoflight/input/lat", 3);
setprop("/it-autoflight/input/vert", 1);
setprop("/it-autoflight/input/vs", 0);
setprop("/it-autoflight/output/fma-pwr", 0);
} else {
setprop("/it-autoflight/input/trk", 0);
setprop("/it-autoflight/input/vs", 0);
setprop("/it-autoflight/output/fma-pwr", 1);
}
}
# Master Lateral
setlistener("/it-autoflight/input/lat", func {
if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
lateral();
} else {
lat_arm();
}
});
var lateral = func {
var latset = getprop("/it-autoflight/input/lat");
if (latset == 0) {
alandt.stop();
alandt1.stop();
lnavwptt.stop();
setprop("/it-autoflight/output/loc-armed", 0);
setprop("/it-autoflight/output/appr-armed", 0);
setprop("/it-autoflight/output/lat", 0);
setprop("/it-autoflight/mode/lat", "HDG");
setprop("/it-autoflight/mode/arm", " ");
} else if (latset == 1) {
if (getprop("/autopilot/route-manager/route/num") > 0 and getprop("/autopilot/route-manager/active") == 1) {
alandt.stop();
alandt1.stop();
lnavwptt.start();
setprop("/it-autoflight/output/loc-armed", 0);
setprop("/it-autoflight/output/appr-armed", 0);
setprop("/it-autoflight/output/lat", 1);
setprop("/it-autoflight/mode/lat", "LNAV");
setprop("/it-autoflight/mode/arm", " ");
} else {
gui.popupTip("Please make sure you have a route set, and that it is Activated!");
}
} else if (latset == 2) {
if (getprop("/it-autoflight/output/lat") == 2) {
# Do nothing because VOR/LOC is active
} else {
setprop("/instrumentation/nav[0]/signal-quality-norm", 0);
setprop("/instrumentation/nav[1]/signal-quality-norm", 0);
setprop("/it-autoflight/output/loc-armed", 1);
setprop("/it-autoflight/mode/arm", "LOC");
}
} else if (latset == 3) {
alandt.stop();
alandt1.stop();
lnavwptt.stop();
setprop("/it-autoflight/output/loc-armed", 0);
setprop("/it-autoflight/output/appr-armed", 0);
var hdg5sec = int(getprop("/it-autoflight/internal/heading-5-sec-ahead")+0.5);
setprop("/it-autoflight/input/hdg", hdg5sec);
setprop("/it-autoflight/output/lat", 0);
setprop("/it-autoflight/mode/lat", "HDG");
setprop("/it-autoflight/mode/arm", " ");
} else if (latset == 4) {
lnavwptt.stop();
setprop("/it-autoflight/output/lat", 4);
setprop("/it-autoflight/mode/lat", "ALGN");
} else if (latset == 5) {
lnavwptt.stop();
setprop("/it-autoflight/output/lat", 5);
}
}
var lat_arm = func {
var latset = getprop("/it-autoflight/input/lat");
if (latset == 0) {
setprop("/it-autoflight/input/lat-arm", 0);
setprop("/it-autoflight/mode/arm", "HDG");
} else if (latset == 1) {
if (getprop("/autopilot/route-manager/route/num") > 0 and getprop("/autopilot/route-manager/active") == 1) {
setprop("/it-autoflight/input/lat-arm", 1);
setprop("/it-autoflight/mode/arm", "LNV");
} else {
gui.popupTip("Please make sure you have a route set, and that it is Activated!");
}
} else if (latset == 3) {
var hdgnow = int(getprop("/orientation/heading-magnetic-deg")+0.5);
setprop("/it-autoflight/input/hdg", hdgnow);
setprop("/it-autoflight/input/lat-arm", 0);
setprop("/it-autoflight/mode/arm", "HDG");
}
}
# Master Vertical
setlistener("/it-autoflight/input/vert", func {
if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
vertical();
} else {
vert_arm();
}
});
var vertical = func {
var vertset = getprop("/it-autoflight/input/vert");
if (vertset == 0) {
alandt.stop();
alandt1.stop();
setprop("/it-autoflight/output/appr-armed", 0);
setprop("/it-autoflight/output/vert", 0);
setprop("/it-autoflight/mode/vert", "ALT HLD");
if (getprop("/it-autoflight/output/loc-armed")) {
setprop("/it-autoflight/mode/arm", "LOC");
} else {
setprop("/it-autoflight/mode/arm", " ");
}
var altnow = int((getprop("/instrumentation/altimeter/indicated-altitude-ft")+50)/100)*100;
setprop("/it-autoflight/input/alt", altnow);
setprop("/it-autoflight/internal/alt", altnow);
thrustmode();
} else if (vertset == 1) {
alandt.stop();
alandt1.stop();
setprop("/it-autoflight/output/appr-armed", 0);
var altinput = getprop("/it-autoflight/input/alt");
setprop("/it-autoflight/internal/alt", altinput);
var vsnow = int(getprop("/velocities/vertical-speed-fps")*0.6)*100;
setprop("/it-autoflight/input/vs", vsnow);
setprop("/it-autoflight/output/vert", 1);
setprop("/it-autoflight/mode/vert", "V/S");
if (getprop("/it-autoflight/output/loc-armed")) {
setprop("/it-autoflight/mode/arm", "LOC");
} else {
setprop("/it-autoflight/mode/arm", " ");
}
thrustmode();
} else if (vertset == 2) {
if (getprop("/it-autoflight/output/lat") == 2) {
# Do nothing because VOR/LOC is active
} else {
setprop("/instrumentation/nav[0]/signal-quality-norm", 0);
setprop("/instrumentation/nav[1]/signal-quality-norm", 0);
setprop("/it-autoflight/output/loc-armed", 1);
}
if ((getprop("/it-autoflight/output/vert") == 2) or (getprop("/it-autoflight/output/vert") == 6)) {
# Do nothing because G/S or LAND or FLARE is active
} else {
setprop("/instrumentation/nav[0]/gs-rate-of-climb", 0);
setprop("/it-autoflight/output/appr-armed", 1);
setprop("/it-autoflight/mode/arm", "ILS");
}
} else if (vertset == 3) {
alandt.stop();
alandt1.stop();
var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
var alt = getprop("/it-autoflight/internal/alt");
var dif = calt - alt;
var vsnow = getprop("/it-autoflight/internal/vert-speed-fpm");
if (calt < alt) {
setprop("/it-autoflight/internal/max-vs", vsnow);
} else if (calt > alt) {
setprop("/it-autoflight/internal/min-vs", vsnow);
}
minmaxtimer.start();
thrustmode();
setprop("/it-autoflight/output/vert", 0);
setprop("/it-autoflight/mode/vert", "ALT CAP");
} else if (vertset == 4) {
alandt.stop();
alandt1.stop();
setprop("/it-autoflight/output/appr-armed", 0);
var altinput = getprop("/it-autoflight/input/alt");
setprop("/it-autoflight/internal/alt", altinput);
var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
var alt = getprop("/it-autoflight/internal/alt");
var dif = calt - alt;
if (dif < 250 and dif > -250) {
alt_on();
} else {
flch_on();
}
if (getprop("/it-autoflight/output/loc-armed")) {
setprop("/it-autoflight/mode/arm", "LOC");
} else {
setprop("/it-autoflight/mode/arm", " ");
}
} else if (vertset == 5) {
fpa_calc();
alandt.stop();
alandt1.stop();
fpa_calct.start();
setprop("/it-autoflight/output/appr-armed", 0);
var altinput = getprop("/it-autoflight/input/alt");
setprop("/it-autoflight/internal/alt", altinput);
var fpanow = (int(10*getprop("/it-autoflight/internal/fpa")))*0.1;
print(fpanow);
setprop("/it-autoflight/input/fpa", fpanow);
setprop("/it-autoflight/output/vert", 5);
setprop("/it-autoflight/mode/vert", "FPA");
if (getprop("/it-autoflight/output/loc-armed") == 1) {
setprop("/it-autoflight/mode/arm", "LOC");
} else {
setprop("/it-autoflight/mode/arm", " ");
}
thrustmode();
} else if (vertset == 6) {
setprop("/it-autoflight/output/vert", 6);
setprop("/it-autoflight/mode/vert", "LAND");
setprop("/it-autoflight/mode/arm", " ");
thrustmode();
alandt.stop();
alandt1.start();
} else if (vertset == 7) {
alandt.stop();
alandt1.stop();
setprop("/it-autoflight/output/vert", 7);
setprop("/it-autoflight/mode/arm", " ");
var altinput = getprop("/it-autoflight/input/alt");
setprop("/it-autoflight/internal/alt", altinput);
thrustmodet.start();
}
}
var vert_arm = func {
var vertset = getprop("/it-autoflight/input/vert");
if (vertset == 8) {
# Do nothing right now
} else {
# Do nothing right now
}
}
# Helpers
var toggle_trkfpa = func {
var trkfpa = getprop("/it-autoflight/custom/trk-fpa");
if (trkfpa == 0) {
setprop("/it-autoflight/custom/trk-fpa", 1);
if (getprop("/it-autoflight/output/vert") == 1) {
setprop("/it-autoflight/input/vert", 5);
}
setprop("/it-autoflight/input/trk", 1);
var hed = getprop("/it-autoflight/internal/heading-error-deg");
if (hed >= -10 and hed <= 10 and getprop("/it-autoflight/output/lat") == 0) {
setprop("/it-autoflight/input/lat", 3);
}
} else if (trkfpa == 1) {
setprop("/it-autoflight/custom/trk-fpa", 0);
if (getprop("/it-autoflight/output/vert") == 5) {
setprop("/it-autoflight/input/vert", 1);
}
setprop("/it-autoflight/input/trk", 0);
var hed = getprop("/it-autoflight/internal/heading-error-deg");
if (hed >= -10 and hed <= 10 and getprop("/it-autoflight/output/lat") == 0) {
setprop("/it-autoflight/input/lat", 3);
}
}
}
var lnavwpt = func {
if (getprop("/autopilot/route-manager/route/num") > 0) {
if (getprop("/autopilot/route-manager/wp/dist") <= 1.0) {
var wptnum = getprop("/autopilot/route-manager/current-wp");
if ((wptnum + 1) < getprop("/autopilot/route-manager/route/num")) {
setprop("/autopilot/route-manager/current-wp", wptnum + 1);
}
}
}
}
var flch_on = func {
setprop("/it-autoflight/output/appr-armed", 0);
setprop("/it-autoflight/output/vert", 4);
thrustmodet.start();
}
var alt_on = func {
setprop("/it-autoflight/output/appr-armed", 0);
setprop("/it-autoflight/output/vert", 0);
setprop("/it-autoflight/mode/vert", "ALT CAP");
setprop("/it-autoflight/internal/max-vs", 500);
setprop("/it-autoflight/internal/min-vs", -500);
minmaxtimer.start();
}
var fpa_calc = func {
var VS = getprop("/velocities/vertical-speed-fps");
var TAS = getprop("/velocities/uBody-fps");
if (TAS < 10) TAS = 10;
if (VS < -200) VS =-200;
if (abs(VS/TAS) <= 1) {
var FPangle = math.asin(VS/TAS);
FPangle *=90;
setprop("/it-autoflight/internal/fpa", FPangle);
}
}
setlistener("/it-autoflight/input/kts-mach", func {
var ias = getprop("/instrumentation/airspeed-indicator/indicated-speed-kt");
var mach = getprop("/instrumentation/airspeed-indicator/indicated-mach");
if (getprop("/it-autoflight/input/kts-mach") == 0) {
if (ias >= 100 and ias <= 360) {
setprop("/it-autoflight/input/spd-kts", math.round(ias, 1));
} else if (ias < 100) {
setprop("/it-autoflight/input/spd-kts", 100);
} else if (ias > 360) {
setprop("/it-autoflight/input/spd-kts", 360);
}
} else if (getprop("/it-autoflight/input/kts-mach") == 1) {
if (mach >= 0.50 and mach <= 0.95) {
setprop("/it-autoflight/input/spd-kts", math.round(mach, 0.001));
} else if (mach < 0.50) {
setprop("/it-autoflight/input/spd-kts", 0.50);
} else if (mach > 0.95) {
setprop("/it-autoflight/input/spd-kts", 0.95);
}
}
});
# Takeoff Modes
# Lat Active
var latarms = func {
if (getprop("/position/gear-agl-ft") >= 20) {
if (getprop("/it-autoflight/input/lat-arm") == 1) {
setprop("/it-autoflight/input/lat", getprop("/it-autoflight/input/lat-arm"));
}
}
}
# TOGA
setlistener("/it-autoflight/input/toga", func {
if (getprop("/it-autoflight/input/toga") == 1) {
setprop("/it-autoflight/input/vert", 7);
vertical();
setprop("/it-autoflight/output/loc-armed", 0);
setprop("/it-autoflight/output/appr-armed", 0);
setprop("/it-autoflight/input/toga", 0);
togasel();
}
});
var togasel = func {
if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
var iasnow = int(getprop("/instrumentation/airspeed-indicator/indicated-speed-kt")+0.5);
setprop("/it-autoflight/input/spd-kts", iasnow);
setprop("/it-autoflight/input/kts-mach", 0);
setprop("/it-autoflight/mode/vert", "G/A CLB");
setprop("/it-autoflight/input/lat", 3);
} else {
setprop("/it-autoflight/input/lat", 5);
lateral();
setprop("/it-autoflight/mode/lat", "T/O");
setprop("/it-autoflight/mode/vert", "T/O CLB");
}
}
setlistener("/it-autoflight/mode/vert", func {
var vertm = getprop("/it-autoflight/mode/vert");
if (vertm == "T/O CLB") {
reduct.start();
} else {
reduct.stop();
}
});
setlistener("/it-autoflight/mode/lat", func {
var vertm = getprop("/it-autoflight/mode/lat");
if (vertm == "T/O") {
latarmt.start();
} else {
latarmt.stop();
}
});
var toga_reduc = func {
if (getprop("/position/gear-agl-ft") >= getprop("/it-autoflight/settings/reduc-agl-ft")) {
setprop("/it-autoflight/input/vert", 4);
}
}
# Altitude Capture and FPA Timer Logic
setlistener("/it-autoflight/output/vert", func {
var vertm = getprop("/it-autoflight/output/vert");
if (vertm == 1) {
altcaptt.start();
fpa_calct.stop();
} else if (vertm == 4) {
altcaptt.start();
fpa_calct.stop();
} else if (vertm == 5) {
altcaptt.start();
} else if (vertm == 7) {
altcaptt.start();
fpa_calct.stop();
} else if (vertm == 8) {
altcaptt.stop();
fpa_calct.stop();
} else {
altcaptt.stop();
fpa_calct.stop();
}
});
# Altitude Capture
var altcapt = func {
var vsnow = getprop("/it-autoflight/internal/vert-speed-fpm");
if ((vsnow >= 0 and vsnow < 500) or (vsnow < 0 and vsnow > -500)) {
setprop("/it-autoflight/internal/captvs", 100);
setprop("/it-autoflight/internal/captvsneg", -100);
} else if ((vsnow >= 500 and vsnow < 1000) or (vsnow < -500 and vsnow > -1000)) {
setprop("/it-autoflight/internal/captvs", 200);
setprop("/it-autoflight/internal/captvsneg", -200);
} else if ((vsnow >= 1000 and vsnow < 1500) or (vsnow < -1000 and vsnow > -1500)) {
setprop("/it-autoflight/internal/captvs", 300);
setprop("/it-autoflight/internal/captvsneg", -300);
} else if ((vsnow >= 1500 and vsnow < 2000) or (vsnow < -1500 and vsnow > -2000)) {
setprop("/it-autoflight/internal/captvs", 400);
setprop("/it-autoflight/internal/captvsneg", -400);
} else if ((vsnow >= 2000 and vsnow < 3000) or (vsnow < -2000 and vsnow > -3000)) {
setprop("/it-autoflight/internal/captvs", 600);
setprop("/it-autoflight/internal/captvsneg", -600);
} else if ((vsnow >= 3000 and vsnow < 4000) or (vsnow < -3000 and vsnow > -4000)) {
setprop("/it-autoflight/internal/captvs", 900);
setprop("/it-autoflight/internal/captvsneg", -900);
} else if ((vsnow >= 4000 and vsnow < 5000) or (vsnow < -4000 and vsnow > -5000)) {
setprop("/it-autoflight/internal/captvs", 1200);
setprop("/it-autoflight/internal/captvsneg", -1200);
} else if ((vsnow >= 5000) or (vsnow < -5000)) {
setprop("/it-autoflight/internal/captvs", 1500);
setprop("/it-autoflight/internal/captvsneg", -1500);
}
var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
var alt = getprop("/it-autoflight/internal/alt");
var dif = calt - alt;
if (dif < getprop("/it-autoflight/internal/captvs") and dif > getprop("/it-autoflight/internal/captvsneg")) {
if (vsnow > 0 and dif < 0) {
setprop("/it-autoflight/input/vert", 3);
setprop("/it-autoflight/output/thr-mode", 0);
} else if (vsnow < 0 and dif > 0) {
setprop("/it-autoflight/input/vert", 3);
setprop("/it-autoflight/output/thr-mode", 0);
}
}
var altinput = getprop("/it-autoflight/input/alt");
setprop("/it-autoflight/internal/alt", altinput);
}
# Min and Max Pitch Reset
var minmax = func {
var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
var alt = getprop("/it-autoflight/internal/alt");
var dif = calt - alt;
if (dif < 50 and dif > -50) {
setprop("/it-autoflight/internal/max-vs", 500);
setprop("/it-autoflight/internal/min-vs", -500);
var vertmode = getprop("/it-autoflight/output/vert");
if (vertmode == 1 or vertmode == 2 or vertmode == 4 or vertmode == 5 or vertmode == 6 or vertmode == 7) {
# Do not change the vertical mode because we are not trying to capture altitude.
} else {
setprop("/it-autoflight/mode/vert", "ALT HLD");
}
minmaxtimer.stop();
}
}
# Thrust Mode Selector
var thrustmode = func {
var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
var alt = getprop("/it-autoflight/internal/alt");
var vertm = getprop("/it-autoflight/output/vert");
if (vertm == 4) {
if (calt < alt) {
setprop("/it-autoflight/output/thr-mode", 2);
setprop("/it-autoflight/mode/thr", " PITCH");
setprop("/it-autoflight/mode/vert", "SPD CLB");
} else if (calt > alt) {
setprop("/it-autoflight/output/thr-mode", 1);
setprop("/it-autoflight/mode/thr", " PITCH");
setprop("/it-autoflight/mode/vert", "SPD DES");
} else {
setprop("/it-autoflight/output/thr-mode", 0);
setprop("/it-autoflight/mode/thr", "THRUST");
setprop("/it-autoflight/input/vert", 3);
}
} else if (vertm == 7) {
setprop("/it-autoflight/output/thr-mode", 2);
setprop("/it-autoflight/mode/thr", " PITCH");
} else {
setprop("/it-autoflight/output/thr-mode", 0);
setprop("/it-autoflight/mode/thr", "THRUST");
thrustmodet.stop();
}
}
# ILS and Autoland
# LOC and G/S arming
var update_arms = func {
update_locarmelec();
update_apparmelec();
}
var update_locarmelec = func {
var loca = getprop("/it-autoflight/output/loc-armed");
if (loca) {
locarmcheck();
} else {
return 0;
}
}
var update_apparmelec = func {
var appra = getprop("/it-autoflight/output/appr-armed");
if (appra) {
apparmcheck();
} else {
return 0;
}
}
var locarmcheck = func {
var locdefl = getprop("instrumentation/nav[0]/heading-needle-deflection-norm");
var locdefl_b = getprop("instrumentation/nav[1]/heading-needle-deflection-norm");
if ((locdefl < 0.9233) and (getprop("instrumentation/nav[0]/signal-quality-norm") > 0.99) and (getprop("/FMGC/internal/loc-source") == "NAV0")) {
make_loc_active();
} else if ((locdefl_b < 0.9233) and (getprop("instrumentation/nav[1]/signal-quality-norm") > 0.99) and (getprop("/FMGC/internal/loc-source") == "NAV1")) {
make_loc_active();
} else {
return 0;
}
}
var make_loc_active = func {
setprop("/it-autoflight/output/loc-armed", 0);
setprop("/it-autoflight/output/lat", 2);
setprop("/it-autoflight/mode/lat", "LOC");
if (getprop("/it-autoflight/output/appr-armed") == 1) {
# Do nothing because G/S is armed
} else {
setprop("/it-autoflight/mode/arm", " ");
}
}
var apparmcheck = func {
var signal = getprop("/instrumentation/nav[0]/gs-needle-deflection-norm");
if ((signal <= -0.000000001) and (getprop("/FMGC/internal/loc-source") == "NAV0") and (getprop("/it-autoflight/output/lat") == 2)) {
make_appr_active();
} else {
return 0;
}
}
var make_appr_active = func {
setprop("/it-autoflight/output/appr-armed", 0);
setprop("/it-autoflight/output/vert", 2);
setprop("/it-autoflight/mode/vert", "G/S");
setprop("/it-autoflight/mode/arm", " ");
alandt.start();
thrustmode();
}
# Autoland Stage 1 Logic (Land)
var aland = func {
var ap1 = getprop("/it-autoflight/output/ap1");
var ap2 = getprop("/it-autoflight/output/ap2");
if (getprop("/position/gear-agl-ft") <= 100) {
setprop("/it-autoflight/input/lat", 4);
setprop("/it-autoflight/input/vert", 6);
}
}
var aland1 = func {
var aglal = getprop("/position/gear-agl-ft");
if (aglal <= 50 and aglal > 5) {
setprop("/it-autoflight/mode/vert", "FLARE");
}
var gear1 = getprop("/gear/gear[1]/wow");
var gear2 = getprop("/gear/gear[2]/wow");
if (gear1 == 1 or gear2 == 1) {
setprop("/it-autoflight/input/ap1", 0);
setprop("/it-autoflight/input/ap2", 0);
alandt1.stop();
}
}
# Autoland Stage 2 Logic (Rollout)
# Not yet working, planned.
# VNAV
# For Canvas Nav Display.
setlistener("/it-autoflight/input/hdg", func {
setprop("/autopilot/settings/heading-bug-deg", getprop("/it-autoflight/input/hdg"));
});
setlistener("/it-autoflight/internal/alt", func {
setprop("/autopilot/settings/target-altitude-ft", getprop("/it-autoflight/internal/alt"));
});
# Timers
var update_armst = maketimer(0.5, update_arms);
var altcaptt = maketimer(0.5, altcapt);
var thrustmodet = maketimer(0.5, thrustmode);
var minmaxtimer = maketimer(0.5, minmax);
var alandt = maketimer(0.5, aland);
var alandt1 = maketimer(0.5, aland1);
var reduct = maketimer(0.5, toga_reduc);
var latarmt = maketimer(0.5, latarms);
var fpa_calct = maketimer(0.1, fpa_calc);
var lnavwptt = maketimer(1, lnavwpt);

View file

@ -53,41 +53,58 @@ var lskbutton = func(btn) {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "GPS PRIMARY");
} else if (getprop("/MCDU[0]/page") == "TO") {
PerfTOInput("L1");
perfTOInput("L1");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("L1");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "2") {
if (getprop("/MCDU[0]/page") == "INITA") {
PerfInput("L2");
} else if (getprop("/MCDU[0]/page") == "TO") {
PerfTOInput("L2");
perfTOInput("L2");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("L2");
} else if (getprop("/MCDU[0]/page") == "CLB") {
initInputA("L5"); # Does the same thing as on the INIT page
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "3") {
if (getprop("/MCDU[0]/page") == "INITA") {
initInputA("L3");
} else if (getprop("/MCDU[0]/page") == "TO") {
PerfTOInput("L3");
perfTOInput("L3");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("L3");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "4") {
if (getprop("/MCDU[0]/page") == "DATA") {
setprop("/MCDU[0]/page", "STATUS");
} else if (getprop("/MCDU[0]/page") == "TO") {
PerfTOInput("L4");
perfTOInput("L4");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("L4");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "5") {
if (getprop("/MCDU[0]/page") == "INITA") {
initInputA("L5");
} else if (getprop("/MCDU[0]/page") == "TO") {
PerfTOInput("L5");
perfTOInput("L5");
} else if (getprop("/MCDU[0]/page") == "CLB") {
perfCLBInput("L5");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "6") {
if (getprop("/MCDU[0]/page") == "INITA") {
@ -96,6 +113,9 @@ var lskbutton = func(btn) {
perfCLBInput("L6");
} else if (getprop("/MCDU[0]/page") == "CRZ") {
perfCRZInput("L6");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
}
@ -110,37 +130,53 @@ var rskbutton = func(btn) {
initInputA("R1");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("R1");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "2") {
if (getprop("/MCDU[0]/page") == "INITB") {
initInputB("R2");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("R2");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "3") {
if (getprop("/MCDU[0]/page") == "INITA") {
initInputA("R3");
} else if (getprop("/MCDU[0]/page") == "TO") {
PerfTOInput("R3");
perfTOInput("R3");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "4") {
if (getprop("/MCDU[0]/page") == "TO") {
PerfTOInput("R4");
perfTOInput("R4");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("R4");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "5") {
if (getprop("/MCDU[0]/page") == "TO") {
PerfTOInput("R5");
perfTOInput("R5");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "6") {
if (getprop("/MCDU[0]/page") == "TO") {
PerfTOInput("R6");
perfTOInput("R6");
} else if (getprop("/MCDU[0]/page") == "CLB") {
perfCLBInput("R6");
} # else if (getprop("/MCDU[0]/page") == "CRZ") {
# perfCRZInput("R6");
#}
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
}
@ -434,7 +470,7 @@ var initInputB = func(key) {
}
}
var PerfTOInput = func(key) {
var perfTOInput = func(key) {
var scratchpad = getprop("/MCDU[0]/scratchpad");
if (key == "L1") {
if (scratchpad == "CLR") {

View file

@ -53,41 +53,58 @@ var lskbutton = func(btn) {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "GPS PRIMARY");
} else if (getprop("/MCDU[1]/page") == "TO") {
PerfTOInput("L1");
perfTOInput("L1");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("L1");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "2") {
if (getprop("/MCDU[1]/page") == "INITA") {
PerfInput("L2");
} else if (getprop("/MCDU[1]/page") == "TO") {
PerfTOInput("L2");
perfTOInput("L2");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("L2");
} else if (getprop("/MCDU[1]/page") == "CLB") {
initInputA("L5"); # Does the same thing as on the INIT page
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "3") {
if (getprop("/MCDU[1]/page") == "INITA") {
initInputA("L3");
} else if (getprop("/MCDU[1]/page") == "TO") {
PerfTOInput("L3");
perfTOInput("L3");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("L3");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "4") {
if (getprop("/MCDU[1]/page") == "DATA") {
setprop("/MCDU[1]/page", "STATUS");
} else if (getprop("/MCDU[1]/page") == "TO") {
PerfTOInput("L4");
perfTOInput("L4");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("L4");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "5") {
if (getprop("/MCDU[1]/page") == "INITA") {
initInputA("L5");
} else if (getprop("/MCDU[1]/page") == "TO") {
PerfTOInput("L5");
perfTOInput("L5");
} else if (getprop("/MCDU[1]/page") == "CLB") {
perfCLBInput("L5");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "6") {
if (getprop("/MCDU[1]/page") == "INITA") {
@ -96,6 +113,9 @@ var lskbutton = func(btn) {
perfCLBInput("L6");
} else if (getprop("/MCDU[1]/page") == "CRZ") {
perfCRZInput("L6");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
}
@ -110,37 +130,53 @@ var rskbutton = func(btn) {
initInputA("R1");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("R1");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "2") {
if (getprop("/MCDU[1]/page") == "INITB") {
initInputB("R2");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("R2");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "3") {
if (getprop("/MCDU[1]/page") == "INITA") {
initInputA("R3");
} else if (getprop("/MCDU[1]/page") == "TO") {
PerfTOInput("R3");
perfTOInput("R3");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "4") {
if (getprop("/MCDU[1]/page") == "TO") {
PerfTOInput("R4");
perfTOInput("R4");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("R4");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "5") {
if (getprop("/MCDU[1]/page") == "TO") {
PerfTOInput("R5");
perfTOInput("R5");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "6") {
if (getprop("/MCDU[1]/page") == "TO") {
PerfTOInput("R6");
perfTOInput("R6");
} else if (getprop("/MCDU[1]/page") == "CLB") {
perfCLBInput("R6");
} # else if (getprop("/MCDU[1]/page") == "CRZ") {
# perfCRZInput("R6");
#}
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
}
@ -434,7 +470,7 @@ var initInputB = func(key) {
}
}
var PerfTOInput = func(key) {
var perfTOInput = func(key) {
var scratchpad = getprop("/MCDU[1]/scratchpad");
if (key == "L1") {
if (scratchpad == "CLR") {

View file

@ -6,7 +6,7 @@ setprop("/it-autoflight/internal/alt", 10000);
# Speed or Mach?
var speedmach = func {
if ((getprop("/it-autoflight/output/vert") == 4) or (getprop("/it-autoflight/output/vert") == 6) or (getprop("/it-autoflight/output/vert") == 7)) {
if ((getprop("/it-autoflight/output/vert") == 4) 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) {
speedmach_b();
} else {
@ -157,6 +157,20 @@ setlistener("/it-autoflight/mode/vert", func {
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
}
} else if (vert == "MNG HLD") {
if (newvert != "ALT") {
setprop("/modes/pfd/fma/pitch-mode", "ALT");
}
if (newvertarm != " ") {
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
}
} else if (vert == "MNG CAP") {
if (newvert != "ALT*") {
setprop("/modes/pfd/fma/pitch-mode", "ALT*");
}
if (newvertarm != " ") {
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
}
} else if (vert == "MNG CLB") {
if (newvert != "CLB") {
setprop("/modes/pfd/fma/pitch-mode", "CLB");

View file

@ -647,13 +647,10 @@
<button>
<legend>ALT Push</legend>
<pref-width>75</pref-width>
<enable>
<property>/systems/unused/unused-button</property>
</enable>
<binding>
<command>property-assign</command>
<property>/systems/unused/unused-button</property>
<value>0</value>
<property>/it-autoflight/input/vert</property>
<value>8</value>
</binding>
</button>

View file

@ -16,8 +16,23 @@
<property>/it-autoflight/internal/altitude-5-sec-ahead</property>
</input>
<reference>
<condition>
<not-equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</not-equals>
</condition>
<property>/it-autoflight/internal/alt</property>
</reference>
<reference>
<condition>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
</condition>
<property>/it-autoflight/internal/mng-alt</property>
</reference>
<gain>-8</gain>
<output>
<property>/it-autoflight/internal/target-fpm</property>
@ -102,6 +117,16 @@
<property>/it-autoflight/output/vert</property>
<value>7</value>
</equals>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
<equals>
<property>/it-autoflight/output/vert-mng</property>
<value>4</value>
</equals>
</and>
</or>
</condition>
</enable>
@ -149,10 +174,10 @@
<config>
<Kp>
<condition>
<equals>
<not-equals>
<property>/it-autoflight/output/vert</property>
<value>4</value>
</equals>
<value>7</value>
</not-equals>
</condition>
<value>-50</value>
</Kp>
@ -273,6 +298,10 @@
<property>/it-autoflight/output/vert</property>
<value>7</value>
</equals>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
</or>
<or>
<equals>
@ -301,10 +330,22 @@
</input>
<reference>
<condition>
<equals>
<property>/it-autoflight/output/vert</property>
<value>0</value>
</equals>
<or>
<equals>
<property>/it-autoflight/output/vert</property>
<value>0</value>
</equals>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
<equals>
<property>/it-autoflight/output/vert-mng</property>
<value>0</value>
</equals>
</and>
</or>
</condition>
<property>/it-autoflight/internal/target-fpm</property>
<scale>0.16667</scale>
@ -330,6 +371,16 @@
<property>/it-autoflight/output/vert</property>
<value>7</value>
</equals>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
<equals>
<property>/it-autoflight/output/vert-mng</property>
<value>4</value>
</equals>
</and>
</or>
</condition>
<property>/it-autoflight/internal/target-fpm-b</property>

View file

@ -404,8 +404,8 @@
</Kp>
<Ki>0</Ki>
</config>
<min>-0.25</min>
<max>0.25</max>
<min>-0.15</min>
<max>0.15</max>
</pi-simple-controller>
<filter>

View file

@ -829,11 +829,11 @@
</filter>
<!-- =============================================================== -->
<!-- Yaw Damper -->
<!-- Yaw Damper/Turn Coordinator -->
<!-- =============================================================== -->
<pid-controller>
<name>IT-FBW: YAW</name>
<name>IT-FBW: YAW DAMPER/TURN COORDINATOR</name>
<debug>false</debug>
<enable>
<condition>
@ -875,10 +875,10 @@
<beta>1</beta>
<alpha>0.1</alpha>
<gamma>0</gamma>
<Ti>5.0</Ti>
<Td>0.000001</Td>
<u_min>-0.3</u_min>
<u_max>0.3</u_max>
<Ti>1.5</Ti>
<Td>0.0001</Td>
<u_min>-0.2</u_min>
<u_max>0.2</u_max>
</config>
</pid-controller>

View file

@ -28,6 +28,20 @@
</reference>
<output>instrumentation/pfd/sel-alt-diff</output>
</filter>
<filter>
<name>Target alt diff (managed)</name>
<type>gain</type>
<update-interval-secs type="double">0.05</update-interval-secs>
<gain>1.0</gain>
<input>
<property>/it-autoflight/internal/mng-alt</property>
</input>
<reference>
<property>instrumentation/altimeter/indicated-altitude-ft</property>
</reference>
<output>instrumentation/pfd/mng-alt-diff</output>
</filter>
<filter>
<name>Heading Deg</name>