A3XX: Seperate VOR and ILS, MAJOR FIX ND: VOR Mode working properly! (DME still maybe fucked, will fix soon if it is)

This commit is contained in:
Joshua Davidson 2017-07-05 23:57:57 -04:00
parent d84eaea2c4
commit dccfcf2a15
12 changed files with 216 additions and 56 deletions

View file

@ -604,6 +604,42 @@
<instrumentation n="0">
<dme n="0">
<frequencies>
<selected-mhz type="double">111.15</selected-mhz>
<source type="string">/instrumentation/nav[0]/frequencies/selected-mhz</source>
</frequencies>
<serviceable type="bool">true</serviceable>
<volume type="double">0</volume>
</dme>
<dme n="1">
<frequencies>
<selected-mhz type="double">109.55</selected-mhz>
<source type="string">/instrumentation/nav[1]/frequencies/selected-mhz</source>
</frequencies>
<serviceable type="bool">true</serviceable>
<volume type="double">0</volume>
</dme>
<dme n="2">
<frequencies>
<selected-mhz type="double">112.8</selected-mhz>
<source type="string">/instrumentation/nav[2]/frequencies/selected-mhz</source>
</frequencies>
<serviceable type="bool">true</serviceable>
<volume type="double">0</volume>
</dme>
<dme n="3">
<frequencies>
<selected-mhz type="double">114.8</selected-mhz>
<source type="string">/instrumentation/nav[3]/frequencies/selected-mhz</source>
</frequencies>
<serviceable type="bool">true</serviceable>
<volume type="double">0</volume>
</dme>
<efis n="0">
<ecam>
<display-mode type="string">FCTL</display-mode>
@ -616,6 +652,60 @@
</ecam>
</efis>
<nav n="0">
<frequencies>
<selected-mhz type="double">111.15</selected-mhz>
<standby-mhz type="double">110.95</standby-mhz>
</frequencies>
<radials>
<selected-deg type="double">360</selected-deg>
</radials>
<serviceable type="bool">true</serviceable>
<volume type="double">0</volume>
</nav>
<nav n="1">
<frequencies>
<selected-mhz type="double">109.55</selected-mhz>
<standby-mhz type="double">110.55</standby-mhz>
</frequencies>
<radials>
<selected-deg type="double">360</selected-deg>
</radials>
<serviceable type="bool">true</serviceable>
<volume type="double">0</volume>
</nav>
<nav n="2">
<cdi>
<serviceable type="bool">true</serviceable>
</cdi>
<frequencies>
<selected-mhz type="double">112.8</selected-mhz>
<standby-mhz type="double">112.6</standby-mhz>
</frequencies>
<radials>
<selected-deg type="double">360</selected-deg>
</radials>
<serviceable type="bool">true</serviceable>
<volume type="double">0</volume>
</nav>
<nav n="3">
<cdi>
<serviceable type="bool">true</serviceable>
</cdi>
<frequencies>
<selected-mhz type="double">114.8</selected-mhz>
<standby-mhz type="double">114.6</standby-mhz>
</frequencies>
<radials>
<selected-deg type="double">360</selected-deg>
</radials>
<serviceable type="bool">true</serviceable>
<volume type="double">0</volume>
</nav>
<tcas><!-- http://wiki.flightgear.org/index.php/TCAS -->
<serviceable type="bool">true</serviceable><!-- TCAS ENABLE -->
<inputs>

View file

@ -265,7 +265,7 @@
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>/instrumentation/nav[0]/radials/selected-deg</property>
<property>/instrumentation/nav[2]/radials/selected-deg</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
@ -351,7 +351,7 @@
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>/instrumentation/nav[1]/radials/selected-deg</property>
<property>/instrumentation/nav[3]/radials/selected-deg</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
@ -414,7 +414,7 @@
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>/FMGC/internal/ils-mcdu</property>
<property>/FMGC/internal/ils1-mcdu</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
@ -437,7 +437,7 @@
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>/FMGC/internal/ils-mcdu</property>
<property>/FMGC/internal/ils1-mcdu</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
@ -452,7 +452,7 @@
<type>select</type>
<object-name>ilsfreq2</object-name>
<condition>
<not><property>/FMGC/internal/vor1freq-set</property></not>
<not><property>/FMGC/internal/ils1freq-set</property></not>
</condition>
</animation>
@ -460,7 +460,7 @@
<type>select</type>
<object-name>ilsfreq3</object-name>
<condition>
<property>/FMGC/internal/vor1freq-set</property>
<property>/FMGC/internal/ils1freq-set</property>
</condition>
</animation>
@ -585,7 +585,7 @@
<type>select</type>
<object-name>ilscrs12</object-name>
<condition>
<not><property>/FMGC/internal/vor1crs-set</property></not>
<not><property>/FMGC/internal/ils1crs-set</property></not>
</condition>
</animation>
@ -593,7 +593,7 @@
<type>select</type>
<object-name>ilscrs13</object-name>
<condition>
<property>/FMGC/internal/vor1crs-set</property>
<property>/FMGC/internal/ils1crs-set</property>
</condition>
</animation>

View file

@ -265,7 +265,7 @@
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>/instrumentation/nav[0]/radials/selected-deg</property>
<property>/instrumentation/nav[2]/radials/selected-deg</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
@ -351,7 +351,7 @@
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>/instrumentation/nav[1]/radials/selected-deg</property>
<property>/instrumentation/nav[3]/radials/selected-deg</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
@ -414,7 +414,7 @@
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>/FMGC/internal/ils-mcdu</property>
<property>/FMGC/internal/ils1-mcdu</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
@ -437,7 +437,7 @@
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>/FMGC/internal/ils-mcdu</property>
<property>/FMGC/internal/ils1-mcdu</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
@ -452,7 +452,7 @@
<type>select</type>
<object-name>ilsfreq2</object-name>
<condition>
<not><property>/FMGC/internal/vor1freq-set</property></not>
<not><property>/FMGC/internal/ils1freq-set</property></not>
</condition>
</animation>
@ -460,7 +460,7 @@
<type>select</type>
<object-name>ilsfreq3</object-name>
<condition>
<property>/FMGC/internal/vor1freq-set</property>
<property>/FMGC/internal/ils1freq-set</property>
</condition>
</animation>
@ -585,7 +585,7 @@
<type>select</type>
<object-name>ilscrs12</object-name>
<condition>
<not><property>/FMGC/internal/vor1crs-set</property></not>
<not><property>/FMGC/internal/ils1crs-set</property></not>
</condition>
</animation>
@ -593,7 +593,7 @@
<type>select</type>
<object-name>ilscrs13</object-name>
<condition>
<property>/FMGC/internal/vor1crs-set</property>
<property>/FMGC/internal/ils1crs-set</property>
</condition>
</animation>

View file

@ -83,8 +83,8 @@ canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update
me.update_sub(); # init some map properties based on switches
var vor1_path = me.get_nav_path('vor', 0);
var vor2_path = me.get_nav_path('vor', 1);
var vor1_path = "/instrumentation/nav[2]";
var vor2_path = "/instrumentation/nav[3]";
# predicate for the draw controller
var is_tuned = func(freq) {
var nav1=getprop(vor1_path~ "frequencies/selected-mhz");
@ -367,10 +367,10 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
else
me.map.setTranslation(512,824);
}
var vor1_path = me.get_nav_path('vor', 0);
var vor2_path = me.get_nav_path('vor', 1);
var dme1_path = me.get_nav_path('dme', 0);
var dme2_path = me.get_nav_path('dme', 1);
var vor1_path = "/instrumentation/nav[2]";
var vor2_path = "/instrumentation/nav[3]";
var dme1_path = "/instrumentation/dme[2]";
var dme2_path = "/instrumentation/dme[3]";
if(me.get_switch('toggle_rh_vor_adf') == 1) {
me.symbols.vorR.setText("VOR R");

View file

@ -1182,7 +1182,11 @@ canvas.NDStyles["Airbus"] = {
predicate: func(nd) (nd.in_mode('toggle_display_mode', ['APP','VOR']) and !nd.get_switch('toggle_centered')),
is_true: func(nd) {
nd.symbols.vorCrsPtr.show();
nd.symbols.vorCrsPtr.setRotation((getprop("instrumentation/nav[0]/radials/selected-deg")-nd.aircraft_source.get_hdg_tru())*D2R);
if (is_ils) {
nd.symbols.vorCrsPtr.setRotation((getprop("instrumentation/nav[0]/radials/selected-deg")-nd.aircraft_source.get_hdg_tru())*D2R);
} else {
nd.symbols.vorCrsPtr.setRotation((getprop("instrumentation/nav[2]/radials/selected-deg")-nd.aircraft_source.get_hdg_tru())*D2R);
}
},
is_false: func(nd) nd.symbols.vorCrsPtr.hide(),
@ -1198,7 +1202,11 @@ canvas.NDStyles["Airbus"] = {
var is_ils = (nd.get_switch('toggle_display_mode') == 'APP');
var type = (is_ils ? 'ils' : 'vor');
var path = nd.get_nav_path(type, 0);
nd.symbols.vorCrsPtr2.setRotation((getprop("/instrumentation/nav[0]/radials/selected-deg")-nd.aircraft_source.get_hdg_tru())*D2R);
if (is_ils) {
nd.symbols.vorCrsPtr2.setRotation((getprop("/instrumentation/nav[0]/radials/selected-deg")-nd.aircraft_source.get_hdg_tru())*D2R);
} else {
nd.symbols.vorCrsPtr2.setRotation((getprop("/instrumentation/nav[2]/radials/selected-deg")-nd.aircraft_source.get_hdg_tru())*D2R);
}
var line = nd.symbols.vorCrsPtr2.getElementById('vorCrsPtr2_line');
if(!is_ils){
line.setColor(0,0.62,0.84);

View file

@ -17,7 +17,8 @@ setprop("/it-autoflight/internal/vert-speed-fpm", 0);
setprop("/it-autoflight/output/fma-pwr", 0);
setprop("/instrumentation/nav[0]/nav-id", "XXX");
setprop("/instrumentation/nav[1]/nav-id", "XXX");
setprop("/FMGC/internal/ils-mcdu", "XXX/999.99");
setprop("/FMGC/internal/ils1-mcdu", "XXX/999.99");
setprop("/FMGC/internal/ils2-mcdu", "XXX/999.99");
setprop("/FMGC/internal/vor1-mcdu", "XXX/999.99");
setprop("/FMGC/internal/vor2-mcdu", "999.99/XXX");
@ -230,6 +231,8 @@ var various = maketimer(1, func {
var various2 = maketimer(0.5, func {
nav0();
nav1();
nav2();
nav3();
var latmode = getprop("/it-autoflight/output/lat");
if (latmode == 0) {
setprop("/it-autoflight/custom/show-hdg", 1);
@ -240,13 +243,11 @@ var nav0 = func {
var freqnav0uf = getprop("/instrumentation/nav[0]/frequencies/selected-mhz");
var freqnav0 = sprintf("%.2f", freqnav0uf);
var namenav0 = getprop("/instrumentation/nav[0]/nav-id");
if (freqnav0 >= 108.10 and freqnav0 <= 117.95) {
if (freqnav0 >= 108.10 and freqnav0 <= 111.95) {
if (namenav0 != "") {
setprop("/FMGC/internal/ils-mcdu", namenav0 ~ "/" ~ freqnav0);
setprop("/FMGC/internal/vor1-mcdu", namenav0 ~ "/" ~ freqnav0);
setprop("/FMGC/internal/ils1-mcdu", namenav0 ~ "/" ~ freqnav0);
} else {
setprop("/FMGC/internal/ils-mcdu", freqnav0);
setprop("/FMGC/internal/vor1-mcdu", freqnav0);
setprop("/FMGC/internal/ils1-mcdu", freqnav0);
}
}
}
@ -255,11 +256,37 @@ var nav1 = func {
var freqnav1uf = getprop("/instrumentation/nav[1]/frequencies/selected-mhz");
var freqnav1 = sprintf("%.2f", freqnav1uf);
var namenav1 = getprop("/instrumentation/nav[1]/nav-id");
if (freqnav1 >= 108.10 and freqnav1 <= 117.95) {
if (freqnav1 >= 108.10 and freqnav1 <= 111.95) {
if (namenav1 != "") {
setprop("/FMGC/internal/vor2-mcdu", namenav1 ~ "/" ~ freqnav1);
setprop("/FMGC/internal/ils2-mcdu", namenav1 ~ "/" ~ freqnav1);
} else {
setprop("/FMGC/internal/vor2-mcdu", freqnav1);
setprop("/FMGC/internal/ils2-mcdu", freqnav1);
}
}
}
var nav2 = func {
var freqnav2uf = getprop("/instrumentation/nav[2]/frequencies/selected-mhz");
var freqnav2 = sprintf("%.2f", freqnav2uf);
var namenav2 = getprop("/instrumentation/nav[2]/nav-id");
if (freqnav2 >= 108.00 and freqnav2 <= 117.95) {
if (namenav2 != "") {
setprop("/FMGC/internal/vor1-mcdu", namenav2 ~ "/" ~ freqnav2);
} else {
setprop("/FMGC/internal/vor1-mcdu", freqnav2);
}
}
}
var nav3 = func {
var freqnav3uf = getprop("/instrumentation/nav[3]/frequencies/selected-mhz");
var freqnav3 = sprintf("%.2f", freqnav3uf);
var namenav3 = getprop("/instrumentation/nav[3]/nav-id");
if (freqnav3 >= 108.00 and freqnav3 <= 117.95) {
if (namenav3 != "") {
setprop("/FMGC/internal/vor2-mcdu", namenav3 ~ "/" ~ freqnav3);
} else {
setprop("/FMGC/internal/vor2-mcdu", freqnav3);
}
}
}

View file

@ -42,6 +42,8 @@ var MCDU_reset = func {
setprop("/FMGC/internal/cruise-lvl-set", 0);
setprop("/FMGC/internal/flap-ths-set", 0);
setprop("/FMGC/internal/flex-set", 0);
setprop("/FMGC/internal/ils1freq-set", 0);
setprop("/FMGC/internal/ils1crs-set", 0);
setprop("/FMGC/internal/vor1freq-set", 0);
setprop("/FMGC/internal/vor1crs-set", 0);
setprop("/FMGC/internal/vor2freq-set", 0);

View file

@ -12,7 +12,7 @@ var radnavInput = func(key) {
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 5 or tfs == 6) {
if (scratchpad >= 108.10 and scratchpad <= 111.95) {
if (scratchpad >= 108.00 and scratchpad <= 111.95) {
if (scratchpad == 108.10 or scratchpad == 108.15 or scratchpad == 108.30 or scratchpad == 108.35 or scratchpad == 108.50 or scratchpad == 108.55 or scratchpad == 108.70 or scratchpad == 108.75 or scratchpad == 108.90 or scratchpad == 108.95
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
@ -23,12 +23,12 @@ var radnavInput = func(key) {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
} else {
setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad);
setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor1freq-set", 1);
setprop("/MCDU[0]/scratchpad", "");
}
} else if (scratchpad >= 112.00 and scratchpad <= 117.95) {
setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad);
setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor1freq-set", 1);
setprop("/MCDU[0]/scratchpad", "");
} else {
@ -55,7 +55,7 @@ var radnavInput = func(key) {
var tfs = size(scratchpad);
if (tfs >= 1 and tfs <= 3) {
if (scratchpad >= 0 and scratchpad <= 360) {
setprop("/instrumentation/nav[0]/radials/selected-deg", scratchpad);
setprop("/instrumentation/nav[2]/radials/selected-deg", scratchpad);
setprop("/FMGC/internal/vor1crs-set", 1);
setprop("/MCDU[0]/scratchpad", "");
} else {
@ -75,19 +75,19 @@ var radnavInput = func(key) {
}
} else if (key == "L3") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vor1freq-set", 0);
setprop("/FMGC/internal/ils1freq-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 5 or tfs == 6) {
if (scratchpad >= 108.10 and scratchpad <= 111.95) {
if (scratchpad >= 108.00 and scratchpad <= 111.95) {
if (scratchpad == 108.10 or scratchpad == 108.15 or scratchpad == 108.30 or scratchpad == 108.35 or scratchpad == 108.50 or scratchpad == 108.55 or scratchpad == 108.70 or scratchpad == 108.75 or scratchpad == 108.90 or scratchpad == 108.95
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor1freq-set", 1);
setprop("/FMGC/internal/ils1freq-set", 1);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
@ -113,7 +113,7 @@ var radnavInput = func(key) {
}
} else if (key == "L4") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vor1crs-set", 0);
setprop("/FMGC/internal/ils1crs-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
} else {
@ -121,7 +121,7 @@ var radnavInput = func(key) {
if (tfs >= 1 and tfs <= 3) {
if (scratchpad >= 0 and scratchpad <= 360) {
setprop("/instrumentation/nav[0]/radials/selected-deg", scratchpad);
setprop("/FMGC/internal/vor1crs-set", 1);
setprop("/FMGC/internal/ils1crs-set", 1);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
@ -157,12 +157,12 @@ var radnavInput = func(key) {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
} else {
setprop("/instrumentation/nav[1]/frequencies/selected-mhz", scratchpad);
setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor2freq-set", 1);
setprop("/MCDU[0]/scratchpad", "");
}
} else if (scratchpad >= 112.00 and scratchpad <= 117.95) {
setprop("/instrumentation/nav[1]/frequencies/selected-mhz", scratchpad);
setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor2freq-set", 1);
setprop("/MCDU[0]/scratchpad", "");
} else {

View file

@ -42,6 +42,8 @@ var MCDU_reset = func {
setprop("/FMGC/internal/cruise-lvl-set", 0);
setprop("/FMGC/internal/flap-ths-set", 0);
setprop("/FMGC/internal/flex-set", 0);
setprop("/FMGC/internal/ils1freq-set", 0);
setprop("/FMGC/internal/ils1crs-set", 0);
setprop("/FMGC/internal/vor1freq-set", 0);
setprop("/FMGC/internal/vor1crs-set", 0);
setprop("/FMGC/internal/vor2freq-set", 0);

View file

@ -12,7 +12,7 @@ var radnavInput = func(key) {
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 5 or tfs == 6) {
if (scratchpad >= 108.10 and scratchpad <= 111.95) {
if (scratchpad >= 108.00 and scratchpad <= 111.95) {
if (scratchpad == 108.10 or scratchpad == 108.15 or scratchpad == 108.30 or scratchpad == 108.35 or scratchpad == 108.50 or scratchpad == 108.55 or scratchpad == 108.70 or scratchpad == 108.75 or scratchpad == 108.90 or scratchpad == 108.95
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
@ -23,12 +23,12 @@ var radnavInput = func(key) {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
} else {
setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad);
setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor1freq-set", 1);
setprop("/MCDU[1]/scratchpad", "");
}
} else if (scratchpad >= 112.00 and scratchpad <= 117.95) {
setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad);
setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor1freq-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
@ -55,7 +55,7 @@ var radnavInput = func(key) {
var tfs = size(scratchpad);
if (tfs >= 1 and tfs <= 3) {
if (scratchpad >= 0 and scratchpad <= 360) {
setprop("/instrumentation/nav[0]/radials/selected-deg", scratchpad);
setprop("/instrumentation/nav[2]/radials/selected-deg", scratchpad);
setprop("/FMGC/internal/vor1crs-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
@ -75,19 +75,19 @@ var radnavInput = func(key) {
}
} else if (key == "L3") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vor1freq-set", 0);
setprop("/FMGC/internal/ils1freq-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 5 or tfs == 6) {
if (scratchpad >= 108.10 and scratchpad <= 111.95) {
if (scratchpad >= 108.00 and scratchpad <= 111.95) {
if (scratchpad == 108.10 or scratchpad == 108.15 or scratchpad == 108.30 or scratchpad == 108.35 or scratchpad == 108.50 or scratchpad == 108.55 or scratchpad == 108.70 or scratchpad == 108.75 or scratchpad == 108.90 or scratchpad == 108.95
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor1freq-set", 1);
setprop("/FMGC/internal/ils1freq-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
@ -113,7 +113,7 @@ var radnavInput = func(key) {
}
} else if (key == "L4") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vor1crs-set", 0);
setprop("/FMGC/internal/ils1crs-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
@ -121,7 +121,7 @@ var radnavInput = func(key) {
if (tfs >= 1 and tfs <= 3) {
if (scratchpad >= 0 and scratchpad <= 360) {
setprop("/instrumentation/nav[0]/radials/selected-deg", scratchpad);
setprop("/FMGC/internal/vor1crs-set", 1);
setprop("/FMGC/internal/ils1crs-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
@ -157,12 +157,12 @@ var radnavInput = func(key) {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
} else {
setprop("/instrumentation/nav[1]/frequencies/selected-mhz", scratchpad);
setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor2freq-set", 1);
setprop("/MCDU[1]/scratchpad", "");
}
} else if (scratchpad >= 112.00 and scratchpad <= 117.95) {
setprop("/instrumentation/nav[1]/frequencies/selected-mhz", scratchpad);
setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor2freq-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {

View file

@ -79,6 +79,8 @@ var elec_init = func {
setprop("/systems/electrical/outputs/mk-viii", 0);
setprop("/systems/electrical/outputs/nav", 0);
setprop("/systems/electrical/outputs/nav[1]", 0);
setprop("/systems/electrical/outputs/nav[2]", 0);
setprop("/systems/electrical/outputs/nav[3]", 0);
setprop("/systems/electrical/outputs/pitot-head", 0);
setprop("/systems/electrical/outputs/stobe-lights", 0);
setprop("/systems/electrical/outputs/tacan", 0);
@ -416,6 +418,8 @@ var master_elec = func {
setprop("/systems/electrical/outputs/mk-viii", 0);
setprop("/systems/electrical/outputs/nav", 0);
setprop("/systems/electrical/outputs/nav[1]", 0);
setprop("/systems/electrical/outputs/nav[2]", 0);
setprop("/systems/electrical/outputs/nav[3]", 0);
setprop("/systems/electrical/outputs/pitot-head", 0);
setprop("/systems/electrical/outputs/stobe-lights", 0);
setprop("/systems/electrical/outputs/tacan", 0);
@ -448,6 +452,8 @@ var master_elec = func {
setprop("/systems/electrical/outputs/mk-viii", dc_volt_std);
setprop("/systems/electrical/outputs/nav", dc_volt_std);
setprop("/systems/electrical/outputs/nav[1]", dc_volt_std);
setprop("/systems/electrical/outputs/nav[2]", dc_volt_std);
setprop("/systems/electrical/outputs/nav[3]", dc_volt_std);
setprop("/systems/electrical/outputs/pitot-head", dc_volt_std);
setprop("/systems/electrical/outputs/stobe-lights", dc_volt_std);
setprop("/systems/electrical/outputs/tacan", dc_volt_std);

View file

@ -64,7 +64,22 @@ file, these values will be used (they are hardcoded).
<name>dme</name>
<number>0</number>
</dme>
<dme>
<name>dme</name>
<number>1</number>
</dme>
<dme>
<name>dme</name>
<number>2</number>
</dme>
<dme>
<name>dme</name>
<number>3</number>
</dme>
<altimeter>
<name>encoder</name>
<number>0</number>
@ -103,6 +118,16 @@ file, these values will be used (they are hardcoded).
<name>nav</name>
<number>1</number>
</nav-radio>
<nav-radio>
<name>nav</name>
<number>2</number>
</nav-radio>
<nav-radio>
<name>nav</name>
<number>3</number>
</nav-radio>
<slip-skid-ball>
<name>slip-skid-ball</name>