diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index 0682ea1e..d040c2d1 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -5601,6 +5601,22 @@ + + + pick + metric_alt + + + false + + nasal + + + + @@ -7701,19 +7717,15 @@ vs.ind fpa.ind fpa.ind.001 - atc-code - atc-test fpa-text qnh-inhg qnh-hpa qnh-std qnh-test - rudder-trim - rudder-trim-letter - 0.75 - 0.30 - 0.0 + 1.00 + 0.515 + 0.00 controls/lighting/fcu-digit-norm @@ -7727,9 +7739,9 @@ 0 - 0.75 - 0.30 - 0.0 + 1.00 + 0.515 + 0.00 controls/lighting/fcu-digit-norm @@ -7738,10 +7750,12 @@ material rudder-trim rudder-trim-letter + atc-code + atc-test - 0.75 - 0.30 - 0.0 + 1.00 + 0.355 + 0.00 0 @@ -7754,9 +7768,9 @@ 0 - 0.75 - 0.30 - 0.0 + 1.00 + 0.355 + 0.00 @@ -9180,9 +9194,9 @@ dme1 - 0.89 - 0.37 - 0.08 + 1.00 + 0.355 + 0.00 0 @@ -9195,9 +9209,9 @@ 0 - 0.89 - 0.37 - 0.08 + 1.00 + 0.355 + 0.00 diff --git a/Models/FlightDeck/res/fcu.png b/Models/FlightDeck/res/fcu.png index 12c2f466..24a71eb7 100644 Binary files a/Models/FlightDeck/res/fcu.png and b/Models/FlightDeck/res/fcu.png differ diff --git a/Models/FlightDeck/res/fcu2.png b/Models/FlightDeck/res/fcu2.png index 87efcbcb..5b4e39d6 100644 Binary files a/Models/FlightDeck/res/fcu2.png and b/Models/FlightDeck/res/fcu2.png differ diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index 46f6af22..46fbdc6d 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -216,9 +216,9 @@ var canvas_PFD_base = { "FMA_athr_box","FMA_Middle1","FMA_Middle2","ALPHA_MAX","ALPHA_PROT","ALPHA_SW","ALPHA_bars","VLS_min","ASI_max","ASI_scale","ASI_target","ASI_mach","ASI_mach_decimal","ASI_trend_up","ASI_trend_down","ASI_digit_UP","ASI_digit_DN","ASI_decimal_UP", "ASI_decimal_DN","ASI_index","ASI_error","ASI_group","ASI_frame","AI_center","AI_bank","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_neg","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", + "ALT_digit_DN","ALT_digit_UP_metric","ALT_error","ALT_neg","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","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError","vsFMArate","tailstrikeInd"]; + "ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError","vsFMArate","tailstrikeInd","Metric_box","Metric_letter","Metric_cur_alt"]; }, off: 0, on: 0, @@ -349,6 +349,7 @@ var canvas_PFD_base = { PFD_2_mismatch.page.show(); } }, + showMetricAlt: 0, updateCommon: func () { # FMA MAN TOGA MCT FLX THR # Set properties used a lot to a variable to avoid calling getValue() multiple times @@ -1031,7 +1032,6 @@ var canvas_PFD_base = { me["QNH_std"].hide(); me["QNH_box"].hide(); } - }, # Get Angle of Attack from ADR1 or, depending on Switching panel, ADR3 @@ -1694,6 +1694,18 @@ var canvas_PFD_1 = { me["ALT_scale"].show(); me.altitude = dmc.DMController.DMCs[0].outputs[1].getValue(); + + if (me.showMetricAlt) { + me["Metric_box"].show(); + me["Metric_letter"].show(); + me["Metric_cur_alt"].show(); + me["Metric_cur_alt"].setText(sprintf("%5.0f", me.altitude * 0.3048)); + } else { + me["Metric_box"].hide(); + me["Metric_letter"].hide(); + me["Metric_cur_alt"].hide(); + } + me.altOffset = me.altitude / 500 - int(me.altitude / 500); me.middleAltText = roundaboutAlt(me.altitude / 100); me.middleAltOffset = nil; @@ -1721,6 +1733,14 @@ var canvas_PFD_1 = { me["ALT_tens"].setTranslation(0, altTens * 1.392); ap_alt_cur = ap_alt.getValue(); + + if (me.showMetricAlt) { + me["ALT_digit_UP_metric"].show(); + me["ALT_digit_UP_metric"].setText(sprintf("%5.0fM", ap_alt_cur * 0.3048)); + } else { + me["ALT_digit_UP_metric"].hide(); + } + alt_diff_cur = dmc.DMController.DMCs[0].outputs[7].getValue(); if (alt_diff_cur >= -565 and alt_diff_cur <= 565) { me["ALT_target"].setTranslation(0, (alt_diff_cur / 100) * -48.66856); @@ -1830,6 +1850,10 @@ var canvas_PFD_1 = { me["ALT_box_flash"].hide(); me["ALT_box_amber"].hide(); me["ALT_box"].hide(); + me["Metric_box"].hide(); + me["Metric_letter"].hide(); + me["Metric_cur_alt"].hide(); + me["ALT_digit_UP_metric"].hide(); } me.updateCommon(); @@ -2465,6 +2489,18 @@ var canvas_PFD_2 = { me["ALT_scale"].show(); me.altitude = dmc.DMController.DMCs[1].outputs[1].getValue(); + + if (me.showMetricAlt) { + me["Metric_box"].show(); + me["Metric_letter"].show(); + me["Metric_cur_alt"].show(); + me["Metric_cur_alt"].setText(sprintf("%5.0f", me.altitude * 0.3048)); + } else { + me["Metric_box"].hide(); + me["Metric_letter"].hide(); + me["Metric_cur_alt"].hide(); + } + me.altOffset = me.altitude / 500 - int(me.altitude / 500); me.middleAltText = roundaboutAlt(me.altitude / 100); me.middleAltOffset = nil; @@ -2492,6 +2528,14 @@ var canvas_PFD_2 = { me["ALT_tens"].setTranslation(0, altTens * 1.392); ap_alt_cur = ap_alt.getValue(); + + if (me.showMetricAlt) { + me["ALT_digit_UP_metric"].show(); + me["ALT_digit_UP_metric"].setText(sprintf("%5.0fM", ap_alt_cur * 0.3048)); + } else { + me["ALT_digit_UP_metric"].hide(); + } + alt_diff_cur = dmc.DMController.DMCs[1].outputs[7].getValue(); if (alt_diff_cur >= -565 and alt_diff_cur <= 565) { me["ALT_target"].setTranslation(0, (alt_diff_cur / 100) * -48.66856); @@ -2601,6 +2645,10 @@ var canvas_PFD_2 = { me["ALT_box_flash"].hide(); me["ALT_box_amber"].hide(); me["ALT_box"].hide(); + me["Metric_box"].hide(); + me["Metric_letter"].hide(); + me["Metric_cur_alt"].hide(); + me["ALT_digit_UP_metric"].hide(); } me.updateCommon(); diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg index 7eb9c07a..28c3d817 100644 --- a/Models/Instruments/PFD/res/pfd.svg +++ b/Models/Instruments/PFD/res/pfd.svg @@ -41,9 +41,9 @@ inkscape:window-maximized="1" inkscape:window-y="-8" inkscape:window-x="-8" - inkscape:cy="876.13786" - inkscape:cx="522.86542" - inkscape:zoom="5.6568542" + inkscape:cy="1074.3176" + inkscape:cx="955.3885" + inkscape:zoom="2" showgrid="true" id="namedview371" inkscape:window-height="705" @@ -2269,11 +2269,11 @@ id="QNH_setting" y="885.26117" x="907.61713" - 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:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.75" + 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:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.75;stroke-opacity:1;" xml:space="preserve" transform="scale(1.0000144,0.9999856)" inkscape:label="#text979">-800 + + 11070 + M + 10000M diff --git a/Models/Instruments/Radio/Radio1.xml b/Models/Instruments/Radio/Radio1.xml index 2bd06244..a02a2e68 100644 --- a/Models/Instruments/Radio/Radio1.xml +++ b/Models/Instruments/Radio/Radio1.xml @@ -2176,9 +2176,9 @@ rmp-standby rmp-standby-test - 0.89 - 0.37 - 0.08 + 1.00 + 0.355 + 0.00 0 @@ -2191,9 +2191,9 @@ 0 - 0.89 - 0.37 - 0.08 + 1.00 + 0.355 + 0.00 diff --git a/Models/Instruments/Radio/Radio2.xml b/Models/Instruments/Radio/Radio2.xml index 2d9d7589..8ef9b533 100644 --- a/Models/Instruments/Radio/Radio2.xml +++ b/Models/Instruments/Radio/Radio2.xml @@ -2176,9 +2176,9 @@ rmp-standby rmp-standby-test - 0.89 - 0.37 - 0.08 + 1.00 + 0.355 + 0.00 0 @@ -2191,9 +2191,9 @@ 0 - 0.89 - 0.37 - 0.08 + 1.00 + 0.355 + 0.00 diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index 527ca0ce..505cb6d9 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -36,6 +36,7 @@ var altAlertInhibit = nil; var alt200 = nil; var alt750 = nil; var bigThree = nil; +var fltCtlLandAsap = 0; var altAlertSteady = 0; var altAlertFlash = 0; @@ -3148,7 +3149,7 @@ var messages_config_memo = func { setprop("/ECAM/to-config-reset", 0); } - if (getprop("/controls/autobrake/mode") == 3) { + if (systems.Autobrake.mode.getValue() == 3) { toMemoLine1.msg = "T.O AUTO BRK MAX"; toMemoLine1.colour = "g"; } else { @@ -3411,14 +3412,20 @@ var messages_right_memo = func { ldg_inhibit.active = 0; } - if ((!pts.Gear.wow[1].getValue()) and (systems.ELEC.EmerElec.getValue() or getprop("/systems/fire/engine1/warning-active") == 1 or getprop("/systems/fire/engine2/warning-active") == 1 or getprop("/systems/fire/apu/warning-active") == 1 or getprop("/systems/failures/fire/cargo-aft-fire") == 1 or getprop("/systems/failures/fire/cargo-fwd-fire") == 1) or (((systems.HYD.Psi.green.getValue() < 1500 and pts.Engines.Engine.state[0].getValue() == 3) and (systems.HYD.Psi.yellow.getValue() < 1500 and pts.Engines.Engine.state[1].getValue() == 3)) or ((systems.HYD.Psi.green.getValue() < 1500 or systems.HYD.Psi.yellow.getValue() < 1500) and pts.Engines.Engine.state[0].getValue() == 3 and pts.Engines.Engine.state[1].getValue() == 3) and phaseVarMemo3 >= 3 and phaseVarMemo3 <= 8)) { - # todo: emer elec + if (!(FWC.Timer.gnd.getValue() == 1) and (systems.ELEC.EmerElec.getValue() or dualFailNode.getValue() == 1 or systems.eng1FireWarn.getValue() == 1 or systems.eng2FireWarn.getValue() == 1 or systems.apuFireWarn.getValue() == 1 or systems.aftCargoFireWarn.getValue() == 1 or systems.fwdCargoFireWarn.getValue() == 1 or (getprop("/ECAM/warnings/hyd/green-abnorm-lo-pr") and getprop("/ECAM/warnings/hyd/yellow-abnorm-lo-pr")) or (getprop("/ECAM/warnings/hyd/green-abnorm-lo-pr") and getprop("/ECAM/warnings/hyd/blue-abnorm-lo-pr")) or (getprop("/ECAM/warnings/hyd/blue-abnorm-lo-pr") and getprop("/ECAM/warnings/hyd/yellow-abnorm-lo-pr")))) { land_asap_r.active = 1; } else { land_asap_r.active = 0; } - if (land_asap_r.active == 0 and !pts.Gear.wow[1].getValue() and ((getprop("/fdm/jsbsim/propulsion/tank[0]/contents-lbs") < 1650 and getprop("/fdm/jsbsim/propulsion/tank[1]/contents-lbs") < 1650) or ((getprop("/systems/electrical/bus/dc-2") < 25 and (getprop("/systems/failures/fctl/elac1") == 1 or getprop("/systems/failures/fctl/sec1") == 1)) or (systems.HYD.Psi.green.getValue() < 1500 and (getprop("/systems/failures/fctl/elac1") == 1 and getprop("/systems/failures/fctl/sec1") == 1)) or (systems.HYD.Psi.yellow.getValue() < 1500 and (getprop("/systems/failures/fctl/elac1") == 1 and getprop("/systems/failures/fctl/sec1") == 1)) or (systems.HYD.Psi.blue.getValue() < 1500 and (getprop("/systems/failures/fctl/elac2") == 1 and getprop("/systems/failures/fctl/sec2") == 1))) or (phaseVarMemo3 >= 3 and phaseVarMemo3 <= 8 and (pts.Engines.Engine.state[0].getValue() != 3 or pts.Engines.Engine.state[1].getValue() != 3)))) { + if ((systems.ELEC.Bus.dc2.getValue() < 25 and (fbw.FBW.Failures.elac1.getValue() == 1 or fbw.FBW.Failures.sec1.getValue() == 1)) or ((systems.HYD.Psi.yellow.getValue() < 1500 or systems.HYD.Psi.green.getValue() < 1500) and (fbw.FBW.Failures.elac1.getValue() == 1 and fbw.FBW.Failures.sec1.getValue() == 1)) or (systems.HYD.Psi.blue.getValue() < 1500 and (fbw.FBW.Failures.elac2.getValue() == 1 and fbw.FBW.Failures.sec2.getValue() == 1))) { + fltCtlLandAsap = 1; + } else { + fltCtlLandAsap = 0; + } + + if (land_asap_r.active == 0 and !(FWC.Timer.gnd.getValue() == 1) and (warningNodes.Timers.lowLevelBoth.getValue() == 1 or warningNodes.Logic.eng1Shutdown.getValue() or warningNodes.Logic.eng2Shutdown.getValue() or warningNodes.Logic.eng1Fail.getValue() or warningNodes.Logic.eng2Fail.getValue() or warningNodes.Timers.dcEmerConfig.getValue() == 1 or fltCtlLandAsap)) { + # todo avionics smoke and reverse unlocked land_asap_a.active = 1; } else { land_asap_a.active = 0; @@ -3496,7 +3503,7 @@ var messages_right_memo = func { nw_strg_disc.colour = "g"; } - if (getprop("/controls/pneumatics/switches/ram-air") == 1) { + if (systems.PNEU.Switch.ramAir.getValue() == 1) { ram_air.active = 1; } else { ram_air.active = 0; @@ -3537,7 +3544,7 @@ var messages_right_memo = func { company_msg.active = 0; } - if (getprop("/controls/ice-protection/leng") == 1 or getprop("/controls/ice-protection/reng") == 1 or getprop("/systems/electrical/bus/dc-1") == 0 or getprop("/systems/electrical/bus/dc-2") == 0) { + if (getprop("/controls/ice-protection/leng") == 1 or getprop("/controls/ice-protection/reng") == 1 or systems.ELEC.Bus.dc1.getValue() < 25 or systems.ELEC.Bus.dc2.getValue() < 25) { eng_aice.active = 1; } else { eng_aice.active = 0; @@ -3549,7 +3556,7 @@ var messages_right_memo = func { wing_aice.active = 0; } - if (getprop("/controls/pneumatics/switches/apu") == 1 and pts.APU.rpm.getValue() >= 95) { + if (systems.PNEU.Switch.apu.getValue() == 1 and pts.APU.rpm.getValue() >= 95) { apu_bleed.active = 1; } else { apu_bleed.active = 0; @@ -3561,43 +3568,43 @@ var messages_right_memo = func { apu_avail.active = 0; } - if (getprop("/controls/lighting/landing-lights[1]") > 0 or getprop("/controls/lighting/landing-lights[2]") > 0) { + if (pts.Controls.Lighting.landingLights[1].getValue() > 0 or pts.Controls.Lighting.landingLights[2].getValue() > 0) { ldg_lt.active = 1; } else { ldg_lt.active = 0; } - if (getprop("/controls/gear/brake-fans") == 1) { + if (systems.BrakeSys.brakeFans.getValue() == 1) { brk_fan.active = 1; } else { brk_fan.active = 0; } - if (getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override") == 1) { # todo: emer elec + if (pts.Instrumentation.MKVII.Inputs.Discretes.flap3Override.getValue() == 1) { # todo: emer elec gpws_flap3.active = 1; } else { gpws_flap3.active = 0; } - if (!getprop("/systems/radio/vhf3-data-mode") and (phaseVarMemo3 == 1 or phaseVarMemo3 == 2 or phaseVarMemo3 == 6 or phaseVarMemo3 == 9 or phaseVarMemo3 == 10)) { + if (!rmp.vhf3_data_mode.getValue() and (phaseVarMemo3 == 1 or phaseVarMemo3 == 2 or phaseVarMemo3 == 6 or phaseVarMemo3 == 9 or phaseVarMemo3 == 10)) { vhf3_voice.active = 1; } else { vhf3_voice.active = 0; } - if (getprop("/controls/autobrake/mode") == 1 and (phaseVarMemo3 == 7 or phaseVarMemo3 == 8)) { + if (systems.Autobrake.mode.getValue() == 1 and (phaseVarMemo3 == 7 or phaseVarMemo3 == 8)) { auto_brk_lo.active = 1; } else { auto_brk_lo.active = 0; } - if (getprop("/controls/autobrake/mode") == 2 and (phaseVarMemo3 == 7 or phaseVarMemo3 == 8)) { + if (systems.Autobrake.mode.getValue() == 2 and (phaseVarMemo3 == 7 or phaseVarMemo3 == 8)) { auto_brk_med.active = 1; } else { auto_brk_med.active = 0; } - if (getprop("/controls/autobrake/mode") == 3 and (phaseVarMemo3 == 7 or phaseVarMemo3 == 8)) { + if (systems.Autobrake.mode.getValue() == 3 and (phaseVarMemo3 == 7 or phaseVarMemo3 == 8)) { auto_brk_max.active = 1; } else { auto_brk_max.active = 0; diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index f82370b6..b2b8fd3d 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -491,6 +491,12 @@ var FCUController = { } } }, + MetricAlt: func() { + if (me.FCUworking) { + canvas_pfd.PFD_1.showMetricAlt = !canvas_pfd.PFD_1.showMetricAlt; + canvas_pfd.PFD_2.showMetricAlt = !canvas_pfd.PFD_2.showMetricAlt; + } + }, }; # Master / slave principle of operation depending on the autopilot / flight director engagement