From fd5cf5466a0393717696985d11257a1476be8da1 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Fri, 5 Nov 2021 21:40:42 +0000 Subject: [PATCH 1/5] IESI: improve - if you have excess motion during INIT, it inits to a failure message; and then you have to reset it. --- Models/Instruments/IESI/IESI.nas | 85 +++++- Models/Instruments/IESI/res/iesi.svg | 401 ++++++++++++++++----------- Nasal/Systems/electrical.nas | 2 + 3 files changed, 314 insertions(+), 174 deletions(-) diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas index c7231d65..a9d45404 100644 --- a/Models/Instruments/IESI/IESI.nas +++ b/Models/Instruments/IESI/IESI.nas @@ -11,6 +11,11 @@ var _showIESI = 0; var _fast = 0; var _IESITime = 0; +var pinPrograms = { + metricAltitude: 1, + showInHg: 1, +}; + var canvas_IESI = { new: func(svg, name) { var obj = {parents: [canvas_IESI] }; @@ -50,6 +55,10 @@ var canvas_IESI = { obj.AI_horizon_rot = obj["AI_horizon"].createTransform(); obj.middleAltOffset = nil; + obj._excessMotion = 0; + obj.canReset = 0; + obj.isNegativeAlt = 0; + obj.att10s.hide(); obj.update_items = [ props.UpdateManager.FromHashValue("airspeed", nil, func(val) { @@ -72,10 +81,10 @@ var canvas_IESI = { if (val.altitude < 0) { obj["negText"].show(); - obj["negText2"].show(); + obj.isNegativeAlt = 1; } else { obj["negText"].hide(); - obj["negText2"].hide(); + obj.isNegativeAlt = 0; } obj.altOffset = (val.altitude / 500) - int(val.altitude / 500); @@ -149,7 +158,7 @@ var canvas_IESI = { return obj; }, 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","AI_bank_scale"]; + return ["IESI","IESI_Init","att90s","att10s","ATTflag","ALTwarn","SPDwarn","ASI_scale","ASI_mach","ASI_mach_decimal","AI_center","AI_index","AI_horizon","AI_sky_bank","AI_bank","AI_bank_center","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","metricM","metricBox"]; }, update: func(notification) { if (notification.qnh_inhg != me._cachedInhg) { @@ -163,12 +172,61 @@ var canvas_IESI = { } if (_IESITime + 90 >= notification.elapsedTime) { + if (notification.groundspeed > 2) { + me._excessMotion = 1; + } + me["IESI"].hide(); me["IESI_Init"].show(); + if (_fast) { + me["att10s"].show(); + me["att90s"].hide(); + } else { + me["att10s"].hide(); + me["att90s"].show(); + } + me["ATTflag"].hide(); return; } else { - me["IESI_Init"].hide(); - me["IESI"].show(); + if (pinPrograms.metricAltitude) { + me["ALT_meters"].show(); + me["metricM"].show(); + me["metricBox"].show(); + + if (me.isNegativeAlt) { + me["negText2"].show(); + } else { + me["negText2"].hide(); + } + } else { + me["ALT_meters"].hide(); + me["metricM"].hide(); + me["metricBox"].hide(); + me["negText2"].hide(); + } + _fast = 0; + + if (!me._excessMotion) { + me["IESI_Init"].hide(); + me["IESI"].show(); + me["AI_bank"].show(); + me["AI_bank_center"].show(); + me["AI_bank_scale"].show(); + me["AI_index"].show(); + me["AI_horizon"].show(); + me["AI_sky_bank"].show(); + me["ATTflag"].hide(); + } else { + me["IESI_Init"].hide(); + me["IESI"].show(); + me["AI_bank"].hide(); + me["AI_bank_center"].hide(); + me["AI_bank_scale"].hide(); + me["AI_index"].hide(); + me["AI_horizon"].hide(); + me["AI_sky_bank"].hide(); + me["ATTflag"].show(); + } } foreach(var update_item; me.update_items) @@ -181,7 +239,11 @@ var canvas_IESI = { me["QNH_setting"].hide(); me["QNH_std"].show(); } else { - me["QNH_setting"].setText(sprintf("%4.0f", notification.qnh_hpa) ~ "/" ~ sprintf("%2.2f", notification.qnh_inhg)); + if (pinPrograms.showInHg) { + me["QNH_setting"].setText(sprintf("%4.0f", notification.qnh_hpa) ~ "/" ~ sprintf("%2.2f", notification.qnh_inhg)); + } else { + me["QNH_setting"].setText(sprintf("%4.0f", notification.qnh_hpa)); + } me["QNH_setting"].show(); me["QNH_std"].hide(); } @@ -189,13 +251,17 @@ var canvas_IESI = { _transientVar: 0, updatePower: func(notification) { # todo 20W power consumption - if (notification.attReset == 1) { - if (notification.iesiInit and _IESITime + 90 >= notification.elapsedTime) { + if (notification.attReset == 1 and me.canReset) { + if (notification.iesiInit and _IESITime + 90 >= notification.elapsedTime and !me._excessMotion) { _fast = 1; } else { _fast = 0; } + me._excessMotion = 0; iesi_init.setBoolValue(0); + me.canReset = 0; + } else if (_IESITime + 90 < notification.elapsedTime and notification.iesiInit and !me.canReset) { + me.canReset = 1; } if (notification.dcEss >= 25 or (notification.relay7XB and notification.dcHot1 >= 25)) { @@ -204,7 +270,6 @@ var canvas_IESI = { iesi_init.setBoolValue(1); if (_fast) { _IESITime = notification.elapsedTime - 80; - _fast = 0; } else { _IESITime = notification.elapsedTime; } @@ -216,7 +281,7 @@ var canvas_IESI = { if (!me._transientVar) { me._transientVar = 1; settimer(func() { - if (systems.ELEC.Bus.dcEss.getValue() >= 25 or (systems.ELEC.Bus.dcHot1.getValue() >= 25 and systems.ELEC.Relay.relay7XB.getValue())) { + if (systems.ELEC.Bus.dcEss.getValue() >= 25 or (systems.ELEC.Bus.dcHot1703.getValue() >= 25 and systems.ELEC.Relay.relay7XB.getValue())) { me._transientVar = 0; } else { _showIESI = 0; diff --git a/Models/Instruments/IESI/res/iesi.svg b/Models/Instruments/IESI/res/iesi.svg index 9b360520..fc9c3e3a 100644 --- a/Models/Instruments/IESI/res/iesi.svg +++ b/Models/Instruments/IESI/res/iesi.svg @@ -1,19 +1,19 @@ + inkscape:version="1.1 (c68e22c387, 2021-05-23)" + sodipodi:docname="iesi.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> @@ -38,16 +38,16 @@ inkscape:pageopacity="1" inkscape:pageshadow="2" inkscape:window-width="1920" - inkscape:window-height="1017" + inkscape:window-height="986" id="namedview371" showgrid="true" - inkscape:zoom="0.45254834" - inkscape:cx="877.65465" - inkscape:cy="962.66623" - inkscape:window-x="1592" - inkscape:window-y="-8" + inkscape:zoom="0.93517029" + inkscape:cx="815.35952" + inkscape:cy="847.9739" + inkscape:window-x="-11" + inkscape:window-y="-11" inkscape:window-maximized="1" - inkscape:current-layer="IESI" + inkscape:current-layer="ATTflag" showguides="true" inkscape:snap-global="false" units="pt" @@ -55,7 +55,9 @@ fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" - borderlayer="false"> + borderlayer="false" + inkscape:pagecheckerboard="0" + inkscape:document-units="pt"> + + + INIT 90s + + + + SPD + + + + ALT + + + + ATT + + + + width="406.27161" + id="rect12278" + style="fill:#c9d121;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.17302;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> INIT 90s + y="796.4032" + 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">ATT : RST - SPD - - ALT - ATT + style="opacity:1;fill:#1fa7f8;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" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:9.6;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> 10 + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:9.6;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:9.6;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:9.6;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:9.6;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> 30 + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:9.6;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> 40 + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:11.7112;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:9.6;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:9.6;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> 10 + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:9.6;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:9.6;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:9.6;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:9.6;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> 30 + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:9.60008;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> 50 + style="fill:none;stroke:#ff0000;stroke-width:5.7;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#ff0000;stroke-width:7.42501;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#ff0000;stroke-width:6.6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="opacity:0.46;fill:#ff00ff;fill-opacity:1;stroke:none;stroke-width:1.27697;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> .   40402020000080806060404020200000808060 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:70px;line-height:87%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">60 + style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:4.30556;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;fill-opacity:1;stroke:#c9d121;stroke-width:3.54375;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:8.10006;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> NNEG NEG + 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';fill:#ffffff;fill-opacity:1;stroke-width:0.75">NEG @@ -1836,7 +1896,7 @@ sodipodi:nodetypes="cc" /> STD + ATT 10s diff --git a/Nasal/Systems/electrical.nas b/Nasal/Systems/electrical.nas index 300cfc89..36e532d4 100644 --- a/Nasal/Systems/electrical.nas +++ b/Nasal/Systems/electrical.nas @@ -26,7 +26,9 @@ var ELEC = { dc1: props.globals.getNode("/systems/electrical/bus/dc-1"), dc2: props.globals.getNode("/systems/electrical/bus/dc-2"), dcHot1: props.globals.getNode("/systems/electrical/bus/dc-hot-1"), + dcHot1703: props.globals.getNode("/systems/electrical/bus/sub-bus/dc-hot-1-703"), dcHot2: props.globals.getNode("/systems/electrical/bus/dc-hot-2"), + dcHot2704: props.globals.getNode("/systems/electrical/bus/sub-bus/dc-hot-2-704"), }, Fail: { acEssBusFault: props.globals.getNode("/systems/failures/electrical/ac-ess-bus"), From e47f4ed00931976e5feb4636169b1f68bbab9935 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sat, 6 Nov 2021 13:00:16 +0000 Subject: [PATCH 2/5] ISIS: add separate inHg control; fix the slip-skid indictaor --- A320-main.xml | 9 ++ Models/FlightDeck/a320.flightdeck.xml | 135 +++++++++++++++++++++++- Models/Instruments/IESI/IESI.nas | 17 +-- Nasal/Libraries/buttons.nas | 11 ++ Nasal/Libraries/property-tree-setup.nas | 4 + Systems/instrumentation.xml | 3 + Systems/pfd.xml | 4 +- 7 files changed, 174 insertions(+), 9 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index 72deeabc..6af44c57 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -1642,6 +1642,15 @@ true + + 0 + 0 + 0 + 29.92 + true + 0 + + 0 0 diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index 5c865839..d4615a7e 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -2926,7 +2926,6 @@ pick qnh_cpt_knb qnh_fo_knb - iesi_baro_knb @@ -3057,6 +3056,140 @@ + + + pick + iesi_baro_knb + + + + false + + + + systems/electrical/bus/dc-ess + 25 + + + nasal + + + + + + true + + nasal + + + + + instrumentation/altimeter[6]/inhg + 1 + + + instrumentation/altimeter[6]/std + 0 + + + systems/electrical/bus/dc-ess + 25 + + + + + + nasal + + + + + instrumentation/altimeter[6]/inhg + 0 + + + instrumentation/altimeter[6]/std + 0 + + + systems/electrical/bus/dc-ess + 25 + + + + + + property-adjust + controls/switches/qnh-knb-iesi + 1 + 0 + 200000 + true + + + + + true + + nasal + + + + + instrumentation/altimeter[6]/inhg + 1 + + + instrumentation/altimeter[6]/std + 0 + + + systems/electrical/bus/dc-ess + 25 + + + + + + nasal + + + + + instrumentation/altimeter[6]/inhg + 0 + + + instrumentation/altimeter[6]/std + 0 + + + systems/electrical/bus/dc-ess + 25 + + + + + + property-adjust + controls/switches/qnh-knb-iesi + -1 + 0 + 200000 + true + + + pick diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas index a9d45404..6e483049 100644 --- a/Models/Instruments/IESI/IESI.nas +++ b/Models/Instruments/IESI/IESI.nas @@ -143,7 +143,12 @@ var canvas_IESI = { obj["AI_bank"].setRotation(-val * D2R); }), props.UpdateManager.FromHashValue("skid", nil, func(val) { - obj["AI_slipskid"].setTranslation(val, 0); + if (abs(val) >= 84.99) { + obj["AI_slipskid"].hide(); + } else { + obj["AI_slipskid"].setTranslation(-val, 0); + obj["AI_slipskid"].show(); + } }), props.UpdateManager.FromHashList(["altimeter_mode","qnh_hpa","qnh_inhg"], nil, func(val) { obj.updateQNH(val); @@ -331,16 +336,16 @@ emesary.GlobalTransmitter.Register(A320IESI); var input = { "acconfig": "/systems/acconfig/autoconfig-running", "airspeed": "/instrumentation/airspeed-indicator[0]/indicated-speed-kt", - "altitude": "/instrumentation/altimeter/indicated-altitude-ft", - "altitude_ind": "/instrumentation/altimeter/indicated-altitude-ft-pfd", - "altimeter_mode": "/instrumentation/altimeter[0]/std", + "altitude": "/instrumentation/altimeter[6]/indicated-altitude-ft", + "altitude_ind": "/instrumentation/altimeter[6]/indicated-altitude-ft-pfd", + "altimeter_mode": "/instrumentation/altimeter[6]/std", "attReset": "/instrumentation/iesi/att-reset", "iesiBrt": "/controls/lighting/DU/iesi", "iesiInit": "/instrumentation/iesi/iesi-init", "mach": "/instrumentation/airspeed-indicator/indicated-mach", "pitch": "/instrumentation/iesi/pitch-deg", - "qnh_hpa": "/instrumentation/altimeter[0]/setting-hpa", - "qnh_inhg": "/instrumentation/altimeter[0]/setting-inhg", + "qnh_hpa": "/instrumentation/altimeter[6]/setting-hpa", + "qnh_inhg": "/instrumentation/altimeter[6]/setting-inhg", "roll": "/orientation/roll-deg", "skid": "/instrumentation/iesi/slip-skid", "relay7XB": "/systems/electrical/sources/si-1/inverter-control/relay-7xb", diff --git a/Nasal/Libraries/buttons.nas b/Nasal/Libraries/buttons.nas index 2ca80885..a888c3d3 100644 --- a/Nasal/Libraries/buttons.nas +++ b/Nasal/Libraries/buttons.nas @@ -164,4 +164,15 @@ var toggleSTD = func() { pts.Instrumentation.Altimeter.settingInhg.setValue(29.92); pts.Instrumentation.Altimeter.std.setBoolValue(1); } +} + +var toggleSTDIESI = func() { + if (pts.Instrumentation.Altimeter.stdIESI.getBoolValue()) { + pts.Instrumentation.Altimeter.settingInhgIESI.setValue(pts.Instrumentation.Altimeter.oldQnhIESI.getValue()); + pts.Instrumentation.Altimeter.stdIESI.setBoolValue(0); + } else { + pts.Instrumentation.Altimeter.oldQnhIESI.setValue(pts.Instrumentation.Altimeter.settingInhgIESI.getValue()); + pts.Instrumentation.Altimeter.settingInhgIESI.setValue(29.92); + pts.Instrumentation.Altimeter.stdIESI.setBoolValue(1); + } } \ No newline at end of file diff --git a/Nasal/Libraries/property-tree-setup.nas b/Nasal/Libraries/property-tree-setup.nas index 3ef9a2ef..07719232 100644 --- a/Nasal/Libraries/property-tree-setup.nas +++ b/Nasal/Libraries/property-tree-setup.nas @@ -163,6 +163,10 @@ var Instrumentation = { oldQnh: props.globals.getNode("/instrumentation/altimeter[0]/oldqnh"), settingInhg: props.globals.getNode("/instrumentation/altimeter[0]/setting-inhg"), std: props.globals.getNode("/instrumentation/altimeter[0]/std"), + indicatedFtIESI: props.globals.getNode("/instrumentation/altimeter[6]/indicated-altitude-ft"), + oldQnhIESI: props.globals.getNode("/instrumentation/altimeter[6]/oldqnh"), + settingInhgIESI: props.globals.getNode("/instrumentation/altimeter[6]/setting-inhg"), + stdIESI: props.globals.getNode("/instrumentation/altimeter[6]/std"), }, Clock: { indicatedString: props.globals.getNode("/instrumentation/clock/indicated-string"), diff --git a/Systems/instrumentation.xml b/Systems/instrumentation.xml index b18758d3..de7bba1e 100644 --- a/Systems/instrumentation.xml +++ b/Systems/instrumentation.xml @@ -91,7 +91,10 @@ altimeter 6 /systems/static[2]/pressure-inhg + 0 0.1 + 0 + 0 diff --git a/Systems/pfd.xml b/Systems/pfd.xml index a4741f0a..b077b5fe 100644 --- a/Systems/pfd.xml +++ b/Systems/pfd.xml @@ -543,11 +543,11 @@ /fdm/jsbsim/accelerations/Ny - -0.20-105 + -0.20-85-0.01 0 0.00 0 0.01 0 - 0.20 105 + 0.20 85
From 668030b515611b41d3fea95dbb88a675cbdc98f8 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sat, 6 Nov 2021 15:05:48 +0000 Subject: [PATCH 3/5] IESI: fix power source; also fix the baro knob so that it changes inHg only, and works with emergency power. --- A320-main.xml | 1 - Models/FlightDeck/a320.flightdeck.xml | 103 ++++++++++---------------- Models/Instruments/IESI/IESI.nas | 2 +- Nasal/ECAM/ECAM-logic.nas | 1 - Nasal/Systems/electrical.nas | 1 + 5 files changed, 41 insertions(+), 67 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index 6af44c57..5b812a29 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -1643,7 +1643,6 @@ - 0 0 0 29.92 diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index d4615a7e..71a8e9fa 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -3066,10 +3066,19 @@ false - - systems/electrical/bus/dc-ess - 25 - + + + systems/electrical/bus/dc-ess + 25 + + + + /systems/electrical/bus/sub-bus/dc-hot-1-703 + 25 + + /systems/electrical/sources/si-1/inverter-control/relay-7xb + + nasal - - instrumentation/altimeter[6]/inhg - 1 - instrumentation/altimeter[6]/std 0 - - systems/electrical/bus/dc-ess - 25 - - - - - - nasal - - - - - instrumentation/altimeter[6]/inhg - 0 - - - instrumentation/altimeter[6]/std - 0 - - - systems/electrical/bus/dc-ess - 25 - + + + systems/electrical/bus/dc-ess + 25 + + + + /systems/electrical/bus/sub-bus/dc-hot-1-703 + 25 + + /systems/electrical/sources/si-1/inverter-control/relay-7xb + + @@ -3143,40 +3135,23 @@ - - instrumentation/altimeter[6]/inhg - 1 - instrumentation/altimeter[6]/std 0 - - systems/electrical/bus/dc-ess - 25 - - - - - - nasal - - - - - instrumentation/altimeter[6]/inhg - 0 - - - instrumentation/altimeter[6]/std - 0 - - - systems/electrical/bus/dc-ess - 25 - + + + systems/electrical/bus/dc-ess + 25 + + + + /systems/electrical/bus/sub-bus/dc-hot-1-703 + 25 + + /systems/electrical/sources/si-1/inverter-control/relay-7xb + + diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas index 6e483049..c3a3c67b 100644 --- a/Models/Instruments/IESI/IESI.nas +++ b/Models/Instruments/IESI/IESI.nas @@ -269,7 +269,7 @@ var canvas_IESI = { me.canReset = 1; } - if (notification.dcEss >= 25 or (notification.relay7XB and notification.dcHot1 >= 25)) { + if (notification.dcEss >= 25 or (notification.relay7XB and notification.dcHot1703 >= 25)) { _showIESI = 1; if (notification.acconfig != 1 and notification.iesiInit != 1) { iesi_init.setBoolValue(1); diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index 269853a7..7b6211a3 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -6,7 +6,6 @@ var dualFailNode = props.globals.initNode("/ECAM/dual-failure-enabled", 0, "BOOL"); var apWarn = props.globals.getNode("/it-autoflight/output/ap-warning", 1); var athrWarn = props.globals.getNode("/it-autoflight/output/athr-warning", 1); -var emerGen = props.globals.getNode("/controls/electrical/switches/emer-gen", 1); var acconfig_weight_kgs = props.globals.getNode("/systems/acconfig/options/weight-kgs", 1); var state1Node = props.globals.getNode("/engines/engine[0]/state", 1); diff --git a/Nasal/Systems/electrical.nas b/Nasal/Systems/electrical.nas index 36e532d4..54894e6d 100644 --- a/Nasal/Systems/electrical.nas +++ b/Nasal/Systems/electrical.nas @@ -264,6 +264,7 @@ var input = { "dcEss": "/systems/electrical/bus/dc-ess", "dcEssShed": "/systems/electrical/bus/dc-ess-shed", "dcHot1": "/systems/electrical/bus/dc-hot-1", + "dcHot1703": "/systems/electrical/bus/sub-bus/dc-hot-1-703", "dcHot2": "/systems/electrical/bus/dc-hot-2", }; From 01ec6a06b77dc72def77a727c3c290a7bf3d9b28 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sat, 6 Nov 2021 16:50:56 +0000 Subject: [PATCH 4/5] Improve ATT RESET / ATT 10S messages --- Models/Instruments/IESI/IESI.nas | 100 +++++++++++++++------------ Models/Instruments/IESI/res/iesi.svg | 17 +---- 2 files changed, 57 insertions(+), 60 deletions(-) diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas index c3a3c67b..a9d5831e 100644 --- a/Models/Instruments/IESI/IESI.nas +++ b/Models/Instruments/IESI/IESI.nas @@ -6,11 +6,6 @@ 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 ASI = 0; -var _showIESI = 0; -var _fast = 0; -var _IESITime = 0; - var pinPrograms = { metricAltitude: 1, showInHg: 1, @@ -54,23 +49,27 @@ var canvas_IESI = { obj.AI_horizon_trans = obj["AI_horizon"].createTransform(); obj.AI_horizon_rot = obj["AI_horizon"].createTransform(); - obj.middleAltOffset = nil; + obj._cachedInhg = nil; obj._excessMotion = 0; + obj._fast = 0; + obj._IESITime = 0; + obj._showIESI = 0; + obj.ASI = 0; obj.canReset = 0; obj.isNegativeAlt = 0; - obj.att10s.hide(); + obj.middleAltOffset = nil; obj.update_items = [ props.UpdateManager.FromHashValue("airspeed", nil, func(val) { # Subtract 30, since the scale starts at 30, but don't allow less than 0, or more than 520 knots if (val <= 30) { - ASI = 0; + obj.ASI = 0; } else if (val >= 520) { - ASI = 490; + obj.ASI = 490; } else { - ASI = val - 30; + obj.ASI = val - 30; } - obj["ASI_scale"].setTranslation(0, ASI * 8.295); + obj["ASI_scale"].setTranslation(0, obj.ASI * 8.295); }), props.UpdateManager.FromHashList(["altitude","altitude_ind"], nil, func(val) { if (val.altitude > 50000) { @@ -154,16 +153,10 @@ var canvas_IESI = { obj.updateQNH(val); }), ]; - - _showIESI = 0; - _fast = 0; - _IESITime = 0.0; - obj._cachedInhg = nil; - return obj; }, getKeys: func() { - return ["IESI","IESI_Init","att90s","att10s","ATTflag","ALTwarn","SPDwarn","ASI_scale","ASI_mach","ASI_mach_decimal","AI_center","AI_index","AI_horizon","AI_sky_bank","AI_bank","AI_bank_center","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","metricM","metricBox"]; + return ["IESI","IESI_Init","attRst","attRstRect","att90s","ATTflag","ATTflag_rect","ATTflag_text","ALTwarn","SPDwarn","ASI_scale","ASI_mach","ASI_mach_decimal","AI_center","AI_index","AI_horizon","AI_sky_bank","AI_bank","AI_bank_center","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","metricM","metricBox"]; }, update: func(notification) { if (notification.qnh_inhg != me._cachedInhg) { @@ -176,21 +169,33 @@ var canvas_IESI = { return; } - if (_IESITime + 90 >= notification.elapsedTime) { + if (me._IESITime + 90 >= notification.elapsedTime) { if (notification.groundspeed > 2) { me._excessMotion = 1; } - me["IESI"].hide(); - me["IESI_Init"].show(); - if (_fast) { - me["att10s"].show(); - me["att90s"].hide(); + if (me._fast) { + me["IESI"].show(); + me["IESI_Init"].hide(); + me["AI_bank"].hide(); + me["AI_bank_center"].hide(); + me["AI_bank_scale"].hide(); + me["AI_horizon"].hide(); + me["AI_sky_bank"].hide(); + me["ATTflag_text"].setText("ATT 10s"); + me["ATTflag_text"].setColor(0,0,0); + me["ATTflag_rect"].setScale(1.5,1); + me["ATTflag_rect"].setTranslation(-250,0); + me["ATTflag_rect"].setColorFill(1,1,0); + me["ATTflag_rect"].setColor(1,1,0); + me["ATTflag"].show(); + me["attRst"].hide(); + me["attRstRect"].hide(); } else { - me["att10s"].hide(); - me["att90s"].show(); + me["IESI"].hide(); + me["IESI_Init"].show(); + me["ATTflag"].hide(); } - me["ATTflag"].hide(); return; } else { if (pinPrograms.metricAltitude) { @@ -209,7 +214,6 @@ var canvas_IESI = { me["metricBox"].hide(); me["negText2"].hide(); } - _fast = 0; if (!me._excessMotion) { me["IESI_Init"].hide(); @@ -227,10 +231,17 @@ var canvas_IESI = { me["AI_bank"].hide(); me["AI_bank_center"].hide(); me["AI_bank_scale"].hide(); - me["AI_index"].hide(); me["AI_horizon"].hide(); me["AI_sky_bank"].hide(); + me["ATTflag_text"].setText("ATT"); + me["ATTflag_text"].setColor(1,0,0); + me["ATTflag_rect"].setScale(1,1); + me["ATTflag_rect"].setTranslation(0,0); + me["ATTflag_rect"].setColorFill(0,0,0); + me["ATTflag_rect"].setColor(0,0,0); me["ATTflag"].show(); + me["attRst"].show(); + me["attRstRect"].show(); } } @@ -257,30 +268,26 @@ var canvas_IESI = { updatePower: func(notification) { # todo 20W power consumption if (notification.attReset == 1 and me.canReset) { - if (notification.iesiInit and _IESITime + 90 >= notification.elapsedTime and !me._excessMotion) { - _fast = 1; - } else { - _fast = 0; - } - me._excessMotion = 0; - iesi_init.setBoolValue(0); me.canReset = 0; - } else if (_IESITime + 90 < notification.elapsedTime and notification.iesiInit and !me.canReset) { + me._excessMotion = 0; + me._fast = 1; + iesi_init.setBoolValue(0); + } else if (me._IESITime + 90 < notification.elapsedTime and notification.iesiInit and !me.canReset) { me.canReset = 1; } if (notification.dcEss >= 25 or (notification.relay7XB and notification.dcHot1703 >= 25)) { - _showIESI = 1; + me._showIESI = 1; if (notification.acconfig != 1 and notification.iesiInit != 1) { iesi_init.setBoolValue(1); - if (_fast) { - _IESITime = notification.elapsedTime - 80; + if (me._fast) { + me._IESITime = notification.elapsedTime - 80; } else { - _IESITime = notification.elapsedTime; + me._IESITime = notification.elapsedTime; } } else if (notification.acconfig == 1 and notification.iesiInit != 1) { iesi_init.setBoolValue(1); - _IESITime = notification.elapsedTime - 87; + me._IESITime = notification.elapsedTime - 87; } } elsif (notification.iesiInit) { if (!me._transientVar) { @@ -289,15 +296,18 @@ var canvas_IESI = { if (systems.ELEC.Bus.dcEss.getValue() >= 25 or (systems.ELEC.Bus.dcHot1703.getValue() >= 25 and systems.ELEC.Relay.relay7XB.getValue())) { me._transientVar = 0; } else { - _showIESI = 0; - iesi_init.setBoolValue(0); + me.canReset = 0; + me._excessMotion = 0; + me._fast = 0; + me._showIESI = 0; me._transientVar = 0; + iesi_init.setBoolValue(0); } }, 0.2); # 200ms delay power transients } } - if (_showIESI and notification.iesiBrt > 0.01) { + if (me._showIESI and notification.iesiBrt > 0.01) { me.group.setVisible(1); } else { me.group.setVisible(0); diff --git a/Models/Instruments/IESI/res/iesi.svg b/Models/Instruments/IESI/res/iesi.svg index fc9c3e3a..8bdc1875 100644 --- a/Models/Instruments/IESI/res/iesi.svg +++ b/Models/Instruments/IESI/res/iesi.svg @@ -43,7 +43,7 @@ showgrid="true" inkscape:zoom="0.93517029" inkscape:cx="815.35952" - inkscape:cy="847.9739" + inkscape:cy="762.42799" inkscape:window-x="-11" inkscape:window-y="-11" inkscape:window-maximized="1" @@ -170,7 +170,7 @@ x="304.32764" height="91.330338" width="406.27161" - id="rect12278" + id="attRstRect" style="fill:#c9d121;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3.17302;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> STD - ATT 10s From 0cd3549867d94f74fa5340a474d83bbd759b648b Mon Sep 17 00:00:00 2001 From: Josh Davidson Date: Mon, 8 Nov 2021 10:44:58 -0500 Subject: [PATCH 5/5] Sim: fix view controller to whitelist --- Nasal/Libraries/property-tree-setup.nas | 1 - Nasal/Libraries/zoom-views.nas | 4 +--- revision.txt | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Nasal/Libraries/property-tree-setup.nas b/Nasal/Libraries/property-tree-setup.nas index 07719232..406bcf12 100644 --- a/Nasal/Libraries/property-tree-setup.nas +++ b/Nasal/Libraries/property-tree-setup.nas @@ -251,7 +251,6 @@ var Sim = { name: props.globals.getNode("/sim/current-view/name", 1), pitchOffsetDeg: props.globals.getNode("/sim/current-view/pitch-offset-deg", 1), rollOffsetDeg: props.globals.getNode("/sim/current-view/roll-offset-deg", 1), - type: props.globals.getNode("/sim/current-view/type", 1), viewNumberRaw: props.globals.getNode("/sim/current-view/view-number-raw", 1), zOffsetDefault: props.globals.getNode("/sim/current-view/z-offset-default", 1), xOffsetM: props.globals.getNode("/sim/current-view/x-offset-m", 1), diff --git a/Nasal/Libraries/zoom-views.nas b/Nasal/Libraries/zoom-views.nas index 62cd2ea0..62c5f8c0 100644 --- a/Nasal/Libraries/zoom-views.nas +++ b/Nasal/Libraries/zoom-views.nas @@ -8,11 +8,9 @@ var max_dist = 0; var canChangeZOffset = 0; var decStep = -5; var incStep = 5; -var viewName = "XX"; var fovZoom = func(d) { - viewName = pts.Sim.CurrentView.name.getValue(); - canChangeZOffset = pts.Sim.CurrentView.type.getValue() == "lookat" and viewName != "Tower View" and viewName != "Fly-By View" and viewName != "Chase View" and viewName != "Chase View Without Yaw" and viewName != "Walk View"; + canChangeZOffset = pts.Sim.CurrentView.name.getValue() == "Helicopter View"; if (pts.Sim.CurrentView.zOffsetM.getValue() <= -50) { decStep = -10; diff --git a/revision.txt b/revision.txt index 2e66562e..c5b431b6 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -49 \ No newline at end of file +50 \ No newline at end of file