...
|
...
|
@@ -1068,8 +1068,17 @@ var displayClass = {
|
1068
|
1068
|
.show();
|
1069
|
1069
|
}
|
1070
|
1070
|
var deflection = cdi.getValue('course-deflection');
|
1071
|
|
- if (left(source, 3) == 'NAV')
|
|
1071
|
+ if (left(source, 3) == 'NAV') {
|
1072
|
1072
|
var scale = deflection / 4;
|
|
1073
|
+ if (cdi.getBoolValue('in-range') == 0)
|
|
1074
|
+ me.screenElements['CDI-GPS-XTK-text']
|
|
1075
|
+ .setColor(me.colors.green)
|
|
1076
|
+ .setText('RANGE')
|
|
1077
|
+ .setVisible(!me.screenElements['CDI-GPS-XTK-text'].getVisible());
|
|
1078
|
+ else
|
|
1079
|
+ me.screenElements['CDI-GPS-XTK-text']
|
|
1080
|
+ .hide();
|
|
1081
|
+ }
|
1073
|
1082
|
else { # GPS
|
1074
|
1083
|
# TODO: deviation depending of the flight phase
|
1075
|
1084
|
# for now fixed 1 dot = 1 nm course error
|
...
|
...
|
@@ -1079,6 +1088,7 @@ var displayClass = {
|
1079
|
1088
|
var abs_deflection = abs(deflection);
|
1080
|
1089
|
me.screenElements['CDI-GPS-XTK-text']
|
1081
|
1090
|
.setText(sprintf((abs_deflection < 1 ? 'XTK %.1fNM' : 'XTK %iNM'), abs_deflection))
|
|
1091
|
+ .setColor(me.colors.magenta)
|
1082
|
1092
|
.setVisible(abs_deflection > abs_deflection_max);
|
1083
|
1093
|
var scale = deflection / 2;
|
1084
|
1094
|
}
|