diff --git a/Models/Instruments/PFD-WIP/PFD1.nas b/Models/Instruments/PFD-WIP/PFD1.nas index 7c6c7de9..59d7646b 100644 --- a/Models/Instruments/PFD-WIP/PFD1.nas +++ b/Models/Instruments/PFD-WIP/PFD1.nas @@ -38,6 +38,8 @@ var pitch = getprop("/orientation/pitch-deg"); var roll = getprop("/orientation/roll-deg"); var wow1 = getprop("/gear/gear[1]/wow"); var wow2 = getprop("/gear/gear[2]/wow"); +var pitch = 0; +var roll = 0; var canvas_PFD_base = { init: func(canvas_group, file) { @@ -71,6 +73,9 @@ var canvas_PFD_base = { } } } + + me.AI_horizon_trans = me["AI_horizon"].createTransform(); + me.AI_horizon_rot = me["AI_horizon"].createTransform(); me.page = canvas_group; @@ -99,7 +104,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","HDG_target"]; + "FMA_Middle2","ASI_scale","ASI_target","AI_center","AI_bank","AI_slipskid","AI_horizon","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"); @@ -282,13 +287,13 @@ var canvas_PFD_1 = { me["FMA_athr"].setColor(0.1372,0.5372,0.5843); } - if (getprop("/modes/pfd/fma/ap-mode-box") == 1) { + if (getprop("/modes/pfd/fma/ap-mode-box") == 1 and getprop("/modes/pfd/fma/ap-mode") != " ") { me["FMA_ap_box"].show(); } else { me["FMA_ap_box"].hide(); } - if (getprop("/modes/pfd/fma/fd-mode-box") == 1) { + if (getprop("/modes/pfd/fma/fd-mode-box") == 1 and getprop("/modes/pfd/fma/fd-mode") != " ") { me["FMA_fd_box"].show(); } else { me["FMA_fd_box"].hide(); @@ -327,6 +332,12 @@ var canvas_PFD_1 = { me["ASI_target"].setTranslation(0, ASItrgt * -6.6); # Attitude Indicator + pitch = getprop("/orientation/pitch-deg") or 0; + roll = getprop("/orientation/roll-deg") or 0; + + me.AI_horizon_trans.setTranslation(0, pitch * 11.825); + me.AI_horizon_rot.setRotation(-roll * D2R, me["AI_center"].getCenter()); + me["AI_slipskid"].setTranslation(getprop("/instrumentation/slip-skid-ball/indicated-slip-skid") * -15, 0); me["AI_bank"].setRotation(-roll * D2R); diff --git a/Models/Instruments/PFD-WIP/res/pfd.svg b/Models/Instruments/PFD-WIP/res/pfd.svg index e5390eb6..47c03789 100644 --- a/Models/Instruments/PFD-WIP/res/pfd.svg +++ b/Models/Instruments/PFD-WIP/res/pfd.svg @@ -42,9 +42,9 @@ inkscape:window-height="1030" id="namedview371" showgrid="true" - inkscape:zoom="0.5" - inkscape:cx="597.50413" - inkscape:cy="374.5689" + inkscape:zoom="1.9999999" + inkscape:cx="883.52684" + inkscape:cy="505.11595" inkscape:window-x="1592" inkscape:window-y="-8" inkscape:window-maximized="1" @@ -62,6 +62,961 @@ originx="0" originy="0" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + 10 + 20 + 20 + 30 + 30 + 40 + 40 + 50 + 50 + 60 + 60 + 70 + 70 + 80 + 80 + 90 + 90 + + + 10 + 10 + 20 + 20 + 30 + 30 + 40 + 40 + 50 + 50 + 60 + 60 + 70 + 70 + 80 + 80 + 90 + 90 + + + + + style="fill:#000000;fill-opacity:0" /> + @@ -1089,12 +2052,12 @@ id="AI_center" width="15.997281" height="16.491779" - x="440.30704" + x="440.25876" y="504.91953" inkscape:label="#rect4741" /> + transform="matrix(1.0666667,0,0,1.066636,0.11963598,-0.50381959)"> + transform="matrix(-1.0666667,0,0,1.066636,896.39035,-0.50381959)"> - + + + + - @@ -1819,7 +2785,7 @@ sodipodi:nodetypes="cc" inkscape:connector-curvature="0" id="path4388" - d="m 702.99497,391.91107 -14.36107,6.19082" + d="m 702.92426,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" />