diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas
index 315ed33c..b566aa0a 100644
--- a/Models/Instruments/IESI/IESI.nas
+++ b/Models/Instruments/IESI/IESI.nas
@@ -14,7 +14,6 @@ var mach_act = 0;
# props.nas nodes
var iesi_init = props.globals.initNode("/instrumentation/iesi/iesi-init", 0, "BOOL");
var iesi_reset = props.globals.initNode("/instrumentation/iesi/att-reset", 0, "DOUBLE");
-var iesi_time = props.globals.initNode("/instrumentation/iesi/iesi-init-time", 0.0, "DOUBLE");
var iesi_brt = props.globals.getNode("/controls/lighting/DU/iesi", 1);
var iesi_rate = props.globals.getNode("/systems/acconfig/options/iesi-rate", 1);
var et = props.globals.getNode("/sim/time/elapsed-sec", 1);
@@ -22,8 +21,7 @@ var aconfig = props.globals.getNode("/systems/acconfig/autoconfig-running", 1);
var airspeed = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt", 1);
var mach = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach", 1);
-var pitch = props.globals.getNode("/orientation/pitch-deg", 1);
-var roll = props.globals.getNode("/orientation/roll-deg", 1);
+var pitch = props.globals.getNode("/instrumentation/iesi/pitch-deg", 1);
var skid = props.globals.getNode("/instrumentation/iesi/slip-skid", 1);
var altitude = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft", 1);
var altitude_ind = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft-pfd", 1);
@@ -32,6 +30,8 @@ var altimeter_mode = props.globals.getNode("/instrumentation/altimeter[0]/std",
var qnh_hpa = props.globals.getNode("/instrumentation/altimeter/setting-hpa", 1);
var qnh_inhg = props.globals.getNode("/instrumentation/altimeter/setting-inhg", 1);
+var _IESITime = 0;
+
var canvas_IESI_base = {
init: func(canvas_group, file) {
var font_mapper = func(family, weight) {
@@ -68,6 +68,10 @@ var canvas_IESI_base = {
me.AI_horizon_trans = me["AI_horizon"].createTransform();
me.AI_horizon_rot = me["AI_horizon"].createTransform();
+ me._showIESI = 0;
+ me._fast = 0;
+ _IESITime = 0.0;
+
me.page = canvas_group;
return me;
@@ -81,7 +85,7 @@ var canvas_IESI_base = {
# todo transient max 0.2s
# todo 20W power consumption
if (iesi_reset.getValue() == 1) {
- if (iesi_init.getBoolValue() and iesi_time.getValue() + 90 >= et.getValue()) {
+ if (iesi_init.getBoolValue() and _IESITime + 90 >= et.getValue()) {
me._fast = 1;
} else {
me._fast = 0;
@@ -96,14 +100,14 @@ var canvas_IESI_base = {
if (aconfig.getValue() != 1 and iesi_init.getValue() != 1) {
iesi_init.setBoolValue(1);
if (me._fast) {
- iesi_time.setValue(cur_time - 80);
+ _IESITime = cur_time - 80;
me._fast = 0;
} else {
- iesi_time.setValue(cur_time);
+ _IESITime = cur_time;
}
} else if (aconfig.getValue() == 1 and iesi_init.getValue() != 1) {
iesi_init.setBoolValue(1);
- iesi_time.setValue(cur_time - 87);
+ _IESITime = cur_time - 87;
}
} else {
me._showIESI = 0;
@@ -124,10 +128,11 @@ var canvas_IESI = {
m.init(canvas_group, file);
m._cachedInhg = -99;
m._machWasAbove50 = 0;
+ m._roll = 0;
return m;
},
getKeys: func() {
- return ["IESI","IESI_Init","ASI_scale","ASI_mach","ASI_mach_decimal","AI_center","AI_horizon","AI_bank","AI_slipskid","ALT_scale","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_meters","QNH_setting","QNH_std","negText","negText2"];
+ return ["IESI","IESI_Init","ASI_scale","ASI_mach","ASI_mach_decimal","AI_center","AI_horizon","AI_bank","AI_slipskid","ALT_scale","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_meters","QNH_setting","QNH_std","negText","negText2","AI_bank_scale"];
},
update: func() {
if (qnh_inhg.getValue() != me._cachedInhg) {
@@ -135,7 +140,7 @@ var canvas_IESI = {
me.updateQNH();
}
- if (iesi_time.getValue() + 90 >= et.getValue()) {
+ if (_IESITime + 90 >= et.getValue()) {
me["IESI"].hide();
me["IESI_Init"].show();
return;
@@ -145,13 +150,13 @@ var canvas_IESI = {
}
# Airspeed
- # Subtract 30, since the scale starts at 30, but don"t allow less than 0, or more than 420 situations
+ # Subtract 30, since the scale starts at 30, but don't allow less than 0, or more than 520 knots
airspeed_act = airspeed.getValue();
mach_act = mach.getValue();
if (airspeed_act <= 30) {
ASI = 0;
- } else if (airspeed_act >= 420) {
- ASI = 390;
+ } else if (airspeed_act >= 520) {
+ ASI = 490;
} else {
ASI = airspeed_act - 30;
}
@@ -177,11 +182,12 @@ var canvas_IESI = {
}
# Attitude
+ me._roll = pts.Orientation.roll.getValue();
me.AI_horizon_trans.setTranslation(0, pitch.getValue() * 16.74);
- me.AI_horizon_rot.setRotation(-roll.getValue() * D2R, me["AI_center"].getCenter());
+ me.AI_horizon_rot.setRotation(me._roll * D2R, me["AI_center"].getCenter());
me["AI_slipskid"].setTranslation(skid.getValue(), 0);
- me["AI_bank"].setRotation(-roll.getValue() * D2R);
+ me["AI_bank"].setRotation(me._roll * D2R);
# Altitude
me.altitude = altitude.getValue();
@@ -190,6 +196,7 @@ var canvas_IESI = {
} elsif (me.altitude < -2000) {
me.altitude = -2000;
}
+
if (me.altitude < 0) {
me["negText"].show();
me["negText2"].show();
@@ -197,6 +204,7 @@ var canvas_IESI = {
me["negText"].hide();
me["negText2"].hide();
}
+
me.altOffset = me.altitude / 500 - int(me.altitude / 500);
me.middleAltText = roundaboutAlt(me.altitude / 100);
me.middleAltOffset = nil;
@@ -212,14 +220,16 @@ var canvas_IESI = {
me["ALT_three"].setText(sprintf("%03d", abs(me.middleAltText)));
me["ALT_two"].setText(sprintf("%03d", abs(me.middleAltText-5)));
me["ALT_one"].setText(sprintf("%03d", abs(me.middleAltText-10)));
+
me.altitudeText = altitude_ind.getValue();
if (me.altitude < 0 and me.altitudeText > 20) {
me.altitudeText = 20;
} elsif (me.altitude > 0 and me.altitudeText > 500) {
me.altitudeText = 500;
}
+
me["ALT_digits"].setText(sprintf("%s", me.altitudeText));
- me["ALT_meters"].setText(sprintf("%5.0f", me.altitude * 0.3048));
+ me["ALT_meters"].setText(sprintf("%5.0f", math.round(me.altitude * 0.3048, 10)));
altTens = num(right(sprintf("%02d", me.altitude), 2));
me["ALT_tens"].setTranslation(0, altTens * 3.16);
},
diff --git a/Models/Instruments/IESI/res/iesi.svg b/Models/Instruments/IESI/res/iesi.svg
index 76ad92e2..0e841834 100644
--- a/Models/Instruments/IESI/res/iesi.svg
+++ b/Models/Instruments/IESI/res/iesi.svg
@@ -41,9 +41,9 @@
inkscape:window-height="705"
id="namedview371"
showgrid="true"
- inkscape:zoom="0.70710678"
- inkscape:cx="467.77734"
- inkscape:cy="851.27387"
+ inkscape:zoom="0.45254834"
+ inkscape:cx="247.89479"
+ inkscape:cy="5057.0874"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@@ -295,24 +295,24 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4393"
- d="m 437.0192,-133.29641 113.79938,0"
+ d="m 437.0192,-133.2965 113.79938,9e-5"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:9.60000038;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
40
@@ -320,71 +320,33 @@
inkscape:label="#text975"
transform="scale(0.95383278,1.0484018)"
id="text4411"
- y="-251.90993"
+ y="-259.9371"
x="433.55658"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.75"
xml:space="preserve">50
-
- 60
-
- 70
80
50
- 60
-
- 70
-
@@ -583,12 +507,12 @@
inkscape:label="#text975"
transform="scale(0.95383278,1.0484018)"
id="text4557"
- y="1795.0366"
+ y="1558.7142"
x="433.55658"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.75"
xml:space="preserve">80
@@ -601,6 +525,14 @@
x="164.632"
y="138.78481"
inkscape:label="#rect5809" />
+
-
- 280
- 300
-
-
-
-
- 320
-
-
- 340
-
-
- 360
-
-
- 380
-
-
- 400
-
-
- 420
-
- 260
-
-
- 240
-
-
- 220
-
-
-
-
-
- 200
-
-
-
-
- 180
-
-
-
-
- 160
-
-
-
-
- 140
-
-
-
-
- 120
-
-
-
-
- 100
-
-
-
-
- 80
-
-
-
-
- 60
-
-
-
-
- 40
-
-
-
-
-
-
-
+
+
+
+
NEG
+
+ 280
+ 300
+
+
+
+
+ 320
+
+
+ 340
+
+
+ 360
+
+
+ 380
+
+
+ 400
+
+
+ 420
+
+ 260
+
+
+ 240
+
+
+ 220
+
+
+
+
+
+ 200
+
+
+
+
+ 180
+
+
+
+
+ 160
+
+
+
+
+ 140
+
+
+
+
+ 120
+
+
+
+
+ 100
+
+
+
+
+ 80
+
+
+
+
+ 60
+
+
+
+
+ 40
+
+
+
+
+
+
+
+ 440
+
+
+ 460
+
+
+ 480
+
+
+ 500
+
+
+ 520
+
+
- Slip/Skid Indicator
+ IESI Slip/Skid Indicator
false
gain
1
@@ -484,5 +484,25 @@
+
+
+ IESI Pitch
+ false
+ gain
+ 1
+
+
+
+ /orientation/pitch-deg
+ -80-65
+ -50-50
+ 0 0
+ 50 50
+ 80 65
+
+
+
+
+