... | ... |
@@ -620,9 +620,15 @@ var displayClass = { |
620 | 620 |
.hide(); |
621 | 621 |
} |
622 | 622 |
|
623 |
+ var Sy = 0; |
|
624 |
+ for (var i = 8; i >= 0; i -= 1) |
|
625 |
+ me._last_ias_Sy[i+1] = me._last_ias_Sy[i]; |
|
623 | 626 |
var now = systime(); |
624 | 627 |
# estimated speed in 6s |
625 |
- var Sy = 6 * (ias - me._last_ias_kt) / (now - me._last_ias_s); |
|
628 |
+ me._last_ias_Sy[0] = 6 * (ias - me._last_ias_kt) / (now - me._last_ias_s); |
|
629 |
+ foreach (var _Sy; me._last_ias_Sy) |
|
630 |
+ Sy += _Sy; |
|
631 |
+ Sy /= 10; |
|
626 | 632 |
if (abs(Sy) > 30) |
627 | 633 |
Sy = 30 * abs(Sy)/Sy; # = -30 or 30 |
628 | 634 |
me.screenElements['Airspeed-Trend-Indicator'] |
... | ... |
@@ -634,6 +640,7 @@ var displayClass = { |
634 | 640 |
}, |
635 | 641 |
_last_ias_kt : 0, |
636 | 642 |
_last_ias_s : systime(), |
643 |
+ _last_ias_Sy : [0,0,0,0,0,0,0,0,0,0], |
|
637 | 644 |
_ias_already_exceeded : 0, |
638 | 645 |
#}}} |
639 | 646 |
|
... | ... |
@@ -787,9 +794,15 @@ var displayClass = { |
787 | 794 |
} |
788 | 795 |
} |
789 | 796 |
me.updateSelectedALT(); |
797 |
+ var Sy = 0; |
|
798 |
+ for (var i = 8; i >= 0; i -= 1) |
|
799 |
+ me._last_alt_Sy[i+1] = me._last_alt_Sy[i]; |
|
790 | 800 |
var now = systime(); |
791 | 801 |
# altitude in 6s |
792 |
- var Sy = .3 * (alt - me._last_alt_ft) / (now - me._last_alt_s); # scale = 1/20ft |
|
802 |
+ me._last_alt_Sy[0] = .3 * (alt - me._last_alt_ft) / (now - me._last_alt_s); # scale = 1/20ft |
|
803 |
+ foreach (var _Sy; me._last_alt_Sy) |
|
804 |
+ Sy += _Sy; |
|
805 |
+ Sy /= 10; |
|
793 | 806 |
if (abs(Sy) > 15) |
794 | 807 |
Sy = 15 * abs(Sy)/Sy; # = -15 or 15 |
795 | 808 |
me.screenElements['Altitude-Trend-Indicator'] |
... | ... |
@@ -800,6 +813,7 @@ var displayClass = { |
800 | 813 |
settimer(func me.updateALT(), 0.2); |
801 | 814 |
}, |
802 | 815 |
_last_alt_ft : 0, |
816 |
+ _last_alt_Sy : [0,0,0,0,0,0,0,0,0,0], |
|
803 | 817 |
_last_alt_s : systime(), |
804 | 818 |
#}}} |
805 | 819 |
|