1
0
Fork 0

Merge branch 'dev' into new-electrical

This commit is contained in:
legoboyvdlp R 2020-11-15 16:27:09 +00:00
commit 95b1fe28cb
34 changed files with 4175 additions and 3376 deletions

View file

@ -5,17 +5,56 @@
<PropertyList include="Aircraft/Generic/Human/Include/walker-include.xml">
<sim>
<animation>
<fire-services type="bool">0</fire-services>
</animation>
<author>Josh Davidson/Octal450 (Flight Dynamics, Systems, Displays), Jonathan Redpath/legoboyvdlp, merspieler, Matthew Maring/mattmaring (Systems, Displays), Thorsten Herrmann/TH-555, Semir Gebran/CaptB (3D, Textures)</author>
<authors>
<author>
<name>Josh Davidson</name>
<description>Flight Dynamics, Systems, Displays</description>
<nick>Octal450</nick>
</author>
<author>
<name>Jonathan Redpath</name>
<description>Systems, Displays, FMGC</description>
<nick>legoboyvdlp</nick>
</author>
<author>
<name>merspieler</name>
<description>Systems, Displays</description>
</author>
<author>
<name>Matthew Maring</name>
<description>Fuel predictions, FMGC</description>
<nick>mattmaring</nick>
</author>
<author>
<name>Thorsten Herrmann</name>
<description>Cockpit 3D model</description>
<nick>TH-555</nick>
</author>
<author>
<name>Semir Gebran</name>
<description>3D model</description>
<nick>CaptB</nick>
</author>
<author>
<name>vezza</name>
<description>Systems, Displays</description>
</author>
</authors>
<checklists include="A32X-Checklists.xml"/>
<status>Pre V1.0</status>
<description>Airbus A320</description>
<long-description>The Airbus A320 is a family of narrow body airliners built by Airbus Industrie. First flown in 1987,
the aircraft is the most produced airliner ever, with over 9,500 built to date. It was one of the first airliners
to use digital flight controls and fly by wire, and a fully glass cockpit.</long-description>
<hud n="0">
<enable3d n="0">false</enable3d>
<enable3d n="1">false</enable3d>
@ -130,7 +169,7 @@
<path>Splash/wing3.png</path>
</preview>
</previews>
<rating>
<FDM type="int">4</FDM>
<systems type="int">5</systems>
@ -138,6 +177,8 @@
<model type="int">4</model>
</rating>
<status>Pre V1.0</status>
<tags>
<tag>transport</tag>
<tag>airbus</tag>
@ -153,6 +194,13 @@
<tag>2-engine</tag>
</tags>
<urls>
<home-page>http://wiki.flightgear.org/Airbus_A320_Family</home-page>
<support>https://forum.flightgear.org</support>
<wikipedia>https://en.wikipedia.org/wiki/Airbus_A320_family</wikipedia>
<code-repository>https://github.com/legoboyvdlp/A320-family</code-repository>
</urls>
<systems n="0">
<electrical>
<path></path>
@ -512,8 +560,33 @@
</current-view>
<minimum-fg-version>2019.2.0</minimum-fg-version>
<navdb>
<min-runway-length-ft>3000</min-runway-length-ft>
</navdb>
</sim>
<aircraft>
<icao>
<wake-turbulence-category>M</wake-turbulence-category>
<type type="string">A320</type>
<equipment type="string">SDE2FGHIRWXY</equipment>
<surveillance type="string">S</surveillance>
</icao>
<performance>
<minimum>
<takeoff-length-ft type="int">4500</takeoff-length-ft>
<landing-length-ft type="int">4500</landing-length-ft>
</minimum>
<maximum>
<altitude-ft type="int">41000</altitude-ft>
<mach type="double">0.82</mach>
<airspeed-knots type="int">350</airspeed-knots>
</maximum>
</performance>
</aircraft>
<consumables>
<fuel>
<tank n="0">
@ -543,6 +616,39 @@
</fuel>
</consumables>
<ECAM>
<Upper>
<FlapX type="double">0</FlapX>
<FlapY type="double">0</FlapY>
<SlatX type="double">0</SlatX>
<SlatY type="double">0</SlatY>
<FlapXtrans type="double">0</FlapXtrans>
<FlapYtrans type="double">0</FlapYtrans>
<SlatXtrans type="double">0</SlatXtrans>
<SlatYtrans type="double">0</SlatYtrans>
</Upper>
<msg>
<line1 type="string"></line1>
<line2 type="string"></line2>
<line3 type="string"></line3>
<line4 type="string"></line4>
<line5 type="string"></line5>
<line6 type="string"></line6>
<line7 type="string"></line7>
<line8 type="string"></line8>
</msg>
<rightmsg>
<line1 type="string"></line1>
<line2 type="string"></line2>
<line3 type="string"></line3>
<line4 type="string"></line4>
<line5 type="string"></line5>
<line6 type="string"></line6>
<line7 type="string"></line7>
<line8 type="string"></line8>
</rightmsg>
</ECAM>
<environment>
<aircraft-effects>
<frost-inch type="double">0</frost-inch>
@ -1114,6 +1220,7 @@
</comm>
<electrical n="0">
<bus>
<ac-ess type="double">0</ac-ess>
<dc-1 type="double">0</dc-1>
<dc-2 type="double">0</dc-2>
</bus>
@ -1386,6 +1493,7 @@
</pneumatics>
<pressurization>
<cabinalt-norm type="double">0</cabinalt-norm>
<cabinpsi type="double">14.7</cabinpsi>
<ditchingpb type="double">14.7</ditchingpb>
</pressurization>
@ -4268,6 +4376,9 @@
</aircraft>
<nasal>
<notifications>
<file>Aircraft/A320-family/Nasal/emesary/M_frame_notification.nas</file>
</notifications>
<pts>
<file>Aircraft/A320-family/Nasal/Libraries/property-tree-setup.nas</file>
</pts>
@ -4375,6 +4486,7 @@
<file>Aircraft/A320-family/Models/Instruments/ND/canvas/ND.nas</file>
</canvas_nd>
<canvas_ecam>
<file>Aircraft/A320-family/Nasal/emesary/exec.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Upper-ECAM/Upper-ECAM.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM.nas</file>
</canvas_ecam>

View file

@ -6975,6 +6975,65 @@
</binding>
</action>
</animation>
<animation>
<type>rotate</type>
<object-name>ecam_att_hdg</object-name>
<object-name>ecam_att_hdg.mark</object-name>
<factor>-30</factor>
<property>controls/navigation/switching/att-hdg</property>
<axis>
<x1-m>-0.432428</x1-m>
<y1-m>-0.067552</y1-m>
<z1-m>-0.063695</z1-m>
<x2-m>-0.432195</x2-m>
<y2-m>-0.067552</y2-m>
<z2-m>-0.062285</z2-m>
</axis>
</animation>
<animation>
<type>pick</type>
<object-name>ecam_att_hdg</object-name>
<action>
<button>0</button>
<button>3</button>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>
if (systems.SwitchingPanel.Switches.attHdg.getValue() != 1) {
systems.SwitchingPanel.doAttHdg(systems.SwitchingPanel.Switches.attHdg.getValue() + 1);
} else {
systems.SwitchingPanel.doAttHdg(-1);
}
</script>
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/knb1", 1);</script>
</binding>
</action>
<action>
<button>2</button>
<button>4</button>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>
if (systems.SwitchingPanel.Switches.attHdg.getValue() != -1) {
systems.SwitchingPanel.doAttHdg(systems.SwitchingPanel.Switches.attHdg.getValue() - 1);
} else {
systems.SwitchingPanel.doAttHdg(1);
}
</script>
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/knb1", 1);</script>
</binding>
</action>
</animation>
<!-- Z Colors/Effects -->
<animation>

View file

@ -2,145 +2,167 @@
# Copyright (c) 2020 Josh Davidson (Octal450)
var IESI = nil;
var IESI_display = nil;
var elapsedtime = 0;
var ASI = 0;
var alt = 0;
var altTens = 0;
var airspeed_act = 0;
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_brt = props.globals.getNode("/controls/lighting/DU/iesi", 1);
var iesi_rate = props.globals.getNode("/systems/acconfig/options/iesi-rate", 1);
var et = props.globals.getNode("/sim/time/elapsed-sec", 1);
var aconfig = props.globals.getNode("/systems/acconfig/autoconfig-running", 1);
var airspeed = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt", 1);
var mach = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach", 1);
var pitch = props.globals.getNode("/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);
var altimeter_mode = props.globals.getNode("/instrumentation/altimeter[0]/std", 1);
var qnh_hpa = props.globals.getNode("/instrumentation/altimeter/setting-hpa", 1);
var qnh_inhg = props.globals.getNode("/instrumentation/altimeter/setting-inhg", 1);
var ASI = 0;
var _showIESI = 0;
var _fast = 0;
var _IESITime = 0;
var canvas_IESI_base = {
init: func(canvas_group, file) {
var font_mapper = func(family, weight) {
var canvas_IESI = {
new: func(svg, name) {
var obj = {parents: [canvas_IESI] };
obj.canvas = canvas.new({
"name": "IESI",
"size": [1024, 1024],
"view": [1024, 1024],
"mipmapping": 1,
});
obj.canvas.addPlacement({"node": "iesi.screen"});
obj.group = obj.canvas.createGroup();
obj.font_mapper = func(family, weight) {
return "LiberationFonts/LiberationSans-Regular.ttf";
};
canvas.parsesvg(canvas_group, file, {"font-mapper": font_mapper});
var svg_keys = me.getKeys();
foreach(var key; svg_keys) {
me[key] = canvas_group.getElementById(key);
var svg_keys = me.getKeys();
foreach (var key; svg_keys) {
me[key] = canvas_group.getElementById(key);
var clip_el = canvas_group.getElementById(key ~ "_clip");
if (clip_el != nil) {
clip_el.setVisible(0);
var tran_rect = clip_el.getTransformedBounds();
var clip_rect = sprintf("rect(%d,%d, %d,%d)",
tran_rect[1], # 0 ys
tran_rect[2], # 1 xe
tran_rect[3], # 2 ye
tran_rect[0]); #3 xs
# coordinates are top,right,bottom,left (ys, xe, ye, xs) ref: l621 of simgear/canvas/CanvasElement.cxx
me[key].set("clip", clip_rect);
me[key].set("clip-frame", canvas.Element.PARENT);
}
}
}
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;
},
getKeys: func() {
return [];
},
update: func() {
cur_time = et.getValue();
# todo consider relay 7XB for power of DC HOT 1
# todo transient max 0.2s
# todo 20W power consumption
if (iesi_reset.getValue() == 1) {
if (iesi_init.getBoolValue() and _IESITime + 90 >= et.getValue()) {
me._fast = 1;
} else {
me._fast = 0;
}
iesi_init.setBoolValue(0);
}
if (systems.ELEC.Bus.dcEss.getValue() >= 25 or (systems.ELEC.Bus.dcHot1.getValue() >= 25 and airspeed.getValue() >= 50 and cur_time >= 5)) {
me._showIESI = 1;
IESI.update();
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
foreach(var key; obj.getKeys()) {
obj[key] = obj.group.getElementById(key);
if (aconfig.getValue() != 1 and iesi_init.getValue() != 1) {
iesi_init.setBoolValue(1);
if (me._fast) {
_IESITime = cur_time - 80;
me._fast = 0;
} else {
_IESITime = cur_time;
}
} else if (aconfig.getValue() == 1 and iesi_init.getValue() != 1) {
iesi_init.setBoolValue(1);
_IESITime = cur_time - 87;
}
} else {
me._showIESI = 0;
iesi_init.setBoolValue(0);
}
if (me._showIESI and iesi_brt.getValue() > 0.01) {
IESI.page.show();
} else {
IESI.page.hide();
}
},
};
var clip_el = obj.group.getElementById(key ~ "_clip");
if (clip_el != nil) {
clip_el.setVisible(0);
var tran_rect = clip_el.getTransformedBounds();
var canvas_IESI = {
new: func(canvas_group, file) {
var m = {parents: [canvas_IESI, canvas_IESI_base]};
m.init(canvas_group, file);
m._cachedInhg = -99;
m._machWasAbove50 = 0;
m._roll = 0;
return m;
},
var clip_rect = sprintf("rect(%d,%d, %d,%d)",
tran_rect[1],
tran_rect[2],
tran_rect[3],
tran_rect[0]);
obj[key].set("clip", clip_rect);
obj[key].set("clip-frame", canvas.Element.PARENT);
}
};
obj.AI_horizon_trans = obj["AI_horizon"].createTransform();
obj.AI_horizon_rot = obj["AI_horizon"].createTransform();
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;
} else if (val >= 520) {
ASI = 490;
} else {
ASI = val - 30;
}
obj["ASI_scale"].setTranslation(0, ASI * 8.295);
}),
props.UpdateManager.FromHashList(["altitude","altitude_ind"], nil, func(val) {
if (val.altitude > 50000) {
val.altitude = 50000;
} elsif (val.altitude < -2000) {
val.altitude = -2000;
}
if (val.altitude < 0) {
obj["negText"].show();
obj["negText2"].show();
} else {
obj["negText"].hide();
obj["negText2"].hide();
}
obj.altOffset = (val.altitude / 500) - int(val.altitude / 500);
obj.middleAltText = roundaboutAlt(val.altitude / 100);
if (obj.altOffset > 0.5) {
obj.middleAltOffset = -(obj.altOffset - 1) * 258.5528;
} else {
obj.middleAltOffset = -obj.altOffset * 258.5528;
}
obj["ALT_scale"].setTranslation(0, -obj.middleAltOffset);
obj["ALT_scale"].update();
obj["ALT_five"].setText(sprintf("%03d", abs(obj.middleAltText+10)));
obj["ALT_four"].setText(sprintf("%03d", abs(obj.middleAltText+5)));
obj["ALT_three"].setText(sprintf("%03d", abs(obj.middleAltText)));
obj["ALT_two"].setText(sprintf("%03d", abs(obj.middleAltText-5)));
obj["ALT_one"].setText(sprintf("%03d", abs(obj.middleAltText-10)));
if (val.altitude < 0 and val.altitude_ind > 20) {
val.altitude_ind = 20;
} elsif (val.altitude > 0 and val.altitude_ind > 500) {
val.altitude_ind = 500;
}
obj["ALT_digits"].setText(sprintf("%s", val.altitude_ind));
obj["ALT_meters"].setText(sprintf("%5.0f", math.round(val.altitude * 0.3048, 10)));
obj.altTens = num(right(sprintf("%02d", val.altitude), 2));
obj["ALT_tens"].setTranslation(0, obj.altTens * 3.16);
}),
props.UpdateManager.FromHashValue("mach", nil, func(val) {
if (val >= 0.5) {
obj._machWasAbove50 = 1;
obj["ASI_mach_decimal"].show();
obj["ASI_mach"].show();
} elsif (val >= 0.45 and obj._machWasAbove50) {
obj["ASI_mach_decimal"].show();
obj["ASI_mach"].show();
} else {
obj._machWasAbove50 = 0;
obj["ASI_mach_decimal"].hide();
obj["ASI_mach"].hide();
}
if (val >= 0.999) {
obj["ASI_mach"].setText("99");
} else {
obj["ASI_mach"].setText(sprintf("%2.0f", val * 100));
}
}),
props.UpdateManager.FromHashValue("pitch", nil, func(val) {
obj.AI_horizon_trans.setTranslation(0, val * 16.74);
}),
props.UpdateManager.FromHashValue("roll", nil, func(val) {
obj.AI_horizon_rot.setRotation(-val * D2R, obj["AI_center"].getCenter());
obj["AI_bank"].setRotation(-val * D2R);
}),
props.UpdateManager.FromHashValue("skid", nil, func(val) {
obj["AI_slipskid"].setTranslation(val, 0);
}),
props.UpdateManager.FromHashList(["altimeter_mode","qnh_hpa","qnh_inhg"], nil, func(val) {
obj.updateQNH(val);
}),
];
_showIESI = 0;
_fast = 0;
_IESITime = 0.0;
obj._cachedInhg = nil;
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"];
},
update: func() {
if (qnh_inhg.getValue() != me._cachedInhg) {
me._cachedInhg = qnh_inhg.getValue();
me.updateQNH();
update: func(notification) {
if (notification.qnh_inhg != me._cachedInhg) {
me._cachedInhg = notification.qnh_inhg;
me.updateQNH(notification);
}
if (_IESITime + 90 >= et.getValue()) {
me.updatePower(notification);
if (me.group.getVisible() == 0) {
return;
}
if (_IESITime + 90 >= notification.elapsed_seconds) {
me["IESI"].hide();
me["IESI_Init"].show();
return;
@ -149,137 +171,119 @@ var canvas_IESI = {
me["IESI"].show();
}
# Airspeed
# 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 >= 520) {
ASI = 490;
} else {
ASI = airspeed_act - 30;
}
me["ASI_scale"].setTranslation(0, ASI * 8.295);
if (mach_act >= 0.5) {
me._machWasAbove50 = 1;
me["ASI_mach_decimal"].show();
me["ASI_mach"].show();
} elsif (mach_act >= 0.45 and me._machWasAbove50) {
me["ASI_mach_decimal"].show();
me["ASI_mach"].show();
} else {
me._machWasAbove50 = 0;
me["ASI_mach_decimal"].hide();
me["ASI_mach"].hide();
}
if (mach_act >= 0.999) {
me["ASI_mach"].setText("99");
} else {
me["ASI_mach"].setText(sprintf("%2.0f", mach_act * 100));
}
# Attitude
me._roll = pts.Orientation.roll.getValue();
me.AI_horizon_trans.setTranslation(0, pitch.getValue() * 16.74);
me.AI_horizon_rot.setRotation(me._roll * D2R, me["AI_center"].getCenter());
me["AI_slipskid"].setTranslation(skid.getValue(), 0);
me["AI_bank"].setRotation(me._roll * D2R);
# Altitude
me.altitude = altitude.getValue();
if (me.altitude > 50000) {
me.altitude = 50000;
} elsif (me.altitude < -2000) {
me.altitude = -2000;
}
if (me.altitude < 0) {
me["negText"].show();
me["negText2"].show();
} else {
me["negText"].hide();
me["negText2"].hide();
}
me.altOffset = me.altitude / 500 - int(me.altitude / 500);
me.middleAltText = roundaboutAlt(me.altitude / 100);
me.middleAltOffset = nil;
if (me.altOffset > 0.5) {
me.middleAltOffset = -(me.altOffset - 1) * 258.5528;
} else {
me.middleAltOffset = -me.altOffset * 258.5528;
}
me["ALT_scale"].setTranslation(0, -me.middleAltOffset);
me["ALT_scale"].update();
me["ALT_five"].setText(sprintf("%03d", abs(me.middleAltText+10)));
me["ALT_four"].setText(sprintf("%03d", abs(me.middleAltText+5)));
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", math.round(me.altitude * 0.3048, 10)));
altTens = num(right(sprintf("%02d", me.altitude), 2));
me["ALT_tens"].setTranslation(0, altTens * 3.16);
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
},
updateQNH: func() {
if (altimeter_mode.getBoolValue()) {
updateQNH: func(notification) {
if (notification.altimeter_mode) {
me["QNH_setting"].hide();
me["QNH_std"].show();
} else {
me["QNH_setting"].setText(sprintf("%4.0f", qnh_hpa.getValue()) ~ "/" ~ sprintf("%2.2f", qnh_inhg.getValue()));
me["QNH_setting"].setText(sprintf("%4.0f", notification.qnh_hpa) ~ "/" ~ sprintf("%2.2f", notification.qnh_inhg));
me["QNH_setting"].show();
me["QNH_std"].hide();
}
}
},
updatePower: func(notification) {
# todo consider relay 7XB for power of DC HOT 1
# todo transient max 0.2s
# todo 20W power consumption
if (notification.attReset == 1) {
if (notification.iesiInit and _IESITime + 90 >= notification.elapsed_seconds) {
_fast = 1;
} else {
_fast = 0;
}
iesi_init.setBoolValue(0);
}
if (notification.dcEss >= 25 or (notification.dcHot1 >= 25 and notification.airspeed >= 50 and notification.elapsed_seconds >= 5)) {
_showIESI = 1;
if (notification.acconfig != 1 and notification.iesiInit != 1) {
iesi_init.setBoolValue(1);
if (_fast) {
_IESITime = notification.elapsed_seconds - 80;
_fast = 0;
} else {
_IESITime = notification.elapsed_seconds;
}
} else if (notification.acconfig == 1 and notification.iesiInit != 1) {
iesi_init.setBoolValue(1);
_IESITime = notification.elapsed_seconds - 87;
}
} else {
_showIESI = 0;
iesi_init.setBoolValue(0);
}
if (_showIESI and notification.iesiBrt > 0.01) {
me.group.setVisible(1);
} else {
me.group.setVisible(0);
}
},
};
setlistener("sim/signals/fdm-initialized", func {
IESI_display = canvas.new({
"name": "IESI",
"size": [1024, 1024],
"view": [1024, 1024],
"mipmapping": 1
});
IESI_display.addPlacement({"node": "iesi.screen"});
var group_IESI = IESI_display.createGroup();
IESI = canvas_IESI.new(group_IESI, "Aircraft/A320-family/Models/Instruments/IESI/res/iesi.svg");
IESI.updateQNH();
IESI_update.start();
if (iesi_rate.getValue() > 1) {
rateApply();
}
});
var IESIRecipient =
{
new: func(_ident)
{
var IESIRecipient = emesary.Recipient.new(_ident);
IESIRecipient.MainScreen = nil;
IESIRecipient.Receive = func(notification)
{
if (notification.NotificationType == "FrameNotification")
{
if (IESIRecipient.MainScreen == nil) {
IESIRecipient.MainScreen = canvas_IESI.new("Aircraft/A320-family/Models/Instruments/IESI/res/iesi.svg", "A320 IESI");
}
#if (!math.mod(notifications.frameNotification.FrameCount,2)){
IESIRecipient.MainScreen.update(notification);
#}
return emesary.Transmitter.ReceiptStatus_OK;
}
return emesary.Transmitter.ReceiptStatus_NotProcessed;
};
return IESIRecipient;
},
};
setlistener("/instrumentation/altimeter[0]/std", func() { if (IESI != nil) { IESI.updateQNH(); } }, 0, 0);
var A320IESI = IESIRecipient.new("A320 IESI");
emesary.GlobalTransmitter.Register(A320IESI);
var rateApply = func {
IESI_update.restart(0.05 * iesi_rate.getValue());
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",
"attReset": "/instrumentation/iesi/att-reset",
"dcEss": "/systems/electrical/bus/dc-ess",
"dcHot1": "/systems/electrical/bus/dc-hot-1",
"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",
"roll": "/orientation/roll-deg",
"skid": "/instrumentation/iesi/slip-skid",
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 IESI", name, input[name]));
}
var IESI_update = maketimer(0.05, func {
canvas_IESI_base.update();
});
var showIESI = func {
var dlg = canvas.Window.new([256, 256], "dialog").set("resize", 1);
dlg.setCanvas(IESI_display);
var dlg = canvas.Window.new([512, 512], "dialog").set("resize", 1);
dlg.setCanvas(A320IESI.MainScreen.canvas);
}
setlistener("", func() { if (A320IESI.MainScreen != nil) { A320IESI.MainScreen.updateQNH(notification); } }, 0, 0);
var roundabout = func(x) {
var y = x - int(x);
return y < 0.5 ? int(x) : 1 + int(x);

View file

@ -41,9 +41,9 @@
inkscape:window-height="705"
id="namedview371"
showgrid="true"
inkscape:zoom="0.45254834"
inkscape:cx="247.89479"
inkscape:cy="5057.0874"
inkscape:zoom="0.90509668"
inkscape:cx="529.7525"
inkscape:cy="2142.6048"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -167,7 +167,7 @@
inkscape:label="#rect5809" />
<path
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"
d="m -968.98051,576.16868 1277.7096,0"
d="M -968.98051,576.16868 H 308.72909"
id="path4602"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -182,7 +182,7 @@
</g>
<path
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"
d="m 437.0192,370.16362 113.79938,0"
d="M 437.0192,370.16362 H 550.81858"
id="path4328"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -190,11 +190,11 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4330"
d="m 478.8848,411.41322 30.07794,0"
d="m 478.8848,411.41322 h 30.07794"
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" />
<path
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"
d="m 464.4576,452.87162 58.9279,0"
d="m 464.4576,452.87162 h 58.9279"
id="path4342"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -213,7 +213,7 @@
sodipodi:role="line">10</tspan></text>
<path
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"
d="m 478.8848,494.1216 30.07794,0"
d="m 478.8848,494.1216 h 30.07794"
id="path4354"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -221,11 +221,11 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4356"
d="m 437.0192,204.95642 113.79938,0"
d="M 437.0192,204.95642 H 550.81858"
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" />
<path
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"
d="m 478.8848,246.20602 30.07794,0"
d="m 478.8848,246.20602 h 30.07794"
id="path4359"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -233,7 +233,7 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4361"
d="m 464.4576,287.66442 58.9279,0"
d="m 464.4576,287.66442 h 58.9279"
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" />
<text
xml:space="preserve"
@ -252,11 +252,11 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4367"
d="m 478.8848,328.9144 30.07794,0"
d="m 478.8848,328.9144 h 30.07794"
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" />
<path
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"
d="m 437.0192,39.74922 113.79938,0"
d="M 437.0192,39.74922 H 550.81858"
id="path4381"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -264,11 +264,11 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4383"
d="m 478.8848,80.99882 30.07794,0"
d="m 478.8848,80.99882 h 30.07794"
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" />
<path
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"
d="m 464.4576,122.45722 58.9279,0"
d="m 464.4576,122.45722 h 58.9279"
id="path4385"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -287,7 +287,7 @@
sodipodi:role="line">30</tspan></text>
<path
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"
d="m 478.8848,163.7072 30.07794,0"
d="m 478.8848,163.7072 h 30.07794"
id="path4391"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -311,8 +311,8 @@
y="-102.35725"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:72px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">40</tspan></text>
<path
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"
d="m 437.0192,-298.50349 113.79938,-1.2e-4"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:9.60002518;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m 422.019,-298.5035 143.79971,-1e-4"
id="path4405"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -333,42 +333,42 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4441"
d="M 437.0192,-546.31398 H 550.81858"
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" />
d="M 409.24083,-546.31398 H 578.59685"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:11.71118736;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
<text
xml:space="preserve"
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"
x="433.55658"
x="417.83078"
y="-496.30688"
id="text4447"
transform="scale(0.95383278,1.0484018)"
inkscape:label="#text975"><tspan
sodipodi:role="line"
id="tspan4449"
x="433.55658"
x="417.83078"
y="-496.30688"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:72px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">80</tspan></text>
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4465"
d="m 437.0192,700.3688 113.79938,0"
d="M 437.0192,700.3688 H 550.81858"
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" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4467"
d="m 478.8848,576.4112 30.07794,0"
d="m 478.8848,576.4112 h 30.07794"
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" />
<path
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"
d="m 464.4576,617.8696 58.9279,0"
d="m 464.4576,617.8696 h 58.9279"
id="path4469"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
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"
d="m 478.8848,659.11958 30.07794,0"
d="m 478.8848,659.11958 h 30.07794"
id="path4471"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -387,13 +387,13 @@
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</tspan></text>
<path
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"
d="m 437.0192,865.36718 113.79938,0"
d="M 437.0192,865.36718 H 550.81858"
id="path4477"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
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"
d="m 478.8848,741.40958 30.07794,0"
d="m 478.8848,741.40958 h 30.07794"
id="path4479"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -401,13 +401,13 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4481"
d="m 464.4576,782.86798 58.9279,0"
d="m 464.4576,782.86798 h 58.9279"
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" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4483"
d="m 478.8848,824.11796 30.07794,0"
d="m 478.8848,824.11796 h 30.07794"
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" />
<text
inkscape:label="#text975"
@ -426,23 +426,23 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4489"
d="m 437.0192,1030.3657 113.79938,0"
d="M 437.0192,1030.3657 H 550.81858"
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" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4491"
d="m 478.8848,906.40805 30.07794,0"
d="m 478.8848,906.40805 h 30.07794"
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" />
<path
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"
d="m 464.4576,947.86645 58.9279,0"
d="m 464.4576,947.86645 h 58.9279"
id="path4493"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
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"
d="m 478.8848,989.11645 30.07794,0"
d="m 478.8848,989.11645 h 30.07794"
id="path4495"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -461,7 +461,7 @@
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</tspan></text>
<path
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"
d="m 437.0192,1195.3641 113.79938,0"
d="m 437.0192,1195.3645 113.79938,-4e-4"
id="path4501"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -482,8 +482,8 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4513"
d="m 437.0192,1360.363 113.79938,-4e-4"
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" />
d="m 422.01904,1360.363 143.79963,-4e-4"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:9.60008335;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
<text
xml:space="preserve"
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"
@ -498,8 +498,8 @@
y="1322.894"
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</tspan></text>
<path
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"
d="M 437.0192,1608.1735 H 550.81858"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:11.70345592;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="M 409.35289,1608.1735 H 578.48483"
id="path4549"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -508,14 +508,54 @@
transform="scale(0.95383278,1.0484018)"
id="text4557"
y="1558.7142"
x="433.55658"
x="417.83078"
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"><tspan
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"
y="1558.7142"
x="433.55658"
x="417.83078"
id="tspan4559"
sodipodi:role="line">80</tspan></text>
<g
id="g1133"
transform="translate(-1.6081837)">
<path
sodipodi:nodetypes="ccccccc"
inkscape:connector-curvature="0"
id="path883"
d="m 455.77807,-179.16645 13.2497,9e-5 26.49939,55.28318 26.49939,-55.28318 h 13.2497 l -39.74909,87.686925 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" />
<path
style="fill:none;stroke:#ff0000;stroke-width:6.5999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 435.90352,-490.52034 19.87455,-2e-5 39.74909,82.92471 39.74909,-82.92471 h 19.87455 l -59.62364,131.53037 z"
id="path1765"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
sodipodi:nodetypes="ccccccccccc"
inkscape:connector-curvature="0"
id="path884"
d="m 495.52716,-564.83101 -66.90421,-59.14217 h 59.49741 v 14.7583 h -11.11022 l 18.51702,19.61514 18.51702,-19.61514 h -11.11022 v -14.7583 h 59.49741 z"
style="fill:none;stroke:#ff0000;stroke-width:7.42500973;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
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 535.27624,1241.2344 -13.2497,-10e-5 -26.49939,-55.2831 -26.49939,55.2831 h -13.2497 l 39.74909,-87.6869 z"
id="path1121"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="fill:none;stroke:#ff0000;stroke-width:7.42500973;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 495.52716,1626.6904 66.90421,59.1422 h -59.49741 v -14.7583 h 11.11022 l -18.51702,-19.6151 -18.51702,19.6151 h 11.11022 v 14.7583 h -59.49741 z"
id="path1123"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccc" />
<path
sodipodi:nodetypes="ccccccc"
inkscape:connector-curvature="0"
id="path1125"
d="m 555.1508,1552.3798 h -19.87455 l -39.74909,-82.9247 -39.74909,82.9247 h -19.87455 l 59.62364,-131.5304 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" />
</g>
</g>
<rect
style="opacity:1;fill:#1fa7f8;fill-opacity:1;stroke:none;stroke-width:2.58921981;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
@ -569,7 +609,7 @@
<path
inkscape:label="#path4447"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m 831.8533,392.50107 8.00028,0"
d="m 831.8533,392.50107 h 8.00028"
id="path4447"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -577,7 +617,7 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4301"
d="m 831.8533,444.21199 40.80028,0"
d="m 831.8533,444.21199 h 40.80028"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
<text
xml:space="preserve"
@ -596,7 +636,7 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4307"
d="m 831.8533,651.05362 8.00028,0"
d="m 831.8533,651.05362 h 8.00028"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
inkscape:label="#path4447" />
<text
@ -615,13 +655,13 @@
<path
inkscape:label="#path4447"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m 831.8533,909.6063 8.00028,0"
d="m 831.8533,909.6063 h 8.00028"
id="path4313"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m 831.8533,495.92255 40.80028,0"
d="m 831.8533,495.92255 h 40.80028"
id="path4315"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -629,17 +669,17 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4317"
d="m 831.8533,547.63311 40.80028,0"
d="m 831.8533,547.63311 h 40.80028"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m 831.8533,599.34367 40.80028,0"
d="m 831.8533,599.34367 h 40.80028"
id="path4319"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m 831.8533,702.76399 40.80028,0"
d="m 831.8533,702.76399 h 40.80028"
id="path4321"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -647,11 +687,11 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4323"
d="m 831.8533,754.47455 40.80028,0"
d="m 831.8533,754.47455 h 40.80028"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m 831.8533,806.18511 40.80028,0"
d="m 831.8533,806.18511 h 40.80028"
id="path4325"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -659,7 +699,7 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4327"
d="m 831.8533,857.89567 40.80028,0"
d="m 831.8533,857.89567 h 40.80028"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
<text
xml:space="preserve"
@ -678,12 +718,12 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4333"
d="m 831.8533,133.94827 8.00028,0"
d="m 831.8533,133.94827 h 8.00028"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
inkscape:label="#path4447" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m 831.8533,185.65919 40.80028,0"
d="m 831.8533,185.65919 h 40.80028"
id="path4335"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -691,11 +731,11 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4337"
d="m 831.8533,237.36975 40.80028,0"
d="m 831.8533,237.36975 h 40.80028"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m 831.8533,289.08031 40.80028,0"
d="m 831.8533,289.08031 h 40.80028"
id="path4339"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -703,7 +743,7 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4341"
d="m 831.8533,340.79087 40.80028,0"
d="m 831.8533,340.79087 h 40.80028"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
<text
inkscape:label="#text975"
@ -721,7 +761,7 @@
<path
inkscape:label="#path4447"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m 831.8533,-124.60453 8.00028,0"
d="m 831.8533,-124.60453 h 8.00028"
id="path4347"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -729,11 +769,11 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4349"
d="m 831.8533,-72.893608 40.80028,0"
d="m 831.8533,-72.893608 h 40.80028"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m 831.8533,-21.183048 40.80028,0"
d="m 831.8533,-21.183048 h 40.80028"
id="path4351"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -741,11 +781,11 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4353"
d="m 831.8533,30.527512 40.80028,0"
d="m 831.8533,30.527512 h 40.80028"
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m 831.8533,82.238072 40.80028,0"
d="m 831.8533,82.238072 h 40.80028"
id="path4355"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
@ -768,7 +808,7 @@
<path
inkscape:label="#path905"
style="fill:#c9d121;fill-opacity:1;stroke:none;stroke-width:2.71116304;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m 208.99735,575.7414 0,-76.791 -44.33886,38.3955 z"
d="m 208.99735,575.7414 v -76.791 l -44.33886,38.3955 z"
id="path928"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
@ -827,7 +867,7 @@
sodipodi:nodetypes="cccccccc"
inkscape:connector-curvature="0"
id="path958"
d="m 1001.8296,610.5928 -116.9056,0 0,-22.2 -181.6688,-1.4e-4 0,-96.33104 181.6688,-2e-5 2.6e-4,-22.2 116.90534,0"
d="M 1001.8296,610.5928 H 884.924 v -22.2 l -181.6688,-1.4e-4 v -96.33104 l 181.6688,-2e-5 2.6e-4,-22.2 h 116.90534"
style="fill:none;fill-opacity:1;stroke:#ffff00;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
</g>
<text
@ -936,7 +976,7 @@
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
id="path977"
d="m 832.0951,113.3344 -384.0688,1.5e-4 0,-75.631038 384.0688,-2e-5 2.6e-4,75.630908"
d="m 832.0951,113.3344 -384.0688,1.5e-4 V 37.703512 l 384.0688,-2e-5 2.6e-4,75.630908"
style="fill:none;fill-opacity:1;stroke:#ffff00;stroke-width:8;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" />
<g
id="AI_index"
@ -971,7 +1011,7 @@
sodipodi:nodetypes="cccccccccccc"
inkscape:connector-curvature="0"
id="rect4760-1"
d="m 260.72373,473.84829 20.67975,-1.3e-4 0,15.43882 0,0 1.8e-4,12.84989 -15.4389,0 -0.14628,-12.84989 0,0 -62.58577,-5e-5 0,-15.43891 57.49102,2.1e-4 z"
d="m 260.72373,473.84829 20.67975,-1.3e-4 v 15.43882 0 l 1.8e-4,12.84989 h -15.4389 l -0.14628,-12.84989 v 0 l -62.58577,-5e-5 v -15.43891 l 57.49102,2.1e-4 z"
style="fill:none;fill-opacity:1;stroke:#c9d121;stroke-width:3.54375005;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
@ -993,7 +1033,7 @@
y="486.37204" />
<path
style="fill:none;fill-opacity:1;stroke:#c9d121;stroke-width:3.54375005;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 260.72373,473.84829 20.67975,-1.3e-4 0,15.43882 0,0 1.8e-4,12.84989 -15.4389,0 -0.14628,-12.84989 0,0 -62.58577,-5e-5 0,-15.43891 57.49102,2.1e-4 z"
d="m 260.72373,473.84829 20.67975,-1.3e-4 v 15.43882 0 l 1.8e-4,12.84989 h -15.4389 l -0.14628,-12.84989 v 0 l -62.58577,-5e-5 v -15.43891 l 57.49102,2.1e-4 z"
id="path4331"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccccc" />
@ -1003,7 +1043,7 @@
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="AI_bank_center"
d="m 529.71671,148.28357 -71.591,0 35.7955,44.80749 z"
d="m 529.71671,148.28357 h -71.591 l 35.7955,44.80749 z"
style="fill:#c9d121;fill-opacity:1;stroke:none;stroke-width:2.71116304;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
inkscape:label="#path905" />
<g
@ -1112,7 +1152,7 @@
inkscape:transform-center-y="-258.88333" />
<path
style="fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:3.99994254;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
d="m 418.32961,292.18309 59.8472,-3e-5 -8.6432,-14.52797 -42.5608,0 z"
d="m 418.32961,292.18309 59.8472,-3e-5 -8.6432,-14.52797 h -42.5608 z"
id="AI_slipskid"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc"

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 115 KiB

View file

@ -63,6 +63,7 @@ var myCockpit_switches = {
"toggle_chrono": {path: "/inputs/CHRONO", value: 0, type: "INT"},
"toggle_xtrk_error": {path: "/nd/xtrk-error", value: 0, type: "BOOL"},
"toggle_trk_line": {path: "/nd/trk-line", value: 0, type: "BOOL"},
"ADIRS3": {path: "/nd/ir-3", value: 0, type: "BOOL"},
};
var canvas_nd_base = {
@ -186,6 +187,8 @@ var canvas_ND_1 = {
# here we make the ND:
me.NDCpt = ND.new("instrumentation/efis", myCockpit_switches, "Airbus");
me.NDCpt.attitude_heading_setting = -1;
me.NDCpt.adirs_property = props.globals.getNode("/instrumentation/efis[0]/nd/ir-1",1);
me.NDCpt.newMFD(canvas_group);
me.NDCpt.update();
@ -205,7 +208,10 @@ var canvas_ND_2 = {
m.init(canvas_group);
# here we make the ND:
myCockpit_switches["ADIRS"]= {path: "/nd/ir-2", value: 0, type: "BOOL"};
me.NDFo = ND.new("instrumentation/efis[1]", myCockpit_switches, "Airbus");
me.NDFo.attitude_heading_setting = 1;
me.NDFo.adirs_property = props.globals.getNode("/instrumentation/efis[1]/nd/ir-2",1);
me.NDFo.newMFD(canvas_group);
me.NDFo.update();

View file

@ -11,6 +11,7 @@ var _MP_dbg_lvl = canvas._MP_dbg_lvl;
var assert_m = canvas.assert_m;
var wxr_live_tree = "/instrumentation/wxr";
var adirs_3 = props.globals.getNode("/instrumentation/efis[0]/nd/ir-3", 1);
canvas.NavDisplay.set_switch = func(s, v) {
var switch = me.efis_switches[s];
@ -160,6 +161,7 @@ canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update
var make_event_handler = func(predicate, layer) func predicate(me, layer);
me.layers={}; # storage container for all ND specific layers
me.predicates={};
# look up all required layers as specified per the NDStyle hash and do the initial setup for event handling
var default_opts = me.options != nil and contains(me.options, "defaults") ? me.options.defaults : nil;
foreach(var layer; me.nd_style.layers) {
@ -214,6 +216,7 @@ canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update
# pass the ND instance and the layer handle to the predicate when it is called
# so that it can directly access the ND instance and its own layer (without having to know the layer"s name)
var event_handler = make_event_handler(layer.predicate, the_layer);
me.predicates[layer.name] = event_handler;
foreach(var event; layer.update_on) {
# this handles timers
if (typeof(event)=="hash" and contains(event, "rate_hz")) {
@ -433,7 +436,7 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
me.symbols.selHdgLine2.setRotation(hdgBugRot);
}
var staPtrVis = !me.in_mode("toggle_display_mode", ["PLAN"]);
var staPtrVis = (!me.in_mode("toggle_display_mode", ["PLAN"]) and (me.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == me.attitude_heading_setting)));
if((me.in_mode("toggle_display_mode", ["MAP"]) and me.get_switch("toggle_display_type") == "CRT")
or (me.get_switch("toggle_track_heading") and me.get_switch("toggle_display_type") == "LCD"))
{
@ -459,7 +462,7 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
var adf1hdg = getprop("/instrumentation/adf[1]/indicated-bearing-deg");
if(!me.get_switch("toggle_centered"))
{
if(me.in_mode("toggle_display_mode", ["PLAN"]))
if(me.in_mode("toggle_display_mode", ["PLAN"]) or (me.adirs_property.getValue() != 1 and (adirs_3.getValue() != 1 or att_switch.getValue() != me.attitude_heading_setting)))
me.symbols.trkInd.hide();
else
me.symbols.trkInd.show();

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 134 KiB

View file

@ -7,6 +7,9 @@
var ALWAYS = func 1;
var NOTHING = func nil;
var att_switch = props.globals.getNode("/controls/navigation/switching/att-hdg", 1);
var adirs_3 = props.globals.getNode("/instrumentation/efis[0]/nd/ir-3", 1);
canvas.NDStyles["Airbus"] = {
font_mapper: func(family, weight) {
if( family == "Liberation Sans" and weight == "normal" )
@ -86,7 +89,7 @@ canvas.NDStyles["Airbus"] = {
predicate: func(nd, layer) {
var visible=nd.get_switch("toggle_weather") and
nd.get_switch("toggle_weather_live") and
nd.get_switch("toggle_display_mode") != "PLAN";
nd.get_switch("toggle_display_mode") != "PLAN" and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
layer.group.setVisible(visible);
if (visible) {
layer.update();
@ -105,7 +108,7 @@ canvas.NDStyles["Airbus"] = {
#print("Running storms predicate");
var visible=nd.get_switch("toggle_weather") and
!nd.get_switch("toggle_weather_live") and
nd.get_switch("toggle_display_mode") != "PLAN";
nd.get_switch("toggle_display_mode") != "PLAN" and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
layer.group.setVisible(visible);
if (visible) {
#print("storms update requested! (timer issue when closing the dialog?)");
@ -122,7 +125,7 @@ canvas.NDStyles["Airbus"] = {
predicate: func(nd, layer) {
var visible = nd.get_switch("toggle_waypoints") and
nd.in_mode("toggle_display_mode", ["MAP"]) and
(nd.rangeNm() <= 40);
(nd.rangeNm() <= 40) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
layer.group.setVisible( visible );
if (visible)
layer.update();
@ -151,7 +154,7 @@ canvas.NDStyles["Airbus"] = {
isMapStructure: 1,
update_on: ["toggle_display_mode","toggle_range",{rate_hz: 2}],
predicate: func(nd, layer) {
var visible = nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]);# and nd.get_switch("toggle_fplan");
var visible = nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
layer.group.setVisible( visible );
if (visible) {
layer.update();
@ -237,7 +240,7 @@ canvas.NDStyles["Airbus"] = {
"toggle_display_mode"],
predicate: func(nd, layer) {
var visible = nd.get_switch("toggle_airports") and
nd.in_mode("toggle_display_mode", ["MAP"]);
nd.in_mode("toggle_display_mode", ["MAP"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
layer.group.setVisible( visible );
if (visible) {
layer.update();
@ -260,7 +263,7 @@ canvas.NDStyles["Airbus"] = {
# toggle visibility here
var visible = nd.get_switch("toggle_vor") and
nd.in_mode("toggle_display_mode", ["MAP"]) and
(nd.rangeNm() <= 40);
(nd.rangeNm() <= 40) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
layer.group.setVisible( visible );
if (visible) {
layer.update();
@ -289,7 +292,7 @@ canvas.NDStyles["Airbus"] = {
predicate: func(nd, layer) {
var visible = nd.get_switch("toggle_dme") and
nd.in_mode("toggle_display_mode", ["MAP"]) and
(nd.rangeNm() <= 40);
(nd.rangeNm() <= 40) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
# toggle visibility here
layer.group.setVisible( visible );
if (visible) {
@ -322,7 +325,7 @@ canvas.NDStyles["Airbus"] = {
predicate: func(nd, layer) {
var visible = nd.get_switch("toggle_ndb") and
nd.in_mode("toggle_display_mode", ["MAP"]) and
(nd.rangeNm() <= 40);
(nd.rangeNm() <= 40) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
# print("Running vor layer predicate");
# toggle visibility here
layer.group.setVisible( visible );
@ -389,7 +392,6 @@ canvas.NDStyles["Airbus"] = {
var visible = nd.get_switch("toggle_traffic");
layer.group.setVisible( visible );
if (visible) {
#print("Updating MapStructure ND layer: TFC");
layer.update();
}
}, # end of layer update predicate
@ -400,7 +402,7 @@ canvas.NDStyles["Airbus"] = {
update_on:["toggle_range","toggle_display_mode"],
predicate: func(nd, layer) {
var visible = (nd.rangeNm() <= 40) and
nd.in_mode("toggle_display_mode", ["MAP","PLAN"]) ;
nd.in_mode("toggle_display_mode", ["MAP","PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)) ;
layer.group.setVisible( visible );
if (visible) {
layer.update();
@ -420,7 +422,7 @@ canvas.NDStyles["Airbus"] = {
always_update: 1,
update_on:["toggle_range","toggle_display_mode","toggle_wpt_idx"],
predicate: func(nd, layer) {
var visible= nd.in_mode("toggle_display_mode", ["MAP","PLAN"]);
var visible= nd.in_mode("toggle_display_mode", ["MAP","PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
layer.group.setVisible( visible );
if (visible) {
layer.update();
@ -452,7 +454,7 @@ canvas.NDStyles["Airbus"] = {
update_on:["toggle_range","toggle_display_mode", "toggle_cstr",
"toggle_wpt_idx"],
predicate: func(nd, layer) {
var visible= (nd.in_mode("toggle_display_mode", ["MAP","PLAN"]));
var visible= (nd.in_mode("toggle_display_mode", ["MAP","PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)));
layer.group.setVisible( visible );
if (visible) {
layer.update();
@ -517,7 +519,7 @@ canvas.NDStyles["Airbus"] = {
missed_constraint_color: [1,0.57,0.14]
},
predicate: func(nd, layer) {
var visible= (nd.in_mode("toggle_display_mode", ["MAP","PLAN"]));
var visible= (nd.in_mode("toggle_display_mode", ["MAP","PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)));
layer.group.setVisible( visible );
if (visible) {
layer.toggle_cstr = nd.get_switch("toggle_cstr");
@ -542,7 +544,7 @@ canvas.NDStyles["Airbus"] = {
isMapStructure: 1,
update_on: ["toggle_display_mode","toggle_range",{rate_hz: 2}],
predicate: func(nd, layer) {
var visible = nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]);
var visible = nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
layer.group.setVisible( visible );
if (visible) {
layer.update();
@ -563,7 +565,7 @@ canvas.NDStyles["Airbus"] = {
isMapStructure: 1,
update_on: ["toggle_display_mode","toggle_range"],
predicate: func(nd, layer) {
var visible = nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]);
var visible = nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting));
layer.group.setVisible( visible );
if (visible) {
layer.update();
@ -593,7 +595,7 @@ canvas.NDStyles["Airbus"] = {
always_update: 1,
update_on:["toggle_display_mode"],
predicate: func(nd, layer) {
var visible = nd.get_switch("toggle_display_mode") == "PLAN";
var visible = (nd.get_switch("toggle_display_mode") == "PLAN" and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)));
layer.group.setVisible( visible );
if (visible) {
layer.update();
@ -671,6 +673,24 @@ canvas.NDStyles["Airbus"] = {
is_false: func(nd) nd.symbols.compass_mask_ctr.hide(),
}
},
{
id: "nd_warn_memo",
impl: {
init: func(nd, symbol),
predicate: ALWAYS,
is_true: func(nd) nd.symbols.nd_warn_memo.hide(),
is_false: func(nd),
},
},
{
id: "nd_warn_msgbox",
impl: {
init: func(nd, symbol),
predicate: ALWAYS,
is_true: func(nd) nd.symbols.nd_warn_msgbox.hide(),
is_false: func(nd),
},
},
{
# TODO: taOnly doesn"t need to use getprop polling in update(), use a listener instead!
id: "taOnly", # the SVG ID
@ -742,7 +762,7 @@ canvas.NDStyles["Airbus"] = {
init: func(nd,symbol),
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg") != nil and
getprop("/FMGC/flightplan[2]/active") and
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)),
is_true: func(nd) {
nd.symbols.wpActiveId.setText(getprop("/FMGC/flightplan[2]/current-leg"));
nd.symbols.wpActiveId.show();
@ -756,7 +776,7 @@ canvas.NDStyles["Airbus"] = {
init: func(nd,symbol),
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg") != nil and
getprop("/FMGC/flightplan[2]/active") and
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)),
is_true: func(nd) {
#var cur_wp = getprop("/autopilot/route-manager/current-wp");
var deg = nil;
@ -779,9 +799,10 @@ canvas.NDStyles["Airbus"] = {
id: "wpActiveDist",
impl: {
init: func(nd,symbol),
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg-dist") != nil and
predicate: func(nd) (getprop("/FMGC/flightplan[2]/current-leg-dist") != nil and
getprop("/FMGC/flightplan[2]/active") and
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"])
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
is_true: func(nd) {
var dst = getprop("/FMGC/flightplan[2]/current-leg-dist");
nd.symbols.wpActiveDist.setText(sprintf("%3.01f",dst));
@ -794,7 +815,8 @@ canvas.NDStyles["Airbus"] = {
id: "wpActiveDistLbl",
impl: {
init: func(nd,symbol),
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg-dist") != nil and getprop("/FMGC/flightplan[2]/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg-dist") != nil and getprop("/FMGC/flightplan[2]/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"])
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)),
is_true: func(nd) {
nd.symbols.wpActiveDistLbl.show();
if(getprop("/FMGC/flightplan[2]/current-leg-dist") > 1000)
@ -807,7 +829,8 @@ canvas.NDStyles["Airbus"] = {
id: "eta",
impl: {
init: func(nd,symbol),
predicate: func(nd) getprop("/autopilot/route-manager/wp/eta") != nil and getprop("/FMGC/flightplan[2]/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
predicate: func(nd) getprop("/autopilot/route-manager/wp/eta") != nil and getprop("/FMGC/flightplan[2]/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"])
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)),
is_true: func(nd) {
var etaSec = getprop("/sim/time/utc/day-seconds")+
getprop("/autopilot/route-manager/wp/eta-seconds");
@ -900,11 +923,70 @@ canvas.NDStyles["Airbus"] = {
is_false: func(nd) {},#nd.symbols.gs.hide(),
},
},
{
id:"nd_warn_hdg",
impl: {
init: func(nd,symbol),
common: func(nd),
predicate: func(nd) (nd.adirs_property.getValue() != 1 and (adirs_3.getValue() != 1 or att_switch.getValue() != nd.attitude_heading_setting)),
is_true: func(nd) {
nd.symbols.nd_warn_hdg.show();
},
is_false: func(nd) {
nd.symbols.nd_warn_hdg.hide();
},
},
},
{
id:"nd_warn_map",
impl: {
init: func(nd,symbol),
common: func(nd),
predicate: func(nd) (nd.adirs_property.getValue() != 1 and (adirs_3.getValue() != 1 or att_switch.getValue() != nd.attitude_heading_setting)),
is_true: func(nd) {
nd.symbols.nd_warn_map.show();
},
is_false: func(nd) {
nd.symbols.nd_warn_map.hide();
},
},
},
{
id:"unavailARC",
impl: {
init: func(nd,symbol),
common: func(nd),
predicate: func(nd) (!nd.get_switch("toggle_centered") and nd.get_switch("toggle_display_mode") != "PLAN"
and (nd.adirs_property.getValue() != 1 and (adirs_3.getValue() != 1 or att_switch.getValue() != nd.attitude_heading_setting))),
is_true: func(nd) {
nd.symbols.unavailARC.show();
},
is_false: func(nd) {
nd.symbols.unavailARC.hide();
},
},
},
{
id:"unavailNAV",
impl: {
init: func(nd,symbol),
common: func(nd),
predicate: func(nd) (nd.get_switch("toggle_centered")
and (nd.adirs_property.getValue() != 1 and (adirs_3.getValue() != 1 or att_switch.getValue() != nd.attitude_heading_setting))),
is_true: func(nd) {
nd.symbols.unavailNAV.show();
},
is_false: func(nd) {
nd.symbols.unavailNAV.hide();
},
},
},
{
id:"compass",
impl: {
init: func(nd,symbol),
predicate: func(nd) (!nd.get_switch("toggle_centered") and nd.get_switch("toggle_display_mode") != "PLAN"),
predicate: func(nd) (!nd.get_switch("toggle_centered") and nd.get_switch("toggle_display_mode") != "PLAN"
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
is_true: func(nd) {
nd.symbols.compass.setRotation(-nd.userHdgTrk*D2R);
nd.symbols.compass.show()
@ -916,7 +998,8 @@ canvas.NDStyles["Airbus"] = {
id:"compassApp",
impl: {
init: func(nd,symbol),
predicate: func(nd) (nd.get_switch("toggle_centered") and nd.get_switch("toggle_display_mode") != "PLAN"),
predicate: func(nd) (nd.get_switch("toggle_centered") and nd.get_switch("toggle_display_mode") != "PLAN"
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
is_true: func(nd) {
nd.symbols.compassApp.setRotation(-nd.userHdgTrk*D2R);
nd.symbols.compassApp.show()
@ -928,7 +1011,7 @@ canvas.NDStyles["Airbus"] = {
id:"northUp",
impl: {
init: func(nd,symbol),
predicate: func(nd) nd.get_switch("toggle_display_mode") == "PLAN",
predicate: func(nd) (nd.get_switch("toggle_display_mode") == "PLAN" and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
is_true: func(nd) nd.symbols.northUp.show(),
is_false: func(nd) nd.symbols.northUp.hide(),
}, # of northUp.impl
@ -937,7 +1020,8 @@ canvas.NDStyles["Airbus"] = {
id:"planArcs",
impl: {
init: func(nd,symbol),
predicate: func(nd) ((nd.in_mode("toggle_display_mode", ["APP","VOR","PLAN"])) or ((nd.get_switch("toggle_display_mode") == "MAP") and (nd.get_switch("toggle_centered")))),
predicate: func(nd) (((nd.in_mode("toggle_display_mode", ["APP","VOR","PLAN"])) or ((nd.get_switch("toggle_display_mode") == "MAP") and (nd.get_switch("toggle_centered"))))
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
is_true: func(nd) nd.symbols.planArcs.show(),
is_false: func(nd) nd.symbols.planArcs.hide(),
}, # of planArcs.impl
@ -946,7 +1030,8 @@ canvas.NDStyles["Airbus"] = {
id:"rangeArcs",
impl: {
init: func(nd,symbol),
predicate: func(nd) ((nd.get_switch("toggle_display_mode") == "MAP") and (!nd.get_switch("toggle_centered"))),
predicate: func(nd) ((nd.get_switch("toggle_display_mode") == "MAP") and (!nd.get_switch("toggle_centered"))
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
is_true: func(nd) nd.symbols.rangeArcs.show(),
is_false: func(nd) nd.symbols.rangeArcs.hide(),
}, # of rangeArcs.impl
@ -1047,7 +1132,8 @@ canvas.NDStyles["Airbus"] = {
id:"aplSymMap",
impl: {
init: func(nd,symbol),
predicate: func(nd) (nd.get_switch("toggle_display_mode") == "MAP" and !nd.get_switch("toggle_centered")),
predicate: func(nd) (nd.get_switch("toggle_display_mode") == "MAP" and !nd.get_switch("toggle_centered")
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
is_true: func(nd) {
nd.symbols.aplSymMap.set("z-index", 10);
nd.symbols.aplSymMap.show();
@ -1060,7 +1146,8 @@ canvas.NDStyles["Airbus"] = {
id:"aplSymMapCtr",
impl: {
init: func(nd,symbol),
predicate: func(nd) ((nd.get_switch("toggle_display_mode") == "MAP" and nd.get_switch("toggle_centered")) or nd.in_mode("toggle_display_mode", ["APP","VOR"])),
predicate: func(nd) (((nd.get_switch("toggle_display_mode") == "MAP" and nd.get_switch("toggle_centered")) or nd.in_mode("toggle_display_mode", ["APP","VOR"]))
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
is_true: func(nd) {
nd.symbols.aplSymMapCtr.set("z-index", 10);
nd.symbols.aplSymMapCtr.show();
@ -1157,8 +1244,8 @@ canvas.NDStyles["Airbus"] = {
id:"trkInd2",
impl: {
init: func(nd,symbol),
predicate: func(nd) (nd.in_mode("toggle_display_mode", ["APP","VOR","MAP"]) and
nd.get_switch("toggle_centered")),
predicate: func(nd) (nd.in_mode("toggle_display_mode", ["APP","VOR","MAP"]) and nd.get_switch("toggle_centered")
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
is_true: func(nd) {
nd.symbols.trkInd2.show();
nd.symbols.trkInd2.setRotation((nd.aircraft_source.get_trk_mag()-nd.aircraft_source.get_hdg_mag())*D2R);
@ -1172,7 +1259,8 @@ canvas.NDStyles["Airbus"] = {
init: func(nd,symbol),
predicate: func(nd) (nd.get_switch("toggle_display_mode") == "MAP" and
nd.get_switch("toggle_centered") and
getprop(nd.options.defaults.lat_ctrl) != nd.options.defaults.managed_val),
getprop(nd.options.defaults.lat_ctrl) != nd.options.defaults.managed_val and
(nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
is_true: func(nd) {
nd.symbols.trkline2.show();
},

View file

@ -5773,7 +5773,7 @@
</condition>
<command>nasal</command>
<script>
if (getprop("controls/apu/master") == 1) {
if (systems.APUNodes.Controls.master.getBoolValue()) {
systems.APUController.APU.startCommand();
}
</script>

View file

@ -109,8 +109,8 @@ var athr = props.globals.getNode("/it-autoflight/output/athr", 1);
var gear_agl = props.globals.getNode("/position/gear-agl-ft", 1);
var aileron_input = props.globals.getNode("/controls/flight/aileron-input-fast", 1);
var elevator_input = props.globals.getNode("/controls/flight/elevator-input-fast", 1);
var att_switch = props.globals.getNode("/controls/switching/ATTHDG", 1);
var air_switch = props.globals.getNode("/controls/switching/AIRDATA", 1);
var att_switch = props.globals.getNode("/controls/navigation/switching/att-hdg", 1);
var air_switch = props.globals.getNode("/controls/navigation/switching/air-data", 1);
var appr_enabled = props.globals.getNode("/it-autoflight/output/appr-armed/", 1);
var loc_enabled = props.globals.getNode("/it-autoflight/output/loc-armed/", 1);
var vert_gs = props.globals.getNode("/it-autoflight/output/vert/", 1);

View file

@ -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="0.92547661"
inkscape:cx="575.94271"
inkscape:zoom="1.0773413"
inkscape:cy="259.23779"
inkscape:cx="201.84998"
inkscape:zoom="2.56"
showgrid="true"
id="namedview371"
inkscape:window-height="705"
@ -5780,8 +5780,8 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path922"
d="M 13.167811,790.62913 H 154.46853"
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" />
d="M 13.167811,790.62913 H 121.24725"
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" />
</g>
<text
xml:space="preserve"

Before

Width:  |  Height:  |  Size: 339 KiB

After

Width:  |  Height:  |  Size: 339 KiB

File diff suppressed because it is too large Load diff

View file

@ -41,9 +41,9 @@
inkscape:window-height="705"
id="namedview371"
showgrid="true"
inkscape:zoom="1"
inkscape:cx="718.57047"
inkscape:cy="505.8628"
inkscape:zoom="0.25"
inkscape:cx="971.41703"
inkscape:cy="1420.8195"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -1428,4 +1428,43 @@
width="137.63597"
id="SlatLine_clip"
style="opacity:0.5;fill:none;fill-opacity:1;stroke:none;stroke-width:3.34691048;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.71383667px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.7928459"
x="38.122616"
y="47.904297"
id="aFloor"
transform="scale(0.94595932,1.0571279)"
inkscape:label="#text1027"><tspan
sodipodi:role="line"
id="tspan1025"
x="38.122616"
y="47.904297"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:39.99999902px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#c56100;fill-opacity:1;stroke-width:0.7928459">A FLOOR</tspan></text>
<text
transform="scale(0.97051272,1.0303832)"
inkscape:label="#text4314"
id="FlxLimTemp"
y="122.78025"
x="919.25299"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40.71494293px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;"
y="122.78025"
x="919.25299"
id="tspan1029"
sodipodi:role="line">00</tspan></text>
<text
inkscape:label="#text4443"
id="FlxLimDegreesC"
y="108.14707"
x="1061.88"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
transform="scale(0.87983286,1.1365795)"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.25978088px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#179ab7;fill-opacity:1"
y="108.14707"
x="1061.88"
id="tspan1033"
sodipodi:role="line">°C</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 89 KiB

View file

@ -42,8 +42,8 @@
id="namedview371"
showgrid="false"
inkscape:zoom="0.43942712"
inkscape:cx="180.81625"
inkscape:cy="433.53356"
inkscape:cx="623.25944"
inkscape:cy="936.15332"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -1755,7 +1755,7 @@
x="650.08069"
y="575.68427"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.25px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">A-LOCK</tspan></text>
<path
<path
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:5.44862556;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
d="M 555.26245,639.8335 691.24239,597.33411"
id="SlatLine"
@ -1796,4 +1796,43 @@
width="137.63597"
id="SlatLine_clip"
style="opacity:0.5;fill:none;fill-opacity:1;stroke:none;stroke-width:3.34691048;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.71383667px;line-height:1.25;font-family:'Bitstream Vera Sans';-inkscape-font-specification:'Bitstream Vera Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.7928459"
x="38.122616"
y="47.904297"
id="aFloor"
transform="scale(0.94595932,1.0571279)"
inkscape:label="#text1027"><tspan
sodipodi:role="line"
id="tspan1025"
x="38.122616"
y="47.904297"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:39.99999902px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#c56100;fill-opacity:1;stroke-width:0.7928459">A FLOOR</tspan></text>
<text
transform="scale(0.97051272,1.0303832)"
inkscape:label="#text4314"
id="FlxLimTemp"
y="122.78025"
x="919.25299"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40.71494293px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;"
y="122.78025"
x="919.25299"
id="tspan1029"
sodipodi:role="line">00</tspan></text>
<text
inkscape:label="#text4443"
id="FlxLimDegreesC"
y="108.14707"
x="1061.88"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
transform="scale(0.87983286,1.1365795)"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.25978088px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#179ab7;fill-opacity:1"
y="108.14707"
x="1061.88"
id="tspan1033"
sodipodi:role="line">°C</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View file

@ -15,7 +15,7 @@ var overflow = props.globals.initNode("/ECAM/warnings/overflow", 0, "BOOL");
var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess", 1);
var lights = [props.globals.initNode("/ECAM/warnings/master-warning-light", 0, "BOOL"), props.globals.initNode("/ECAM/warnings/master-caution-light", 0, "BOOL")];
var aural = [props.globals.initNode("/sim/sound/warnings/crc", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/chime", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cricket", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/retard", 0, "BOOL")];
var aural = [props.globals.initNode("/sim/sound/warnings/crc", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/chime", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cricket", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/retard", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cchord", 0, "BOOL")];
var warningFlash = props.globals.initNode("/ECAM/warnings/master-warning-flash", 0, "BOOL");
var lineIndex = 0;
@ -31,6 +31,9 @@ var storeFirstWarning = nil;
var warningNodes = {
Logic: {
altitudeAlert: props.globals.initNode("/ECAM/warnings/altitude-alert/c-chord"),
altitudeAlertSteady: props.globals.initNode("/ECAM/warnings/altitude-alert/altitude-alert-steady"),
altitudeAlertFlash: props.globals.initNode("/ECAM/warnings/altitude-alert/altitude-alert-flash"),
crossbleedFault: props.globals.initNode("/ECAM/warnings/logic/crossbleed-fault"),
crossbleedWai: props.globals.initNode("/ECAM/warnings/logic/crossbleed-wai"),
bleed1LoTempUnsuc: props.globals.initNode("/ECAM/warnings/logic/bleed-1-lo-temp-unsucc"),

View file

@ -696,78 +696,24 @@ var messages_priority_3 = func {
}
# C-Chord
if ((pts.Instrumentation.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("/systems/navigation/adr/output/baro-alt-1-capt")) < 200) or !pts.Instrumentation.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("/systems/navigation/adr/output/baro-alt-corrected-1-capt")) < 200) {
alt200 = 1;
} else {
alt200 = 0;
}
if ((pts.Instrumentation.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("/systems/navigation/adr/output/baro-alt-1-capt")) < 750) or !pts.Instrumentation.Altimeter.std.getValue() and abs(fcu.altSet.getValue() - getprop("/systems/navigation/adr/output/baro-alt-corrected-1-capt")) < 750) {
alt750 = 1;
} else {
alt750 = 0;
}
if (FWC.altChg.getValue() or pts.Gear.position[0].getValue() == 1 or (pts.Controls.Gear.gearDown.getValue() and pts.Fdm.JSBsim.Fcs.slatDeg.getValue() > 4) or fmgc.Output.vert.getValue() == 2) {
altAlertInhibit = 1;
} else {
altAlertInhibit = 0;
}
if (alt750 and !alt200 and !altAlertInhibit) {
FWC.Monostable.altAlert2.setValue(1);
} else {
FWC.Monostable.altAlert2.setValue(0);
}
if ((!fcu.ap1.getBoolValue() and !fcu.ap2.getBoolValue()) and FWC.Monostable.altAlert2.getValue()) {
FWC.Monostable.altAlert1.setValue(1);
} else {
FWC.Monostable.altAlert1.setValue(0);
}
if (alt750 and alt200 and !altAlertInhibit) {
setprop("/ECAM/flipflop/alt-alert-2-rs-set", 1);
} else {
setprop("/ECAM/flipflop/alt-alert-2-rs-set", 0);
}
if (getprop("/ECAM/flipflop/alt-alert-rs-reset") or (!alt750 and !alt200 and !altAlertInhibit)) {
setprop("/ECAM/flipflop/alt-alert-2-rs-reset", 1);
} else {
setprop("/ECAM/flipflop/alt-alert-2-rs-reset", 0);
}
if (alt750 and !alt200 and !altAlertInhibit and getprop("/ECAM/flipflop/alt-alert-2-rs-output")) {
setprop("/ECAM/flipflop/alt-alert-3-rs-set", 1);
} else {
setprop("/ECAM/flipflop/alt-alert-3-rs-set", 0);
}
if ((!alt750 and !alt200 and !altAlertInhibit and getprop("/ECAM/flipflop/alt-alert-rs-output")) or (!alt750 and !alt200 and !altAlertInhibit and getprop("/ECAM/flipflop/alt-alert-3-rs-output")) or getprop("/ECAM/flipflop/alt-alert-3-rs-set")) {
bigThree = 1;
} else {
bigThree = 0;
}
if (FWC.Timer.gnd.getValue() != 1 and (FWC.Monostable.altAlert1Output.getValue() or bigThree)) {
if (warningNodes.Logic.altitudeAlert.getValue()) {
if (!getprop("/sim/sound/warnings/cchord-inhibit")) {
setprop("/sim/sound/warnings/cchord", 1);
aural[4].setValue(1);
} else {
setprop("/sim/sound/warnings/cchord", 0);
aural[4].setValue(0);
}
} else {
setprop("/sim/sound/warnings/cchord", 0);
aural[4].setValue(0);
setprop("/sim/sound/warnings/cchord-inhibit", 0);
}
if (FWC.Timer.gnd.getValue() != 1 and getprop("/ECAM/flipflop/alt-alert-3-rs-set") != 1 and alt750 and !alt200 and !altAlertInhibit) {
if (warningNodes.Logic.altitudeAlertSteady.getValue()) {
altAlertSteady = 1;
} else {
altAlertSteady = 0;
}
if (FWC.Timer.gnd.getValue() != 1 and bigThree) {
if (warningNodes.Logic.altitudeAlertFlash.getValue()) {
altAlertFlash = 1;
} else {
altAlertFlash = 0;
@ -1374,10 +1320,10 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(tcasFault);
}
if (warningNodes.Timers.navTerrFault.getValue() == 1 and (phaseVar2 == 2 or phaseVar2 == 6 or phaseVar2 == 7 or phaseVar2 == 9)) {
if (gpwsTerrFault.clearFlag == 0 and warningNodes.Timers.navTerrFault.getValue() == 1 and (phaseVar2 == 2 or phaseVar2 == 6 or phaseVar2 == 7 or phaseVar2 == 9)) {
gpwsTerrFault.active = 1;
if (!getprop("/instrumentation/mk-viii/inputs/discretes/ta-tcf-inhibit")) {
if (gpwsTerrFaultOff.clearFlag == 0 and !getprop("/instrumentation/mk-viii/inputs/discretes/ta-tcf-inhibit")) {
gpwsTerrFaultOff.active = 1;
} else {
ECAM_controller.warningReset(gpwsTerrFaultOff);
@ -2409,7 +2355,7 @@ var messages_memo = func {
if ((phaseVarMemo2 == 1 or phaseVarMemo2 == 2) and toMemoLine1.active != 1 and ldgMemoLine1.active != 1 and (systems.ADIRS.ADIRunits[0].inAlign == 1 or systems.ADIRS.ADIRunits[1].inAlign == 1 or systems.ADIRS.ADIRunits[2].inAlign == 1)) {
irs_in_align.active = 1;
if (getprop("/ECAM/phases/timer/eng1or2-output")) {
if (FWC.Timer.eng1or2Output.getValue()) {
irs_in_align.colour = "a";
} else {
irs_in_align.colour = "g";

View file

@ -2,19 +2,14 @@
# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
var twoEngOff = 0;
var myPhase = nil;
var eng = nil;
var eng1epr = nil;
var eng2epr = nil;
var eng1n1 = nil;
var eng2n1 = nil;
var eng1n2 = nil;
var eng2n2 = nil;
var eprlim = nil;
var master1 = nil;
var master2 = nil;
var n1lim = nil;
var gear_agl_cur = nil;
var FWC = {
@ -53,24 +48,28 @@ var FWC = {
Logic: {
gnd: props.globals.getNode("/ECAM/ground-calc-immediate"),
IRSinAlign: props.globals.initNode("/ECAM/irs-in-align", 0, "BOOL"),
feet1500: props.globals.getNode("/ECAM/phases/phase-calculation/altitude-ge-1500"),
feet800: props.globals.getNode("/ECAM/phases/phase-calculation/altitude-ge-800"),
},
Timer: {
eng1idle: props.globals.initNode("/ECAM/phases/timer/eng1idle", 0, "INT"),
eng2idle: props.globals.initNode("/ECAM/phases/timer/eng2idle", 0, "INT"),
eng1or2: props.globals.initNode("/ECAM/phases/timer/eng1or2", 0, "INT"),
eng1idle: props.globals.getNode("/ECAM/phases/timer/eng1idle"),
eng2idle: props.globals.getNode("/ECAM/phases/timer/eng2idle"),
eng1or2: props.globals.getNode("/ECAM/phases/phase-calculation/one-engine-running"),
toInhibit: props.globals.initNode("/ECAM/phases/timer/to-inhibit", 0, "INT"),
ldgInhibit: props.globals.initNode("/ECAM/phases/timer/ldg-inhibit", 0, "INT"),
eng1idleOutput: props.globals.getNode("/ECAM/phases/timer/eng1idle-output"),
eng2idleOutput: props.globals.getNode("/ECAM/phases/timer/eng2idle-output"),
eng1or2Output: props.globals.initNode("/ECAM/phases/timer/eng1or2-output", 0, "INT"),
eng1and2Off: props.globals.getNode("/ECAM/phases/phase-calculation/engines-1-2-not-running"),
eng1or2Output: props.globals.getNode("/ECAM/phases/phase-calculation/engine-1-or-2-running"),
toInhibitOutput: props.globals.getNode("/ECAM/phases/timer/to-inhibit-output"),
ldgInhibitOutput: props.globals.getNode("/ECAM/phases/timer/ldg-inhibit-output"),
gnd: props.globals.getNode("/ECAM/timer/ground-calc"),
gnd: props.globals.getNode("/ECAM/timer/ground-calc"), # ZGND
gnd2Sec: props.globals.getNode("/ECAM/phases/monostable/gnd-output"),
gnd2SecHalf: props.globals.getNode("/ECAM/phases/monostable/gnd-output-2"), # hack to prevent getting confused between phase 5 / 6
},
speed80: props.globals.initNode("/ECAM/phases/speed-gt-80", 0, "BOOL"),
toPower: props.globals.initNode("/ECAM/phases/to-power-set", 0, "BOOL"),
altChg: props.globals.getNode("it-autoflight/input/alt-is-changing", 1),
toPower: props.globals.getNode("/ECAM/phases/phase-calculation/takeoff-power"),
altChg: props.globals.getNode("/it-autoflight/input/alt-is-changing", 1),
};
var phaseLoop = func() {
@ -82,53 +81,12 @@ var phaseLoop = func() {
eng2epr = pts.Engines.Engine.eprActual[1].getValue();
eng1n1 = pts.Engines.Engine.n1Actual[0].getValue();
eng2n1 = pts.Engines.Engine.n1Actual[1].getValue();
eng1n2 = pts.Engines.Engine.n2Actual[0].getValue();
eng2n2 = pts.Engines.Engine.n2Actual[1].getValue();
master1 = pts.Controls.Engines.Engine.cutoffSw[0].getBoolValue();
master2 = pts.Controls.Engines.Engine.cutoffSw[1].getBoolValue();
FWC.Flipflop.recallReset.setValue(0);
# Various things
if (eng1n2 >= 59.4 and !master1) {
FWC.Timer.eng1idle.setValue(1);
} else {
FWC.Timer.eng1idle.setValue(0);
}
if (eng2n2 >= 59.4 and !master2) {
FWC.Timer.eng2idle.setValue(1);
} else {
FWC.Timer.eng2idle.setValue(0);
}
if (eng1n2 >= 59.4 or eng2n2 >= 59.4) {
FWC.Timer.eng1or2.setValue(1);
} else {
FWC.Timer.eng1or2.setValue(0);
}
if ((FWC.Timer.eng1idleOutput.getBoolValue() == 0 or master1) and (FWC.Timer.eng2idleOutput.getBoolValue() == 0 or master2)) {
twoEngOff = 1;
} else {
twoEngOff = 0;
}
if (eng == "IAE") {
eprlim = getprop("/controls/engines/epr-limit");
if ((!pts.Controls.Engines.Engine.reverser[0].getBoolValue() and !pts.Controls.Engines.Engine.reverser[1].getBoolValue()) and (((pts.Controls.Engines.Engine.throttle[0].getValue() >= 0.78 or pts.Controls.Engines.Engine.throttle[1].getValue() >= 0.779) and fadec.Thrust.limFlex.getBoolValue()) or (pts.Controls.Engines.Engine.throttle[0].getValue() >= 0.99 or pts.Controls.Engines.Engine.throttle[1].getValue() >= 0.99))) {
FWC.toPower.setBoolValue(1);
} else {
FWC.toPower.setBoolValue(0);
}
} else {
n1lim = getprop("/controls/engines/n1-limit");
if ((!pts.Controls.Engines.Engine.reverser[0].getBoolValue() and !pts.Controls.Engines.Engine.reverser[1].getBoolValue()) and (((pts.Controls.Engines.Engine.throttle[0].getValue() >= 0.78 or pts.Controls.Engines.Engine.throttle[1].getValue() >= 0.779) and fadec.Thrust.limFlex.getBoolValue()) or (pts.Controls.Engines.Engine.throttle[0].getValue() >= 0.99 or pts.Controls.Engines.Engine.throttle[1].getValue() >= 0.99))) {
FWC.toPower.setBoolValue(1);
} else {
FWC.toPower.setBoolValue(0);
}
}
if (myPhase == 9) {
FWC.Monostable.phase9.setBoolValue(1);
@ -149,7 +107,7 @@ var phaseLoop = func() {
FWC.Flipflop.phase10Reset.setBoolValue(0);
}
if ((FWC.Logic.gnd.getBoolValue() and twoEngOff and myPhase == 9) and FWC.Flipflop.phase10Output.getBoolValue()) {
if ((FWC.Logic.gnd.getBoolValue() and FWC.Timer.eng1and2Off.getValue() and myPhase == 9) and FWC.Flipflop.phase10Output.getBoolValue()) {
FWC.Monostable.phase1.setBoolValue(1); # true for 300 sec then false
} else {
FWC.Monostable.phase1.setBoolValue(0);
@ -171,21 +129,21 @@ var phaseLoop = func() {
gear_agl_cur = pts.Position.gearAglFt.getValue();
# Phase 5 monostable
if (FWC.toPower.getBoolValue() and (gear_agl_cur <= 1500 and !FWC.Logic.gnd.getBoolValue() and FWC.Timer.gnd2Sec.getValue() != 1)) {
if (FWC.toPower.getBoolValue() and (!FWC.Logic.feet1500.getBoolValue() and !FWC.Logic.gnd.getBoolValue() and FWC.Timer.gnd2Sec.getValue() != 1)) {
FWC.Monostable.phase5.setBoolValue(1);
} else {
FWC.Monostable.phase5.setBoolValue(0);
}
# Phase 7 monostable
if (!FWC.toPower.getBoolValue() and gear_agl_cur <= 1500 and gear_agl_cur <= 800 and !FWC.Logic.gnd.getBoolValue() and FWC.Timer.gnd2Sec.getValue() != 1) {
if (!FWC.toPower.getBoolValue() and !FWC.Logic.feet1500.getBoolValue() and !FWC.Logic.feet800.getBoolValue() and !FWC.Logic.gnd.getBoolValue() and FWC.Timer.gnd2Sec.getValue() != 1) {
FWC.Monostable.phase7.setBoolValue(1);
} else {
FWC.Monostable.phase7.setBoolValue(0);
}
# Actual Phases
if ((!FWC.Logic.gnd.getBoolValue() and FWC.Timer.gnd2Sec.getValue() != 1 and twoEngOff and myPhase != 9) and !FWC.Monostable.phase1Output.getBoolValue()) {
if ((!FWC.Logic.gnd.getBoolValue() and FWC.Timer.gnd2Sec.getValue() != 1 and FWC.Timer.eng1and2Off.getValue() and myPhase != 9) and !FWC.Monostable.phase1Output.getBoolValue()) {
setPhase(1);
}
@ -205,7 +163,7 @@ var phaseLoop = func() {
setPhase(5);
}
if (!FWC.Logic.gnd.getValue() and FWC.Timer.gnd2Sec.getValue() != 1 and !(FWC.Monostable.phase5.getBoolValue() and FWC.Monostable.phase5Output.getBoolValue()) and !(FWC.Monostable.phase7.getBoolValue() and FWC.Monostable.phase7Output.getBoolValue())) {
if (!FWC.Logic.gnd.getValue() and FWC.Timer.gnd2SecHalf.getValue() != 1 and (!FWC.Monostable.phase5.getBoolValue() or !FWC.Monostable.phase5Output.getBoolValue()) and (!FWC.Monostable.phase7.getBoolValue() or !FWC.Monostable.phase7Output.getBoolValue())) {
setPhase(6);
}
@ -221,7 +179,7 @@ var phaseLoop = func() {
setPhase(9);
}
if ((FWC.Logic.gnd.getBoolValue() and twoEngOff and myPhase == 9) and FWC.Monostable.phase1Output.getBoolValue()) {
if ((FWC.Logic.gnd.getBoolValue() and FWC.Timer.eng1and2Off.getValue() and myPhase == 9) and FWC.Monostable.phase1Output.getBoolValue()) {
setPhase(10);
}

View file

@ -247,6 +247,7 @@ var postInit = func() {
var FMGCNodes = {
costIndex: props.globals.initNode("/FMGC/internal/cost-index", 0, "DOUBLE"),
flexSet: props.globals.initNode("/FMGC/internal/flex-set", 0, "BOOL"),
flexTemp: props.globals.initNode("/FMGC/internal/flex", 0, "INT"),
mngSpdAlt: props.globals.getNode("/FMGC/internal/mng-alt-spd"),
mngMachAlt: props.globals.getNode("/FMGC/internal/mng-alt-mach"),
toFromSet: props.globals.initNode("/FMGC/internal/tofrom-set", 0, "BOOL"),

View file

@ -80,8 +80,11 @@ var SimbriefParser = {
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.arrApt = destinationID;
atsu.ATISInstances[0].newStation(departureID);
atsu.ATISInstances[1].newStation(destinationID);
fmgc.FMGCInternal.toFromSet = 1;
fmgc.FMGCNodes.toFromSet.setValue(1);
@ -107,6 +110,7 @@ var SimbriefParser = {
var alternates = findAirportsByICAO(alternateID);
if (alternates != nil and size(alternates) != 0) {
fmgc.FMGCInternal.altAirport = alternateID;
atsu.ATISInstances[2].newStation(alternateID);
fmgc.FMGCInternal.altAirportSet = 1;
}

View file

@ -62,8 +62,8 @@ var variousReset = func {
setprop("/controls/lighting/DU/mcdu1", 1);
setprop("/controls/lighting/DU/mcdu2", 1);
setprop("modes/fcu/hdg-time", -45);
setprop("/controls/switching/ATTHDG", 0);
setprop("/controls/switching/AIRDATA", 0);
setprop("/controls/navigation/switching/att-hdg", 0);
setprop("/controls/navigation/switching/air-data", 0);
setprop("/controls/switches/no-smoking-sign", 1);
setprop("/controls/switches/seatbelt-sign", 1);
}

View file

@ -25,6 +25,16 @@ var SwitchingPanel = {
dmc.DMController.DMCs[1].changeActiveADIRS(1);
}
},
doAttHdg: func(newAttHdg) {
if (newAttHdg < -1 or newAttHdg > 1) { return; }
me.Switches.attHdg.setValue(newAttHdg);
foreach (var predicate; keys(canvas_nd.ND_1.NDCpt.predicates)) {
call(canvas_nd.ND_1.NDCpt.predicates[predicate]);
}
foreach (var predicate; keys(canvas_nd.ND_2.NDFo.predicates)) {
call(canvas_nd.ND_2.NDFo.predicates[predicate]);
}
},
doEisDMC: func(newDMC) {
if (newDMC < -1 or newDMC > 1) { return; }
me.Switches.eisDMC.setValue(newDMC);

View file

@ -37,7 +37,7 @@ var createCanvasQRH = func() {
qrhCanvas.setLayout(myHBox);
QRH = canvas.gui.widgets.Label.new(root, canvas.style, {} )
.setImage("Aircraft/A320-family/Models/FlightDeck/QRH/" ~ QRHpageNo.getValue() ~ ".jpeg")
.setImage(resolvepath("Aircraft/A320-family/Models/FlightDeck/QRH/" ~ QRHpageNo.getValue() ~ ".jpeg"))
.move(0,-25)
.setSize(400,625);
myHBox.addItem(QRH);
@ -78,11 +78,11 @@ var createCanvasQRH = func() {
});
buttonPrev.listen("clicked", func {
prevPage();
QRH.setImage("Aircraft/A320-family/Models/FlightDeck/QRH/" ~ QRHpageNo.getValue() ~ ".jpeg");
QRH.setImage(resolvepath("Aircraft/A320-family/Models/FlightDeck/QRH/" ~ QRHpageNo.getValue() ~ ".jpeg"));
});
buttonNext.listen("clicked", func {
nextPage();
QRH.setImage("Aircraft/A320-family/Models/FlightDeck/QRH/" ~ QRHpageNo.getValue() ~ ".jpeg");
QRH.setImage(resolvepath("Aircraft/A320-family/Models/FlightDeck/QRH/" ~ QRHpageNo.getValue() ~ ".jpeg"));
});

View file

@ -7,6 +7,8 @@ var _NUMADIRU = 3;
var _selfTestTime = nil;
var ADIRSnodesND = [props.globals.getNode("/instrumentation/efis[0]/nd/ir-1", 1),props.globals.getNode("/instrumentation/efis[1]/nd/ir-2", 1),props.globals.getNode("/instrumentation/efis[0]/nd/ir-3", 1)];
var ADIRU = {
# local vars
_alignTime: 0,
@ -110,18 +112,32 @@ var ADIRU = {
print("Stopping alignment or setting unaligned state");
me.inAlign = 0;
me.aligned = 0;
ADIRSnodesND[me.num].setValue(0);
ADIRS.Operating.aligned[me.num].setValue(0);
if (me.alignTimer != nil) {
me.alignTimer.stop();
}
foreach (var predicate; keys(canvas_nd.ND_1.NDCpt.predicates)) {
call(canvas_nd.ND_1.NDCpt.predicates[predicate]);
}
foreach (var predicate; keys(canvas_nd.ND_2.NDFo.predicates)) {
call(canvas_nd.ND_2.NDFo.predicates[predicate]);
}
},
stopAlignAligned: func() {
me.inAlign = 0;
me.aligned = 1;
ADIRSnodesND[me.num].setValue(1);
ADIRS.Operating.aligned[me.num].setValue(1);
if (me.alignTimer != nil) {
me.alignTimer.stop();
}
foreach (var predicate; keys(canvas_nd.ND_1.NDCpt.predicates)) {
call(canvas_nd.ND_1.NDCpt.predicates[predicate]);
}
foreach (var predicate; keys(canvas_nd.ND_2.NDFo.predicates)) {
call(canvas_nd.ND_2.NDFo.predicates[predicate]);
}
},
alignLoop: func() {
me._roll = pts.Orientation.roll.getValue();

View file

@ -87,19 +87,25 @@ var APU = {
powerOn: func() {
# just in case
me.resetStuff();
if (systems.ELEC.Bus.dcBat.getValue() < 25) { return; }
if (systems.ELEC.Bus.dcBat.getValue() < 25) {
settimer(func() {
if (systems.ELEC.Bus.dcBat.getValue() < 25) {
me.resetStuff();
return;
}
}, 0.2);
}
# apu able to receive emergency stop or start signals
me.setState(1);
me.fuelValveCmd.setValue(1);
me.inletFlap.open();
me.checkOil();
me.listenSignals = 1;
settimer(func() {
if (APUNodes.Controls.master.getValue() and !getprop("/systems/acconfig/autoconfig-running")) {
me.setState(2);
}
}, 3);
settimer(func() { me.checkOil }, 8);
settimer(func() { me.checkOil() }, 8);
},
startCommand: func(fast = 0) {
if (me.listenSignals and (me.state == 1 or me.state == 2)) {
@ -256,6 +262,7 @@ var APU = {
APUNodes.Controls.bleed.setValue(0);
me.bleedTime = pts.Sim.Time.elapsedSec.getValue();
},
_powerLost: 0,
update: func() {
me._count += 1;
if (me._count == 5) {
@ -263,14 +270,22 @@ var APU = {
if (me.state == 5 and APUNodes.Oil.pressure.getValue() < 35 or APUNodes.Oil.temperature.getValue() > 135) {
me.autoStop();
}
if (systems.ELEC.Bus.dcBat.getValue() < 25) {
if (me.GenericControls.starter.getValue()) {
me.GenericControls.starter.setValue(0);
}
if (me.state != 0) {
me.autoStop();
if (!me._powerLost) {
me._powerLost = 1;
settimer(func() {
if (me._powerLost) {
if (me.GenericControls.starter.getValue()) {
me.GenericControls.starter.setValue(0);
}
if (me.state != 0) {
me.autoStop();
}
}
}, 0.2);
}
} else {
me._powerLost = 0;
}
}
},

View file

@ -330,7 +330,7 @@ var ATIS = {
},
processATIS: func(r, i) {
var raw = r.response;
if (r.response == "FBW_ERROR: D-ATIS not available at this airport") {
if (r.response == "FBW_ERROR: D-ATIS not available at this airport" or find("atis not avail",r.response) != -1) {
me.received = 0;
me.sent = 0;
mcdu.mcdu_message(i,"NO D-ATIS AVAILABLE");

View file

@ -28,9 +28,9 @@ var FADEC = {
eng1Time: props.globals.initNode("/systems/fadec/eng1-master-time", -300, "DOUBLE"),
eng1Off: props.globals.initNode("/systems/fadec/eng1-off-power", 0, "BOOL"),
eng1Counting: 0,
epr: 0,
epr: props.globals.initNode("/systems/fadec/eng1/epr", 0, "BOOL"),
egt: 0,
n1: 0,
n1: props.globals.initNode("/systems/fadec/eng1/n1", 0, "BOOL"),
n2: 0,
ff: 0,
},
@ -38,9 +38,9 @@ var FADEC = {
eng2Time: props.globals.initNode("/systems/fadec/eng2-master-time", -300, "DOUBLE"),
eng2Off: props.globals.initNode("/systems/fadec/eng2-off-power", 0, "BOOL"),
eng2Counting: 0,
epr: 0,
epr: props.globals.initNode("/systems/fadec/eng2/epr", 0, "BOOL"),
egt: 0,
n1: 0,
n1: props.globals.initNode("/systems/fadec/eng2/n1", 0, "BOOL"),
n2: 0,
ff: 0,
},
@ -147,24 +147,24 @@ var FADEC = {
powerup = me.Power.powerup.getValue();
if (powered1 or powerup or me.Eng1.eng1Off.getValue()) {
me.Eng1.n1 = 1;
me.Eng1.n1.setValue(1);
me.Eng1.n2 = 1;
me.Eng1.egt = 1;
me.Eng1.ff = 1;
} else {
me.Eng1.n1 = 0;
me.Eng1.n1.setValue(0);
me.Eng1.n2 = 0;
me.Eng1.egt = 0;
me.Eng1.ff = 0;
}
if (powered2 or powerup or me.Eng2.eng2Off.getValue()) {
me.Eng2.n1 = 1;
me.Eng2.n1.setValue(1);
me.Eng2.n2 = 1;
me.Eng2.egt = 1;
me.Eng2.ff = 1;
} else {
me.Eng2.n1 = 0;
me.Eng2.n1.setValue(0);
me.Eng2.n2 = 0;
me.Eng2.egt = 0;
me.Eng2.ff = 0;

View file

@ -25,9 +25,9 @@ var FADEC = {
eng1Time: props.globals.initNode("/systems/fadec/eng1-master-time", -300, "DOUBLE"),
eng1Off: props.globals.initNode("/systems/fadec/eng1-off-power", 0, "BOOL"),
eng1Counting: 0,
epr: 0,
epr: props.globals.initNode("/systems/fadec/eng1/epr", 0, "BOOL"),
egt: 0,
n1: 0,
n1: props.globals.initNode("/systems/fadec/eng1/n1", 0, "BOOL"),
n2: 0,
ff: 0,
},
@ -35,9 +35,9 @@ var FADEC = {
eng2Time: props.globals.initNode("/systems/fadec/eng2-master-time", -300, "DOUBLE"),
eng2Off: props.globals.initNode("/systems/fadec/eng2-off-power", 0, "BOOL"),
eng2Counting: 0,
epr: 0,
epr: props.globals.initNode("/systems/fadec/eng2/epr", 0, "BOOL"),
egt: 0,
n1: 0,
n1: props.globals.initNode("/systems/fadec/eng2/n1", 0, "BOOL"),
n2: 0,
ff: 0,
},
@ -148,28 +148,28 @@ var FADEC = {
if (powered1 or powerup or me.Eng1.eng1Off.getValue()) {
if (me.Modes.n1Mode1.getValue() == 0) {
me.Eng1.epr = 1;
me.Eng1.epr.setValue(1);
} else {
me.Eng1.epr = 0;
me.Eng1.epr.setValue(0);
}
me.Eng1.egt = 1;
me.Eng1.ff = 1;
} else {
me.Eng1.epr = 0;
me.Eng1.epr.setValue(0);
me.Eng1.egt = 0;
me.Eng1.ff = 0;
}
if (powered2 or powerup or me.Eng2.eng2Off.getValue()) {
if (me.Modes.n1Mode2.getValue() == 0) {
me.Eng2.epr = 1;
me.Eng2.epr.setValue(1);
} else {
me.Eng2.epr = 0;
me.Eng2.epr.setValue(0);
}
me.Eng2.egt = 1;
me.Eng2.ff = 1;
} else {
me.Eng2.epr = 0;
me.Eng2.epr.setValue(0);
me.Eng2.egt = 0;
me.Eng2.ff = 0;
}
@ -180,15 +180,15 @@ var FADEC = {
N22 = pts.Engines.Engine.n2Actual[1].getValue();
if (powered1 and N11 >= 3.5) {
me.Eng1.n1 = 1;
me.Eng1.n1.setValue(1);
} else {
me.Eng1.n1 = 0;
me.Eng1.n1.setValue(0);
}
if (powered2 and N12 >= 3.5) {
me.Eng2.n1 = 1;
me.Eng2.n1.setValue(1);
} else {
me.Eng2.n1 = 0;
me.Eng2.n1.setValue(0);
}
if (powered1 and N21 >= 3.5) {

View file

@ -0,0 +1,98 @@
#---------------------------------------------------------------------------
#
# Title : Emesary based rt exec frame notifications
#
# File Type : Implementation File
#
# Description : Uses emesary notifications to permit nasal subsystems to be notified each frame.
# : A frame is defined by the timer rate; which is usually the maximum rate as determined by the FPS.
# : This is an alternative to the timer based or explicit function calling way of invoking
# : aircraft systems.
# : It has the advantage of using less timers and remaining modular, as each aircraft subsytem
# : can simply register itself with the global transmitter to receive the frame notification.
#
# Author : Richard Harrison (richard@zaretto.com)
#
# Creation Date : 4 June 2018
#
# Version : 1.0
#
# Copyright (C) 2018 Richard Harrison Released under GPL V2
#
#---------------------------------------------------------------------------*/
var FrameNotification =
{
debug: 0,
new: func(_rate)
{
var new_class = emesary.Notification.new("FrameNotification", _rate);
new_class.Rate = _rate;
new_class.FrameRate = 60;
new_class.FrameCount = 0;
new_class.ElapsedSeconds = 0;
new_class.monitored = {};
new_class.properties = {};
#
# embed a recipient within this notification to allow the monitored property
# mapping list to be modified.
new_class.Recipient = emesary.Recipient.new("FrameNotification");
new_class.Recipient.Receive = func(notification)
{
if (notification.NotificationType == "FrameNotificationAddProperty")
{
var root_node = props.globals;
if (notification.root_node != nil) {
root_node = notification.root_node;
}
if (new_class.properties[notification.property] != nil
and new_class.properties[notification.property] != notification.variable)
print("[WARNING]: (",notification.module,") FrameNotification: already have variable ",new_class.properties[notification.property]," for ",notification.variable, " referencing property ",notification.property);
if (new_class.monitored[notification.variable] != nil
and new_class.monitored[notification.variable].getPath() != notification.property
and new_class.monitored[notification.variable].getPath() != "/"~notification.property)
print("[WARNING]: (",notification.module,") FrameNotification: already have variable ",notification.variable,"=",new_class.monitored[notification.variable].getPath(), " using different property ",notification.property);
# else if (new_class.monitored[notification.variable] == nil)
# print("[INFO]: (",notification.module,") FrameNotification.",notification.variable, " = ",notification.property);
new_class.monitored[notification.variable] = root_node.getNode(notification.property,1);
new_class.properties[notification.property] = notification.variable;
return emesary.Transmitter.ReceiptStatus_OK;
}
return emesary.Transmitter.ReceiptStatus_NotProcessed;
};
new_class.fetchvars = func() {
foreach (var mp; keys(new_class.monitored)){
if(new_class.monitored[mp] != nil){
if (FrameNotification.debug > 1)
print(" ",mp, " = ",new_class.monitored[mp].getValue());
new_class[mp] = new_class.monitored[mp].getValue();
}
}
};
emesary.GlobalTransmitter.Register(new_class.Recipient);
return new_class;
},
};
var FrameNotificationAddProperty =
{
new: func(module, variable, property, root_node=nil)
{
var new_class = emesary.Notification.new("FrameNotificationAddProperty", variable);
if (root_node == nil)
root_node = props.globals;
new_class.module = module ;
new_class.variable = variable;
new_class.property = property;
new_class.root_node = root_node;
return new_class;
},
};
#
var frameNotification = FrameNotification.new(1);

71
Nasal/emesary/exec.nas Normal file
View file

@ -0,0 +1,71 @@
#---------------------------------------------------------------------------
#
# Title : Emesary based real time executive
#
# File Type : Implementation File
#
# Description : Uses emesary notifications to permit nasal subsystems to
# : be invoked in a controlled manner.
#
# Author : Richard Harrison (richard@zaretto.com)
#
# Creation Date : 4 June 2018
#
# Version : 1.0
#
# Copyright (C) 2018 Richard Harrison Released under GPL V2
#
#---------------------------------------------------------------------------*/
#
# real time exec loop.
var frame_inc = 0;
var cur_frame_inc = 0.05;
var execLoop = func
{
#
notifications.frameNotification.fetchvars();
if (notifications.frameNotification.FrameCount >= 4) {
notifications.frameNotification.FrameCount = 0;
}
emesary.GlobalTransmitter.NotifyAll(notifications.frameNotification);
#
notifications.frameNotification.FrameCount = notifications.frameNotification.FrameCount + 1;
if (notifications.frameNotification.frame_rate < 5) {
frame_inc = 0.25;#4 Hz
} elsif (notifications.frameNotification.frame_rate < 10) {
frame_inc = 0.125;#8 Hz
} elsif (notifications.frameNotification.frame_rate < 15) {
frame_inc = 0.10;#10 Hz
} elsif (notifications.frameNotification.frame_rate < 20) {
frame_inc = 0.075;#13.3 Hz
} elsif (notifications.frameNotification.frame_rate < 25) {
frame_inc = 0.05;#20 Hz
} elsif (notifications.frameNotification.frame_rate < 40) {
frame_inc = 0.0333;#30 Hz
} else {
frame_inc = 0.02;#50 Hz
}
if (frame_inc != cur_frame_inc) {
cur_frame_inc = frame_inc;
}
settimer(execLoop, cur_frame_inc);
}
# setup the properties to monitor for this system
input = {
frame_rate : "/sim/frame-rate",
elapsed_seconds : "/sim/time/elapsed-sec",
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("EXEC", name, input[name]));
}
emesary.GlobalTransmitter.OverrunDetection(9);
setlistener("/sim/signals/fdm-initialized", func() {
execLoop();
}, 0, 0);

View file

@ -466,7 +466,7 @@
/gear/gear[1]/wow eq 1
/systems/air-conditioning/landing-switch eq 1
/velocities/airspeed-kt lt 70
/ECAM/phases/to-power-set ne 1
/ECAM/phases/phase-calculation/takeoff-power ne 1
</test>
</switch>
@ -474,7 +474,7 @@
<default value="/systems/air-conditioning/packs/pack-flow-1-norm"/>
<test logic="AND" value="0">
/gear/gear[1]/wow eq 1
/ECAM/phases/to-power-set eq 1
/ECAM/phases/phase-calculation/takeoff-power eq 1
</test>
<test logic="AND" value="0">
/gear/gear[1]/wow eq 1
@ -507,7 +507,7 @@
<default value="/systems/air-conditioning/packs/pack-flow-2-norm"/>
<test logic="AND" value="0">
/gear/gear[1]/wow eq 1
/ECAM/phases/to-power-set eq 1
/ECAM/phases/phase-calculation/takeoff-power eq 1
</test>
<test logic="AND" value="0">
/gear/gear[1]/wow eq 1

View file

@ -12,6 +12,19 @@
<rate_limit sense="decr">120</rate_limit> <!-- Instant -->
<rate_limit sense="incr">1</rate_limit> <!-- 1 second -->
</actuator>
<actuator name="/ECAM/phases/phase-calculation/engine-1-or-2-running">
<input>/ECAM/phases/phase-calculation/one-engine-running</input>
<rate_limit sense="decr">120</rate_limit>
<rate_limit sense="incr">0.03333333333</rate_limit>
</actuator>
<actuator name="/ECAM/phases/monostable/phase-1-300-output">
<input>/ECAM/phases/monostable/phase-1-300</input>
<rate_limit sense="incr">0.00333333333</rate_limit>
<rate_limit sense="decr">120</rate_limit>
</actuator>
</channel>
<channel name="FWC Phase Logic and Switches" execrate="4">
@ -80,12 +93,6 @@
</test>
</switch>
<actuator name="/ECAM/phases/monostable/phase-1-300-output">
<input>/ECAM/phases/monostable/phase-1-300</input>
<rate_limit sense="incr">0.00333333333</rate_limit>
<rate_limit sense="decr">120</rate_limit>
</actuator>
<switch name="/ECAM/phases/monostable/phase-1-300-output">
<default value="0"/>
<test logic="AND" value="1">
@ -93,6 +100,135 @@
/ECAM/phases/monostable/phase-1-300 eq 1
</test>
</switch>
<switch name="/ECAM/phases/phase-calculation/altitude-ge-1500">
<default value="0"/>
<test logic="AND" value="1">
/position/gear-agl-ft ge 1500
</test>
</switch>
<switch name="/ECAM/phases/phase-calculation/altitude-flipflop-set">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/phases/phase-calculation/altitude-ge-1500 eq 1
</test>
</switch>
<switch name="/ECAM/phases/phase-calculation/altitude-flipflop-reset">
<default value="0"/>
<test logic="AND" value="1">
/position/gear-agl-ft lt 800
</test>
</switch>
</channel>
<channel name="Phase Calcs" execrate="4">
<switch name="/ECAM/phases/timer/eng1idle">
<default value="0"/>
<test logic="AND" value="1">
/engines/engine[0]/n2 ge 59.4
/controls/engines/engine[0]/cutoff-switch eq 0
</test>
</switch>
<switch name="/ECAM/phases/timer/eng2idle">
<default value="0"/>
<test logic="AND" value="1">
/engines/engine[1]/n2 ge 59.4
/controls/engines/engine[1]/cutoff-switch eq 0
</test>
</switch>
<switch name="/ECAM/phases/phase-calculation/engine-1-off">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/phases/timer/eng1idle-output eq 0
/controls/engines/engine[0]/cutoff-switch eq 1
</test>
<test logic="OR">
/ECAM/timer/ground-calc eq 1
/ECAM/phases/timer/eng1idle eq 0
</test>
</test>
</switch>
<switch name="/ECAM/phases/phase-calculation/engine-2-off">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/phases/timer/eng2idle-output eq 0
/controls/engines/engine[1]/cutoff-switch eq 1
</test>
<test logic="OR">
/ECAM/timer/ground-calc eq 1
/ECAM/phases/timer/eng2idle eq 0
</test>
</test>
</switch>
<switch name="/ECAM/phases/phase-calculation/engines-1-2-not-running">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/phases/phase-calculation/engine-1-off eq 1
/ECAM/phases/phase-calculation/engine-2-off eq 1
</test>
</switch>
<switch name="/ECAM/phases/phase-calculation/one-engine-running">
<default value="0"/>
<test logic="OR" value="1">
/engines/engine[0]/state eq 3
/engines/engine[1]/state eq 3
</test>
</switch>
<switch name="/ECAM/phases/phase-calculation/takeoff-power-logic">
<default value="0"/>
<test logic="OR" value="1">
<test logic="OR">
<test logic="AND">
/controls/engines/engine[0]/throttle ge 0.779
/systems/thrust/lim-flex eq 1
</test>
<test logic="AND">
/controls/engines/engine[0]/throttle ge 0.99
/systems/thrust/lim-flex eq 0
</test>
</test>
<test logic="OR">
<test logic="AND">
/controls/engines/engine[1]/throttle ge 0.779
/systems/thrust/lim-flex eq 1
</test>
<test logic="AND">
/controls/engines/engine[1]/throttle ge 0.99
/systems/thrust/lim-flex eq 0
</test>
</test>
</test>
</switch>
<actuator name="/ECAM/phases/phase-calculation/takeoff-power-timer">
<input>/ECAM/phases/phase-calculation/takeoff-power-logic</input>
<rate_limit sense="incr">120</rate_limit>
<rate_limit sense="decr">0.01666666666</rate_limit>
</actuator>
<switch name="/ECAM/phases/phase-calculation/takeoff-power">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/phases/phase-calculation/takeoff-power-logic eq 1
<test logic="AND">
/ECAM/phases/phase-calculation/takeoff-power-timer ne 0
/ECAM/phases/phase-calculation/altitude-ge-1500 eq 0
/controls/engines/engine[0]/throttle ge 0.599
/controls/engines/engine[1]/throttle ge 0.599
</test>
</test>
</switch>
</channel>
</system>

View file

@ -20,13 +20,6 @@
<rate_limit sense="incr">0.033</rate_limit> <!-- 30 seconds -->
</actuator>
<actuator name="/ECAM/phases/timer/eng1or2-output">
<description>Timer for the ECAM system</description>
<input>/ECAM/phases/timer/eng1or2</input>
<rate_limit sense="decr">120</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.033</rate_limit> <!-- 30 seconds -->
</actuator>
<actuator name="/ECAM/phases/timer/to-inhibit-output">
<description>Timer for the ECAM system</description>
<input>/ECAM/phases/timer/to-inhibit</input>
@ -1804,7 +1797,7 @@
<default value="0"/>
<test logic="AND" value="1">
/controls/engines/engine[0]/throttle-lever ge 0.13333333333
/ECAM/phases/to-power-set eq 0
/ECAM/phases/phase-calculation/takeoff-power eq 0
</test>
</switch>
@ -1857,7 +1850,7 @@
<default value="0"/>
<test logic="AND" value="1">
/controls/engines/engine[1]/throttle-lever ge 0.13333333333
/ECAM/phases/to-power-set eq 0
/ECAM/phases/phase-calculation/takeoff-power eq 0
</test>
</switch>
@ -2062,7 +2055,7 @@
/instrumentation/radar-altimeter[0]/radar-altitude-ft lt 750
/instrumentation/radar-altimeter[1]/radar-altitude-ft lt 750
</test>
/ECAM/phases/to-power-set eq 0
/ECAM/phases/phase-calculation/takeoff-power eq 0
<test logic="OR">
fcs/slat-pos-deg gt 16
fcs/flap-pos-deg gt 18
@ -2098,7 +2091,7 @@
/instrumentation/radar-altimeter[0]/radar-altitude-ft lt 750
/instrumentation/radar-altimeter[1]/radar-altitude-ft lt 750
</test>
/ECAM/phases/to-power-set eq 0
/ECAM/phases/phase-calculation/takeoff-power eq 0
<test logic="OR">
/gear/gear[0]/position-norm ne 1
/gear/gear[1]/position-norm ne 1
@ -2378,4 +2371,188 @@
</channel>
<channel name="Altitude Alerter" execrate="8">
<switch name="/ECAM/warnings/altitude-alert/altInhibit">
<default value="0"/>
<test logic="OR" value="1">
/it-autoflight/input/alt-is-changing eq 1
<test logic="OR">
<test logic="AND">
/gear/gear[1]/position-norm ge 0.99
/gear/gear[2]/position-norm ge 0.99
</test>
<test logic="AND">
/controls/gear/gear-down eq 1
/fdm/jsbsim/fcs/slat-pos-deg ge 4
</test>
</test>
/it-autoflight/output/lat eq 4
/it-autoflight/output/vert eq 2
/it-autoflight/output/vert eq 6
<!-- /it-autoflight/output/vert eq 7 check -->
</test>
</switch>
<fcs_function name="/ECAM/warnings/altitude-alert/altitude-difference">
<function>
<ifthen>
<not><property>/instrumentation/altimeter[0]/std</property></not>
<abs>
<difference>
<property>/systems/navigation/adr/output/baro-alt-corrected-1-capt</property>
<property>/it-autoflight/input/alt</property>
</difference>
</abs>
<abs>
<difference>
<property>/systems/navigation/adr/output/baro-alt-1-capt</property>
<property>/it-autoflight/input/alt</property>
</difference>
</abs>
</ifthen>
</function>
</fcs_function>
<switch name="/ECAM/warnings/altitude-alert/alt200">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warnings/altitude-alert/altitude-difference le 200
</test>
</switch>
<switch name="/ECAM/warnings/altitude-alert/alt750">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warnings/altitude-alert/altitude-difference le 750
</test>
</switch>
<switch name="/ECAM/warnings/altitude-alert/big-3-1-off">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/altitude-alert/altInhibit eq 0
/ECAM/warnings/altitude-alert/alt200 eq 1
/ECAM/warnings/altitude-alert/alt750 eq 1
</test>
</switch>
<switch name="/ECAM/warnings/altitude-alert/big-3-2-off">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/altitude-alert/altInhibit eq 0
/ECAM/warnings/altitude-alert/alt200 eq 0
/ECAM/warnings/altitude-alert/alt750 eq 1
</test>
</switch>
<switch name="/ECAM/warnings/altitude-alert/big-3-all-off">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/altitude-alert/altInhibit eq 0
/ECAM/warnings/altitude-alert/alt200 eq 0
/ECAM/warnings/altitude-alert/alt750 eq 0
</test>
</switch>
<switch name="/ECAM/warnings/altitude-alert/flipflop-1-set">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warnings/altitude-alert/big-3-1-off eq 1
</test>
</switch>
<switch name="/ECAM/warnings/altitude-alert/flipflop-1-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warnings/altitude-alert/big-3-all-off eq 1
/ECAM/warnings/altitude-alert/flipflop-2-reset eq 1
</test>
</switch>
<switch name="/ECAM/warnings/altitude-alert/flipflop-2-set">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/altitude-alert/big-3-2-off eq 1
</test>
</switch>
<switch name="/ECAM/warnings/altitude-alert/flipflop-2-reset">
<default value="0"/>
<test logic="OR" value="1">
<test logic="AND">
/ECAM/warnings/altitude-alert/gear-downlocked-set eq 1
/ECAM/warnings/altitude-alert/gear-downlocked-output eq 1
</test>
/ECAM/warnings/altitude-alert/alt-is-changing eq 1
</test>
</switch>
<switch name="/ECAM/warnings/altitude-alert/flipflop-or-1">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/altitude-alert/big-3-2-off eq 1
/ECAM/warnings/altitude-alert/flipflop-1 eq 1
</test>
</switch>
<switch name="/ECAM/warnings/altitude-alert/flipflop-or-2">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/altitude-alert/big-3-all-off eq 1
/ECAM/warnings/altitude-alert/flipflop-2 eq 1
</test>
</switch>
<switch name="/ECAM/warnings/altitude-alert/flipflop-or">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warnings/altitude-alert/flipflop-or-1 eq 1
/ECAM/warnings/altitude-alert/flipflop-or-2 eq 1
</test>
</switch>
<switch name="/ECAM/warnings/altitude-alert/monostable-autopilot">
<default value="0"/>
<test logic="AND" value="1">
/it-autoflight/output/ap1 eq 0
/it-autoflight/output/ap2 eq 0
/ECAM/warnings/altitude-alert/big-3-2-off eq 1
</test>
</switch>
<switch name="/ECAM/warnings/altitude-alert/c-chord">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/timer/ground-calc ne 1
<test logic="OR">
<test logic="AND">
/ECAM/warnings/altitude-alert/monostable-autopilot eq 1
/ECAM/warnings/altitude-alert/monostable-autopilot-output eq 1
</test>
/ECAM/warnings/altitude-alert/flipflop-or eq 1
</test>
</test>
</switch>
<switch name="/ECAM/warnings/altitude-alert/altitude-alert-steady">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/timer/ground-calc ne 1
/ECAM/warnings/altitude-alert/big-3-2-off eq 1
/ECAM/warnings/altitude-alert/flipflop-or-1 eq 0
</test>
</switch>
<switch name="/ECAM/warnings/altitude-alert/altitude-alert-flash">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/timer/ground-calc ne 1
/ECAM/warnings/altitude-alert/flipflop-or eq 1
</test>
</switch>
</channel>
</system>

View file

@ -203,6 +203,17 @@
<output>ECAM/phases/monostable/gnd-output</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
<value>2.5</value>
</time>
<S>
<property>/ECAM/ground-calc-immediate</property>
</S>
<output>ECAM/phases/monostable/gnd-output-2</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
@ -239,44 +250,6 @@
<output>ECAM/buttons/recall-status-normal-output</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>ECAM/altitude-alert-monostable-set</property>
</S>
<R>
<property>ECAM/altitude-alert-monostable-intermediate-output</property>
</R>
<output>ECAM/altitude-alert-monostable-flipflop-intermediate</output>
</flipflop>
<flipflop>
<type>monostable</type>
<inverted type="bool">true</inverted>
<time>
<value>1.5</value>
</time>
<S>
<not><property>ECAM/altitude-alert-monostable-flipflop-intermediate</property></not>
</S>
<output>ECAM/altitude-alert-monostable-intermediate-output</output>
</flipflop>
<filter>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<and>
<property>ECAM/altitude-alert-monostable-flipflop-intermediate</property>
<not><property>ECAM/altitude-alert-monostable-intermediate-output</property></not>
</and>
</condition>
<value>1</value>
</input>
<output>ECAM/altitude-alert-monostable-output</output>
</filter>
<filter>
<type>derivative</type>
<input>it-autoflight/input/alt</input>
@ -292,10 +265,12 @@
<S>
<property>it-autoflight/input/alt-is-changing</property>
</S>
<output>ECAM/alt-is-changing</output>
<output>ECAM/warnings/altitude-alert/alt-is-changing</output>
</flipflop>
<filter>
<type>gain</type>
<gain>1</gain>
<input>
<condition>
<equals>
@ -314,7 +289,7 @@
</condition>
<value>0</value>
</input>
<output>ECAM/gear-downlocked-set</output>
<output>ECAM/warnings/altitude-alert/gear-downlocked-set</output>
</filter>
<flipflop>
@ -323,67 +298,9 @@
<value>1</value>
</time>
<S>
<property>ECAM/gear-downlocked-set</property>
<not><property>ECAM/warnings/altitude-alert/gear-downlocked-set</property></not>
</S>
<output>ECAM/gear-downlocked-output</output>
</flipflop>
<filter>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<or>
<equals><property>ECAM/gear-downlocked-output</property><value>1</value></equals>
<equals><property>ECAM/alt-is-changing</property><value>1</value></equals>
</or>
</condition>
<value>1</value>
</input>
<input>
<condition>
<and>
<equals><property>ECAM/gear-downlocked-output</property><value>0</value></equals>
<equals><property>ECAM/alt-is-changing</property><value>0</value></equals>
</and>
</condition>
<value>0</value>
</input>
<output>ECAM/flipflop/alt-alert-rs-reset</output>
</filter>
<flipflop>
<type>RS</type>
<S>
<property>ECAM/flipflop/altitude-alert-rs-set</property>
</S>
<R>
<property>ECAM/flipflop/alt-alert-rs-reset</property>
</R>
<output>ECAM/flipflop/alt-alert-rs-output</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>ECAM/flipflop/alt-alert-2-rs-set</property>
</S>
<R>
<property>ECAM/flipflop/alt-alert-2-rs-reset</property>
</R>
<output>ECAM/flipflop/alt-alert-2-rs-output</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>ECAM/flipflop/alt-alert-3-rs-set</property>
</S>
<R>
<property>ECAM/flipflop/alt-alert-rs-reset</property>
</R>
<output>ECAM/flipflop/alt-alert-3-rs-output</output>
<output>ECAM/warnings/altitude-alert/gear-downlocked-output</output>
</flipflop>
<!-- falling edge detector - take inverse of following -->
@ -466,7 +383,7 @@
<value>1.0</value>
</time>
<S>
<property>ECAM/phases/to-power-set</property>
<property>ECAM/phases/phase-calculation/takeoff-power</property>
</S>
<output>ECAM/phases/monostable/to-power-set-output</output>
</flipflop>
@ -1069,4 +986,47 @@
<output>/ECAM/warnings/logic/green-yellow-press-on-monostable</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/warnings/altitude-alert/flipflop-1-set</property>
</S>
<R>
<property>/ECAM/warnings/altitude-alert/flipflop-1-reset</property>
</R>
<output>/ECAM/warnings/altitude-alert/flipflop-1</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/warnings/altitude-alert/flipflop-2-set</property>
</S>
<R>
<property>/ECAM/warnings/altitude-alert/flipflop-2-reset</property>
</R>
<output>/ECAM/warnings/altitude-alert/flipflop-2</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
<value>1.5</value>
</time>
<S>
<not><property>/ECAM/warnings/altitude-alert/monostable-autopilot</property></not>
</S>
<output>/ECAM/warnings/altitude-alert/monostable-autopilot-output</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/phases/phase-calculation/altitude-flipflop-set</property>
</S>
<R>
<property>/ECAM/phases/phase-calculation/altitude-flipflop-reset</property>
</R>
<output>/ECAM/phases/phase-calculation/altitude-ge-800</output>
</flipflop>
</PropertyList>

View file

@ -483,6 +483,7 @@ var refuelClass = {
});
systems.fuelSvc.Nodes.requestFuelLbs.setValue(pts.Consumables.Fuel.totalFuelLbs.getValue());
amount.setValue(math.round((systems.fuelSvc.Nodes.requestFuelLbs.getValue() + systems.fuelSvc.Nodes.requestLbs.getValue()) / 1000, 0.1));
me._timerf();
@ -593,11 +594,11 @@ var refuelClass = {
if (acconfig_weight_kgs.getValue() == 1) {
amount.setValue(target - 0.1 * LBS2KGS);
if ((target - 0.1) * LBS2KGS >= 10.0) {
me._FQI_pre.setText(sprintf("%2.1f", (target - 0.1) * LBS2KGS));
me._FQI_pre.setText(sprintf("%2.1f", (target - (0.1 * LBS2KGS)) * LBS2KGS));
} else {
me._FQI_pre.setText(sprintf("%2.2f", (target - 0.1) * LBS2KGS));
me._FQI_pre.setText(sprintf("%2.2f", (target - (0.1 * LBS2KGS)) * LBS2KGS));
}
systems.fuelSvc.Nodes.requestLbs.setValue((((target - 0.1) * LBS2KGS) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
systems.fuelSvc.Nodes.requestLbs.setValue(((target - 0.1) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
} else {
amount.setValue(target - 0.1);
if (target - 0.1 >= 10.0) {
@ -615,11 +616,11 @@ var refuelClass = {
if (acconfig_weight_kgs.getValue() == 1) {
amount.setValue(target + 0.1);
if ((target + 0.1) * LBS2KGS >= 10.0) {
me._FQI_pre.setText(sprintf("%2.1f", (target + 0.1) * LBS2KGS));
me._FQI_pre.setText(sprintf("%2.1f", (target + (0.1 * LBS2KGS)) * LBS2KGS));
} else {
me._FQI_pre.setText(sprintf("%2.2f", (target + 0.1) * LBS2KGS));
me._FQI_pre.setText(sprintf("%2.2f", (target + (0.1 * LBS2KGS)) * LBS2KGS));
}
systems.fuelSvc.Nodes.requestLbs.setValue((((target + 0.1) * LBS2KGS) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
systems.fuelSvc.Nodes.requestLbs.setValue(((target + 0.1) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
} else {
amount.setValue(target + 0.1);
if (target + 0.1 >= 10.0) {