Code Cleanup, start ECAM msgs

This commit is contained in:
Joshua Davidson 2017-06-01 20:53:50 -04:00
parent a5babe4264
commit e87aad0b27
16 changed files with 1020 additions and 226 deletions

View file

@ -129,7 +129,7 @@
<menu n="3">
<item>
<name>autopilot</name>
<label>Autopilot Settings</label>
<label>IT-AUTOFLIGHT System</label>
<binding>
<command>nasal</command>
<script>
@ -333,7 +333,6 @@
<it-fbw n="0">
<alpha-hld type="bool">0</alpha-hld>
<target-g-load type="float">1.0</target-g-load>
</it-fbw>
<apu>
@ -732,9 +731,9 @@
<file>Aircraft/A320Family/Nasal/libraries.nas</file>
<file>Aircraft/A320Family/Nasal/PFD_FMA.nas</file>
<file>Aircraft/A320Family/Models/Instruments/ND/ND.nas</file>
<file>Aircraft/A320Family/Nasal/fctl.nas</file>
<file>Aircraft/A320Family/Nasal/gpws.nas</file>
<file>Aircraft/A320Family/Nasal/efis.nas</file>
<file>Aircraft/A320Family/Nasal/ECAM.nas</file>
</libraries>
<acconfig>
<file>Aircraft/A320Family/AircraftConfig/acconfig.nas</file>

View file

@ -55,6 +55,9 @@ var systemsReset = func {
mcdu1.MCDU_reset();
mcdu2.MCDU_reset();
itaf.ap_init();
setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1);
libraries.ECAMinit();
}
var failReset = func {
@ -126,8 +129,6 @@ var colddark = func {
setprop("/controls/gear/gear-down", 1);
systemsReset();
failReset();
setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1);
if (getprop("/engines/engine[1]/n2") < 2) {
colddark_b();
} else {
@ -172,8 +173,6 @@ var beforestart = func {
setprop("/controls/gear/gear-down", 1);
systemsReset();
failReset();
setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1);
setprop("/controls/APU/master", 0);
setprop("/controls/APU/start", 0);
setprop("/controls/bleed/OHP/bleedapu", 0);
@ -243,8 +242,6 @@ var taxi = func {
setprop("/controls/gear/gear-down", 1);
systemsReset();
failReset();
setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1);
setprop("/controls/APU/master", 0);
setprop("/controls/APU/start", 0);
setprop("/controls/bleed/OHP/bleedapu", 0);

View file

@ -4,6 +4,10 @@
<path>resCFM/eicasCFM.ac</path>
<model>
<path>Aircraft/A320Family/Models/Instruments/Upper-ECAM-MSG/ECAM-MSG.xml</path>
</model>
<animation>
<type>select</type>
<object-name>XX.1</object-name>

View file

@ -4,6 +4,10 @@
<path>resIAE/eicasIAE.ac</path>
<model>
<path>Aircraft/A320Family/Models/Instruments/Upper-ECAM-MSG/ECAM-MSG.xml</path>
</model>
<animation>
<type>select</type>
<object-name>XX.1</object-name>

View file

@ -0,0 +1,703 @@
<?xml version="1.0"?>
<!--
#############################################
# A3XX ECAM by Joshua Davidson (it0uchpods) #
#############################################
-->
<PropertyList>
<path>EMPTY.ac</path>
<!-- =============================================================== -->
<!-- White Text -->
<!-- =============================================================== -->
<text>
<name>Line1W</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.029</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line1</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line1W</object-name>
<condition>
<equals>
<property>/ECAM/msg/line1c</property>
<value>w</value>
</equals>
</condition>
</animation>
<text>
<name>Line2W</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.035</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line2</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line2W</object-name>
<condition>
<equals>
<property>/ECAM/msg/line2c</property>
<value>w</value>
</equals>
</condition>
</animation>
<text>
<name>Line3W</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.041</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line3</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line3W</object-name>
<condition>
<equals>
<property>/ECAM/msg/line3c</property>
<value>w</value>
</equals>
</condition>
</animation>
<text>
<name>Line4W</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.047</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line4</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line4W</object-name>
<condition>
<equals>
<property>/ECAM/msg/line4c</property>
<value>w</value>
</equals>
</condition>
</animation>
<text>
<name>Line5W</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.053</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line5</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line5W</object-name>
<condition>
<equals>
<property>/ECAM/msg/line5c</property>
<value>w</value>
</equals>
</condition>
</animation>
<text>
<name>Line6W</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.059</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line6</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line6W</object-name>
<condition>
<equals>
<property>/ECAM/msg/line6c</property>
<value>w</value>
</equals>
</condition>
</animation>
<text>
<name>Line7W</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.065</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line7</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line7W</object-name>
<condition>
<equals>
<property>/ECAM/msg/line7c</property>
<value>w</value>
</equals>
</condition>
</animation>
<text>
<name>Line8W</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.071</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line8</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line8W</object-name>
<condition>
<equals>
<property>/ECAM/msg/line8c</property>
<value>w</value>
</equals>
</condition>
</animation>
<!-- =============================================================== -->
<!-- Green Text -->
<!-- =============================================================== -->
<text>
<name>Line1G</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.029</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line1</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line1G</object-name>
<condition>
<equals>
<property>/ECAM/msg/line1c</property>
<value>g</value>
</equals>
</condition>
</animation>
<text>
<name>Line2G</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.035</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line2</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line2G</object-name>
<condition>
<equals>
<property>/ECAM/msg/line2c</property>
<value>g</value>
</equals>
</condition>
</animation>
<text>
<name>Line3G</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.041</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line3</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line3G</object-name>
<condition>
<equals>
<property>/ECAM/msg/line3c</property>
<value>g</value>
</equals>
</condition>
</animation>
<text>
<name>Line4G</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.047</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line4</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line4G</object-name>
<condition>
<equals>
<property>/ECAM/msg/line4c</property>
<value>g</value>
</equals>
</condition>
</animation>
<text>
<name>Line5G</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.053</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line5</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line5G</object-name>
<condition>
<equals>
<property>/ECAM/msg/line5c</property>
<value>g</value>
</equals>
</condition>
</animation>
<text>
<name>Line6G</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.059</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line6</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line6G</object-name>
<condition>
<equals>
<property>/ECAM/msg/line6c</property>
<value>g</value>
</equals>
</condition>
</animation>
<text>
<name>Line7G</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.065</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line7</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line7G</object-name>
<condition>
<equals>
<property>/ECAM/msg/line7c</property>
<value>g</value>
</equals>
</condition>
</animation>
<text>
<name>Line8G</name>
<offsets>
<x-m>0.0004</x-m>
<y-m>-0.078</y-m>
<z-m>-0.071</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>/ECAM/msg/line8</property>
<truncate type="bool">false</truncate>
<font type="string">lucida.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.005</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>Line8G</object-name>
<condition>
<equals>
<property>/ECAM/msg/line8c</property>
<value>g</value>
</equals>
</condition>
</animation>
<!-- =============================================================== -->
<!-- Colors -->
<!-- =============================================================== -->
<!-- White -->
<animation>
<type>material</type>
<object-name>Line1W</object-name>
<object-name>Line2W</object-name>
<object-name>Line3W</object-name>
<object-name>Line4W</object-name>
<object-name>Line5W</object-name>
<object-name>Line6W</object-name>
<object-name>Line7W</object-name>
<object-name>Line8W</object-name>
<diffuse>
<red>1</red>
<green>1</green>
<blue>1</blue>
</diffuse>
<ambient>
<red>0</red>
<green>0</green>
<blue>0</blue>
</ambient>
<specular>
<red>0</red>
<green>0</green>
<blue>0</blue>
</specular>
<emission>
<red>1</red>
<green>1</green>
<blue>1</blue>
</emission>
</animation>
<!-- Green -->
<animation>
<type>material</type>
<object-name>Line1G</object-name>
<object-name>Line2G</object-name>
<object-name>Line3G</object-name>
<object-name>Line4G</object-name>
<object-name>Line5G</object-name>
<object-name>Line6G</object-name>
<object-name>Line7G</object-name>
<object-name>Line8G</object-name>
<diffuse>
<red>0.2</red>
<green>0.4</green>
<blue>0.2</blue>
</diffuse>
<ambient>
<red>0</red>
<green>0</green>
<blue>0</blue>
</ambient>
<specular>
<red>0</red>
<green>0</green>
<blue>0</blue>
</specular>
<emission>
<red>0.2</red>
<green>0.4</green>
<blue>0.2</blue>
</emission>
</animation>
<!-- Blue -->
<!--animation>
<type>material</type>
<diffuse>
<red>0</red>
<green>0.5</green>
<blue>0.7</blue>
</diffuse>
<ambient>
<red>0</red>
<green>0</green>
<blue>0</blue>
</ambient>
<specular>
<red>0</red>
<green>0</green>
<blue>0</blue>
</specular>
<emission>
<red>0</red>
<green>0.5</green>
<blue>0.7</blue>
</emission>
</animation-->
<!-- Amber -->
<!--animation>
<type>material</type>
<diffuse>
<red>1</red>
<green>0.4</green>
<blue>0</blue>
</diffuse>
<ambient>
<red>0</red>
<green>0</green>
<blue>0</blue>
</ambient>
<specular>
<red>0</red>
<green>0</green>
<blue>0</blue>
</specular>
<emission>
<red>1</red>
<green>0.4</green>
<blue>0</blue>
</emission>
</animation-->
</PropertyList>

View file

@ -0,0 +1,3 @@
AC3Db
OBJECT world
kids 0

View file

@ -4,6 +4,10 @@
<path>resCFM/eicasCFM.ac</path>
<model>
<path>Aircraft/A320Family/Models/Instruments/Upper-ECAM-MSG/ECAM-MSG.xml</path>
</model>
<animation>
<type>select</type>
<object-name>XX.1</object-name>

View file

@ -4,6 +4,10 @@
<path>resIAE/eicasIAE.ac</path>
<model>
<path>Aircraft/A320Family/Models/Instruments/Upper-ECAM-MSG/ECAM-MSG.xml</path>
</model>
<animation>
<type>select</type>
<object-name>XX.1</object-name>

45
Nasal/ECAM.nas Normal file
View file

@ -0,0 +1,45 @@
# A3XX ECAM Messages
# Joshua Davidson (it0uchpods)
# It no works yet, so please don't touch a thing until it works. Thanks -JD
##################
# Init Functions #
##################
setprop("/position/gear-agl-ft", 0);
######################################################
# w = White, b = Blue, g = Green, a = Amber, r = Red #
######################################################
var ECAMinit = func {
MSGclr();
# ECAMloop.start();
}
var MSGclr = func {
setprop("/ECAM/msg/memo", "clear");
setprop("/ECAM/msg/line1", " ");
setprop("/ECAM/msg/line2", " ");
setprop("/ECAM/msg/line3", " ");
setprop("/ECAM/msg/line4", " ");
setprop("/ECAM/msg/line5", " ");
setprop("/ECAM/msg/line6", " ");
setprop("/ECAM/msg/line7", " ");
setprop("/ECAM/msg/line8", " ");
setprop("/ECAM/msg/line1c", "w");
setprop("/ECAM/msg/line2c", "w");
setprop("/ECAM/msg/line3c", "w");
setprop("/ECAM/msg/line4c", "w");
setprop("/ECAM/msg/line5c", "w");
setprop("/ECAM/msg/line6c", "w");
setprop("/ECAM/msg/line7c", "w");
setprop("/ECAM/msg/line8c", "w");
}
var ECAMloop = maketimer(1, func {
if (getprop("/FMGC/status/phase") == 0 or getprop("/FMGC/status/phase") == 1) {
# Activate T.O memo logic
}
});

View file

@ -8,12 +8,12 @@
var engines = props.globals.getNode("/engines").getChildren("engine");
var n1_min = 23.4;
var n2_min = 63.7;
var egt_min = 323;
var egt_min = 434;
var n1_spin = 5.1;
var n2_spin = 22.8;
var n1_start = 23.3;
var n2_start = 63.6;
var egt_start = 507;
var egt_start = 587;
var n1_max = 105.8;
var n2_max = 102.1;
var egt_max = 712;

View file

@ -1,113 +0,0 @@
# Custom Flap/Slat System by Joshua Davidson (it0uchpods)
# In air, flaps 1 is slats only. On ground, it is slats and flaps.
setprop("/controls/flight/flap-lever", 0);
setprop("/controls/flight/flap-pos", 0);
setprop("/controls/flight/flap-txt", " ");
controls.flapsDown = func(step) {
if (step == 1) {
if (getprop("/controls/flight/flap-lever") == 0) {
if (getprop("/velocities/airspeed-kt") <= 100) {
setprop("/controls/flight/flaps", 0.290);
setprop("/controls/flight/slats", 0.666);
setprop("/controls/flight/flap-lever", 1);
setprop("/controls/flight/flap-pos", 2);
setprop("/controls/flight/flap-txt", "1+F");
flaptimer.start();
return;
} else {
setprop("/controls/flight/flaps", 0.000);
setprop("/controls/flight/slats", 0.666);
setprop("/controls/flight/flap-lever", 1);
setprop("/controls/flight/flap-pos", 1);
setprop("/controls/flight/flap-txt", "1");
flaptimer.stop();
return;
}
} else if (getprop("/controls/flight/flap-lever") == 1) {
setprop("/controls/flight/flaps", 0.596);
setprop("/controls/flight/slats", 0.814);
setprop("/controls/flight/flap-lever", 2);
setprop("/controls/flight/flap-pos", 3);
setprop("/controls/flight/flap-txt", "2");
flaptimer.stop();
return;
} else if (getprop("/controls/flight/flap-lever") == 2) {
setprop("/controls/flight/flaps", 0.645);
setprop("/controls/flight/slats", 0.814);
setprop("/controls/flight/flap-lever", 3);
setprop("/controls/flight/flap-pos", 4);
setprop("/controls/flight/flap-txt", "3");
flaptimer.stop();
return;
} else if (getprop("/controls/flight/flap-lever") == 3) {
setprop("/controls/flight/flaps", 1.000);
setprop("/controls/flight/slats", 1.000);
setprop("/controls/flight/flap-lever", 4);
setprop("/controls/flight/flap-pos", 5);
setprop("/controls/flight/flap-txt", "FULL");
flaptimer.stop();
return;
}
} else if (step == -1) {
if (getprop("/controls/flight/flap-lever") == 4) {
setprop("/controls/flight/flaps", 0.645);
setprop("/controls/flight/slats", 0.814);
setprop("/controls/flight/flap-lever", 3);
setprop("/controls/flight/flap-pos", 4);
setprop("/controls/flight/flap-txt", "3");
flaptimer.stop();
return;
} else if (getprop("/controls/flight/flap-lever") == 3) {
setprop("/controls/flight/flaps", 0.596);
setprop("/controls/flight/slats", 0.814);
setprop("/controls/flight/flap-lever", 2);
setprop("/controls/flight/flap-pos", 3);
setprop("/controls/flight/flap-txt", "2");
flaptimer.stop();
return;
} else if (getprop("/controls/flight/flap-lever") == 2) {
if (getprop("/velocities/airspeed-kt") <= 100) {
setprop("/controls/flight/flaps", 0.290);
setprop("/controls/flight/slats", 0.666);
setprop("/controls/flight/flap-lever", 1);
setprop("/controls/flight/flap-pos", 2);
setprop("/controls/flight/flap-txt", "1+F");
flaptimer.start();
return;
} else {
setprop("/controls/flight/flaps", 0.000);
setprop("/controls/flight/slats", 0.666);
setprop("/controls/flight/flap-lever", 1);
setprop("/controls/flight/flap-pos", 1);
setprop("/controls/flight/flap-txt", "1");
flaptimer.stop();
return;
}
} else if (getprop("/controls/flight/flap-lever") == 1) {
setprop("/controls/flight/flaps", 0.000);
setprop("/controls/flight/slats", 0.000);
setprop("/controls/flight/flap-lever", 0);
setprop("/controls/flight/flap-pos", 0);
setprop("/controls/flight/flap-txt", " ");
flaptimer.stop();
return;
}
} else {
return 0;
}
}
var flap_autoretract = func {
if (getprop("/controls/flight/flap-pos") == 2 and getprop("/velocities/airspeed-kt") >= 208) {
setprop("/controls/flight/flaps", 0.000);
setprop("/controls/flight/slats", 0.666);
setprop("/controls/flight/flap-lever", 1);
setprop("/controls/flight/flap-pos", 1);
setprop("/controls/flight/flap-txt", "1");
flaptimer.stop();
}
}
var flaptimer = maketimer(0.5, flap_autoretract);

View file

@ -160,6 +160,7 @@ setlistener("/sim/signals/fdm-initialized", func {
var autopilot = gui.Dialog.new("sim/gui/dialogs/autopilot/dialog", "Aircraft/A320Family/Systems/autopilot-dlg.xml");
setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1);
libraries.ECAMinit();
});
var aglgears = func {
@ -205,4 +206,115 @@ var mcpSPDKnbPull = func {
setprop("/it-autoflight/input/spd-kts", 0.95);
}
}
}
}
# In air, flaps 1 is slats only. On ground, it is slats and flaps.
setprop("/controls/flight/flap-lever", 0);
setprop("/controls/flight/flap-pos", 0);
setprop("/controls/flight/flap-txt", " ");
controls.flapsDown = func(step) {
if (step == 1) {
if (getprop("/controls/flight/flap-lever") == 0) {
if (getprop("/velocities/airspeed-kt") <= 100) {
setprop("/controls/flight/flaps", 0.290);
setprop("/controls/flight/slats", 0.666);
setprop("/controls/flight/flap-lever", 1);
setprop("/controls/flight/flap-pos", 2);
setprop("/controls/flight/flap-txt", "1+F");
flaptimer.start();
return;
} else {
setprop("/controls/flight/flaps", 0.000);
setprop("/controls/flight/slats", 0.666);
setprop("/controls/flight/flap-lever", 1);
setprop("/controls/flight/flap-pos", 1);
setprop("/controls/flight/flap-txt", "1");
flaptimer.stop();
return;
}
} else if (getprop("/controls/flight/flap-lever") == 1) {
setprop("/controls/flight/flaps", 0.596);
setprop("/controls/flight/slats", 0.814);
setprop("/controls/flight/flap-lever", 2);
setprop("/controls/flight/flap-pos", 3);
setprop("/controls/flight/flap-txt", "2");
flaptimer.stop();
return;
} else if (getprop("/controls/flight/flap-lever") == 2) {
setprop("/controls/flight/flaps", 0.645);
setprop("/controls/flight/slats", 0.814);
setprop("/controls/flight/flap-lever", 3);
setprop("/controls/flight/flap-pos", 4);
setprop("/controls/flight/flap-txt", "3");
flaptimer.stop();
return;
} else if (getprop("/controls/flight/flap-lever") == 3) {
setprop("/controls/flight/flaps", 1.000);
setprop("/controls/flight/slats", 1.000);
setprop("/controls/flight/flap-lever", 4);
setprop("/controls/flight/flap-pos", 5);
setprop("/controls/flight/flap-txt", "FULL");
flaptimer.stop();
return;
}
} else if (step == -1) {
if (getprop("/controls/flight/flap-lever") == 4) {
setprop("/controls/flight/flaps", 0.645);
setprop("/controls/flight/slats", 0.814);
setprop("/controls/flight/flap-lever", 3);
setprop("/controls/flight/flap-pos", 4);
setprop("/controls/flight/flap-txt", "3");
flaptimer.stop();
return;
} else if (getprop("/controls/flight/flap-lever") == 3) {
setprop("/controls/flight/flaps", 0.596);
setprop("/controls/flight/slats", 0.814);
setprop("/controls/flight/flap-lever", 2);
setprop("/controls/flight/flap-pos", 3);
setprop("/controls/flight/flap-txt", "2");
flaptimer.stop();
return;
} else if (getprop("/controls/flight/flap-lever") == 2) {
if (getprop("/velocities/airspeed-kt") <= 100) {
setprop("/controls/flight/flaps", 0.290);
setprop("/controls/flight/slats", 0.666);
setprop("/controls/flight/flap-lever", 1);
setprop("/controls/flight/flap-pos", 2);
setprop("/controls/flight/flap-txt", "1+F");
flaptimer.start();
return;
} else {
setprop("/controls/flight/flaps", 0.000);
setprop("/controls/flight/slats", 0.666);
setprop("/controls/flight/flap-lever", 1);
setprop("/controls/flight/flap-pos", 1);
setprop("/controls/flight/flap-txt", "1");
flaptimer.stop();
return;
}
} else if (getprop("/controls/flight/flap-lever") == 1) {
setprop("/controls/flight/flaps", 0.000);
setprop("/controls/flight/slats", 0.000);
setprop("/controls/flight/flap-lever", 0);
setprop("/controls/flight/flap-pos", 0);
setprop("/controls/flight/flap-txt", " ");
flaptimer.stop();
return;
}
} else {
return 0;
}
}
var flaptimer = maketimer(0.5, func {
if (getprop("/controls/flight/flap-pos") == 2 and getprop("/velocities/airspeed-kt") >= 208) {
setprop("/controls/flight/flaps", 0.000);
setprop("/controls/flight/slats", 0.666);
setprop("/controls/flight/flap-lever", 1);
setprop("/controls/flight/flap-pos", 1);
setprop("/controls/flight/flap-txt", "1");
flaptimer.stop();
}
});

View file

@ -18,106 +18,6 @@
</input>
<output>/engines/flex-derate</output>
</filter>
<filter>
<name>EGT L</name>
<type>gain</type>
<gain>1</gain>
<enable>
<condition>
<equals>
<property>/engines/engine[0]/state</property>
<value>3</value>
</equals>
</condition>
</enable>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<condition>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</condition>
<expression>
<table>
<property>/engines/engine[0]/n1</property>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>6</ind><dep>0</dep></entry>
<entry><ind>23.4</ind><dep>323</dep></entry>
<entry><ind>110</ind><dep>690</dep></entry>
</table>
</expression>
</input>
<input>
<condition>
<equals>
<property>/options/eng</property>
<value>IAE</value>
</equals>
</condition>
<expression>
<table>
<property>/engines/engine[0]/n1</property>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>6</ind><dep>0</dep></entry>
<entry><ind>23.4</ind><dep>323</dep></entry>
<entry><ind>110</ind><dep>620</dep></entry>
</table>
</expression>
</input>
<output>/engines/engine[0]/egt-actual</output>
</filter>
<filter>
<name>EGT R</name>
<type>gain</type>
<gain>1</gain>
<enable>
<condition>
<equals>
<property>/engines/engine[1]/state</property>
<value>3</value>
</equals>
</condition>
</enable>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<condition>
<equals>
<property>/options/eng</property>
<value>CFM</value>
</equals>
</condition>
<expression>
<table>
<property>/engines/engine[1]/n1</property>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>6</ind><dep>0</dep></entry>
<entry><ind>23.4</ind><dep>323</dep></entry>
<entry><ind>110</ind><dep>690</dep></entry>
</table>
</expression>
</input>
<input>
<condition>
<equals>
<property>/options/eng</property>
<value>IAE</value>
</equals>
</condition>
<expression>
<table>
<property>/engines/engine[1]/n1</property>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>6</ind><dep>0</dep></entry>
<entry><ind>23.4</ind><dep>323</dep></entry>
<entry><ind>110</ind><dep>620</dep></entry>
</table>
</expression>
</input>
<output>/engines/engine[1]/egt-actual</output>
</filter>
<filter>
<name>FF 1</name>

View file

@ -438,5 +438,71 @@
</input>
<output>/systems/thrust/n1/flx-lim</output>
</filter>
<filter>
<name>EGT L</name>
<type>gain</type>
<gain>1</gain>
<enable>
<condition>
<and>
<equals>
<property>/engines/engine[0]/state</property>
<value>3</value>
</equals>
<greater-than>
<property>/engines/engine[0]/n1</property>
<value>23</value>
</greater-than>
</and>
</condition>
</enable>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<expression>
<table>
<property>/engines/engine[0]/n1</property>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>6</ind><dep>0</dep></entry>
<entry><ind>23.4</ind><dep>434</dep></entry>
<entry><ind>110</ind><dep>690</dep></entry>
</table>
</expression>
</input>
<output>/engines/engine[0]/egt-actual</output>
</filter>
<filter>
<name>EGT R</name>
<type>gain</type>
<gain>1</gain>
<enable>
<condition>
<and>
<equals>
<property>/engines/engine[1]/state</property>
<value>3</value>
</equals>
<greater-than>
<property>/engines/engine[1]/n1</property>
<value>23</value>
</greater-than>
</and>
</condition>
</enable>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<expression>
<table>
<property>/engines/engine[1]/n1</property>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>6</ind><dep>0</dep></entry>
<entry><ind>23.4</ind><dep>434</dep></entry>
<entry><ind>110</ind><dep>690</dep></entry>
</table>
</expression>
</input>
<output>/engines/engine[1]/egt-actual</output>
</filter>
</PropertyList>

View file

@ -704,5 +704,71 @@
</input>
<output>/systems/thrust/epr/clb-lim</output>
</filter>
<filter>
<name>EGT L</name>
<type>gain</type>
<gain>1</gain>
<enable>
<condition>
<and>
<equals>
<property>/engines/engine[0]/state</property>
<value>3</value>
</equals>
<greater-than>
<property>/engines/engine[0]/n1</property>
<value>23</value>
</greater-than>
</and>
</condition>
</enable>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<expression>
<table>
<property>/engines/engine[0]/n1</property>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>6</ind><dep>0</dep></entry>
<entry><ind>23.4</ind><dep>434</dep></entry>
<entry><ind>110</ind><dep>620</dep></entry>
</table>
</expression>
</input>
<output>/engines/engine[0]/egt-actual</output>
</filter>
<filter>
<name>EGT R</name>
<type>gain</type>
<gain>1</gain>
<enable>
<condition>
<and>
<equals>
<property>/engines/engine[1]/state</property>
<value>3</value>
</equals>
<greater-than>
<property>/engines/engine[1]/n1</property>
<value>23</value>
</greater-than>
</and>
</condition>
</enable>
<update-interval-secs type="double">0.05</update-interval-secs>
<input>
<expression>
<table>
<property>/engines/engine[1]/n1</property>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>6</ind><dep>0</dep></entry>
<entry><ind>23.4</ind><dep>434</dep></entry>
<entry><ind>110</ind><dep>620</dep></entry>
</table>
</expression>
</input>
<output>/engines/engine[1]/egt-actual</output>
</filter>
</PropertyList>

View file

@ -1,6 +1,6 @@
<!-- Airbus A3XX FMGC System by Joshua Davidson (it0uchpods) and Jonathan Redpath (legoboyvdlp) -->
<system name="it-fbw">
<system name="fmgc">
<property value="0">/FMGC/internal/greendot-kts</property>
<channel name="GreenDot">