1
0
Fork 0

FROM legend, now show UTC / altitude of FROM waypoint

This commit is contained in:
legoboyvdlp R 2020-03-24 16:46:27 +00:00
parent 91cf4d1db1
commit 3aada81966
4 changed files with 479 additions and 433 deletions

View file

@ -202,7 +202,7 @@ var canvas_MCDU_base = {
"Simple_R4_Arrow","Simple_R5_Arrow","Simple_R6_Arrow","Simple_C1","Simple_C2","Simple_C3","Simple_C4","Simple_C5","Simple_C6","Simple_C1S",
"Simple_C2S","Simple_C3S","Simple_C4S","Simple_C5S","Simple_C6S","INITA","INITA_CoRoute","INITA_FltNbr","INITA_CostIndex","INITA_CruiseFLTemp",
"INITA_FromTo","INITA_InitRequest","INITA_AlignIRS","INITB","INITB_ZFWCG","INITB_ZFW","INITB_ZFW_S","INITB_Block","PERFTO","PERFTO_V1","PERFTO_VR","PERFTO_V2","PERFTO_FE","PERFTO_SE","PERFTO_OE","PERFAPPR","PERFAPPR_FE","PERFAPPR_SE","PERFAPPR_OE","PERFGA","PERFGA_FE","PERFGA_SE","PERFGA_OE",
"FPLN","FPLN_From","FPLN_TMPY_group","FPLN_Callsign","departureTMPY", "arrowsDepArr","arrow1L","arrow2L","arrow3L","arrow4L","arrow5L","arrow1R",
"FPLN","FPLN_From","FPLN_TMPY_group","FPLN_FROM","FPLN_Callsign","departureTMPY", "arrowsDepArr","arrow1L","arrow2L","arrow3L","arrow4L","arrow5L","arrow1R",
"arrow2R","arrow3R","arrow4R","arrow5R"];
},
update: func() {

View file

@ -41,13 +41,13 @@
inkscape:window-height="705"
id="namedview371"
showgrid="true"
inkscape:zoom="4.1661918"
inkscape:cx="37.539162"
inkscape:cy="725.25661"
inkscape:zoom="1.5306292"
inkscape:cx="332.0077"
inkscape:cy="938.33632"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Simple"
inkscape:current-layer="svg2"
showguides="false"
inkscape:snap-global="false"
units="px"
@ -871,9 +871,12 @@
x="18.917452"
id="tspan4269-7"
sodipodi:role="line">TEXT</tspan></text>
</g>
<g
id="g1390"
transform="translate(-0.25527898,1.4267237)">
transform="translate(-0.25527898,1.4267237)"
inkscape:label="FPLN"
style="display:inline">
<g
style="display:inline"
id="Simple-9"
@ -937,7 +940,6 @@
y="69.238258"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:56px;line-height:1.25;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1">CALLSIG</tspan></text>
<g
sodipodi:insensitive="true"
inkscape:label="#g3767"
id="FPLN_TMPY_group">
<text
@ -1067,6 +1069,19 @@
</g>
</g>
</g>
<text
xml:space="preserve"
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:#ffff00;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="177.72771"
y="68.861366"
id="FPLN_FROM"
transform="scale(0.991516,1.0085566)"
inkscape:label="#text4244"><tspan
sodipodi:role="line"
id="tspan1240"
x="177.72771"
y="68.861366"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:51.20000076px;line-height:1.25;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1">FROM</tspan></text>
</g>
<g
inkscape:label="arrowsDepArr"
@ -1313,7 +1328,6 @@
</g>
</g>
</g>
</g>
<g
inkscape:groupmode="layer"
id="INITA"
@ -2135,7 +2149,7 @@
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:70px;line-height:1.25;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1"
y="187.10254"
x="399.48752"
id="tspan1079"
id="tspan339"
sodipodi:role="line">F</tspan></text>
<text
xml:space="preserve"
@ -2146,7 +2160,7 @@
transform="scale(0.991516,1.0085566)"
inkscape:label="#text4244"><tspan
sodipodi:role="line"
id="tspan1082"
id="tspan342"
x="398.21817"
y="304.35275"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:70px;line-height:1.25;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1">S</tspan></text>
@ -2161,7 +2175,7 @@
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:70px;line-height:1.25;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1"
y="422.15305"
x="398.21817"
id="tspan1085"
id="tspan345"
sodipodi:role="line">O</tspan></text>
<text
xml:space="preserve"
@ -2172,7 +2186,7 @@
transform="scale(0.90642126,1.1032398)"
inkscape:label="#text4244"><tspan
sodipodi:role="line"
id="tspan1088"
id="tspan348"
x="478.87796"
y="171.04486"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:63.9924px;line-height:1.25;font-family:'Helvetica Medium';-inkscape-font-specification:'Helvetica Medium, Medium';text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1">=</tspan></text>
@ -2187,7 +2201,7 @@
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:63.9924px;line-height:1.25;font-family:'Helvetica Medium';-inkscape-font-specification:'Helvetica Medium, Medium';text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1"
y="278.32764"
x="478.87796"
id="tspan1091"
id="tspan351"
sodipodi:role="line">=</tspan></text>
<text
xml:space="preserve"
@ -2198,7 +2212,7 @@
transform="scale(0.90642126,1.1032398)"
inkscape:label="#text4244"><tspan
sodipodi:role="line"
id="tspan1094"
id="tspan354"
x="478.87796"
y="385.6102"
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:63.9924px;line-height:1.25;font-family:'Helvetica Medium';-inkscape-font-specification:'Helvetica Medium, Medium';text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1">=</tspan></text>

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

View file

@ -46,6 +46,10 @@ var flightPlanController = {
arrivalIndex: [0, 0, 0],
arrivalDist: 0,
_arrivalDist: 0,
fromWptTime: nil,
fromWptAlt: nil,
_timeTemp: nil,
_altTemp: nil,
reset: func() {
me.temporaryFlag[0] = 0;
@ -94,6 +98,24 @@ var flightPlanController = {
},
autoSequencing: func() {
me._timeTemp = math.round(getprop("/sim/time/utc/minute") + (getprop("/sim/time/utc/second") / 60));
if (me._timeTemp < 10) {
me._timeTemp = "0" ~ me._timeTemp;
}
me.fromWptTime = getprop("/sim/time/utc/hour") ~ me._timeTemp;
me._altTemp = getprop("/systems/navigation/adr/output/baro-alt-corrected-1-capt");
if (me._altTemp > getprop("FMGC/internal/trans-alt")) {
me.fromWptAlt = "FL" ~ math.round(me._altTemp / 100);
} else {
if (me._altTemp > 0) {
me.fromWptAlt = math.round(me._altTemp);
} else {
me.fromWptAlt = "M" ~ math.round(me._altTemp);
}
}
# todo setlistener on sim/time/warp to recompute predictions
if (me.num[2].getValue() > 2) {
if (me.temporaryFlag[0] == 1 and wpID[0][0] == wpID[2][0]) {
me.deleteWP(0, 0);

View file

@ -31,9 +31,15 @@ var fplnItem = {
updateCenterText: func() {
if (me.wp != nil) {
if (me.wp.wp_name != "DISCONTINUITY") {
if (me.index != (fmgc.flightPlanController.currentToWptIndex.getValue() - 1) or fmgc.flightPlanController.fromWptTime == nil) {
me.brg = me.getBrg();
me.track = me.getTrack();
return ["---- ", nil, me.colour];
} else {
me.brg = me.getBrg();
me.track = me.getTrack();
return [fmgc.flightPlanController.fromWptTime ~ " ", nil, me.colour];
}
} else {
return ["---F-PLN DISCONTINUITY--", nil, "wht"];
}
@ -65,7 +71,11 @@ var fplnItem = {
return "---";
},
getAlt: func() {
if (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1) and fmgc.flightPlanController.fromWptAlt != nil) {
return " " ~ fmgc.flightPlanController.fromWptAlt;
} else {
return "-----";
}
},
getDist: func() {
return "--";