1
0
Fork 0

Dim fixed aircraft outline if crew selects TRK-FPA

This commit is contained in:
sgilchrist123 2020-08-31 13:42:02 +10:00
parent e8fd43885d
commit 7a6fecad3d
2 changed files with 30 additions and 8 deletions

View file

@ -216,7 +216,7 @@ var canvas_PFD_base = {
"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","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV"];
"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", "fixed_aircraft_outline_1","fixed_aircraft_outline_2"];
},
updateDu1: func() {
var elapsedtime_act = elapsedtime.getValue();
@ -1014,6 +1014,22 @@ var canvas_PFD_base = {
me.AI_horizon_hdg_rot.setRotation(-roll_cur * D2R, me["AI_center"].getCenter());
me["AI_heading"].update();
},
dimFixedAircraftOutline: func() {
var r = 0.345098039;
var g = 0.349019608;
var b = 0.058823529;
me["fixed_aircraft_outline_1"].setColor(r, g, b);
me["fixed_aircraft_outline_2"].setColor(r, g, b);
},
undimFixedAircraftOutline: func() {
var r = 0.788235294;
var g = 0.819607843;
var b = 0.129411765;
me["fixed_aircraft_outline_1"].setColor(r, g, b);
me["fixed_aircraft_outline_2"].setColor(r, g, b);
},
};
var canvas_PFD_1 = {
@ -1089,9 +1105,11 @@ var canvas_PFD_1 = {
# TODO - Hide FPV if error on PFD1
if (ap_trk_sw.getValue() == 0) {
me["FPV"].hide();
me.undimFixedAircraftOutline();
} else {
me["FPV"].setTranslation((math.clamp(track_diff.getValue(), -23.62, 23.62) / 10) * 98.5416, math.clamp(aoa_1.getValue(), -9.9, 9.9)*FPV_Y_COEFFICIENT);
me["FPV"].setTranslation((math.clamp(track_diff.getValue(), -23.62, 23.62) / 10) * 98.5416, (math.clamp(aoa_1.getValue(), -9.9, 9.9)*FPV_Y_COEFFICIENT)/math.cos(math.abs(roll_cur)*D2R));
me["FPV"].show();
me.dimFixedAircraftOutline();
}
# ILS
@ -1837,10 +1855,12 @@ var canvas_PFD_2 = {
# TODO - Deal with situation if AOA not available from ADR2
# TODO - Hide FPV if error on PFD2
if (ap_trk_sw.getValue() == 0) {
me["FPV"].hide();
me["FPV"].hide();
me.undimFixedAircraftOutline();
} else {
me["FPV"].setTranslation((math.clamp(track_diff.getValue(), -23.62, 23.62) / 10) * 98.5416, math.clamp(aoa_2.getValue(), -9.9, 9.9)*FPV_Y_COEFFICIENT);
me["FPV"].setTranslation((math.clamp(track_diff.getValue(), -23.62, 23.62) / 10) * 98.5416, (math.clamp(aoa_2.getValue(), -9.9, 9.9)*FPV_Y_COEFFICIENT)/math.cos(math.abs(roll_cur)*D2R));
me["FPV"].show();
me.dimFixedAircraftOutline();
}
# ILS

View file

@ -1396,9 +1396,10 @@
<path
sodipodi:nodetypes="cccccccccccc"
inkscape:connector-curvature="0"
id="rect4760-1"
id="fixed_aircraft_outline_1"
d="m 279.39676,473.84829 20.67975,-1.3e-4 v 15.43882 0 l 1.8e-4,25.65723 h -15.4389 l -0.14628,-25.65723 v 0 l -81.2588,-5e-5 v -15.43891 l 76.16405,2.1e-4 z"
style="fill:none;fill-opacity:1;stroke:#c9d121;stroke-width:3.54375;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:none;fill-opacity:1;stroke:#c9d121;stroke-width:3.54375;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="fixed_aircraft_outline_1" />
</g>
<g
id="g4856"
@ -1420,9 +1421,10 @@
<path
style="fill:none;fill-opacity:1;stroke:#c9d121;stroke-width:3.54375;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 279.39676,473.84829 20.67975,-1.3e-4 v 15.43882 0 l 1.8e-4,25.65723 h -15.4389 l -0.14628,-25.65723 v 0 l -81.2588,-5e-5 v -15.43891 l 76.16405,2.1e-4 z"
id="path4854"
id="fixed_aircraft_outline_2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccccc" />
sodipodi:nodetypes="cccccccccccc"
inkscape:label="fixed_aircraft_outline_2" />
</g>
<path
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"

Before

Width:  |  Height:  |  Size: 367 KiB

After

Width:  |  Height:  |  Size: 368 KiB