MCDU update

This commit is contained in:
Jonathan Redpath 2017-07-28 17:21:48 +01:00
parent 2a6d3c4328
commit f8c758aec8
15 changed files with 453 additions and 12 deletions

View file

@ -1044,6 +1044,7 @@
<file>Aircraft/A320Family/Nasal/MCDU1/PERFTO.nas</file>
<file>Aircraft/A320Family/Nasal/MCDU1/RADNAV.nas</file>
<file>Aircraft/A320Family/Nasal/MCDU1/DATA.nas</file>
<file>Aircraft/A320Family/Nasal/MCDU1/STATUS.nas</file>
</mcdu1>
<mcdu2>
<file>Aircraft/A320Family/Nasal/MCDU2/MCDU.nas</file>
@ -1056,6 +1057,7 @@
<file>Aircraft/A320Family/Nasal/MCDU2/PERFTO.nas</file>
<file>Aircraft/A320Family/Nasal/MCDU2/RADNAV.nas</file>
<file>Aircraft/A320Family/Nasal/MCDU2/DATA.nas</file>
<file>Aircraft/A320Family/Nasal/MCDU2/STATUS.nas</file>
</mcdu2>
<canvas_nd>
<file>Aircraft/A320Family/Models/Instruments/ND/canvas/ND.nas</file>

View file

@ -0,0 +1,139 @@
<?xml version="1.0"?>
<!--
#######################################
# Copyright (c) A3XX Development Team #
#######################################
-->
<PropertyList>
<path>EMPTY.ac</path>
<text>
<name>page</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>0.0</y-m>
<z-m>0.083</z-m>
</offsets>
<alignment>center-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">IRS MONITOR</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.0050</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<text>
<name>irs1</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
<z-m>0.0715</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">&lt;IRS1</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.0050</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<text>
<name>irs2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
<z-m>0.061</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">&lt;IRS2</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.0050</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<text>
<name>irs3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
<z-m>0.0505</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">&lt;IRS3</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.0050</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<!-- Colors -->
<!-- White -->
<animation>
<type>material</type>
<object-name>page</object-name>
<object-name>irs1</object-name>
<object-name>irs2</object-name>
<object-name>irs3</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>
</PropertyList>

View file

@ -180,6 +180,28 @@
</condition>
</model>
<model>
<name>IRSMON</name>
<path>DATA/IRSMON.xml</path>
<offsets>
<heading-deg>180</heading-deg>
<roll-deg>180</roll-deg>
<pitch-deg>90</pitch-deg>
</offsets>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
<value>110</value>
</greater-than-equals>
<equals>
<property>MCDU[0]/page</property>
<value>IRSMON</value>
</equals>
</and>
</condition>
</model>
<model>
<name>TO</name>
<path>PERF/TO/TO.xml</path>

View file

@ -114,10 +114,10 @@
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">01JAN-28JAN</format>
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
<property>FMGC/internal/navdatabase</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
@ -137,10 +137,10 @@
<alignment>right-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">AB20170101</format>
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
<property>FMGC/internal/navdatabasecode</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
@ -184,7 +184,7 @@
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">&lt;-29JAN-26FEB</format>
<format type="string">&lt;-</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
@ -197,6 +197,29 @@
<height type="int">64</height>
</font-resolution>
</text>
<text>
<name>seconddata3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.040</y-m>
<z-m>0.0505</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>FMGC/internal/navdatabase2</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.0045</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<text>
<name>chgcode</name>
@ -406,6 +429,7 @@
<type>material</type>
<object-name>activedata2</object-name>
<object-name>seconddata2</object-name>
<object-name>seconddata3</object-name>
<object-name>chgcode2</object-name>
<diffuse>
<red>0</red>

View file

@ -0,0 +1,139 @@
<?xml version="1.0"?>
<!--
#######################################
# Copyright (c) A3XX Development Team #
#######################################
-->
<PropertyList>
<path>EMPTY.ac</path>
<text>
<name>page</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>0.0</y-m>
<z-m>0.083</z-m>
</offsets>
<alignment>center-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">IRS MONITOR</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.0050</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<text>
<name>irs1</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
<z-m>0.0715</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">&lt;IRS1</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.0050</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<text>
<name>irs2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
<z-m>0.061</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">&lt;IRS2</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.0050</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<text>
<name>irs3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
<z-m>0.0505</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">&lt;IRS3</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.0050</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<!-- Colors -->
<!-- White -->
<animation>
<type>material</type>
<object-name>page</object-name>
<object-name>irs1</object-name>
<object-name>irs2</object-name>
<object-name>irs3</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>
</PropertyList>

View file

@ -180,6 +180,28 @@
</condition>
</model>
<model>
<name>IRSMON</name>
<path>DATA/IRSMON.xml</path>
<offsets>
<heading-deg>180</heading-deg>
<roll-deg>180</roll-deg>
<pitch-deg>90</pitch-deg>
</offsets>
<condition>
<and>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
<value>110</value>
</greater-than-equals>
<equals>
<property>MCDU[1]/page</property>
<value>IRSMON</value>
</equals>
</and>
</condition>
</model>
<model>
<name>TO</name>
<path>PERF/TO/TO.xml</path>

View file

@ -114,10 +114,10 @@
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">01JAN-28JAN</format>
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
<property>FMGC/internal/navdatabase</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
@ -137,10 +137,10 @@
<alignment>right-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">AB20170101</format>
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
<property>FMGC/internal/navdatabasecode</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
@ -184,7 +184,7 @@
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">&lt;-29JAN-26FEB</format>
<format type="string">&lt;-</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
@ -197,6 +197,29 @@
<height type="int">64</height>
</font-resolution>
</text>
<text>
<name>seconddata3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.040</y-m>
<z-m>0.0505</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>FMGC/internal/navdatabase2</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.0045</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<text>
<name>chgcode</name>
@ -406,6 +429,7 @@
<type>material</type>
<object-name>activedata2</object-name>
<object-name>seconddata2</object-name>
<object-name>seconddata3</object-name>
<object-name>chgcode2</object-name>
<diffuse>
<red>0</red>

View file

@ -62,6 +62,16 @@ var ADIRSreset = func {
setprop("/controls/adirs/ir[2]/fault",0);
setprop("/controls/adirs/onbat",0);
setprop("/controls/adirs/mcducbtn",0);
setprop("/controls/adirs/mcdu/mode1", ""); # INVAL ALIGN NAV ATT or off (blank)
setprop("/controls/adirs/mcdu/mode2", "");
setprop("/controls/adirs/mcdu/mode3", "");
setprop("/controls/adirs/mcdu/status1", ""); # see smith thales p487
setprop("/controls/adirs/mcdu/status2", "");
setprop("/controls/adirs/mcdu/status3", "");
setprop("/controls/adirs/mcdu/hdg", ""); # only shown if in ATT mode
setprop("/controls/adirs/mcdu/avgdrift1", "");
setprop("/controls/adirs/mcdu/avgdrift2", "");
setprop("/controls/adirs/mcdu/avgdrift3", "");
adirs_init();
}

View file

@ -27,6 +27,10 @@ setprop("/FMGC/internal/vor1-mcdu", "XXX/999.99");
setprop("/FMGC/internal/vor2-mcdu", "999.99/XXX");
setlistener("/sim/signals/fdm-initialized", func {
var database1 = getprop("/FMGC/internal/navdatabase");
var database2 = getprop("/FMGC/internal/navdatabase2");
var code1 = getprop("/FMGC/internal/navdatabasecode");
var code2 = getprop("/FMGC/internal/navdatabasecode2");
var gear1 = getprop("/gear/gear[1]/wow");
var gear2 = getprop("/gear/gear[2]/wow");
var state1 = getprop("/systems/thrust/state1");
@ -527,3 +531,14 @@ var ManagedSPD = maketimer(0.25, func {
libraries.mcpSPDKnbPull();
}
});
var switchDatabase = func {
database1 = getprop("/FMGC/internal/navdatabase");
database2 = getprop("/FMGC/internal/navdatabase2");
code1 = getprop("/FMGC/internal/navdatabasecode");
code2 = getprop("/FMGC/internal/navdatabasecode2");
setprop("/FMGC/internal/navdatabase", database2);
setprop("/FMGC/internal/navdatabase2", database1);
setprop("/FMGC/internal/navdatabasecode", code2);
setprop("/FMGC/internal/navdatabasecode2", code1);
}

View file

@ -8,4 +8,7 @@ var dataInput = func(key) {
if (key == "L1") {
setprop("/MCDU[0]/page", "POSMON");
}
if (key == "L2") {
setprop("/MCDU[0]/page", "IRSMON");
}
}

View file

@ -52,6 +52,10 @@ var MCDU_reset = func {
setprop("/FMGC/internal/vor2crs-set", 0);
setprop("/FMGC/internal/adf1freq-set", 0);
setprop("/FMGC/internal/adf2freq-set", 0);
setprop("/FMGC/internal/navdatabase", "01JAN-28JAN");
setprop("/FMGC/internal/navdatabase2", "29JAN-26FEB");
setprop("/FMGC/internal/navdatabasecode", "AB20170101");
setprop("/FMGC/internal/navdatabasecode2", "AB20170102");
}
var lskbutton = func(btn) {
@ -86,6 +90,8 @@ var lskbutton = func(btn) {
initInputA("L5");
} else if (getprop("/MCDU[0]/page") == "DES") {
initInputA("L5");
} else if (getprop("/MCDU[0]/page") == "DATA") {
dataInput("L2");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
@ -98,6 +104,8 @@ var lskbutton = func(btn) {
initInputA("L3");
} else if (getprop("/MCDU[0]/page") == "TO") {
perfTOInput("L3");
} else if (getprop("/MCDU[0]/page") == "STATUS") {
statusInput("L3");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("L3");
} else {

11
Nasal/MCDU1/STATUS.nas Normal file
View file

@ -0,0 +1,11 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
#######################################
# Copyright (c) A3XX Development Team #
#######################################
var statusInput = func(key) {
if (key == "L3") {
fmgc.switchDatabase();
}
}

View file

@ -8,4 +8,7 @@ var dataInput = func(key) {
if (key == "L1") {
setprop("/MCDU[1]/page", "POSMON");
}
if (key == "L2") {
setprop("/MCDU[1]/page", "IRSMON");
}
}

View file

@ -52,6 +52,10 @@ var MCDU_reset = func {
setprop("/FMGC/internal/vor2crs-set", 0);
setprop("/FMGC/internal/adf1freq-set", 0);
setprop("/FMGC/internal/adf2freq-set", 0);
setprop("/FMGC/internal/navdatabase", "01JAN-28JAN");
setprop("/FMGC/internal/navdatabase2", "29JAN-26FEB");
setprop("/FMGC/internal/navdatabasecode", "AB20170101");
setprop("/FMGC/internal/navdatabasecode2", "AB20170102");
}
var lskbutton = func(btn) {
@ -86,6 +90,8 @@ var lskbutton = func(btn) {
initInputA("L5");
} else if (getprop("/MCDU[1]/page") == "DES") {
initInputA("L5");
} else if (getprop("/MCDU[1]/page") == "DATA") {
dataInput("L2");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
@ -98,6 +104,8 @@ var lskbutton = func(btn) {
initInputA("L3");
} else if (getprop("/MCDU[1]/page") == "TO") {
perfTOInput("L3");
} else if (getprop("/MCDU[1]/page") == "STATUS") {
statusInput("L3");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("L3");
} else {

11
Nasal/MCDU2/STATUS.nas Normal file
View file

@ -0,0 +1,11 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
#######################################
# Copyright (c) A3XX Development Team #
#######################################
var statusInput = func(key) {
if (key == "L3") {
fmgc.switchDatabase();
}
}