Metric altitude
This commit is contained in:
parent
7f81d14cee
commit
d92279b6fc
4 changed files with 124 additions and 8 deletions
|
@ -5591,6 +5591,22 @@
|
||||||
</or>
|
</or>
|
||||||
</condition>
|
</condition>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>pick</type>
|
||||||
|
<object-name>metric_alt</object-name>
|
||||||
|
<action>
|
||||||
|
<button>0</button>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>
|
||||||
|
fcu.FCUController.MetricAlt();
|
||||||
|
setprop("sim/sounde/btn1", 1);
|
||||||
|
</script>
|
||||||
|
</binding>
|
||||||
|
</action>
|
||||||
|
</animation>
|
||||||
|
|
||||||
<!-- Flap Lever -->
|
<!-- Flap Lever -->
|
||||||
<animation>
|
<animation>
|
||||||
|
|
|
@ -219,9 +219,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",
|
"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",
|
"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",
|
"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",
|
"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,
|
off: 0,
|
||||||
on: 0,
|
on: 0,
|
||||||
|
@ -346,6 +346,7 @@ var canvas_PFD_base = {
|
||||||
PFD_2_mismatch.page.show();
|
PFD_2_mismatch.page.show();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
showMetricAlt: 0,
|
||||||
updateCommon: func () {
|
updateCommon: func () {
|
||||||
# FMA MAN TOGA MCT FLX THR
|
# FMA MAN TOGA MCT FLX THR
|
||||||
# Set properties used a lot to a variable to avoid calling getValue() multiple times
|
# Set properties used a lot to a variable to avoid calling getValue() multiple times
|
||||||
|
@ -1039,7 +1040,6 @@ var canvas_PFD_base = {
|
||||||
me["QNH_std"].hide();
|
me["QNH_std"].hide();
|
||||||
me["QNH_box"].hide();
|
me["QNH_box"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
# Get Angle of Attack from ADR1 or, depending on Switching panel, ADR3
|
# Get Angle of Attack from ADR1 or, depending on Switching panel, ADR3
|
||||||
|
@ -1702,6 +1702,18 @@ var canvas_PFD_1 = {
|
||||||
me["ALT_scale"].show();
|
me["ALT_scale"].show();
|
||||||
|
|
||||||
me.altitude = dmc.DMController.DMCs[0].outputs[1].getValue();
|
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.altOffset = me.altitude / 500 - int(me.altitude / 500);
|
||||||
me.middleAltText = roundaboutAlt(me.altitude / 100);
|
me.middleAltText = roundaboutAlt(me.altitude / 100);
|
||||||
me.middleAltOffset = nil;
|
me.middleAltOffset = nil;
|
||||||
|
@ -1729,6 +1741,14 @@ var canvas_PFD_1 = {
|
||||||
me["ALT_tens"].setTranslation(0, altTens * 1.392);
|
me["ALT_tens"].setTranslation(0, altTens * 1.392);
|
||||||
|
|
||||||
ap_alt_cur = ap_alt.getValue();
|
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();
|
alt_diff_cur = dmc.DMController.DMCs[0].outputs[7].getValue();
|
||||||
if (alt_diff_cur >= -565 and alt_diff_cur <= 565) {
|
if (alt_diff_cur >= -565 and alt_diff_cur <= 565) {
|
||||||
me["ALT_target"].setTranslation(0, (alt_diff_cur / 100) * -48.66856);
|
me["ALT_target"].setTranslation(0, (alt_diff_cur / 100) * -48.66856);
|
||||||
|
@ -1838,6 +1858,10 @@ var canvas_PFD_1 = {
|
||||||
me["ALT_box_flash"].hide();
|
me["ALT_box_flash"].hide();
|
||||||
me["ALT_box_amber"].hide();
|
me["ALT_box_amber"].hide();
|
||||||
me["ALT_box"].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();
|
me.updateCommon();
|
||||||
|
@ -2474,6 +2498,18 @@ var canvas_PFD_2 = {
|
||||||
me["ALT_scale"].show();
|
me["ALT_scale"].show();
|
||||||
|
|
||||||
me.altitude = dmc.DMController.DMCs[1].outputs[1].getValue();
|
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.altOffset = me.altitude / 500 - int(me.altitude / 500);
|
||||||
me.middleAltText = roundaboutAlt(me.altitude / 100);
|
me.middleAltText = roundaboutAlt(me.altitude / 100);
|
||||||
me.middleAltOffset = nil;
|
me.middleAltOffset = nil;
|
||||||
|
@ -2501,6 +2537,14 @@ var canvas_PFD_2 = {
|
||||||
me["ALT_tens"].setTranslation(0, altTens * 1.392);
|
me["ALT_tens"].setTranslation(0, altTens * 1.392);
|
||||||
|
|
||||||
ap_alt_cur = ap_alt.getValue();
|
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();
|
alt_diff_cur = dmc.DMController.DMCs[1].outputs[7].getValue();
|
||||||
if (alt_diff_cur >= -565 and alt_diff_cur <= 565) {
|
if (alt_diff_cur >= -565 and alt_diff_cur <= 565) {
|
||||||
me["ALT_target"].setTranslation(0, (alt_diff_cur / 100) * -48.66856);
|
me["ALT_target"].setTranslation(0, (alt_diff_cur / 100) * -48.66856);
|
||||||
|
@ -2610,6 +2654,10 @@ var canvas_PFD_2 = {
|
||||||
me["ALT_box_flash"].hide();
|
me["ALT_box_flash"].hide();
|
||||||
me["ALT_box_amber"].hide();
|
me["ALT_box_amber"].hide();
|
||||||
me["ALT_box"].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();
|
me.updateCommon();
|
||||||
|
|
|
@ -41,9 +41,9 @@
|
||||||
inkscape:window-maximized="1"
|
inkscape:window-maximized="1"
|
||||||
inkscape:window-y="-8"
|
inkscape:window-y="-8"
|
||||||
inkscape:window-x="-8"
|
inkscape:window-x="-8"
|
||||||
inkscape:cy="876.13786"
|
inkscape:cy="1074.3176"
|
||||||
inkscape:cx="522.86542"
|
inkscape:cx="955.3885"
|
||||||
inkscape:zoom="5.6568542"
|
inkscape:zoom="2"
|
||||||
showgrid="true"
|
showgrid="true"
|
||||||
id="namedview371"
|
id="namedview371"
|
||||||
inkscape:window-height="705"
|
inkscape:window-height="705"
|
||||||
|
@ -2269,11 +2269,11 @@
|
||||||
id="QNH_setting"
|
id="QNH_setting"
|
||||||
y="885.26117"
|
y="885.26117"
|
||||||
x="907.61713"
|
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"
|
xml:space="preserve"
|
||||||
transform="scale(1.0000144,0.9999856)"
|
transform="scale(1.0000144,0.9999856)"
|
||||||
inkscape:label="#text979"><tspan
|
inkscape:label="#text979"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.3994px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.75"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.3994px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.75;stroke:none;stroke-opacity:1;"
|
||||||
y="885.26117"
|
y="885.26117"
|
||||||
x="907.61713"
|
x="907.61713"
|
||||||
id="tspan977"
|
id="tspan977"
|
||||||
|
@ -6276,4 +6276,50 @@
|
||||||
x="417.56354"
|
x="417.56354"
|
||||||
y="34.634907"
|
y="34.634907"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99950027px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.65757698">-800</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99950027px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.65757698">-800</tspan></text>
|
||||||
|
<rect
|
||||||
|
inkscape:label="#rect4290"
|
||||||
|
y="896.48456"
|
||||||
|
x="788.52734"
|
||||||
|
height="36.03083"
|
||||||
|
width="153.94527"
|
||||||
|
id="Metric_box"
|
||||||
|
style="fill:none;fill-opacity:1;stroke:#c9d121;stroke-width:3.20831394;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
|
||||||
|
<text
|
||||||
|
id="Metric_cur_alt"
|
||||||
|
y="928.04248"
|
||||||
|
x="847.62854"
|
||||||
|
style="font-style:normal;font-weight:normal;font-size:12px;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"
|
||||||
|
xml:space="preserve"
|
||||||
|
transform="scale(1.0000144,0.9999856)"
|
||||||
|
inkscape:label="#text979"><tspan
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.3993988px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.75"
|
||||||
|
y="928.04248"
|
||||||
|
x="852.95343"
|
||||||
|
id="tspan977-3"
|
||||||
|
sodipodi:role="line">11070 </tspan></text>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.3993988px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:0.75"
|
||||||
|
x="909.43152"
|
||||||
|
y="928.62128"
|
||||||
|
id="Metric_letter"
|
||||||
|
inkscape:label="#text1815"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan1813"
|
||||||
|
x="909.43152"
|
||||||
|
y="928.62128"
|
||||||
|
style="font-size:38.3993988px;fill:#179ab7;fill-opacity:1;stroke-width:0.75">M</tspan></text>
|
||||||
|
<text
|
||||||
|
inkscape:label="#text975"
|
||||||
|
transform="scale(0.95382559,1.0484097)"
|
||||||
|
id="ALT_digit_UP_metric"
|
||||||
|
y="218.16887"
|
||||||
|
x="604.67737"
|
||||||
|
style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:sans-serif;text-align:start;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:0.75"
|
||||||
|
xml:space="preserve"><tspan
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#179ab7;fill-opacity:1;stroke-width:0.75"
|
||||||
|
y="218.16887"
|
||||||
|
x="604.67737"
|
||||||
|
id="tspan5116-2"
|
||||||
|
sodipodi:role="line">10000M</tspan></text>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 342 KiB After Width: | Height: | Size: 344 KiB |
|
@ -460,6 +460,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
|
# Master / slave principle of operation depending on the autopilot / flight director engagement
|
||||||
|
|
Loading…
Reference in a new issue