... | ... |
@@ -84,6 +84,9 @@ var displayClass = { |
84 | 84 |
'Rose', |
85 | 85 |
'Heading-bug', |
86 | 86 |
'PFD-Widgets', |
87 |
+ 'Trends', |
|
88 |
+ 'Airspeed-Trend-Indicator', |
|
89 |
+ 'Altitude-Trend-Indicator', |
|
87 | 90 |
); |
88 | 91 |
append(groups.hide, |
89 | 92 |
'CDI', |
... | ... |
@@ -315,8 +318,20 @@ var displayClass = { |
315 | 318 |
.setTranslation(0,(math.mod(ias,10) + (ias >= 10)*10) * 36); |
316 | 319 |
me.screenElements.SpeedTape |
317 | 320 |
.setTranslation(0,ias * 5.711); |
321 |
+ var now = systime(); |
|
322 |
+ # estimated speed in 6s |
|
323 |
+ var Sy = 6 * (ias - me._last_ias_kt) / (now - me._last_ias_s); |
|
324 |
+ if (abs(Sy) > 30) |
|
325 |
+ Sy = 30 * abs(Sy)/Sy; # = -30 or 30 |
|
326 |
+ me.screenElements['Airspeed-Trend-Indicator'] |
|
327 |
+ .setScale(1,Sy) |
|
328 |
+ .setTranslation(0, -284.5 * (Sy - 1)); |
|
329 |
+ me._last_ias_kt = ias; |
|
330 |
+ me._last_ias_s = now; |
|
318 | 331 |
settimer(func me.updateIAS(getprop('/velocities/airspeed-kt')), 0.1); |
319 | 332 |
}, |
333 |
+ _last_ias_kt : 0, |
|
334 |
+ _last_ias_s : systime(), |
|
320 | 335 |
#}}} |
321 | 336 |
|
322 | 337 |
updateALT: func (alt) { |
... | ... |
@@ -457,8 +472,20 @@ var displayClass = { |
457 | 472 |
me.screenElements["AltSmallD"~place].setTranslation(offset,0); |
458 | 473 |
} |
459 | 474 |
} |
475 |
+ var now = systime(); |
|
476 |
+ # altitude in 6s |
|
477 |
+ var Sy = .3 * (alt - me._last_alt_ft) / (now - me._last_alt_s); # scale = 1/20ft |
|
478 |
+ if (abs(Sy) > 15) |
|
479 |
+ Sy = 15 * abs(Sy)/Sy; # = -15 or 15 |
|
480 |
+ me.screenElements['Altitude-Trend-Indicator'] |
|
481 |
+ .setScale(1,Sy) |
|
482 |
+ .setTranslation(0, -284.5 * (Sy - 1)); |
|
483 |
+ me._last_alt_ft = alt; |
|
484 |
+ me._last_alt_s = now; |
|
460 | 485 |
settimer(func me.updateALT(getprop('instrumentation/altimeter/indicated-altitude-ft')), 0.2); |
461 | 486 |
}, |
487 |
+ _last_alt_ft : 0, |
|
488 |
+ _last_alt_s : systime(), |
|
462 | 489 |
#}}} |
463 | 490 |
|
464 | 491 |
updateHSI : func (hdg) { |
... | ... |
@@ -915,23 +915,25 @@ |
915 | 915 |
</g> |
916 | 916 |
</g> |
917 | 917 |
<g |
918 |
- id="layer23" |
|
919 |
- inkscape:label="Trent" |
|
918 |
+ id="Trends" |
|
919 |
+ inkscape:label="Trends" |
|
920 | 920 |
style="display:inline"> |
921 | 921 |
<rect |
922 |
- style="opacity:1;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
|
923 |
- id="rect5430" |
|
922 |
+ style="opacity:1;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:0.18398723;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
|
923 |
+ id="Airspeed-Trend-Indicator" |
|
924 | 924 |
width="3" |
925 |
- height="170.5" |
|
925 |
+ height="5.7716465" |
|
926 | 926 |
x="240" |
927 |
- y="114" /> |
|
927 |
+ y="278.75592" |
|
928 |
+ inkscape:label="Airspeed-Trend-Indicator" /> |
|
928 | 929 |
<rect |
929 |
- style="display:inline;opacity:1;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
|
930 |
- id="rect5434" |
|
930 |
+ style="display:inline;opacity:1;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:0.26083553;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
|
931 |
+ id="Altitude-Trend-Indicator" |
|
931 | 932 |
width="3" |
932 |
- height="170.5" |
|
933 |
+ height="11.6" |
|
933 | 934 |
x="704" |
934 |
- y="114" /> |
|
935 |
+ y="272.89999" |
|
936 |
+ inkscape:label="Altitude-Trend-Indicator" /> |
|
935 | 937 |
</g> |
936 | 938 |
<g |
937 | 939 |
id="VDI" |