Add PFD/ND XFR option to shared libraries
This commit is contained in:
parent
aa505c4b49
commit
94e0d0d158
3 changed files with 94 additions and 12 deletions
|
@ -58,6 +58,7 @@ var systemsReset = func {
|
||||||
setprop("/it-autoflight/input/fd1", 1);
|
setprop("/it-autoflight/input/fd1", 1);
|
||||||
setprop("/it-autoflight/input/fd2", 1);
|
setprop("/it-autoflight/input/fd2", 1);
|
||||||
libraries.ECAMinit();
|
libraries.ECAMinit();
|
||||||
|
libraries.variousReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
var failReset = func {
|
var failReset = func {
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
<!-- Primary Flight Displays -->
|
<!-- Primary Flight Displays -->
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
|
<name>PFD1</name>
|
||||||
<path>Aircraft/A320Family/Models/Instruments/PFD/PFD1.xml</path>
|
<path>Aircraft/A320Family/Models/Instruments/PFD/PFD1.xml</path>
|
||||||
<offsets>
|
<offsets>
|
||||||
<x-m>-0.5807</x-m>
|
<x-m>-0.5807</x-m>
|
||||||
|
@ -73,20 +74,39 @@
|
||||||
<pitch-deg>-15</pitch-deg>
|
<pitch-deg>-15</pitch-deg>
|
||||||
</offsets>
|
</offsets>
|
||||||
<condition>
|
<condition>
|
||||||
<or>
|
<and>
|
||||||
<greater-than-equals>
|
<or>
|
||||||
<property>/systems/electrical/bus/ac1</property>
|
<greater-than-equals>
|
||||||
<value>25</value>
|
<property>/systems/electrical/bus/ac1</property>
|
||||||
</greater-than-equals>
|
<value>25</value>
|
||||||
<greater-than-equals>
|
</greater-than-equals>
|
||||||
<property>/systems/electrical/bus/ac2</property>
|
<greater-than-equals>
|
||||||
<value>25</value>
|
<property>/systems/electrical/bus/ac2</property>
|
||||||
</greater-than-equals>
|
<value>25</value>
|
||||||
</or>
|
</greater-than-equals>
|
||||||
|
</or>
|
||||||
|
<not-equals>
|
||||||
|
<property>/modes/cpt-du-xfr</property>
|
||||||
|
<value>2</value>
|
||||||
|
</not-equals>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>translate</type>
|
||||||
|
<object-name>PFD1</object-name>
|
||||||
|
<property>/modes/cpt-du-xfr</property>
|
||||||
|
<factor>0.18845</factor>
|
||||||
|
<axis>
|
||||||
|
<x>0</x>
|
||||||
|
<y>1</y>
|
||||||
|
<z>0</z>
|
||||||
|
</axis>
|
||||||
|
</animation>
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
|
<name>PFD2</name>
|
||||||
<path>Aircraft/A320Family/Models/Instruments/PFD/PFD2.xml</path>
|
<path>Aircraft/A320Family/Models/Instruments/PFD/PFD2.xml</path>
|
||||||
<offsets>
|
<offsets>
|
||||||
<x-m>-0.5807</x-m>
|
<x-m>-0.5807</x-m>
|
||||||
|
@ -104,13 +124,30 @@
|
||||||
<property>/systems/electrical/bus/ac2</property>
|
<property>/systems/electrical/bus/ac2</property>
|
||||||
<value>25</value>
|
<value>25</value>
|
||||||
</greater-than-equals>
|
</greater-than-equals>
|
||||||
|
<not-equals>
|
||||||
|
<property>/modes/fo-du-xfr</property>
|
||||||
|
<value>2</value>
|
||||||
|
</not-equals>
|
||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>translate</type>
|
||||||
|
<object-name>PFD2</object-name>
|
||||||
|
<property>/modes/fo-du-xfr</property>
|
||||||
|
<factor>-0.19505</factor>
|
||||||
|
<axis>
|
||||||
|
<x>0</x>
|
||||||
|
<y>1</y>
|
||||||
|
<z>0</z>
|
||||||
|
</axis>
|
||||||
|
</animation>
|
||||||
|
|
||||||
<!-- Navigational Displays -->
|
<!-- Navigational Displays -->
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
|
<name>ND1</name>
|
||||||
<path>Aircraft/A320Family/Models/Instruments/ND/ND_L.xml</path>
|
<path>Aircraft/A320Family/Models/Instruments/ND/ND_L.xml</path>
|
||||||
<offsets>
|
<offsets>
|
||||||
<x-m>-0.5807</x-m>
|
<x-m>-0.5807</x-m>
|
||||||
|
@ -119,7 +156,7 @@
|
||||||
<pitch-deg>-15</pitch-deg>
|
<pitch-deg>-15</pitch-deg>
|
||||||
</offsets>
|
</offsets>
|
||||||
<condition>
|
<condition>
|
||||||
<or>
|
<and>
|
||||||
<greater-than-equals>
|
<greater-than-equals>
|
||||||
<property>/systems/electrical/bus/ac1</property>
|
<property>/systems/electrical/bus/ac1</property>
|
||||||
<value>25</value>
|
<value>25</value>
|
||||||
|
@ -128,11 +165,28 @@
|
||||||
<property>/systems/electrical/bus/ac2</property>
|
<property>/systems/electrical/bus/ac2</property>
|
||||||
<value>25</value>
|
<value>25</value>
|
||||||
</greater-than-equals>
|
</greater-than-equals>
|
||||||
</or>
|
<not-equals>
|
||||||
|
<property>/modes/cpt-du-xfr</property>
|
||||||
|
<value>2</value>
|
||||||
|
</not-equals>
|
||||||
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>translate</type>
|
||||||
|
<object-name>ND1</object-name>
|
||||||
|
<property>/modes/cpt-du-xfr</property>
|
||||||
|
<factor>-0.18845</factor>
|
||||||
|
<axis>
|
||||||
|
<x>0</x>
|
||||||
|
<y>1</y>
|
||||||
|
<z>0</z>
|
||||||
|
</axis>
|
||||||
|
</animation>
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
|
<name>ND2</name>
|
||||||
<path>Aircraft/A320Family/Models/Instruments/ND/ND_R.xml</path>
|
<path>Aircraft/A320Family/Models/Instruments/ND/ND_R.xml</path>
|
||||||
<offsets>
|
<offsets>
|
||||||
<x-m>-0.5807</x-m>
|
<x-m>-0.5807</x-m>
|
||||||
|
@ -150,13 +204,30 @@
|
||||||
<property>/systems/electrical/bus/ac2</property>
|
<property>/systems/electrical/bus/ac2</property>
|
||||||
<value>25</value>
|
<value>25</value>
|
||||||
</greater-than-equals>
|
</greater-than-equals>
|
||||||
|
<not-equals>
|
||||||
|
<property>/modes/fo-du-xfr</property>
|
||||||
|
<value>2</value>
|
||||||
|
</not-equals>
|
||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>translate</type>
|
||||||
|
<object-name>ND2</object-name>
|
||||||
|
<property>/modes/fo-du-xfr</property>
|
||||||
|
<factor>0.19505</factor>
|
||||||
|
<axis>
|
||||||
|
<x>0</x>
|
||||||
|
<y>1</y>
|
||||||
|
<z>0</z>
|
||||||
|
</axis>
|
||||||
|
</animation>
|
||||||
|
|
||||||
<!-- Engine Indications and Crew Alerting System (Upper ECAM) -->
|
<!-- Engine Indications and Crew Alerting System (Upper ECAM) -->
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
|
<name>UECAM</name>
|
||||||
<path>Aircraft/A320Family/Models/Instruments/Upper-ECAM/Upper-ECAM-CFM.xml</path>
|
<path>Aircraft/A320Family/Models/Instruments/Upper-ECAM/Upper-ECAM-CFM.xml</path>
|
||||||
<offsets>
|
<offsets>
|
||||||
<x-m>-0.5807</x-m>
|
<x-m>-0.5807</x-m>
|
||||||
|
@ -186,6 +257,7 @@
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
|
<name>UECAM</name>
|
||||||
<path>Aircraft/A320Family/Models/Instruments/Upper-ECAM/Upper-ECAM-IAE.xml</path>
|
<path>Aircraft/A320Family/Models/Instruments/Upper-ECAM/Upper-ECAM-IAE.xml</path>
|
||||||
<offsets>
|
<offsets>
|
||||||
<x-m>-0.5807</x-m>
|
<x-m>-0.5807</x-m>
|
||||||
|
@ -215,6 +287,7 @@
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
|
<name>UECAM</name>
|
||||||
<path>Aircraft/A320Family/Models/Instruments/Upper-ECAM-EIS2/Upper-ECAM-CFM.xml</path>
|
<path>Aircraft/A320Family/Models/Instruments/Upper-ECAM-EIS2/Upper-ECAM-CFM.xml</path>
|
||||||
<offsets>
|
<offsets>
|
||||||
<x-m>-0.5807</x-m>
|
<x-m>-0.5807</x-m>
|
||||||
|
@ -244,6 +317,7 @@
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
|
<name>UECAM</name>
|
||||||
<path>Aircraft/A320Family/Models/Instruments/Upper-ECAM-EIS2/Upper-ECAM-IAE.xml</path>
|
<path>Aircraft/A320Family/Models/Instruments/Upper-ECAM-EIS2/Upper-ECAM-IAE.xml</path>
|
||||||
<offsets>
|
<offsets>
|
||||||
<x-m>-0.5807</x-m>
|
<x-m>-0.5807</x-m>
|
||||||
|
@ -275,6 +349,7 @@
|
||||||
<!-- Lower ECAM -->
|
<!-- Lower ECAM -->
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
|
<name>ECAM</name>
|
||||||
<path>Aircraft/A320Family/Models/Instruments/ECAM/ECAM.xml</path>
|
<path>Aircraft/A320Family/Models/Instruments/ECAM/ECAM.xml</path>
|
||||||
<offsets>
|
<offsets>
|
||||||
<x-m>-0.53631</x-m>
|
<x-m>-0.53631</x-m>
|
||||||
|
|
|
@ -161,8 +161,14 @@ setlistener("/sim/signals/fdm-initialized", func {
|
||||||
setprop("/it-autoflight/input/fd1", 1);
|
setprop("/it-autoflight/input/fd1", 1);
|
||||||
setprop("/it-autoflight/input/fd2", 1);
|
setprop("/it-autoflight/input/fd2", 1);
|
||||||
libraries.ECAMinit();
|
libraries.ECAMinit();
|
||||||
|
libraries.variousReset();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var variousReset = func {
|
||||||
|
setprop("/modes/cpt-du-xfr", 0);
|
||||||
|
setprop("/modes/fo-du-xfr", 0);
|
||||||
|
}
|
||||||
|
|
||||||
var aglgears = func {
|
var aglgears = func {
|
||||||
var agl = getprop("/position/altitude-agl-ft") or 0;
|
var agl = getprop("/position/altitude-agl-ft") or 0;
|
||||||
var aglft = agl - 11.101; # is the position from the Airbus A320 above ground
|
var aglft = agl - 11.101; # is the position from the Airbus A320 above ground
|
||||||
|
|
Reference in a new issue