diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index e1fba257..d8b28561 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -16,6 +16,7 @@ var ASI = 0; var ASItrgt = 0; var ASItrgtdiff = 0; var ASImax = 0; +var ASItrend = 0; var altTens = 0; var state1 = getprop("/systems/thrust/state1"); var state2 = getprop("/systems/thrust/state2"); @@ -38,7 +39,6 @@ var wow1 = getprop("/gear/gear[1]/wow"); var wow2 = getprop("/gear/gear[2]/wow"); var pitch = 0; var roll = 0; -var spdTrend_c = 0; setprop("/instrumentation/pfd/vs-needle", 0); setprop("/instrumentation/pfd/vs-digit-trans", 0); setprop("/it-autoflight/input/spd-managed", 0); @@ -56,6 +56,7 @@ setprop("/instrumentation/pfd/hdg-diff", 0); setprop("/instrumentation/pfd/heading-scale", 0); setprop("/instrumentation/pfd/track-deg", 0); setprop("/instrumentation/pfd/track-hdg-diff", 0); +setprop("/instrumentation/pfd/speed-lookahead", 0); setprop("/instrumentation/du/du1-test", 0); setprop("/instrumentation/du/du1-test-time", 0); setprop("/instrumentation/du/du6-test", 0); @@ -72,6 +73,7 @@ setprop("/instrumentation/adirs/ir[1]/aligned", 0); setprop("/instrumentation/adirs/ir[2]/aligned", 0); setprop("/controls/switching/ATTHDG", 0); setprop("/controls/switching/AIRDATA", 0); +setprop("/testing", 0); var canvas_PFD_base = { init: func(canvas_group, file) { @@ -124,10 +126,10 @@ var canvas_PFD_base = { 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_ctr_msg","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_max","ASI_scale","ASI_target","ASI_mach","ASI_mach_decimal","ASI_ten_sec","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_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_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"]; + "FMA_Middle1","FMA_Middle2","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_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_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"]; }, update: func() { elapsedtime = getprop("/sim/time/elapsed-sec"); @@ -564,7 +566,20 @@ var canvas_PFD_base = { me["ASI_target"].hide(); } - me["ASI_ten_sec"].hide(); + ASItrend = getprop("/instrumentation/pfd/speed-lookahead") - ASI; + me["ASI_trend_up"].setTranslation(0, math.clamp(ASItrend, 0, 50) * -6.6); + me["ASI_trend_down"].setTranslation(0, math.clamp(ASItrend, -50, 0) * -6.6); + + if (ASItrend >= 2) { + me["ASI_trend_up"].show(); + me["ASI_trend_down"].hide(); + } else if (ASItrend <= -2) { + me["ASI_trend_down"].show(); + me["ASI_trend_up"].hide(); + } else { + me["ASI_trend_up"].hide(); + me["ASI_trend_down"].hide(); + } # Attitude Indicator pitch = getprop("/orientation/pitch-deg") or 0; diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg index 306192a4..a0a78a2b 100644 --- a/Models/Instruments/PFD/res/pfd.svg +++ b/Models/Instruments/PFD/res/pfd.svg @@ -41,9 +41,9 @@ inkscape:window-height="1030" id="namedview371" showgrid="false" - inkscape:zoom="2.8284273" - inkscape:cx="324.67088" - inkscape:cy="851.22941" + inkscape:zoom="0.5" + inkscape:cx="299.82204" + inkscape:cy="530.33915" inkscape:window-x="1592" inkscape:window-y="-8" inkscape:window-maximized="1" @@ -1696,6 +1696,14 @@ width="117.6912" id="ASI_scale_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" /> + 000 + @@ -4458,27 +4474,50 @@ style="fill:none;fill-opacity:1;stroke:#c9d121;stroke-width:4.5;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + id="ASI_trend_up" + inkscape:label="#g4874"> + + + + + - + Ground level diff gain @@ -171,94 +171,41 @@ - - - - - - Stall speed margin computer - gain - 1.0 - - /instrumentation/weu/state/stall-speed - - - /velocities/airspeed-kt - 85 - - /instrumentation/pfd/stallspeed-diff - -205 - 10 - - - - Over speed margin computer - gain - -1.0 - - /instrumentation/afds/max-airspeed-kts - - - /velocities/airspeed-kt - -95 - - /instrumentation/pfd/overspeed-diff - -200 - -10 - - - - - - - - speed predictor (smoothed) - false - /velocities/airspeed-kt - /instrumentation/pfd/speed-lookahead - 10.0 - 0.01 - - - - PFD preprocessor (spd trend up) - false - gain - - /instrumentation/pfd/speed-lookahead - - - /velocities/airspeed-kt - 90 - - -0.002667 - /instrumentation/pfd/speed-trend-up - 0.24 - 0 - - - - PFD preprocessor (spd trend down) - false - gain - - /instrumentation/pfd/speed-lookahead - 0 - - - /velocities/airspeed-kt - -90 - - -0.002667 - /instrumentation/pfd/speed-trend-down - -0.24 - 0 - - - - - - + + Speed Predictor Input + gain + 1.0 + + + + /instrumentation/airspeed-indicator/indicated-speed-kt + 30 + + + + /instrumentation/pfd/speed-minus-30 + 0 + 390 + + + + Speed Predictor (Smoothed) + false + /instrumentation/pfd/speed-minus-30 + /instrumentation/pfd/speed-lookahead-cmd + 10.0 + 0.01 + + + + Speed Predictor Exponential + false + exponential + /instrumentation/pfd/speed-lookahead-cmd + /instrumentation/pfd/speed-lookahead + 0.32 + + Ground Horizon gain @@ -394,5 +341,5 @@ /instrumentation/pfd/vs-digit-trans - + diff --git a/revision.txt b/revision.txt index 50244f6a..a266a87e 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -4212 \ No newline at end of file +4213 \ No newline at end of file