update/fix ADIRS by legoboyvdlp, fix overhead panels ADIRS switches/lights properly

This commit is contained in:
Jonathan Redpath 2017-04-07 18:49:01 +01:00 committed by Joshua Davidson
parent a7b7c78102
commit eb59edab74
15 changed files with 35918 additions and 872 deletions

View file

@ -89,6 +89,7 @@
<systems> <systems>
<file>Aircraft/A320Family/Nasal/electrical.nas</file> <file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/engines.nas</file> <file>Aircraft/A320Family/Nasal/engines.nas</file>
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file>
</systems> </systems>
<fbw> <fbw>
<file>Aircraft/A320Family/Nasal/it-fbw.nas</file> <file>Aircraft/A320Family/Nasal/it-fbw.nas</file>

View file

@ -82,6 +82,7 @@
<systems> <systems>
<file>Aircraft/A320Family/Nasal/electrical.nas</file> <file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/engines.nas</file> <file>Aircraft/A320Family/Nasal/engines.nas</file>
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file>
</systems> </systems>
<fbw> <fbw>
<file>Aircraft/A320Family/Nasal/it-fbw.nas</file> <file>Aircraft/A320Family/Nasal/it-fbw.nas</file>

View file

@ -73,6 +73,29 @@
<instrumentation> <instrumentation>
<path>Aircraft/A320Family/Systems/instrumentation.xml</path> <path>Aircraft/A320Family/Systems/instrumentation.xml</path>
<adirs n="0">
<ir n="0">
<aligned type="bool">false</aligned>
<display>
<status type="string"></status>
<ttn type="int">0</ttn>
</display>
</ir>
<ir n="1">
<aligned type="bool">false</aligned>
<display>
<status type="string"></status>
<ttn type="int">0</ttn>
</display>
</ir>
<ir n="2">
<aligned type="bool">false</aligned>
<display>
<status type="string"></status>
<ttn type="int">0</ttn>
</display>
</ir>
</adirs>
</instrumentation> </instrumentation>
<alarms> <alarms>
@ -290,6 +313,43 @@
</autopilot> </autopilot>
<controls> <controls>
<adirs n="0">
<adr n="0">
<fault type="bool">false</fault>
<off type="bool">false</off>
</adr>
<adr n="1">
<fault type="bool">false</fault>
<off type="bool">false</off>
</adr>
<adr n="2">
<fault type="bool">false</fault>
<off type="bool">false</off>
</adr>
<display>
<selected type="int">1</selected>
<dataknob type="int">5</dataknob>
<text type="string"></text>
</display>
<ir n="0">
<align type="bool">false</align>
<knob type="int">1</knob>
<fault type="bool">false</fault>
</ir>
<ir n="1">
<align type="bool">false</align>
<knob type="int">1</knob>
<fault type="bool">false</fault>
</ir>
<ir n="2">
<align type="bool">false</align>
<knob type="int">1</knob>
<fault type="bool">false</fault>
</ir>
<onbat type="bool">false</onbat>
<motionroll type="float">0</motionroll>
<motionpitch type="float">0</motionpitch>
</adirs>
<APU> <APU>
<fire-switch type="bool">0</fire-switch> <fire-switch type="bool">0</fire-switch>
<master type="bool">0</master> <master type="bool">0</master>

View file

@ -82,6 +82,7 @@
<systems> <systems>
<file>Aircraft/A320Family/Nasal/electrical.nas</file> <file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/engines.nas</file> <file>Aircraft/A320Family/Nasal/engines.nas</file>
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file>
</systems> </systems>
<fbw> <fbw>
<file>Aircraft/A320Family/Nasal/it-fbw.nas</file> <file>Aircraft/A320Family/Nasal/it-fbw.nas</file>

View file

@ -88,6 +88,7 @@
<systems> <systems>
<file>Aircraft/A320Family/Nasal/electrical.nas</file> <file>Aircraft/A320Family/Nasal/electrical.nas</file>
<file>Aircraft/A320Family/Nasal/engines.nas</file> <file>Aircraft/A320Family/Nasal/engines.nas</file>
<file>Aircraft/A320Family/Nasal/ADIRS.nas</file>
</systems> </systems>
<fbw> <fbw>
<file>Aircraft/A320Family/Nasal/it-fbw.nas</file> <file>Aircraft/A320Family/Nasal/it-fbw.nas</file>

View file

@ -35,6 +35,7 @@ var colddark = func {
setprop("/controls/flight/speedbrake-arm", 0); setprop("/controls/flight/speedbrake-arm", 0);
setprop("/controls/gear/gear-down", 1); setprop("/controls/gear/gear-down", 1);
systems.elec_init(); systems.elec_init();
systems.ADIRSreset();
itaf.ap_init(); itaf.ap_init();
setprop("/it-autoflight/input/fd1", 1); setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1); setprop("/it-autoflight/input/fd2", 1);
@ -78,6 +79,7 @@ var beforestart = func {
setprop("/controls/flight/speedbrake-arm", 0); setprop("/controls/flight/speedbrake-arm", 0);
setprop("/controls/gear/gear-down", 1); setprop("/controls/gear/gear-down", 1);
systems.elec_init(); systems.elec_init();
systems.ADIRSreset();
itaf.ap_init(); itaf.ap_init();
setprop("/it-autoflight/input/fd1", 1); setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1); setprop("/it-autoflight/input/fd2", 1);
@ -107,6 +109,15 @@ var beforestart_b = func {
setprop("/controls/APU/bleed", 1); setprop("/controls/APU/bleed", 1);
setprop("/controls/electrical/switches/gen1", 1); setprop("/controls/electrical/switches/gen1", 1);
setprop("/controls/electrical/switches/gen2", 1); setprop("/controls/electrical/switches/gen2", 1);
setprop("controls/adirs/ir[0]/knob","2");
setprop("controls/adirs/ir[1]/knob","2");
setprop("controls/adirs/ir[2]/knob","2");
setprop("instrumentation/adirs/ir[0]/display/ttn",0);
setprop("instrumentation/adirs/ir[1]/display/ttn",0);
setprop("instrumentation/adirs/ir[2]/display/ttn",0);
setprop("instrumentation/adirs/ir[0]/aligned",1);
setprop("instrumentation/adirs/ir[1]/aligned",1);
setprop("instrumentation/adirs/ir[2]/aligned",1);
setprop("/systems/acconfig/autoconfig-running", 0); setprop("/systems/acconfig/autoconfig-running", 0);
ps_load_dlg.close(); ps_load_dlg.close();
ps_loaded_dlg.open(); ps_loaded_dlg.open();
@ -128,6 +139,7 @@ var taxi = func {
setprop("/controls/flight/speedbrake-arm", 0); setprop("/controls/flight/speedbrake-arm", 0);
setprop("/controls/gear/gear-down", 1); setprop("/controls/gear/gear-down", 1);
systems.elec_init(); systems.elec_init();
systems.ADIRSreset();
itaf.ap_init(); itaf.ap_init();
setprop("/it-autoflight/input/fd1", 1); setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1); setprop("/it-autoflight/input/fd2", 1);
@ -157,6 +169,15 @@ var taxi_b = func {
setprop("/controls/APU/bleed", 1); setprop("/controls/APU/bleed", 1);
setprop("/controls/electrical/switches/gen1", 1); setprop("/controls/electrical/switches/gen1", 1);
setprop("/controls/electrical/switches/gen2", 1); setprop("/controls/electrical/switches/gen2", 1);
setprop("controls/adirs/ir[0]/knob","2");
setprop("controls/adirs/ir[1]/knob","2");
setprop("controls/adirs/ir[2]/knob","2");
setprop("instrumentation/adirs/ir[0]/display/ttn",0);
setprop("instrumentation/adirs/ir[1]/display/ttn",0);
setprop("instrumentation/adirs/ir[2]/display/ttn",0);
setprop("instrumentation/adirs/ir[0]/aligned",1);
setprop("instrumentation/adirs/ir[1]/aligned",1);
setprop("instrumentation/adirs/ir[2]/aligned",1);
setprop("/controls/engines/engine-start-switch", 2); setprop("/controls/engines/engine-start-switch", 2);
setprop("/controls/engines/engine[1]/cutoff-switch", 0); setprop("/controls/engines/engine[1]/cutoff-switch", 0);
var eng_two_chk = setlistener("/engines/engine[1]/state", func { var eng_two_chk = setlistener("/engines/engine[1]/state", func {

View file

@ -82,9 +82,15 @@
<object-name>APUMasterBtn2O</object-name> <object-name>APUMasterBtn2O</object-name>
<object-name>APUStartBtn1A</object-name> <object-name>APUStartBtn1A</object-name>
<object-name>APUStartBtn2O</object-name> <object-name>APUStartBtn2O</object-name>
<object-name>ADR1Btn1F</object-name>
<object-name>ADR1Btn2O</object-name>
<object-name>ADR2Btn1F</object-name>
<object-name>ADR2Btn2O</object-name>
<object-name>ADR3Btn1F</object-name>
<object-name>ADR3Btn2O</object-name>
<object-name>BatteryBtn11F</object-name> <object-name>BatteryBtn11F</object-name>
<object-name>BatteryBtn21F</object-name>
<object-name>BatteryBtn12O</object-name> <object-name>BatteryBtn12O</object-name>
<object-name>BatteryBtn21F</object-name>
<object-name>BatteryBtn22O</object-name> <object-name>BatteryBtn22O</object-name>
<object-name>Battery-lvl</object-name> <object-name>Battery-lvl</object-name>
<object-name>BusTieBtn2O</object-name> <object-name>BusTieBtn2O</object-name>
@ -98,6 +104,13 @@
<object-name>Gen2Btn2O</object-name> <object-name>Gen2Btn2O</object-name>
<object-name>IDG1Btn1F</object-name> <object-name>IDG1Btn1F</object-name>
<object-name>IDG2Btn1F</object-name> <object-name>IDG2Btn1F</object-name>
<object-name>IR1Btn1F</object-name>
<object-name>IR1Btn2A</object-name>
<object-name>IR2Btn1F</object-name>
<object-name>IR2Btn2A</object-name>
<object-name>IR3Btn1F</object-name>
<object-name>IR3Btn2A</object-name>
<object-name>IrsOnBatLightOB</object-name>
<condition> <condition>
<or> <or>
<equals> <equals>
@ -141,17 +154,551 @@
<object-name>adirs-coords</object-name> <object-name>adirs-coords</object-name>
<condition> <condition>
<greater-than-equals> <greater-than-equals>
<property>/systems/electrical/outputs/efis</property> <property>/systems/electrical/bus/dc1</property>
<value>9</value> <value>25</value>
</greater-than-equals> </greater-than-equals>
</condition> </condition>
</animation> </animation>
<!-- IRS 1 -->
<animation>
<type>pick</type>
<object-name>IR1ModeKnb</object-name>
<action>
<button>0</button>
<button>3</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>property-cycle</command>
<property>/controls/adirs/ir[0]/knob</property>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<max>3</max>
</binding>
</action>
<action>
<button>1</button>
<button>4</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>property-cycle</command>
<property>/controls/adirs/ir[0]/knob</property>
<value type="int">3</value>
<value type="int">2</value>
<value type="int">1</value>
<min>1</min>
</binding>
</action>
</animation>
<animation>
<type>rotate</type>
<object-name>IR1ModeKnb</object-name>
<property>/controls/adirs/ir[0]/knob</property>
<interpolation>
<entry><ind>1</ind><dep>-35</dep></entry>
<entry><ind>2</ind><dep>0</dep></entry>
<entry><ind>3</ind><dep>35</dep></entry>
</interpolation>
<axis>
<x1-m>0.01578</x1-m>
<y1-m>-0.29391</y1-m>
<z1-m>0.1338</z1-m>
<x2-m>0.00637</x2-m>
<y2-m>-0.29509</y2-m>
<z2-m>0.1338</z2-m>
</axis>
</animation>
<animation> <animation>
<type>select</type> <type>select</type>
<object-name>Battery-lvl</object-name> <object-name>IR1Btn1F</object-name>
<condition> <condition>
<property>controls/electric/battery-switch</property> <or>
<equals>
<property>/controls/adirs/ir[0]/fault</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>IR1Btn2A</object-name>
<condition>
<or>
<equals>
<property>/controls/adirs/ir[0]/align</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<!-- IRS 2 -->
<animation>
<type>pick</type>
<object-name>IR2ModeKnb</object-name>
<action>
<button>0</button>
<button>3</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>property-cycle</command>
<property>/controls/adirs/ir[1]/knob</property>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<max>3</max>
</binding>
</action>
<action>
<button>1</button>
<button>4</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>property-cycle</command>
<property>/controls/adirs/ir[1]/knob</property>
<value type="int">3</value>
<value type="int">2</value>
<value type="int">1</value>
<min>1</min>
</binding>
</action>
</animation>
<animation>
<type>rotate</type>
<object-name>IR2ModeKnb</object-name>
<property>/controls/adirs/ir[1]/knob</property>
<interpolation>
<entry><ind>1</ind><dep>-35</dep></entry>
<entry><ind>2</ind><dep>0</dep></entry>
<entry><ind>3</ind><dep>35</dep></entry>
</interpolation>
<axis>
<x1-m>0.00444</x1-m>
<y1-m>-0.20312</y1-m>
<z1-m>0.1338</z1-m>
<x2-m>-0.00498</x2-m>
<y2-m>-0.20429</y2-m>
<z2-m>0.1338</z2-m>
</axis>
</animation>
<animation>
<type>select</type>
<object-name>IR2Btn1F</object-name>
<condition>
<or>
<equals>
<property>/controls/adirs/ir[1]/fault</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>IR2Btn2A</object-name>
<condition>
<or>
<equals>
<property>/controls/adirs/ir[1]/align</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<!-- IRS 3 -->
<animation>
<type>pick</type>
<object-name>IR3ModeKnb</object-name>
<action>
<button>0</button>
<button>3</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>property-cycle</command>
<property>/controls/adirs/ir[2]/knob</property>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<max>3</max>
</binding>
</action>
<action>
<button>1</button>
<button>4</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>property-cycle</command>
<property>/controls/adirs/ir[2]/knob</property>
<value type="int">3</value>
<value type="int">2</value>
<value type="int">1</value>
<min>1</min>
</binding>
</action>
</animation>
<animation>
<type>rotate</type>
<object-name>IR3ModeKnb</object-name>
<property>/controls/adirs/ir[2]/knob</property>
<interpolation>
<entry><ind>1</ind><dep>-35</dep></entry>
<entry><ind>2</ind><dep>0</dep></entry>
<entry><ind>3</ind><dep>35</dep></entry>
</interpolation>
<axis>
<x1-m>0.01021</x1-m>
<y1-m>-0.24926</y1-m>
<z1-m>0.1338</z1-m>
<x2-m>0.00082</x2-m>
<y2-m>-0.25062</y2-m>
<z2-m>0.1338</z2-m>
</axis>
</animation>
<animation>
<type>select</type>
<object-name>IR3Btn1F</object-name>
<condition>
<or>
<equals>
<property>/controls/adirs/ir[2]/fault</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>IR3Btn2A</object-name>
<condition>
<or>
<equals>
<property>/controls/adirs/ir[2]/align</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<!-- IR Display Data Knob -->
<animation>
<type>pick</type>
<object-name>IRDisplayDataKnb</object-name>
<action>
<button>0</button>
<button>3</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>property-cycle</command>
<property>/controls/adirs/display/dataknob</property>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<max>6</max>
</binding>
</action>
<action>
<button>1</button>
<button>4</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>property-cycle</command>
<property>/controls/adirs/display/dataknob</property>
<value type="int">6</value>
<value type="int">5</value>
<value type="int">4</value>
<value type="int">3</value>
<value type="int">2</value>
<value type="int">1</value>
<min>1</min>
</binding>
</action>
</animation>
<animation>
<type>rotate</type>
<object-name>IRDisplayDataKnb</object-name>
<property>/controls/adirs/display/dataknob</property>
<interpolation>
<entry><ind>1</ind><dep>-90</dep></entry>
<entry><ind>2</ind><dep>-55</dep></entry>
<entry><ind>3</ind><dep>-15</dep></entry>
<entry><ind>4</ind><dep>30</dep></entry>
<entry><ind>5</ind><dep>50</dep></entry>
<entry><ind>6</ind><dep>90</dep></entry>
</interpolation>
<axis>
<x1-m>0.01551</x1-m>
<y1-m>-0.29163</y1-m>
<z1-m>0.2088</z1-m>
<x2-m>0.00609</x2-m>
<y2-m>-0.2928</y2-m>
<z2-m>0.2088</z2-m>
</axis>
</animation>
<!-- IRS Display Select Knob -->
<animation>
<type>pick</type>
<object-name>IRDisplaySelectKnb</object-name>
<action>
<button>0</button>
<button>3</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>property-cycle</command>
<property>/controls/adirs/display/selected</property>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<max>4</max>
</binding>
</action>
<action>
<button>1</button>
<button>4</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>property-cycle</command>
<property>/controls/adirs/display/selected</property>
<value type="int">4</value>
<value type="int">3</value>
<value type="int">2</value>
<value type="int">1</value>
<min>1</min>
</binding>
</action>
</animation>
<animation>
<type>rotate</type>
<object-name>IRDisplaySelectKnb</object-name>
<property>/controls/adirs/display/selected</property>
<interpolation>
<entry><ind>1</ind><dep>-80</dep></entry>
<entry><ind>2</ind><dep>-45</dep></entry>
<entry><ind>3</ind><dep>5</dep></entry>
<entry><ind>4</ind><dep>45</dep></entry>
</interpolation>
<axis>
<x1-m>0.00746</x1-m>
<y1-m>-0.24638</y1-m>
<z1-m>0.2072</z1-m>
<x2-m>0.0004</x2-m>
<y2-m>-0.24726</y2-m>
<z2-m>0.2072</z2-m>
</axis>
</animation>
<!-- On Bat Light -->
<animation>
<type>select</type>
<object-name>IrsOnBatLightOB</object-name>
<condition>
<or>
<equals>
<property>/controls/adirs/onbat</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<!-- ADR 1 -->
<animation>
<type>pick</type>
<object-name>ADR1Btn1</object-name>
<object-name>ADR1Btn2</object-name>
<object-name>ADR1Btn1F</object-name>
<object-name>ADR1Btn2O</object-name>
<action>
<button>0</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>property-toggle</command>
<property>/controls/adirs/adr[0]/off</property>
</binding>
</action>
</animation>
<animation>
<type>select</type>
<object-name>ADR1Btn1F</object-name>
<condition>
<or>
<equals>
<property>/controls/adirs/adr[0]/fault</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>ADR1Btn2O</object-name>
<condition>
<or>
<equals>
<property>/controls/adirs/adr[0]/off</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<!-- ADR 2 -->
<animation>
<type>pick</type>
<object-name>ADR2Btn1</object-name>
<object-name>ADR2Btn2</object-name>
<object-name>ADR2Btn1F</object-name>
<object-name>ADR2Btn2O</object-name>
<action>
<button>0</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>property-toggle</command>
<property>/controls/adirs/adr[1]/off</property>
</binding>
</action>
</animation>
<animation>
<type>select</type>
<object-name>ADR2Btn1F</object-name>
<condition>
<or>
<equals>
<property>/controls/adirs/adr[1]/fault</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>ADR2Btn2O</object-name>
<condition>
<or>
<equals>
<property>/controls/adirs/adr[1]/off</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<!-- ADR 3 -->
<animation>
<type>pick</type>
<object-name>ADR3Btn1</object-name>
<object-name>ADR3Btn2</object-name>
<object-name>ADR3Btn1F</object-name>
<object-name>ADR3Btn2O</object-name>
<action>
<button>0</button>
<repeatable type="bool">false</repeatable>
<binding>
<command>property-toggle</command>
<property>/controls/adirs/adr[2]/off</property>
</binding>
</action>
</animation>
<animation>
<type>select</type>
<object-name>ADR3Btn1F</object-name>
<condition>
<or>
<equals>
<property>/controls/adirs/adr[2]/fault</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>ADR3Btn2O</object-name>
<condition>
<or>
<equals>
<property>/controls/adirs/adr[2]/off</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition> </condition>
</animation> </animation>
@ -202,7 +749,7 @@
<!-- Call --> <!-- Call -->
<animation> <!--animation>
<name>Ground Call pick</name> <name>Ground Call pick</name>
<type>pick</type> <type>pick</type>
<object-name>GroundCall</object-name> <object-name>GroundCall</object-name>
@ -240,7 +787,7 @@
</script> </script>
</binding> </binding>
</action> </action>
</animation> </animation-->
<!-- GPWS --> <!-- GPWS -->
<animation> <animation>
@ -1864,7 +2411,7 @@
<condition> <condition>
<or> <or>
<greater-than> <greater-than>
<property>/systems/apu/rpm</property> <property>controls/APU/start</property>
<value>99</value> <value>99</value>
</greater-than> </greater-than>
<equals> <equals>
@ -2329,8 +2876,8 @@
<axis-alignment>xy-plane</axis-alignment> <axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type> <type type="string">text-value</type>
<format type="string">%s</format> <format type="string">%s</format>
<property>/instrumentation/oh-panel/pos-string</property> <property>/controls/adirs/display/text</property>
<font type="string">Helvetica.txf</font> <font type="string">LED-8.txf</font>
<draw-text type="bool">true</draw-text> <draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment> <draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox> <draw-boundingbox type="bool">false</draw-boundingbox>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

247
Nasal/ADIRS.nas Normal file
View file

@ -0,0 +1,247 @@
# A320Family ADIRS system
# Jonathan Redpath
# Minor Modifications by Joshua Davidson
#####################
# Initializing Vars #
#####################
# Initializing these vars here to prevent nasal nil used in numeric context, since the electrical system doesn't until fdm init is done. -JD
setprop("/systems/electrical/bus/dc1", 0);
setprop("/systems/electrical/bus/dc2", 0);
setprop("/systems/electrical/bus/dc-ess", 0);
setprop("/systems/electrical/bus/ac1", 0);
setprop("/systems/electrical/bus/ac2", 0);
setprop("/systems/electrical/bus/ac-ess", 0);
var ADIRSinit = func {
var motionroll = getprop("/controls/adirs/motionroll");
var motionpitch = getprop("/controls/adirs/motionpitch");
adirs_timer.start();
}
var ADIRSreset = func {
setprop("/controls/adirs/numm", 0);
setprop("instrumentation/adirs/ir[0]/aligned",0);
setprop("instrumentation/adirs/ir[1]/aligned",0);
setprop("instrumentation/adirs/ir[2]/aligned",0);
setprop("instrumentation/adirs/ir[0]/display/ttn",0);
setprop("instrumentation/adirs/ir[1]/display/ttn",0);
setprop("instrumentation/adirs/ir[2]/display/ttn",0);
setprop("instrumentation/adirs/ir[0]/display/status","- - - - - - - - ");
setprop("instrumentation/adirs/ir[1]/display/status","- - - - - - - - ");
setprop("instrumentation/adirs/ir[2]/display/status","- - - - - - - - ");
setprop("controls/adirs/adr[0]/fault",0);
setprop("controls/adirs/adr[1]/fault",0);
setprop("controls/adirs/adr[2]/fault",0);
setprop("controls/adirs/adr[0]/off",0);
setprop("controls/adirs/adr[1]/off",0);
setprop("controls/adirs/adr[2]/off",0);
setprop("controls/adirs/display/text","");
setprop("controls/adirs/display/dataknob","5");
setprop("controls/adirs/display/selected","1");
setprop("controls/adirs/ir[0]/align",0);
setprop("controls/adirs/ir[1]/align",0);
setprop("controls/adirs/ir[2]/align",0);
setprop("controls/adirs/ir[0]/knob","0");
setprop("controls/adirs/ir[1]/knob","0");
setprop("controls/adirs/ir[2]/knob","0");
setprop("controls/adirs/ir[0]/fault",0);
setprop("controls/adirs/ir[1]/fault",0);
setprop("controls/adirs/ir[2]/fault",0);
setprop("controls/adirs/onbat",0);
ADIRSinit();
}
var ir_align_loop = func(i) {
var motionroll = getprop("/controls/adirs/motionroll");
var motionpitch = getprop("/controls/adirs/motionpitch");
var ttn = getprop("/instrumentation/adirs/ir[" ~ i ~ "]/display/ttn");
if (ttn == 0) {
ir_align_finish(i);
} else {
setprop("/instrumentation/adirs/ir[" ~ i ~ "]/display/ttn", ttn - 1);
}
var roll = getprop("/orientation/roll-deg");
var pitch = getprop("/orientation/pitch-deg");
if ((abs(motionroll - roll) > 0.02) or
(abs(motionpitch - pitch) > 0.02)) {
setprop("/instrumentation/adirs/ir[" ~ i ~ "]/display/status", "STS-XCESS MOTION");
ir_align_abort(i);
}
setprop("/controls/adirs/motionroll", roll);
setprop("/controls/adirs/motionpitch", pitch);
}
var ir0_align_loop_timer = maketimer(1, func{ir_align_loop(0)});
var ir1_align_loop_timer = maketimer(1, func{ir_align_loop(1)});
var ir2_align_loop_timer = maketimer(1, func{ir_align_loop(2)});
var ir_align_start = func(i) {
if (((i == 0) and !ir0_align_loop_timer.isRunning) or
((i == 1) and !ir1_align_loop_timer.isRunning) or
((i == 2) and !ir2_align_loop_timer.isRunning)) {
setprop("/instrumentation/adirs/ir[" ~ i ~ "]/display/ttn", (math.sin((getprop("/position/latitude-deg") / 90) * (math.pi / 2)) * 720) + 300);
motionroll = getprop("/orientation/roll-deg");
motionpitch = getprop("/orientation/pitch-deg");
if (i == 0) {
ir0_align_loop_timer.start();
} else if (i == 1) {
ir1_align_loop_timer.start();
} else if (i == 2) {
ir2_align_loop_timer.start();
}
setprop("/controls/adirs/ir[" ~ i ~ "]/align", 1);
}
}
var ir_align_finish = func(i) {
setprop("/instrumentation/adirs/ir[" ~ i ~ "]/aligned", 1);
if (i == 0) {
ir0_align_loop_timer.stop();
} else if (i == 1) {
ir1_align_loop_timer.stop();
} else if (i == 2) {
ir2_align_loop_timer.stop();
}
setprop("/controls/adirs/ir[" ~ i ~ "]/align", 0);
}
var ir_align_abort = func(i) {
setprop("/controls/adirs/ir[" ~ i ~ "]/fault", 1);
if (i == 0) {
ir0_align_loop_timer.stop();
} else if (i == 1) {
ir1_align_loop_timer.stop();
} else if (i == 2) {
ir2_align_loop_timer.stop();
}
setprop("/controls/adirs/ir[" ~ i ~ "]/align", 0);
}
var ir_knob_move = func(i) {
var knob = getprop("/controls/adirs/ir[" ~ i ~ "]/knob");
if (knob == 1) {
setprop("/controls/adirs/ir[" ~ i ~ "]/align", 0);
setprop("/controls/adirs/ir[" ~ i ~ "]/fault", 0);
setprop("/instrumentation/adirs/ir[" ~ i ~ "]/aligned", 0);
setprop("/instrumentation/adirs/ir[" ~ i ~ "]/display/status", "- - - - - - - - ");
if (i == 0) {
ir0_align_loop_timer.stop();
} else if (i == 1) {
ir1_align_loop_timer.stop();
} else if (i == 2) {
ir2_align_loop_timer.stop();
}
} else if (knob == 2) {
if ( !getprop("/instrumentation/adirs/ir[" ~ i ~ "]/aligned") and
(getprop("/systems/electrical/bus/ac-ess") > 9) ) {
ir_align_start(i);
}
}
}
setlistener("/controls/adirs/ir[0]/knob", func { ir_knob_move(0) });
setlistener("/controls/adirs/ir[1]/knob", func { ir_knob_move(1) });
setlistener("/controls/adirs/ir[2]/knob", func { ir_knob_move(2) });
var onbat_light = func {
if (((getprop("/systems/electrical/bus/dc1") > 25) or (getprop("/systems/electrical/bus/dc2") > 25)) and
((getprop("/systems/electrical/bus/ac1") < 110) and getprop("/systems/electrical/bus/ac2") < 110) and
((getprop("/controls/adirs/ir[0]/knob") > 1) or
(getprop("/controls/adirs/ir[1]/knob") > 1) or
(getprop("/controls/adirs/ir[2]/knob") > 1))) {
setprop("/controls/adirs/onbat", 1);
} else {
setprop("/controls/adirs/onbat", 0);
}
}
var onbat_light_b = func {
setprop("/controls/adirs/onbat", 1);
setprop("/controls/adirs/numm", 0);
interpolate("/controls/adirs/numm", 5, 4);
var nummlist = setlistener("/controls/adirs/numm", func {
if (getprop("/controls/adirs/numm") == 5) {
removelistener(nummlist);
onbat_light();
}
});
}
setlistener("/controls/electrical/switches/gen-apu", onbat_light);
setlistener("/controls/electrical/switches/gen1", onbat_light);
setlistener("/controls/electrical/switches/gen2", onbat_light);
setlistener("/controls/electrical/switches/gen-ext", onbat_light);
setlistener("/systems/electrical/bus/ac-ess", onbat_light);
setlistener("/controls/adirs/ir[0]/knob", onbat_light_b);
setlistener("/controls/adirs/ir[1]/knob", onbat_light_b);
setlistener("/controls/adirs/ir[2]/knob", onbat_light_b);
var adirs_display = func() {
var data_knob = getprop("/controls/adirs/display/dataknob");
var selected_ir = getprop("/controls/adirs/display/selected");
if ( selected_ir == 1 ) {
setprop("/controls/adirs/display/text", "");
} else {
if ( data_knob == 1 ) {
setprop("/controls/adirs/display/text", "8888888888888888");
} else if ( data_knob == 2 ) {
if ( ((selected_ir == 2) and getprop("/instrumentation/adirs/ir[0]/aligned")) or
((selected_ir == 3) and getprop("/instrumentation/adirs/ir[2]/aligned")) or
((selected_ir == 4) and getprop("/instrumentation/adirs/ir[1]/aligned")) ) {
setprop("/controls/adirs/display/text", sprintf(" %03i", getprop("/orientation/track-magnetic-deg")) ~ sprintf(" %03i", getprop("/velocities/groundspeed-kt")));
} else {
setprop("/controls/adirs/display/text", "- - - - - - - - ");
}
} else if ( data_knob == 3 ) {
var lat = abs(getprop("/position/latitude-deg"));
var lon = abs(getprop("/position/longitude-deg"));
setprop("/controls/adirs/display/text", substr(getprop("/position/latitude-string"), -1, 1) ~
sprintf("%2i", lat) ~ "'" ~
sprintf("%2.1f", (lat - math.floor(lat)) * 60) ~
substr(getprop("/position/longitude-string"), -1, 1) ~
sprintf("%3i", lon) ~ "'" ~
sprintf("%2.1f", (lon - math.floor(lon)) * 60));
} else if ( data_knob == 4 ) {
if ( ((selected_ir == 2) and getprop("/instrumentation/adirs/ir[0]/aligned")) or
((selected_ir == 3) and getprop("/instrumentation/adirs/ir[2]/aligned")) or
((selected_ir == 4) and getprop("/instrumentation/adirs/ir[1]/aligned")) ) {
setprop("/controls/adirs/display/text", sprintf(" %03i", getprop("/environment/wind-from-heading-deg")) ~ sprintf(" %03i", getprop("/environment/wind-speed-kt")));
} else {
setprop("/controls/adirs/display/text", "- - - - - - - - ");
}
} else if ( data_knob == 5 ) {
# Time to Nav
if ( ((selected_ir == 2) and getprop("/instrumentation/adirs/ir[0]/aligned")) or
((selected_ir == 3) and getprop("/instrumentation/adirs/ir[2]/aligned")) or
((selected_ir == 4) and getprop("/instrumentation/adirs/ir[1]/aligned")) ) {
setprop("/controls/adirs/display/text", sprintf(" %3.1f", getprop("/orientation/heading-deg")) ~ "- - - - ");
} else {
if ( (selected_ir == 2) and getprop("/controls/adirs/ir[0]/align") ) {
setprop("controls/adirs/display/text", "- - - - " ~ sprintf(" TTN %2i", (getprop("/instrumentation/adirs/ir[0]/display/ttn") / 60)));
} else if ( (selected_ir == 3) and getprop("/controls/adirs/ir[2]/align") ) {
setprop("controls/adirs/display/text", "- - - - " ~ sprintf(" TTN %2i", (getprop("/instrumentation/adirs/ir[2]/display/ttn") / 60)));
} else if ( (selected_ir == 4) and getprop("/controls/adirs/ir[1]/align") ) {
setprop("controls/adirs/display/text", "- - - - " ~ sprintf(" TTN %2i", (getprop("/instrumentation/adirs/ir[1]/display/ttn") / 60)));
} else {
setprop("/controls/adirs/display/text", "- - - - - - - - ");
}
}
} else if ( data_knob == 6 ) {
if ( selected_ir == 2 ) {
#var ir0dispstat = getprop("/instrumentation/adirs/ir[0]/display/status");
setprop("/controls/adirs/display/text","- - - - - - - - ");
} else if ( selected_ir == 3 ) {
#var ir1dispstat = getprop("/instrumentation/adirs/ir[1]/display/status");
setprop("/controls/adirs/display/text","- - - - - - - - ");
} else if ( selected_ir == 4 ) {
#var ir2dispstat = getprop("/instrumentation/adirs/ir[2]/display/status");
setprop("/controls/adirs/display/text","- - - - - - - - ");
}
}
}
}
var adirs_timer = maketimer(1, adirs_display);

View file

@ -127,6 +127,7 @@ var triggerDoor = func(door, doorName, doorDesc)
setlistener("/sim/signals/fdm-initialized", func { setlistener("/sim/signals/fdm-initialized", func {
systems.elec_init(); systems.elec_init();
systems.ADIRSinit();
itaf.ap_init(); itaf.ap_init();
var autopilot = gui.Dialog.new("sim/gui/dialogs/autopilot/dialog", "Aircraft/A320Family/Systems/autopilot-dlg.xml"); var autopilot = gui.Dialog.new("sim/gui/dialogs/autopilot/dialog", "Aircraft/A320Family/Systems/autopilot-dlg.xml");
setprop("/controls/engines/thrust-limit", "TOGA"); setprop("/controls/engines/thrust-limit", "TOGA");

View file

@ -45,6 +45,10 @@
<mode>once</mode> <mode>once</mode>
<condition> <condition>
<and> <and>
<equals>
<property>/instrumentation/mk-viii/inputs/discretes/gpws-inhibit</property>
<value>0</value>
</equals>
<less-than> <less-than>
<property>/position/gear-agl-ft</property> <property>/position/gear-agl-ft</property>
<value>2500</value> <value>2500</value>
@ -76,6 +80,10 @@
<mode>once</mode> <mode>once</mode>
<condition> <condition>
<and> <and>
<equals>
<property>/instrumentation/mk-viii/inputs/discretes/gpws-inhibit</property>
<value>0</value>
</equals>
<less-than> <less-than>
<property>/position/gear-agl-ft</property> <property>/position/gear-agl-ft</property>
<value>2000</value> <value>2000</value>
@ -108,6 +116,10 @@
<mode>once</mode> <mode>once</mode>
<condition> <condition>
<and> <and>
<equals>
<property>/instrumentation/mk-viii/inputs/discretes/gpws-inhibit</property>
<value>0</value>
</equals>
<less-than> <!-- Until I add a calulation for minimums + 100, and add the ability to adjust DH, I'm keeping 350 --> <less-than> <!-- Until I add a calulation for minimums + 100, and add the ability to adjust DH, I'm keeping 350 -->
<property>/position/gear-agl-ft</property> <property>/position/gear-agl-ft</property>
<value>350</value> <value>350</value>