diff --git a/A320-main.xml b/A320-main.xml
index 6559fa2f..2e1907ff 100644
--- a/A320-main.xml
+++ b/A320-main.xml
@@ -871,6 +871,7 @@
1
1
1
+ 1
1
1
1
@@ -1615,6 +1616,10 @@
1.0
+
+ false
+
+
true
diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml
index d96f964e..39a44aa8 100644
--- a/Models/FlightDeck/a320.flightdeck.xml
+++ b/Models/FlightDeck/a320.flightdeck.xml
@@ -7235,7 +7235,129 @@
iesi_btn_plus
iesi_btn_rst
+
+
+ pick
+ iesi_btn_rst
+
+
+ false
+
+ property-assign
+ /instrumentation/iesi/att-reset-cmd
+ 1
+
+
+
+ property-assign
+ /instrumentation/iesi/att-reset-cmd
+ 0
+
+
+
+
+
+ translate
+ iesi_btn_rst
+ /instrumentation/iesi/att-reset-cmd
+ 0.0025
+
+ -0.53312
+ -0.16166
+ 0.16956
+ -0.53977
+ -0.16166
+ 0.16765
+
+
+
+
+ pick
+ iesi_btn_plus
+
+
+ true
+
+ property-assign
+ /instrumentation/iesi/plus
+ 1
+
+
+ property-adjust
+ controls/lighting/DU/iesi
+ 0.05
+ 0
+ 1
+
+
+
+ property-assign
+ /instrumentation/iesi/plus
+ 0
+
+
+
+
+
+
+ translate
+ iesi_btn_plus
+ /instrumentation/iesi/plus
+ 0.0025
+
+ -0.53312
+ -0.16166
+ 0.16956
+ -0.53977
+ -0.16166
+ 0.16765
+
+
+
+
+ pick
+ iesi_btn_minus
+
+
+ true
+
+ property-assign
+ /instrumentation/iesi/minus
+ 1
+
+
+ property-adjust
+ controls/lighting/DU/iesi
+ -0.05
+ 0
+ 1
+
+
+
+ property-assign
+ /instrumentation/iesi/minus
+ 0
+
+
+
+
+
+
+ translate
+ iesi_btn_minus
+ /instrumentation/iesi/minus
+ 0.0025
+
+ -0.53312
+ -0.16166
+ 0.16956
+ -0.53977
+ -0.16166
+ 0.16765
+
+
+
Aircraft/A320-family/Models/Effects/clock
diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas
index f7bff132..b566aa0a 100644
--- a/Models/Instruments/IESI/IESI.nas
+++ b/Models/Instruments/IESI/IESI.nas
@@ -13,16 +13,16 @@ var mach_act = 0;
# props.nas nodes
var iesi_init = props.globals.initNode("/instrumentation/iesi/iesi-init", 0, "BOOL");
-var iesi_time = props.globals.initNode("/instrumentation/iesi/iesi-init-time", 0.0, "DOUBLE");
+var iesi_reset = props.globals.initNode("/instrumentation/iesi/att-reset", 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);
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 skid = props.globals.getNode("/instrumentation/slip-skid-ball/indicated-slip-skid", 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);
@@ -30,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) {
@@ -66,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;
@@ -75,19 +81,42 @@ var canvas_IESI_base = {
},
update: func() {
cur_time = et.getValue();
+ # todo consider relay 7XB for power of DC HOT 1
+ # todo transient max 0.2s
+ # todo 20W power consumption
+ if (iesi_reset.getValue() == 1) {
+ if (iesi_init.getBoolValue() and _IESITime + 90 >= et.getValue()) {
+ me._fast = 1;
+ } else {
+ me._fast = 0;
+ }
+ iesi_init.setBoolValue(0);
+ }
+
if (systems.ELEC.Bus.dcEss.getValue() >= 25 or (systems.ELEC.Bus.dcHot1.getValue() >= 25 and airspeed.getValue() >= 50 and cur_time >= 5)) {
- IESI.page.show();
+ me._showIESI = 1;
IESI.update();
if (aconfig.getValue() != 1 and iesi_init.getValue() != 1) {
iesi_init.setBoolValue(1);
- iesi_time.setValue(cur_time);
+ if (me._fast) {
+ _IESITime = cur_time - 80;
+ me._fast = 0;
+ } else {
+ _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;
iesi_init.setBoolValue(0);
+ }
+
+ if (me._showIESI and iesi_brt.getValue() > 0.01) {
+ IESI.page.show();
+ } else {
IESI.page.hide();
}
},
@@ -98,14 +127,20 @@ var canvas_IESI = {
var m = {parents: [canvas_IESI, canvas_IESI_base]};
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"];
+ 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 (iesi_time.getValue() + 90 >= et.getValue()) {
+ if (qnh_inhg.getValue() != me._cachedInhg) {
+ me._cachedInhg = qnh_inhg.getValue();
+ me.updateQNH();
+ }
+
+ if (_IESITime + 90 >= et.getValue()) {
me["IESI"].hide();
me["IESI_Init"].show();
return;
@@ -115,22 +150,27 @@ 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;
}
me["ASI_scale"].setTranslation(0, ASI * 8.295);
if (mach_act >= 0.5) {
+ me._machWasAbove50 = 1;
+ me["ASI_mach_decimal"].show();
+ me["ASI_mach"].show();
+ } elsif (mach_act >= 0.45 and me._machWasAbove50) {
me["ASI_mach_decimal"].show();
me["ASI_mach"].show();
} else {
+ me._machWasAbove50 = 0;
me["ASI_mach_decimal"].hide();
me["ASI_mach"].hide();
}
@@ -142,14 +182,29 @@ 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(math.clamp(skid.getValue(), -7, 7) * -15, 0);
- me["AI_bank"].setRotation(-roll.getValue() * D2R);
+ me["AI_slipskid"].setTranslation(skid.getValue(), 0);
+ me["AI_bank"].setRotation(me._roll * D2R);
# Altitude
me.altitude = altitude.getValue();
+ if (me.altitude > 50000) {
+ me.altitude = 50000;
+ } elsif (me.altitude < -2000) {
+ me.altitude = -2000;
+ }
+
+ if (me.altitude < 0) {
+ me["negText"].show();
+ me["negText2"].show();
+ } else {
+ me["negText"].hide();
+ me["negText2"].hide();
+ }
+
me.altOffset = me.altitude / 500 - int(me.altitude / 500);
me.middleAltText = roundaboutAlt(me.altitude / 100);
me.middleAltOffset = nil;
@@ -166,15 +221,17 @@ var canvas_IESI = {
me["ALT_two"].setText(sprintf("%03d", abs(me.middleAltText-5)));
me["ALT_one"].setText(sprintf("%03d", abs(me.middleAltText-10)));
- me["ALT_digits"].setText(sprintf("%s", altitude_ind.getValue()));
- me["ALT_meters"].setText(sprintf("%5.0f", me.altitude * 0.3048));
- altTens = num(right(sprintf("%02d", altitude.getValue()), 2));
- me["ALT_tens"].setTranslation(0, altTens * 3.16);
-
- if (qnh_inhg.getValue() != me._cachedInhg) {
- me._cachedInhg = qnh_inhg.getValue();
- me.updateQNH();
+ 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", math.round(me.altitude * 0.3048, 10)));
+ altTens = num(right(sprintf("%02d", me.altitude), 2));
+ me["ALT_tens"].setTranslation(0, altTens * 3.16);
},
updateQNH: func() {
if (altimeter_mode.getBoolValue()) {
@@ -231,4 +288,4 @@ var roundabout = func(x) {
var roundaboutAlt = func(x) {
var y = x * 0.2 - int(x * 0.2);
return y < 0.5 ? 5 * int(x * 0.2) : 5 + 5 * int(x * 0.2);
-};
+};
\ No newline at end of file
diff --git a/Models/Instruments/IESI/IESI.xml b/Models/Instruments/IESI/IESI.xml
index aba1e064..4705e023 100644
--- a/Models/Instruments/IESI/IESI.xml
+++ b/Models/Instruments/IESI/IESI.xml
@@ -19,15 +19,15 @@
-
+
diff --git a/Models/Instruments/IESI/res/iesi.svg b/Models/Instruments/IESI/res/iesi.svg
index 6e50dc10..0e841834 100644
--- a/Models/Instruments/IESI/res/iesi.svg
+++ b/Models/Instruments/IESI/res/iesi.svg
@@ -12,7 +12,7 @@
viewBox="0 0 1024 1024"
version="1.1"
id="svg2"
- inkscape:version="0.91 r13725"
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="iesi.svg">
@@ -37,17 +37,17 @@
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
- inkscape:window-width="1920"
- inkscape:window-height="1030"
+ inkscape:window-width="1366"
+ inkscape:window-height="705"
id="namedview371"
- showgrid="false"
- inkscape:zoom="1"
- inkscape:cx="593.66324"
- inkscape:cy="533.76317"
- inkscape:window-x="1592"
+ showgrid="true"
+ inkscape:zoom="0.45254834"
+ inkscape:cx="247.89479"
+ inkscape:cy="5057.0874"
+ inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
- inkscape:current-layer="svg2"
+ inkscape:current-layer="IESI"
showguides="true"
inkscape:snap-global="false"
units="pt"
@@ -62,6 +62,90 @@
originx="0"
originy="0" />
+
+
+ INIT 90s
+
+ SPD
+
+ ALT
+
+ ATT
+
20
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:72px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">20
-
-
40
-
+ y="-102.35725"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:72px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">40
-
-
50
-
-
-
-
- 60
-
-
-
-
- 70
-
-
-
80
-
-
-
-
- 90
-
+ y="-496.30688"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:72px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">80
10
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:72px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">10
30
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:72px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">30
-
-
-
-
-
-
50
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:72px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">50
-
-
-
- 60
-
-
-
-
- 70
-
-
-
-
80
-
-
-
-
- 90
+
000
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:75px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">000
000
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:75px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">000
-
- 280
- 300
-
-
-
-
- 320
-
-
- 340
-
-
- 360
-
-
- 380
-
-
- 400
-
-
- 420
-
- 260
-
-
- 240
-
-
- 220
-
-
-
-
-
- 200
-
-
-
-
- 180
-
-
-
-
- 160
-
-
-
-
- 140
-
-
-
-
- 120
-
-
-
-
- 100
-
-
-
-
- 80
-
-
-
-
- 60
-
-
-
-
- 40
-
-
-
-
-
-
-
00
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:70px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">00
 40200080604020008060
00
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:74px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">00
+
+
+
+
+ NEG
+ 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
+
+
1013/29.92
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:86px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.75">1013/29.92
STD
-
-
- INIT 90s
-
- SPD
-
- ALT
-
- ATT
-
diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas
index a637ebdf..ca724360 100644
--- a/Models/Instruments/PFD/PFD.nas
+++ b/Models/Instruments/PFD/PFD.nas
@@ -36,7 +36,7 @@ var thr2 = props.globals.getNode("/controls/engines/engine[1]/throttle-pos", 1);
var wow0 = props.globals.getNode("/gear/gear[0]/wow");
var wow1 = props.globals.getNode("/gear/gear[1]/wow");
var wow2 = props.globals.getNode("/gear/gear[2]/wow");
-var pitch = props.globals.getNode("/orientation/pitch-deg", 1);
+var pitch = props.globals.getNode("/instrumentation/pfd/pitch-deg-non-linear", 1);
var roll = props.globals.getNode("/orientation/roll-deg", 1);
var elapsedtime = props.globals.getNode("/sim/time/elapsed-sec", 1);
var du1_lgt = props.globals.getNode("/controls/lighting/DU/du1", 1);
diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg
index 9dcde382..6aaff09f 100644
--- a/Models/Instruments/PFD/res/pfd.svg
+++ b/Models/Instruments/PFD/res/pfd.svg
@@ -8,7 +8,7 @@
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="pfd.svg"
- inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
id="svg2"
version="1.1"
viewBox="0 0 1024 1024"
@@ -37,17 +37,17 @@
units="pt"
inkscape:snap-global="false"
showguides="true"
- inkscape:current-layer="svg2"
+ inkscape:current-layer="AI_group"
inkscape:window-maximized="1"
- inkscape:window-y="18"
- inkscape:window-x="3840"
- inkscape:cy="557.03495"
- inkscape:cx="619.57094"
- inkscape:zoom="0.53867065"
+ inkscape:window-y="-8"
+ inkscape:window-x="-8"
+ inkscape:cy="0.92547661"
+ inkscape:cx="575.94271"
+ inkscape:zoom="1.0773413"
showgrid="true"
id="namedview371"
- inkscape:window-height="1062"
- inkscape:window-width="1920"
+ inkscape:window-height="705"
+ inkscape:window-width="1366"
inkscape:pageshadow="2"
inkscape:pageopacity="1"
guidetolerance="10"
@@ -105,7 +105,7 @@
inkscape:label="#g5492"
id="AI_background">
+ style="opacity:1;fill:#368acd;fill-opacity:1;stroke:none;stroke-width:2.58922005;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ id="AI_scale"
+ inkscape:label="#g1094">
+ inkscape:label="#g1636">
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ d="m 375.0679,151.98345 146.37368,-3.9e-4"
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20011425;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ d="m 365.50874,-25.418749 165.49199,4.5e-4"
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20024991;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
-
-
-
-
+
+ 10
+ 10
+ 20
+ 20
+ 30
+ 30
+ 50
+ 50
+ 80
+ 80
+
+
+ 10
+ 10
+ 20
+ 20
+ 30
+ 30
+ 50
+ 50
+ 80
+ 80
+
+ inkscape:label="#g1754">
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
-
-
-
-
-
-
-
-
-
+ d="m 393.624,876.36943 109.26112,4e-5"
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ d="M 375.59592,994.63672 H 520.9132"
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 10
- 10
- 20
- 20
- 30
- 30
- 40
- 40
- 50
- 50
- 60
- 60
- 70
- 70
- 80
- 80
- 90
- 90
-
-
- 10
- 10
- 20
- 20
- 30
- 30
- 40
- 40
- 50
- 50
- 60
- 60
- 70
- 70
- 80
- 80
- 90
- 90
-
-
+
+
+
+
+
+
+ d="m 370.5312,169.07528 h 21.6616"
+ style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
@@ -1074,8 +604,8 @@
id="g4951"
transform="translate(133.78495)">
@@ -1083,15 +613,15 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4956"
- d="m 370.53103,162.42242 h 21.66136"
- style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ d="m 370.53103,177.1501 h 21.66136"
+ style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
@@ -1099,8 +629,8 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4968"
- d="m 370.53103,162.42242 h 21.66136"
- style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ d="m 370.53103,147.50219 h 21.66136"
+ style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ d="m 370.5312,139.42737 h 21.6616"
+ style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
@@ -1124,54 +654,54 @@
inkscape:label="#g4999"
id="AI_pitch_lim_X">
X
X
X
X
@@ -1182,7 +712,7 @@
transform="translate(0,-97.082454)"
inkscape:label="#g4918">
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20000005;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="opacity:1;fill:#368acd;fill-opacity:1;stroke:none;stroke-width:2.58922005;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.73024011;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:4.30556011;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:8.10006046;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#c9cc15;stroke-width:3.99993992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
@@ -1495,9 +1025,9 @@
inkscape:connector-curvature="0"
id="path3932"
d="m 340.35189,239.5184 5.62182,14.20878"
- style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
0000
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:45px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.65757698">0000
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
+ style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
0) {
+ debug.printerror(errs);
+ me.failure(i);
+ }
+ });
},
failure: func(i) {
mcdu.mcdu_message(i, "SIMBRIEF DOWNLOAD FAILED");
@@ -25,141 +32,198 @@ var SimbriefParser = {
if (data != nil) {
if (data.getChild("OFP") == nil) {
print("XML file " ~ xml ~ " not a valid Simbrief file");
+ me.failure(i);
+ return;
} else {
me.node = data;
- me.parseOFP();
- mcdu.mcdu_message(i, "AOC ACT F-PLN UPLINK");
+ if (me.parseOFP() == nil) {
+ print("Failure to parse Simbrief OFP");
+ me.failure(i);
+ } else {
+ mcdu.mcdu_message(i, "AOC ACT F-PLN UPLINK");
+ }
}
} else {
print("Error reading " ~ xml);
+ me.failure(i);
}
},
+ tryFindByCoord: func(coords, id, type) {
+ var result = nil;
+ if (type == "nav") {
+ result = findNavaidsByID(id);
+ } elsif (type == "fix") {
+ result = findFixesByID(id);
+ } else {
+ return nil;
+ }
+
+ if (size(result) == 0) { return nil; }
+ foreach (var test; result) {
+ if (math.abs(test.lat - coords.lat()) < 0.01666666666 and math.abs(test.lon - coords.lon()) < 0.01666666666) {
+ return test;
+ }
+ }
+ return nil;
+ },
+ buildFlightplan: func() {
+ # Flightplan stuff
+ fmgc.flightPlanController.flightplans[3] = createFlightplan();
+ fmgc.flightPlanController.flightplans[3].cleanPlan();
+
+ # INITA
+ var departureID = me.OFP.getNode("origin/icao_code").getValue();
+ var departures = findAirportsByICAO(departureID);
+ var destinationID = me.OFP.getNode("destination/icao_code").getValue();
+ var destinations = findAirportsByICAO(destinationID);
+
+ if (departures != nil and size(departures) != 0 and destinations != nil and size(destinations) != 0) {
+ fmgc.flightPlanController.flightplans[3].departure = departures[0];
+ fmgc.flightPlanController.flightplans[3].destination = destinations[0];
+ fmgc.FMGCInternal.arrApt = destinationID;
+ fmgc.FMGCInternal.depApt = departureID;
+
+ fmgc.FMGCInternal.toFromSet = 1;
+ fmgc.FMGCNodes.toFromSet.setValue(1);
+
+ fmgc.updateArptLatLon();
+ fmgc.updateARPT();
+ } else {
+ me.cleanupInvalid();
+ return nil;
+ }
+
+ var runwayStore = departures[0].runways[me.OFP.getNode("origin/plan_rwy").getValue()];
+ if (runwayStore != nil) {
+ fmgc.flightPlanController.flightplans[3].departure_runway = runwayStore;
+ }
+
+ runwayStore = destinations[0].runways[me.OFP.getNode("destination/plan_rwy").getValue()];
+ if (runwayStore != nil) {
+ fmgc.flightPlanController.flightplans[3].destination_runway = runwayStore;
+ }
+
+ var alternateID = me.OFP.getNode("alternate/icao_code").getValue();
+ var alternates = findAirportsByICAO(alternateID);
+ if (alternates != nil and size(alternates) != 0) {
+ fmgc.FMGCInternal.altAirport = alternateID;
+ fmgc.FMGCInternal.altAirportSet = 1;
+ }
+
+ var wps = [];
+ var ofpNavlog = me.OFP.getNode("navlog");
+ var ofpFixes = ofpNavlog.getChildren("fix");
+ var ident = "";
+ var coords = nil;
+ var wp = nil;
+ var _foundSID = 0;
+ var _foundSTAR = 0;
+ var _foundTOC = 0;
+ var _foundTOD = 0;
+ var _sid = nil;
+ var _star = nil;
+
+ foreach (var ofpFix; ofpFixes) {
+ if (ofpFix.getNode("is_sid_star").getBoolValue()) {
+ if (!_foundSID) {
+ _sid = fmgc.flightPlanController.flightplans[3].departure.getSid(ofpFix.getNode("via_airway").getValue());
+ if (_sid != nil) {
+ _foundSID = 1;
+ }
+ }
+ }
+
+ if (ofpFix.getNode("is_sid_star").getBoolValue()) {
+ if (!_foundSTAR) {
+ _star = fmgc.flightPlanController.flightplans[3].destination.getStar(ofpFix.getNode("via_airway").getValue());
+ if (_star != nil) {
+ _foundSTAR = 1;
+ }
+ }
+ }
+
+ if (ofpFix.getNode("is_sid_star").getBoolValue() and _foundSID and _foundSTAR) {
+ continue;
+ } # todo what happens if you don't find one but find the other
+
+ ident = ofpFix.getNode("ident").getValue();
+ if (find(departureID, ident) != -1 or find(destinationID, ident) != -1) {
+ continue;
+ }
+
+ if (ident == "TOC") {
+ _foundTOC = 1;
+ continue;
+ }
+
+ if (ident == "TOD") {
+ _foundTOC = 1;
+ continue;
+ }
+
+ coords = geo.Coord.new();
+ coords.set_latlon(
+ ofpFix.getNode("pos_lat").getValue(),
+ ofpFix.getNode("pos_long").getValue());
+
+ wp = me.tryFindByCoord(coords,ident,"fix");
+ wp = me.tryFindByCoord(coords,ident,"nav");
+ if (wp == nil) {
+ wp = createWP(coords, ident);
+ }
+
+ append(wps, wp);
+ }
+
+ fmgc.flightPlanController.flightplans[3].insertWaypoints(wps, 1);
+ if (_sid != nil) {
+ fmgc.flightPlanController.flightplans[3].sid = _sid;
+ }
+ if (_star != nil) {
+ fmgc.flightPlanController.flightplans[3].star = _star;
+ }
+ fmgc.flightPlanController.destroyTemporaryFlightPlan(3, 1);
+ fmgc.windController.updatePlans();
+ fmgc.updateRouteManagerAlt();
+
+ return 1;
+ },
parseOFP: func() {
me.OFP = me.node.getChild("OFP");
- me.store1 = nil;
- me.store2 = nil;
-
- me.store1 = me.OFP.getChild("params");
- var units = me.store1.getChild("units").getValue();
-
- me.store1 = me.OFP.getChild("general");
- me.store2 = me.OFP.getChild("alternate");
- fmgc.FMGCInternal.flightNum = (me.store1.getChild("icao_airline").getValue() or "") ~ (me.store1.getChild("flight_number").getValue() or "");
+ if (me.buildFlightplan() == nil) {
+ return nil;
+ }
+ fmgc.FMGCInternal.flightNum = (me.OFP.getNode("general/icao_airline").getValue() or "") ~ (me.OFP.getNode("general/flight_number").getValue() or "");
fmgc.FMGCInternal.flightNumSet = 1;
- fmgc.FMGCInternal.costIndex = me.store1.getChild("costindex").getValue();
+ fmgc.FMGCInternal.costIndex = me.OFP.getNode("general/costindex").getValue();
fmgc.FMGCInternal.costIndexSet = 1;
fmgc.FMGCNodes.costIndex.setValue(fmgc.FMGCInternal.costIndex);
- fmgc.FMGCInternal.tropo = me.store1.getChild("avg_tropopause").getValue();
+ fmgc.FMGCInternal.tropo = me.OFP.getNode("general/avg_tropopause").getValue();
fmgc.FMGCInternal.tropoSet = 1;
- fmgc.FMGCInternal.crzFt = me.store1.getChild("initial_altitude").getValue();
- fmgc.FMGCInternal.crzFl = me.store1.getChild("initial_altitude").getValue() / 100;
- fmgc.altvert();
- fmgc.FMGCInternal.crzSet = 1;
+
+ # Set cruise altitude
+ fmgc.FMGCInternal.crzFt = me.OFP.getNode("general/initial_altitude").getValue();
+ fmgc.FMGCInternal.crzFl = fmgc.FMGCInternal.crzFt / 100;
+ fmgc.FMGCInternal.crzTemp = (((fmgc.FMGCInternal.crzFt / 1000) * -2) + 15) + me.OFP.getNode("general/avg_temp_dev").getValue();
+ fmgc.FMGCInternal.crzProg = fmgc.FMGCInternal.crzFt / 100;
mcdu.updateCrzLvlCallback();
- fmgc.FMGCInternal.crzTemp = (((me.store1.getChild("initial_altitude").getValue() / 1000) * -2) + 15) + me.store1.getChild("avg_temp_dev").getValue();
fmgc.FMGCInternal.crzTempSet = 1;
- fmgc.FMGCInternal.crzProg = me.store1.getChild("initial_altitude").getValue() / 100;
- if (num(me.store1.getChild("avg_wind_comp").getValue()) >= 0) {
- fmgc.FMGCInternal.tripWind = "TL" ~ abs(me.store1.getChild("avg_wind_comp").getValue());
+ fmgc.FMGCInternal.crzSet = 1;
+ fmgc.altvert();
+
+ var windComp = me.OFP.getNode("general/avg_wind_comp").getValue();
+ if (num(windComp) >= 0) {
+ fmgc.FMGCInternal.tripWind = "TL" ~ abs(windComp);
} else {
- fmgc.FMGCInternal.tripWind = "HD" ~ abs(me.store1.getChild("avg_wind_comp").getValue());
+ fmgc.FMGCInternal.tripWind = "HD" ~ abs(windComp);
}
- fmgc.FMGCInternal.tripWindValue = abs(me.store1.getChild("avg_wind_comp").getValue());
-
- fmgc.FMGCInternal.altAirport = me.store2.getChild("icao_code").getValue();
- fmgc.FMGCInternal.altAirportSet = 1;
-
- # Flightplan stuff
- fmgc.flightPlanController.flightplans[3] = createFlightplan();
-
- # INITA
- me.store1 = me.OFP.getChild("origin");
- me.store2 = me.OFP.getChild("destination");
-
- fmgc.FMGCInternal.depApt = me.store1.getChild("icao_code").getValue();
- fmgc.FMGCInternal.arrApt = me.store2.getChild("icao_code").getValue();
- fmgc.FMGCInternal.toFromSet = 1;
- fmgc.FMGCNodes.toFromSet.setValue(1);
- fmgc.flightPlanController.flightplans[3].departure = airportinfo(fmgc.FMGCInternal.depApt);
- fmgc.flightPlanController.flightplans[3].destination = airportinfo(fmgc.FMGCInternal.arrApt);
- fmgc.FMGCInternal.altSelected = 0;
- fmgc.updateArptLatLon();
- fmgc.updateARPT();
- call(func() {
- fmgc.flightPlanController.flightplans[3].departure_runway = airportinfo(fmgc.FMGCInternal.depApt).runways[me.store1.getChild("plan_rwy").getValue()];
- fmgc.flightPlanController.flightplans[3].destination_runway = airportinfo(fmgc.FMGCInternal.arrApt).runways[me.store2.getChild("plan_rwy").getValue()];
- });
-
- me.store1 = me.OFP.getChild("navlog").getChildren();
- if (size(me.store1) != 0) {
- var firstIsSID = 0;
- var SIDID = "";
- if (me.store1[0].getChild("is_sid_star").getValue() == 1) {
- if (fmgc.flightPlanController.flightplans[3].departure.getSid(me.store1[0].getChild("via_airway").getValue()) != nil) {
- firstIsSID = 1;
- SIDID = me.store1[0].getChild("via_airway").getValue();
- }
- }
- var lastIsSTAR = 0;
- var STARID = "";
- if (me.store1[-1].getChild("is_sid_star").getValue() == 1) {
- if (fmgc.flightPlanController.flightplans[3].destination.getStar(me.store1[-1].getChild("via_airway").getValue()) != nil) {
- lastIsSTAR = 1;
- STARID = me.store1[-1].getChild("via_airway").getValue();
- }
- }
-
- var lastSIDIndex = -999;
- var firstSTARIndex = -999;
- var TOCinSIDflag = 0;
- var TODinSTARflag = 0;
- for (var i = 0; i < size(me.store1); i = i + 1) {
- if (firstIsSID) {
- if (me.store1[i].getChild("is_sid_star").getValue() == 0 or me.store1[i].getChild("via_airway").getValue() != SIDID) {
- lastSIDIndex = i - 1;
- break;
- }
- }
- }
-
- for (var i = lastSIDIndex == -999 ? 0 : lastSIDIndex; i < size(me.store1); i = i + 1) {
- if (STARID != "") {
- if (me.store1[i].getChild("is_sid_star").getValue() == 1 and me.store1[i].getChild("via_airway").getValue() == STARID) {
- firstSTARIndex = i;
- break;
- }
- }
- }
-
- var max = firstSTARIndex == -999 ? size(me.store1) - 1 : firstSTARIndex - 1;
- for (var i = lastSIDIndex == -999 ? 0 : lastSIDIndex + 2; i < max; i = i + 1) {
- if (me.store1[i].getChild("ident").getValue() == "TOC" or me.store1[i].getChild("ident").getValue() == "TOD") { continue; }
- var coord = geo.Coord.new();
- coord.set_latlon(me.store1[i].getChild("pos_lat").getValue(), me.store1[i].getChild("pos_long").getValue());
- var fixes = findFixesByID(coord, me.store1[i].getChild("ident").getValue());
- var navaids = findNavaidsByID(coord, me.store1[i].getChild("ident").getValue());
- if (size(fixes) > 0) {
- fmgc.flightPlanController.flightplans[3].appendWP(createWPFrom(fixes[0]));
- } else if (size(navaids) > 0) {
- fmgc.flightPlanController.flightplans[3].appendWP(createWPFrom(navaids[0]));
- } else {
- var WP = createWP(coord, me.store1[i].getChild("ident").getValue());
- fmgc.flightPlanController.flightplans[3].appendWP(WP);
- }
- }
- fmgc.flightPlanController.flightplans[3].sid = fmgc.flightPlanController.flightplans[3].departure.getSid(SIDID);
- fmgc.flightPlanController.flightplans[3].star = fmgc.flightPlanController.flightplans[3].destination.getStar(STARID);
- }
- fmgc.flightPlanController.destroyTemporaryFlightPlan(3, 1);
-
- fmgc.windController.updatePlans();
- fmgc.updateRouteManagerAlt();
+ fmgc.FMGCInternal.tripWindValue = abs(windComp);
# INITB
me.store1 = me.OFP.getChild("fuel");
me.store2 = me.OFP.getChild("weights");
- if (units == "lbs") {
+ if (me.OFP.getNode("params/units").getValue() == "lbs") {
fmgc.FMGCInternal.taxiFuel = me.store1.getChild("taxi").getValue() / 1000;
fmgc.FMGCInternal.taxiFuelSet = 1;
fmgc.FMGCInternal.altFuel = me.store1.getChild("alternate_burn").getValue() / 1000;
@@ -206,5 +270,7 @@ var SimbriefParser = {
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
+
+ return 1;
},
};
\ No newline at end of file
diff --git a/Systems/a320-misc.xml b/Systems/a320-misc.xml
index 119da28e..22dddba9 100644
--- a/Systems/a320-misc.xml
+++ b/Systems/a320-misc.xml
@@ -2,7 +2,7 @@
-
+
@@ -28,5 +28,15 @@
+
+
+
+
+ /instrumentation/iesi/att-reset-cmd
+ 0.5
+ 100
+
+
+
diff --git a/Systems/pfd.xml b/Systems/pfd.xml
index a11265d7..00b3ee6b 100644
--- a/Systems/pfd.xml
+++ b/Systems/pfd.xml
@@ -309,6 +309,33 @@
0.32
+
+ Pitch PFD
+ gain
+ 1
+
+
+
+ /orientation/pitch-deg
+ -90.0-57.50
+ -80.0-47.50
+ -50.0-32.50
+ -30.0-22.50
+ -20.0-17.50
+ -15.0-13.75
+ -10.0-10.00
+ 0.0 0.00
+ 27.5 27.50
+ 30.0 28.75
+ 50.0 38.75
+ 80.0 53.75
+ 90.0 63.75
+
+
+
+
+
+
Ground Horizon
gain
@@ -464,5 +491,45 @@
0.16
+
+
+ IESI Slip/Skid Indicator
+ false
+ gain
+ 1
+
+
+
+ /fdm/jsbsim/accelerations/Ny
+ -0.20-105
+ -0.01 0
+ 0.00 0
+ 0.01 0
+ 0.20 105
+
+
+
+
+
+
+
+ IESI Pitch
+ false
+ gain
+ 1
+
+
+
+ /orientation/pitch-deg
+ -80-65
+ -50-50
+ 0 0
+ 50 50
+ 80 65
+
+
+
+
+