diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas index 8e4c3fbc..82a4854e 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas @@ -219,7 +219,7 @@ var canvas_lowerECAM_apu = { } if (getprop("/controls/pneumatic/switches/bleedapu") == 1) { - me["APUBleedValve"].setRotation(90*D2R); + me["APUBleedValve"].setRotation(90 * D2R); me["APUBleedOnline"].show(); } else { me["APUBleedValve"].setRotation(0); @@ -243,8 +243,8 @@ var canvas_lowerECAM_apu = { me["APUEGT"].setColor(0.7333,0.3803,0); me["APUEGT"].setText(sprintf("%s", "XX")); } - me["APUN-needle"].setRotation((getprop("/ECAM/Lower/APU-N") + 90)*D2R); - me["APUEGT-needle"].setRotation((getprop("/ECAM/Lower/APU-EGT") + 90)*D2R); + me["APUN-needle"].setRotation((getprop("/ECAM/Lower/APU-N") + 90) * D2R); + me["APUEGT-needle"].setRotation((getprop("/ECAM/Lower/APU-EGT") + 90) * D2R); me.updateBottomStatus(); }, @@ -267,8 +267,8 @@ var canvas_lowerECAM_eng = { me["OilQT1-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[0]/oil-qt-actual"),1)))); me["OilQT2-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[1]/oil-qt-actual"),1)))); - me["OilQT1-needle"].setRotation((getprop("/ECAM/Lower/Oil-QT[0]") + 90)*D2R); - me["OilQT2-needle"].setRotation((getprop("/ECAM/Lower/Oil-QT[1]") + 90)*D2R); + me["OilQT1-needle"].setRotation((getprop("/ECAM/Lower/Oil-QT[0]") + 90) * D2R); + me["OilQT2-needle"].setRotation((getprop("/ECAM/Lower/Oil-QT[1]") + 90) * D2R); # Oil Pressure if (getprop("/engines/engine[0]/oil-psi-actual") >= 20) { @@ -290,8 +290,8 @@ var canvas_lowerECAM_eng = { me["OilPSI1"].setText(sprintf("%s", math.round(getprop("/engines/engine[0]/oil-psi-actual")))); me["OilPSI2"].setText(sprintf("%s", math.round(getprop("/engines/engine[1]/oil-psi-actual")))); - me["OilPSI1-needle"].setRotation((getprop("/ECAM/Lower/Oil-PSI[0]") + 90)*D2R); - me["OilPSI2-needle"].setRotation((getprop("/ECAM/Lower/Oil-PSI[1]") + 90)*D2R); + me["OilPSI1-needle"].setRotation((getprop("/ECAM/Lower/Oil-PSI[0]") + 90) * D2R); + me["OilPSI2-needle"].setRotation((getprop("/ECAM/Lower/Oil-PSI[1]") + 90) * D2R); me.updateBottomStatus(); }, @@ -804,10 +804,10 @@ var canvas_lowerECAM_wheel = { } # Gear Doors - me["leftdoor"].setRotation(getprop("/ECAM/Lower/door-left")*D2R); - me["rightdoor"].setRotation(getprop("/ECAM/Lower/door-right")*D2R); - me["nosegeardoorL"].setRotation(getprop("/ECAM/Lower/door-nose-left")*D2R); - me["nosegeardoorR"].setRotation(getprop("/ECAM/Lower/door-nose-right")*D2R); + me["leftdoor"].setRotation(getprop("/ECAM/Lower/door-left") * D2R); + me["rightdoor"].setRotation(getprop("/ECAM/Lower/door-right") * D2R); + me["nosegeardoorL"].setRotation(getprop("/ECAM/Lower/door-nose-left") * D2R); + me["nosegeardoorR"].setRotation(getprop("/ECAM/Lower/door-nose-right") * D2R); if (nosedoor == 0) { me["nosegeardoorL"].setColorFill(0.0667,0.7294,0.3137); diff --git a/Models/Instruments/PFD-WIP/PFD1.nas b/Models/Instruments/PFD-WIP/PFD1.nas index e6f356f4..7c6c7de9 100644 --- a/Models/Instruments/PFD-WIP/PFD1.nas +++ b/Models/Instruments/PFD-WIP/PFD1.nas @@ -99,7 +99,7 @@ var canvas_PFD_1 = { getKeys: func() { return ["FMA_man","FMA_manmode","FMA_flxtemp","FMA_thrust","FMA_lvrclb","FMA_pitch","FMA_pitcharm","FMA_pitcharm2","FMA_roll","FMA_rollarm","FMA_combined","FMA_catmode","FMA_cattype","FMA_nodh","FMA_dh","FMA_dhn","FMA_ap","FMA_fd","FMA_athr", "FMA_man_box","FMA_flx_box","FMA_thrust_box","FMA_pitch_box","FMA_pitcharm_box","FMA_roll_box","FMA_rollarm_box","FMA_combined_box","FMA_catmode_box","FMA_cattype_box","FMA_cat_box","FMA_dh_box","FMA_ap_box","FMA_fd_box","FMA_athr_box","FMA_Middle1", - "FMA_Middle2","ASI_scale","ASI_target","AI_center","AI_bank","AI_slipskid","FD_roll","FD_pitch","ALT_digits","ALT_tens","VS_pointer","QNH_setting","LOC_pointer","LOC_scale","GS_scale","GS_pointer"]; + "FMA_Middle2","ASI_scale","ASI_target","AI_center","AI_bank","AI_slipskid","FD_roll","FD_pitch","ALT_digits","ALT_tens","VS_pointer","QNH_setting","LOC_pointer","LOC_scale","GS_scale","GS_pointer","HDG_target"]; }, update: func() { state1 = getprop("/systems/thrust/state1"); @@ -327,7 +327,7 @@ var canvas_PFD_1 = { me["ASI_target"].setTranslation(0, ASItrgt * -6.6); # Attitude Indicator - me["AI_slipskid"].setTranslation(getprop("/instrumentation/slip-skid-ball/indicated-slip-skid") * -20, 0); + me["AI_slipskid"].setTranslation(getprop("/instrumentation/slip-skid-ball/indicated-slip-skid") * -15, 0); me["AI_bank"].setRotation(-roll * D2R); if (fd1 == 1 and ((!wow1 and !wow2 and roll_mode != " ") or roll_mode != " ") and getprop("/it-autoflight/custom/trk-fpa") == 0 and pitch < 25 and pitch > -13 and roll < 45 and roll > -45) { @@ -343,15 +343,15 @@ var canvas_PFD_1 = { } if (getprop("/it-autoflight/fd/roll-bar") != nil) { - me["FD_roll"].setTranslation((getprop("/it-autoflight/fd/roll-bar"))*2.0, 0); + me["FD_roll"].setTranslation((getprop("/it-autoflight/fd/roll-bar")) * 2.2, 0); } if (getprop("/it-autoflight/fd/pitch-bar") != nil) { - me["FD_pitch"].setTranslation(0, -(getprop("/it-autoflight/fd/pitch-bar"))*3.8); + me["FD_pitch"].setTranslation(0, -(getprop("/it-autoflight/fd/pitch-bar")) * 3.8); } # Altitude me["ALT_digits"].setText(sprintf("%s", getprop("/instrumentation/altimeter/indicated-altitude-ft-pfd"))); - altTens = num(right(sprintf("%02d", getprop("/instrumentation/altimeter/indicated-altitude-ft1")), 2)); + altTens = num(right(sprintf("%02d", getprop("/instrumentation/altimeter/indicated-altitude-ft")), 2)); me["ALT_tens"].setTranslation(0, altTens * 1.392); # QNH @@ -368,19 +368,38 @@ var canvas_PFD_1 = { # ILS if (getprop("/modes/pfd/ILS1") == 1) { - me["LOC_pointer"].show(); me["LOC_scale"].show(); - me["GS_pointer"].show(); me["GS_scale"].show(); } else { - me["LOC_pointer"].hide(); me["LOC_scale"].hide(); - me["GS_pointer"].hide(); me["GS_scale"].hide(); } + if (getprop("/modes/pfd/ILS1") == 1 and getprop("/instrumentation/nav[0]/in-range") == 1 and getprop("/instrumentation/nav[0]/nav-loc") == 1) { + me["LOC_pointer"].show(); + } else { + me["LOC_pointer"].hide(); + } + if (getprop("/modes/pfd/ILS1") == 1 and getprop("/instrumentation/nav[0]/gs-in-range") == 1 and getprop("/instrumentation/nav[0]/has-gs") == 1) { + me["GS_pointer"].show(); + } else { + me["GS_pointer"].hide(); + } + + me["LOC_pointer"].setTranslation(-(getprop("/instrumentation/nav[0]/heading-needle-deflection-norm")) * 197, 0); + + me["GS_pointer"].setTranslation(0, getprop("/instrumentation/nav[0]/gs-needle-deflection-norm") * 197); + + # Heading +# if (getprop("/it-autoflight/custom/show-hdg") == 1) { +# me["HDG_target"].show(); +# } else { + me["HDG_target"].hide(); +# } }, }; +setprop("/testing", 0); # REMOVE WHEN PFD FINISHED + setlistener("sim/signals/fdm-initialized", func { PFD_display = canvas.new({ "name": "PFD", diff --git a/Models/Instruments/PFD-WIP/res/pfd.svg b/Models/Instruments/PFD-WIP/res/pfd.svg index 643206b2..e5390eb6 100644 --- a/Models/Instruments/PFD-WIP/res/pfd.svg +++ b/Models/Instruments/PFD-WIP/res/pfd.svg @@ -38,14 +38,14 @@ guidetolerance="10" inkscape:pageopacity="1" inkscape:pageshadow="2" - inkscape:window-width="1600" - inkscape:window-height="850" + inkscape:window-width="1920" + inkscape:window-height="1030" id="namedview371" showgrid="true" - inkscape:zoom="1" - inkscape:cx="627.63171" - inkscape:cy="770.96194" - inkscape:window-x="-8" + inkscape:zoom="0.5" + inkscape:cx="597.50413" + inkscape:cy="374.5689" + inkscape:window-x="1592" inkscape:window-y="-8" inkscape:window-maximized="1" inkscape:current-layer="svg2" @@ -71,6 +71,39 @@ height="1023.9705" width="1024" style="display:none;fill:#000000;fill-opacity:0" /> + + + + + + style="fill:none;fill-opacity:1;stroke:#238995;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> @@ -1109,39 +1142,45 @@ + inkscape:label="#g4578"> - - - - + width="7.7972813" + height="41.291069" + x="444.25851" + y="816.11987" /> + + + + + + + + + inkscape:label="#g4569"> - - - - + + + + + + + + 40200080604020008060 @@ -1760,17 +1801,17 @@ sodipodi:nodetypes="cc" inkscape:connector-curvature="0" id="path4382" - d="m 193.91669,375.84042 14.13625,6.68826" + d="m 193.91669,378.22448 14.13625,6.68826" style="fill:none;fill-opacity:1;stroke:#11ba50;stroke-width:3.19995403;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> @@ -1778,7 +1819,7 @@ sodipodi:nodetypes="cc" inkscape:connector-curvature="0" id="path4388" - d="m 702.99497,389.52701 -14.36107,6.19082" + d="m 702.99497,391.91107 -14.36107,6.19082" style="fill:none;fill-opacity:1;stroke:#11ba50;stroke-width:3.19995403;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + diff --git a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas index f1384ac0..511ca411 100644 --- a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas +++ b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas @@ -256,13 +256,13 @@ var canvas_upperECAM_cfm_eis2 = { me["N12"].setText(sprintf("%s", math.floor(getprop("/engines/engine[1]/n1-actual") + 0.05))); me["N12-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[1]/n1-actual") + 0.05,1)))); - me["N11-needle"].setRotation((getprop("/ECAM/Upper/N1[0]") + 90)*D2R); - me["N11-thr"].setRotation((getprop("/ECAM/Upper/N1thr[0]") + 90)*D2R); - me["N11-ylim"].setRotation((getprop("/ECAM/Upper/N1ylim") + 90)*D2R); + me["N11-needle"].setRotation((getprop("/ECAM/Upper/N1[0]") + 90) * D2R); + me["N11-thr"].setRotation((getprop("/ECAM/Upper/N1thr[0]") + 90) * D2R); + me["N11-ylim"].setRotation((getprop("/ECAM/Upper/N1ylim") + 90) * D2R); - me["N12-needle"].setRotation((getprop("/ECAM/Upper/N1[1]") + 90)*D2R); - me["N12-thr"].setRotation((getprop("/ECAM/Upper/N1thr[1]") + 90)*D2R); - me["N12-ylim"].setRotation((getprop("/ECAM/Upper/N1ylim") + 90)*D2R); + me["N12-needle"].setRotation((getprop("/ECAM/Upper/N1[1]") + 90) * D2R); + me["N12-thr"].setRotation((getprop("/ECAM/Upper/N1thr[1]") + 90) * D2R); + me["N12-ylim"].setRotation((getprop("/ECAM/Upper/N1ylim") + 90) * D2R); if (getprop("/systems/fadec/eng1/n1") == 1) { me["N11-scale"].setColor(0.8078,0.8039,0.8078); @@ -336,8 +336,8 @@ var canvas_upperECAM_cfm_eis2 = { me["EGT1"].setText(sprintf("%s", math.round(getprop("/engines/engine[0]/egt-actual")))); me["EGT2"].setText(sprintf("%s", math.round(getprop("/engines/engine[1]/egt-actual")))); - me["EGT1-needle"].setRotation((getprop("/ECAM/Upper/EGT[0]") + 90)*D2R); - me["EGT2-needle"].setRotation((getprop("/ECAM/Upper/EGT[1]") + 90)*D2R); + me["EGT1-needle"].setRotation((getprop("/ECAM/Upper/EGT[0]") + 90) * D2R); + me["EGT2-needle"].setRotation((getprop("/ECAM/Upper/EGT[1]") + 90) * D2R); if (getprop("/systems/fadec/eng1/egt") == 1) { me["EGT1-scale"].setColor(0.8078,0.8039,0.8078); @@ -470,12 +470,12 @@ var canvas_upperECAM_iae_eis2 = { me["EPR1"].setText(sprintf("%1.3f", getprop("/engines/engine[0]/epr-actual"))); me["EPR2"].setText(sprintf("%1.3f", getprop("/engines/engine[1]/epr-actual"))); - me["EPR1-needle"].setRotation((getprop("/ECAM/Upper/EPR[0]") + 90)*D2R); - me["EPR1-thr"].setRotation((getprop("/ECAM/Upper/EPRthr[0]") + 90)*D2R); - me["EPR1-ylim"].setRotation((getprop("/ECAM/Upper/EPRylim") + 90)*D2R); - me["EPR2-needle"].setRotation((getprop("/ECAM/Upper/EPR[1]") + 90)*D2R); - me["EPR2-thr"].setRotation((getprop("/ECAM/Upper/EPRthr[1]") + 90)*D2R); - me["EPR2-ylim"].setRotation((getprop("/ECAM/Upper/EPRylim") + 90)*D2R); + me["EPR1-needle"].setRotation((getprop("/ECAM/Upper/EPR[0]") + 90) * D2R); + me["EPR1-thr"].setRotation((getprop("/ECAM/Upper/EPRthr[0]") + 90) * D2R); + me["EPR1-ylim"].setRotation((getprop("/ECAM/Upper/EPRylim") + 90) * D2R); + me["EPR2-needle"].setRotation((getprop("/ECAM/Upper/EPR[1]") + 90) * D2R); + me["EPR2-thr"].setRotation((getprop("/ECAM/Upper/EPRthr[1]") + 90) * D2R); + me["EPR2-ylim"].setRotation((getprop("/ECAM/Upper/EPRylim") + 90) * D2R); if (getprop("/systems/fadec/eng1/epr") == 1) { me["EPR1-scale"].setColor(0.8078,0.8039,0.8078); @@ -533,8 +533,8 @@ var canvas_upperECAM_iae_eis2 = { me["EGT1"].setText(sprintf("%s", math.round(getprop("/engines/engine[0]/egt-actual")))); me["EGT2"].setText(sprintf("%s", math.round(getprop("/engines/engine[1]/egt-actual")))); - me["EGT1-needle"].setRotation((getprop("/ECAM/Upper/EGT[0]") + 90)*D2R); - me["EGT2-needle"].setRotation((getprop("/ECAM/Upper/EGT[1]") + 90)*D2R); + me["EGT1-needle"].setRotation((getprop("/ECAM/Upper/EGT[0]") + 90) * D2R); + me["EGT2-needle"].setRotation((getprop("/ECAM/Upper/EGT[1]") + 90) * D2R); if (getprop("/systems/fadec/eng1/egt") == 1) { me["EGT1-scale"].setColor(0.8078,0.8039,0.8078); @@ -579,13 +579,13 @@ var canvas_upperECAM_iae_eis2 = { me["N12"].setText(sprintf("%s", math.floor(getprop("/engines/engine[1]/n1-actual") + 0.05))); me["N12-decimal"].setText(sprintf("%s", int(10*math.mod(getprop("/engines/engine[1]/n1-actual") + 0.05,1)))); - me["N11-needle"].setRotation((getprop("/ECAM/Upper/N1[0]") + 90)*D2R); - me["N11-thr"].setRotation((getprop("/ECAM/Upper/N1thr[0]") + 90)*D2R); - me["N11-ylim"].setRotation((getprop("/ECAM/Upper/N1ylim") + 90)*D2R); + me["N11-needle"].setRotation((getprop("/ECAM/Upper/N1[0]") + 90) * D2R); + me["N11-thr"].setRotation((getprop("/ECAM/Upper/N1thr[0]") + 90) * D2R); + me["N11-ylim"].setRotation((getprop("/ECAM/Upper/N1ylim") + 90) * D2R); - me["N12-needle"].setRotation((getprop("/ECAM/Upper/N1[1]") + 90)*D2R); - me["N12-thr"].setRotation((getprop("/ECAM/Upper/N1thr[1]") + 90)*D2R); - me["N12-ylim"].setRotation((getprop("/ECAM/Upper/N1ylim") + 90)*D2R); + me["N12-needle"].setRotation((getprop("/ECAM/Upper/N1[1]") + 90) * D2R); + me["N12-thr"].setRotation((getprop("/ECAM/Upper/N1thr[1]") + 90) * D2R); + me["N12-ylim"].setRotation((getprop("/ECAM/Upper/N1ylim") + 90) * D2R); if (getprop("/systems/fadec/eng1/n1") == 1) { me["N11-scale"].setColor(0.8078,0.8039,0.8078);