From 3a64392d511bab6f5e5b7d6db9091f64cf104bc8 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sun, 11 Oct 2020 14:19:05 +0100 Subject: [PATCH 01/14] New PFD non-linear pitch scale --- Models/Instruments/PFD/res/pfd.svg | 1340 +++++++++------------------- 1 file changed, 417 insertions(+), 923 deletions(-) diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg index 88060ede..b9a14aba 100644 --- a/Models/Instruments/PFD/res/pfd.svg +++ b/Models/Instruments/PFD/res/pfd.svg @@ -128,929 +128,423 @@ style="opacity:1;fill:#368acd;fill-opacity:1;stroke:none;stroke-width:2.58922;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - + id="AI_scale" + inkscape:label="#g1823"> + + + + + + + + + + + + + + + + + + 10 + 10 + 20 + 20 + 30 + 30 + 50 + 50 + 80 + 80 + + + 10 + 10 + 20 + 20 + 30 + 30 + 50 + 50 + 80 + 80 + + + + + + + + + + + + + Date: Sun, 11 Oct 2020 16:56:03 +0100 Subject: [PATCH 02/14] PFD: move the X X and = = --- Models/Instruments/PFD/res/pfd.svg | 1038 ++++++++++++++-------------- 1 file changed, 519 insertions(+), 519 deletions(-) diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg index b9a14aba..fc35b578 100644 --- a/Models/Instruments/PFD/res/pfd.svg +++ b/Models/Instruments/PFD/res/pfd.svg @@ -37,13 +37,13 @@ units="pt" inkscape:snap-global="false" showguides="true" - inkscape:current-layer="svg2" + inkscape:current-layer="AI_group" inkscape:window-maximized="1" inkscape:window-y="-8" inkscape:window-x="-8" - inkscape:cy="567.21927" - inkscape:cx="992.76655" - inkscape:zoom="1.0773413" + inkscape:cy="450.91327" + inkscape:cx="806.70039" + inkscape:zoom="0.38089767" showgrid="true" id="namedview371" inkscape:window-height="705" @@ -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" /> - - - - - - - - - - - - - - - - - - 10 - 10 - 20 - 20 - 30 - 30 - 50 - 50 - 80 - 80 - - - 10 - 10 - 20 - 20 - 30 - 30 - 50 - 50 - 80 - 80 - - - - - - - - - - - - - + id="AI_scale" + inkscape:label="#g1823"> + + + + + + + + + + + + + + + + + + 10 + 10 + 20 + 20 + 30 + 30 + 50 + 50 + 80 + 80 + + + 10 + 10 + 20 + 20 + 30 + 30 + 50 + 50 + 80 + 80 + + + + + + + + + + + + + + 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" /> @@ -568,8 +568,8 @@ id="g4951" transform="translate(133.78495)"> @@ -577,15 +577,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" /> @@ -593,8 +593,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" /> @@ -618,54 +618,54 @@ inkscape:label="#g4999" id="AI_pitch_lim_X"> X X X X @@ -676,7 +676,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:none;fill-opacity:1;stroke:#c9d121;stroke-width:3.54375005;stroke-linecap:square;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" /> @@ -987,9 +987,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" /> Date: Sun, 11 Oct 2020 17:35:37 +0100 Subject: [PATCH 03/14] Add non-linear pitch scale to PFD. --- Models/Instruments/PFD/PFD.nas | 2 +- Models/Instruments/PFD/res/pfd.svg | 10 +++++----- Systems/pfd.xml | 28 ++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index cf95ab3d..dd32ec60 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -34,7 +34,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 fc35b578..730a8213 100644 --- a/Models/Instruments/PFD/res/pfd.svg +++ b/Models/Instruments/PFD/res/pfd.svg @@ -37,13 +37,13 @@ units="pt" inkscape:snap-global="false" showguides="true" - inkscape:current-layer="AI_group" + inkscape:current-layer="svg2" inkscape:window-maximized="1" inkscape:window-y="-8" inkscape:window-x="-8" - inkscape:cy="450.91327" - inkscape:cx="806.70039" - inkscape:zoom="0.38089767" + inkscape:cy="1119.7146" + inkscape:cx="365.0214" + inkscape:zoom="0.53867065" showgrid="true" id="namedview371" inkscape:window-height="705" @@ -197,7 +197,7 @@ sodipodi:nodetypes="cc" inkscape:connector-curvature="0" id="path5123" - d="M 393.624,270.25049 H 502.88512" + d="m 393.62399,270.25049 109.2615,-2.9e-4" 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" /> 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 + 30.0 28.75 + 50.0 38.75 + 80.0 53.75 + 90.0 63.75 +
+
+ + /instrumentation/pfd/pitch-deg-non-linear + -57.50 + 63.75 +
+ Ground Horizon gain From 202fe2b3d0160148378f2e714ccc0ad2fb75b75a Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sun, 11 Oct 2020 19:28:13 +0100 Subject: [PATCH 04/14] Better schedules (thanks Octal!) --- Systems/pfd.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Systems/pfd.xml b/Systems/pfd.xml index bc3d80f0..a1d4d786 100644 --- a/Systems/pfd.xml +++ b/Systems/pfd.xml @@ -325,6 +325,7 @@ -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 @@ -333,8 +334,6 @@ /instrumentation/pfd/pitch-deg-non-linear - -57.50 - 63.75 From df3ac8ed33d0868b41cbd39601465b585c46aba0 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sun, 11 Oct 2020 20:13:06 +0100 Subject: [PATCH 05/14] Arrowssss --- Models/Instruments/PFD/res/pfd.svg | 594 +++++++++++++++-------------- 1 file changed, 306 insertions(+), 288 deletions(-) diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg index 730a8213..8ac80395 100644 --- a/Models/Instruments/PFD/res/pfd.svg +++ b/Models/Instruments/PFD/res/pfd.svg @@ -37,13 +37,13 @@ units="pt" inkscape:snap-global="false" showguides="true" - inkscape:current-layer="svg2" + inkscape:current-layer="AI_group" inkscape:window-maximized="1" inkscape:window-y="-8" inkscape:window-x="-8" - inkscape:cy="1119.7146" - inkscape:cx="365.0214" - inkscape:zoom="0.53867065" + inkscape:cy="1400.0748" + inkscape:cx="383.66423" + inkscape:zoom="0.38089767" showgrid="true" id="namedview371" inkscape:window-height="705" @@ -129,421 +129,439 @@
+ inkscape:label="#g1094"> + id="AI_sky_scale" + inkscape:label="#g1636"> + id="path4684" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,521.5684 h 28.50952" + 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" /> - + + id="path5071" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,462.4348 h 28.50952" + 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" /> + id="path5075" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="M 393.624,373.7344 H 502.88512" + 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 420.6008,314.60083 h 55.30952" + 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" /> + id="path5119" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 433.99987,285.034 h 28.50952" + 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" /> + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="m 393.62399,151.98345 109.2615,-4.5e-4" + 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.62399,-25.418542 109.2615,2.93e-4" + 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" /> + id="path4505" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + id="AI_sky_num" + inkscape:label="#g1620"> 10 + x="381.24359" + y="480.29712" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;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 10 - 20 - 20 - 30 - 30 - 50 - 50 - 80 - 80 - - - 10 - 10 20 20 30 30 50 50 + 80 + 80 + + + 10 + 10 80 + y="790.51678" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;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 20 + 30 + 30 + 50 + 50 + 80 + 80 + id="AI_ground_scale" + inkscape:label="#g1754"> + d="m 433.99987,639.8352 h 28.50952" + 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 420.6008,669.402 h 55.30952" + 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" /> + id="path4509" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + d="M 393.624,728.5356 H 502.88512" + 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" /> + id="path4527" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + + - - + + + Date: Mon, 12 Oct 2020 18:52:49 +0100 Subject: [PATCH 06/14] Bottom arrow --- Models/Instruments/PFD/res/pfd.svg | 58 ++++++++++++++++-------------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg index 8ac80395..d6b0a960 100644 --- a/Models/Instruments/PFD/res/pfd.svg +++ b/Models/Instruments/PFD/res/pfd.svg @@ -37,13 +37,13 @@ units="pt" inkscape:snap-global="false" showguides="true" - inkscape:current-layer="AI_group" + inkscape:current-layer="svg2" inkscape:window-maximized="1" inkscape:window-y="-8" inkscape:window-x="-8" - inkscape:cy="1400.0748" - inkscape:cx="383.66423" - inkscape:zoom="0.38089767" + inkscape:cy="113.72856" + inkscape:cx="503.22397" + inkscape:zoom="1.5235907" showgrid="true" id="namedview371" inkscape:window-height="705" @@ -203,14 +203,14 @@ sodipodi:nodetypes="cc" inkscape:connector-curvature="0" id="path5139" - d="m 393.62399,151.98345 109.2615,-4.5e-4" - 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.98339 146.37368,-3.3e-4" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20011401;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + d="m 365.50866,-25.418492 165.49216,1.93e-4" + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20009971;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> 50 50 80 80 @@ -436,14 +436,14 @@ 50 50 80 80 @@ -529,11 +529,11 @@ sodipodi:nodetypes="cc" inkscape:connector-curvature="0" id="path4571" - d="M 393.624,994.63672 H 502.88512" + 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" /> @@ -562,6 +562,12 @@ id="path1765" d="m 388.6311,-3.3620208 h 19.87455 l 39.74909,82.9247548 39.74908,-82.9247548 h 19.87455 L 448.25474,128.16842 Z" style="fill:none;stroke:#ff0000;stroke-width:8.55000019;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + Date: Mon, 12 Oct 2020 19:29:31 +0100 Subject: [PATCH 07/14] Last set of arrows --- Models/Instruments/PFD/res/pfd.svg | 34 ++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg index d6b0a960..2fbb876d 100644 --- a/Models/Instruments/PFD/res/pfd.svg +++ b/Models/Instruments/PFD/res/pfd.svg @@ -41,9 +41,9 @@ inkscape:window-maximized="1" inkscape:window-y="-8" inkscape:window-x="-8" - inkscape:cy="113.72856" - inkscape:cx="503.22397" - inkscape:zoom="1.5235907" + inkscape:cy="15.365836" + inkscape:cx="507.05751" + inkscape:zoom="0.76179535" showgrid="true" id="namedview371" inkscape:window-height="705" @@ -204,13 +204,13 @@ inkscape:connector-curvature="0" id="path5139" d="m 375.0679,151.98339 146.37368,-3.3e-4" - style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20011401;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.20011415;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.19999991;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> @@ -555,19 +555,31 @@ inkscape:connector-curvature="0" id="path1023" d="m 488.00383,979.59269 h -13.2497 l -26.49939,-55.28317 -26.49939,55.28317 h -13.2497 l 39.74909,-87.68731 z" - style="fill:none;stroke:#ff0000;stroke-width:6.02193165;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#ff0000;stroke-width:5.69999983;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + d="m 388.6311,-3.3619999 19.87455,-2.09e-5 39.74909,82.9247548 39.74908,-82.9247548 h 19.87455 L 448.25474,128.16842 Z" + style="fill:none;stroke:#ff0000;stroke-width:6.5999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + + Date: Sun, 25 Oct 2020 15:18:50 +0000 Subject: [PATCH 08/14] Improvements to IESI: enable ATT RESET button which when held for 2 seconds will trigger a reinit for 10 seconds; add limitations to altitude scale; add negative text; add a more realistic mach simulation --- A320-main.xml | 4 + Models/FlightDeck/a320.flightdeck.xml | 35 +++ Models/Instruments/IESI/IESI.nas | 66 ++++-- Models/Instruments/IESI/res/iesi.svg | 297 ++++++++++++++------------ Systems/a320-misc.xml | 12 +- 5 files changed, 268 insertions(+), 146 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index 85caad95..542f1632 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -1577,6 +1577,10 @@ 1.0 + + false + + true diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index dd0be68f..30d4aa61 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -7250,7 +7250,42 @@ iesi_btn_plus iesi_btn_rst + + + pick + iesi_btn_rst + + + + 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 + + + Aircraft/A320-family/Models/Effects/clock diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas index f7bff132..0ec8d01f 100644 --- a/Models/Instruments/IESI/IESI.nas +++ b/Models/Instruments/IESI/IESI.nas @@ -13,6 +13,7 @@ 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_rate = props.globals.getNode("/systems/acconfig/options/iesi-rate", 1); var et = props.globals.getNode("/sim/time/elapsed-sec", 1); @@ -75,13 +76,30 @@ 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 iesi_time.getValue() + 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(); IESI.update(); if (aconfig.getValue() != 1 and iesi_init.getValue() != 1) { iesi_init.setBoolValue(1); - iesi_time.setValue(cur_time); + if (me._fast) { + iesi_time.setValue(cur_time - 80); + me._fast = 0; + } else { + iesi_time.setValue(cur_time); + } } else if (aconfig.getValue() == 1 and iesi_init.getValue() != 1) { iesi_init.setBoolValue(1); iesi_time.setValue(cur_time - 87); @@ -98,13 +116,18 @@ var canvas_IESI = { var m = {parents: [canvas_IESI, canvas_IESI_base]}; m.init(canvas_group, file); m._cachedInhg = -99; - + m._machWasAbove50 = 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"]; }, update: func() { + if (qnh_inhg.getValue() != me._cachedInhg) { + me._cachedInhg = qnh_inhg.getValue(); + me.updateQNH(); + } + if (iesi_time.getValue() + 90 >= et.getValue()) { me["IESI"].hide(); me["IESI_Init"].show(); @@ -128,9 +151,14 @@ var canvas_IESI = { 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(); } @@ -150,6 +178,18 @@ var canvas_IESI = { # 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; @@ -165,16 +205,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["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", me.altitude * 0.3048)); + altTens = num(right(sprintf("%02d", me.altitude), 2)); + me["ALT_tens"].setTranslation(0, altTens * 3.16); }, updateQNH: func() { if (altimeter_mode.getBoolValue()) { @@ -231,4 +271,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/res/iesi.svg b/Models/Instruments/IESI/res/iesi.svg index 6e50dc10..f50222b9 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="4" + inkscape:cx="671.10287" + inkscape:cy="1262.0843" + 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" @@ -120,9 +120,9 @@ id="text4488" y="378.41025" x="433.55658" - style="font-style:normal;font-weight:normal;font-size:30.52176857px;line-height:1.25;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" + 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"> 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 + 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 60 + 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">60 80 + 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 70 + 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">70 90 + 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">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 + 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">280 320 + 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">320 360 + 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">360 400 + 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">400 240 + 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">240 200 + 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">200 160 + 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">160 120 + 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">120 80 + 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">80 40 + 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">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 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 INIT 90s + 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:#000000;fill-opacity:1;stroke-width:0.75">INIT 90s ALT + 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:#000000;fill-opacity:1;stroke-width:0.75">ALT - + @@ -28,5 +28,15 @@ + + + + + /instrumentation/iesi/att-reset-cmd + 0.5 + 100 + + + From 45bcfe1392169e5d52b72f7c0088e994d4aec2a2 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sun, 25 Oct 2020 15:40:04 +0000 Subject: [PATCH 09/14] IESI brightness control --- A320-main.xml | 1 + Models/FlightDeck/a320.flightdeck.xml | 87 +++++++++++++++++++++++++++ Models/Instruments/IESI/IESI.nas | 9 ++- Models/Instruments/IESI/IESI.xml | 6 +- 4 files changed, 99 insertions(+), 4 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index 542f1632..0a526661 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -846,6 +846,7 @@ 1 1 1 + 1 1 1 diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index 30d4aa61..e8944999 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -7256,6 +7256,7 @@ iesi_btn_rst + false property-assign /instrumentation/iesi/att-reset-cmd @@ -7286,6 +7287,92 @@ + + 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 0ec8d01f..6442dafa 100644 --- a/Models/Instruments/IESI/IESI.nas +++ b/Models/Instruments/IESI/IESI.nas @@ -15,6 +15,7 @@ var mach_act = 0; 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); var aconfig = props.globals.getNode("/systems/acconfig/autoconfig-running", 1); @@ -89,7 +90,7 @@ var canvas_IESI_base = { } 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) { @@ -105,7 +106,13 @@ var canvas_IESI_base = { iesi_time.setValue(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(); } }, 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 @@ - + From b273f23d405da1abbd28a8322372ba277c7b1358 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sun, 25 Oct 2020 17:10:34 +0000 Subject: [PATCH 10/14] Fix pitch scale on IESI. Various improvements --- Models/Instruments/IESI/IESI.nas | 4 +- Models/Instruments/IESI/res/iesi.svg | 428 ++++++--------------------- Systems/pfd.xml | 20 ++ 3 files changed, 109 insertions(+), 343 deletions(-) diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas index 6442dafa..315ed33c 100644 --- a/Models/Instruments/IESI/IESI.nas +++ b/Models/Instruments/IESI/IESI.nas @@ -24,7 +24,7 @@ var airspeed = props.globals.getNode("/instrumentation/airspeed-indicator/indica 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 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); @@ -180,7 +180,7 @@ var canvas_IESI = { me.AI_horizon_trans.setTranslation(0, pitch.getValue() * 16.74); me.AI_horizon_rot.setRotation(-roll.getValue() * D2R, me["AI_center"].getCenter()); - me["AI_slipskid"].setTranslation(math.clamp(skid.getValue(), -7, 7) * -15, 0); + me["AI_slipskid"].setTranslation(skid.getValue(), 0); me["AI_bank"].setRotation(-roll.getValue() * D2R); # Altitude diff --git a/Models/Instruments/IESI/res/iesi.svg b/Models/Instruments/IESI/res/iesi.svg index f50222b9..76ad92e2 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="4" - inkscape:cx="671.10287" - inkscape:cy="1262.0843" + inkscape:zoom="0.70710678" + inkscape:cx="467.77734" + inkscape:cy="851.27387" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:window-maximized="1" @@ -62,6 +62,90 @@ originx="0" originy="0" /> + + + INIT 90s + + SPD + + ALT + + ATT + - - 40 - - - 50 - - - 60 - - - 70 - - - 80 - - - - - 90 - - - - - - - - - - - - - - - - 80 - - - - - 90 STD - - - INIT 90s - - SPD - - ALT - - ATT - diff --git a/Systems/pfd.xml b/Systems/pfd.xml index a11265d7..cbcb0d48 100644 --- a/Systems/pfd.xml +++ b/Systems/pfd.xml @@ -464,5 +464,25 @@ /instrumentation/pfd/slip-skid 0.16 + + + 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 +
+
+ + /instrumentation/iesi/slip-skid +
From b1b2143c0bad0822d766d5ee3b7018bd0396b48f Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sun, 25 Oct 2020 17:45:08 +0000 Subject: [PATCH 11/14] Better ASI scale, add roll markings on IESI --- Models/Instruments/IESI/IESI.nas | 40 +- Models/Instruments/IESI/res/iesi.svg | 1550 ++++++++++++++------------ Systems/pfd.xml | 22 +- 3 files changed, 865 insertions(+), 747 deletions(-) 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 @@ /instrumentation/iesi/slip-skid + + + IESI Pitch + false + gain + 1 + + + + /orientation/pitch-deg + -80-65 + -50-50 + 0 0 + 50 50 + 80 65 +
+
+ + /instrumentation/iesi/pitch-deg +
From 03c4c913990f89064f1553e83cbd5438fd7e3839 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sun, 25 Oct 2020 21:12:39 +0000 Subject: [PATCH 12/14] Improve Simbrief parser --- Nasal/FMGC/SimbriefParser.nas | 258 +++++++++++++++++++--------------- 1 file changed, 144 insertions(+), 114 deletions(-) diff --git a/Nasal/FMGC/SimbriefParser.nas b/Nasal/FMGC/SimbriefParser.nas index 4141153e..093c5d8e 100644 --- a/Nasal/FMGC/SimbriefParser.nas +++ b/Nasal/FMGC/SimbriefParser.nas @@ -14,7 +14,14 @@ var SimbriefParser = { var stamp = systime(); http.save("https://www.simbrief.com/api/xml.fetcher.php?username=" ~ username, getprop('/sim/fg-home') ~ "/Export/A320-family-simbrief.xml") .fail(func me.failure(i)) - .done(func me.read(getprop('/sim/fg-home') ~ "/Export/A320-family-simbrief.xml", i)); + .done(func { + var errs = []; + call(me.read, [(getprop('/sim/fg-home') ~ "/Export/A320-family-simbrief.xml"),i], SimbriefParser, {}, errs); + if (size(errs) > 0) { + debug.printerror(errs); + me.failure(i); + } + }); }, failure: func(i) { mcdu.mcdu_message(i, "SIMBRIEF DOWNLOAD FAILED"); @@ -25,141 +32,162 @@ 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; + + foreach (var ofpFix; ofpFixes) { + if (ofpFix.getNode("is_sid_star").getBoolValue()) { + # continue; + } + + ident = ofpFix.getNode("ident").getValue(); + if (find(departureID, ident) != -1 or find(destinationID, ident) != -1) { + continue; + } + + if (ident == "TOC" or ident == "TOD") { + 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); + 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 +234,7 @@ var SimbriefParser = { fmgc.FMGCInternal.blockCalculating = 0; fmgc.blockCalculating.setValue(0); fmgc.FMGCInternal.blockConfirmed = 1; + + return 1; }, }; \ No newline at end of file From 996372de0232796d64bb5a861621a35f07431ef9 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sun, 25 Oct 2020 21:47:47 +0000 Subject: [PATCH 13/14] Add procedures parsing to Simbrief parser again. --- Nasal/FMGC/SimbriefParser.nas | 40 +++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/Nasal/FMGC/SimbriefParser.nas b/Nasal/FMGC/SimbriefParser.nas index 093c5d8e..f5f1cfe1 100644 --- a/Nasal/FMGC/SimbriefParser.nas +++ b/Nasal/FMGC/SimbriefParser.nas @@ -116,18 +116,48 @@ var SimbriefParser = { 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()) { - # continue; + 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" or ident == "TOD") { + if (ident == "TOC") { + _foundTOC = 1; + continue; + } + + if (ident == "TOD") { + _foundTOC = 1; continue; } @@ -146,6 +176,12 @@ var SimbriefParser = { } 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(); From 1e97243ce4a35215e2a6f7d4e2607e5fe6d31b1f Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Mon, 26 Oct 2020 00:12:06 +0000 Subject: [PATCH 14/14] PFD: fix bug with the arrows being non-mathematically offset --- Models/Instruments/PFD/res/pfd.svg | 52 +++++++++++++++--------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg index 783b877a..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" @@ -195,7 +195,7 @@ 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" /> @@ -203,14 +203,14 @@ sodipodi:nodetypes="cc" inkscape:connector-curvature="0" id="path5139" - d="m 375.0679,151.98339 146.37368,-3.3e-4" - style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20011415;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" /> + 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" /> @@ -545,8 +545,8 @@ sodipodi:nodetypes="cc" /> @@ -554,22 +554,22 @@ sodipodi:nodetypes="ccccccc" inkscape:connector-curvature="0" id="path1023" - d="m 488.00383,979.59269 h -13.2497 l -26.49939,-55.28317 -26.49939,55.28317 h -13.2497 l 39.74909,-87.68731 z" - style="fill:none;stroke:#ff0000;stroke-width:5.69999983;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + d="m 488.00383,982.17305 h -13.2497 l -26.49939,-55.28317 -26.49939,55.28317 h -13.2497 l 39.74909,-87.68731 z" + style="fill:none;stroke:#ff0000;stroke-width:5.69999981;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + d="m 388.6311,-3.2290207 19.87455,-2.09e-5 39.74909,82.9247116 39.74908,-82.9247116 h 19.87455 L 448.25474,128.30133 Z" + style="fill:none;stroke:#ff0000;stroke-width:6.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#ff0000;stroke-width:7.42499971;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />