diff --git a/A320-main.xml b/A320-main.xml index 74d11910..9ce4afae 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -1372,6 +1372,11 @@ + + 99999 + 99999 + + -1 diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index e82d8b0e..08cf4619 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -96,15 +96,19 @@ var flightNum = props.globals.getNode("MCDUC/flight-num", 1); var flightNumSet = props.globals.getNode("MCDUC/flight-num-set", 1); var depArpt = props.globals.getNode("FMGC/internal/dep-arpt", 1); var arrArpt = props.globals.getNode("FMGC/internal/arr-arpt", 1); -var alt_airport = props.globals.getNode("FMGC/internal/alt-airport", 1); var toFromSet = props.globals.getNode("FMGC/internal/tofrom-set", 1); +var alt_airport = props.globals.getNode("FMGC/internal/alt-airport", 1); +var altSet = props.globals.getNode("FMGC/internal/alt-set", 1); var costIndex = props.globals.getNode("FMGC/internal/cost-index", 1); var costIndexSet = props.globals.getNode("FMGC/internal/cost-index-set", 1); var cruiseFL = props.globals.getNode("FMGC/internal/cruise-fl", 1); var cruiseSet = props.globals.getNode("FMGC/internal/cruise-lvl-set", 1); var cruiseTemp = props.globals.getNode("FMGC/internal/cruise-temp", 1); +var cruiseTempSet = props.globals.getNode("FMGC/internal/cruise-temp-set", 1); var tropo = props.globals.getNode("FMGC/internal/tropo", 1); var tropoSet = props.globals.getNode("FMGC/internal/tropo-set", 1); +var gndtemp = props.globals.getNode("FMGC/internal/gndtemp", 1); +var gndtempSet = props.globals.getNode("FMGC/internal/gndtemp-set", 1); var ADIRSMCDUBTN = props.globals.getNode("controls/adirs/mcducbtn", 1); # IRSINIT variables @@ -145,6 +149,7 @@ var alt_utc = props.globals.getNode("FMGC/internal/alt-utc", 1); var pri_efob = props.globals.getNode("FMGC/internal/pri-efob", 1); var alt_efob = props.globals.getNode("FMGC/internal/alt-efob", 1); var fob = props.globals.getNode("FMGC/internal/fob", 1); +var fffq_sensor = props.globals.getNode("FMGC/internal/fffq-sensor", 1); var gw = props.globals.getNode("FMGC/internal/gw", 1); var cg = props.globals.getNode("FMGC/internal/cg", 1); @@ -163,7 +168,7 @@ var v2 = props.globals.getNode("FMGC/internal/v2", 1); var v2Set = props.globals.getNode("FMGC/internal/v2-set", 1); var clbReducFt = props.globals.getNode("systems/thrust/clbreduc-ft", 1); -var reducFt = props.globals.getNode("FMGC/internal/reduc-agl-ft", 1); # It's not AGL anymore +var reducFt = props.globals.getNode("FMGC/internal/accel-agl-ft", 1); # It's not AGL anymore var thrAccSet = props.globals.getNode("MCDUC/thracc-set", 1); var flapTO = props.globals.getNode("FMGC/internal/to-flap", 1); var THSTO = props.globals.getNode("FMGC/internal/to-ths", 1); @@ -190,8 +195,9 @@ var dest_mag = props.globals.getNode("FMGC/internal/dest-mag", 1); var dest_wind = props.globals.getNode("FMGC/internal/dest-wind", 1); var vapp_speed_set = props.globals.getNode("FMGC/internal/vapp-speed-set", 1); var final = props.globals.getNode("FMGC/internal/final", 1); -var mda = props.globals.getNode("FMGC/internal/mda", 1); -var dh = props.globals.getNode("FMGC/internal/dh", 1); +var radio = props.globals.getNode("FMGC/internal/radio", 1); +var baro = props.globals.getNode("FMGC/internal/baro", 1); +var radio_no = props.globals.getNode("FMGC/internal/radio-no", 1); var ldg_config_3_set = props.globals.getNode("FMGC/internal/ldg-config-3-set", 1); var ldg_config_f_set = props.globals.getNode("FMGC/internal/ldg-config-f-set", 1); @@ -274,7 +280,7 @@ var canvas_MCDU_base = { "FUELPRED_ZFWCG","FUELPRED_ZFW_S","PROG","PROG_UPDATE","PERFTO","PERFTO_V1","PERFTO_VR","PERFTO_V2","PERFTO_FE","PERFTO_SE","PERFTO_OE","PERFAPPR", "PERFAPPR_FE","PERFAPPR_SE","PERFAPPR_OE","PERFAPPR_LDG_3","PERFAPPR_LDG_F","PERFGA","PERFGA_FE","PERFGA_SE","PERFGA_OE","FPLN","FPLN_From", "FPLN_TMPY_group","FPLN_FROM","FPLN_Callsign","departureTMPY", "arrowsDepArr","arrow1L","arrow2L","arrow3L","arrow4L","arrow5L","arrow1R","arrow2R", - "arrow3R","arrow4R","arrow5R","DIRTO_TMPY_group"]; + "arrow3R","arrow4R","arrow5R","DIRTO_TMPY_group","IRSINIT","IRSINIT_1","IRSINIT_2","IRSINIT_star"]; }, update: func() { if (systems.ELEC.Bus.ac1.getValue() >= 110 and mcdu1_lgt.getValue() > 0.01) { @@ -292,6 +298,24 @@ var canvas_MCDU_base = { }, updateCommon: func(i) { page = pageProp[i].getValue(); + if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) { + color_selected = getprop("MCDU[" ~ i ~ "]/scratchpad-color"); + if (color_selected == "grn") { + me["Scratchpad"].setColor(GREEN); + } else if (color_selected == "blu") { + me["Scratchpad"].setColor(BLUE); + } else if (color_selected == "amb") { + me["Scratchpad"].setColor(AMBER); + } else if (color_selected == "yel") { + me["Scratchpad"].setColor(YELLOW); + } else if (color_selected == "mag") { + me["Scratchpad"].setColor(MAGENTA); + } else { + me["Scratchpad"].setColor(WHITE); + } + } else { + me["Scratchpad"].setColor(WHITE); + } if (page == "F-PLNA" or page == "F-PLNB") { if (!pageSwitch[i].getBoolValue()) { me["Simple"].show(); @@ -299,7 +323,10 @@ var canvas_MCDU_base = { me["FPLN"].show(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); + me["FUELPRED"].hide(); + me["PROG"].hide(); me["PERFTO"].hide(); me["PERFAPPR"].hide(); me["PERFGA"].hide(); @@ -309,6 +336,8 @@ var canvas_MCDU_base = { me["ArrowRight"].show(); me["arrowsDepArr"].hide(); + me["Simple_L0S"].hide(); + me["Simple_L1_Arrow"].hide(); me["Simple_L2_Arrow"].hide(); me["Simple_L3_Arrow"].hide(); @@ -629,6 +658,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -691,6 +721,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -752,6 +783,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -811,6 +843,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -875,6 +908,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -941,6 +975,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -1059,6 +1094,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].show(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -1074,13 +1110,13 @@ var canvas_MCDU_base = { me["ArrowLeft"].show(); me["ArrowRight"].show(); - me.showLeft(0, 1, 0, 1, 0, 1); + me.showLeft(0, 1, 0, -1, 0, 1); me["Simple_L0S"].hide(); - me.showLeftS(1, 1, 1, 1, 1, 1); + me.showLeftS(1, 1, 1, -1, 1, 1); me.showLeftArrow(-1, -1, -1, -1, -1, -1); - me.showRight(0, 0, 0, 1, 1, 1); - me.showRightS(1, 0, -1, 1, -1, 1); - me.showRightArrow(-1, -1, -1, -1, 1, -1); + me.showRight(0, 0, 1, 1, 1, 1); + me.showRightS(1, 0, -1, -1, 1, 1); + me.showRightArrow(-1, -1, -1, 1, -1, -1); me.fontLeft(default, default, default, default, default, default); me.fontLeftS(default, default, default, default, default, default); @@ -1093,7 +1129,7 @@ var canvas_MCDU_base = { me.colorLeft("blu", "wht", "blu", "blu", "ack", "ack"); me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht"); me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht"); - me.colorRight("blu", "amb", "amb", "blu", "wht", "blu"); + me.colorRight("blu", "amb", "amb", "wht", "blu", "blu"); me.colorRightS("wht", "amb", "wht", "wht", "wht", "wht"); me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht"); @@ -1125,10 +1161,16 @@ var canvas_MCDU_base = { me["INITA_CruiseFLTemp"].hide(); me["Simple_L6"].setColor(1,1,1); me["Simple_L6"].setText("-----/---g"); - } else if (cruiseSet.getValue() == 1 and cruiseTemp.getValue() != -999) { + } else if (cruiseSet.getValue() == 1 and cruiseTempSet.getValue() == 1) { me["INITA_CruiseFLTemp"].hide(); me["Simple_L6"].setColor(0.0901,0.6039,0.7176); me["Simple_L6"].setText(sprintf("%s", "FL" ~ cruiseFL.getValue()) ~ sprintf("/%sg", cruiseTemp.getValue())); + } else if (cruiseSet.getValue() == 1) { + me["INITA_CruiseFLTemp"].hide(); + me["Simple_L6"].setColor(0.0901,0.6039,0.7176); + setprop("FMGC/internal/cruise-temp", 15 - (2 * cruiseFL.getValue() / 10)); + setprop("FMGC/internal/cruise-temp-set", 1); + me["Simple_L6"].setText(sprintf("%s", "FL" ~ cruiseFL.getValue()) ~ sprintf("/%sg", cruiseTemp.getValue())); } else { me["INITA_CruiseFLTemp"].show(); me["Simple_L6"].setColor(0.7333,0.3803,0); @@ -1139,26 +1181,14 @@ var canvas_MCDU_base = { me["INITA_FromTo"].hide(); me["Simple_L1"].show(); me["Simple_L2"].setColor(0.0901,0.6039,0.7176); - if (alt_airport.getValue() == "") { - me["Simple_L2"].setText("NONE"); - } else { + if (altSet.getValue() == 1) { me["Simple_L2"].setText(alt_airport.getValue()); + } else { + me["Simple_L2"].setText("NONE"); } me.showRight(1, -1, 0, 0, 0, 0); me["Simple_R2S"].hide(); me["INITA_InitRequest"].hide(); - me["Simple_L4"].setText("----.-"); - me["Simple_R4"].setText("-----.--"); - if (getprop("FMGC/flightplan[2]/wp[0]/lat") > 0) { - me["Simple_L4"].setText(sprintf("%6.2fN", getprop("FMGC/flightplan[2]/wp[0]/lat"))); - } else { - me["Simple_L4"].setText(sprintf("%6.2fS", getprop("FMGC/flightplan[2]/wp[0]/lat") * -1)); - } - if (getprop("FMGC/flightplan[2]/wp[0]/lon") > 0) { - me["Simple_R4"].setText(sprintf("%7.2fE", getprop("FMGC/flightplan[2]/wp[0]/lon"))); - } else { - me["Simple_R4"].setText(sprintf("%7.2fW", getprop("FMGC/flightplan[2]/wp[0]/lon") * -1)); - } } else { me["INITA_CoRoute"].show(); me["INITA_FromTo"].show(); @@ -1168,41 +1198,52 @@ var canvas_MCDU_base = { me.showRight(-1, 1, 0, 0, 0, 0); me["Simple_R2S"].show(); me["INITA_InitRequest"].show(); - me["Simple_L4"].setText("----.-"); - me["Simple_R4"].setText("-----.--"); } if (ADIRSMCDUBTN.getValue() != 1) { me["INITA_AlignIRS"].show(); - me["Simple_R3"].show(); - me.showRightArrow(0, 0, 1, 0, 0, 0); + me["Simple_R3"].setColor(AMBER); + me.showRightArrow(0, 0, -1, 0, 0, 0); } else { me["INITA_AlignIRS"].hide(); - me["Simple_R3"].hide(); - me.showRightArrow(0, 0, -1, 0, 0, 0); + me["Simple_R3"].setColor(WHITE); + me.showRightArrow(0, 0, 1, 0, 0, 0); } if (tropoSet.getValue() == 1) { - me["Simple_R6"].setFontSize(normal); + me["Simple_R5"].setFontSize(normal); } else { + me["Simple_R5"].setFontSize(small); + } + + me["Simple_R6S"].setText("GND TEMP"); + if (getprop("FMGC/status/phase") == 0 and !getprop("FMGC/internal/gndtemp-set")) { + setprop("FMGC/internal/gndtemp", 15 - (2 * getprop("position/gear-agl-ft") / 1000)); + me["Simple_R6"].setText(sprintf("%.0fg", gndtemp.getValue())); me["Simple_R6"].setFontSize(small); + } else { + if (getprop("FMGC/internal/gndtemp-set")) { + me["Simple_R6"].setFontSize(normal); + } else { + me["Simple_R6"].setFontSize(small); + } + me["Simple_R6"].setText(sprintf("%.0fg", gndtemp.getValue())); } me["Simple_L1S"].setText(" CO RTE"); me["Simple_L2S"].setText("ALTN/CO RTE"); me["Simple_L3S"].setText("FLT NBR"); - me["Simple_L4S"].setText("LAT"); me["Simple_L5S"].setText("COST INDEX"); me["Simple_L6S"].setText("CRZ FL/TEMP"); me["Simple_L1"].setText("NONE"); me["Simple_L3"].setText(sprintf("%s", flightNum.getValue())); me["Simple_R1S"].setText("FROM/TO "); me["Simple_R2S"].setText("INIT "); - me["Simple_R4S"].setText("LONG"); - me["Simple_R6S"].setText("TROPO"); + me["Simple_R5S"].setText("TROPO"); + me["Simple_R1"].setText(sprintf("%s", depArpt.getValue() ~ "/" ~ arrArpt.getValue())); me["Simple_R2"].setText("REQUEST "); me["Simple_R3"].setText("IRS INIT "); - me["Simple_R5"].setText("WIND "); - me["Simple_R6"].setText(sprintf("%5.0f", tropo.getValue())); + me["Simple_R4"].setText("WIND "); + me["Simple_R5"].setText(sprintf("%5.0f", tropo.getValue())); } else if (page == "IRSINIT") { if (!pageSwitch[i].getBoolValue()) { me["Simple"].show(); @@ -1210,6 +1251,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].show(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -1256,100 +1298,114 @@ var canvas_MCDU_base = { pageSwitch[i].setBoolValue(1); } + me["Simple_L1S"].setText("LAT"); + me["Simple_R1S"].setText("LONG"); + if (getprop("FMGC/internal/align-ref-lat-edit")) { + me["IRSINIT_1"].show(); + me["IRSINIT_2"].hide(); + } else if (getprop("FMGC/internal/align-ref-long-edit")) { + me["IRSINIT_1"].hide(); + me["IRSINIT_2"].show(); + } else { + me["IRSINIT_1"].hide(); + me["IRSINIT_2"].hide(); + } + if (toFromSet.getValue() == 1) { - #need to convert lat/long format - if (getprop("FMGC/flightplan[2]/wp[0]/lat") > 0) { - me["Simple_L1"].setText(sprintf("%6.2fN", getprop("FMGC/flightplan[2]/wp[0]/lat"))); + degrees = getprop("FMGC/internal/align-ref-lat-degrees"); + minutes = getprop("FMGC/internal/align-ref-lat-minutes"); + sign = getprop("FMGC/internal/align-ref-lat-sign"); + dms_lat = getprop("FMGC/flightplan[2]/wp[0]/lat"); + degrees_lat = int(dms_lat); + minutes_lat = sprintf("%.1f",abs((dms_lat - degrees_lat) * 60)); + sign_lat = degrees_lat >= 0 ? "N" : "S"; + lat_same = degrees_lat == degrees and minutes_lat == minutes and sign_lat == sign; + me["Simple_L1"].setText(abs(sprintf("%.0f", degrees)) ~ "g" ~ sprintf("%.1f", minutes) ~ " " ~ sign); + + degrees = getprop("FMGC/internal/align-ref-long-degrees"); + minutes = getprop("FMGC/internal/align-ref-long-minutes"); + sign = getprop("FMGC/internal/align-ref-long-sign"); + dms_long = getprop("FMGC/flightplan[2]/wp[0]/lon"); + degrees_long = int(dms_long); + minutes_long = sprintf("%.1f",abs((dms_long - degrees_long) * 60)); + sign_long = degrees_long >= 0 ? "E" : "W"; + long_same = degrees_long == degrees and minutes_long == minutes and sign_long == sign; + me["Simple_R1"].setText(abs(sprintf("%.0f", degrees)) ~ "g" ~ sprintf("%.1f", minutes) ~ " " ~ sign); + + if (lat_same and long_same) { + me["Simple_C1"].setText(getprop("FMGC/flightplan[2]/wp[0]/id")); + me["Simple_C1"].setColor(GREEN); } else { - me["Simple_L1"].setText(sprintf("%6.2fS", getprop("FMGC/flightplan[2]/wp[0]/lat") * -1)); + me["Simple_C1"].setText("----"); + me["Simple_C1"].setColor(WHITE); } - if (getprop("FMGC/flightplan[2]/wp[0]/lon") > 0) { - me["Simple_R1"].setText(sprintf("%7.2fE", getprop("FMGC/flightplan[2]/wp[0]/lon"))); - } else { - me["Simple_R1"].setText(sprintf("%7.2fW", getprop("FMGC/flightplan[2]/wp[0]/lon") * -1)); - } - me["Simple_C1"].setText(sprintf("%s", depArpt.getValue())); } else { me["Simple_L1"].setText("-----.--"); me["Simple_R1"].setText("------.--"); me["Simple_C1"].setText("----"); + me["Simple_C1"].setColor(WHITE); } - #need to convert lat/long format - gps_lat = getprop("position/latitude-deg"); - gps_lon = getprop("position/longitude-deg"); - if (gps_lat > 0) { - me["Simple_L2"].setText(sprintf("%6.2fN", gps_lat)); - } else { - me["Simple_L2"].setText(sprintf("%6.2fS", gps_lat * -1)); - } - if (gps_lon > 0) { - me["Simple_R2"].setText(sprintf("%7.2fE", gps_lon)); - } else { - me["Simple_R2"].setText(sprintf("%7.2fW", gps_lon * -1)); - } - if (getprop("systems/navigation/adr/operating-1")) { - #me["Simple_C3"].setText(getprop("position/latitude-string") ~ "/" ~ getprop("position/longitude-string")); - if (gps_lat > 0 and gps_lon > 0) { - me["Simple_C3"].setText(sprintf("%6.2fN", gps_lat) ~ "/" ~ sprintf("%7.2fE", gps_lon)); - } else if (gps_lat > 0) { - me["Simple_C3"].setText(sprintf("%6.2fN", gps_lat) ~ "/" ~ sprintf("%7.2fW", gps_lon * -1)); - } else if (gps_lon > 0) { - me["Simple_C3"].setText(sprintf("%6.2fS", gps_lat * -1) ~ "/" ~ sprintf("%7.2fE", gps_lon)); - } else { - me["Simple_C3"].setText(sprintf("%6.2fS", gps_lat * -1) ~ "/" ~ sprintf("%7.2fW", gps_lon * -1)); - } + dms = getprop("position/latitude-deg"); + degrees = int(dms); + minutes = sprintf("%.1f",abs((dms - degrees) * 60)); + sign = degrees >= 0 ? "N" : "S"; + me["Simple_L2"].setText(abs(degrees) ~ "g" ~ minutes ~ " " ~ sign); + dms2 = getprop("position/longitude-deg"); + degrees2 = int(dms2); + minutes2 = sprintf("%.1f",abs((dms2 - degrees2) * 60)); + sign2 = degrees2 >= 0 ? "E" : "W"; + me["Simple_R2"].setText(abs(degrees2) ~ "g" ~ minutes2 ~ " " ~ sign2); + if (getprop("systems/navigation/adr/operating-1") and getprop("FMGC/internal/align1-done")) { + me["Simple_C3"].setText(abs(degrees) ~ "g" ~ minutes ~ " " ~ sign ~ "/" ~ abs(degrees2) ~ "g" ~ minutes2 ~ " " ~ sign2); } else { me["Simple_C3"].setText("-----.--/-----.--"); } - if (getprop("systems/navigation/adr/operating-2")) { - #me["Simple_C4"].setText(getprop("position/latitude-string") ~ "/" ~ getprop("position/longitude-string")); - if (gps_lat > 0 and gps_lon > 0) { - me["Simple_C4"].setText(sprintf("%6.2fN", gps_lat) ~ "/" ~ sprintf("%7.2fE", gps_lon)); - } else if (gps_lat > 0) { - me["Simple_C4"].setText(sprintf("%6.2fN", gps_lat) ~ "/" ~ sprintf("%7.2fW", gps_lon * -1)); - } else if (gps_lon > 0) { - me["Simple_C4"].setText(sprintf("%6.2fS", gps_lat * -1) ~ "/" ~ sprintf("%7.2fE", gps_lon)); - } else { - me["Simple_C4"].setText(sprintf("%6.2fS", gps_lat * -1) ~ "/" ~ sprintf("%7.2fW", gps_lon * -1)); - } + if (getprop("systems/navigation/adr/operating-2") and getprop("FMGC/internal/align2-done")) { + me["Simple_C4"].setText(abs(degrees) ~ "g" ~ minutes ~ " " ~ sign ~ "/" ~ abs(degrees2) ~ "g" ~ minutes2 ~ " " ~ sign2); } else { me["Simple_C4"].setText("-----.--/-----.--"); } - if (getprop("systems/navigation/adr/operating-3")) { - #me["Simple_C5"].setText(getprop("position/latitude-string") ~ "/" ~ getprop("position/longitude-string")); - if (gps_lat > 0 and gps_lon > 0) { - me["Simple_C5"].setText(sprintf("%6.2fN", gps_lat) ~ "/" ~ sprintf("%7.2fE", gps_lon)); - } else if (gps_lat > 0) { - me["Simple_C5"].setText(sprintf("%6.2fN", gps_lat) ~ "/" ~ sprintf("%7.2fW", gps_lon * -1)); - } else if (gps_lon > 0) { - me["Simple_C5"].setText(sprintf("%6.2fS", gps_lat * -1) ~ "/" ~ sprintf("%7.2fE", gps_lon)); - } else { - me["Simple_C5"].setText(sprintf("%6.2fS", gps_lat * -1) ~ "/" ~ sprintf("%7.2fW", gps_lon * -1)); - } + if (getprop("systems/navigation/adr/operating-3") and getprop("FMGC/internal/align3-done")) { + me["Simple_C5"].setText(abs(degrees) ~ "g" ~ minutes ~ " " ~ sign ~ "/" ~ abs(degrees2) ~ "g" ~ minutes2 ~ " " ~ sign2); } else { me["Simple_C5"].setText("-----.--/-----.--"); } if (align_set.getValue() == 1) { - #still need * to right of button instead of arrow me["Simple_R6"].setText("CONFIRM ALIGN "); me.colorRight("ack", "ack", "ack", "ack", "ack", "amb"); - me.colorRightArrow("ack", "ack", "ack", "ack", "ack", "amb"); + me["IRSINIT_star"].show(); + me.showRightArrow(0, 0, 0, 0, 0, -1); } else { me["Simple_R6"].setText("ALIGN ON REF "); + me["IRSINIT_star"].hide(); + me.showRightArrow(0, 0, 0, 0, 0, 1); + } + + if (getprop("systems/navigation/adr/operating-1") and systems.ADIRSnew.ADIRunits[0].inAlign == 0) { + me["Simple_C3S"].setText("IRS1 ALIGNED ON GPS"); + } else { + me["Simple_C3S"].setText("IRS1 ALIGNING ON GPS"); + } + + if (getprop("systems/navigation/adr/operating-2") and systems.ADIRSnew.ADIRunits[1].inAlign == 0) { + me["Simple_C4S"].setText("IRS2 ALIGNED ON GPS"); + } else { + me["Simple_C4S"].setText("IRS2 ALIGNING ON GPS"); + } + + if (getprop("systems/navigation/adr/operating-3") and systems.ADIRSnew.ADIRunits[2].inAlign == 0) { + me["Simple_C5S"].setText("IRS3 ALIGNED ON GPS"); + } else { + me["Simple_C5S"].setText("IRS3 ALIGNING ON GPS"); } - me["Simple_L1S"].setText("LAT"); me["Simple_L2S"].setText("LAT"); me["Simple_L6"].setText(" RETURN"); - me["Simple_R1S"].setText("LONG"); me["Simple_R2S"].setText("LONG"); me["Simple_C1S"].setText("REFERENCE"); me["Simple_C2S"].setText("GPS POSITION"); - me["Simple_C3S"].setText("IRS1 ALIGNING ON GPS"); - me["Simple_C4S"].setText("IRS2 ALIGNING ON GPS"); - me["Simple_C5S"].setText("IRS3 ALIGNING ON GPS"); } else if (page == "ROUTESELECTION") { if (!pageSwitch[i].getBoolValue()) { @@ -1358,6 +1414,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -1412,6 +1469,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].show(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -1497,7 +1555,7 @@ var canvas_MCDU_base = { me["Simple_L2"].setText("---.-/----"); me["Simple_L3"].setText("---.-/---.-"); me["Simple_L4"].setText("---.-/----"); - me["Simple_L5"].setText("---.-/----"); + me["Simple_L5"].setText("---.-/0030"); me["Simple_L6"].setText("---.-"); me["Simple_R3S"].show(); me["Simple_R3"].show(); @@ -1546,6 +1604,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].show(); me["PROG"].hide(); @@ -1635,7 +1694,7 @@ var canvas_MCDU_base = { setprop("FMGC/internal/fob", num(getprop("consumables/fuel/total-fuel-lbs") / 1000)); setprop("FMGC/internal/gw", num(getprop("fdm/jsbsim/inertia/weight-lbs") / 1000)); setprop("FMGC/internal/cg", num(getprop("FMGC/internal/zfwcg"))); - me["Simple_R4"].setText(sprintf("%4.1f/FF+FQ", fob.getValue())); + me["Simple_R4"].setText(sprintf("%4.1f/" ~ fffq_sensor.getValue(), fob.getValue())); me["Simple_R5"].setText(sprintf("%4.1f/", gw.getValue()) ~ sprintf("%4.1f", cg.getValue())); me["Simple_R6"].setText(sprintf("%4.1f/" ~ extra_time.getValue(), extra_fuel.getValue())); @@ -1644,7 +1703,7 @@ var canvas_MCDU_base = { } else { me["Simple_L3"].setText("---.-/---.-"); me["Simple_L4"].setText("---.-/----"); - me["Simple_L5"].setText("---.-/----"); + me["Simple_L5"].setText("---.-/0030"); me["Simple_L6"].setText("---.-"); me["Simple_R4"].setText("---.-/FF+FQ"); @@ -1695,6 +1754,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].show(); @@ -1822,6 +1882,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -1840,8 +1901,8 @@ var canvas_MCDU_base = { me["Simple_L0S"].hide(); me.showLeftS(1, 1, 1, 1, 1, 1); me.showLeftArrow(-1, -1, -1, -1, -1, 1); - me.showRight(1, 1, 1, 1, 1, 1); - me.showRightS(1, 1, 1, 1, 1, 1); + me.showRight(-1, 1, 1, 1, 1, 1); + me.showRightS(-1, 1, 1, 1, 1, 1); me.showRightArrow(-1, -1, -1, -1, -1, 1); me.showCenter(1, 1, 1, -1, -1, -1); me.showCenterS(1, 1, 1, -1, -1, -1); @@ -1871,7 +1932,7 @@ var canvas_MCDU_base = { me["Simple_L2"].setText(sprintf("%3.0f", vr.getValue())); me["Simple_L3"].setText(sprintf("%3.0f", v2.getValue())); me["Simple_L4"].setText(sprintf("%3.0f", transAlt.getValue())); - me["Simple_L5"].setText(sprintf("%s", clbReducFt.getValue() ~ "/" ~ reducFt.getValue())); + me["Simple_L5"].setText(sprintf("%3.0f", clbReducFt.getValue()) ~ sprintf("/%3.0f", reducFt.getValue())); me["Simple_L6"].setText(" TO DATA"); me["Simple_L1S"].setText(" V1"); me["Simple_L2S"].setText(" VR"); @@ -1879,7 +1940,6 @@ var canvas_MCDU_base = { me["Simple_L4S"].setText("TRANS ALT"); me["Simple_L5S"].setText("THR RED/ACC"); me["Simple_L6S"].setText(" UPLINK"); - me["Simple_R1"].setText("--- "); me["Simple_R2"].setText("[ ] "); me["Simple_R5"].setText(sprintf("%3.0f", engOutAcc.getValue())); me["Simple_R6"].setText("PHASE "); @@ -1896,6 +1956,12 @@ var canvas_MCDU_base = { me["Simple_Title"].setColor(1, 1, 1); } + if (fmgc.flightPlanController.flightplans[2].departure_runway != nil) { + me["Simple_Title"].setText(sprintf("TAKE OFF RWY %s", fmgc.flightPlanController.flightplans[2].departure_runway.id)); + } else { + me["Simple_Title"].setText("TAKE OFF"); + } + if (v1Set.getValue() == 1) { me["PERFTO_V1"].hide(); me["Simple_L1"].show(); @@ -1922,6 +1988,7 @@ var canvas_MCDU_base = { } else { me["Simple_L5"].setFontSize(small); } + if (flapTHSSet.getValue() == 1) { me["Simple_R3"].setFont(default); me["Simple_R3"].setFontSize(normal); @@ -1950,29 +2017,6 @@ var canvas_MCDU_base = { me["Simple_R5"].setFontSize(small); } - me["Simple_L1"].setText(sprintf("%3.0f", v1.getValue())); - me["Simple_L2"].setText(sprintf("%3.0f", vr.getValue())); - me["Simple_L3"].setText(sprintf("%3.0f", v2.getValue())); - me["Simple_L4"].setText(sprintf("%3.0f", transAlt.getValue())); - me["Simple_L5"].setText(sprintf("%s", clbReducFt.getValue() ~ "/" ~ reducFt.getValue())); - me["Simple_L6"].setText(" TO DATA"); - me["Simple_L1S"].setText(" V1"); - me["Simple_L2S"].setText(" VR"); - me["Simple_L3S"].setText(" V2"); - me["Simple_L4S"].setText("TRANS ALT"); - me["Simple_L5S"].setText("THR RED/ACC"); - me["Simple_L6S"].setText(" UPLINK"); - me["Simple_R1"].setText("--- "); - me["Simple_R2"].setText("[ ] "); - me["Simple_R5"].setText(sprintf("%3.0f", engOutAcc.getValue())); - me["Simple_R6"].setText("PHASE "); - me["Simple_R1S"].setText("RWY "); - me["Simple_R2S"].setText("TO SHIFT "); - me["Simple_R3S"].setText("FLAPS/THS"); - me["Simple_R4S"].setText("FLEX TO TEMP"); - me["Simple_R5S"].setText("ENG OUT ACC"); - me["Simple_R6S"].setText("NEXT "); - if (zfwSet.getValue() == 1 and blockSet.getValue() == 1) { me["Simple_C1"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/flap2_to"))); me["Simple_C2"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/slat_to"))); @@ -1993,6 +2037,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -2157,6 +2202,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -2304,6 +2350,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -2419,14 +2466,14 @@ var canvas_MCDU_base = { if (getprop("it-autoflight/input/kts-mach")) { me["Simple_L4"].setText(sprintf(" %3.3f", getprop("it-autoflight/input/spd-mach"))); } else { - me["Simple_L4"].setText(sprintf(" %s", int(getprop("it-autoflight/input/spd-kts")))); + me["Simple_L4"].setText(sprintf(" %3.0f", getprop("it-autoflight/input/spd-kts"))); } me.fontLeft(0, 0, 0, default, 0, 0); } if (costIndexSet.getValue() == 1) { me["Simple_L2"].setColor(0.0901,0.6039,0.7176); - me["Simple_L2"].setText(sprintf(" %s", costIndex.getValue())); + me["Simple_L2"].setText(sprintf(" %2.0f", costIndex.getValue())); } else { me["Simple_L2"].setColor(1,1,1); me["Simple_L2"].setText(" ---"); @@ -2439,7 +2486,7 @@ var canvas_MCDU_base = { if (getprop("it-autoflight/input/kts-mach")) { me["Simple_L3"].setText(sprintf(" %3.3f", getprop("FMGC/internal/mng-spd"))); } else { - me["Simple_L3"].setText(sprintf(" %s", int(getprop("FMGC/internal/mng-spd")))); + me["Simple_L3"].setText(sprintf(" %3.0f", getprop("FMGC/internal/mng-spd"))); } me["Simple_L5"].setText(" EXPEDITE"); @@ -2448,7 +2495,7 @@ var canvas_MCDU_base = { me["Simple_R1"].setText("---"); me["Simple_C2"].setText(" PRED TO"); - me["Simple_R2"].setText(sprintf("FL%s", getprop("it-autoflight/input/alt") / 100)); + me["Simple_R2"].setText(sprintf("FL%3.0f", getprop("it-autoflight/input/alt") / 100)); me["Simple_R3S"].setText("DIST"); me["Simple_R3"].setText("---"); @@ -2472,6 +2519,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -2503,7 +2551,7 @@ var canvas_MCDU_base = { me.fontRightS(default, default, default, default, default, default); me.fontSizeLeft(small, small, small, small, small, normal); - me.fontSizeRight(small, small, small, small, normal, normal); + me.fontSizeRight(normal, small, small, small, normal, normal); me.fontSizeCenter(small, small, small, 0, small, 0); me.colorLeft("blu", "blu", "blu", "blu", "blu", "wht"); @@ -2540,14 +2588,14 @@ var canvas_MCDU_base = { me["Simple_L2S"].setText("TEMP"); if (dest_temp.getValue() != -999) { - me["Simple_L2"].setText(sprintf("%3.0fg ", dest_temp.getValue())); + me["Simple_L2"].setText(sprintf("%3.0fg", dest_temp.getValue())); } else { - me["Simple_L2"].setText("---g "); + me["Simple_L2"].setText("---g"); } me["Simple_L3S"].setText("MAG WIND"); if (dest_mag.getValue() != -1 and dest_wind.getValue() != -1) { - me["Simple_L3"].setText(sprintf("%3.0fg/", dest_mag.getValue()) ~ sprintf("%3.0f", dest_wind.getValue())); + me["Simple_L3"].setText(sprintf("%3.0fg", dest_mag.getValue()) ~ sprintf("/%.0f", dest_wind.getValue())); } else { me["Simple_L3"].setText("---g/---");; } @@ -2556,13 +2604,39 @@ var canvas_MCDU_base = { me["Simple_L4"].setText(sprintf("%3.0f", transAlt.getValue())); me["Simple_R1S"].setText("FINAL"); - me["Simple_R1"].setText("-----"); + if (fmgc.flightPlanController.flightplans[2].approach != nil) { + me["Simple_R1"].setText(sprintf("%s",fmgc.flightPlanController.flightplans[2].approach.id)); + me["Simple_R1"].setColor(GREEN); + } else { + me["Simple_R1"].setText("--- "); + me["Simple_R1"].setColor(WHITE); + } - me["Simple_R2S"].setText("MDA"); - me["Simple_R2"].setText(" [ ]"); + me["Simple_R2S"].setText("BARO"); + if (getprop("FMGC/internal/baro") != 99999) { + me["Simple_R2"].setText(sprintf("%.0f", getprop("FMGC/internal/baro"))); + me.fontRight(0, default, 0, 0, 0, 0); + me.fontSizeRight(0, normal, 0, 0, 0, 0); + } else { + me["Simple_R2"].setText(" [ ]"); + me.fontRight(0, symbol, 0, 0, 0, 0); + me.fontSizeRight(0, small, 0, 0, 0, 0); + } - me["Simple_R3S"].setText("DH"); - me["Simple_R3"].setText(" [ ]"); + me["Simple_R3S"].setText("RADIO"); + if (getprop("FMGC/internal/radio") != 99999) { + me["Simple_R3"].setText(sprintf("%.0f", getprop("FMGC/internal/radio"))); + me.fontRight(0, 0, default, 0, 0, 0); + me.fontSizeRight(0, 0, normal, 0, 0, 0); + } else if (getprop("FMGC/internal/radio-no")) { + me["Simple_R3"].setText("NO"); + me.fontRight(0, 0, default, 0, 0, 0); + me.fontSizeRight(0, 0, normal, 0, 0, 0); + } else { + me["Simple_R3"].setText(" [ ]"); + me.fontRight(0, 0, symbol, 0, 0, 0); + me.fontSizeRight(0, 0, small, 0, 0, 0); + } me["Simple_R4S"].setText("LDG CONF "); me["Simple_R4"].setText("CONF3 "); @@ -2591,7 +2665,7 @@ var canvas_MCDU_base = { me["Simple_C5"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/vls_appr"))); me["Simple_L5"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/vapp_appr"))); me.fontLeft(0, 0, 0, 0, default, 0); - if (vapp_speed_set.getValue() == 1) { + if (vapp_speed_set.getValue()) { me.fontSizeLeft(0, 0, 0, 0, normal, 0); } else { me.fontSizeLeft(0, 0, 0, 0, small, 0); @@ -2601,8 +2675,15 @@ var canvas_MCDU_base = { me["Simple_C2"].setText(" ---"); me["Simple_C3"].setText(" ---"); me["Simple_C5"].setText(" ---"); - me["Simple_L5"].setText("[ ] "); - me.fontLeft(0, 0, 0, 0, symbol, 0); + if (vapp_speed_set.getValue()) { + me["Simple_L5"].setText(sprintf("%3.0f", getprop("FMGC/internal/computed-speeds/vapp_appr"))); + me.fontLeft(0, 0, 0, 0, default, 0); + me.fontSizeLeft(0, 0, 0, 0, normal, 0); + } else { + me["Simple_L5"].setText("[ ] "); + me.fontLeft(0, 0, 0, 0, symbol, 0); + me.fontSizeLeft(0, 0, 0, 0, small, 0); + } } me["Simple_C1S"].setText("FLP RETR"); @@ -2616,6 +2697,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -2679,7 +2761,7 @@ var canvas_MCDU_base = { me["Simple_R5"].setFontSize(small); } - me["Simple_L5"].setText(sprintf("%s", clbReducFt.getValue() ~ "/" ~ reducFt.getValue())); + me["Simple_L5"].setText(sprintf("%3.0f", clbReducFt.getValue()) ~ sprintf("/%3.0f", reducFt.getValue())); me["Simple_L6"].setText(" PHASE"); me["Simple_L5S"].setText("THR RED/ACC"); me["Simple_L6S"].setText(" PREV"); @@ -2706,6 +2788,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -2717,6 +2800,8 @@ var canvas_MCDU_base = { me["ArrowLeft"].hide(); me["ArrowRight"].hide(); + me["Simple_L0S"].hide(); + me.fontLeft(default, default, default, default, default, default); me.fontLeftS(default, default, default, default, default, default); me.fontRight(default, default, default, default, default, default); @@ -2965,6 +3050,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -2976,6 +3062,8 @@ var canvas_MCDU_base = { me["ArrowLeft"].hide(); me["ArrowRight"].hide(); + me["Simple_L0S"].hide(); + me.fontLeft(default, default, default, default, default, default); me.fontLeftS(default, default, default, default, default, default); me.fontRight(default, default, default, default, default, default); @@ -3224,6 +3312,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -3247,6 +3336,8 @@ var canvas_MCDU_base = { me["Simple_R5_Arrow"].hide(); me["Simple_R6_Arrow"].hide(); + me["Simple_L0S"].hide(); + me.fontLeft(default, default, default, default, default, default); me.fontLeftS(default, default, default, default, default, default); me.fontRight(default, default, default, default, default, default); @@ -3552,6 +3643,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -3563,6 +3655,8 @@ var canvas_MCDU_base = { me["ArrowLeft"].hide(); me["ArrowRight"].hide(); + me["Simple_L0S"].hide(); + me.fontLeft(default, default, default, default, default, default); me.fontLeftS(default, default, default, default, default, default); me.fontRight(default, default, default, default, default, default); @@ -3868,6 +3962,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -3891,6 +3986,8 @@ var canvas_MCDU_base = { me["Simple_R5_Arrow"].hide(); me["Simple_R6_Arrow"].hide(); + me["Simple_L0S"].hide(); + me.fontLeft(default, default, default, default, default, default); me.fontLeftS(default, default, default, default, default, default); me.fontRight(default, default, default, default, default, default); @@ -4196,6 +4293,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -4219,6 +4317,8 @@ var canvas_MCDU_base = { me["Simple_R5_Arrow"].hide(); me["Simple_R6_Arrow"].hide(); + me["Simple_L0S"].hide(); + me.fontLeft(default, default, default, default, default, default); me.fontLeftS(default, default, default, default, default, default); me.fontRight(default, default, default, default, default, default); @@ -4525,6 +4625,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].show(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); @@ -4548,6 +4649,8 @@ var canvas_MCDU_base = { me["Simple_R5_Arrow"].hide(); me["Simple_R6_Arrow"].hide(); + me["Simple_L0S"].hide(); + me.fontLeft(default, default, default, default, default, default); me.fontLeftS(default, default, default, default, default, default); me.fontRight(default, default, default, default, default, default); @@ -4783,6 +4886,7 @@ var canvas_MCDU_base = { me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); + me["IRSINIT"].hide(); me["INITB"].hide(); me["FUELPRED"].hide(); me["PROG"].hide(); diff --git a/Models/Instruments/MCDU/res/mcdu.svg b/Models/Instruments/MCDU/res/mcdu.svg index ccc005d1..381cfcf2 100644 --- a/Models/Instruments/MCDU/res/mcdu.svg +++ b/Models/Instruments/MCDU/res/mcdu.svg @@ -33,13 +33,13 @@ units="px" inkscape:snap-global="false" showguides="false" - inkscape:current-layer="PROG" + inkscape:current-layer="IRSINIT" inkscape:window-maximized="0" inkscape:window-y="23" - inkscape:window-x="59" - inkscape:cy="508.76833" - inkscape:cx="72.164029" - inkscape:zoom="8.0885693" + inkscape:window-x="0" + inkscape:cy="938.61658" + inkscape:cx="1070.6893" + inkscape:zoom="1.7842543" showgrid="true" id="namedview371" inkscape:window-height="1035" @@ -349,7 +349,7 @@ inkscape:label="#g4241" transform="matrix(1.0000018,0,0,0.99998906,-895.98862,118.48532)"> + style="fill:#ffffff;fill-opacity:1;stroke:#cdcdcd;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#ffffff;fill-opacity:1;stroke:#cdcdcd;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#ffffff;fill-opacity:1;stroke:#cdcdcd;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#ffffff;fill-opacity:1;stroke:#cdcdcd;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#ffffff;fill-opacity:1;stroke:#cdcdcd;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#ffffff;fill-opacity:1;stroke:#cdcdcd;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#ffffff;fill-opacity:1;stroke:#cdcdcd;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#ffffff;fill-opacity:1;stroke:#cdcdcd;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#ffffff;fill-opacity:1;stroke:#cdcdcd;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#ffffff;fill-opacity:1;stroke:#cdcdcd;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#ffffff;fill-opacity:1;stroke:#cdcdcd;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#ffffff;fill-opacity:1;stroke:#cdcdcd;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> FROM + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:51.2px;line-height:1.25;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1">FROM + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> DIR TO + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> / + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = - \ No newline at end of file + diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index 96d43869..ab970570 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -71,6 +71,8 @@ var altitude = props.globals.getNode("instrumentation/altimeter/indicated-altitu var altitude_pfd = props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft-pfd", 1); var trans_alt = props.globals.getNode("FMGC/internal/trans-alt", 1); var alt_diff = props.globals.getNode("instrumentation/pfd/alt-diff", 1); +var ground_diff = props.globals.getNode("instrumentation/pfd/ground-diff", 1); +var landing_diff = props.globals.getNode("instrumentation/pfd/landing-diff", 1); var ap_alt = props.globals.getNode("it-autoflight/internal/alt", 1); var alt_agl = props.globals.getNode("position/altitude-agl-ft", 1); var vs_needle = props.globals.getNode("instrumentation/pfd/vs-needle", 1); @@ -124,7 +126,6 @@ var dme_in_range = props.globals.getNode("instrumentation/nav[0]/dme-in-range", var dme_data = props.globals.getNode("instrumentation/dme[0]/indicated-distance-nm", 1); var ils_crs = props.globals.getNode("instrumentation/nav[0]/radials/selected-deg", 1); var ils1_crs_set = props.globals.getNode("FMGC/internal/ils1crs-set/", 1); -var arrival_airport = props.globals.getNode("FMGC/internal/arr-arpt", 1); var outer_marker = props.globals.getNode("instrumentation/marker-beacon/outer", 1); var middle_marker = props.globals.getNode("instrumentation/marker-beacon/middle", 1); var inner_marker = props.globals.getNode("instrumentation/marker-beacon/inner", 1); @@ -135,11 +136,15 @@ var vr_set = props.globals.getNode("FMGC/internal/vr-set", 1); var v2 = props.globals.getNode("FMGC/internal/v2", 1); var v2_set = props.globals.getNode("FMGC/internal/v2-set", 1); var flap_config = props.globals.getNode("controls/flight/flap-lever", 1); +var hundredAbove = props.globals.getNode("/instrumentation/pfd/hundred-above", 1); +var minimum = props.globals.getNode("/instrumentation/pfd/minimums", 1); # Create Nodes: var vs_needle = props.globals.initNode("/instrumentation/pfd/vs-needle", 0.0, "DOUBLE"); var vs_needle_trans = props.globals.initNode("/instrumentation/pfd/vs-digit-trans", 0.0, "DOUBLE"); var alt_diff = props.globals.initNode("/instrumentation/pfd/alt-diff", 0.0, "DOUBLE"); +var ground_diff = props.globals.initNode("/instrumentation/pfd/ground-diff", 0.0, "DOUBLE"); +var landing_diff = props.globals.initNode("/instrumentation/pfd/landing-diff", 0.0, "DOUBLE"); var heading = props.globals.initNode("/instrumentation/pfd/heading-deg", 0.0, "DOUBLE"); var horizon_pitch = props.globals.initNode("/instrumentation/pfd/horizon-pitch", 0.0, "DOUBLE"); var horizon_ground = props.globals.initNode("/instrumentation/pfd/horizon-ground", 0.0, "DOUBLE"); @@ -168,6 +173,7 @@ var altFlash1 = props.globals.initNode("/instrumentation/pfd/flash-indicators/al var altFlash2 = props.globals.initNode("/instrumentation/pfd/flash-indicators/alt-flash-2", 0, "BOOL"); var amberFlash1 = props.globals.initNode("/instrumentation/pfd/flash-indicators/amber-flash-1", 0, "BOOL"); var amberFlash2 = props.globals.initNode("/instrumentation/pfd/flash-indicators/amber-flash-2", 0, "BOOL"); +var dhFlash = props.globals.initNode("/instrumentation/pfd/flash-indicators/dh-flash", 0, "BOOL"); var canvas_PFD_base = { init: func(canvas_group, file) { @@ -219,7 +225,8 @@ var canvas_PFD_base = { "AI_bank_lim","AI_bank_lim_X","AI_pitch_lim","AI_pitch_lim_X","AI_slipskid","AI_horizon","AI_horizon_ground","AI_horizon_sky","AI_stick","AI_stick_pos","AI_heading","AI_agl_g","AI_agl","AI_error","AI_group","FD_roll","FD_pitch","ALT_box_flash","ALT_box","ALT_box_amber", "ALT_scale","ALT_target","ALT_target_digit","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_digit_UP","ALT_digit_DN","ALT_error","ALT_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting", "QNH_std","QNH_box","LOC_pointer","LOC_scale","GS_scale","GS_pointer","CRS_pointer","HDG_target","HDG_scale","HDG_one","HDG_two","HDG_three","HDG_four","HDG_five","HDG_six","HDG_seven","HDG_digit_L","HDG_digit_R","HDG_error","HDG_group","HDG_frame", - "TRK_pointer","machError","ilsError","ils_code","ils_freq","dme_dist","dme_dist_legend","ILS_HDG_R","ILS_HDG_L","ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","flap_max","clean_speed"]; + "TRK_pointer","machError","ilsError","ils_code","ils_freq","dme_dist","dme_dist_legend","ILS_HDG_R","ILS_HDG_L","ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","flap_max","clean_speed", + "ground","ground_ref"]; }, updateDu1: func() { var elapsedtime_act = elapsedtime.getValue(); @@ -602,8 +609,6 @@ var canvas_PFD_base = { me["FMA_catmode_box"].hide(); me["FMA_cattype_box"].hide(); me["FMA_cat_box"].hide(); - me["FMA_nodh"].hide(); - me["FMA_dh_box"].hide(); # FMA AP FD ATHR me["FMA_ap"].setText(sprintf("%s", ap_mode.getValue())); @@ -757,16 +762,105 @@ var canvas_PFD_base = { me["AI_agl"].setText(sprintf("%s", math.round(math.clamp(gear_agl_cur, 0, 2500)))); - if (gear_agl_cur <= decision.getValue()) { - me["AI_agl"].setColor(0.7333,0.3803,0); + if (FMGCphase.getValue() < 3) { + me["FMA_dh_box"].hide(); + me["FMA_dh"].hide(); + me["FMA_dhn"].hide(); + me["FMA_nodh"].hide(); + #me["dhReached"].hide(); + if (gear_agl_cur <= 2500) { + me["AI_agl"].show(); + if (gear_agl_cur <= decision.getValue()) { + me["AI_agl"].setColor(0.7333,0.3803,0); + } else { + me["AI_agl"].setColor(0.0509,0.7529,0.2941); + } + } else { + me["AI_agl"].hide(); + } } else { - me["AI_agl"].setColor(0.0509,0.7529,0.2941); - } - - if (gear_agl_cur <= 2500) { - me["AI_agl"].show(); - } else { - me["AI_agl"].hide(); + if (gear_agl_cur <= 2500) { + me["AI_agl"].show(); + me["FMA_dh_box"].hide(); #not implemented + if (int(getprop("FMGC/internal/radio")) != 99999) { + me["FMA_dh"].setText("RADIO"); + me["FMA_dh"].show(); + me["FMA_dhn"].setText(sprintf("%.0f", getprop("FMGC/internal/radio"))); + me["FMA_dhn"].show(); + me["FMA_nodh"].hide(); + hundredAbove.setValue(getprop("FMGC/internal/radio") + 100); + minimum.setValue(getprop("FMGC/internal/radio")); + if (gear_agl_cur <= getprop("FMGC/internal/radio") + 100) { + me["AI_agl"].setColor(0.7333,0.3803,0); + } else { + me["AI_agl"].setColor(0.0509,0.7529,0.2941); + } + } else if (int(getprop("FMGC/internal/baro")) != 99999) { + me["FMA_dh"].setText("BARO"); + me["FMA_dh"].show(); + me["FMA_dhn"].setText(sprintf("%.0f", getprop("FMGC/internal/baro"))); + me["FMA_dhn"].show(); + me["FMA_nodh"].hide(); + hundredAbove.setValue(getprop("FMGC/internal/baro") + 100); + minimum.setValue(getprop("FMGC/internal/baro")); + if (gear_agl_cur <= getprop("FMGC/internal/baro") + 100) { + me["AI_agl"].setColor(0.7333,0.3803,0); + } else { + me["AI_agl"].setColor(0.0509,0.7529,0.2941); + } + } else if (getprop("FMGC/internal/radio-no")) { + me["FMA_dh"].setText("BARO"); + me["FMA_dh"].show(); + me["FMA_dhn"].setText("100"); + me["FMA_dhn"].show(); + me["FMA_nodh"].hide(); + hundredAbove.setValue(100); + minimum.setValue(0); + if (gear_agl_cur <= 100) { + me["AI_agl"].setColor(0.7333,0.3803,0); + } else { + me["AI_agl"].setColor(0.0509,0.7529,0.2941); + } + } else { + me["FMA_dh"].hide(); + me["FMA_dhn"].hide(); + me["FMA_nodh"].show(); + hundredAbove.setValue(400); + minimum.setValue(300); + if (gear_agl_cur <= 400) { + me["AI_agl"].setColor(0.7333,0.3803,0); + } else { + me["AI_agl"].setColor(0.0509,0.7529,0.2941); + } + } + } else { + me["AI_agl"].hide(); + me["FMA_nodh"].hide(); + me["FMA_dh_box"].hide(); #not implemented + if (int(getprop("FMGC/internal/radio")) != 99999) { + me["FMA_dh"].setText("RADIO"); + me["FMA_dh"].show(); + me["FMA_dhn"].setText(sprintf("%.0f", getprop("FMGC/internal/radio"))); + me["FMA_dhn"].show(); + me["FMA_nodh"].hide(); + } else if (int(getprop("FMGC/internal/baro")) != 99999) { + me["FMA_dh"].setText("BARO"); + me["FMA_dh"].show(); + me["FMA_dhn"].setText(sprintf("%.0f", getprop("FMGC/internal/baro"))); + me["FMA_dhn"].show(); + me["FMA_nodh"].hide(); + } else if (getprop("FMGC/internal/radio-no")) { + me["FMA_dh"].setText("BARO"); + me["FMA_dh"].show(); + me["FMA_dhn"].setText("100"); + me["FMA_dhn"].show(); + me["FMA_nodh"].hide(); + } else { + me["FMA_dh"].hide(); + me["FMA_dhn"].hide(); + me["FMA_nodh"].show(); + } + } } me["AI_agl_g"].setRotation(-roll_cur * D2R); @@ -871,7 +965,7 @@ var canvas_PFD_base = { me["TRK_pointer"].setTranslation((track_diff.getValue() / 10) * 98.5416, 0); split_ils = split("/", ils_data1.getValue()); - if (ap_ils_mode.getValue() == 1 and ils1_crs_set.getValue() == 1 and size(split_ils) == 2) { + if (ap_ils_mode.getValue() == 1 and size(split_ils) == 2) { magnetic_hdg = ils_crs.getValue(); magnetic_hdg_dif = geo.normdeg180(magnetic_hdg - heading.getValue()); if (magnetic_hdg_dif >= -23.62 and magnetic_hdg_dif <= 23.62) { @@ -906,25 +1000,6 @@ var canvas_PFD_base = { me["ILS_HDG_L"].hide(); me["CRS_pointer"].hide(); } - - #Approach selected and tuned, overwrite RAD NAV -# } else if (0) { -# var runways = airportinfo(airportinfo(arrival_airport.getValue()).id).runways; -# var runway_keys = sort(keys(runways), string.icmp); -# foreach(var rwy; runway_keys) { -# var r = runways[rwy]; -# if (r.ils_frequency_mhz == split_ils[1]) { -# magnetic_hdg = r.heading - getprop("environment/magnetic-variation-deg"); -# magnetic_hdg_dif = geo.normdeg180(magnetic_hdg - heading.getValue()); -# -# SET THE FMGC values here!!!!! -# course = r.heading; -# ils_frequency = r.ils_frequency_mhz; -# -# break; -# } -# } - } else { me["ILS_HDG_R"].hide(); me["ILS_HDG_L"].hide(); @@ -1131,7 +1206,7 @@ var canvas_PFD_1 = { me["ASI_scale"].setTranslation(0, me.ASI * 6.6); me["ASI_max"].setTranslation(0, me.ASImax * -6.6); - if (!getprop("FMGC/status/to-state") and FMGCphase.getValue() >= 1 and FMGCphase.getValue() <= 6) { + if (!getprop("FMGC/status/to-state") and FMGCphase.getValue() >= 1 and !wow1.getValue() and !wow2.getValue()) { me.FMGC_vls = getprop("FMGC/internal/computed-speeds/vls_min"); if (me.FMGC_vls <= 30) { me.VLSmin = 0 - me.ASI; @@ -1496,6 +1571,13 @@ var canvas_PFD_1 = { me["v1_group"].hide(); me["v1_text"].hide(); me["vr_speed"].hide(); + me["ground"].hide(); + me["ground_ref"].hide(); + me["VLS_min"].hide(); + me["VLS_min"].hide(); + me["ALPHA_PROT"].hide(); + me["ALPHA_MAX"].hide(); + me["ALPHA_SW"].hide(); } if (dmc.DMController.DMCs[0].outputs[2] != nil) { @@ -1590,6 +1672,26 @@ var canvas_PFD_1 = { me["ALT_target"].hide(); } + ground_diff_cur = ground_diff.getValue(); + if (ground_diff_cur >= -565 and ground_diff_cur <= 565) { + me["ground_ref"].setTranslation(0, (ground_diff_cur / 100) * -48.66856); + me["ground_ref"].show(); + } else { + me["ground_ref"].hide(); + } + + landing_diff_cur = landing_diff.getValue(); + if (landing_diff_cur >= -565 and landing_diff_cur <= 565) { + if ((FMGCphase.getValue() == 5 or FMGCphase.getValue() == 6) and !wow1.getValue() and !wow2.getValue()) { #add std too + me["ground"].setTranslation(0, (landing_diff_cur / 100) * -48.66856); + me["ground"].show(); + } else { + me["ground"].hide(); + } + } else { + me["ground"].hide(); + } + if (!getprop("ECAM/alt-alert-flash") and !getprop("ECAM/alt-alert-steady")) { alt_going1 = 0; amber_going1 = 0; @@ -1842,7 +1944,7 @@ var canvas_PFD_2 = { me["ASI_scale"].setTranslation(0, me.ASI * 6.6); me["ASI_max"].setTranslation(0, me.ASImax * -6.6); - if (!getprop("FMGC/status/to-state") and FMGCphase.getValue() >= 1 and FMGCphase.getValue() <= 6) { + if (!getprop("FMGC/status/to-state") and FMGCphase.getValue() >= 1 and !wow1.getValue() and !wow2.getValue()) { me.FMGC_vls = getprop("FMGC/internal/computed-speeds/vls_min"); if (me.FMGC_vls <= 30) { me.VLSmin = 0 - me.ASI; @@ -2208,6 +2310,13 @@ var canvas_PFD_2 = { me["v1_group"].hide(); me["v1_text"].hide(); me["vr_speed"].hide(); + me["ground"].hide(); + me["ground_ref"].hide(); + me["VLS_min"].hide(); + me["VLS_min"].hide(); + me["ALPHA_PROT"].hide(); + me["ALPHA_MAX"].hide(); + me["ALPHA_SW"].hide(); } if (dmc.DMController.DMCs[1].outputs[2] != nil) { @@ -2301,6 +2410,26 @@ var canvas_PFD_2 = { me["ALT_target"].hide(); } + ground_diff_cur = ground_diff.getValue(); + if (ground_diff_cur >= -565 and ground_diff_cur <= 565) { + me["ground_ref"].setTranslation(0, (ground_diff_cur / 100) * -48.66856); + me["ground_ref"].show(); + } else { + me["ground_ref"].hide(); + } + + landing_diff_cur = landing_diff.getValue(); + if (landing_diff_cur >= -565 and landing_diff_cur <= 565) { + if ((FMGCphase.getValue() == 5 or FMGCphase.getValue() == 6) and !wow1.getValue() and !wow2.getValue()) { #add std too + me["ground"].setTranslation(0, (landing_diff_cur / 100) * -48.66856); + me["ground"].show(); + } else { + me["ground"].hide(); + } + } else { + me["ground"].hide(); + } + if (!getprop("ECAM/alt-alert-flash") and !getprop("ECAM/alt-alert-steady")) { alt_going2 = 0; amber_going2 = 0; @@ -2655,3 +2784,18 @@ var amberTimer2 = maketimer(0.50, func { } }); +var dh_going = 0; +var dh_count = 0; +var dhTimer = maketimer(0.50, func { + if (!dhFlash.getBoolValue()) { + dhFlash.setBoolValue(1); + } else { + dhFlash.setBoolValue(0); + } + if (dh_count == 18) { + dh_count = 0; + } else { + dh_count = dh_count + 1; + } +}); + diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg index b4ff27a5..4d1ad3bd 100644 --- a/Models/Instruments/PFD/res/pfd.svg +++ b/Models/Instruments/PFD/res/pfd.svg @@ -7,13 +7,13 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - sodipodi:docname="pfd.svg" - inkscape:version="1.0beta2 (2b71d25, 2019-12-03)" - id="svg2" - version="1.1" - viewBox="0 0 1024 1024" + width="1024pt" height="1024pt" - width="1024pt"> + viewBox="0 0 1024 1024" + version="1.1" + id="svg2" + inkscape:version="1.0beta2 (2b71d25, 2019-12-03)" + sodipodi:docname="pfd.svg"> @@ -29,50 +29,42 @@ + borderopacity="1" + objecttolerance="20" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="1" + inkscape:pageshadow="2" + inkscape:window-width="1778" + inkscape:window-height="902" + id="namedview371" + showgrid="true" + inkscape:zoom="2.5135139" + inkscape:cx="972.67291" + inkscape:cy="106.93313" + inkscape:window-x="126" + inkscape:window-y="32" + inkscape:window-maximized="0" + inkscape:current-layer="svg2" + showguides="true" + inkscape:snap-global="false" + units="pt" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:document-rotation="0"> + originx="0" + originy="0" /> - + + id="AI_group" + inkscape:label="#g4891"> + id="AI_horizon"> - - + id="AI_background" + inkscape:label="#g5492"> + + + width="1287.3096" + height="1102.3193" + x="-195.39726" + y="-493.56796" + inkscape:label="#rect5809" /> + id="AI_scale" + inkscape:label="#g5341"> + inkscape:label="#g4851" + id="AI_sky_scale"> + d="m 433.99987,580.702 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="path4686" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="M 393.624,492.0016 H 502.88512" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + d="m 420.6008,432.86803 h 55.30952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="path5073" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,403.3012 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> - + + id="path5117" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,344.1676 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="path5121" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="M 393.624,255.4672 H 502.88512" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + d="m 420.6008,196.33363 h 55.30952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="path5135" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,166.7668 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> - + + id="path5149" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,107.6332 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="path5153" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="M 393.624,18.932797 H 502.88512" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + d="m 420.6008,-40.200773 h 55.30952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="path5167" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,-69.767603 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> - + + id="path5181" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,-128.9012 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="path5185" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="M 393.624,-217.6016 H 502.88512" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + d="m 420.6008,-276.73517 h 55.30952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="path5199" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,-306.302 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> - + + id="path5213" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,-365.4356 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="path5217" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="M 393.624,-454.136 H 502.88512" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + d="m 420.6008,551.13523 h 55.30952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + inkscape:label="#g4813" + id="AI_ground_scale"> - + + id="path4507" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,698.9688 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> - + + id="path4521" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 420.6008,787.6696 h 55.30952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + d="m 433.99987,817.2364 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + d="M 393.624,846.8032 H 502.88512" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> - + + id="path4531" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,935.5036 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> - + - + + id="path4567" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,1053.7708 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="path4571" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,1112.9044 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + d="m 420.6008,1142.4712 h 55.30952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="path4577" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="M 393.624,1201.6048 H 502.88512" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> - + + id="path4599" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,1290.3052 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="path4603" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,1349.4388 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + d="m 420.6008,1379.0056 h 55.30952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="path4609" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="M 393.624,1438.1392 H 502.88512" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> - + + id="path4631" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,1526.8396 h 28.50952" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> - - + + + inkscape:label="#g4737" + id="AI_scale_num"> - 10 + id="AI_sky_num" + inkscape:label="#g4699"> 10 - 20 10 + 20 - 30 20 + 30 - 40 30 + 40 - 50 40 + 50 - 60 50 + 60 - 70 60 + 70 - 80 70 + 80 - 90 80 + 90 + 90 - 10 + id="AI_ground_num" + inkscape:label="#g4661"> 10 - 20 10 + 20 - 30 20 + 30 - 40 30 + 40 - 50 40 + 50 - 60 50 + 60 - 70 60 + 70 - 80 70 + 80 - 90 80 + 90 + 90 + transform="translate(0,97.082371)"> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 370.53103,162.42242 h 21.66136" + style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + transform="translate(133.78495)" + id="g4951"> + d="m 370.5312,154.3476 h 21.6616" + style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + transform="matrix(0.9999956,0,0,0.9999865,26.97857,532.2047)" + id="g4964"> - - - - + + + + - X + transform="translate(0,97.08285)"> X X + id="text4958" + y="164.03458" + x="530.78998" + style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + xml:space="preserve">X X + X + id="AI_horizon_ground"> + + + + + + + + + + + + + - - - - - - - - - - - - - + style="fill:#000000" + d="M 452.95372,819.65041 H 186.59805 V 515.86639 212.08237 h 266.35567 266.35567 v 303.78402 303.78402 z m -4.70012,-29.15978 22.4688,-0.86543 22.7656,-2.8912 c 9.03456,-1.14738 22.22459,-4.4067 31.0728,-6.6408 8.84823,-2.23412 21.63139,-7.28853 28.8248,-9.9304 7.19343,-2.64188 17.79374,-8.25496 25.9288,-12.3008 8.13505,-4.04583 20.89048,-11.8465 29.1968,-18.024 l 17.7128,-13.1728 14.076,-13.236 12.9,-13.496 10.2808,-11.2776 10.1272,-13.148 8.5,-11.9752 8.23219,-13.516 V 512.66063 376.15373 l -8.23219,-13.516 c -2.4515,-4.02499 -5.60322,-7.65441 -8.5,-11.9752 -2.68932,-4.01133 -7.74317,-10.50003 -10.1272,-13.148 l -10.2808,-11.2776 -12.9,-13.496 -14.076,-13.236 -17.7128,-13.1728 c -8.4714,-6.30008 -21.06175,-13.97818 -29.1968,-18.024 -8.13506,-4.04584 -18.73537,-9.65931 -25.9288,-12.3012 -7.19341,-2.64188 -28.8248,-9.9312 -28.8248,-9.9312 0,0 -28.6997,-6.20989 -31.0728,-6.6408 l -22.7656,-2.8912 c 0,0 -13.87507,-0.84398 -22.4688,-0.8644 -9.15881,-0.0218 -22.4688,0.8644 -22.4688,0.8644 l -22.7656,2.8912 c -9.03456,1.14737 -22.22457,4.4067 -31.0728,6.6408 -8.84823,2.2341 -21.63138,7.28932 -28.8248,9.9312 -7.19343,2.64189 -17.79373,8.25536 -25.9288,12.3012 -8.13504,4.04582 -21.07541,12.04906 -29.1968,18.024 l -17.7128,13.1728 -14.076,13.236 -12.9,13.496 -10.2808,11.2776 -10.1272,13.148 -8.5,11.9752 -8.48835,13.516 v 136.5069 l 3.5e-4,137.35577 8.488,13.516 8.5,11.9752 10.1272,13.148 10.2808,11.2776 12.9,13.496 14.076,13.236 17.7128,13.1728 c 8.09045,6.01677 21.06176,13.97818 29.1968,18.024 8.13507,4.04585 18.73537,9.65892 25.9288,12.3008 7.19342,2.64188 19.83464,7.66085 28.8248,9.9308 8.99013,2.26993 23.06292,5.6237 31.0728,6.6408 l 22.7656,2.8912 22.4688,0.8652 z" + id="AI_horizon_mask" + inkscape:connector-curvature="0" /> + inkscape:connector-curvature="0" + id="AI_bankindex" + d="m 433.21105,207.78584 30.0845,1e-5 -15.04195,25.28563 z" + style="fill:none;fill-opacity:1;stroke:#c9cc15;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> - + width="12.257594" + height="12.775722" + x="442.1286" + y="506.77753" /> + + id="FD_pitch" + width="7.5999999" + height="263.53848" + x="509.36719" + y="-580.02087" + inkscape:label="#rect4743" /> + id="AI_stick_pos"> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 452.49998,480.26394 v 29.04648" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="g4806" + transform="matrix(-1,0,0,1,897.27706,0)"> + d="m 452.50015,509.31081 h 29.04648" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + id="g4812" + transform="matrix(1,0,0,-1,0,1026.344)"> - - - - + + + + + x="440.25876" + height="16.491779" + width="15.997281" + id="AI_center" + style="fill:none;fill-opacity:1;stroke:#c9d121;stroke-width:3.77995;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + transform="matrix(1.0666667,0,0,1.066636,4.919636,-0.50381959)" + id="g4844"> + + + + + - - - - - + - + d="m 302.91873,276.44572 c 89.26696,-54.70986 201.68233,-54.70986 290.94929,0" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="AI_bank"> + d="m 433.21105,267.08957 30.0845,-10e-6 -15.04225,-25.28563 z" + style="fill:none;fill-opacity:1;stroke:#c9cc15;stroke-width:3.99994;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" + inkscape:label="#path905" + inkscape:transform-center-y="-258.88333" /> + id="AI_slipskid" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" + inkscape:label="#path912" + inkscape:transform-center-y="-228.40743" /> + - + id="path4367" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + - + transform="matrix(-1,0,0,1,896.78566,0)" + id="g4374"> + - + d="m 288.584,252.95092 13.8416,-7.96852" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="AI_bank_lim"> - + id="g4545" + transform="translate(0,19.596045)"> - - - + + + + + id="AI_bank_lim_X" + inkscape:label="#g4886"> X - X + X - + transform="matrix(-1,0,0,1,896.72324,0)" + id="g3954"> + + transform="rotate(10.25,446.41327,507.51354)" + id="g3968"> + - + d="m 354.9152,234.0368 -14.5632,5.4816" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="g3978" + transform="matrix(-0.98404072,0.17794355,0.17794355,0.98404072,799.64735,-71.336811)"> + id="path3982" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 354.9152,234.0368 4.87069,14.48383" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="path3986" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + inkscape:transform-center-y="245.55742" + id="AI_agl_g"> 0000 + x="511.25748" + id="tspan4624" + sodipodi:role="line">0000 + id="AI_stick"> + id="g4630" + transform="translate(0.97071068)"> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> - - - - - - - - + transform="matrix(-1,0,0,1,894.37964,0)" + id="g4634"> + + + + + + + + + width="21.356052" + height="552.00073" + x="124.90075" + y="237.03366" + inkscape:label="#rect9211" /> + id="ALT_target_clip" + style="opacity:0.46000001;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:1.27696717;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - - - - - - - - - - - - + id="HDG_frame" + inkscape:label="#g4848"> + + + + + + + + + + + + - 1 + transform="matrix(1.0666667,0,0,1.066636,0.28284271,-0.50381959)" + id="g5112"> 2 + id="tspan5094" + sodipodi:role="line">1 2 + 6 - - - - - - - - - - - 6 - 2 - 1 + transform="matrix(1.0666667,0,0,-1.066636,0.28284271,1026.1924)" + id="g5092"> + id="rect5080" + style="fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:3.43549;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + id="rect5084" + style="fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:4.6819;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + id="rect5088" + style="fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:3.43549;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - - - + transform="translate(0.28284271)" + id="g4317"> 6 + 2 + 1 + + + + + + + + + + + + + + 00 + x="1147.7107" + id="tspan5136-1" + sodipodi:role="line">00 - + + + height="243.41606" + width="85.76416" + id="rect4311" + style="fill:#4c4c4c;fill-opacity:1;stroke:none;stroke-width:2.4000001;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + transform="translate(-723.20023)"> + d="m 1579.3052,999.43982 h -11.3041" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> 000 + x="1604.5295" + y="965.32141" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.75">000 - + + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> 000 + x="1604.5295" + id="tspan4941" + sodipodi:role="line">000 + d="m 1479.2996,520.72043 9.3792,-7.9746 -9.3788,-7.9742" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 1579.3052,902.1027 h -11.3041" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 1579.3052,804.76558 h -11.3041" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 1579.3052,707.42846 h -11.3041" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 1579.3052,610.09134 h -11.3041" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> - 000 - - - - - - - - - - - 000 - + d="m 1579.3052,26.06931 h -11.3041" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> 000 + + + + + + + + + + 000 + + 000 + + width="102.47213" + height="84.381813" + x="59.092628" + y="6.0090518" + inkscape:label="#rect4290" /> + TOGA TOGA - MAN - - MAN PITCH TRIM ONLY + x="125.84993" + id="tspan4303" + sodipodi:role="line">MAN ALT + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ff0000;fill-opacity:1;stroke-width:0.657577" + y="115.0584" + x="505.48523" + id="tspan4614" + sodipodi:role="line">MAN PITCH TRIM ONLY + G/S + id="tspan4244" + x="370.20218" + y="34.986706" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577">ALT CLB - LOC + x="422.80801" + id="tspan4248" + sodipodi:role="line">G/S NAV + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.657577">CLB + LOC + NAV - - + + + transform="translate(0,4.4)"> + width="7.7972813" + height="41.291069" + x="444.25851" + y="816.11987" /> + d="m 355.793,836.92648 c 0,3.51647 -2.85073,6.36714 -6.3673,6.36714 -3.51658,0 -6.36732,-2.85066 -6.36732,-6.36714 0,-3.51647 2.85075,-6.36712 6.36732,-6.36712 3.51656,0 6.3673,2.85066 6.3673,6.36712 z" + style="fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.39997;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + id="circle4876" + d="m 257.81742,836.9262 c 0,3.51647 -2.85073,6.36714 -6.36731,6.36714 -3.51658,0 -6.36732,-2.85066 -6.36732,-6.36714 0,-3.51647 2.85075,-6.36712 6.36732,-6.36712 3.51656,0 6.36731,2.85066 6.36731,6.36712 z" + style="fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.39997;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + transform="translate(1.8616028)" + id="g4527"> + d="m 649.3818,836.9262 c 0,3.51647 -2.85073,6.36714 -6.36731,6.36714 -3.51657,0 -6.36731,-2.85066 -6.36731,-6.36714 0,-3.51647 2.85075,-6.36712 6.36731,-6.36712 3.51657,0 6.36731,2.85066 6.36731,6.36712 z" + style="fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.39997;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + id="circle4880" + d="m 551.40661,836.9262 c 0,3.51647 -2.85074,6.36714 -6.36731,6.36714 -3.51658,0 -6.36732,-2.85066 -6.36732,-6.36714 0,-3.51647 2.85075,-6.36712 6.36732,-6.36712 3.51656,0 6.36731,2.85066 6.36731,6.36712 z" + style="fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.39997;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + width="33.21196" + height="33.21196" + x="-517.64343" + y="1019.8428" + transform="matrix(0.83705476,-0.54711912,0.83705476,0.54711912,0,0)" + inkscape:label="#rect4872" /> + + + id="ALT_group2" + inkscape:label="#g4828"> + x="509.50464" + height="49.153526" + width="7.7970567" + id="rect4925" + style="fill:#c9d121;fill-opacity:1;stroke:none;stroke-width:4.48063;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> STD - - - - - - 000 - - FL 000 - FL 000 - - QNH - STD + + + + + + 000 + + FL 000 + FL 000 + + QNH + 1013 + x="907.61713" + y="885.26117" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.3994px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.75">1013 + transform="translate(5.2325902)"> + width="7.7970567" + height="49.153526" + x="509.50464" + y="-741.82098" + transform="rotate(90)" /> + transform="translate(0,-1.0792028)" + id="g4531"> + d="m 714.66382,422.10642 c -3.51657,0 -6.36731,-2.85066 -6.36731,-6.36712 0,-3.51646 2.85073,-6.36713 6.36731,-6.36713 3.51658,0 6.36732,2.85066 6.36732,6.36713 0,3.51648 -2.85075,6.36712 -6.36732,6.36712 z" + style="fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.39997;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + id="circle4929" + d="m 714.66382,324.13136 c -3.51657,0 -6.36731,-2.85066 -6.36731,-6.36712 0,-3.51646 2.85073,-6.36713 6.36731,-6.36713 3.51658,0 6.36732,2.85066 6.36732,6.36713 0,3.51648 -2.85075,6.36712 -6.36732,6.36712 z" + style="fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.39997;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + d="m 714.66382,716.47762 c -3.51657,0 -6.36731,-2.85066 -6.36731,-6.36712 0,-3.51647 2.85073,-6.36714 6.36731,-6.36714 3.51658,0 6.36732,2.85066 6.36732,6.36714 0,3.51647 -2.85075,6.36712 -6.36732,6.36712 z" + style="fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.39997;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + id="circle4933" + d="m 714.66382,618.50242 c -3.51657,0 -6.36731,-2.85066 -6.36731,-6.36712 0,-3.51647 2.85073,-6.36714 6.36731,-6.36714 3.51658,0 6.36732,2.85066 6.36732,6.36714 0,3.51647 -2.85075,6.36712 -6.36732,6.36712 z" + style="fill:none;fill-opacity:1;stroke:#cecdce;stroke-width:2.39997;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + y="-368.9328" + x="949.0885" + height="33.211578" + width="33.211578" + id="GS_pointer" + style="fill:none;fill-opacity:1;stroke:#b055be;stroke-width:4.03498697;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + width="89.289597" + height="59.519768" + x="768.71039" + y="483.25833" + inkscape:label="#rect4671" /> + width="48.851151" + height="90.122147" + x="858.00543" + y="467.59009" + inkscape:label="#rect9211" /> + id="ALT_frame" + inkscape:label="#g5167"> + d="M 856.91323,547.2032 V 787.42916" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> - + + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + id="ALT_group" + inkscape:label="#g5379"> + id="ALT_box" + inkscape:label="#g5173"> + id="path1283" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccc" /> + - + d="m 770.31078,544.06163 86.08971,-6e-4" + style="fill:none;fill-opacity:1;stroke:#ffff00;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> 40200080604020008060 - 40200080604020008060 + 00 + x="890.99316" + id="tspan973" + sodipodi:role="line">00 - - + + AP 1+2 - 1 FD 2 - A/THR - CAT 3 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.657577">AP 1+2 1 FD 2 + A/THR + DUAL + id="tspan4280" + sodipodi:role="line">CAT 3 NO DH - - - - - - + y="74.709656" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.657577">DUAL SPEED + inkscape:label="#text983">NO RADIO + + + + FLARE + x="123.23077" + id="tspan981" + sodipodi:role="line">SPEED - DH + inkscape:label="#rect4290" + y="7.3451986" + x="677.62024" + height="82.123947" + width="178.44023" + id="FMA_cat_box" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2.4000001;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> 250 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + id="tspan4354" + x="505.48523" + y="34.635437" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577">FLARE - - + inkscape:label="#rect4290" + y="7.4160867" + x="296.9281" + height="36.76775" + width="293.76205" + id="FMA_combined_box" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2.39996576;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> +40 + id="tspan4301" + x="831.23047" + y="115.05846" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.657577">RADIO + LVR CLB + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.657577" + y="115.05846" + x="934.0097" + id="tspan4305" + sodipodi:role="line">0250 - - - 00 - - 00 - - - - - 00 - 00 - 00 - - - - - - 00 - - - 00 - - - + id="ALPHA_SW" + inkscape:label="#g4996" + transform="translate(427.35786,2333.3875)" + style="display:inline"> - - - - - + y="290.33853" + x="-300.81439" + height="22.800125" + width="18.482525" + id="rect750" + style="fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:#ff0000;stroke-width:1.19987;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> - 000 - 000 + style="fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#ff0000;stroke-width:1.19994;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" + id="rect752" + width="18.482372" + height="18.800058" + x="-300.81363" + y="270.33838" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +40 + LVR CLB + id="HDG_group" + inkscape:label="#g4853"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 140 - 160 - 120 - 100 - 080 - 060 - 040 - 180 - 200 - 220 - 240 - 260 - 280 - 300 - 320 - 340 - 360 - 380 - 400 - 420 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + transform="translate(-104.78479,0)" + inkscape:label="#g4743" + id="HDG_scale"> + 00 + + 00 + + + + + 00 + 00 + 00 + + + + + + 00 + + + 00 + + + + transform="matrix(1.0666667,0,0,1.066636,7.9500002,2.8086774)" + inkscape:label="#g5019" + id="CRS_pointer"> + + + + + 000 + 000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 140 + 160 + 120 + 100 + 080 + 060 + 040 + 180 + 200 + 220 + 240 + 260 + 280 + 300 + 320 + 340 + 360 + 380 + 400 + 420 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + id="ASI_line" + d="M 123.76482,-2061.3896 V 512.7976" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + + + + + + + + + + + id="ASI_trend_down" + transform="matrix(1,0,0,-1,0,1025.6524)"> - - - - - - + + 000 000 - . - 000 + id="tspan4668" + sodipodi:role="line">. 000 - . 000 + . - - SPD - + id="tspan4696" + x="80.506668" + y="220.32645" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#179ab7;fill-opacity:1;stroke-width:0.75">. + id="ASI_error" + inkscape:label="#g4779"> + SPD + id="ASI_line_red" + d="M 124.45518,236.9723 V 789.04627" + style="fill:none;fill-opacity:1;stroke:#ff0000;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + + + - ATT - ALT ATT + V/S + y="505.93329" + x="851.70166" + id="tspan4386-4-0" + sodipodi:role="line">ALT HDG + id="tspan4386-4-0-2" + x="1029.0986" + y="445.50174" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ff0000;fill-opacity:1;stroke-width:0.75">V/S HDG + MACH + x="34.684372" + y="874.4469" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#ff0000;fill-opacity:1;stroke-width:0.75">MACH + ILS + ILS + 000.00 + 0.0 + NM + + + 000 + + + + 000 + ILS - ILS - 000.00 - 0.0 - NM - - - 000 - - - - 000 - - MM - OM + x="656.89722" + id="tspan773-3" + sodipodi:role="line">MM IM - - - - - + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#179ab7;fill-opacity:1;stroke-width:0.75" + y="798.60431" + x="659.10315" + id="tspan773-9" + sodipodi:role="line">OM 000 + id="tspan773-9-9" + x="680.1095" + y="798.52075" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#ffffff;fill-opacity:1;stroke-width:0.75">IM + id="ALT_box_flash" + inkscape:label="#g5173"> + + - 1 + id="path958" + d="m 770.31078,544.06163 86.08971,-6e-4" + style="fill:none;fill-opacity:1;stroke:#ffff00;stroke-width:6;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> - + 000 + id="v1_group" + transform="translate(0,132.03033)"> S + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#179ab7;fill-opacity:1;stroke-width:0.75" + y="378.22144" + x="155.31981" + id="tspan4690-5-6" + sodipodi:role="line">1 + + transform="translate(-110.76039,-61.624594)" + id="S_target"> S + + + + F + x="337.87274" + id="tspan4690-5-6-6-8" + sodipodi:role="line">F - + + id="clean_speed" + d="m 124.55535,519.10569 c -3.51657,0 -6.36731,-2.85066 -6.36731,-6.36712 0,-3.51646 2.85073,-6.36713 6.36731,-6.36713 3.51658,0 6.36732,2.85066 6.36732,6.36713 0,3.51648 -2.85075,6.36712 -6.36732,6.36712 z" + style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:2.39997;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="stroke:#bb6100;stroke-width:3.20031;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"> + inkscape:label="alt-box-group" + id="alt-box-group"> + id="path1652" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccc" /> + - + d="m 770.31078,544.06163 86.08971,-6e-4" + style="fill:none;fill-opacity:1;stroke:#bb6100;stroke-width:3.20031;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> FLX + x="61.095329" + id="tspan4307-3" + sodipodi:role="line">FLX diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas index eb9be5cd..9c8ba0c0 100644 --- a/Nasal/FMGC/FMGC-b.nas +++ b/Nasal/FMGC/FMGC-b.nas @@ -155,7 +155,7 @@ var Text = { }; var Setting = { - reducAglFt: props.globals.initNode("/it-autoflight/settings/reduc-agl-ft", 1500, "INT"), # Changable from MCDU #eventually set to 1500 above runway + reducAglFt: props.globals.initNode("/it-autoflight/settings/accel-agl-ft", 1500, "INT"), # Changable from MCDU #eventually set to 1500 above runway }; var Sound = { @@ -303,7 +303,7 @@ var ITAF = { Internal.altTemp = Internal.alt.getValue(); Internal.altDiff = Internal.altTemp - Position.indicatedAltitudeFtTemp; - if (Output.vertTemp != 0 and Output.vertTemp != 2 and Output.vertTemp != 6 and Output.vertTemp != 9 and Text.vertTemp != "G/A CLB") { + if (Output.vertTemp != 0 and Output.vertTemp != 2 and Output.vertTemp != 6 and Output.vertTemp != 9) { Internal.captVS = math.clamp(math.round(abs(Internal.vs.getValue()) / 5, 100), 50, 2500); # Capture limits Custom.apFdOn = Output.ap1Temp or Output.ap2Temp or Output.fd1.getBoolValue() or Output.fd2.getBoolValue(); if (abs(Internal.altDiff) <= Internal.captVS and !Gear.wow1Temp and !Gear.wow2Temp and Custom.apFdOn) { diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 6bed7535..e311aa77 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -37,7 +37,7 @@ var wowr = 0; var targetalt = 0; var targetvs = 0; var targetfpa = 0; -var reduc_agl_ft = 0; +var accel_agl_ft = 0; var locarm = 0; var apprarm = 0; var gear0 = 0; @@ -95,6 +95,8 @@ var newvert = 0; var newvertarm = 0; var thr1 = 0; var thr2 = 0; +var altsel = 0; +var crzFl = 0; setprop("FMGC/internal/maxspeed", 0); setprop("FMGC/internal/minspeed", 0); setprop("position/gear-agl-ft", 0); @@ -102,7 +104,7 @@ setprop("FMGC/internal/mng-spd", 157); setprop("FMGC/internal/mng-spd-cmd", 157); setprop("FMGC/internal/mng-kts-mach", 0); setprop("FMGC/internal/mach-switchover", 0); -setprop("it-autoflight/settings/reduc-agl-ft", 1500); #eventually set to 1500 above runway +setprop("it-autoflight/settings/accel-agl-ft", 1500); #eventually set to 1500 above runway setprop("it-autoflight/internal/vert-speed-fpm", 0); setprop("it-autoflight/output/fma-pwr", 0); setprop("instrumentation/nav[0]/nav-id", "XXX"); @@ -123,10 +125,14 @@ var FMGCinit = func { setprop("FMGC/internal/mng-spd-cmd", 157); setprop("FMGC/internal/mng-kts-mach", 0); setprop("FMGC/internal/mach-switchover", 0); - setprop("it-autoflight/settings/reduc-agl-ft", 1500); #eventually set to 1500 above runway + setprop("it-autoflight/settings/accel-agl-ft", 1500); #eventually set to 1500 above runway setprop("FMGC/internal/decel", 0); setprop("FMGC/internal/loc-source", "NAV0"); setprop("FMGC/internal/optalt", 0); + setprop("FMGC/internal/landing-time", -99); + setprop("FMGC/internal/align1-time", -99); + setprop("FMGC/internal/align2-time", -99); + setprop("FMGC/internal/align3-time", -99); masterFMGC.start(); various.start(); various2.start(); @@ -193,7 +199,7 @@ var masterFMGC = maketimer(0.2, func { targetalt = getprop("it-autoflight/internal/alt"); targetvs = getprop("it-autoflight/input/vs"); targetfpa = getprop("it-autoflight/input/fpa"); - reduc_agl_ft = getprop("it-autoflight/settings/reduc-agl-ft"); + accel_agl_ft = getprop("it-autoflight/settings/accel-agl-ft"); locarm = getprop("it-autopilot/output/loc-armed"); apprarm = getprop("it-autopilot/output/appr-armed"); gear0 = getprop("gear/gear[0]/wow"); @@ -210,71 +216,65 @@ var masterFMGC = maketimer(0.2, func { gear0 = getprop("gear/gear[0]/wow"); state1 = getprop("systems/thrust/state1"); state2 = getprop("systems/thrust/state2"); + altSel = getprop("it-autoflight/input/alt"); + crzFl = getprop("FMGC/internal/cruise-fl"); if (getprop("gear/gear[0]/wow") != getprop("gear/gear[0]/wow-fmgc")) { setprop("gear/gear[0]/wow-fmgc", getprop("gear/gear[0]/wow")); } - if ((n1_left < 70 or n1_right < 70) and gs < 90 and mode == " " and gear0 == 1 and phase == 1) { + if ((n1_left < 85 or n1_right < 85) and gs < 90 and mode == " " and gear0 == 1 and phase == 1) { # rejected takeoff setprop("FMGC/status/phase", 0); setprop("systems/pressurization/mode", "GN"); } - if (gear0 == 1 and phase == 0 and ((n1_left >= 70 and n1_right >= 70) or gs >= 90) and (state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or - (state2 == "MAN THR" and thr2 >= 0.83)))) { + if (gear0 == 1 and phase == 0 and ((n1_left >= 85 and n1_right >= 85 and mode == "SRS") or gs >= 90)) { setprop("FMGC/status/phase", 1); setprop("systems/pressurization/mode", "TO"); } - if (phase == 1 and ((mode != "SRS" and mode != " ") or alt >= reduc_agl_ft)) { + if (phase == 1 and ((mode != "SRS" and mode != " ") or alt >= accel_agl_ft)) { setprop("FMGC/status/phase", 2); setprop("systems/pressurization/mode", "TO"); } - if ((phase == 3 or phase == 4) and (mode == "OP CLB" or mode == "CLB" or (modeI == "V/S" and getprop("it-autoflight/input/vs") >= 100) or (modeI == "FPA" and getprop("it-autoflight/input/fpa") >= 0.1))) { - setprop("FMGC/status/phase", 2); - setprop("systems/pressurization/mode", "TO"); - } - - if ((phase == 2 or phase == 4) and (mode == "ALT" or mode == "ALT CRZ" or mode == "ALT CST")) { + if (phase == 2 and (mode == "ALT CRZ" or mode == "ALT CRZ*")) { setprop("FMGC/status/phase", 3); setprop("systems/pressurization/mode", "CR"); } - if ((phase == 2 or phase == 3) and (mode == "OP DES" or mode == "DES" or (modeI == "V/S" and getprop("it-autoflight/input/vs") <= -100) or (modeI == "FPA" and getprop("it-autoflight/input/fpa") <= -0.1))) { - setprop("FMGC/status/phase", 4); - setprop("systems/pressurization/mode", "DE"); + if (crzFl >= 200) { + if (phase == 3 and (flightPlanController.arrivalDist <= 200 or altSel < 20000)) { + setprop("FMGC/status/phase", 4); + setprop("systems/pressurization/mode", "DE"); + } + } else { + if (phase == 3 and (flightPlanController.arrivalDist <= 200 or altSel < (crzFl * 100))) { # todo - not sure about crzFl condition, investigate what happens! + setprop("FMGC/status/phase", 4); + setprop("systems/pressurization/mode", "DE"); + } } - if (!wowl and !wowr and aglalt < 7200 and (phase == "4" or mode == "G/S" or mode == "LAND" or mode == "FLARE")) { + if (phase == 4 and getprop("/FMGC/internal/decel")) { setprop("FMGC/status/phase", 5); } - if (flightPlanController.num[2].getValue() > 0 and getprop("/FMGC/flightplan[2]/active") == 1 and flightPlanController.arrivalDist <= 15) { + if (flightPlanController.num[2].getValue() > 0 and getprop("/FMGC/flightplan[2]/active") == 1 and flightPlanController.arrivalDist <= 15 and (modelat == "NAV" or modelat == "LOC" or modelat == "LOC*") and aglalt < 9500) { #todo decel pseudo waypoint setprop("/FMGC/internal/decel", 1); } else if (getprop("/FMGC/internal/decel") == 1 and (phase == 0 or phase == 6)) { setprop("/FMGC/internal/decel", 0); } - #handle go-around - if ((phase == "5" or phase == "7") and state1 == "TOGA" and state2 == "TOGA") { + if ((phase == "5") and state1 == "TOGA" and state2 == "TOGA") { setprop("FMGC/status/phase", 6); setprop("systems/pressurization/mode", "TO"); setprop("it-autoflight/input/toga", 1); } - if (phase == "6" and alt >= reduc_agl_ft) { + if (phase == "6" and alt >= accel_agl_ft) { # todo when insert altn or new dest setprop("FMGC/status/phase", 2); } - if (wowl and wowr and (phase == "2" or phase == "3" or phase == "4" or phase == "5" or phase == "6")) { - setprop("FMGC/status/phase", 7); - } - - if (wowl and wowr and gs <= 40 and phase == "7" and ap1 == 0 and ap2 == 0) { - reset_FMGC(); - } - if (getprop("systems/navigation/adr/computation/overspeed-vfe-spd") != 1024) { setprop("FMGC/internal/maxspeed", getprop("systems/navigation/adr/computation/overspeed-vfe-spd") - 4); } elsif (pts.Gear.position[0].getValue() != 0 or pts.Gear.position[1].getValue() != 0 or pts.Gear.position[2].getValue() != 0) { @@ -313,6 +313,10 @@ var masterFMGC = maketimer(0.2, func { vls = vs1g_conf_full * 1.23 } + if (vls < 113) { + vls = 113; + } + if (!getprop("FMGC/internal/vapp-speed-set")) { if (dest_wind < 5) { vapp = vls + 5; @@ -321,6 +325,7 @@ var masterFMGC = maketimer(0.2, func { } else { vapp = vls + dest_wind; } + setprop("FMGC/internal/computed-speeds/vapp", vapp); } aoa_prot = 15; @@ -362,6 +367,10 @@ var masterFMGC = maketimer(0.2, func { vls_appr = vs1g_conf_full_appr * 1.23 } + if (vls_appr < 113) { + vls_appr = 113; + } + if (!getprop("FMGC/internal/vapp-speed-set")) { if (dest_wind < 5) { vapp_appr = vls_appr + 5; @@ -370,6 +379,7 @@ var masterFMGC = maketimer(0.2, func { } else { vapp_appr = vls_appr + dest_wind; } + setprop("FMGC/internal/computed-speeds/vapp_appr", vapp_appr); } # set the values globally @@ -384,7 +394,6 @@ var masterFMGC = maketimer(0.2, func { setprop("FMGC/internal/computed-speeds/flap2", flap2); setprop("FMGC/internal/computed-speeds/flap3", flap3); setprop("FMGC/internal/computed-speeds/vls", vls); - setprop("FMGC/internal/computed-speeds/vapp", vapp); setprop("FMGC/internal/computed-speeds/alpha_prot", alpha_prot); setprop("FMGC/internal/computed-speeds/alpha_max", alpha_max); @@ -404,7 +413,6 @@ var masterFMGC = maketimer(0.2, func { setprop("FMGC/internal/computed-speeds/flap2_appr", flap2_appr); setprop("FMGC/internal/computed-speeds/clean_appr", clean_appr); setprop("FMGC/internal/computed-speeds/vls_appr", vls_appr); - setprop("FMGC/internal/computed-speeds/vapp_appr", vapp_appr); # Need info on these, also correct for height at altitude... # https://www.pprune.org/archive/index.php/t-587639.html @@ -466,6 +474,52 @@ var masterFMGC = maketimer(0.2, func { if (pts.Position.gearAglFt.getValue() >= 55) { setprop("FMGC/status/to-state", 0); } + + #handle radios, runways, v1/vr/v2 + if (fmgc.flightPlanController.flightplans[2].approach != nil and phase >= 2) { + var airport = airportinfo(getprop("FMGC/internal/arr-arpt")); + setprop("FMGC/internal/ldg-elev", airport.elevation * M2FT); + var runways = airportinfo(airport.id).runways; + var rwy = string.replace(fmgc.flightPlanController.flightplans[2].approach.id, "ILS", ""); + if (runways[rwy] != nil) { + var r = runways[rwy]; + #print(r.lat); + #print(r.lon); + #print(r.length); + #print(r.width); + #print(r.heading); + #print(r.stopway); + #print(r.threshold); + magnetic_hdg = geo.normdeg(r.heading - getprop("environment/magnetic-variation-deg")); + if (r.ils_frequency_mhz != nil and !getprop("FMGC/internal/ils1freq-set") and !getprop("FMGC/internal/ils1crs-set")) { + setprop("FMGC/internal/ils1freq-calculated", r.ils_frequency_mhz); + setprop("instrumentation/nav[0]/frequencies/selected-mhz", r.ils_frequency_mhz); + setprop("instrumentation/nav[0]/radials/selected-deg", magnetic_hdg); + } else if (r.ils_frequency_mhz != nil and !getprop("FMGC/internal/ils1freq-set")) { + setprop("FMGC/internal/ils1freq-calculated", r.ils_frequency_mhz); + setprop("instrumentation/nav[0]/frequencies/selected-mhz", r.ils_frequency_mhz); + } else if (!getprop("FMGC/internal/ils1crs-set")) { + setprop("instrumentation/nav[0]/radials/selected-deg", magnetic_hdg); + } + } + } else if (fmgc.flightPlanController.flightplans[2].departure_runway != nil and phase <= 1) { + var runways = airportinfo(airportinfo(getprop("FMGC/internal/dep-arpt")).id).runways; + var rwy = fmgc.flightPlanController.flightplans[2].departure_runway.id; + if (runways[rwy] != nil) { + var r = runways[rwy]; + magnetic_hdg = geo.normdeg(r.heading - getprop("environment/magnetic-variation-deg")); + if (r.ils_frequency_mhz != nil and !getprop("FMGC/internal/ils1freq-set") and !getprop("FMGC/internal/ils1crs-set")) { + setprop("FMGC/internal/ils1freq-calculated", r.ils_frequency_mhz); + setprop("instrumentation/nav[0]/frequencies/selected-mhz", r.ils_frequency_mhz); + setprop("instrumentation/nav[0]/radials/selected-deg", magnetic_hdg); + } else if (r.ils_frequency_mhz != nil and !getprop("FMGC/internal/ils1freq-set")) { + setprop("FMGC/internal/ils1freq-calculated", r.ils_frequency_mhz); + setprop("instrumentation/nav[0]/frequencies/selected-mhz", r.ils_frequency_mhz); + } else if (!getprop("FMGC/internal/ils1crs-set")) { + setprop("instrumentation/nav[0]/radials/selected-deg", magnetic_hdg); + } + } + } }); var reset_FMGC = func { @@ -512,11 +566,11 @@ var reset_FMGC = func { var various = maketimer(1, func { if (getprop("engines/engine[0]/state") == 3 and getprop("engines/engine[1]/state") != 3) { - setprop("it-autoflight/settings/reduc-agl-ft", getprop("FMGC/internal/eng-out-reduc")); + setprop("it-autoflight/settings/accel-agl-ft", getprop("FMGC/internal/eng-out-reduc")); } else if (getprop("engines/engine[0]/state") != 3 and getprop("engines/engine[1]/state") == 3) { - setprop("it-autoflight/settings/reduc-agl-ft", getprop("FMGC/internal/eng-out-reduc")); + setprop("it-autoflight/settings/accel-agl-ft", getprop("FMGC/internal/eng-out-reduc")); } else { - setprop("it-autoflight/settings/reduc-agl-ft", getprop("FMGC/internal/reduc-agl-ft")); + setprop("it-autoflight/settings/accel-agl-ft", getprop("FMGC/internal/accel-agl-ft")); } setprop("FMGC/internal/gw", math.round(getprop("fdm/jsbsim/inertia/weight-lbs"), 100)); @@ -751,4 +805,86 @@ var switchDatabase = func { setprop("FMGC/internal/navdatabase2", database1); setprop("FMGC/internal/navdatabasecode", code2); setprop("FMGC/internal/navdatabasecode2", code1); -} \ No newline at end of file +} + +# Landing to phase 7 +setlistener("gear/gear[1]/wow", func() { + if (timer30secLanding.isRunning) { + timer30secLanding.stop(); + } + + if (getprop("gear/gear[1]/wow") == 1 and getprop("FMGC/internal/landing-time") == -99) { + timer30secLanding.start(); + setprop("FMGC/internal/landing-time", pts.Sim.Time.elapsedSec.getValue()); + } +}, 0, 0); + +# Align IRS 1 +setlistener("systems/navigation/adr/operating-1", func() { + if (timer48gpsAlign1.isRunning) { + timer48gpsAlign1.stop(); + } + + if (getprop("FMGC/internal/align1-time") == -99) { + timer48gpsAlign1.start(); + setprop("FMGC/internal/align1-time", pts.Sim.Time.elapsedSec.getValue()); + } +}, 0, 0); + +# Align IRS 2 +setlistener("systems/navigation/adr/operating-2", func() { + if (timer48gpsAlign2.isRunning) { + timer48gpsAlign2.stop(); + } + + if (getprop("FMGC/internal/align2-time") == -99) { + timer48gpsAlign2.start(); + setprop("FMGC/internal/align2-time", pts.Sim.Time.elapsedSec.getValue()); + } +}, 0, 0); + +# Align IRS 3 +setlistener("systems/navigation/adr/operating-3", func() { + if (timer48gpsAlign3.isRunning) { + timer48gpsAlign3.stop(); + } + + if (getprop("gear/gear[1]/wow") == 1 and getprop("FMGC/internal/align3-time") == -99) { + timer48gpsAlign3.start(); + setprop("FMGC/internal/align3-time", pts.Sim.Time.elapsedSec.getValue()); + } +}, 0, 0); + +# Maketimers + +var timer30secLanding = maketimer(1, func() { + if (pts.Sim.Time.elapsedSec.getValue() > getprop("FMGC/internal/landing-time") + 30) { + setprop("FMGC/status/phase", 7); + setprop("FMGC/internal/landing-time", -99); + timer30secLanding.stop(); + } +}); + +var timer48gpsAlign1 = maketimer(1, func() { + if (pts.Sim.Time.elapsedSec.getValue() > getprop("FMGC/internal/align1-time") + 48) { + setprop("FMGC/internal/align1-done", 1); + setprop("FMGC/internal/align1-time", -99); + timer48gpsAlign1.stop(); + } +}); + +var timer48gpsAlign2 = maketimer(1, func() { + if (pts.Sim.Time.elapsedSec.getValue() > getprop("FMGC/internal/align2-time") + 48) { + setprop("FMGC/internal/align2-done", 1); + setprop("FMGC/internal/align2-time", -99); + timer48gpsAlign2.stop(); + } +}); + +var timer48gpsAlign3 = maketimer(1, func() { + if (pts.Sim.Time.elapsedSec.getValue() > getprop("FMGC/internal/align3-time") + 48) { + setprop("FMGC/internal/align3-done", 1); + setprop("FMGC/internal/align3-time", -99); + timer48gpsAlign3.stop(); + } +}); \ No newline at end of file diff --git a/Nasal/MCDU/ARRIVAL.nas b/Nasal/MCDU/ARRIVAL.nas index f504f244..64f6bcd3 100644 --- a/Nasal/MCDU/ARRIVAL.nas +++ b/Nasal/MCDU/ARRIVAL.nas @@ -465,6 +465,9 @@ var arrivalPage = { me.makeTmpy(); fmgc.flightPlanController.flightplans[me.computer].destination_runway = me.arrAirport[0].runways[me.selectedApproach.runways[0]]; fmgc.flightPlanController.flightplans[me.computer].approach = me.selectedApproach; + setprop("FMGC/internal/baro", 99999); + setprop("FMGC/internal/radio", 99999); + setprop("FMGC/internal/radio-no", 0); me.updateActiveApproach(); me.updateApproaches(); fmgc.flightPlanController.flightPlanChanged(me.computer); diff --git a/Nasal/MCDU/FUELPRED.nas b/Nasal/MCDU/FUELPRED.nas index 6637a0d0..84eb5706 100644 --- a/Nasal/MCDU/FUELPRED.nas +++ b/Nasal/MCDU/FUELPRED.nas @@ -3,8 +3,12 @@ # Copyright (c) 2020 Matthew Maring (hayden2000) # From INIT-B +var zfwcg = props.globals.getNode("FMGC/internal/zfwcg", 1); +var zfwcgSet = props.globals.getNode("FMGC/internal/zfwcg-set", 1); var zfw = props.globals.getNode("FMGC/internal/zfw", 1); +var zfwSet = props.globals.getNode("FMGC/internal/zfw-set", 1); var block = props.globals.getNode("FMGC/internal/block", 1); +var blockSet = props.globals.getNode("FMGC/internal/block-set", 1); var taxi_fuel = props.globals.getNode("FMGC/internal/taxi-fuel", 1); var trip_fuel = props.globals.getNode("FMGC/internal/trip-fuel", 1); var trip_time = props.globals.getNode("FMGC/internal/trip-time", 1); @@ -18,76 +22,115 @@ var min_dest_fob = props.globals.getNode("FMGC/internal/min-dest-fob", 1); var tow = props.globals.getNode("FMGC/internal/tow", 1); var lw = props.globals.getNode("FMGC/internal/lw", 1); var trip_wind = props.globals.getNode("FMGC/internal/trip-wind", 1); +var fob = props.globals.getNode("FMGC/internal/fob", 1); +var fffq_sensor = props.globals.getNode("FMGC/internal/fffq-sensor", 1); var extra_fuel = props.globals.getNode("FMGC/internal/extra-fuel", 1); var extra_time = props.globals.getNode("FMGC/internal/extra-time", 1); var fuelPredInput = func(key, i) { var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad"); - if (key == "L3") { + if (key == "L3" and blockSet.getValue() == 1 and zfwSet.getValue() == 1) { if (scratchpad == "CLR") { - notAllowed(i); + setprop("FMGC/internal/rte-rsv", 0.05 * num(trip_fuel.getValue())); + setprop("FMGC/internal/rte-percent", 5.0); + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + + setprop("FMGC/internal/min-dest-fob", num(alt_fuel.getValue() + final_fuel.getValue())); + setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); + setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); + setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); + setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); } else if (getprop("FMGC/internal/trip-fuel") != 0) { + var tf = num(scratchpad); var tfs = size(scratchpad); if (tfs >= 2 and tfs <= 5 and find("/", scratchpad) == 0) { var perc = num(split("/", scratchpad)[1]); - if (perc != nil and perc >= 0.0 and perc <= 100.0) { + if (perc != nil and perc >= 0.0 and perc <= 15.0) { setprop("FMGC/internal/rte-rsv", num(perc) / 100 * num(trip_fuel.getValue())); setprop("FMGC/internal/rte-percent", perc); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } - } else if (tfs >= 1 and tfs <= 4) { - if (num(scratchpad) != nil and scratchpad >= 0.0 and scratchpad <= trip_fuel.getValue()) { + } else if (tfs >= 1 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 21.7 and tf / num(trip_fuel.getValue()) <= 0.15) { setprop("FMGC/internal/rte-rsv", scratchpad); setprop("FMGC/internal/rte-percent", scratchpad / num(trip_fuel.getValue()) * 100); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); - } else { - notAllowed(i); - } } else { notAllowed(i); } } else { notAllowed(i); } - } else if (key == "L4") { + } else if (key == "L4" and blockSet.getValue() == 1 and zfwSet.getValue() == 1) { if (scratchpad == "CLR") { - notAllowed(i); - } else { + setprop("FMGC/internal/alt-fuel", 0.0); + setprop("FMGC/internal/alt-time", "0000"); + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + + setprop("FMGC/internal/min-dest-fob", num(alt_fuel.getValue() + final_fuel.getValue())); + setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); + setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); + setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); + setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); + } else if (find(".", scratchpad) != -1) { + var tf = num(scratchpad); var tfs = size(scratchpad); - if (tfs >= 1 and tfs <= 3) { - if (num(scratchpad) != nil and scratchpad >= 0.0 and scratchpad <= 99.9) { - setprop("FMGC/internal/alt-fuel", scratchpad); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); - setprop("FMGC/internal/min-dest-fob", num(alt_fuel.getValue() + final_fuel.getValue())); - setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); - setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); - setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); - setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); - - } else { - notAllowed(i); - } + if (tfs >= 3 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 10.0 and tf < trip_fuel.getValue() + alt_fuel.getValue()) { + setprop("FMGC/internal/alt-fuel", tf); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + + setprop("FMGC/internal/min-dest-fob", num(alt_fuel.getValue() + final_fuel.getValue())); + setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); + setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); + setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); + setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); + } else { + notAllowed(i); + } + } else { + var tf = num(scratchpad); + var tfs = size(scratchpad); + if (tfs == 4 and tf != nil and ((tf >= 0 and tf <= 59) or (tf >= 100 and tf <= 130))) { + setprop("FMGC/internal/alt-time", scratchpad); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { notAllowed(i); } } - } else if (key == "L5") { + } else if (key == "L5" and blockSet.getValue() == 1 and zfwSet.getValue() == 1) { if (scratchpad == "CLR") { - notAllowed(i); - } else { + setprop("FMGC/internal/final-fuel", 0.0); + setprop("FMGC/internal/final-time", "0030"); + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + + setprop("FMGC/internal/min-dest-fob", num(alt_fuel.getValue() + final_fuel.getValue())); + setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); + setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); + setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); + setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); + } else if (find(".", scratchpad) != -1) { + var tf = num(scratchpad); var tfs = size(scratchpad); - if (tfs >= 1 and tfs <= 3) { - if (num(scratchpad) != nil and scratchpad >= 0.0 and scratchpad <= 99.9) { - setprop("FMGC/internal/final-fuel", scratchpad); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); - setprop("FMGC/internal/min-dest-fob", num(alt_fuel.getValue() + final_fuel.getValue())); - setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); - setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); - setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); - setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); - } else { - notAllowed(i); - } + if (tfs >= 3 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 10.0 and tf < trip_fuel.getValue() + final_fuel.getValue()) { + setprop("FMGC/internal/final-fuel", tf); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + + setprop("FMGC/internal/min-dest-fob", num(alt_fuel.getValue() + final_fuel.getValue())); + setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); + setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); + setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); + setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); + } else { + notAllowed(i); + } + } else { + var tf = num(scratchpad); + var tfs = size(scratchpad); + if (tfs == 4 and tf != nil and ((tf >= 0 and tf <= 59) or (tf >= 100 and tf <= 130))) { + setprop("FMGC/internal/final-time", scratchpad); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { notAllowed(i); } @@ -144,5 +187,23 @@ var fuelPredInput = func(key, i) { notAllowed(i); } } + } else if (key == "R4") { + if (scratchpad == "CLR") { + setprop("FMGC/internal/fffq-sensor", "FF+FQ"); + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else if (find("/", scratchpad) == 0) { + var sensor = substr(scratchpad, 1); + if (sensor == "FF+FQ" or sensor == "FQ+FF" or sensor == "FF" or sensor == "FQ") { + setprop("FMGC/internal/fffq-sensor", sensor); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else { + notAllowed(i); + } + } else { + notAllowed(i); + } + } else { + notAllowed(i); } } diff --git a/Nasal/MCDU/INITA.nas b/Nasal/MCDU/INITA.nas index 4e96b053..61282a17 100644 --- a/Nasal/MCDU/INITA.nas +++ b/Nasal/MCDU/INITA.nas @@ -8,20 +8,22 @@ var initInputA = func(key, i) { if (key == "L2") { if (scratchpad == "CLR") { setprop("FMGC/internal/alt-airport", ""); + setprop("FMGC/internal/alt-set", 0); setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); fmgc.updateARPT(); - } else if (scratchpad == "") { - setprop("FMGC/internal/alt-selected", 1); - setprop("MCDU[" ~ i ~ "]/page", "ROUTESELECTION"); + #} else if (scratchpad == "") { + #setprop("FMGC/internal/alt-selected", 1); + #setprop("MCDU[" ~ i ~ "]/page", "ROUTESELECTION"); } else if (getprop("FMGC/internal/tofrom-set") == 1) { var tfs = size(scratchpad); if (tfs == 4) { setprop("FMGC/internal/alt-airport", scratchpad); + setprop("FMGC/internal/alt-set", 1); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); fmgc.updateARPT(); - setprop("FMGC/internal/alt-selected", 1); - setprop("MCDU[" ~ i ~ "]/page", "ROUTESELECTION"); + #setprop("FMGC/internal/alt-selected", 1); + #setprop("MCDU[" ~ i ~ "]/page", "ROUTESELECTION"); } else { notAllowed(i); } @@ -70,23 +72,36 @@ var initInputA = func(key, i) { setprop("FMGC/internal/cruise-ft", 10000); setprop("FMGC/internal/cruise-fl", 100); setprop("FMGC/internal/cruise-lvl-set", 0); + setprop("FMGC/internal/cruise-temp", 15); + setprop("FMGC/internal/cruise-temp-set", 0); setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else if (find("/", scratchpad) != -1) { var crztemp = split("/", scratchpad); - var crz = int(crztemp[0]); - var crzs = size(crztemp[0]); - var temp = num(crztemp[1]); + if (find("FL", crztemp[0]) != -1) { + var crz = int(substr(crztemp[0], 2)); + var crzs = size(substr(crztemp[0], 2)); + } else { + var crz = int(crztemp[0]); + var crzs = size(crztemp[0]); + } + var temp = int(crztemp[1]); var temps = size(crztemp[1]); - if (crzs >= 1 and crzs <= 3 and temps >= 1 and temps <= 5) { - if (crz == nil or temp == nil) { + if (crzs == 0 and temps >= 1 and temps <= 3 and temp != nil and getprop("FMGC/internal/cruise-lvl-set")) { + if (temp >= -99 and temp <= 99) { + setprop("FMGC/internal/cruise-temp", temp); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else { notAllowed(i); - } else if (crz > 0 and crz <= 430 and temp >= -100 and temp < 100) { + } + } else if (crzs >= 1 and crzs <= 3 and crz != nil and temps >= 1 and temps <= 3 and temp != nil) { + if (crz > 0 and crz <= 390 and temp >= -99 and temp <= 99) { setprop("FMGC/internal/cruise-ft", crz * 100); setprop("FMGC/internal/cruise-fl", crz); setprop("FMGC/internal/cruise-fl-prog", crz); setprop("FMGC/internal/cruise-lvl-set", 1); setprop("FMGC/internal/cruise-temp", temp); + setprop("FMGC/internal/cruise-temp-set", 1); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { notAllowed(i); @@ -95,20 +110,42 @@ var initInputA = func(key, i) { notAllowed(i); } } else { - notAllowed(i); + if (find("FL", scratchpad) != -1) { + var crz = int(substr(scratchpad, 2)); + var crzs = size(substr(scratchpad, 2)); + } else { + var crz = int(scratchpad); + var crzs = size(scratchpad); + } + if (crzs >= 1 and crzs <= 3 and crz != nil) { + if (crz > 0 and crz <= 390) { + setprop("FMGC/internal/cruise-ft", crz * 100); + setprop("FMGC/internal/cruise-fl", crz); + setprop("FMGC/internal/cruise-fl-prog", crz); + setprop("FMGC/internal/cruise-lvl-set", 1); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else { + notAllowed(i); + } + } else { + notAllowed(i); + } } } else if (key == "R1") { if (scratchpad == "CLR") { - clearFPLNComputer(); setprop("FMGC/internal/dep-arpt", ""); setprop("FMGC/internal/arr-arpt", ""); setprop("FMGC/internal/tofrom-set", 0); + setprop("FMGC/internal/align-ref-lat", 0); + setprop("FMGC/internal/align-ref-long", 0); + setprop("FMGC/internal/align-ref-lat-edit", 0); + setprop("FMGC/internal/align-ref-long-edit", 0); fmgc.flightPlanController.reset(); setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); - } else if (scratchpad == "") { - setprop("FMGC/internal/alt-selected", 0); - setprop("MCDU[" ~ i ~ "]/page", "ROUTESELECTION"); + #} else if (scratchpad == "") { + #setprop("FMGC/internal/alt-selected", 0); + #setprop("MCDU[" ~ i ~ "]/page", "ROUTESELECTION"); } else { var tfs = size(scratchpad); if (tfs == 9 and find("/", scratchpad) != -1) { @@ -116,13 +153,34 @@ var initInputA = func(key, i) { var froms = size(fromto[0]); var tos = size(fromto[1]); if (froms == 4 and tos == 4) { + #route setprop("FMGC/internal/dep-arpt", fromto[0]); setprop("FMGC/internal/arr-arpt", fromto[1]); setprop("FMGC/internal/tofrom-set", 1); + #scratchpad setprop("MCDU[" ~ i ~ "]/scratchpad", ""); fmgc.flightPlanController.updateAirports(fromto[0], fromto[1], 2); setprop("FMGC/internal/alt-selected", 0); - setprop("MCDU[" ~ i ~ "]/page", "ROUTESELECTION"); + #ref lat + dms = getprop("FMGC/flightplan[2]/wp[0]/lat"); + degrees = int(dms); + minutes = sprintf("%.1f",abs((dms - degrees) * 60)); + sign = degrees >= 0 ? "N" : "S"; + setprop("FMGC/internal/align-ref-lat-degrees", degrees); + setprop("FMGC/internal/align-ref-lat-minutes", minutes); + setprop("FMGC/internal/align-ref-lat-sign", sign); + #ref long + dms = getprop("FMGC/flightplan[2]/wp[0]/lon"); + degrees = int(dms); + minutes = sprintf("%.1f",abs((dms - degrees) * 60)); + sign = degrees >= 0 ? "E" : "W"; + setprop("FMGC/internal/align-ref-long-degrees", degrees); + setprop("FMGC/internal/align-ref-long-minutes", minutes); + setprop("FMGC/internal/align-ref-long-sign", sign); + #ref edit + setprop("FMGC/internal/align-ref-lat-edit", 0); + setprop("FMGC/internal/align-ref-long-edit", 0); + #setprop("MCDU[" ~ i ~ "]/page", "ROUTESELECTION"); } else { notAllowed(i); } @@ -132,7 +190,7 @@ var initInputA = func(key, i) { } } else if (key == "R3") { setprop("MCDU[" ~ i ~ "]/page", "IRSINIT"); - } else if (key == "R6") { + } else if (key == "R5") { if (scratchpad == "CLR") { setprop("FMGC/internal/tropo", 36090); setprop("FMGC/internal/tropo-set", 0); @@ -148,5 +206,17 @@ var initInputA = func(key, i) { notAllowed(i); } } + } else if (key == "R6") { + if (scratchpad == "CLR") { + setprop("FMGC/internal/gndtemp-set", 0); + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else if (int(scratchpad) != nil and getprop("FMGC/status/phase") == 0 and size(scratchpad) >= 1 and size(scratchpad) <= 3 and scratchpad >= -99 and scratchpad <= 99) { + setprop("FMGC/internal/gndtemp", scratchpad); + setprop("FMGC/internal/gndtemp-set", 1); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else { + notAllowed(i); + } } } diff --git a/Nasal/MCDU/INITB.nas b/Nasal/MCDU/INITB.nas index acaee1b8..ba9feda5 100644 --- a/Nasal/MCDU/INITB.nas +++ b/Nasal/MCDU/INITB.nas @@ -2,8 +2,12 @@ # Copyright (c) 2020 Matthew Maring (hayden2000) +var zfwcg = props.globals.getNode("FMGC/internal/zfwcg", 1); +var zfwcgSet = props.globals.getNode("FMGC/internal/zfwcg-set", 1); var zfw = props.globals.getNode("FMGC/internal/zfw", 1); +var zfwSet = props.globals.getNode("FMGC/internal/zfw-set", 1); var block = props.globals.getNode("FMGC/internal/block", 1); +var blockSet = props.globals.getNode("FMGC/internal/block-set", 1); var taxi_fuel = props.globals.getNode("FMGC/internal/taxi-fuel", 1); var trip_fuel = props.globals.getNode("FMGC/internal/trip-fuel", 1); var trip_time = props.globals.getNode("FMGC/internal/trip-time", 1); @@ -24,11 +28,13 @@ var initInputB = func(key, i) { var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad"); if (key == "L1") { if (scratchpad == "CLR") { - notAllowed(i); + setprop("FMGC/internal/taxi-fuel", 0.4); + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { var tfs = size(scratchpad); if (tfs >= 1 and tfs <= 4) { - if (num(scratchpad) != nil and scratchpad >= 0.0 and scratchpad <= 10.0) { + if (num(scratchpad) != nil and scratchpad >= 0.0 and scratchpad <= 9.9) { setprop("FMGC/internal/taxi-fuel", scratchpad); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); @@ -44,8 +50,8 @@ var initInputB = func(key, i) { notAllowed(i); } } - } - # else if (key == "L2") { +# } +# else if (key == "L2") { # if (scratchpad == "CLR") { # notAllowed(i); # } else if (getprop("FMGC/internal/trip-fuel") != 0) { @@ -69,75 +75,108 @@ var initInputB = func(key, i) { # notAllowed(i); # } # -# } - else if (key == "L3") { + } else if (key == "L3" and blockSet.getValue() == 1 and zfwSet.getValue() == 1) { if (scratchpad == "CLR") { - notAllowed(i); + setprop("FMGC/internal/rte-rsv", 0.05 * num(trip_fuel.getValue())); + setprop("FMGC/internal/rte-percent", 5.0); + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + + setprop("FMGC/internal/min-dest-fob", num(alt_fuel.getValue() + final_fuel.getValue())); + setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); + setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); + setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); + setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); } else if (getprop("FMGC/internal/trip-fuel") != 0) { + var tf = num(scratchpad); var tfs = size(scratchpad); if (tfs >= 2 and tfs <= 5 and find("/", scratchpad) == 0) { var perc = num(split("/", scratchpad)[1]); - if (perc != nil and perc >= 0.0 and perc <= 100.0) { + if (perc != nil and perc >= 0.0 and perc <= 15.0) { setprop("FMGC/internal/rte-rsv", num(perc) / 100 * num(trip_fuel.getValue())); setprop("FMGC/internal/rte-percent", perc); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } - } else if (tfs >= 1 and tfs <= 4) { - if (num(scratchpad) != nil and scratchpad >= 0.0 and scratchpad <= trip_fuel.getValue()) { + } else if (tfs >= 1 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 21.7 and tf / num(trip_fuel.getValue()) <= 0.15) { setprop("FMGC/internal/rte-rsv", scratchpad); setprop("FMGC/internal/rte-percent", scratchpad / num(trip_fuel.getValue()) * 100); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); - } else { - notAllowed(i); - } } else { notAllowed(i); } } else { notAllowed(i); } - } else if (key == "L4") { + } else if (key == "L4" and blockSet.getValue() == 1 and zfwSet.getValue() == 1) { if (scratchpad == "CLR") { - notAllowed(i); - } else { + setprop("FMGC/internal/alt-fuel", 0.0); + setprop("FMGC/internal/alt-time", "0000"); + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + + setprop("FMGC/internal/min-dest-fob", num(alt_fuel.getValue() + final_fuel.getValue())); + setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); + setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); + setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); + setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); + } else if (find(".", scratchpad) != -1) { + var tf = num(scratchpad); var tfs = size(scratchpad); - if (tfs >= 1 and tfs <= 3) { - if (num(scratchpad) != nil and scratchpad >= 0.0 and scratchpad <= 99.9) { - setprop("FMGC/internal/alt-fuel", scratchpad); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); - - setprop("FMGC/internal/min-dest-fob", num(alt_fuel.getValue() + final_fuel.getValue())); - setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); - setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); - setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); - setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); - - } else { - notAllowed(i); - } + if (tfs >= 3 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 10.0 and tf < trip_fuel.getValue() + alt_fuel.getValue()) { + setprop("FMGC/internal/alt-fuel", tf); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + + setprop("FMGC/internal/min-dest-fob", num(alt_fuel.getValue() + final_fuel.getValue())); + setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); + setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); + setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); + setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); + } else { + notAllowed(i); + } + } else { + var tf = num(scratchpad); + var tfs = size(scratchpad); + if (tfs == 4 and tf != nil and ((tf >= 0 and tf <= 59) or (tf >= 100 and tf <= 130))) { + setprop("FMGC/internal/alt-time", scratchpad); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { notAllowed(i); } } - } else if (key == "L5") { + } else if (key == "L5" and blockSet.getValue() == 1 and zfwSet.getValue() == 1) { if (scratchpad == "CLR") { - notAllowed(i); - } else { + setprop("FMGC/internal/final-fuel", 0.0); + setprop("FMGC/internal/final-time", "0030"); + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + + setprop("FMGC/internal/min-dest-fob", num(alt_fuel.getValue() + final_fuel.getValue())); + setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); + setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); + setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); + setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); + } else if (find(".", scratchpad) != -1) { + var tf = num(scratchpad); var tfs = size(scratchpad); - if (tfs >= 1 and tfs <= 3) { - if (num(scratchpad) != nil and scratchpad >= 0.0 and scratchpad <= 99.9) { - setprop("FMGC/internal/final-fuel", scratchpad); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); - - setprop("FMGC/internal/min-dest-fob", num(alt_fuel.getValue() + final_fuel.getValue())); - setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); - setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); - setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); - setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); - - } else { - notAllowed(i); - } + if (tfs >= 3 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 10.0 and tf < trip_fuel.getValue() + final_fuel.getValue()) { + setprop("FMGC/internal/final-fuel", tf); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + + setprop("FMGC/internal/min-dest-fob", num(alt_fuel.getValue() + final_fuel.getValue())); + setprop("FMGC/internal/rte-rsv", num((block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue()) * (rte_percent.getValue() / 100) / (1 + rte_percent.getValue() / 100))); + setprop("FMGC/internal/trip-fuel", num(block.getValue() - taxi_fuel.getValue() - min_dest_fob.getValue() - rte_rsv.getValue())); + setprop("FMGC/internal/tow", num(block.getValue() + zfw.getValue() - taxi_fuel.getValue())); + setprop("FMGC/internal/lw", num(tow.getValue() - trip_fuel.getValue())); + } else { + notAllowed(i); + } + } else { + var tf = num(scratchpad); + var tfs = size(scratchpad); + if (tfs == 4 and tf != nil and ((tf >= 0 and tf <= 59) or (tf >= 100 and tf <= 130))) { + setprop("FMGC/internal/final-time", scratchpad); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { notAllowed(i); } @@ -186,6 +225,16 @@ var initInputB = func(key, i) { if (scratchpad == "CLR") { setprop("FMGC/internal/block", 0.0); setprop("FMGC/internal/block-set", 0); + setprop("FMGC/internal/taxi-fuel", 0.4); + setprop("FMGC/internal/rte-rsv", 0.05 * num(trip_fuel.getValue())); + setprop("FMGC/internal/rte-percent", 5.0); + setprop("FMGC/internal/alt-fuel", 0.0); + setprop("FMGC/internal/alt-time", "0000"); + setprop("FMGC/internal/final-fuel", 0.0); + setprop("FMGC/internal/final-time", "0030"); + setprop("FMGC/internal/extra-fuel", 0.0); + setprop("FMGC/internal/extra-time", "0000"); + setprop("FMGC/internal/min-dest-fob", 0.0); setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { @@ -197,6 +246,16 @@ var initInputB = func(key, i) { if (num(scratchpad) != nil and scratchpad >= 1.0 and scratchpad <= maxblock) { setprop("FMGC/internal/block", scratchpad); setprop("FMGC/internal/block-set", 1); + setprop("FMGC/internal/taxi-fuel", 0.4); + setprop("FMGC/internal/rte-rsv", 0.05 * num(trip_fuel.getValue())); + setprop("FMGC/internal/rte-percent", 5.0); + setprop("FMGC/internal/alt-fuel", 0.0); + setprop("FMGC/internal/alt-time", "0000"); + setprop("FMGC/internal/final-fuel", 0.0); + setprop("FMGC/internal/final-time", "0030"); + setprop("FMGC/internal/extra-fuel", 0.0); + setprop("FMGC/internal/extra-time", "0000"); + setprop("FMGC/internal/min-dest-fob", 0.0); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { notAllowed(i); @@ -206,13 +265,46 @@ var initInputB = func(key, i) { } } } else if (key == "R3") { - if (scratchpad != "") { - notAllowed(i); - } else { + if (scratchpad == "" and (!getprop("FMGC/internal/block-set") or !getprop("FMGC/internal/zfw-set"))) { setprop("FMGC/internal/zfw", num((getprop("fdm/jsbsim/inertia/weight-lbs") - getprop("consumables/fuel/total-fuel-lbs")) / 1000)); setprop("FMGC/internal/zfw-set", 1); setprop("FMGC/internal/block", num(getprop("consumables/fuel/total-fuel-lbs") / 1000)); setprop("FMGC/internal/block-set", 1); + } else { + notAllowed(i); } + } else if (key == "R5") { + if (scratchpad == "CLR") { + setprop("FMGC/internal/trip-wind", "HD000"); + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else { + if (find("TL", scratchpad) != -1 or find("HD", scratchpad) != -1) { + var effwind = substr(scratchpad, 2); + if (int(effwind) != nil and effwind >= 0 and effwind <= 500) { + setprop("FMGC/internal/trip-wind", scratchpad); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else { + notAllowed(i); + } + } else if (find("-", scratchpad) != -1 or find("+", scratchpad) != -1 or find("T", scratchpad) != -1 or find("H", scratchpad) != -1) { + var effwind = substr(scratchpad, 1); + if (int(effwind) != nil and effwind >= 0 and effwind <= 500) { + setprop("FMGC/internal/trip-wind", scratchpad); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else { + notAllowed(i); + } + } else { + if (num(scratchpad) != nil and scratchpad >= 0 and scratchpad <= 500) { + setprop("FMGC/internal/trip-wind", scratchpad); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else { + notAllowed(i); + } + } + } + } else { + notAllowed(i); } } diff --git a/Nasal/MCDU/IRSINIT.nas b/Nasal/MCDU/IRSINIT.nas index 3fb7c332..4345c023 100644 --- a/Nasal/MCDU/IRSINIT.nas +++ b/Nasal/MCDU/IRSINIT.nas @@ -1,14 +1,93 @@ # Copyright (c) 2020 Matthew Maring (hayden2000) var initInputIRS = func(key, i) { - if (key == "L6") { + if (key == "up") { + if (getprop("FMGC/internal/align-ref-lat-edit")) { + if (num(getprop("FMGC/internal/align-ref-lat-minutes")) == 180) { + if (getprop("FMGC/internal/align-ref-lat-sign") == "N") { + setprop("FMGC/internal/align-ref-lat-sign", "S"); + } else { + setprop("FMGC/internal/align-ref-lat-sign", "N"); + } + } else if (num(getprop("FMGC/internal/align-ref-lat-minutes")) == 59.9) { + setprop("FMGC/internal/align-ref-lat-degrees", getprop("FMGC/internal/align-ref-lat-degrees") + 1); + setprop("FMGC/internal/align-ref-lat-minutes", 0.0); + } else { + setprop("FMGC/internal/align-ref-lat-minutes", getprop("FMGC/internal/align-ref-lat-minutes") + 0.1); + } + } else if (getprop("FMGC/internal/align-ref-long-edit")) { + if (num(getprop("FMGC/internal/align-ref-long-minutes")) == 180) { + if (getprop("FMGC/internal/align-ref-long-sign") == "W") { + setprop("FMGC/internal/align-ref-long-sign", "E"); + } else { + setprop("FMGC/internal/align-ref-long-sign", "W"); + } + } else if (num(getprop("FMGC/internal/align-ref-long-minutes")) == 59.9) { + setprop("FMGC/internal/align-ref-long-degrees", getprop("FMGC/internal/align-ref-long-degrees") + 1); + setprop("FMGC/internal/align-ref-long-minutes", 0.0); + } else { + setprop("FMGC/internal/align-ref-long-minutes", getprop("FMGC/internal/align-ref-long-minutes") + 0.1); + } + } else { + notAllowed(i); + } + } else if (key == "down") { + if (getprop("FMGC/internal/align-ref-lat-edit")) { + if (num(getprop("FMGC/internal/align-ref-lat-minutes")) == 0) { + if (getprop("FMGC/internal/align-ref-lat-sign") == "N") { + setprop("FMGC/internal/align-ref-lat-sign", "S"); + } else { + setprop("FMGC/internal/align-ref-lat-sign", "N"); + } + } else if (num(getprop("FMGC/internal/align-ref-lat-minutes")) == 0) { + setprop("FMGC/internal/align-ref-lat-degrees", getprop("FMGC/internal/align-ref-lat-degrees") - 1); + setprop("FMGC/internal/align-ref-lat-minutes", 59.9); + } else { + setprop("FMGC/internal/align-ref-lat-minutes", getprop("FMGC/internal/align-ref-lat-minutes") - 0.1); + } + } else if (getprop("FMGC/internal/align-ref-long-edit")) { + if (num(getprop("FMGC/internal/align-ref-long-minutes")) == 0) { + if (getprop("FMGC/internal/align-ref-long-sign") == "W") { + setprop("FMGC/internal/align-ref-long-sign", "E"); + } else { + setprop("FMGC/internal/align-ref-long-sign", "W"); + } + } else if (num(getprop("FMGC/internal/align-ref-long-minutes")) == 0) { + setprop("FMGC/internal/align-ref-long-degrees", getprop("FMGC/internal/align-ref-long-degrees") - 1); + setprop("FMGC/internal/align-ref-long-minutes", 59.9); + } else { + setprop("FMGC/internal/align-ref-long-minutes", getprop("FMGC/internal/align-ref-long-minutes") - 0.1); + } + } else { + notAllowed(i); + } + } else if (key == "L1") { + if (getprop("FMGC/internal/tofrom-set")) { + setprop("FMGC/internal/align-ref-lat-edit", 1); + setprop("FMGC/internal/align-ref-long-edit", 0); + } else { + notAllowed(i); + } + } else if (key == "L6") { + setprop("FMGC/internal/align-ref-lat-edit", 0); + setprop("FMGC/internal/align-ref-long-edit", 0); setprop("MCDU[" ~ i ~ "]/page", "INITA"); + } else if (key == "R1") { + if (getprop("FMGC/internal/tofrom-set")) { + setprop("FMGC/internal/align-ref-lat-edit", 0); + setprop("FMGC/internal/align-ref-long-edit", 1); + } else { + notAllowed(i); + } } else if (key == "R6") { + setprop("FMGC/internal/align-ref-lat-edit", 0); + setprop("FMGC/internal/align-ref-long-edit", 0); if (getprop("FMGC/internal/tofrom-set") == 1 and getprop("systems/navigation/adr/any-adr-on") == 1) { if (getprop("FMGC/internal/align-set") == 0) { setprop("FMGC/internal/align-set", 1); } else { setprop("controls/adirs/mcducbtn", 1); + setprop("FMGC/internal/align-set", 0); setprop("MCDU[" ~ i ~ "]/page", "INITA"); } } else if (getprop("FMGC/internal/tofrom-set") == 0) { diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index feec4108..28c8f1f3 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -15,6 +15,7 @@ var MCDU_reset = func(i) { setprop("MCDU[" ~ i ~ "]/last-fmgc-page", "STATUS"); setprop("MCDU[" ~ i ~ "]/page", "MCDU"); setprop("MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM"); + setprop("MCDU[" ~ i ~ "]/scratchpad-color", "wht"); setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); setprop("FMGC/keyboard-left", 0); @@ -43,6 +44,7 @@ var MCDU_reset = func(i) { #RADNAV setprop("FMGC/internal/ils1freq-set", 0); setprop("FMGC/internal/ils1crs-set", 0); + setprop("FMGC/internal/ils1freq-calculated", 0); setprop("FMGC/internal/vor1freq-set", 0); setprop("FMGC/internal/vor1crs-set", 0); setprop("FMGC/internal/vor2freq-set", 0); @@ -57,7 +59,7 @@ var MCDU_reset = func(i) { setprop("FMGC/internal/arr-arpt", ""); setprop("FMGC/internal/tofrom-set", 0); setprop("FMGC/internal/alt-airport", ""); - setprop("FMGC/internal/tofrom-set", 0); + setprop("FMGC/internal/alt-set", 0); setprop("FMGC/internal/cost-index", "0"); setprop("FMGC/internal/cost-index-set", 0); setprop("FMGC/internal/cruise-ft", 10000); @@ -65,10 +67,22 @@ var MCDU_reset = func(i) { setprop("FMGC/internal/cruise-lvl-set", 0); setprop("FMGC/internal/tropo", 36090); setprop("FMGC/internal/tropo-set", 0); - setprop("FMGC/internal/cruise-temp", -999); + setprop("FMGC/internal/cruise-temp", 15); + setprop("FMGC/internal/cruise-temp-set", 0); # IRSINIT setprop("FMGC/internal/align-set", 0); + setprop("FMGC/internal/align-ref-lat-degrees", 0); + setprop("FMGC/internal/align-ref-lat-minutes", 0); + setprop("FMGC/internal/align-ref-lat-sign", ""); + setprop("FMGC/internal/align-ref-long-degrees", 0); + setprop("FMGC/internal/align-ref-long-minutes", 0); + setprop("FMGC/internal/align-ref-long-sign", ""); + setprop("FMGC/internal/align-ref-lat-edit", 0); + setprop("FMGC/internal/align-ref-long-edit", 0); + setprop("FMGC/internal/align1-done", 0); + setprop("FMGC/internal/align2-done", 0); + setprop("FMGC/internal/align3-done", 0); # ROUTE SELECTION setprop("FMGC/internal/alt-selected", 0); @@ -88,11 +102,12 @@ var MCDU_reset = func(i) { setprop("FMGC/internal/alt-fuel", 0); setprop("FMGC/internal/alt-time", "0000"); setprop("FMGC/internal/final-fuel", 0); - setprop("FMGC/internal/final-time", "0000"); + setprop("FMGC/internal/final-time", "0030"); setprop("FMGC/internal/min-dest-fob", 0); setprop("FMGC/internal/tow", 0); setprop("FMGC/internal/lw", 0); setprop("FMGC/internal/trip-wind", "HD000"); + setprop("FMGC/internal/fffq-sensor", "FF+FQ"); setprop("FMGC/internal/extra-fuel", 0); setprop("FMGC/internal/extra-time", "0000"); @@ -119,7 +134,7 @@ var MCDU_reset = func(i) { setprop("FMGC/internal/v2", 0); setprop("FMGC/internal/v2-set", 0); - setprop("FMGC/internal/reduc-agl-ft", "1500"); #eventually set to 1500 above runway + setprop("FMGC/internal/accel-agl-ft", "1500"); #eventually set to 1500 above runway setprop("MCDUC/thracc-set", 0); setprop("FMGC/internal/to-flap", 0); setprop("FMGC/internal/to-ths", "0.0"); @@ -145,8 +160,10 @@ var MCDU_reset = func(i) { setprop("FMGC/internal/dest-wind", -1); setprop("FMGC/internal/vapp-speed-set", 0); setprop("FMGC/internal/final", ""); - setprop("FMGC/internal/mda", -1); - setprop("FMGC/internal/dh", -1); + setprop("FMGC/internal/baro", 99999); + setprop("FMGC/internal/radio", 99999); + setprop("FMGC/internal/radio-no", 0); + setprop("FMGC/internal/ldg-elev", 0); setprop("FMGC/internal/ldg-config-3-set", 0); setprop("FMGC/internal/ldg-config-f-set", 1); @@ -180,6 +197,8 @@ var lskbutton = func(btn, i) { setprop("MCDU[" ~ i ~ "]/scratchpad", ""); setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); } + } else if (getprop("MCDU[" ~ i ~ "]/page") == "IRSINIT") { + initInputIRS("L1",i); } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") { initInputB("L1",i); } else if (getprop("MCDU[" ~ i ~ "]/page") == "PROGTO") { @@ -412,6 +431,8 @@ var rskbutton = func(btn, i) { if (btn == "1") { if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") { initInputA("R1",i); + } else if (getprop("MCDU[" ~ i ~ "]/page") == "IRSINIT") { + initInputIRS("R1",i); } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") { initInputB("R1",i); } else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") { @@ -487,7 +508,9 @@ var rskbutton = func(btn, i) { notAllowed(i); } } else if (btn == "4") { - if (getprop("MCDU[" ~ i ~ "]/page") == "PERFTO") { + if (getprop("MCDU[" ~ i ~ "]/page") == "FUELPRED") { + fuelPredInput("R4",i); + } else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFTO") { perfTOInput("R4",i); } else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFAPPR") { perfAPPRInput("R4",i); @@ -505,7 +528,9 @@ var rskbutton = func(btn, i) { notAllowed(i); } } else if (btn == "5") { - if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") { + if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") { + initInputA("R5",i); + } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") { initInputB("R5",i); } else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFTO") { perfTOInput("R5",i); @@ -535,6 +560,8 @@ var rskbutton = func(btn, i) { } else { notAllowed(i); } + } else if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") { + initInputA("R6",i); } else if (getprop("MCDU[" ~ i ~ "]/page") == "IRSINIT") { initInputIRS("R6",i); } else if (getprop("MCDU[" ~ i ~ "]/page") == "PERFTO") { @@ -629,6 +656,8 @@ var arrowbutton = func(btn, i) { canvas_mcdu.myArrival[i].scrollUp(); } else if (getprop("MCDU[" ~ i ~ "]/page") == "DIRTO") { canvas_mcdu.myDirTo[i].scrollUp(); + } else if (getprop("MCDU[" ~ i ~ "]/page") == "IRSINIT") { + initInputIRS("up",i); } } else if (btn == "down") { if (getprop("MCDU[" ~ i ~ "]/page") == "F-PLNA" or getprop("MCDU[" ~ i ~ "]/page") == "F-PLNB") { @@ -639,11 +668,14 @@ var arrowbutton = func(btn, i) { canvas_mcdu.myArrival[i].scrollDn(); } else if (getprop("MCDU[" ~ i ~ "]/page") == "DIRTO") { canvas_mcdu.myDirTo[i].scrollDn(); - } + } else if (getprop("MCDU[" ~ i ~ "]/page") == "IRSINIT") { + initInputIRS("down",i); + } } } var pagebutton = func(btn, i) { + setprop("MCDU[" ~ i ~ "]/scratchpad-color", "wht"); if (getprop("MCDU[" ~ i ~ "]/page") != "MCDU") { if (btn == "radnav") { setprop("MCDU[" ~ i ~ "]/page", "RADNAV"); @@ -670,8 +702,13 @@ var pagebutton = func(btn, i) { setprop("MCDU[" ~ i ~ "]/page", "PERFAPPR"); } else if (getprop("FMGC/status/phase") == 6) { setprop("MCDU[" ~ i ~ "]/page", "PERFGA"); + } else if (getprop("FMGC/status/phase") == 7) { + fmgc.reset_FMGC(); } } else if (btn == "init") { + if (getprop("FMGC/status/phase") == 7) { + fmgc.reset_FMGC(); + } setprop("MCDU[" ~ i ~ "]/page", "INITA"); } else if (btn == "data") { setprop("MCDU[" ~ i ~ "]/page", "DATA"); @@ -849,6 +886,7 @@ var button = func(btn, i) { } } else { if (btn == "CLR") { + setprop("MCDU[" ~ i ~ "]/scratchpad-color", "wht"); var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad"); if (size(scratchpad) == 0) { setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1); @@ -862,7 +900,21 @@ var button = func(btn, i) { } } +var genericMessage = func(i, text, color) { + if (getprop("MCDU[" ~ i ~ "]/scratchpad") != text) { + if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) { + setprop("MCDU[" ~ i ~ "]/last-scratchpad", ""); + } else { + setprop("MCDU[" ~ i ~ "]/last-scratchpad", getprop("MCDU[" ~ i ~ "]/scratchpad")); + } + } + setprop("MCDU[" ~ i ~ "]/scratchpad-color", color); + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1); + setprop("MCDU[" ~ i ~ "]/scratchpad", text); +} + var notAllowed = func(i) { + setprop("MCDU[" ~ i ~ "]/scratchpad-color", "wht"); if (getprop("MCDU[" ~ i ~ "]/scratchpad") != "NOT ALLOWED") { if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) { setprop("MCDU[" ~ i ~ "]/last-scratchpad", ""); @@ -875,6 +927,7 @@ var notAllowed = func(i) { } var formatError = func(i) { + setprop("MCDU[" ~ i ~ "]/scratchpad-color", "wht"); if (getprop("MCDU[" ~ i ~ "]/scratchpad") != "FORMAT ERROR") { if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) { setprop("MCDU[" ~ i ~ "]/last-scratchpad", ""); diff --git a/Nasal/MCDU/PERFAPPR.nas b/Nasal/MCDU/PERFAPPR.nas index 9677c390..e4f7de04 100644 --- a/Nasal/MCDU/PERFAPPR.nas +++ b/Nasal/MCDU/PERFAPPR.nas @@ -1,49 +1,41 @@ # Copyright (c) 2020 Matthew Maring (hayden2000) # APPR PERF -var dest_qnh = props.globals.getNode("FMGC/internal/dest-qnh", 1); -var dest_temp = props.globals.getNode("FMGC/internal/dest-temp", 1); -var dest_mag = props.globals.getNode("FMGC/internal/dest-mag", 1); -var dest_wind = props.globals.getNode("FMGC/internal/dest-wind", 1); -var transAlt = props.globals.getNode("FMGC/internal/trans-alt", 1); -var final = props.globals.getNode("FMGC/internal/final", 1); -var mda = props.globals.getNode("FMGC/internal/mda", 1); -var dh = props.globals.getNode("FMGC/internal/dh", 1); -var ldg_config_3_set = props.globals.getNode("FMGC/internal/ldg-config-3-set", 1); -var ldg_config_f_set = props.globals.getNode("FMGC/internal/ldg-config-f-set", 1); +var ldg_config_3_set = props.globals.getNode("/FMGC/internal/ldg-config-3-set", 1); +var ldg_config_f_set = props.globals.getNode("/FMGC/internal/ldg-config-f-set", 1); var perfAPPRInput = func(key, i) { - var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad"); + var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad"); if (key == "L1") { if (scratchpad == "CLR") { - setprop("FMGC/internal/dest-qnh", -1); - setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); - } else if (num(scratchpad) != nil and (scratchpad >= 25 and scratchpad <= 60) or (scratchpad >= 900 and scratchpad <= 1100)) { + setprop("/FMGC/internal/dest-qnh", -1); + setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); + } else if (num(scratchpad) != nil and (scratchpad >= 28.06 and scratchpad <= 31.01) or (scratchpad >= 745 and scratchpad <= 1050)) { # doesn't support accidental temp input yet - setprop("FMGC/internal/dest-qnh", scratchpad); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + setprop("/FMGC/internal/dest-qnh", scratchpad); + setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); } else { notAllowed(i); } } else if (key == "L2") { if (scratchpad == "CLR") { - setprop("FMGC/internal/dest-temp", -999); - setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); - } else if (num(scratchpad) != nil and scratchpad >= -100 and scratchpad < 100) { - setprop("FMGC/internal/dest-temp", scratchpad); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + setprop("/FMGC/internal/dest-temp", -999); + setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); + } else if (num(scratchpad) != nil and scratchpad >= -99 and scratchpad < 99) { + setprop("/FMGC/internal/dest-temp", scratchpad); + setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); } else { notAllowed(i); } } else if (key == "L3") { var tfs = size(scratchpad); if (scratchpad == "CLR") { - setprop("FMGC/internal/dest-mag", -1); - setprop("FMGC/internal/dest-wind", -1); - setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + setprop("/FMGC/internal/dest-mag", -1); + setprop("/FMGC/internal/dest-wind", -1); + setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); } else if (tfs >= 3 and tfs <= 7 and find("/", scratchpad) != -1) { var weather = split("/", scratchpad); var mag = int(weather[0]); @@ -51,10 +43,10 @@ var perfAPPRInput = func(key, i) { var wind = int(weather[1]); var winds = size(weather[1]); if (mags >= 1 and mags <= 3 and winds >= 1 and winds <= 3) { - if (mag != nil and wind != nil and mag >= 1 and mag <= 360 and wind >= 0 and wind <= 100) { - setprop("FMGC/internal/dest-mag", weather[0]); - setprop("FMGC/internal/dest-wind", weather[1]); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + if (mag != nil and wind != nil and mag >= 0 and mag <= 360 and wind >= 0 and wind <= 200) { + setprop("/FMGC/internal/dest-mag", weather[0]); + setprop("/FMGC/internal/dest-wind", weather[1]); + setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); fmgc.updateARPT(); } else { notAllowed(i); @@ -67,45 +59,77 @@ var perfAPPRInput = func(key, i) { } } else if (key == "L4") { if (scratchpad == "CLR") { - setprop("FMGC/internal/trans-alt", 18000); - setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + setprop("/FMGC/internal/trans-alt", 18000); + setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); } else if (int(scratchpad) != nil and scratchpad >= 0 and scratchpad <= 50000) { - setprop("FMGC/internal/trans-alt", scratchpad); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + setprop("/FMGC/internal/trans-alt", scratchpad); + setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); } else { notAllowed(i); } } else if (key == "L5") { if (scratchpad == "CLR") { - setprop("FMGC/internal/vapp-speed-set", 0); - setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + setprop("/FMGC/internal/vapp-speed-set", 0); + setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); } else if (int(scratchpad) != nil and scratchpad >= 0 and scratchpad <= 200) { - setprop("FMGC/internal/vapp-speed-set", 1); - setprop("FMGC/internal/computed-speeds/vapp_appr", scratchpad); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + setprop("/FMGC/internal/vapp-speed-set", 1); + setprop("/FMGC/internal/computed-speeds/vapp_appr", scratchpad); + setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); } else { notAllowed(i); } } else if (key == "L6") { - setprop("MCDU[" ~ i ~ "]/page", "PERFDES"); + setprop("/MCDU[" ~ i ~ "]/page", "PERFDES"); + } else if (key == "R2") { + if (scratchpad == "CLR") { + setprop("/FMGC/internal/baro", 99999); + setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); + } else if (int(scratchpad) != nil and scratchpad >= getprop("/FMGC/internal/ldg-elev") and scratchpad <= 5000 + getprop("/FMGC/internal/ldg-elev")) { + if (getprop("/FMGC/internal/radio-no") == 0) { + setprop("/FMGC/internal/radio", 99999); + } + setprop("/FMGC/internal/baro", scratchpad); + setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); + } else { + notAllowed(i); + } + } else if (key == "R3") { + if (scratchpad == "CLR") { + setprop("/FMGC/internal/radio", 99999); + setprop("/FMGC/internal/radio-no", 0); + setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); + } else if (scratchpad == "NO") { + setprop("/FMGC/internal/radio", 99999); + setprop("/FMGC/internal/radio-no", 1); + setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); + } else if (int(scratchpad) != nil and scratchpad >= 0 and scratchpad <= 700) { + setprop("/FMGC/internal/baro", 99999); + setprop("/FMGC/internal/radio-no", 0); + setprop("/FMGC/internal/radio", scratchpad); + setprop("/MCDU[" ~ i ~ "]/scratchpad", ""); + } else { + notAllowed(i); + } } else if (key == "R4") { if (scratchpad == "" and ldg_config_f_set.getValue() == 1 and ldg_config_3_set.getValue() == 0) { - setprop("FMGC/internal/ldg-config-3-set", 1); - setprop("FMGC/internal/ldg-config-f-set", 0); + setprop("/FMGC/internal/ldg-config-3-set", 1); + setprop("/FMGC/internal/ldg-config-f-set", 0); } else { notAllowed(i); } } else if (key == "R5") { if (scratchpad == "" and ldg_config_3_set.getValue() == 1 and ldg_config_f_set.getValue() == 0) { - setprop("FMGC/internal/ldg-config-3-set", 0); - setprop("FMGC/internal/ldg-config-f-set", 1); + setprop("/FMGC/internal/ldg-config-3-set", 0); + setprop("/FMGC/internal/ldg-config-f-set", 1); } else { notAllowed(i); } } else if (key == "R6") { - setprop("MCDU[" ~ i ~ "]/page", "PERFGA"); + setprop("/MCDU[" ~ i ~ "]/page", "PERFGA"); } } \ No newline at end of file diff --git a/Nasal/MCDU/PERFGA.nas b/Nasal/MCDU/PERFGA.nas index 6409965b..7eb46403 100644 --- a/Nasal/MCDU/PERFGA.nas +++ b/Nasal/MCDU/PERFGA.nas @@ -7,7 +7,7 @@ var perfGAInput = func(key, i) { if (key == "L5") { if (scratchpad == "CLR") { setprop("systems/thrust/clbreduc-ft", "1500"); - setprop("FMGC/internal/reduc-agl-ft", "1500"); + setprop("FMGC/internal/accel-agl-ft", "1500"); setprop("MCDUC/thracc-set", 0); setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); @@ -19,7 +19,7 @@ var perfGAInput = func(key, i) { var acc = size(thracc[1]); if (int(thrred) != nil and int(acc) != nil and (thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5)) { setprop("systems/thrust/clbreduc-ft", thracc[0]); - setprop("FMGC/internal/reduc-agl-ft", thracc[1]); + setprop("FMGC/internal/accel-agl-ft", thracc[1]); setprop("MCDUC/thracc-set", 1); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index e7c6e8d3..14732c8c 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -14,7 +14,7 @@ var perfTOInput = func(key, i) { } else { var tfs = size(scratchpad); if (tfs == 3) { - if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 200) { + if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 350) { setprop("FMGC/internal/v1", scratchpad); setprop("FMGC/internal/v1-set", 1); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); @@ -34,7 +34,7 @@ var perfTOInput = func(key, i) { } else { var tfs = size(scratchpad); if (tfs == 3) { - if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 200) { + if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 350) { setprop("FMGC/internal/vr", scratchpad); setprop("FMGC/internal/vr-set", 1); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); @@ -55,7 +55,7 @@ var perfTOInput = func(key, i) { } else { var tfs = size(scratchpad); if (tfs == 3) { - if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 200) { + if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 350) { setprop("FMGC/internal/v2", scratchpad); setprop("FMGC/internal/v2-set", 1); setprop("it-autoflight/settings/togaspd", scratchpad); @@ -70,16 +70,13 @@ var perfTOInput = func(key, i) { } else if (key == "L4") { if (scratchpad == "CLR") { setprop("FMGC/internal/trans-alt", 18000); + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { var tfs = size(scratchpad); - if (tfs == 4 or tfs == 5) { - if (int(scratchpad) != nil and scratchpad >= 1000 and scratchpad <= 18000) { - setprop("FMGC/internal/trans-alt", scratchpad); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); - } else { - notAllowed(i); - } + if (int(scratchpad) != nil and (tfs == 4 or tfs <= 5) and scratchpad >= 1000 and scratchpad <= 39000) { + setprop("FMGC/internal/trans-alt", int(scratchpad / 10) * 10); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { notAllowed(i); } @@ -87,24 +84,32 @@ var perfTOInput = func(key, i) { } else if (key == "L5") { if (scratchpad == "CLR") { setprop("systems/thrust/clbreduc-ft", "1500"); - setprop("FMGC/internal/reduc-agl-ft", "1500"); + setprop("FMGC/internal/accel-agl-ft", "1500"); setprop("MCDUC/thracc-set", 0); setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { var tfs = size(scratchpad); - if (tfs >= 7 and tfs <= 9 and find("/", scratchpad) != -1) { + if (find("/", scratchpad) != -1) { var thracc = split("/", scratchpad); - var thrred = size(thracc[0]); - var acc = size(thracc[1]); - if (int(thrred) != nil and int(acc) != nil and (thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5)) { - setprop("systems/thrust/clbreduc-ft", thracc[0]); - setprop("FMGC/internal/reduc-agl-ft", thracc[1]); + var thrred = thracc[0]; + var thrreds = size(thrred); + var acc = thracc[1]; + var accs = size(acc); + if (int(thrred) != nil and (thrreds == 4 or thrreds == 5) and thrred >= 1000 and thrred <= 39000 and int(acc) != nil and (accs == 4 or accs == 5) and acc >= 1000 and acc <= 39000) { + setprop("systems/thrust/clbreduc-ft", int(thrred / 10) * 10); + setprop("FMGC/internal/accel-agl-ft", int(acc / 10) * 10); setprop("MCDUC/thracc-set", 1); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else if (thrreds == 0 and int(acc) != nil and (accs == 4 or accs == 5) and acc >= 1000 and acc <= 39000) { + setprop("FMGC/internal/accel-agl-ft", int(acc / 10) * 10); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { notAllowed(i); } + } else if (num(scratchpad) != nil and (tfs == 4 or tfs == 5) and scratchpad >= 1000 and scratchpad <= 39000) { + setprop("systems/thrust/clbreduc-ft", int(scratchpad / 10) * 10); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { notAllowed(i); } @@ -117,39 +122,65 @@ var perfTOInput = func(key, i) { setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { - var tfs = size(scratchpad); - if (tfs == 7 and find("/UP", scratchpad) != -1) { - var flapths = split("/UP", scratchpad); - var flap = int(flapths[0]); - var trim = num(flapths[1]); - if (flap != nil and trim != nil and (flap >= 1 and flap <= 4) and (trim >= 0.0 and trim <= 2.5)) { - setprop("FMGC/internal/to-flap", flap); - setprop("FMGC/internal/to-ths", trim); - setprop("FMGC/internal/flap-ths-set", 1); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + if (find("/", scratchpad) != -1) { + var flapths = split("/", scratchpad); + var flap = flapths[0]; + var flaps = size(flap); + var trim = flapths[1]; + var trims = size(trim); + var trima = substr(trim, 2); + var trimb = substr(trim, 0, 3); + var validtrima = num(trima) != nil and num(trima) >= 0 and num(trima) <= 7.0; + var validtrimb = num(trimb) != nil and num(trimb) >= 0 and num(trimb) <= 7.0; + if (flaps == 0 and getprop("FMGC/internal/flap-ths-set")) { + if (trims == 5 and find("DN", trim) != -1 and validtrima) { + setprop("FMGC/internal/to-ths", -1 * trima); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else if (trims == 5 and find("DN", trim) != -1 and validtrimb) { + setprop("FMGC/internal/to-ths", -1 * trimb); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else if (trims == 5 and find("UP", trim) != -1 and validtrima) { + setprop("FMGC/internal/to-ths", trima); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else if (trims == 5 and find("UP", trim) != -1 and validtrimb) { + setprop("FMGC/internal/to-ths", trimb); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else { + notAllowed(i); + } + } else if (flaps == 1 and num(flap) != nil and flap >= 0 and flap <= 3) { + if (trims == 5 and find("DN", trim) != -1 and validtrima) { + setprop("FMGC/internal/to-flap", flap); + setprop("FMGC/internal/to-ths", -1 * trima); + setprop("FMGC/internal/flap-ths-set", 1); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else if (trims == 5 and find("DN", trim) != -1 and validtrimb) { + setprop("FMGC/internal/to-flap", flap); + setprop("FMGC/internal/to-ths", -1 * trimb); + setprop("FMGC/internal/flap-ths-set", 1); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else if (trims == 5 and find("UP", trim) != -1 and validtrima) { + setprop("FMGC/internal/to-flap", flap); + setprop("FMGC/internal/to-ths", trima); + setprop("FMGC/internal/flap-ths-set", 1); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else if (trims == 5 and find("UP", trim) != -1 and validtrimb) { + setprop("FMGC/internal/to-flap", flap); + setprop("FMGC/internal/to-ths", trimb); + setprop("FMGC/internal/flap-ths-set", 1); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + } else { + notAllowed(i); + } } else { notAllowed(i); } - } else if (tfs == 7 and find("/DN", scratchpad) != -1) { - var flapths = split("/DN", scratchpad); - var flap = int(flapths[0]); - var trim = num(flapths[1]); - if (flap != nil and trim != nil and (flap >= 1 and flap <= 4) and (trim > 0 and trim <= 2.5)) { - setprop("FMGC/internal/to-flap", flap); - setprop("FMGC/internal/to-ths", -1 * trim); + } else if (size(scratchpad) == 1 and num(scratchpad) != nil and scratchpad >= 0 and scratchpad <= 3) { + setprop("FMGC/internal/to-flap", scratchpad); + if (!getprop("FMGC/internal/flap-ths-set")) { setprop("FMGC/internal/flap-ths-set", 1); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); - } else { - notAllowed(i); - } - } else if (tfs == 1) { - if (int(scratchpad) != nil and scratchpad >= 1 and scratchpad <= 4) { - setprop("FMGC/internal/to-flap", scratchpad); - setprop("FMGC/internal/flap-ths-set", 1); - setprop("MCDU[" ~ i ~ "]/scratchpad", ""); - } else { - notAllowed(i); } + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { notAllowed(i); } @@ -163,7 +194,7 @@ var perfTOInput = func(key, i) { } else { var tfs = size(scratchpad); if (tfs == 1 or tfs == 2) { - if (int(scratchpad) != nil and scratchpad >= 0 and scratchpad <= 70) { + if (int(scratchpad) != nil and scratchpad >= 0 and scratchpad <= 99) { setprop("FMGC/internal/flex", scratchpad); setprop("FMGC/internal/flex-set", 1); var flex_calc = getprop("FMGC/internal/flex") - getprop("environment/temperature-degc"); @@ -184,7 +215,7 @@ var perfTOInput = func(key, i) { setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else { var tfs = size(scratchpad); - if (int(scratchpad) != nil and tfs >= 3 and tfs <= 5) { + if (int(scratchpad) != nil and (tfs == 4 or tfs == 5) and scratchpad >= 1000 and scratchpad <= 39000) { setprop("FMGC/internal/eng-out-reduc", scratchpad); setprop("MCDUC/reducacc-set", 1); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); diff --git a/Nasal/MCDU/PROGCLB.nas b/Nasal/MCDU/PROGCLB.nas index 0ba1c032..ff335d5a 100644 --- a/Nasal/MCDU/PROGCLB.nas +++ b/Nasal/MCDU/PROGCLB.nas @@ -11,6 +11,8 @@ var progCLBInput = func(key, i) { setprop("FMGC/internal/activate-twice", 0); setprop("FMGC/internal/decel", 0); } + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else if (int(scratchpad) != nil) { var crzs = size(scratchpad); if (crzs >= 1 and crzs <= 3 and scratchpad > 0 and scratchpad <= 430 and altSet.getValue() <= scratchpad * 100) { diff --git a/Nasal/MCDU/PROGCRZ.nas b/Nasal/MCDU/PROGCRZ.nas index f99c371d..0ac13b0d 100644 --- a/Nasal/MCDU/PROGCRZ.nas +++ b/Nasal/MCDU/PROGCRZ.nas @@ -11,6 +11,8 @@ var progCRZInput = func(key, i) { setprop("FMGC/internal/activate-twice", 0); setprop("FMGC/internal/decel", 0); } + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else if (int(scratchpad) != nil) { var crzs = size(scratchpad); if (crzs >= 1 and crzs <= 3 and scratchpad > 0 and scratchpad <= 430 and altSet.getValue() <= scratchpad * 100) { diff --git a/Nasal/MCDU/PROGDES.nas b/Nasal/MCDU/PROGDES.nas index 6af9365c..d13a647d 100644 --- a/Nasal/MCDU/PROGDES.nas +++ b/Nasal/MCDU/PROGDES.nas @@ -11,12 +11,14 @@ var progDESInput = func(key, i) { setprop("FMGC/internal/activate-twice", 0); setprop("FMGC/internal/decel", 0); } + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else if (int(scratchpad) != nil) { var crzs = size(scratchpad); if (crzs >= 1 and crzs <= 3 and scratchpad > 0 and scratchpad <= 430 and altSet.getValue() <= scratchpad * 100) { setprop("FMGC/internal/cruise-fl-prog", scratchpad); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); - if (getprop("FMGC/status/phase") == 5 or getprop("FMGC/status/phase") == 6) { + if (getprop("FMGC/status/phase") == 4 or getprop("FMGC/status/phase") == 5 or getprop("FMGC/status/phase") == 6) { setprop("FMGC/status/phase", 3); setprop("FMGC/internal/activate-once", 0); setprop("FMGC/internal/activate-twice", 0); diff --git a/Nasal/MCDU/PROGTO.nas b/Nasal/MCDU/PROGTO.nas index f02a474e..1922a39d 100644 --- a/Nasal/MCDU/PROGTO.nas +++ b/Nasal/MCDU/PROGTO.nas @@ -7,6 +7,8 @@ var progTOInput = func(key, i) { if (key == "L1") { if (scratchpad == "CLR") { setprop("FMGC/internal/cruise-fl-prog", getprop("FMGC/internal/cruise-fl")); + setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0); + setprop("MCDU[" ~ i ~ "]/scratchpad", ""); } else if (int(scratchpad) != nil) { var crzs = size(scratchpad); if (crzs >= 1 and crzs <= 3 and scratchpad > 0 and scratchpad <= 430 and altSet.getValue() <= scratchpad * 100 and getprop("FMGC/internal/cruise-lvl-set")) { diff --git a/Nasal/MCDU/RADNAV.nas b/Nasal/MCDU/RADNAV.nas index 477e97a5..ace8f23f 100644 --- a/Nasal/MCDU/RADNAV.nas +++ b/Nasal/MCDU/RADNAV.nas @@ -69,6 +69,9 @@ var radnavInput = func(key, i) { setprop("instrumentation/nav[0]/frequencies/selected-mhz", scratchpad); setprop("FMGC/internal/ils1freq-set", 1); setprop("MCDU[" ~ i ~ "]/scratchpad", ""); + if (num(getprop("FMGC/internal/ils1freq-calculated")) != 0 and num(getprop("FMGC/internal/ils1freq-calculated")) != num(getprop("instrumentation/nav[0]/frequencies/selected-mhz"))) { + genericMessage(i, "RWY/LS MISMATCH", "amb"); + } } else { notAllowed(i); } diff --git a/Nasal/Sim/libraries.nas b/Nasal/Sim/libraries.nas index dd275063..7c4c0b8f 100644 --- a/Nasal/Sim/libraries.nas +++ b/Nasal/Sim/libraries.nas @@ -3,9 +3,9 @@ # Copyright (c) 2020 Josh Davidson (Octal450) -print("-----------------------------------------------------------------------------"); -print("Copyright (c) 2016-2019 Joshua Davidson (Octal450)"); -print("-----------------------------------------------------------------------------"); +print("--------------------------------------------------"); +print("Copyright (c) 2016-2020 Joshua Davidson (Octal450)"); +print("--------------------------------------------------"); setprop("sim/replay/was-active", 0); diff --git a/Sounds/A320-common-sound.xml b/Sounds/A320-common-sound.xml index 0c6bfd06..d9d11ba8 100644 --- a/Sounds/A320-common-sound.xml +++ b/Sounds/A320-common-sound.xml @@ -169,6 +169,14 @@ /instrumentation/mk-viii/inputs/discretes/gpws-inhibit 0 + + /instrumentation/pfd/minimums-no-gpws-alt + 2500 + + + /instrumentation/pfd/minimums-no-gpws-alt + 2400 + /position/gear-agl-ft 2500 @@ -203,6 +211,14 @@ /instrumentation/mk-viii/inputs/discretes/gpws-inhibit 0 + + /instrumentation/pfd/minimums-no-gpws-alt + 2000 + + + /instrumentation/pfd/minimums-no-gpws-alt + 1900 + /position/gear-agl-ft 2000 @@ -237,6 +253,14 @@ /instrumentation/mk-viii/inputs/discretes/gpws-inhibit 0 + + /instrumentation/pfd/minimums-no-gpws-alt + 1000 + + + /instrumentation/pfd/minimums-no-gpws-alt + 900 + /position/gear-agl-ft 1000 @@ -271,6 +295,14 @@ /instrumentation/mk-viii/inputs/discretes/gpws-inhibit 0 + + /instrumentation/pfd/minimums-no-gpws-alt + 500 + + + /instrumentation/pfd/minimums-no-gpws-alt + 400 + /position/gear-agl-ft 500 @@ -305,6 +337,14 @@ /instrumentation/mk-viii/inputs/discretes/gpws-inhibit 0 + + /instrumentation/pfd/minimums-no-gpws-alt + 400 + + + /instrumentation/pfd/minimums-no-gpws-alt + 300 + /position/gear-agl-ft 400 @@ -339,6 +379,14 @@ /instrumentation/mk-viii/inputs/discretes/gpws-inhibit 0 + + /instrumentation/pfd/minimums-no-gpws-alt + 300 + + + /instrumentation/pfd/minimums-no-gpws-alt + 200 + /position/gear-agl-ft 300 @@ -373,6 +421,14 @@ /instrumentation/mk-viii/inputs/discretes/gpws-inhibit 0 + + /instrumentation/pfd/minimums-no-gpws-alt + 200 + + + /instrumentation/pfd/minimums-no-gpws-alt + 100 + /position/gear-agl-ft 200 @@ -407,6 +463,14 @@ /instrumentation/mk-viii/inputs/discretes/gpws-inhibit 0 + + /instrumentation/pfd/minimums-no-gpws-alt + 100 + + + /instrumentation/pfd/minimums-no-gpws-alt + 0 + /position/gear-agl-ft 100 @@ -441,6 +505,10 @@ /instrumentation/mk-viii/inputs/discretes/gpws-inhibit 0 + + /instrumentation/pfd/minimums-no-gpws-alt + 50 + /position/gear-agl-ft 50 @@ -475,6 +543,10 @@ /instrumentation/mk-viii/inputs/discretes/gpws-inhibit 0 + + /instrumentation/pfd/minimums-no-gpws-alt + 40 + /position/gear-agl-ft 40 @@ -509,6 +581,10 @@ /instrumentation/mk-viii/inputs/discretes/gpws-inhibit 0 + + /instrumentation/pfd/minimums-no-gpws-alt + 30 + /position/gear-agl-ft 30 @@ -543,6 +619,10 @@ /instrumentation/mk-viii/inputs/discretes/gpws-inhibit 0 + + /instrumentation/pfd/minimums-no-gpws-alt + 20 + /position/gear-agl-ft 20 @@ -581,6 +661,10 @@ /controls/flight/flaps 0.640 + + /instrumentation/pfd/minimums-no-gpws-alt + 10 + /position/gear-agl-ft 10 @@ -629,6 +713,10 @@ /controls/flight/flaps 0.640 + + /instrumentation/pfd/minimums-no-gpws-alt + 5 + /position/gear-agl-ft 5 @@ -661,7 +749,6 @@ 20.0 100.0 - 100above Aircraft/A320-family/Sounds/GPWS/100-above.wav @@ -672,13 +759,13 @@ /instrumentation/mk-viii/inputs/discretes/gpws-inhibit 0 - - /position/gear-agl-ft - 350 + + /instrumentation/pfd/minimums-ref-alt + /instrumentation/pfd/minimums-plus-100 - /position/gear-agl-ft - 300 + /instrumentation/pfd/minimums-ref-alt + /instrumentation/pfd/minimums-plus-50 /position/gear-agl-ft-2-sec @@ -707,12 +794,12 @@ 0 - /position/gear-agl-ft - 250 + /instrumentation/pfd/minimums-ref-alt + /instrumentation/pfd/minimums - /position/gear-agl-ft - 200 + /instrumentation/pfd/minimums-ref-alt + /instrumentation/pfd/minimums-minus-50 /position/gear-agl-ft-2-sec diff --git a/Systems/libraries.xml b/Systems/libraries.xml index b83459ce..8acf59b5 100644 --- a/Systems/libraries.xml +++ b/Systems/libraries.xml @@ -1212,4 +1212,145 @@ /instrumentation/ddrmi/flag-2 0.64 + + + + Minimums Selector + gain + 1.0 + 0.1 + + + + /FMGC/internal/baro + 99999 + + + /instrumentation/altimeter/indicated-altitude-ft + + /position/gear-agl-ft + /instrumentation/pfd/minimums-ref-alt + + + + Minimums Selector + gain + 1.0 + 0.1 + + + + /FMGC/internal/radio + 99999 + + + /FMGC/internal/radio + + + + + /FMGC/internal/baro + 99999 + + + + + + +
+ + + /position/gear-agl-ft + /instrumentation/altimeter/indicated-altitude-ft + + /FMGC/internal/baro + + 25 +
+ 0.5 +
+
+ 25 +
+
+ + 99999 + /instrumentation/pfd/minimums-no-gpws-alt +
+ + + Minimums Selector + gain + 1.0 + 0.1 + + + + /FMGC/internal/radio + 99999 + + + /FMGC/internal/radio + + + + + /FMGC/internal/baro + 99999 + + + /FMGC/internal/baro + + 99999 + /instrumentation/pfd/minimums + + + + Minimums Minus 50 + gain + 1.0 + 0.1 + + + + /instrumentation/pfd/minimums + 50 + + + + /instrumentation/pfd/minimums-minus-50 + + + + Minimums Plus 50 + gain + 1.0 + 0.1 + + + + /instrumentation/pfd/minimums + 50 + + + + /instrumentation/pfd/minimums-plus-50 + + + + Minimums Plus 100 + gain + 1.0 + 0.1 + + + + /instrumentation/pfd/minimums + 100 + + + + /instrumentation/pfd/minimums-plus-100 + + diff --git a/Systems/pfd.xml b/Systems/pfd.xml index 4b84e143..a11265d7 100644 --- a/Systems/pfd.xml +++ b/Systems/pfd.xml @@ -141,6 +141,34 @@ /instrumentation/pfd/alt-diff + + Ground bug diff + gain + 0.05 + 1.0 + + /position/ground-elev-ft + + + /instrumentation/altimeter/indicated-altitude-ft + + /instrumentation/pfd/ground-diff + + + + Destination bug diff + gain + 0.05 + 1.0 + + /FMGC/internal/ldg-elev + + + /instrumentation/altimeter/indicated-altitude-ft + + /instrumentation/pfd/landing-diff + + Localizer course diff gain diff --git a/gui/dialogs/mcdu1-dlg.xml b/gui/dialogs/mcdu1-dlg.xml index c998816f..e8d44a08 100644 --- a/gui/dialogs/mcdu1-dlg.xml +++ b/gui/dialogs/mcdu1-dlg.xml @@ -17,6 +17,18 @@ left +