1
0
Fork 0

Merge branch 'dev' into new-electrical

This commit is contained in:
legoboyvdlp R 2021-07-27 14:44:38 +01:00
commit 637e8e2644
86 changed files with 9116 additions and 6003 deletions

View file

@ -457,6 +457,16 @@
]]></script>
</binding>
</item>
<item>
<label>Remote MCDU</label>
<binding>
<command>nasal</command>
<script>
var mcduweb_dlg = gui.Dialog.new("sim/gui/dialogs/mcduweb/dialog", "Aircraft/A320-family/gui/dialogs/mcduweb.xml");
mcduweb_dlg.open();
</script>
</binding>
</item>
</menu>
<menu n="105">
<label>Utilities</label>
@ -4647,6 +4657,8 @@
<file>Aircraft/A320-family/Nasal/Systems/tyresmoke.nas</file>
</systems>
<ecam>
<file>Aircraft/A320-family/Nasal/ECAM/SystemDisplay.nas</file>
<file>Aircraft/A320-family/Nasal/ECAM/ECAM-nodes.nas</file>
<file>Aircraft/A320-family/Nasal/ECAM/ECAM-main.nas</file>
<file>Aircraft/A320-family/Nasal/ECAM/ECAM-controller.nas</file>
<file>Aircraft/A320-family/Nasal/ECAM/ECAM-logic.nas</file>
@ -4723,6 +4735,20 @@
<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-base.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM-APU.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM-bleed.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM-cond.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM-cruise.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM-door.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM-elec.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM-eng.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM-fctl.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM-fuel.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM-press.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM-sts.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM-wheel.nas</file>
<file>Aircraft/A320-family/Models/Instruments/Lower-ECAM/Lower-ECAM.nas</file>
</canvas_ecam>
<canvas_iesi>

View file

@ -23,39 +23,15 @@ var spinning = maketimer(0.05, func {
var failReset = func {
systems.ELEC.resetFail();
systems.PNEU.resetFail();
fbw.FBW.resetFail();
systems.HYD.resetFail();
}
var failResetOld = func {
setprop("/systems/failures/fctl/elac1", 0);
setprop("/systems/failures/fctl/elac2", 0);
setprop("/systems/failures/fctl/sec1", 0);
setprop("/systems/failures/fctl/sec2", 0);
setprop("/systems/failures/fctl/sec3", 0);
setprop("/systems/failures/fctl/fac1", 0);
setprop("/systems/failures/fctl/fac2", 0);
setprop("/systems/failures/fctl/rtlu-1", 0);
setprop("/systems/failures/fctl/rtlu-2", 0);
setprop("/systems/failures/aileron-left", 0);
setprop("/systems/failures/aileron-right", 0);
setprop("/systems/failures/elevator-left", 0);
setprop("/systems/failures/elevator-right", 0);
setprop("/systems/failures/spoilers/spoiler-l1", 0);
setprop("/systems/failures/spoilers/spoiler-l2", 0);
setprop("/systems/failures/spoilers/spoiler-l3", 0);
setprop("/systems/failures/spoilers/spoiler-l4", 0);
setprop("/systems/failures/spoilers/spoiler-l5", 0);
setprop("/systems/failures/spoilers/spoiler-r1", 0);
setprop("/systems/failures/spoilers/spoiler-r2", 0);
setprop("/systems/failures/spoilers/spoiler-r3", 0);
setprop("/systems/failures/spoilers/spoiler-r4", 0);
setprop("/systems/failures/spoilers/spoiler-r5", 0);
setprop("/systems/failures/hyd-blue", 0);
setprop("/systems/failures/hyd-green", 0);
setprop("/systems/failures/hyd-yellow", 0);
setprop("/systems/failures/pump-blue", 0);
setprop("/systems/failures/pump-green", 0);
setprop("/systems/failures/pump-yellow-eng", 0);
setprop("/systems/failures/pump-yellow-elec", 0);
setprop("/systems/failures/fire/cargo-aft-fire", 0);
setprop("/systems/failures/fire/cargo-fwd-fire", 0);
setprop("/systems/failures/fire/engine-left-fire", 0);
@ -65,6 +41,7 @@ var failResetOld = func {
}
failResetOld();
setprop("/systems/acconfig/autoconfig-running", 0);
setprop("/systems/acconfig/spinning", 0);
setprop("/systems/acconfig/spin", "-");
@ -115,7 +92,8 @@ var revisionFile = (getprop("/sim/aircraft-dir") ~ "/revision.txt");
var current_revision = io.readfile(revisionFile);
print("A320-family Revision: " ~ current_revision);
setprop("/systems/acconfig/revision", current_revision);
setprop("/systems/acconfig/options/fo-view", 0);
var foViewNode = props.globals.initNode("/systems/acconfig/options/fo-view", 0, "BOOL");
setprop("/systems/acconfig/options/simbrief-username", "");
setlistener("/systems/acconfig/new-revision", func {
@ -180,7 +158,7 @@ setlistener("/sim/signals/fdm-initialized", func {
writeSettings();
if (getprop("/options/system/save-state") == 1)
{
save.restore(save.default, getprop("/sim/fg-home") ~ "/Export/" ~ getprop("/sim/aircraft") ~ "-save.xml");
save.restore(save.default, pts.Sim.fgHome.getValue() ~ "/Export/" ~ pts.Sim.aircraft.getValue() ~ "-save.xml");
}
if (getprop("/options/system/fo-view") == 1) {
@ -191,7 +169,7 @@ setlistener("/sim/signals/fdm-initialized", func {
});
setlistener("/sim/signals/exit", func {
save.save(save.default, getprop("/sim/fg-home") ~ "/Export/" ~ getprop("/sim/aircraft") ~ "-save.xml");
save.save(save.default, pts.Sim.fgHome.getValue() ~ "/Export/" ~ pts.Sim.aircraft.getValue() ~ "-save.xml");
});
var renderingSettings = {
@ -224,7 +202,7 @@ var renderingSettings = {
};
var readSettings = func {
io.read_properties(getprop("/sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options");
io.read_properties(pts.Sim.fgHome.getValue() ~ "/Export/A320-family-config.xml", "/systems/acconfig/options");
setprop("/options/system/keyboard-mode", getprop("/systems/acconfig/options/keyboard-mode"));
setprop("/options/system/weight-kgs", getprop("/systems/acconfig/options/weight-kgs"));
setprop("/options/system/save-state", getprop("/systems/acconfig/options/save-state"));
@ -232,7 +210,7 @@ var readSettings = func {
setprop("/systems/apu/oil/allow-oil-consumption", getprop("/systems/acconfig/options/allow-oil-consumption"));
setprop("/sim/model/autopush/route/show", getprop("/systems/acconfig/options/autopush/show-route"));
setprop("/sim/model/autopush/route/show-wingtip", getprop("/systems/acconfig/options/autopush/show-wingtip"));
setprop("/options/system/fo-view", getprop("/systems/acconfig/options/fo-view"));
setprop("/options/system/fo-view", foViewNode.getValue());
setprop("/FMGC/simbrief-username", getprop("/systems/acconfig/options/simbrief-username"));
setprop("/systems/atsu/atis-server", getprop("/systems/acconfig/options/atis-server"));
setprop("/systems/atsu/wxr-server", getprop("/systems/acconfig/options/wxr-server"));
@ -246,11 +224,11 @@ var writeSettings = func {
setprop("/systems/acconfig/options/allow-oil-consumption", getprop("/systems/apu/oil/allow-oil-consumption"));
setprop("/systems/acconfig/options/autopush/show-route", getprop("/sim/model/autopush/route/show"));
setprop("/systems/acconfig/options/autopush/show-wingtip", getprop("/sim/model/autopush/route/show-wingtip"));
setprop("/systems/acconfig/options/fo-view", getprop("/options/system/fo-view"));
foViewNode.setValue(getprop("/options/system/fo-view"));
setprop("/systems/acconfig/options/simbrief-username", getprop("/FMGC/simbrief-username"));
setprop("/systems/acconfig/options/atis-server", getprop("/systems/atsu/atis-server"));
setprop("/systems/acconfig/options/wxr-server", getprop("/systems/atsu/wxr-server"));
io.write_properties(getprop("/sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options");
io.write_properties(pts.Sim.fgHome.getValue() ~ "/Export/A320-family-config.xml", "/systems/acconfig/options");
}
################
@ -280,7 +258,7 @@ var colddark = func {
setprop("/controls/engines/engine[0]/cutoff-switch", 1);
setprop("/controls/engines/engine[1]/cutoff-switch", 1);
setprop("/controls/flight/flaps", 0);
setprop("/controls/flight/speedbrake-arm", 0);
pts.Controls.Flight.speedbrakeArm.setValue(0);
setprop("/controls/flight/speedbrake", 0);
setprop("/controls/gear/gear-down", 1);
setprop("/controls/flight/elevator-trim", 0);
@ -339,12 +317,13 @@ var beforestart = func {
setprop("/controls/engines/engine[0]/cutoff-switch", 1);
setprop("/controls/engines/engine[1]/cutoff-switch", 1);
setprop("/controls/flight/flaps", 0);
setprop("/controls/flight/speedbrake-arm", 0);
pts.Controls.Flight.speedbrakeArm.setValue(0);
setprop("/controls/flight/speedbrake", 0);
setprop("/controls/gear/gear-down", 1);
setprop("/controls/flight/elevator-trim", 0);
libraries.systemsInit();
libraries.variousReset();
setprop("/controls/oxygen/crewOxyPB", 1);
failResetOld();
# Now the Startup!
@ -402,9 +381,9 @@ var beforestart_b = func {
setprop("/controls/adirs/mcducbtn", 1);
setprop("/controls/switches/beacon", 1);
setprop("/controls/lighting/nav-lights-switch", 1);
setprop("/controls/switches/no-smoking-sign", 0.5);
setprop("/controls/switches/seatbelt-sign", 1);
setprop("/controls/switches/emer-lights", 0.5);
libraries.noSmokingSwitch.setValue(0.5);
libraries.seatbeltSwitch.setValue(1.0);
libraries.emerLtsSwitch.setValue(0.5);
setprop("/controls/radio/rmp[0]/on", 1);
setprop("/controls/radio/rmp[1]/on", 1);
setprop("/controls/radio/rmp[2]/on", 1);
@ -434,12 +413,13 @@ var taxi = func {
setprop("/controls/engines/engine[0]/cutoff-switch", 1);
setprop("/controls/engines/engine[1]/cutoff-switch", 1);
setprop("/controls/flight/flaps", 0);
setprop("/controls/flight/speedbrake-arm", 0);
pts.Controls.Flight.speedbrakeArm.setValue(0);
setprop("/controls/flight/speedbrake", 0);
setprop("/controls/gear/gear-down", 1);
setprop("/controls/flight/elevator-trim", 0);
libraries.systemsInit();
libraries.variousReset();
setprop("/controls/oxygen/crewOxyPB", 1);
failResetOld();
# Now the Startup!
@ -498,9 +478,9 @@ var taxi_b = func {
setprop("/controls/switches/beacon", 1);
setprop("/controls/switches/wing-lights", 1);
setprop("/controls/lighting/nav-lights-switch", 1);
setprop("/controls/switches/no-smoking-sign", 0.5);
setprop("/controls/switches/seatbelt-sign", 1);
setprop("/controls/switches/emer-lights", 0.5);
libraries.noSmokingSwitch.setValue(0.5);
libraries.seatbeltSwitch.setValue(1.0);
libraries.emerLtsSwitch.setValue(0.5);
setprop("/controls/radio/rmp[0]/on", 1);
setprop("/controls/radio/rmp[1]/on", 1);
setprop("/controls/radio/rmp[2]/on", 1);
@ -559,7 +539,7 @@ var takeoff = func {
setprop("/controls/lighting/taxi-light-switch", 1);
setprop("/controls/switches/landing-lights-l", 1);
setprop("/controls/switches/landing-lights-r", 1);
setprop("/controls/flight/speedbrake-arm", 1);
pts.Controls.Flight.speedbrakeArm.setValue(1);
setprop("/controls/flight/flaps", 0.2);
setprop("/controls/atc/mode-knob", 4);
atc.transponderPanel.modeSwitch(5);

View file

@ -346,7 +346,7 @@
<animation>
<type>rotate</type>
<object-name>brakes_lb_psi</object-name>
<property>systems/hydraulic/brakes/pressure-left-psi</property>
<property>systems/hydraulic/brakes/pressure-left-psi-output</property>
<factor>-0.03</factor>
<condition>
<or>
@ -378,7 +378,7 @@
<animation>
<type>rotate</type>
<object-name>brakes_rb_psi</object-name>
<property>systems/hydraulic/brakes/pressure-right-psi</property>
<property>systems/hydraulic/brakes/pressure-right-psi-output</property>
<factor>0.03</factor>
<condition>
<or>
@ -410,7 +410,7 @@
<animation>
<type>rotate</type>
<object-name>brakes_accum_psi</object-name>
<property>systems/hydraulic/yellow-accumulator-psi</property>
<property>systems/hydraulic/yellow-accumulator-psi-output</property>
<interpolation>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>700</ind><dep>-20</dep></entry>
@ -1158,6 +1158,7 @@
<object-name>vord_led</object-name>
<object-name>vord_led.001</object-name>
<object-name>vs-text</object-name>
<object-name>vs-text-last-2-digits</object-name>
<object-name>vs-text-test</object-name>
<object-name>wpt_led</object-name>
<object-name>wpt_led.001</object-name>
@ -1206,7 +1207,6 @@
<object-name>audio_call_vhf2_led</object-name>
<object-name>audio_call_vhf3_led</object-name>
<object-name>audio_mech_sgn</object-name>
<object-name>autoland_light_on</object-name>
<object-name>ecam_c_b_led</object-name>
<object-name>ecam_el_dc_led</object-name>
<object-name>ecam_sts_led</object-name>
@ -2157,7 +2157,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>ecam.ECAMControlPanel.sysPageBtn("sts");</script>
<script>ecam.ECAMControlPanel.stsBtn();</script>
</binding>
</action>
</animation>
@ -2176,7 +2176,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>ecam.ECAMControlPanel.sysPageBtn("apu");</script>
<script>ecam.ECAMControlPanel.sysPageBtn("apuPage");</script>
</binding>
</action>
</animation>
@ -2195,7 +2195,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>ecam.ECAMControlPanel.sysPageBtn("bleed");</script>
<script>ecam.ECAMControlPanel.sysPageBtn("bleedPage");</script>
</binding>
</action>
</animation>
@ -2214,7 +2214,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>ecam.ECAMControlPanel.sysPageBtn("press");</script>
<script>ecam.ECAMControlPanel.sysPageBtn("cabPressPage");</script>
</binding>
</action>
</animation>
@ -2233,7 +2233,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>ecam.ECAMControlPanel.sysPageBtn("elec");</script>
<script>ecam.ECAMControlPanel.sysPageBtn("elecPage");</script>
</binding>
</action>
</animation>
@ -2252,7 +2252,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>ecam.ECAMControlPanel.sysPageBtn("hyd");</script>
<script>ecam.ECAMControlPanel.sysPageBtn("hydraulicPage");</script>
</binding>
</action>
</animation>
@ -2271,7 +2271,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>ecam.ECAMControlPanel.sysPageBtn("fuel");</script>
<script>ecam.ECAMControlPanel.sysPageBtn("fuelPage");</script>
</binding>
</action>
</animation>
@ -2290,7 +2290,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>ecam.ECAMControlPanel.sysPageBtn("eng");</script>
<script>ecam.ECAMControlPanel.sysPageBtn("enginePage");</script>
</binding>
</action>
</animation>
@ -2309,7 +2309,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>ecam.ECAMControlPanel.sysPageBtn("cond");</script>
<script>ecam.ECAMControlPanel.sysPageBtn("condPage");</script>
</binding>
</action>
</animation>
@ -2328,7 +2328,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>ecam.ECAMControlPanel.sysPageBtn("door");</script>
<script>ecam.ECAMControlPanel.sysPageBtn("doorPage");</script>
</binding>
</action>
</animation>
@ -2347,7 +2347,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>ecam.ECAMControlPanel.sysPageBtn("wheel");</script>
<script>ecam.ECAMControlPanel.sysPageBtn("wheelPage");</script>
</binding>
</action>
</animation>
@ -2366,7 +2366,7 @@
</greater-than-equals>
</condition>
<command>nasal</command>
<script>ecam.ECAMControlPanel.sysPageBtn("fctl");</script>
<script>ecam.ECAMControlPanel.sysPageBtn("fctlPage");</script>
</binding>
</action>
</animation>
@ -4310,23 +4310,6 @@
</condition>
</animation>
<animation>
<type>select</type>
<object-name>lvlch.ind</object-name>
<condition>
<or>
<equals>
<property>controls/switches/annun-test</property>
<value>1</value>
</equals>
<equals>
<property>it-autoflight/output/vert</property>
<value>4</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>alt-text</object-name>
@ -4394,6 +4377,7 @@
<animation>
<type>select</type>
<object-name>vs-text</object-name>
<object-name>vs-text-last-2-digits</object-name>
<condition>
<and>
<not-equals>
@ -4535,8 +4519,8 @@
</offsets>
<alignment>center-center</alignment>
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<type type="string">number-value</type>
<format type="string">%03.0f</format>
<property>it-autoflight/input/hdg</property>
<truncate>false</truncate>
<font type="string">led.txf</font>
@ -4587,8 +4571,8 @@
</offsets>
<alignment>center-center</alignment>
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<type type="string">number-value</type>
<format type="string">%05.0f</format>
<property>it-autoflight/input/alt</property>
<truncate>false</truncate>
<font type="string">led.txf</font>
@ -4632,16 +4616,42 @@
<name>vs-text</name>
<offsets>
<x-m>-0.377</x-m>
<y-m>0.09043</y-m>
<y-m>0.0850</y-m>
<z-m>0.50254</z-m>
<heading-deg>90</heading-deg>
<roll-deg>72.81</roll-deg>
</offsets>
<alignment>center-center</alignment>
<axis-alignment>xy-plane</axis-alignment>
<type type="string">number-value</type>
<format type="string">%4.0f</format>
<property>it-autoflight/input/vs</property>
<type type="string">text-value</type>
<format type="string">%s</format>
<property>it-autoflight/output/vs-fcu-display</property>
<truncate>false</truncate>
<font type="string">led.txf</font>
<draw-text>true</draw-text>
<draw-alignment>false</draw-alignment>
<draw-boundingbox>false</draw-boundingbox>
<character-size>0.008</character-size>
<font-resolution>
<width type="int">32</width>
<height type="int">32</height>
</font-resolution>
</text>
<text>
<name>vs-text-last-2-digits</name>
<offsets>
<x-m>-0.377</x-m>
<y-m>0.0977</y-m>
<z-m>0.5028</z-m>
<heading-deg>90</heading-deg>
<roll-deg>72.81</roll-deg>
</offsets>
<alignment>center-center</alignment>
<axis-alignment>xy-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">oo</format>
<property>autopilot/serviceable</property>
<truncate>false</truncate>
<font type="string">led.txf</font>
<draw-text>true</draw-text>
@ -4658,7 +4668,7 @@
<name>fpa-text</name>
<offsets>
<x-m>-0.377</x-m>
<y-m>0.09043</y-m>
<y-m>0.0860</y-m>
<z-m>0.50254</z-m>
<heading-deg>90</heading-deg>
<roll-deg>72.81</roll-deg>
@ -4666,7 +4676,7 @@
<alignment>center-center</alignment>
<axis-alignment>xy-plane</axis-alignment>
<type type="string">number-value</type>
<format type="string">%2.1f</format>
<format type="string">%+2.1f</format>
<property>it-autoflight/input/fpa</property>
<truncate>false</truncate>
<font type="string">led.txf</font>
@ -6158,6 +6168,29 @@
</emission>
</animation>
<animation>
<type>select</type>
<object-name>autoland_light_on</object-name>
<condition>
<or>
<equals>
<property>controls/switches/annun-test</property>
<value>1</value>
</equals>
<and>
<equals>
<property>instrumentation/pfd/lights/autoland-armed</property>
<value>1</value>
</equals>
<equals>
<property>instrumentation/pfd/lights/autoland-on</property>
<value>1</value>
</equals>
</and>
</or>
</condition>
</animation>
<!-- Master Warning and Caution -->
<animation>
<type>select</type>
@ -7213,6 +7246,7 @@
<object-name>hdg-text</object-name>
<object-name>alt-text</object-name>
<object-name>vs-text</object-name>
<object-name>vs-text-last-2-digits</object-name>
<object-name>spd-text-test</object-name>
<object-name>hdg-text-test</object-name>
<object-name>alt-text-test</object-name>
@ -7227,9 +7261,9 @@
<object-name>rudder-trim</object-name>
<object-name>rudder-trim-letter</object-name>
<diffuse>
<red>0.89</red>
<green>0.37</green>
<blue>0.08</blue>
<red>0.75</red>
<green>0.30</green>
<blue>0.0</blue>
</diffuse>
<ambient>
<red>0</red>
@ -7242,9 +7276,9 @@
<blue>0</blue>
</specular>
<emission>
<red>0.89</red>
<green>0.37</green>
<blue>0.08</blue>
<red>0.75</red>
<green>0.30</green>
<blue>0.0</blue>
</emission>
</animation>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 105 KiB

View file

@ -0,0 +1,320 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
var apu_load = props.globals.initNode("/systems/electrical/extra/apu-load", 0, "DOUBLE");
var gen1_load = props.globals.initNode("/systems/electrical/extra/gen1-load", 0, "DOUBLE");
var gen2_load = props.globals.initNode("/systems/electrical/extra/gen2-load", 0, "DOUBLE");
var canvas_lowerECAMPageApu =
{
new: func(svg,name) {
var obj = {parents: [canvas_lowerECAMPageApu,canvas_lowerECAM_base] };
obj.group = obj.canvas.createGroup();
obj.name = name;
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
foreach(var key; obj.getKeys()) {
obj[key] = obj.group.getElementById(key);
};
foreach(var key; obj.getKeysBottom()) {
obj[key] = obj.group.getElementById(key);
};
obj.units = acconfig_weight_kgs.getValue();
# init
obj["APUGenOff"].hide();
obj.update_items = [
props.UpdateManager.FromHashValue("apuFlap",1, func(val) {
if (val) {
obj["APUFlapOpen"].show();
} else {
obj["APUFlapOpen"].hide();
}
}),
props.UpdateManager.FromHashValue("apuNeedleRot",0.1, func(val) {
obj["APUN-needle"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("apuEgtRot",0.1, func(val) {
obj["APUEGT-needle"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("apuAvailable", nil, func(val) {
if (val) {
obj["APUAvail"].show();
} else {
obj["APUAvail"].hide();
}
}),
props.UpdateManager.FromHashList(["apuRpm","apuEgt","apuMaster","apuGenPB"], nil, func(val) {
if (val.apuRpm > 0.001) {
obj["APUN"].setColor(0.0509,0.7529,0.2941);
obj["APUN"].setText(sprintf("%s", math.round(val.apuRpm)));
obj["APUN-needle"].show();
obj["APUEGT"].setColor(0.0509,0.7529,0.2941);
obj["APUEGT"].setText(sprintf("%s", math.round(val.apuEgt, 5)));
obj["APUEGT-needle"].show();
} else {
obj["APUN"].setColor(0.7333,0.3803,0);
obj["APUN"].setText(sprintf("%s", "XX"));
obj["APUN-needle"].hide();
obj["APUEGT"].setColor(0.7333,0.3803,0);
obj["APUEGT"].setText(sprintf("%s", "XX"));
obj["APUEGT-needle"].hide();
}
if (val.apuMaster or val.apuRpm >= 94.9) {
obj["APUGenbox"].show();
if (val.apuGenPB) {
obj["APUGenOff"].hide();
obj["APUGentext"].setColor(0.8078,0.8039,0.8078);
obj["APUGenHz"].show();
obj["APUGenVolt"].show();
obj["APUGenLoad"].show();
obj["text3724"].show();
obj["text3728"].show();
obj["text3732"].show();
} else {
obj["APUGenOff"].show();
obj["APUGentext"].setColor(0.7333,0.3803,0);
obj["APUGenHz"].hide();
obj["APUGenVolt"].hide();
obj["APUGenLoad"].hide();
obj["text3724"].hide();
obj["text3728"].hide();
obj["text3732"].hide();
}
} else {
obj["APUGentext"].setColor(0.8078,0.8039,0.8078);
obj["APUGenbox"].hide();
obj["APUGenHz"].hide();
obj["APUGenVolt"].hide();
obj["APUGenLoad"].hide();
obj["text3724"].hide();
obj["text3728"].hide();
obj["text3732"].hide();
}
}),
props.UpdateManager.FromHashList(["apuFuelPumpsOff","apuFuelPump"], nil, func(val) {
if (val.apuFuelPumpsOff and !val.apuFuelPump) {
obj["APUfuelLO"].show();
} else {
obj["APUfuelLO"].hide();
}
}),
props.UpdateManager.FromHashList(["apuRpm","apuOilLevel","gear0Wow"], nil, func(val) {
if (val.apuRpm >= 94.9 and val.gear0Wow and val.apuOilLevel < 3.69) {
obj["APU-low-oil"].show();
} else {
obj["APU-low-oil"].hide();
}
}),
props.UpdateManager.FromHashList(["apuAdr","apuPsi","apuRpm"], nil, func(val) {
if (val.apuAdr and val.apuRpm > 0.001) {
obj["APUBleedPSI"].setColor(0.0509,0.7529,0.2941);
obj["APUBleedPSI"].setText(sprintf("%s", math.round(val.apuPsi)));
} else {
obj["APUBleedPSI"].setColor(0.7333,0.3803,0);
obj["APUBleedPSI"].setText(sprintf("%s", "XX"));
}
}),
props.UpdateManager.FromHashValue("apuLoad", 0.1, func(val) {
obj["APUGenLoad"].setText(sprintf("%s", math.round(val)));
if (val <= 100) {
obj["APUGenHz"].setColor(0.0509,0.7529,0.2941);
} else {
obj["APUGenHz"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("apuHertz", 1, func(val) {
if (val == 0) {
obj["APUGenHz"].setText(sprintf("XX"));
} else {
obj["APUGenHz"].setText(sprintf("%s", math.round(val)));
}
if (val >= 390 and val <= 410) {
obj["APUGenHz"].setColor(0.0509,0.7529,0.2941);
} else {
obj["APUGenHz"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("apuVolt", 0.1, func(val) {
obj["APUGenVolt"].setText(sprintf("%s", math.round(val)));
if (val >= 110 and val <= 120) {
obj["APUGenVolt"].setColor(0.0509,0.7529,0.2941);
} else {
obj["APUGenVolt"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("apuGLC", nil, func(val) {
if (val) {
obj["APUGenOnline"].show();
} else {
obj["APUGenOnline"].hide();
}
}),
props.UpdateManager.FromHashList(["apuBleedValvePos","apuBleedValveCmd"], nil, func(val) {
if (val.apuBleedValvePos == 1) {
obj["APUBleedValve"].setRotation(90 * D2R);
obj["APUBleedOnline"].show();
} else {
obj["APUBleedValve"].setRotation(0);
obj["APUBleedOnline"].hide();
}
if (val.apuBleedValveCmd == val.apuBleedValvePos) {
obj["APUBleedValveCrossBar"].setColor(0.0509,0.7529,0.2941);
obj["APUBleedValveCrossBar"].setColorFill(0.0509,0.7529,0.2941);
obj["APUBleedValve"].setColor(0.0509,0.7529,0.2941);
} else {
obj["APUBleedValveCrossBar"].setColor(0.7333,0.3803,0);
obj["APUBleedValveCrossBar"].setColorFill(0.7333,0.3803,0);
obj["APUBleedValve"].setColor(0.7333,0.3803,0);
}
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
];
return obj;
},
getKeysBottom: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
return ["APUN-needle","APUEGT-needle","APUN","APUEGT","APUAvail","APUFlapOpen","APUBleedValve","APUBleedOnline","APUBleedValveCrossBar","APUGenOnline","APUGenOff","APUGentext","APUGenLoad","APUGenbox","APUGenVolt","APUGenHz","APUBleedPSI","APUfuelLO","APU-low-oil","text3724","text3728","text3732"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
}
me["GW"].setColor(0.0509,0.7529,0.2941);
} else {
me["GW"].setText(sprintf("%s", "-----"));
me["GW"].setColor(0.0901,0.6039,0.7176);
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setColor(0.7333,0.3803,0);
}
},
update: func(notification) {
me.updatePower();
if (me.test.getVisible() == 1) {
me.updateTest(notification);
}
if (me.group.getVisible() == 0) {
return;
}
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
me.updateBottom(notification);
},
updatePower: func() {
if (me.name == ecam.SystemDisplayController.displayedPage.name) {
if (du4_lgt.getValue() > 0.01 and systems.ELEC.Bus.ac2.getValue() >= 110) {
if (du4_test_time.getValue() + du4_test_amount.getValue() >= pts.Sim.Time.elapsedSec.getValue()) {
me.group.setVisible(0);
me.test.setVisible(1);
} else {
me.group.setVisible(1);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
# don't hide the test group; just let whichever page is active control it
}
},
};
var input = {
apuAdr: "/systems/navigation/adr/operating-1",
apuAvailable: "/systems/apu/available",
apuBleed: "/controls/pneumatics/switches/apu",
apuBleedValveCmd: "/systems/pneumatics/valves/apu-bleed-valve-cmd",
apuBleedValvePos: "/systems/pneumatics/valves/apu-bleed-valve",
apuEgt: "/systems/apu/egt-degC",
apuEgtRot: "/ECAM/Lower/APU-EGT",
apuGenPB: "/controls/electrical/switches/apu",
apuGLC: "/systems/electrical/relay/apu-glc/contact-pos",
apuFireBtn: "/controls/apu/fire-btn",
apuFlap: "/controls/apu/inlet-flap/position-norm",
apuFuelPump: "/systems/fuel/pumps/apu-operate",
apuFuelPumpsOff: "/systems/fuel/pumps/all-eng-pump-off",
apuOilLevel: "/systems/apu/oil/level-l",
apuMaster: "/controls/apu/master",
apuNeedleRot: "/ECAM/Lower/APU-N",
apuRpm: "/engines/engine[2]/n1",
apuPsi: "/systems/pneumatics/source/apu-psi",
apuLoad: "/systems/electrical/extra/apu-load",
apuHertz: "/systems/electrical/sources/apu/output-hertz",
apuVolt: "/systems/electrical/sources/apu/output-volt",
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 System Display", name, input[name]));
}

View file

@ -0,0 +1,73 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
var du4_lgt = props.globals.getNode("/controls/lighting/DU/du4", 1);
var du4_test = props.globals.initNode("/instrumentation/du/du4-test", 0, "BOOL");
var du4_test_time = props.globals.initNode("/instrumentation/du/du4-test-time", 0, "DOUBLE");
var du4_test_amount = props.globals.initNode("/instrumentation/du/du4-test-amount", 0, "DOUBLE");
var du4_offtime = props.globals.initNode("/instrumentation/du/du4-off-time", 0.0, "DOUBLE");
var canvas_lowerECAM_base =
{
init: func() {
me.canvas = canvas.new({
"name": "lowerECAM",
"size": [1024, 1024],
"view": [1024, 1024],
"mipmapping": 1
});
me.canvas.addPlacement({"node": "lecam.screen"});
me.font_mapper = func(family, weight) {
return "LiberationFonts/LiberationSans-Regular.ttf";
};
me.test = me.canvas.createGroup();
canvas.parsesvg(me.test, "Aircraft/A320-family/Models/Instruments/Common/res/du-test.svg", {"font-mapper": me.font_mapper} );
foreach(var key; me.getKeysTest()) {
me[key] = me.test.getElementById(key);
};
},
getKeysTest: func() {
return ["Test_white","Test_text"];
},
powerTransient: func() {
if (systems.ELEC.Bus.ac2.getValue() >= 110) {
if (du4_offtime.getValue() + 3 < pts.Sim.Time.elapsedSec.getValue()) {
if (pts.Gear.wow[0].getValue()) {
if (!acconfig.getBoolValue() and !du4_test.getBoolValue()) {
du4_test.setValue(1);
du4_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
du4_test_time.setValue(pts.Sim.Time.elapsedSec.getValue());
} else if (acconfig.getBoolValue() and !du4_test.getBoolValue()) {
du4_test.setValue(1);
du4_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
du4_test_time.setValue(pts.Sim.Time.elapsedSec.getValue() - 30);
}
} else {
du4_test.setValue(1);
du4_test_amount.setValue(0);
du4_test_time.setValue(-100);
}
}
} else {
du4_test.setValue(0);
du4_offtime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
},
# Due to weirdness of the parents hash / me reference
# you need to access it using me.Test_white rather than
# me["Test_white"]
updateTest: func(notification) {
if (du4_test_time.getValue() + 1 >= notification.elapsedTime) {
me.Test_white.show();
me.Test_text.hide();
} else {
me.Test_white.hide();
me.Test_text.show();
}
},
};
canvas_lowerECAM_base.init();

View file

@ -0,0 +1,547 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
var canvas_lowerECAMPageBleed =
{
new: func(svg,name) {
var obj = {parents: [canvas_lowerECAMPageBleed,canvas_lowerECAM_base] };
obj.group = obj.canvas.createGroup();
obj.name = name;
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
foreach(var key; obj.getKeys()) {
obj[key] = obj.group.getElementById(key);
};
foreach(var key; obj.getKeysBottom()) {
obj[key] = obj.group.getElementById(key);
};
obj.units = acconfig_weight_kgs.getValue();
# init
obj.update_items = [
props.UpdateManager.FromHashList(["BleedCrossbleedCmd","BleedCrossbleed"], nil, func(val) {
if (val.BleedCrossbleedCmd != val.BleedCrossbleed) {
obj["BLEED-XFEED"].setColor(0.7333,0.3803,0);
obj["BLEED-XFEED-Cross"].setColorFill(0.7333,0.3803,0);
} else {
obj["BLEED-XFEED"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-XFEED-Cross"].setColorFill(0.0509,0.7529,0.2941);
}
if (val.BleedCrossbleedCmd == val.BleedCrossbleed) {
if (val.BleedCrossbleedCmd) {
obj["BLEED-XFEED"].setRotation(0);
} else {
obj["BLEED-XFEED"].setRotation(90 * D2R);
}
} else {
obj["BLEED-XFEED"].setRotation(45 * D2R);
}
if (val.BleedCrossbleed == 1) {
obj["BLEED-xbleedCenter"].show();
obj["BLEED-xbleedRight"].show();
} else {
obj["BLEED-xbleedCenter"].hide();
obj["BLEED-xbleedRight"].hide();
}
}),
props.UpdateManager.FromHashList(["BleedHPValve1","BleedHPValve1Cmd"], nil, func(val) {
if (val.BleedHPValve1Cmd == 1) {
obj["BLEED-HP-Valve-1"].setRotation(90 * D2R);
obj["BLEED-HP-1-connection"].show();
} else {
obj["BLEED-HP-Valve-1"].setRotation(0);
obj["BLEED-HP-1-connection"].hide();
}
if (val.BleedHPValve1Cmd == val.BleedHPValve1) {
obj["BLEED-HP-Valve-1"].setColor(0.0509,0.7529,0.2941);
} else {
obj["BLEED-HP-Valve-1"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["BleedHPValve2","BleedHPValve2Cmd"], nil, func(val) {
if (val.BleedHPValve2Cmd == 1) {
obj["BLEED-HP-Valve-2"].setRotation(90 * D2R);
obj["BLEED-HP-2-connection"].show();
} else {
obj["BLEED-HP-Valve-2"].setRotation(0);
obj["BLEED-HP-2-connection"].hide();
}
if (val.BleedHPValve2Cmd == val.BleedHPValve2) {
obj["BLEED-HP-Valve-2"].setColor(0.0509,0.7529,0.2941);
} else {
obj["BLEED-HP-Valve-2"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["BleedPRVValve1Cmd","BleedPRVValve1"], nil, func(val) {
if (val.BleedPRVValve1 == 0) {
obj["BLEED-ENG-1"].setRotation(0);
} else {
obj["BLEED-ENG-1"].setRotation(90 * D2R);
}
if (val.BleedPRVValve1Cmd == val.BleedPRVValve1) {
obj["BLEED-ENG-1"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-ENG-1-Cross"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["BLEED-ENG-1"].setColor(0.7333,0.3803,0);
obj["BLEED-ENG-1-Cross"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["BleedPRVValve2Cmd","BleedPRVValve2"], nil, func(val) {
if (val.BleedPRVValve2 == 0) {
obj["BLEED-ENG-2"].setRotation(0);
} else {
obj["BLEED-ENG-2"].setRotation(90 * D2R);
}
if (val.BleedPRVValve2Cmd == val.BleedPRVValve2) {
obj["BLEED-ENG-2"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-ENG-2-Cross"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["BLEED-ENG-2"].setColor(0.7333,0.3803,0);
obj["BLEED-ENG-2-Cross"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("gear1Wow", nil, func(val) {
if (val) {
obj["BLEED-GND"].show();
} else {
obj["BLEED-GND"].hide();
}
}),
props.UpdateManager.FromHashValue("IceWingSw", nil, func(val) {
if (val) {
obj["BLEED-Anti-Ice-Left"].show();
obj["BLEED-Anti-Ice-Right"].show();
} else {
obj["BLEED-Anti-Ice-Left"].hide();
obj["BLEED-Anti-Ice-Right"].hide();
}
}),
props.UpdateManager.FromHashValue("N2_actual_1", nil, func(val) {
if (val >= 59) {
obj["BLEED-ENG-1-label"].setColor(0.8078,0.8039,0.8078);
} else {
obj["BLEED-ENG-1-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("N2_actual_2", nil, func(val) {
if (val >= 59) {
obj["BLEED-ENG-2-label"].setColor(0.8078,0.8039,0.8078);
} else {
obj["BLEED-ENG-2-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["BleedBMC1Working","BleedPreCoolerPSI1"], nil, func(val) {
if (val.BleedBMC1Working) {
if (val.BleedPreCoolerPSI1 >= 98) {
obj["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", 98));
} else {
obj["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", math.round(val.BleedPreCoolerPSI1,2)));
}
if (val.BleedPreCoolerPSI1 < 4 or val.BleedPreCoolerPSI1 > 57) {
obj["BLEED-Precooler-1-Inlet-Press"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Precooler-1-Inlet-Press"].setColor(0.0509,0.7529,0.2941);
}
} else {
obj["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", "XX"));
obj["BLEED-Precooler-1-Inlet-Press"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["BleedBMC2Working","BleedPreCoolerPSI2"], nil, func(val) {
if (val.BleedBMC2Working) {
if (val.BleedPreCoolerPSI2 >= 98) {
obj["BLEED-Precooler-2-Inlet-Press"].setText(sprintf("%s", 98));
} else {
obj["BLEED-Precooler-2-Inlet-Press"].setText(sprintf("%s", math.round(val.BleedPreCoolerPSI2,2)));
}
if (val.BleedPreCoolerPSI2 < 4 or val.BleedPreCoolerPSI2 > 57) {
obj["BLEED-Precooler-2-Inlet-Press"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Precooler-2-Inlet-Press"].setColor(0.0509,0.7529,0.2941);
}
} else {
obj["BLEED-Precooler-2-Inlet-Press"].setText(sprintf("%s", "XX"));
obj["BLEED-Precooler-2-Inlet-Press"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["BleedBMC1Working","BleedPreCoolerTemp1","BleedPRVValve1Cmd","BleedPreCoolerOvht1"], nil, func(val) {
if (val.BleedBMC1Working) {
if (val.BleedPreCoolerTemp1 >= 510) {
obj["BLEED-Precooler-1-Outlet-Temp"].setText(sprintf("%s", 510));
} else {
obj["BLEED-Precooler-1-Outlet-Temp"].setText(sprintf("%s", math.round(val.BleedPreCoolerTemp1, 5)));
}
if (val.BleedPRVValve1Cmd and (val.BleedPreCoolerTemp1 < 150 or val.BleedPreCoolerOvht1)) {
obj["BLEED-Precooler-1-Outlet-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Precooler-1-Outlet-Temp"].setColor(0.0509,0.7529,0.2941);
}
} else {
obj["BLEED-Precooler-1-Outlet-Temp"].setText(sprintf("%s", "XX"));
obj["BLEED-Precooler-1-Outlet-Temp"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["BleedBMC2Working","BleedPreCoolerTemp2","BleedPRVValve2Cmd","BleedPreCoolerOvht2"], nil, func(val) {
if (val.BleedBMC2Working) {
if (val.BleedPreCoolerTemp2 >= 510) {
obj["BLEED-Precooler-2-Outlet-Temp"].setText(sprintf("%s", 510));
} else {
obj["BLEED-Precooler-2-Outlet-Temp"].setText(sprintf("%s", math.round(val.BleedPreCoolerTemp2, 5)));
}
if (val.BleedPRVValve2Cmd and (val.BleedPreCoolerTemp2 < 150 or val.BleedPreCoolerOvht2)) {
obj["BLEED-Precooler-2-Outlet-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Precooler-2-Outlet-Temp"].setColor(0.0509,0.7529,0.2941);
}
} else {
obj["BLEED-Precooler-2-Outlet-Temp"].setText(sprintf("%s", "XX"));
obj["BLEED-Precooler-2-Outlet-Temp"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("Pack1Bypass", 1, func(val) {
obj["BLEED-Pack-1-Bypass-needle"].setRotation((val - 50) * D2R);
}),
props.UpdateManager.FromHashValue("Pack2Bypass", 1, func(val) {
obj["BLEED-Pack-2-Bypass-needle"].setRotation((val - 50) * D2R);
}),
props.UpdateManager.FromHashValue("Pack1OutTemp", 0.25, func(val) {
obj["BLEED-Pack-1-Out-Temp"].setText(sprintf("%s", math.round(val, 5)));
if (val > 90) {
obj["BLEED-Pack-1-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-1-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("Pack2OutTemp", 0.25, func(val) {
obj["BLEED-Pack-2-Out-Temp"].setText(sprintf("%s", math.round(val, 5)));
if (val > 90) {
obj["BLEED-Pack-2-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-2-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("Pack1OutletTemp", 0.25, func(val) {
obj["BLEED-Pack-1-Comp-Out-Temp"].setText(sprintf("%s", math.round(val, 5)));
if (val > 230) {
obj["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-1-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("Pack2OutletTemp", 0.25, func(val) {
obj["BLEED-Pack-2-Comp-Out-Temp"].setText(sprintf("%s", math.round(val, 5)));
if (val > 230) {
obj["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-2-Comp-Out-Temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("Pack1FlowOutput", 0.5, func(val) {
obj["BLEED-Pack-1-Packflow-needle"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashValue("Pack2FlowOutput", 0.5, func(val) {
obj["BLEED-Pack-2-Packflow-needle"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashList(["Pack1Switch","flowCtlValve1"], nil, func(val) {
if (val.flowCtlValve1 == 0) {
obj["BLEED-Pack-1-Packflow-needle"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Pack-1-Flow-Valve"].setRotation(90 * D2R);
} else {
obj["BLEED-Pack-1-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941);
obj["BLEED-Pack-1-Flow-Valve"].setRotation(0);
}
if (val.flowCtlValve1 == val.Pack1Switch) {
obj["BLEED-Pack-1-Flow-Valve"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-Pack-1-Flow-Valve-Cross"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["BLEED-Pack-1-Flow-Valve"].setColor(0.7333,0.3803,0);
obj["BLEED-Pack-1-Flow-Valve-Cross"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["Pack2Switch","flowCtlValve2"], nil, func(val) {
if (val.flowCtlValve2 == 0) {
obj["BLEED-Pack-2-Packflow-needle"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Pack-2-Flow-Valve"].setRotation(90 * D2R);
} else {
obj["BLEED-Pack-2-Packflow-needle"].setColorFill(0.0509,0.7529,0.2941);
obj["BLEED-Pack-2-Flow-Valve"].setRotation(0);
}
if (val.flowCtlValve2 == val.Pack2Switch) {
obj["BLEED-Pack-2-Flow-Valve"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-Pack-2-Flow-Valve-Cross"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["BLEED-Pack-2-Flow-Valve"].setColor(0.7333,0.3803,0);
obj["BLEED-Pack-2-Flow-Valve-Cross"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["flowCtlValve1","flowCtlValve2","RamAirValve","gear1Wow"], nil, func(val) {
if (val.RamAirValve == 0) {
obj["BLEED-Ram-Air"].setRotation(90 * D2R);
obj["BLEED-Ram-Air"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-Ram-Air"].setColorFill(0.0509,0.7529,0.2941);
obj["BLEED-Ram-Air-Cross"].setColorFill(0.0509,0.7529,0.2941);
obj["BLEED-Ram-Air-connection"].hide();
} elsif (val.RamAirValve) {
obj["BLEED-Ram-Air"].setRotation(0);
if (val.gear1Wow) {
obj["BLEED-Ram-Air"].setColor(0.7333,0.3803,0);
obj["BLEED-Ram-Air"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Ram-Air-Cross"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Ram-Air-connection"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Ram-Air-connection"].setColorFill(0.7333,0.3803,0);
} else {
obj["BLEED-Ram-Air"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-Ram-Air"].setColorFill(0.0509,0.7529,0.2941);
obj["BLEED-Ram-Air-Cross"].setColorFill(0.0509,0.7529,0.2941);
obj["BLEED-Ram-Air-connection"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-Ram-Air-connection"].setColorFill(0.0509,0.7529,0.2941);
}
obj["BLEED-Ram-Air-connection"].show();
} else {
obj["BLEED-Ram-Air"].setRotation(45 * D2R);
obj["BLEED-Ram-Air"].setColor(0.7333,0.3803,0);
obj["BLEED-Ram-Air"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Ram-Air-Cross"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Ram-Air-connection"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Ram-Air-connection"].setColorFill(0.7333,0.3803,0);
obj["BLEED-Ram-Air-connection"].show();
}
if (val.flowCtlValve1 == 0 and val.flowCtlValve2 == 0) {
if (val.gear1Wow or val.RamAirValve != 1) {
obj["BLEED-cond-1"].setColor(0.7333,0.3803,0);
obj["BLEED-cond-2"].setColor(0.7333,0.3803,0);
obj["BLEED-cond-3"].setColor(0.7333,0.3803,0);
} else {
obj["BLEED-cond-1"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-cond-2"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-cond-3"].setColor(0.0509,0.7529,0.2941);
}
} else {
obj["BLEED-cond-1"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-cond-2"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-cond-3"].setColor(0.0509,0.7529,0.2941);
}
if (val.flowCtlValve1 == 0) {
obj["BLEED-Pack-1-connection"].setColor(0.7333,0.3803,0);
obj["BLEED-Pack-1-connection"].setColorFill(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-1-connection"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-Pack-1-connection"].setColorFill(0.0509,0.7529,0.2941);
}
if (val.flowCtlValve2 == 0) {
obj["BLEED-Pack-2-connection"].setColor(0.7333,0.3803,0);
obj["BLEED-Pack-2-connection"].setColorFill(0.7333,0.3803,0);
} else {
obj["BLEED-Pack-2-connection"].setColor(0.0509,0.7529,0.2941);
obj["BLEED-Pack-2-connection"].setColorFill(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashList(["BleedCrossbleed","apuMaster","apuBleedValvePos","ApuBleedNotOn"], nil, func(val) {
if (val.apuMaster) {
obj["BLEED-APU-LINES"].show();
if (val.apuBleedValvePos == 1) {
obj["BLEED-APU-CIRCLE"].setRotation(0);
obj["BLEED-APU-connectionTop"].show();
obj["BLEED-xbleedLeft"].show();
} else {
obj["BLEED-APU-CIRCLE"].setRotation(90 * D2R);
obj["BLEED-APU-connectionTop"].hide();
if (val.BleedCrossbleed != 1) {
obj["BLEED-xbleedLeft"].hide();
} else {
obj["BLEED-xbleedLeft"].show();
}
}
if (val.ApuBleedNotOn != 1) {
obj["BLEED-APU-CIRCLE"].setColor(0.0509,0.7529,0.2941);
} else {
obj["BLEED-APU-CIRCLE"].setColor(0.7333,0.3803,0);
}
} else {
if (val.BleedCrossbleed != 1) {
obj["BLEED-xbleedLeft"].hide();
} else {
obj["BLEED-xbleedLeft"].show();
}
obj["BLEED-APU-LINES"].hide();
obj["BLEED-APU-connectionTop"].hide();
}
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
];
return obj;
},
getKeysBottom: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
return["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit", "BLEED-XFEED", "BLEED-Ram-Air", "BLEED-Ram-Air-Cross", "BLEED-APU-CIRCLE", "BLEED-HP-Valve-1", "BLEED-XFEED-Cross",
"BLEED-APU-LINES","BLEED-ENG-1", "BLEED-HP-Valve-2", "BLEED-ENG-2", "BLEED-Precooler-1-Inlet-Press", "BLEED-Precooler-1-Outlet-Temp",
"BLEED-Precooler-2-Inlet-Press", "BLEED-Precooler-2-Outlet-Temp", "BLEED-ENG-1-label", "BLEED-ENG-2-label",
"BLEED-GND", "BLEED-Pack-1-Flow-Valve", "BLEED-Pack-2-Flow-Valve", "BLEED-Pack-1-Out-Temp","BLEED-APU-connectionTop",
"BLEED-Pack-1-Comp-Out-Temp", "BLEED-Pack-1-Packflow-needle", "BLEED-Pack-1-Bypass-needle", "BLEED-Pack-2-Out-Temp",
"BLEED-Pack-2-Bypass-needle", "BLEED-Pack-2-Comp-Out-Temp", "BLEED-Pack-2-Packflow-needle", "BLEED-Anti-Ice-Left",
"BLEED-Anti-Ice-Right", "BLEED-HP-2-connection", "BLEED-HP-1-connection", "BLEED-ANTI-ICE-ARROW-LEFT", "BLEED-ANTI-ICE-ARROW-RIGHT",
"BLEED-xbleedLeft","BLEED-xbleedCenter","BLEED-xbleedRight","BLEED-cond-1","BLEED-cond-2","BLEED-cond-3","BLEED-Ram-Air-connection","BLEED-ENG-1-Cross","BLEED-ENG-2-Cross",
"BLEED-Pack-1-Flow-Valve-Cross","BLEED-Pack-2-Flow-Valve-Cross","BLEED-Pack-1-connection","BLEED-Pack-2-connection"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
}
me["GW"].setColor(0.0509,0.7529,0.2941);
} else {
me["GW"].setText(sprintf("%s", "-----"));
me["GW"].setColor(0.0901,0.6039,0.7176);
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setColor(0.7333,0.3803,0);
}
},
update: func(notification) {
me.updatePower();
if (me.test.getVisible() == 1) {
me.updateTest(notification);
}
if (me.group.getVisible() == 0) {
return;
}
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
me.updateBottom(notification);
},
updatePower: func() {
if (me.name == ecam.SystemDisplayController.displayedPage.name) {
if (du4_lgt.getValue() > 0.01 and systems.ELEC.Bus.ac2.getValue() >= 110) {
if (du4_test_time.getValue() + du4_test_amount.getValue() >= pts.Sim.Time.elapsedSec.getValue()) {
me.group.setVisible(0);
me.test.setVisible(1);
} else {
me.group.setVisible(1);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
# don't hide the test group; just let whichever page is active control it
}
},
};
var input = {
ApuBleedNotOn: "/systems/pneumatics/warnings/apu-bleed-not-on",
BleedBMC1Working: "/systems/pneumatics/indicating/bmc1-working",
BleedBMC2Working: "/systems/pneumatics/indicating/bmc2-working",
BleedCrossbleedCmd: "/systems/pneumatics/valves/crossbleed-valve-cmd",
BleedCrossbleed: "/systems/pneumatics/valves/crossbleed-valve",
BleedHPValve1: "/systems/pneumatics/valves/engine-1-hp-valve",
BleedHPValve2: "/systems/pneumatics/valves/engine-2-hp-valve",
BleedHPValve1Cmd: "/systems/pneumatics/valves/engine-1-hp-valve-cmd",
BleedHPValve2Cmd: "/systems/pneumatics/valves/engine-2-hp-valve-cmd",
BleedPRVValve1Cmd: "/controls/pneumatics/switches/bleed-1",
BleedPRVValve2Cmd: "/controls/pneumatics/switches/bleed-2",
BleedPRVValve1: "/systems/pneumatics/valves/engine-1-prv-valve",
BleedPRVValve2: "/systems/pneumatics/valves/engine-2-prv-valve",
BleedPreCoolerPSI1: "/systems/pneumatics/psi/engine-1-psi",
BleedPreCoolerPSI2: "/systems/pneumatics/psi/engine-2-psi",
BleedPreCoolerTemp1: "/systems/pneumatics/precooler/temp-1",
BleedPreCoolerTemp2: "/systems/pneumatics/precooler/temp-2",
BleedPreCoolerOvht1: "/systems/pneumatics/precooler/ovht-1",
BleedPreCoolerOvht2: "/systems/pneumatics/precooler/ovht-2",
Pack1Bypass: "/systems/pneumatics/pack-1-bypass",
Pack2Bypass: "/systems/pneumatics/pack-2-bypass",
Pack1FlowOutput: "/ECAM/Lower/pack-1-flow-output",
Pack2FlowOutput: "/ECAM/Lower/pack-2-flow-output",
Pack1OutTemp: "/systems/air-conditioning/packs/pack-1-output-temp",
Pack2OutTemp: "/systems/air-conditioning/packs/pack-2-output-temp",
Pack1OutletTemp: "/systems/air-conditioning/packs/pack-1-outlet-temp",
Pack2OutletTemp: "/systems/air-conditioning/packs/pack-2-outlet-temp",
Pack1Switch: "/controls/pneumatics/switches/pack-1",
Pack2Switch: "/controls/pneumatics/switches/pack-2",
RamAirValve: "/systems/air-conditioning/valves/ram-air",
IceWingSw: "/controls/ice-protection/wing",
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 System Display", name, input[name]));
}

View file

@ -0,0 +1,209 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
var canvas_lowerECAMPageCond =
{
new: func(svg,name) {
var obj = {parents: [canvas_lowerECAMPageCond,canvas_lowerECAM_base] };
obj.group = obj.canvas.createGroup();
obj.name = name;
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
foreach(var key; obj.getKeys()) {
obj[key] = obj.group.getElementById(key);
};
foreach(var key; obj.getKeysBottom()) {
obj[key] = obj.group.getElementById(key);
};
obj.units = acconfig_weight_kgs.getValue();
# init
obj["CONDFanFwdFault"].hide();
obj["CONDFanAftFault"].hide();
# aft cargo ventilation disabled
obj["CargoCond"].hide();
obj.update_items = [
props.UpdateManager.FromHashValue("condDuctTempCockpit", 0.5, func(val) {
obj["CONDDuctTempCKPT"].setText(sprintf("%2.0f",val));
}),
props.UpdateManager.FromHashValue("condDuctTempAft", 0.5, func(val) {
obj["CONDDuctTempAFT"].setText(sprintf("%2.0f",val));
}),
props.UpdateManager.FromHashValue("condDuctTempFwd", 0.5, func(val) {
obj["CONDDuctTempFWD"].setText(sprintf("%2.0f",val));
}),
props.UpdateManager.FromHashValue("condTempCockpit", 0.5, func(val) {
obj["CONDTempCKPT"].setText(sprintf("%2.0f",val));
}),
props.UpdateManager.FromHashValue("condTempAft", 0.5, func(val) {
obj["CONDTempAFT"].setText(sprintf("%2.0f",val));
}),
props.UpdateManager.FromHashValue("condTempFwd", 0.5, func(val) {
obj["CONDTempFWD"].setText(sprintf("%2.0f",val));
}),
props.UpdateManager.FromHashValue("condTrimCockpit", 0.01, func(val) {
obj["CONDTrimValveCKPT"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashValue("condTrimAft", 0.01, func(val) {
obj["CONDTrimValveAFT"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashValue("condTrimFwd", 0.01, func(val) {
obj["CONDTrimValveFWD"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashList(["condHotAirSwitch","condHotAirValve","condHotAirCmd"], nil, func(val) {
if (!val.condHotAirSwitch or (val.condHotAirCmd == 1 and val.condHotAirValve == 0)) {
obj["CONDHotAirValve"].setRotation(90 * D2R);
obj["CONDHotAirValve"].setColor(0.7333,0.3803,0);
obj["CONDHotAirValveCross"].setColorFill(0.7333,0.3803,0);
} elsif (val.condHotAirCmd == 0 and val.condHotAirValve == 0) {
obj["CONDHotAirValve"].setRotation(90 * D2R);
obj["CONDHotAirValve"].setColor(0.0509,0.7529,0.2941);
obj["CONDHotAirValveCross"].setColorFill(0.0509,0.7529,0.2941);
} elsif (val.condHotAirCmd == 0 and val.condHotAirValve != 0) {
obj["CONDHotAirValve"].setRotation(0);
obj["CONDHotAirValve"].setColor(0.7333,0.3803,0);
obj["CONDHotAirValveCross"].setColorFill(0.7333,0.3803,0);
} else {
obj["CONDHotAirValve"].setRotation(0);
obj["CONDHotAirValve"].setColor(0.0509,0.7529,0.2941);
obj["CONDHotAirValveCross"].setColorFill(0.0509,0.7529,0.2941);
}
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
];
return obj;
},
getKeysBottom: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
return["CargoCond","CONDHotAirValve","CONDFanFwdFault","CONDFanAftFault","CONDTrimValveCKPT","CONDTrimValveAFT","CONDTrimValveFWD","CONDDuctTempCKPT",
"CONDDuctTempAFT","CONDDuctTempFWD","CONDTempCKPT","CONDTempAFT","CONDTempFWD","CONDHotAirValveCross"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
}
me["GW"].setColor(0.0509,0.7529,0.2941);
} else {
me["GW"].setText(sprintf("%s", "-----"));
me["GW"].setColor(0.0901,0.6039,0.7176);
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setColor(0.7333,0.3803,0);
}
},
update: func(notification) {
me.updatePower();
if (me.test.getVisible() == 1) {
me.updateTest(notification);
}
if (me.group.getVisible() == 0) {
return;
}
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
me.updateBottom(notification);
},
updatePower: func() {
if (me.name == ecam.SystemDisplayController.displayedPage.name) {
if (du4_lgt.getValue() > 0.01 and systems.ELEC.Bus.ac2.getValue() >= 110) {
if (du4_test_time.getValue() + du4_test_amount.getValue() >= pts.Sim.Time.elapsedSec.getValue()) {
me.group.setVisible(0);
me.test.setVisible(1);
} else {
me.group.setVisible(1);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
# don't hide the test group; just let whichever page is active control it
}
},
};
var input = {
condDuctTempCockpit: "/systems/air-conditioning/temperatures/cockpit-duct",
condDuctTempAft: "/systems/air-conditioning/temperatures/cabin-aft-duct",
condDuctTempFwd: "/systems/air-conditioning/temperatures/cabin-fwd-duct",
condTempCockpit: "/systems/air-conditioning/temperatures/cockpit-temp",
condTempAft: "/systems/air-conditioning/temperatures/cabin-aft-temp",
condTempFwd: "/systems/air-conditioning/temperatures/cabin-fwd-temp",
condTrimCockpit: "/ECAM/Lower/trim-cockpit-output",
condTrimAft: "/ECAM/Lower/trim-aft-output",
condTrimFwd: "/ECAM/Lower/trim-fwd-output",
condHotAirCmd: "/systems/air-conditioning/valves/hot-air-cmd",
condHotAirSwitch: "/controls/pneumatics/switches/hot-air",
condHotAirValve: "/systems/air-conditioning/valves/hot-air"
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 System Display", name, input[name]));
}

View file

@ -0,0 +1,257 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
var canvas_lowerECAMPageCruise =
{
new: func(svg,name) {
var obj = {parents: [canvas_lowerECAMPageCruise,canvas_lowerECAM_base] };
obj.group = obj.canvas.createGroup();
obj.name = name;
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
foreach(var key; obj.getKeys()) {
obj[key] = obj.group.getElementById(key);
};
foreach(var key; obj.getKeysBottom()) {
obj[key] = obj.group.getElementById(key);
};
obj.units = acconfig_weight_kgs.getValue();
# init
obj.update_items = [
props.UpdateManager.FromHashValue("engOil1", 0.005, func(val) {
if (obj.units) {
obj["Oil1"].setText(sprintf("%2.1f",(0.1 * math.round(val * QT2LTR * 10,5))));
} else {
obj["Oil1"].setText(sprintf("%2.1f",(0.1 * math.round(val * 10,5))));
}
}),
props.UpdateManager.FromHashValue("engOil2", 0.005, func(val) {
if (obj.units) {
obj["Oil2"].setText(sprintf("%2.1f",(0.1 * math.round(val * QT2LTR * 10,5))));
} else {
obj["Oil2"].setText(sprintf("%2.1f",(0.1 * math.round(val * 10,5))));
}
}),
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
if (val) {
obj["Fused-weight-unit"].setText("KG");
obj["OilUnit"].setText("LTR");
# immediately update parameters
obj["Oil1"].setText(sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[0].getValue() * QT2LTR * 10,5))));
obj["Oil2"].setText(sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[1].getValue() * QT2LTR * 10,5))));
obj["FUsed1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue() * LBS2KGS, 10)));
obj["FUsed2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue() * LBS2KGS, 10)));
} else {
obj["Fused-weight-unit"].setText("LBS");
obj["OilUnit"].setText("QT");
obj["Oil1"].setText(sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[0].getValue() * 10,5))));
obj["Oil2"].setText(sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[1].getValue() * 10,5))));
obj["FUsed1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue(), 10)));
obj["FUsed2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue(), 10)));
}
}),
props.UpdateManager.FromHashValue("engFuelUsed1", 1, func(val) {
if (obj.units) {
obj["FUsed1"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
} else {
obj["FUsed1"].setText(sprintf("%s", math.round(val, 10)));
}
}),
props.UpdateManager.FromHashValue("engFuelUsed2", 1, func(val) {
if (obj.units) {
obj["FUsed2"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
} else {
obj["FUsed2"].setText(sprintf("%s", math.round(val, 10)));
}
}),
props.UpdateManager.FromHashList(["engFuelUsed1","engFuelUsed2"], 1, func(val) {
if (obj.units) {
obj["FUsed"].setText(sprintf("%s", math.round((val.engFuelUsed1 + val.engFuelUsed2) * LBS2KGS, 10)));
} else {
obj["FUsed"].setText(sprintf("%s", math.round((val.engFuelUsed1 + val.engFuelUsed2), 10)));
}
}),
props.UpdateManager.FromHashValue("pressDelta", 0.05, func(val) {
if (val > 31.9) {
obj["deltaPSI"].setText(sprintf("%2.1f", 31.9));
} else if (val < -9.9) {
obj["deltaPSI"].setText(sprintf("%2.1f", -9.9));
} else {
obj["deltaPSI"].setText(sprintf("%2.1f", val));
}
if (val < -0.4 or val > 8.5) {
obj["deltaPSI"].setColor(0.7333,0.3803,0);
} else {
obj["deltaPSI"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("pressVS", 25, func(val) {
if (val > 9950) {
obj["CABVS"].setText(sprintf("%4.0f", 9950));
} else if (val < -9950) {
obj["CABVS"].setText(sprintf("%4.0f", -9950));
} else {
obj["CABVS"].setText(sprintf("%-4.0f", math.round(val,50)));
}
if (val >= 25) {
obj["VS-Arrow-UP"].show();
obj["VS-Arrow-DN"].hide();
} elsif (val <= -25) {
obj["VS-Arrow-UP"].hide();
obj["VS-Arrow-DN"].show();
} else {
obj["VS-Arrow-UP"].hide();
obj["VS-Arrow-DN"].hide();
}
}),
props.UpdateManager.FromHashValue("pressAlt", 25, func(val) {
if (val > 32750) {
obj["CABALT"].setText(sprintf("%5.0f", 32750));
} else if (val < -9950) {
obj["CABALT"].setText(sprintf("%5.0f", -9950));
} else {
obj["CABALT"].setText(sprintf("%5.0f", math.round(val,50)));
}
if (val > 9550) {
obj["CABALT"].setColor(1,0,0);
} else {
obj["CABALT"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("condTempCockpit", 0.5, func(val) {
obj["CKPT-TEMP"].setText(sprintf("%2.0f",val));
}),
props.UpdateManager.FromHashValue("condTempAft", 0.5, func(val) {
obj["AFT-TEMP"].setText(sprintf("%2.0f",val));
}),
props.UpdateManager.FromHashValue("condTempFwd", 0.5, func(val) {
obj["FWD-TEMP"].setText(sprintf("%2.0f",val));
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
];
return obj;
},
getKeysBottom: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
return["Oil1","Oil2","OilUnit","FUsed1","FUsed2","FUsed","VIB1N1","VIB1N2","VIB2N1","VIB2N2","deltaPSI","LDGELEV-AUTO","LDGELEV","CABVS","CABALT","VS-Arrow-UP","VS-Arrow-DN","CKPT-TEMP","FWD-TEMP","AFT-TEMP","Fused-weight-unit"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
}
me["GW"].setColor(0.0509,0.7529,0.2941);
} else {
me["GW"].setText(sprintf("%s", "-----"));
me["GW"].setColor(0.0901,0.6039,0.7176);
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setColor(0.7333,0.3803,0);
}
},
update: func(notification) {
me.updatePower();
if (me.test.getVisible() == 1) {
me.updateTest(notification);
}
if (me.group.getVisible() == 0) {
return;
}
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
me.updateBottom(notification);
},
updatePower: func() {
if (me.name == ecam.SystemDisplayController.displayedPage.name) {
if (du4_lgt.getValue() > 0.01 and systems.ELEC.Bus.ac2.getValue() >= 110) {
if (du4_test_time.getValue() + du4_test_amount.getValue() >= pts.Sim.Time.elapsedSec.getValue()) {
me.group.setVisible(0);
me.test.setVisible(1);
} else {
me.group.setVisible(1);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
# don't hide the test group; just let whichever page is active control it
}
},
};
var input = {
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 System Display", name, input[name]));
}

View file

@ -0,0 +1,319 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
var canvas_lowerECAMPageDoor =
{
new: func(svg,name) {
var obj = {parents: [canvas_lowerECAMPageDoor,canvas_lowerECAM_base] };
obj.group = obj.canvas.createGroup();
obj.name = name;
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
foreach(var key; obj.getKeys()) {
obj[key] = obj.group.getElementById(key);
};
foreach(var key; obj.getKeysBottom()) {
obj[key] = obj.group.getElementById(key);
};
obj.units = acconfig_weight_kgs.getValue();
# init
obj["Cabin2LeftSlide"].hide();
obj["Cabin2RightSlide"].hide();
obj["Cabin3LeftSlide"].hide();
obj["Cabin3RightSlide"].hide();
obj["DOOROXY-REGUL-LO-PR"].hide();
obj["AvionicsLine1"].hide();
obj["AvionicsLine2"].hide();
obj["AvionicsLbl1"].hide();
obj["AvionicsLbl2"].hide();
obj["ExitLLine"].hide();
obj["ExitLLbl"].hide();
obj["ExitRLine"].hide();
obj["ExitRLbl"].hide();
obj["Cabin2Left"].hide();
obj["Cabin2LeftLine"].hide();
obj["Cabin2LeftLbl"].hide();
obj["Cabin2Right"].hide();
obj["Cabin2RightLine"].hide();
obj["Cabin2RightLbl"].hide();
obj["Cabin3Left"].hide();
obj["Cabin3LeftLine"].hide();
obj["Cabin3LeftLbl"].hide();
obj["Cabin3Right"].hide();
obj["Cabin3RightLine"].hide();
obj["Cabin3RightLbl"].hide();
obj.update_items = [
props.UpdateManager.FromHashValue("doorL1", nil, func(val) {
if (val > 0) {
obj["Cabin1Left"].show();
obj["Cabin1Left"].setColor(0.7333,0.3803,0);
obj["Cabin1Left"].setColorFill(0.7333,0.3803,0);
obj["Cabin1LeftLbl"].show();
obj["Cabin1LeftLine"].show();
obj["Cabin1LeftSlide"].hide();
} else {
obj["Cabin1Left"].setColor(0.0509,0.7529,0.2941);
obj["Cabin1Left"].setColorFill(0,0,0);
obj["Cabin1LeftLbl"].hide();
obj["Cabin1LeftLine"].hide();
obj["Cabin1LeftSlide"].show();
}
}),
props.UpdateManager.FromHashValue("doorL4", nil, func(val) {
if (val > 0) {
obj["Cabin4Left"].show();
obj["Cabin4Left"].setColor(0.7333,0.3803,0);
obj["Cabin4Left"].setColorFill(0.7333,0.3803,0);
obj["Cabin4LeftLbl"].show();
obj["Cabin4LeftLine"].show();
obj["Cabin4LeftSlide"].hide();
} else {
obj["Cabin4Left"].setColor(0.0509,0.7529,0.2941);
obj["Cabin4Left"].setColorFill(0,0,0);
obj["Cabin4LeftLbl"].hide();
obj["Cabin4LeftLine"].hide();
obj["Cabin4LeftSlide"].show();
}
}),
props.UpdateManager.FromHashValue("doorR1", nil, func(val) {
if (val > 0) {
obj["Cabin1Right"].show();
obj["Cabin1Right"].setColor(0.7333,0.3803,0);
obj["Cabin1Right"].setColorFill(0.7333,0.3803,0);
obj["Cabin1RightLbl"].show();
obj["Cabin1RightLine"].show();
obj["Cabin1RightSlide"].hide();
} else {
obj["Cabin1Right"].setColor(0.0509,0.7529,0.2941);
obj["Cabin1Right"].setColorFill(0,0,0);
obj["Cabin1RightLbl"].hide();
obj["Cabin1RightLine"].hide();
obj["Cabin1RightSlide"].show();
}
}),
props.UpdateManager.FromHashValue("doorR4", nil, func(val) {
if (val > 0) {
obj["Cabin4Right"].show();
obj["Cabin4Right"].setColor(0.7333,0.3803,0);
obj["Cabin4Right"].setColorFill(0.7333,0.3803,0);
obj["Cabin4RightLbl"].show();
obj["Cabin4RightLine"].show();
obj["Cabin4RightSlide"].hide();
} else {
obj["Cabin4Right"].setColor(0.0509,0.7529,0.2941);
obj["Cabin4Right"].setColorFill(0,0,0);
obj["Cabin4RightLbl"].hide();
obj["Cabin4RightLine"].hide();
obj["Cabin4RightSlide"].show();
}
}),
props.UpdateManager.FromHashValue("cargoAft", nil, func(val) {
if (val > 0) {
obj["Cargo2Door"].setColor(0.7333,0.3803,0);
obj["Cargo2Door"].setColorFill(0.7333,0.3803,0);
obj["Cargo2Lbl"].show();
obj["Cargo2Line"].show();
} else {
obj["Cargo2Door"].setColor(0.0509,0.7529,0.2941);
obj["Cargo2Door"].setColorFill(0,0,0);
obj["Cargo2Lbl"].hide();
obj["Cargo2Line"].hide();
}
}),
props.UpdateManager.FromHashValue("cargoBulk", nil, func(val) {
if (val > 0) {
obj["Bulk"].setColor(0.7333,0.3803,0);
obj["Bulk"].setColorFill(0.7333,0.3803,0);
obj["BulkLbl"].show();
obj["BulkLine"].show();
} else {
obj["Bulk"].setColor(0.0509,0.7529,0.2941);
obj["Bulk"].setColorFill(0,0,0);
obj["BulkLbl"].hide();
obj["BulkLine"].hide();
}
}),
props.UpdateManager.FromHashValue("cargoFwd", nil, func(val) {
if (val > 0) {
obj["Cargo1Door"].setColor(0.7333,0.3803,0);
obj["Cargo1Door"].setColorFill(0.7333,0.3803,0);
obj["Cargo1Lbl"].show();
obj["Cargo1Line"].show();
} else {
obj["Cargo1Door"].setColor(0.0509,0.7529,0.2941);
obj["Cargo1Door"].setColorFill(0,0,0);
obj["Cargo1Lbl"].hide();
obj["Cargo1Line"].hide();
}
}),
props.UpdateManager.FromHashValue("oxyPB", nil, func(val) {
if (val) {
obj["DOOROXY-OxyIndicator"].setColor(0.8078,0.8039,0.8078);
obj["DOOROXY-PR"].setColor(0.0509,0.7529,0.2941);
obj["DOOROXY-PR"].setText("1300");
} else {
obj["DOOROXY-OxyIndicator"].setColor(0.7333,0.3803,0);
obj["DOOROXY-PR"].setColor(0.7333,0.3803,0);
obj["DOOROXY-PR"].setText("0");
}
}),
props.UpdateManager.FromHashValue("pressVS", nil, func(val) {
if (val > 9950) {
obj["DOOR-VS"].setText(sprintf("%+4.0f", 9950));
} else if (val < -9950) {
obj["DOOR-VS"].setText(sprintf("%+4.0f", -9950));
} else {
obj["DOOR-VS"].setText(sprintf("%+4.0f", math.round(val,50)));
}
if (abs(val) > 2000) {
obj["DOOR-VS"].setColor(0.7333,0.3803,0);
} else {
obj["DOOR-VS"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("FWCPhase", nil, func(val) {
if (val >= 5 and val <= 7) {
obj["DOOR-VS-Container"].show();
} else {
obj["DOOR-VS-Container"].hide();
}
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
];
return obj;
},
getKeysBottom: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
return["Bulk","BulkLine","BulkLbl","Exit1L","Exit1R","Cabin1Left","Cabin1LeftLbl","Cabin1LeftLine","Cabin1LeftSlide","Cabin1Right","Cabin1RightLbl","Cabin1RightLine","Cabin1RightSlide","Cabin2Left","Cabin2LeftLbl",
"Cabin2LeftLine","Cabin2LeftSlide","Cabin2Right","Cabin2RightLbl","Cabin2RightLine","Cabin2RightSlide","Cabin3Left","Cabin3LeftLbl","Cabin3LeftLine","Cabin3LeftSlide","Cabin3Right","Cabin3RightLbl","Cabin3RightLine","Cabin3RightSlide","AvionicsLine1",
"AvionicsLbl1","AvionicsLine2","AvionicsLbl2","Cargo1Line","Cargo1Lbl","Cargo1Door","Cargo2Line","Cargo2Lbl","Cargo2Door","ExitLSlide","ExitLLine","ExitLLbl","ExitRSlide","ExitRLine","ExitRLbl","Cabin4Left","Cabin4LeftLbl","Cabin4LeftLine",
"Cabin4LeftSlide","Cabin4Right","Cabin4RightLbl","Cabin4RightLine","Cabin4RightSlide","DOOROXY-REGUL-LO-PR","DOOROXY-PR","DOOROXY-OxyIndicator","DOOR-VS","DOOR-VS-Container"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
}
me["GW"].setColor(0.0509,0.7529,0.2941);
} else {
me["GW"].setText(sprintf("%s", "-----"));
me["GW"].setColor(0.0901,0.6039,0.7176);
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setColor(0.7333,0.3803,0);
}
},
update: func(notification) {
me.updatePower();
if (me.test.getVisible() == 1) {
me.updateTest(notification);
}
if (me.group.getVisible() == 0) {
return;
}
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
me.updateBottom(notification);
},
updatePower: func() {
if (me.name == ecam.SystemDisplayController.displayedPage.name) {
if (du4_lgt.getValue() > 0.01 and systems.ELEC.Bus.ac2.getValue() >= 110) {
if (du4_test_time.getValue() + du4_test_amount.getValue() >= pts.Sim.Time.elapsedSec.getValue()) {
me.group.setVisible(0);
me.test.setVisible(1);
} else {
me.group.setVisible(1);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
# don't hide the test group; just let whichever page is active control it
}
},
};
var input = {
doorL1: "/sim/model/door-positions/doorl1/position-norm",
doorL4: "/sim/model/door-positions/doorl4/position-norm",
doorR1: "/sim/model/door-positions/doorr1/position-norm",
doorR4: "/sim/model/door-positions/doorr4/position-norm",
cargoAft: "/sim/model/door-positions/cargoaft/position-norm",
cargoBulk: "/sim/model/door-positions/cargobulk/position-norm",
cargoFwd: "/sim/model/door-positions/cargofwd/position-norm",
oxyPB: "/controls/oxygen/crewOxyPB",
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 System Display", name, input[name]));
}

View file

@ -0,0 +1,839 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
var canvas_lowerECAMPageElec =
{
new: func(svg,name) {
var obj = {parents: [canvas_lowerECAMPageElec,canvas_lowerECAM_base] };
obj.group = obj.canvas.createGroup();
obj.name = name;
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
foreach(var key; obj.getKeys()) {
obj[key] = obj.group.getElementById(key);
};
foreach(var key; obj.getKeysBottom()) {
obj[key] = obj.group.getElementById(key);
};
obj.units = acconfig_weight_kgs.getValue();
# init
obj["IDG1-LOPR"].hide();
obj["IDG2-LOPR"].hide();
obj["Shed-label"].hide();
obj["IDG2-RISE-label"].hide();
obj["IDG2-RISE-Value"].hide();
obj["IDG1-RISE-label"].hide();
obj["IDG1-RISE-Value"].hide();
obj.update_items = [
props.UpdateManager.FromHashValue("apuLoad", 0.1, func(val) {
obj["APUGenLoad"].setText(sprintf("%s", math.round(val)));
if (val < 110) {
obj["APUGenHz"].setColor(0.0509,0.7529,0.2941);
} else {
obj["APUGenHz"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("apuHertz", 0.5, func(val) {
if (val == 0) {
obj["APUGenHz"].setText(sprintf("XX"));
} else {
obj["APUGenHz"].setText(sprintf("%s", math.round(val)));
}
if (val >= 390 and val <= 410) {
obj["APUGenHz"].setColor(0.0509,0.7529,0.2941);
} else {
obj["APUGenHz"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("apuVolt", 0.1, func(val) {
obj["APUGenVolt"].setText(sprintf("%s", math.round(val)));
if (val >= 110 and val <= 120) {
obj["APUGenVolt"].setColor(0.0509,0.7529,0.2941);
} else {
obj["APUGenVolt"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["apuMaster","apuVolt","apuLoad","apuHertz","apuGLC"], nil, func(val) {
if (val.apuMaster == 0) {
obj["APUGentext"].setColor(0.8078,0.8039,0.8078);
} else {
if (val.apuGLC == 0) {
obj["APUGentext"].setColor(0.7333,0.3803,0);
} else if (val.apuVolt > 120 or val.apuVolt < 110 or val.apuHertz > 410 or val.apuHertz < 390 or val.apuLoad >= 100) {
obj["APUGentext"].setColor(0.7333,0.3803,0);
} else {
obj["APUGentext"].setColor(0.8078,0.8039,0.8078);
}
}
}),
props.UpdateManager.FromHashList(["apuMaster","apuGenPB"], nil, func(val) {
if (val.apuMaster == 0) {
obj["APU-content"].hide();
obj["APUGEN-off"].hide();
obj["APU-border"].hide();
} else {
obj["APU-border"].show();
if (val.apuGenPB == 0) {
obj["APU-content"].hide();
obj["APUGEN-off"].show();
} else {
obj["APU-content"].show();
obj["APUGEN-off"].hide();
}
}
}),
props.UpdateManager.FromHashValue("elecIDG1Disc", nil, func(val) {
if (!val) {
obj["IDG1-DISC"].show();
obj["ELEC-IDG-1-label"].setColor(0.7333,0.3803,0);
} else {
obj["IDG1-DISC"].hide();
obj["ELEC-IDG-1-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashValue("elecIDG2Disc", nil, func(val) {
if (!val) {
obj["IDG2-DISC"].show();
obj["ELEC-IDG-2-label"].setColor(0.7333,0.3803,0);
} else {
obj["IDG2-DISC"].hide();
obj["ELEC-IDG-2-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashValue("engine1Running", nil, func(val) {
if (val == 0) {
obj["ELEC-IDG-1-num-label"].setColor(0.7333,0.3803,0);
obj["GEN1-num-label"].setColor(0.7333,0.3803,0);
} else {
obj["ELEC-IDG-1-num-label"].setColor(0.8078,0.8039,0.8078);
obj["GEN1-num-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashValue("engine2Running", nil, func(val) {
if (val == 0) {
obj["ELEC-IDG-2-num-label"].setColor(0.7333,0.3803,0);
obj["GEN2-num-label"].setColor(0.7333,0.3803,0);
} else {
obj["ELEC-IDG-2-num-label"].setColor(0.8078,0.8039,0.8078);
obj["GEN2-num-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashValue("dc1", 0.5, func(val) {
if (val > 25) {
obj["ELEC-DC1-label"].setColor(0.0509,0.7529,0.2941);
} else {
obj["ELEC-DC1-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("dc2", 0.5, func(val) {
if (val > 25) {
obj["ELEC-DC2-label"].setColor(0.0509,0.7529,0.2941);
} else {
obj["ELEC-DC2-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("dcEss", 0.5, func(val) {
if (val > 25) {
obj["ELEC-DCESS-label"].setColor(0.0509,0.7529,0.2941);
} else {
obj["ELEC-DCESS-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("elecAC1", 0.5, func(val) {
if (val >= 110) {
obj["ELEC-AC1-label"].setColor(0.0509,0.7529,0.2941);
obj["AC1-in"].show();
obj["ELEC-Line-AC1-TR1"].show();
} else {
obj["ELEC-AC1-label"].setColor(0.7333,0.3803,0);
obj["AC1-in"].hide();
obj["ELEC-Line-AC1-TR1"].hide();
}
}),
props.UpdateManager.FromHashValue("elecAC2", 0.5, func(val) {
if (val >= 110) {
obj["ELEC-AC2-label"].setColor(0.0509,0.7529,0.2941);
obj["AC2-in"].show();
obj["ELEC-Line-AC2-TR2"].show();
} else {
obj["ELEC-AC2-label"].setColor(0.7333,0.3803,0);
obj["AC2-in"].hide();
obj["ELEC-Line-AC2-TR2"].hide();
}
}),
props.UpdateManager.FromHashValue("elecACEss", 0.5, func(val) {
if (val >= 110) {
obj["ELEC-ACESS-label"].setColor(0.0509,0.7529,0.2941);
} else {
obj["ELEC-ACESS-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("elecACEssShed", 0.5, func(val) {
if (val >= 110) {
obj["ACESS-SHED"].hide();
} else {
obj["ACESS-SHED"].show();
}
}),
props.UpdateManager.FromHashValue("ElecGalleyShed", nil, func(val) {
if (val) {
obj["GalleyShed"].show();
} else {
obj["GalleyShed"].hide();
}
}),
props.UpdateManager.FromHashList(["elecBat1Switch","elecBat2Switch","dcBat"], nil, func(val) {
if (val.elecBat1Switch or val.elecBat2Switch) {
obj["ELEC-DCBAT-label"].setText("DC BAT");
if (val.dcBat > 25) {
obj["ELEC-DCBAT-label"].setColor(0.0509,0.7529,0.2941);
} else {
obj["ELEC-DCBAT-label"].setColor(0.7333,0.3803,0);
}
} else {
obj["ELEC-DCBAT-label"].setText("XX"); # BCL not powered hence no voltage info supplied from BCL
obj["ELEC-DCBAT-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["elecBat1Switch","elecBat1Volt","elecBat1Amp","elecBat1Direction","elecBat1Fault"], nil, func(val) {
if (val.elecBat1Switch == 0) {
obj["BAT1-OFF"].show();
obj["BAT1-content"].hide();
obj["BAT1-discharge"].hide();
obj["BAT1-charge"].hide();
} else {
obj["BAT1-OFF"].hide();
obj["BAT1-content"].show();
obj["Bat1Ampere"].setText(sprintf("%2.0f", val.elecBat1Amp));
obj["Bat1Volt"].setText(sprintf("%2.0f", val.elecBat1Volt));
if (val.elecBat1Volt >= 24.95 and val.elecBat1Volt <= 31.05) {
obj["Bat1Volt"].setColor(0.0509,0.7529,0.2941);
} else {
obj["Bat1Volt"].setColor(0.7333,0.3803,0);
}
if (val.elecBat1Amp > 5 and val.elecBat1Direction == 1) {
obj["Bat1Ampere"].setColor(0.7333,0.3803,0);
} else {
obj["Bat1Ampere"].setColor(0.0509,0.7529,0.2941);
}
if (val.elecBat1Direction == 0) {
obj["BAT1-discharge"].hide();
obj["BAT1-charge"].hide();
} else {
if (val.elecBat1Direction == -1) {
obj["BAT1-charge"].show();
obj["BAT1-discharge"].hide();
} else {
obj["BAT1-discharge"].show();
obj["BAT1-charge"].hide();
}
}
}
if (val.elecBat1Fault or val.elecBat1Volt < 25 or val.elecBat1Volt > 31 or val.elecBat1Amp > 5) {
obj["BAT1-label"].setColor(0.7333,0.3803,0);
} else {
obj["BAT1-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashList(["elecBat2Switch","elecBat2Volt","elecBat2Amp","elecBat2Direction","elecBat2Fault"], nil, func(val) {
if (val.elecBat2Switch == 0) {
obj["BAT2-OFF"].show();
obj["BAT2-content"].hide();
obj["BAT2-discharge"].hide();
obj["BAT2-charge"].hide();
} else {
obj["BAT2-OFF"].hide();
obj["BAT2-content"].show();
obj["Bat2Ampere"].setText(sprintf("%2.0f", val.elecBat2Amp));
obj["Bat2Volt"].setText(sprintf("%2.0f", val.elecBat2Volt));
if (val.elecBat2Volt >= 24.95 and val.elecBat2Volt <= 31.05) {
obj["Bat2Volt"].setColor(0.0509,0.7529,0.2941);
} else {
obj["Bat2Volt"].setColor(0.7333,0.3803,0);
}
if (val.elecBat2Amp > 5 and val.elecBat2Direction == 1) {
obj["Bat2Ampere"].setColor(0.7333,0.3803,0);
} else {
obj["Bat2Ampere"].setColor(0.0509,0.7529,0.2941);
}
if (val.elecBat2Direction == 0) {
obj["BAT2-discharge"].hide();
obj["BAT2-charge"].hide();
} else {
if (val.elecBat2Direction == -1) {
obj["BAT2-charge"].show();
obj["BAT2-discharge"].hide();
} else {
obj["BAT2-discharge"].show();
obj["BAT2-charge"].hide();
}
}
}
if (val.elecBat2Fault or val.elecBat2Volt < 25 or val.elecBat2Volt > 31 or val.elecBat2Amp > 5) {
obj["BAT2-label"].setColor(0.7333,0.3803,0);
} else {
obj["BAT2-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashList(["elecTR1Amp","elecTR1Volt"], nil, func(val) {
obj["TR1Volt"].setText(sprintf("%s", math.round(val.elecTR1Volt)));
obj["TR1Ampere"].setText(sprintf("%s", math.round(val.elecTR1Amp)));
if (val.elecTR1Volt < 25 or val.elecTR1Volt > 31 or val.elecTR1Amp < 5) {
obj["TR1-label"].setColor(0.7333,0.3803,0);
} else {
obj["TR1-label"].setColor(0.8078,0.8039,0.8078);
}
if (val.elecTR1Volt < 25 or val.elecTR1Volt > 31) {
obj["TR1Volt"].setColor(0.7333,0.3803,0);
} else {
obj["TR1Volt"].setColor(0.0509,0.7529,0.2941);
}
if (val.elecTR1Amp < 5) {
obj["TR1Ampere"].setColor(0.7333,0.3803,0);
} else {
obj["TR1Ampere"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashList(["elecTR2Amp","elecTR2Volt"], nil, func(val) {
obj["TR2Volt"].setText(sprintf("%s", math.round(val.elecTR2Volt)));
obj["TR2Ampere"].setText(sprintf("%s", math.round(val.elecTR2Amp)));
if (val.elecTR2Volt < 25 or val.elecTR2Volt > 31 or val.elecTR2Amp < 5) {
obj["TR2-label"].setColor(0.7333,0.3803,0);
} else {
obj["TR2-label"].setColor(0.8078,0.8039,0.8078);
}
if (val.elecTR2Volt < 25 or val.elecTR2Volt > 31) {
obj["TR2Volt"].setColor(0.7333,0.3803,0);
} else {
obj["TR2Volt"].setColor(0.0509,0.7529,0.2941);
}
if (val.elecTR2Amp < 5) {
obj["TR2Ampere"].setColor(0.7333,0.3803,0);
} else {
obj["TR2Ampere"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashList(["elecExtHertz","elecExtVolt","elecGroundCart"], nil, func(val) {
if (val.elecGroundCart == 0) {
obj["EXTPWR-group"].hide();
} else {
obj["EXTPWR-group"].show();
obj["ExtVolt"].setText(sprintf("%s", math.round(val.elecExtVolt)));
obj["ExtHz"].setText(sprintf("%s", math.round(val.elecExtHertz)));
if (val.elecExtHertz > 410 or val.elecExtHertz < 390 or val.elecExtVolt > 120 or val.elecExtVolt < 110) {
obj["EXTPWR-label"].setColor(0.7333,0.3803,0);
} else {
obj["EXTPWR-label"].setColor(0.0509,0.7529,0.2941);
}
if (val.elecExtHertz > 410 or val.elecExtHertz < 390) {
obj["ExtHz"].setColor(0.7333,0.3803,0);
} else {
obj["ExtHz"].setColor(0.0509,0.7529,0.2941);
}
if (val.elecExtVolt > 120 or val.elecExtVolt < 110) {
obj["ExtVolt"].setColor(0.7333,0.3803,0);
} else {
obj["ExtVolt"].setColor(0.0509,0.7529,0.2941);
}
}
}),
props.UpdateManager.FromHashValue("elecDCTie1", nil, func(val) {
if (val) {
obj["ELEC-Line-DC1-DCESS_DCBAT"].show();
} else {
obj["ELEC-Line-DC1-DCESS_DCBAT"].hide();
}
}),
props.UpdateManager.FromHashValue("elecDCTie2", nil, func(val) {
if (val) {
obj["ELEC-Line-DC2-DCESS_DCBAT"].show();
obj["ELEC-Line-DC2-DCBAT"].show();
} else {
obj["ELEC-Line-DC2-DCESS_DCBAT"].hide();
obj["ELEC-Line-DC2-DCBAT"].hide();
}
}),
props.UpdateManager.FromHashList(["elecDcEssFeedBat","elecDCTie1"], nil, func(val) {
if (val.elecDcEssFeedBat or val.elecDCTie1) {
obj["ELEC-Line-DC1-DCBAT"].show();
} else {
obj["ELEC-Line-DC1-DCBAT"].hide();
}
}),
props.UpdateManager.FromHashValue("elecDcEssFeedBat", nil, func(val) {
if (val) {
obj["ELEC-Line-DC1-DCESS"].show();
} else {
obj["ELEC-Line-DC1-DCESS"].hide();
}
}),
props.UpdateManager.FromHashValue("elecTrEssContact", nil, func(val) {
if (val) {
obj["ELEC-Line-ESSTR-DCESS"].show();
} else {
obj["ELEC-Line-ESSTR-DCESS"].hide();
}
}),
props.UpdateManager.FromHashValue("elecAcEssEmerGenFeed", nil, func(val) {
if (val) {
obj["EMERGEN-out"].show();
obj["ELEC-Line-Emergen-ESSTR"].show();
} else {
obj["EMERGEN-out"].hide();
obj["ELEC-Line-Emergen-ESSTR"].hide();
}
}),
props.UpdateManager.FromHashList(["elecTREssAmp","elecTREssVolt","elecTrEssContact"], nil, func(val) {
if (val.elecTrEssContact) {
obj["ESSTR-group"].show();
obj["ESSTR-Volt"].setText(sprintf("%s", math.round(val.elecTREssVolt)));
obj["ESSTR-Ampere"].setText(sprintf("%s", math.round(val.elecTREssAmp)));
if (val.elecTREssVolt < 25 or val.elecTREssVolt > 31 or val.elecTREssAmp < 5) {
obj["ESSTR"].setColor(0.7333,0.3803,0);
} else {
obj["ESSTR"].setColor(0.8078,0.8039,0.8078);
}
if (val.elecTREssVolt < 25 or val.elecTREssVolt > 31) {
obj["ESSTR-Volt"].setColor(0.7333,0.3803,0);
} else {
obj["ESSTR-Volt"].setColor(0.0509,0.7529,0.2941);
}
if (val.elecTREssAmp < 5) {
obj["ESSTR-Ampere"].setColor(0.7333,0.3803,0);
} else {
obj["ESSTR-Ampere"].setColor(0.0509,0.7529,0.2941);
}
} else {
obj["ESSTR-group"].hide();
}
}),
props.UpdateManager.FromHashList(["elecEmerGenHertz","elecEmerGenVolts","elecEmerGenVoltsRelay"], nil, func(val) {
if (val.elecEmerGenVolts == 0) {
obj["EMERGEN-group"].hide();
obj["ELEC-Line-Emergen-ESSTR"].hide();
obj["ELEC-Line-Emergen-ESSTR-off"].show();
obj["EMERGEN-Label-off"].show();
} else {
obj["EMERGEN-group"].show();
obj["ELEC-Line-Emergen-ESSTR"].show();
obj["ELEC-Line-Emergen-ESSTR-off"].hide();
obj["EMERGEN-Label-off"].hide();
obj["EmergenVolt"].setText(sprintf("%s", math.round(val.elecEmerGenVoltsRelay)));
obj["EmergenHz"].setText(sprintf("%s", math.round(val.elecEmerGenHertz)));
if (val.elecEmerGenVoltsRelay > 120 or val.elecEmerGenVoltsRelay < 110 or val.elecEmerGenHertz > 410 or val.elecEmerGenHertz < 390) {
obj["Emergen-Label"].setColor(0.7333,0.3803,0);
} else {
obj["Emergen-Label"].setColor(0.8078,0.8039,0.8078);
}
if (val.elecEmerGenVoltsRelay > 120 or val.elecEmerGenVoltsRelay < 110) {
obj["EmergenVolt"].setColor(0.7333,0.3803,0);
} else {
obj["EmergenVolt"].setColor(0.0509,0.7529,0.2941);
}
if (val.elecEmerGenHertz > 410 or val.elecEmerGenHertz < 390) {
obj["EmergenHz"].setColor(0.7333,0.3803,0);
} else {
obj["EmergenHz"].setColor(0.0509,0.7529,0.2941);
}
}
}),
props.UpdateManager.FromHashList(["elecGen1Switch","elecGen1Hertz","elecGen1Volt","engine1Running","elecGen1Relay"], nil, func(val) {
if (val.elecGen1Switch == 0) {
obj["GEN1-content"].hide();
obj["GEN1-off"].show();
if (val.elecGen1Relay) {
obj["GEN1-label"].setColor(0.7333,0.3803,0);
} else {
obj["GEN1-label"].setColor(0.8078,0.8039,0.8078);
}
} else {
obj["GEN1-content"].show();
obj["GEN1-off"].hide();
obj["Gen1Volt"].setText(sprintf("%s", math.round(val.elecGen1Volt)));
if (val.elecGen1Hertz == 0) {
obj["Gen1Hz"].setText(sprintf("XX"));
} else {
obj["Gen1Hz"].setText(sprintf("%s", math.round(val.elecGen1Hertz)));
}
if (val.elecGen1Volt > 120 or val.elecGen1Volt < 110 or val.elecGen1Hertz > 410 or val.elecGen1Hertz < 390) {
obj["GEN1-label"].setColor(0.7333,0.3803,0);
} else {
obj["GEN1-label"].setColor(0.8078,0.8039,0.8078);
}
if (val.elecGen1Volt > 120 or val.elecGen1Volt < 110) {
obj["Gen1Volt"].setColor(0.7333,0.3803,0);
} else {
obj["Gen1Volt"].setColor(0.0509,0.7529,0.2941);
}
if (val.elecGen1Hertz > 410 or val.elecGen1Hertz < 390) {
obj["Gen1Hz"].setColor(0.7333,0.3803,0);
} else {
obj["Gen1Hz"].setColor(0.0509,0.7529,0.2941);
}
}
}),
props.UpdateManager.FromHashList(["elecGen2Switch","elecGen2Hertz","elecGen2Volt","engine1Running","elecGen2Relay"], nil, func(val) {
if (val.elecGen2Switch == 0) {
obj["GEN2-content"].hide();
obj["GEN2-off"].show();
if (val.elecGen2Relay) {
obj["GEN2-label"].setColor(0.7333,0.3803,0);
} else {
obj["GEN2-label"].setColor(0.8078,0.8039,0.8078);
}
} else {
obj["GEN2-content"].show();
obj["GEN2-off"].hide();
obj["Gen2Volt"].setText(sprintf("%s", math.round(val.elecGen2Volt)));
if (val.elecGen2Hertz == 0) {
obj["Gen2Hz"].setText(sprintf("XX"));
} else {
obj["Gen2Hz"].setText(sprintf("%s", math.round(val.elecGen2Hertz)));
}
if (val.elecGen2Volt > 120 or val.elecGen2Volt < 110 or val.elecGen2Hertz > 410 or val.elecGen2Hertz < 390) {
obj["GEN2-label"].setColor(0.7333,0.3803,0);
} else {
obj["GEN2-label"].setColor(0.8078,0.8039,0.8078);
}
if (val.elecGen2Volt > 120 or val.elecGen2Volt < 110) {
obj["Gen2Volt"].setColor(0.7333,0.3803,0);
} else {
obj["Gen2Volt"].setColor(0.0509,0.7529,0.2941);
}
if (val.elecGen2Hertz > 410 or val.elecGen2Hertz < 390) {
obj["Gen2Hz"].setColor(0.7333,0.3803,0);
} else {
obj["Gen2Hz"].setColor(0.0509,0.7529,0.2941);
}
}
}),
props.UpdateManager.FromHashList(["elecTR1Contact","elecAC1"], nil, func(val) {
if (val.elecTR1Contact) {
if (val.elecAC1 < 110) {
obj["ELEC-Line-AC1-TR1"].setColorFill(0.7333,0.3803,0);
} else {
obj["ELEC-Line-AC1-TR1"].setColorFill(0.0509,0.7529,0.2941);
}
obj["ELEC-Line-TR1-DC1"].show();
} else {
obj["ELEC-Line-TR1-DC1"].hide();
}
}),
props.UpdateManager.FromHashList(["elecTR2Contact","elecAC2"], nil, func(val) {
if (val.elecTR2Contact) {
if (val.elecAC2 < 110) {
obj["ELEC-Line-AC2-TR2"].setColorFill(0.7333,0.3803,0);
} else {
obj["ELEC-Line-AC2-TR2"].setColorFill(0.0509,0.7529,0.2941);
}
obj["ELEC-Line-TR2-DC2"].show();
} else {
obj["ELEC-Line-TR2-DC2"].hide();
}
}),
props.UpdateManager.FromHashList(["elecAcEssFeed1","elecAcEssFeed2","elecAC1","elecAC2"], nil, func(val) {
if (val.elecAcEssFeed1) {
if (val.elecAC1 >= 110) {
obj["ELEC-Line-AC1-ACESS"].show();
} else {
obj["ELEC-Line-AC1-ACESS"].hide();
}
obj["ELEC-Line-AC2-ACESS"].hide();
} elsif (val.elecAcEssFeed2) {
obj["ELEC-Line-AC1-ACESS"].hide();
if (val.elecAC2 >= 110) {
obj["ELEC-Line-AC2-ACESS"].show();
} else {
obj["ELEC-Line-AC2-ACESS"].hide();
}
} else {
obj["ELEC-Line-AC1-ACESS"].hide();
obj["ELEC-Line-AC2-ACESS"].hide();
}
}),
props.UpdateManager.FromHashList(["elecGen1Volt","elecGen1GLC"], nil, func(val) {
if (val.elecGen1Volt >= 110 and val.elecGen1GLC) {
obj["ELEC-Line-GEN1-AC1"].show();
} else {
obj["ELEC-Line-GEN1-AC1"].hide();
}
}),
props.UpdateManager.FromHashList(["elecGen2Volt","elecGen2GLC"], nil, func(val) {
if (val.elecGen2Volt >= 110 and val.elecGen2GLC) {
obj["ELEC-Line-GEN1-AC1"].show();
} else {
obj["ELEC-Line-GEN1-AC1"].hide();
}
}),
props.UpdateManager.FromHashList(["elecAcTie1","elecAcTie2","apuGLC","elecExtEPC","elecGen1GLC","elecGen2GLC"], nil, func(val) {
if (val.apuGLC and (val.elecAcTie1 or val.elecAcTie2)) {
obj["APU-out"].show();
} else {
obj["APU-out"].hide();
}
if (val.elecExtEPC and (val.elecAcTie1 or val.elecAcTie2)) {
obj["EXT-out"].show();
} else {
obj["EXT-out"].hide();
}
if (val.elecAcTie1 and val.elecAcTie2) {
obj["ELEC-Line-APU-AC1"].show();
obj["ELEC-Line-APU-EXT"].show();
obj["ELEC-Line-EXT-AC2"].show();
} else {
if (val.elecAcTie1) {
obj["ELEC-Line-APU-AC1"].show();
} else {
obj["ELEC-Line-APU-AC1"].hide();
}
if ((val.elecAcTie2 and val.apuGLC and !val.elecGen2GLC) or (val.elecAcTie1 and val.elecExtEPC and !val.elecGen1GLC)) {
obj["ELEC-Line-APU-EXT"].show();
} else {
obj["ELEC-Line-APU-EXT"].hide();
}
if (val.elecAcTie2) {
obj["ELEC-Line-EXT-AC2"].show();
} else {
obj["ELEC-Line-EXT-AC2"].hide();
}
}
}),
props.UpdateManager.FromHashList(["elecACEss","ELEC-Line-ACESS-TRESS","elecTR1Contact","elecTR2Contact"], nil, func(val) {
if (val.elecACEss >= 110 and !val.elecAcEssEmerGenFeed and (!val.elecTR1Contact or !val.elecTR2Contact)) {
obj["ELEC-Line-ACESS-TRESS"].show();
} else {
obj["ELEC-Line-ACESS-TRESS"].hide();
}
}),
props.UpdateManager.FromHashList(["elec15XE2","statInvVolts","statInvHertz"], nil, func(val) {
if (val.elec15XE2) {
obj["STATINV-group"].show();
obj["StatVolt"].setText(sprintf("%s",val.statInvVolts));
obj["StatHertz"].setText(sprintf("%s",val.statInvHertz));
} else {
obj["STATINV-group"].hide();
}
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
];
return obj;
},
getKeysBottom: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit","BAT1-label","Bat1Volt","Bat1Ampere","BAT2-label","Bat2Volt","Bat2Ampere","BAT1-charge","BAT1-discharge","BAT2-charge","BAT2-discharge","ELEC-Line-DC1-DCBAT","ELEC-Line-DC1-DCESS","ELEC-Line-DC2-DCBAT",
"ELEC-Line-DC1-DCESS_DCBAT","ELEC-Line-DC2-DCESS_DCBAT","ELEC-Line-TR1-DC1","ELEC-Line-TR2-DC2","Shed-label","ELEC-Line-ESSTR-DCESS","TR1-label","TR1Volt","TR1Ampere","TR2-label","TR2Volt","TR2Ampere","EMERGEN-group","EmergenVolt","EmergenHz",
"ELEC-Line-Emergen-ESSTR","EMERGEN-Label-off","Emergen-Label","EMERGEN-out","ELEC-Line-ACESS-TRESS","ELEC-Line-AC1-TR1","ELEC-Line-AC2-TR2","ELEC-Line-AC1-ACESS","ELEC-Line-AC2-ACESS","ACESS-SHED","ACESS","AC1-in","AC2-in","ELEC-Line-GEN1-AC1","ELEC-Line-GEN2-AC2",
"ELEC-Line-APU-AC1","ELEC-Line-APU-EXT","ELEC-Line-EXT-AC2","APU-out","EXT-out","EXTPWR-group","ExtVolt","ExtHz","APU-content","APU-border","APUGentext","APUGenLoad","APUGenVolt","APUGenHz","APUGEN-off","GEN1-label","Gen1Load","Gen1Volt","Gen1Hz",
"GEN2-label","Gen2Load","GEN2-off","Gen2Volt","Gen2Hz","ELEC-IDG-1-label","ELEC-IDG-1-num-label","ELEC-IDG-1-Temp","IDG1-LOPR","IDG1-DISC","IDG1-RISE-Value","IDG1-RISE-label","GalleyShed","ELEC-IDG-2-Temp","ELEC-IDG-2-label","ELEC-IDG-2-num-label","IDG2-RISE-label","IDG2-RISE-Value","IDG2-LOPR",
"IDG2-DISC","ESSTR-group","ESSTR","ESSTR-Volt","ESSTR-Ampere","BAT1-content","BAT2-content","BAT1-OFF","BAT2-OFF","GEN1-content","GEN2-content","GEN-1-num-label","GEN-2-num-label","GEN1-off","GEN2-off","GEN1-num-label","GEN2-num-label","EXTPWR-label",
"ELEC-ACESS-SHED-label","ELEC-DCBAT-label","ELEC-DCESS-label","ELEC-DC2-label","ELEC-DC1-label","ELEC-AC1-label","ELEC-AC2-label","ELEC-ACESS-label","ELEC-Line-ESSTR-DCESS-off","ELEC-Line-Emergen-ESSTR-off","STATINV-group","StatVolt","StatHz"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
}
me["GW"].setColor(0.0509,0.7529,0.2941);
} else {
me["GW"].setText(sprintf("%s", "-----"));
me["GW"].setColor(0.0901,0.6039,0.7176);
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setColor(0.7333,0.3803,0);
}
},
update: func(notification) {
me.updatePower();
if (me.test.getVisible() == 1) {
me.updateTest(notification);
}
if (me.group.getVisible() == 0) {
return;
}
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
me.updateBottom(notification);
},
updatePower: func() {
if (me.name == ecam.SystemDisplayController.displayedPage.name) {
if (du4_lgt.getValue() > 0.01 and systems.ELEC.Bus.ac2.getValue() >= 110) {
if (du4_test_time.getValue() + du4_test_amount.getValue() >= pts.Sim.Time.elapsedSec.getValue()) {
me.group.setVisible(0);
me.test.setVisible(1);
} else {
me.group.setVisible(1);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
# don't hide the test group; just let whichever page is active control it
}
},
};
var input = {
elecAcEssFeed1: "/systems/electrical/relay/ac-ess-feed-1/contact-pos",
elecAcEssFeed2: "/systems/electrical/relay/ac-ess-feed-2/contact-pos",
elecBat1Amp: "/systems/electrical/sources/bat-1/amps",
elecBat2Amp: "/systems/electrical/sources/bat-2/amps",
elecBat1Direction: "/systems/electrical/sources/bat-1/direction",
elecBat2Direction: "/systems/electrical/sources/bat-2/direction",
elecBat1Fault: "/systems/electrical/light/bat-1-fault",
elecBat2Fault: "/systems/electrical/light/bat-2-fault",
elecBat1Volt: "/systems/electrical/sources/bat-1/volt",
elecBat2Volt: "/systems/electrical/sources/bat-2/volt",
elecBat1Switch: "/controls/electrical/switches/bat-1",
elecBat2Switch: "/controls/electrical/switches/bat-2",
elecTR1Amp: "/systems/electrical/relay/tr-contactor-1/output-amp",
elecTR2Amp: "/systems/electrical/relay/tr-contactor-2/output-amp",
elecTR1Volt: "/systems/electrical/relay/tr-contactor-1/output",
elecTR2Volt: "/systems/electrical/relay/tr-contactor-2/output",
elecTR1Contact: "/systems/electrical/relay/tr-contactor-1/contact-pos",
elecTR2Contact: "/systems/electrical/relay/tr-contactor-2/contact-pos",
elecTREssAmp: "/systems/electrical/relay/dc-ess-feed-tr/output-amp",
elecTrEssContact: "/systems/electrical/relay/dc-ess-feed-tr/contact-pos",
elecTREssVolt: "/systems/electrical/relay/dc-ess-feed-tr/output",
elecIDG1Disc: "/controls/electrical/switches/idg-1-disc",
elecIDG2Disc: "/controls/electrical/switches/idg-2-disc",
elecGroundCart: "/controls/electrical/ground-cart",
elecExtHertz: "/systems/electrical/sources/ext/output-hertz",
elecExtVolt: "/systems/electrical/sources/ext/output-volt",
elecDCTie1: "/systems/electrical/relay/dc-bus-tie-dc-1/contact-pos",
elecDCTie2: "/systems/electrical/relay/dc-bus-tie-dc-2/contact-pos",
elecDcEssFeedBat: "/systems/electrical/relay/dc-ess-feed-bat/contact-pos",
elecAcEssEmerGenFeed: "/systems/electrical/relay/ac-ess-feed-emer-gen/contact-pos",
elecEmerGenVolts: "/systems/electrical/sources/emer-gen/output-volt",
elecEmerGenVoltsRelay: "/systems/electrical/relay/emer-glc/output",
elecEmerGenHertz: "/systems/electrical/sources/emer-gen/output-hertz",
elecGen1Switch: "/controls/electrical/switches/gen-1",
elecGen1Hertz: "/systems/electrical/sources/idg-1/output-hertz",
elecGen1Volt: "/systems/electrical/sources/idg-1/output-volt",
elecGen1Relay: "/systems/electrical/sources/idg-1/gcr-relay",
elecGen1GLC: "/systems/electrical/relay/gen-1-glc/contact-pos",
elecGen2Switch: "/controls/electrical/switches/gen-2",
elecGen2Hertz: "/systems/electrical/sources/idg-2/output-hertz",
elecGen2Volt: "/systems/electrical/sources/idg-2/output-volt",
elecGen2Relay: "/systems/electrical/sources/idg-2/gcr-relay",
elecGen2GLC: "/systems/electrical/relay/gen-2-glc/contact-pos",
elecAcTie1: "/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos",
elecAcTie2: "/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos",
elecExtEPC: "/systems/electrical/relay/ext-epc/contact-pos",
elec15XE2: "/systems/electrical/relay/relay-15XE2/contact-pos",
statInvVolts: "/systems/electrical/sources/si-1/output-volt",
statInvHertz: "/systems/electrical/sources/si-1/output-hertz",
ElecGalleyShed: "/systems/electrical/some-electric-thingie/galley-shed",
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 System Display", name, input[name]));
}

View file

@ -0,0 +1,258 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
var fuel_used_lbs1 = props.globals.getNode("/systems/fuel/fuel-used-1", 1);
var fuel_used_lbs2 = props.globals.getNode("/systems/fuel/fuel-used-2", 1);
var QT2LTR = 0.946353;
var canvas_lowerECAMPageEng =
{
new: func(svg,name) {
var obj = {parents: [canvas_lowerECAMPageEng,canvas_lowerECAM_base] };
obj.group = obj.canvas.createGroup();
obj.name = name;
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
foreach(var key; obj.getKeys()) {
obj[key] = obj.group.getElementById(key);
};
foreach(var key; obj.getKeysBottom()) {
obj[key] = obj.group.getElementById(key);
};
obj.units = acconfig_weight_kgs.getValue();
# init
obj["FUEL-clog-1"].hide();
obj["FUEL-clog-2"].hide();
obj["OIL-clog-1"].hide();
obj["OIL-clog-2"].hide();
obj.quantity = [nil, nil];
obj.update_items = [
props.UpdateManager.FromHashValue("engOilQt1", 0.005, func(val) {
if (obj.units) {
obj.quantity[0] = sprintf("%2.1f",(0.1 * math.round(val * QT2LTR * 10,5)));
obj["OilQT1"].setText(sprintf("%s", left(obj.quantity[0], (size(obj.quantity[0]) == 4 ? 2 : 1))));
obj["OilQT1-decimal"].setText(sprintf("%s", right(obj.quantity[0],1)));
obj["OilQT1-needle"].setRotation(((val * QT2LTR) + 90) * D2R);
} else {
obj.quantity[0] = sprintf("%2.1f",(0.1 * math.round(val * 10,5)));
obj["OilQT1"].setText(sprintf("%s", left(obj.quantity[0], (size(obj.quantity[0]) == 4 ? 2 : 1))));
obj["OilQT1-decimal"].setText(sprintf("%s", right(obj.quantity[0],1)));
obj["OilQT1-needle"].setRotation((val + 90) * D2R);
}
}),
props.UpdateManager.FromHashValue("engOilQt2", 0.005, func(val) {
if (obj.units) {
obj.quantity[1] = sprintf("%2.1f",(0.1 * math.round(val * QT2LTR * 10,5)));
obj["OilQT2"].setText(sprintf("%s", left(obj.quantity[1], (size(obj.quantity[1]) == 4 ? 2 : 1))));
obj["OilQT2-decimal"].setText(sprintf("%s", right(obj.quantity[1],1)));
obj["OilQT2-needle"].setRotation(((val * QT2LTR) + 90) * D2R);
} else {
obj.quantity[1] = sprintf("%2.1f",(0.1 * math.round(val * 10,5)));
obj["OilQT2"].setText(sprintf("%s", left(obj.quantity[1], (size(obj.quantity[1]) == 4 ? 2 : 1))));
obj["OilQT2-decimal"].setText(sprintf("%s", right(obj.quantity[1],1)));
obj["OilQT2-needle"].setRotation((val + 90) * D2R);
}
}),
props.UpdateManager.FromHashValue("engOilPsi1", 0.25, func(val) {
if (val >= 13) {
obj["OilPSI1"].setColor(0.0509,0.7529,0.2941);
obj["OilPSI1-needle"].setColor(0.0509,0.7529,0.2941);
} else {
obj["OilPSI1"].setColor(1,0,0);
obj["OilPSI1-needle"].setColor(1,0,0);
}
obj["OilPSI1"].setText(sprintf("%s", math.round(val)));
obj["OilPSI1-needle"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("engOilPsi2", 0.25, func(val) {
if (val >= 13) {
obj["OilPSI2"].setColor(0.0509,0.7529,0.2941);
obj["OilPSI2-needle"].setColor(0.0509,0.7529,0.2941);
} else {
obj["OilPSI2"].setColor(1,0,0);
obj["OilPSI2-needle"].setColor(1,0,0);
}
obj["OilPSI2"].setText(sprintf("%s", math.round(val)));
obj["OilPSI2-needle"].setRotation((val + 90) * D2R);
}),
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
if (val) {
obj["Fused-weight-unit"].setText("KG");
obj["Fused-oil-unit"].setText("LTR");
# immediately update parameters
obj.quantity[0] = sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[0].getValue() * QT2LTR * 10,5)));
obj["OilQT1"].setText(sprintf("%s", left(obj.quantity[0], (size(obj.quantity[0]) == 4 ? 2 : 1))));
obj["OilQT1-decimal"].setText(sprintf("%s", right(obj.quantity[0],1)));
obj["OilQT1-needle"].setRotation(((pts.Engines.Engine.oilQt[0].getValue() * QT2LTR) + 90) * D2R);
obj.quantity[1] = sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[1].getValue() * QT2LTR * 10,5)));
obj["OilQT2"].setText(sprintf("%s", left(obj.quantity[1], (size(obj.quantity[1]) == 4 ? 2 : 1))));
obj["OilQT2-decimal"].setText(sprintf("%s", right(obj.quantity[1],1)));
obj["OilQT2-needle"].setRotation(((pts.Engines.Engine.oilQt[1].getValue() * QT2LTR) + 90) * D2R);
obj["FUEL-used-1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue() * LBS2KGS, 10)));
obj["FUEL-used-2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue() * LBS2KGS, 10)));
} else {
obj["Fused-weight-unit"].setText("LBS");
obj["Fused-oil-unit"].setText("QT");
obj.quantity[0] = sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[0].getValue() * 10,5)));
obj["OilQT1"].setText(sprintf("%s", left(obj.quantity[0], (size(obj.quantity[0]) == 4 ? 2 : 1))));
obj["OilQT1-decimal"].setText(sprintf("%s", right(obj.quantity[0],1)));
obj["OilQT1-needle"].setRotation((pts.Engines.Engine.oilQt[0].getValue() + 90) * D2R);
obj.quantity[1] = sprintf("%2.1f",(0.1 * math.round(pts.Engines.Engine.oilQt[1].getValue() * 10,5)));
obj["OilQT2"].setText(sprintf("%s", left(obj.quantity[1], (size(obj.quantity[1]) == 4 ? 2 : 1))));
obj["OilQT2-decimal"].setText(sprintf("%s", right(obj.quantity[1],1)));
obj["OilQT2-needle"].setRotation((pts.Engines.Engine.oilQt[1].getValue() + 90) * D2R);
obj["FUEL-used-1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue(), 10)));
obj["FUEL-used-2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue(), 10)));
}
}),
props.UpdateManager.FromHashValue("engFuelUsed1", 1, func(val) {
if (obj.units) {
obj["FUEL-used-1"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
} else {
obj["FUEL-used-1"].setText(sprintf("%s", math.round(val, 10)));
}
}),
props.UpdateManager.FromHashValue("engFuelUsed2", 1, func(val) {
if (obj.units) {
obj["FUEL-used-2"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
} else {
obj["FUEL-used-2"].setText(sprintf("%s", math.round(val, 10)));
}
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
];
return obj;
},
getKeysBottom: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
return["OilQT1-needle","OilQT2-needle","OilQT1","OilQT2","OilQT1-decimal","OilQT2-decimal","OilPSI1-needle","OilPSI2-needle","OilPSI1","OilPSI2",
"FUEL-used-1","FUEL-used-2", "Fused-weight-unit","Fused-oil-unit","FUEL-clog-1","FUEL-clog-2","OIL-clog-1","OIL-clog-2","OilTemp1","OilTemp2",
"VIB-N1-1","VIB-N1-2","VIB-N2-1","VIB-N2-2"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
}
me["GW"].setColor(0.0509,0.7529,0.2941);
} else {
me["GW"].setText(sprintf("%s", "-----"));
me["GW"].setColor(0.0901,0.6039,0.7176);
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setColor(0.7333,0.3803,0);
}
},
update: func(notification) {
me.updatePower();
if (me.test.getVisible() == 1) {
me.updateTest(notification);
}
if (me.group.getVisible() == 0) {
return;
}
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
me.updateBottom(notification);
},
updatePower: func() {
if (me.name == ecam.SystemDisplayController.displayedPage.name) {
if (du4_lgt.getValue() > 0.01 and systems.ELEC.Bus.ac2.getValue() >= 110) {
if (du4_test_time.getValue() + du4_test_amount.getValue() >= pts.Sim.Time.elapsedSec.getValue()) {
me.group.setVisible(0);
me.test.setVisible(1);
} else {
me.group.setVisible(1);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
# don't hide the test group; just let whichever page is active control it
}
},
};
var input = {
engFuelUsed1: "/systems/fuel/fuel-used-1",
engFuelUsed2: "/systems/fuel/fuel-used-2",
engOilQt1: "/engines/engine[0]/oil-qt-actual",
engOilQt2: "/engines/engine[1]/oil-qt-actual",
engOilPsi1: "/engines/engine[0]/oil-psi-actual",
engOilPsi2: "/engines/engine[1]/oil-psi-actual",
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 System Display", name, input[name]));
}

View file

@ -0,0 +1,611 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
var canvas_lowerECAMPageFctl =
{
new: func(svg,name) {
var obj = {parents: [canvas_lowerECAMPageFctl,canvas_lowerECAM_base] };
obj.group = obj.canvas.createGroup();
obj.name = name;
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
foreach(var key; obj.getKeys()) {
obj[key] = obj.group.getElementById(key);
};
foreach(var key; obj.getKeysBottom()) {
obj[key] = obj.group.getElementById(key);
};
obj.units = acconfig_weight_kgs.getValue();
# init
obj.update_items = [
props.UpdateManager.FromHashList(["green","elac1","elac2","sec2"], nil, func(val) {
if (val.green >= 1450) {
if (val.elac2 or val.sec2) {
obj["elevLgreen"].setColor(0.0509,0.7529,0.2941);
} else {
obj["elevLgreen"].setColor(0.7333,0.3803,0);
}
if (val.elac2) {
obj["ailLgreen"].setColor(0.0509,0.7529,0.2941);
} else {
obj["ailLgreen"].setColor(0.7333,0.3803,0);
}
if (val.elac1) {
obj["ailRgreen"].setColor(0.0509,0.7529,0.2941);
} else {
obj["ailRgreen"].setColor(0.7333,0.3803,0);
}
obj["ruddergreen"].setColor(0.0509,0.7529,0.2941);
obj["PTgreen"].setColor(0.0509,0.7529,0.2941);
obj["spdbrkgreen"].setColor(0.0509,0.7529,0.2941);
} else {
obj["ailLgreen"].setColor(0.7333,0.3803,0);
obj["ailRgreen"].setColor(0.7333,0.3803,0);
obj["elevLgreen"].setColor(0.7333,0.3803,0);
obj["ruddergreen"].setColor(0.7333,0.3803,0);
obj["PTgreen"].setColor(0.7333,0.3803,0);
obj["spdbrkgreen"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["yellow","elac2","sec2"], nil, func(val) {
if (val.yellow >= 1450) {
if (val.elac2 or val.sec2) {
obj["elevRyellow"].setColor(0.0509,0.7529,0.2941);
} else {
obj["elevRyellow"].setColor(0.7333,0.3803,0);
}
obj["rudderyellow"].setColor(0.0509,0.7529,0.2941);
obj["PTyellow"].setColor(0.0509,0.7529,0.2941);
obj["spdbrkyellow"].setColor(0.0509,0.7529,0.2941);
} else {
obj["elevRyellow"].setColor(0.7333,0.3803,0);
obj["rudderyellow"].setColor(0.7333,0.3803,0);
obj["PTyellow"].setColor(0.7333,0.3803,0);
obj["spdbrkyellow"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["blue","elac1","elac2","sec1"], nil, func(val) {
if (val.blue >= 1500) {
if (val.elac1) {
obj["ailLblue"].setColor(0.0509,0.7529,0.2941);
} else {
obj["ailLblue"].setColor(0.7333,0.3803,0);
}
if (val.elac1 or val.sec1) {
obj["elevLblue"].setColor(0.0509,0.7529,0.2941);
obj["elevRblue"].setColor(0.0509,0.7529,0.2941);
} else {
obj["elevLblue"].setColor(0.7333,0.3803,0);
obj["elevRblue"].setColor(0.7333,0.3803,0);
}
if (val.elac2) {
obj["ailRblue"].setColor(0.0509,0.7529,0.2941);
} else {
obj["ailRblue"].setColor(0.7333,0.3803,0);
}
obj["rudderblue"].setColor(0.0509,0.7529,0.2941);
obj["spdbrkblue"].setColor(0.0509,0.7529,0.2941);
} else {
obj["ailLblue"].setColor(0.7333,0.3803,0);
obj["ailRblue"].setColor(0.7333,0.3803,0);
obj["elevLblue"].setColor(0.7333,0.3803,0);
obj["elevRblue"].setColor(0.7333,0.3803,0);
obj["rudderblue"].setColor(0.7333,0.3803,0);
obj["spdbrkblue"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("fctlAilL", 0.001, func(val) {
obj["ailL"].setTranslation(0, val * 100);
}),
props.UpdateManager.FromHashValue("fctlAilR", 0.001, func(val) {
obj["ailR"].setTranslation(0, val * -100);
}),
props.UpdateManager.FromHashList(["blue","green","elac1","elac2"], nil, func(val) {
if ((val.blue < 1500 or !val.elac1) and (val.green < 1500 or !val.elac2)) {
obj["ailL"].setColor(0.7333,0.3803,0);
} else {
obj["ailL"].setColor(0.0509,0.7529,0.2941);
}
if ((val.green < 1500 or !val.elac1) and (val.blue < 1500 or !val.elac2)) {
obj["ailR"].setColor(0.7333,0.3803,0);
} else {
obj["ailR"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("fctlElevL", 0.001, func(val) {
obj["elevL"].setTranslation(0, val * 100);
}),
props.UpdateManager.FromHashValue("fctlElevR", 0.001, func(val) {
obj["elevR"].setTranslation(0, val * 100);
}),
props.UpdateManager.FromHashList(["blue","green","yellow","elac1","elac2","sec1","sec2"], nil, func(val) {
if ((val.blue < 1500 or (!val.elac1 and !val.sec1)) and (val.green < 1500 or (!val.elac2 and !val.sec2))) {
obj["elevL"].setColor(0.7333,0.3803,0);
} else {
obj["elevL"].setColor(0.0509,0.7529,0.2941);
}
if ((val.blue < 1500 or (!val.elac1 and !val.sec1)) and (val.yellow < 1500 or (!val.elac2 and !val.sec2))) {
obj["elevR"].setColor(0.7333,0.3803,0);
} else {
obj["elevR"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("fctlElevTrim", 0.01, func(val) {
obj["PT"].setText(sprintf("%2.1f", val));
if (val >= 0.09) {
obj["PTupdn"].setText("UP");
obj["PTupdn"].show();
} elsif (val <= -0.09) {
obj["PTupdn"].setText("DN");
obj["PTupdn"].show();
} else {
obj["PTupdn"].hide();
}
}),
props.UpdateManager.FromHashValue("elac1", nil, func(val) {
if (val) {
obj["elac1"].setColor(0.0509,0.7529,0.2941);
obj["path4249"].setColor(0.0509,0.7529,0.2941);
} else {
obj["elac1"].setColor(0.7333,0.3803,0);
obj["path4249"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("elac2", nil, func(val) {
if (val) {
obj["elac2"].setColor(0.0509,0.7529,0.2941);
obj["path4249-3"].setColor(0.0509,0.7529,0.2941);
} else {
obj["elac2"].setColor(0.7333,0.3803,0);
obj["path4249-3"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("sec1", nil, func(val) {
if (val) {
obj["sec1"].setColor(0.0509,0.7529,0.2941);
obj["path4249-3-6-7"].setColor(0.0509,0.7529,0.2941);
} else {
obj["sec1"].setColor(0.7333,0.3803,0);
obj["path4249-3-6-7"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("sec2", nil, func(val) {
if (val) {
obj["sec2"].setColor(0.0509,0.7529,0.2941);
obj["path4249-3-6-7-5"].setColor(0.0509,0.7529,0.2941);
} else {
obj["sec2"].setColor(0.7333,0.3803,0);
obj["path4249-3-6-7-5"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("sec3", nil, func(val) {
if (val) {
obj["sec3"].setColor(0.0509,0.7529,0.2941);
obj["path4249-3-6"].setColor(0.0509,0.7529,0.2941);
} else {
obj["sec3"].setColor(0.7333,0.3803,0);
obj["path4249-3-6"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["blue","yellow","green"], 25, func(val) {
if (val.green < 1500 and val.yellow < 1500) {
obj["PT"].setColor(0.7333,0.3803,0);
obj["PTupdn"].setColor(0.7333,0.3803,0);
obj["PTcc"].setColor(0.7333,0.3803,0);
} else {
obj["PT"].setColor(0.0509,0.7529,0.2941);
obj["PTupdn"].setColor(0.0509,0.7529,0.2941);
obj["PTcc"].setColor(0.0901,0.6039,0.7176);
}
if (val.blue < 1500 and val.yellow < 1500 and val.green < 1500) {
obj["rudder"].setColor(0.7333,0.3803,0);
} else {
obj["rudder"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("fctlRudder", 0.001, func(val) {
obj["rudder"].setRotation(val * -0.024);
}),
props.UpdateManager.FromHashValue("fctlRudderTrim", 0.01, func(val) {
obj["rudderTrimInd"].setRotation(val * -0.024);
}),
props.UpdateManager.FromHashValue("fctlTHSJam", nil, func(val) {
if (val) {
obj["pitchTrimStatus"].setColor(0.7333,0.3803,0);
} else {
obj["pitchTrimStatus"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashValue("spoilerL1", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler1Lex"].hide();
obj["spoiler1Lrt"].show();
} else {
obj["spoiler1Lrt"].hide();
obj["spoiler1Lex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerL2", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler2Lex"].hide();
obj["spoiler2Lrt"].show();
} else {
obj["spoiler2Lrt"].hide();
obj["spoiler2Lex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerL3", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler3Lex"].hide();
obj["spoiler3Lrt"].show();
} else {
obj["spoiler3Lrt"].hide();
obj["spoiler3Lex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerL4", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler4Lex"].hide();
obj["spoiler4Lrt"].show();
} else {
obj["spoiler4Lrt"].hide();
obj["spoiler4Lex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerL5", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler5Lex"].hide();
obj["spoiler5Lrt"].show();
} else {
obj["spoiler5Lrt"].hide();
obj["spoiler5Lex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerR1", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler1Rex"].hide();
obj["spoiler1Rrt"].show();
} else {
obj["spoiler1Rrt"].hide();
obj["spoiler1Rex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerR2", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler2Rex"].hide();
obj["spoiler2Rrt"].show();
} else {
obj["spoiler2Rrt"].hide();
obj["spoiler2Rex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerR3", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler3Rex"].hide();
obj["spoiler3Rrt"].show();
} else {
obj["spoiler3Rrt"].hide();
obj["spoiler3Rex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerR4", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler4Rex"].hide();
obj["spoiler4Rrt"].show();
} else {
obj["spoiler4Rrt"].hide();
obj["spoiler4Rex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerR5", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler5Rex"].hide();
obj["spoiler5Rrt"].show();
} else {
obj["spoiler5Rrt"].hide();
obj["spoiler5Rex"].show();
}
}),
props.UpdateManager.FromHashList(["spoilerL1Failure","spoilerL1","green"], nil, func(val) {
if (val.spoilerL1Failure or val.green < 1500) {
obj["spoiler1Lex"].setColor(0.7333,0.3803,0);
obj["spoiler1Lrt"].setColor(0.7333,0.3803,0);
if (val.spoilerL1 < 1.5) {
obj["spoiler1Lf"].show();
} else {
obj["spoiler1Lf"].hide();
}
} else {
obj["spoiler1Lex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler1Lrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler1Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL2Failure","spoilerL2","yellow"], nil, func(val) {
if (val.spoilerL2Failure or val.yellow < 1500) {
obj["spoiler2Lex"].setColor(0.7333,0.3803,0);
obj["spoiler2Lrt"].setColor(0.7333,0.3803,0);
if (val.spoilerL2 < 1.5) {
obj["spoiler2Lf"].show();
} else {
obj["spoiler2Lf"].hide();
}
} else {
obj["spoiler2Lex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler2Lrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler2Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL3Failure","spoilerL3","blue"], nil, func(val) {
if (val.spoilerL3Failure or val.blue < 1500) {
obj["spoiler3Lex"].setColor(0.7333,0.3803,0);
obj["spoiler3Lrt"].setColor(0.7333,0.3803,0);
if (val.spoilerL3 < 1.5) {
obj["spoiler3Lf"].show();
} else {
obj["spoiler3Lf"].hide();
}
} else {
obj["spoiler3Lex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler3Lrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler3Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL4Failure","spoilerL4","yellow"], nil, func(val) {
if (val.spoilerL4Failure or val.yellow < 1500) {
obj["spoiler4Lex"].setColor(0.7333,0.3803,0);
obj["spoiler4Lrt"].setColor(0.7333,0.3803,0);
if (val.spoilerL4 < 1.5) {
obj["spoiler4Lf"].show();
} else {
obj["spoiler4Lf"].hide();
}
} else {
obj["spoiler4Lex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler4Lrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler4Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL5Failure","spoilerL5","green"], nil, func(val) {
if (val.spoilerL5Failure or val.green < 1500) {
obj["spoiler5Lex"].setColor(0.7333,0.3803,0);
obj["spoiler5Lrt"].setColor(0.7333,0.3803,0);
if (val.spoilerL5 < 1.5) {
obj["spoiler5Lf"].show();
} else {
obj["spoiler5Lf"].hide();
}
} else {
obj["spoiler5Lex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler5Lrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler5Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR1Failure","spoilerR1","green"], nil, func(val) {
if (val.spoilerR1Failure or val.green < 1500) {
obj["spoiler1Rex"].setColor(0.7333,0.3803,0);
obj["spoiler1Rrt"].setColor(0.7333,0.3803,0);
if (val.spoilerR1 < 1.5) {
obj["spoiler1Rf"].show();
} else {
obj["spoiler1Rf"].hide();
}
} else {
obj["spoiler1Rex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler1Rrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler1Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR2Failure","spoilerR2","yellow"], nil, func(val) {
if (val.spoilerR2Failure or val.yellow < 1500) {
obj["spoiler2Rex"].setColor(0.7333,0.3803,0);
obj["spoiler2Rrt"].setColor(0.7333,0.3803,0);
if (val.spoilerR2 < 1.5) {
obj["spoiler2Rf"].show();
} else {
obj["spoiler2Rf"].hide();
}
} else {
obj["spoiler2Rex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler2Rrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler2Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR3Failure","spoilerR3","blue"], nil, func(val) {
if (val.spoilerR3Failure or val.blue < 1500) {
obj["spoiler3Rex"].setColor(0.7333,0.3803,0);
obj["spoiler3Rrt"].setColor(0.7333,0.3803,0);
if (val.spoilerR3 < 1.5) {
obj["spoiler3Rf"].show();
} else {
obj["spoiler3Rf"].hide();
}
} else {
obj["spoiler3Rex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler3Rrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler3Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR4Failure","spoilerR4","yellow"], nil, func(val) {
if (val.spoilerR4Failure or val.yellow < 1500) {
obj["spoiler4Rex"].setColor(0.7333,0.3803,0);
obj["spoiler4Rrt"].setColor(0.7333,0.3803,0);
if (val.spoilerR4 < 1.5) {
obj["spoiler4Rf"].show();
} else {
obj["spoiler4Rf"].hide();
}
} else {
obj["spoiler4Rex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler4Rrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler4Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR5Failure","spoilerR5","green"], nil, func(val) {
if (val.spoilerR5Failure or val.green < 1500) {
obj["spoiler5Rex"].setColor(0.7333,0.3803,0);
obj["spoiler5Rrt"].setColor(0.7333,0.3803,0);
if (val.spoilerR5 < 1.5) {
obj["spoiler5Rf"].show();
} else {
obj["spoiler5Rf"].hide();
}
} else {
obj["spoiler5Rex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler5Rrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler5Rf"].hide();
}
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
];
return obj;
},
getKeysBottom: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
return["ailL","ailR","elevL","elevR","PTcc","PT","PTupdn","elac1","elac2","sec1","sec2","sec3","ailLblue","ailRblue","elevLblue","elevRblue","rudderblue","ailLgreen","ailRgreen","elevLgreen","ruddergreen","PTgreen",
"elevRyellow","rudderyellow","PTyellow","rudder","spdbrkblue","spdbrkgreen","spdbrkyellow","spoiler1Rex","spoiler1Rrt","spoiler2Rex","spoiler2Rrt","spoiler3Rex","spoiler3Rrt","spoiler4Rex","spoiler4Rrt","spoiler5Rex","spoiler5Rrt","spoiler1Lex",
"spoiler1Lrt","spoiler2Lex","spoiler2Lrt","spoiler3Lex","spoiler3Lrt","spoiler4Lex","spoiler4Lrt","spoiler5Lex","spoiler5Lrt","spoiler1Rf","spoiler2Rf","spoiler3Rf","spoiler4Rf","spoiler5Rf","spoiler1Lf","spoiler2Lf","spoiler3Lf","spoiler4Lf",
"spoiler5Lf","ailLscale","ailRscale","path4249","path4249-3","path4249-3-6-7","path4249-3-6-7-5","path4249-3-6","pitchTrimStatus","rudderTrimInd"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
}
me["GW"].setColor(0.0509,0.7529,0.2941);
} else {
me["GW"].setText(sprintf("%s", "-----"));
me["GW"].setColor(0.0901,0.6039,0.7176);
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setColor(0.7333,0.3803,0);
}
},
update: func(notification) {
me.updatePower();
if (me.test.getVisible() == 1) {
me.updateTest(notification);
}
if (me.group.getVisible() == 0) {
return;
}
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
me.updateBottom(notification);
},
updatePower: func() {
if (me.name == ecam.SystemDisplayController.displayedPage.name) {
if (du4_lgt.getValue() > 0.01 and systems.ELEC.Bus.ac2.getValue() >= 110) {
if (du4_test_time.getValue() + du4_test_amount.getValue() >= pts.Sim.Time.elapsedSec.getValue()) {
me.group.setVisible(0);
me.test.setVisible(1);
} else {
me.group.setVisible(1);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
# don't hide the test group; just let whichever page is active control it
}
},
};
var input = {
elac1: "/systems/fctl/elac1",
elac2: "/systems/fctl/elac2",
elac1Fail: "/systems/failures/fctl/elac1",
elac2Fail: "/systems/failures/fctl/elac2",
sec1: "/systems/fctl/sec1",
sec2: "/systems/fctl/sec2",
sec3: "/systems/fctl/sec3",
sec1Fail: "/systems/failures/fctl/sec1",
sec2Fail: "/systems/failures/fctl/sec2",
sec3Fail: "/systems/failures/fctl/sec3",
fac1: "/systems/fctl/fac1-healthy-signal",
fac2: "/systems/fctl/fac2-healthy-signal",
fac1Fail: "/systems/failures/fctl/fac1",
fac2Fail: "/systems/failures/fctl/fac2",
fctlAilL: "/ECAM/Lower/aileron-ind-left",
fctlAilR: "/ECAM/Lower/aileron-ind-right",
fctlElevL: "/ECAM/Lower/elevator-ind-left",
fctlElevR: "/ECAM/Lower/elevator-ind-right",
fctlElevTrim: "/ECAM/Lower/elevator-trim-deg",
fctlRudder: "/fdm/jsbsim/hydraulics/rudder/final-deg",
fctlRudderTrim: "/fdm/jsbsim/hydraulics/rudder/trim-deg",
fctlTHSJam: "/systems/failures/fctl/ths-jam",
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 System Display", name, input[name]));
}

View file

@ -0,0 +1,600 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
var fuel_used_lbs1 = props.globals.getNode("/systems/fuel/fuel-used-1", 1);
var fuel_used_lbs2 = props.globals.getNode("/systems/fuel/fuel-used-2", 1);
var canvas_lowerECAMPageFuel =
{
new: func(svg,name) {
var obj = {parents: [canvas_lowerECAMPageFuel,canvas_lowerECAM_base] };
obj.group = obj.canvas.createGroup();
obj.name = name;
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
foreach(var key; obj.getKeys()) {
obj[key] = obj.group.getElementById(key);
};
foreach(var key; obj.getKeysBottom()) {
obj[key] = obj.group.getElementById(key);
};
obj.units = acconfig_weight_kgs.getValue();
# init
obj["FUEL-Left-blocked"].hide();
obj["FUEL-Right-blocked"].hide();
obj["FUEL-Left-Outer-Inacc"].hide();
obj["FUEL-Left-Inner-Inacc"].hide();
obj["FUEL-Right-Outer-Inacc"].hide();
obj["FUEL-Right-Inner-Inacc"].hide();
obj["FUEL-Center-Inacc"].hide();
obj.update_items = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
if (val) {
obj["FOB-weight-unit"].setText("KG");
obj["Fused-weight-unit"].setText("KG");
obj["FFlow-weight-unit"].setText("KG/MIN");
obj["FUEL-On-Board"].setText(sprintf("%s", math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() * LBS2KGS, 10)));
obj["FUEL-Left-Outer-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.leftOuter.getValue() * LBS2KGS, 10)));
obj["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.leftInner.getValue() * LBS2KGS, 10)));
obj["FUEL-Center-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.center.getValue() * LBS2KGS, 10)));
obj["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.rightInner.getValue() * LBS2KGS, 10)));
obj["FUEL-Right-Outer-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.rightOuter.getValue() * LBS2KGS, 10)));
obj["FUEL-Flow-per-min"].setText(sprintf("%s", math.round(((pts.Engines.Engine.fuelFlow[0].getValue() + pts.Engines.Engine.fuelFlow[1].getValue()) * LBS2KGS) / 60, 10)));
obj["FUEL-used-1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue() * LBS2KGS, 10)));
obj["FUEL-used-2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue() * LBS2KGS, 10)));
obj["FUEL-used-both"].setText(sprintf("%s", (math.round((fuel_used_lbs1.getValue() * LBS2KGS) + (fuel_used_lbs2.getValue() * LBS2KGS), 10))));
} else {
obj["FUEL-used-1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue(), 10)));
obj["FUEL-used-2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue(), 10)));
obj["FUEL-used-both"].setText(sprintf("%s", (math.round(fuel_used_lbs1.getValue() + fuel_used_lbs2.getValue(), 10))));
obj["FUEL-Flow-per-min"].setText(sprintf("%s", math.round((pts.Engines.Engine.fuelFlow[0].getValue() + pts.Engines.Engine.fuelFlow[1].getValue()) / 60, 10)));
obj["FOB-weight-unit"].setText("LBS");
obj["Fused-weight-unit"].setText("LBS");
obj["FFlow-weight-unit"].setText("LBS/MIN");
obj["FUEL-On-Board"].setText(sprintf("%s", math.round(pts.Consumables.Fuel.totalFuelLbs.getValue(), 10)));
obj["FUEL-Left-Outer-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.leftOuter.getValue(), 10)));
obj["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.leftInner.getValue(), 10)));
obj["FUEL-Center-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.center.getValue(), 10)));
obj["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.rightInner.getValue(), 10)));
obj["FUEL-Right-Outer-quantity"].setText(sprintf("%s", math.round(systems.FUEL.Quantity.rightOuter.getValue(), 10)));
}
}),
props.UpdateManager.FromHashValue("engFuelUsed1", 0.5, func(val) {
if (obj.units) {
obj["FUEL-used-1"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
} else {
obj["FUEL-used-1"].setText(sprintf("%s", math.round(val, 10)));
}
}),
props.UpdateManager.FromHashValue("engFuelUsed2", 0.5, func(val) {
if (obj.units) {
obj["FUEL-used-2"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
} else {
obj["FUEL-used-2"].setText(sprintf("%s", math.round(val, 10)));
}
}),
props.UpdateManager.FromHashList(["engFuelUsed1","engFuelUsed2"], 0.5, func(val) {
if (obj.units) {
obj["FUEL-used-both"].setText(sprintf("%s", (math.round((val.engFuelUsed1 * LBS2KGS) + (val.engFuelUsed2 * LBS2KGS), 10))));
} else {
obj["FUEL-used-both"].setText(sprintf("%s", (math.round(val.engFuelUsed1 + val.engFuelUsed2, 10))));
}
}),
props.UpdateManager.FromHashValue("fuelLeftOuterQty", 0.25, func(val) {
if (obj.units) {
obj["FUEL-Left-Outer-quantity"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
} else {
obj["FUEL-Left-Outer-quantity"].setText(sprintf("%s", math.round(val, 10)));
}
}),
props.UpdateManager.FromHashValue("fuelRightOuterQty", 0.25, func(val) {
if (obj.units) {
obj["FUEL-Right-Outer-quantity"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
} else {
obj["FUEL-Right-Outer-quantity"].setText(sprintf("%s", math.round(val, 10)));
}
}),
props.UpdateManager.FromHashValue("fuelLeftInnerQty", 0.25, func(val) {
if (obj.units) {
obj["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
} else {
obj["FUEL-Left-Inner-quantity"].setText(sprintf("%s", math.round(val, 10)));
}
}),
props.UpdateManager.FromHashValue("fuelRightInnerQty", 0.25, func(val) {
if (obj.units) {
obj["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
} else {
obj["FUEL-Right-Inner-quantity"].setText(sprintf("%s", math.round(val, 10)));
}
}),
props.UpdateManager.FromHashList(["fadecPower1","fadecPower2","fadecPowerStart","fuelflow_1","fuelflow_2"], nil, func(val) {
if (val.fadecPower1 or val.fadecPower2 or val.fadecPowerStart) {
obj["FUEL-Flow-per-min"].setColor(0.0509,0.7529,0.2941);
if (obj.units) {
obj["FUEL-Flow-per-min"].setText(sprintf("%s", math.round(((val.fuelflow_1 + val.fuelflow_2) * LBS2KGS) / 60, 10)));
} else {
obj["FUEL-Flow-per-min"].setText(sprintf("%s", math.round((val.fuelflow_1 + val.fuelflow_2) / 60, 10)));
}
} else {
obj["FUEL-Flow-per-min"].setColor(0.7333,0.3803,0);
obj["FUEL-Flow-per-min"].setText("XX");
}
}),
props.UpdateManager.FromHashValue("N1_actual_1", 0.05, func(val) {
if (val <= 18.8) {
obj["ENG1idFFlow"].setColor(0.7333,0.3803,0);
obj["FUEL-ENG-1-label"].setColor(0.7333,0.3803,0);
} else {
obj["ENG1idFFlow"].setColor(0.8078,0.8039,0.8078);
obj["FUEL-ENG-1-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashValue("N1_actual_2", 0.05, func(val) {
if (val <= 18.8) {
obj["ENG2idFFlow"].setColor(0.7333,0.3803,0);
obj["FUEL-ENG-2-label"].setColor(0.7333,0.3803,0);
} else {
obj["ENG2idFFlow"].setColor(0.8078,0.8039,0.8078);
obj["FUEL-ENG-2-label"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashValue("fuelLeftSwitch1", nil, func(val) {
if (val) {
obj["FUEL-Pump-Left-1-Open"].show();
obj["FUEL-Pump-Left-1-Closed"].hide();
obj["FUEL-Pump-Left-1"].setColor(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Left-1"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Left-1-Square"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Left-1-Open"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Left-1-Closed"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["FUEL-Pump-Left-1-Open"].hide();
obj["FUEL-Pump-Left-1-Closed"].show();
obj["FUEL-Pump-Left-1"].setColor(0.7333,0.3803,0);
obj["FUEL-Pump-Left-1-Square"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Left-1"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Left-1-Open"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Left-1-Closed"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("fuelLeftSwitch2", nil, func(val) {
if (val) {
obj["FUEL-Pump-Left-2-Open"].show();
obj["FUEL-Pump-Left-2-Closed"].hide();
obj["FUEL-Pump-Left-2"].setColor(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Left-2"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Left-2-Square"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Left-2-Open"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Left-2-Closed"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["FUEL-Pump-Left-2-Open"].hide();
obj["FUEL-Pump-Left-2-Closed"].show();
obj["FUEL-Pump-Left-2"].setColor(0.7333,0.3803,0);
obj["FUEL-Pump-Left-2"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Left-2-Square"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Left-2-Open"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Left-2-Closed"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("fuelCenterSwitch1", nil, func(val) {
if (val) {
obj["FUEL-Pump-Center-1-Open"].show();
obj["FUEL-Pump-Center-1-Closed"].hide();
obj["FUEL-Pump-Center-1"].setColor(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Center-1"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Center-1-Square"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Center-1-Open"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Center-1-Closed"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["FUEL-Pump-Center-1-Open"].hide();
obj["FUEL-Pump-Center-1-Closed"].show();
obj["FUEL-Pump-Center-1"].setColor(0.7333,0.3803,0);
obj["FUEL-Pump-Center-1"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Center-1-Square"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Center-1-Open"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Center-1-Closed"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("fuelCenterSwitch2", nil, func(val) {
if (val) {
obj["FUEL-Pump-Center-2-Open"].show();
obj["FUEL-Pump-Center-2-Closed"].hide();
obj["FUEL-Pump-Center-2"].setColor(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Center-2"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Center-2-Square"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Center-2-Open"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Center-2-Closed"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["FUEL-Pump-Center-2-Open"].hide();
obj["FUEL-Pump-Center-2-Closed"].show();
obj["FUEL-Pump-Center-2"].setColor(0.7333,0.3803,0);
obj["FUEL-Pump-Center-2"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Center-2-Square"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Center-2-Open"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Center-2-Closed"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("fuelRightSwitch1", nil, func(val) {
if (val) {
obj["FUEL-Pump-Right-1-Open"].show();
obj["FUEL-Pump-Right-1-Closed"].hide();
obj["FUEL-Pump-Right-1"].setColor(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Right-1"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Right-1-Square"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Right-1-Open"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Right-1-Closed"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["FUEL-Pump-Right-1-Open"].hide();
obj["FUEL-Pump-Right-1-Closed"].show();
obj["FUEL-Pump-Right-1"].setColor(0.7333,0.3803,0);
obj["FUEL-Pump-Right-1"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Right-1-Square"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Right-1-Open"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Right-1-Closed"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("fuelRightSwitch2", nil, func(val) {
if (val) {
obj["FUEL-Pump-Right-2-Open"].show();
obj["FUEL-Pump-Right-2-Closed"].hide();
obj["FUEL-Pump-Right-2"].setColor(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Right-2"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Right-2-Square"].setColor(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Right-2-Open"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-Pump-Right-2-Closed"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["FUEL-Pump-Right-2-Open"].hide();
obj["FUEL-Pump-Right-2-Closed"].show();
obj["FUEL-Pump-Right-2"].setColor(0.7333,0.3803,0);
obj["FUEL-Pump-Right-2"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Right-2-Square"].setColor(0.7333,0.3803,0);
obj["FUEL-Pump-Right-2-Open"].setColorFill(0.7333,0.3803,0);
obj["FUEL-Pump-Right-2-Closed"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["fuelCenterSwitch1","fuelCenterSwitch2"], nil, func(val) {
if (!val.fuelCenterSwitch1 and !val.fuelCenterSwitch2) {
obj["FUEL-Center-blocked"].show();
} else {
obj["FUEL-Center-blocked"].hide();
}
}),
props.UpdateManager.FromHashList(["fuelCrossfeedValve","fuelCrossfeedSwitch"], nil, func(val) {
if (val.fuelCrossfeedValve == 1) {
obj["FUEL-XFEED"].setRotation(0);
obj["FUEL-XFEED-pipes"].show();
if (val.fuelCrossfeedSwitch) {
obj["FUEL-XFEED"].setColor(0.0509,0.7529,0.2941);
obj["FUEL-XFEED"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-XFEED-Cross"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["FUEL-XFEED"].setColor(0.7333,0.3803,0);
obj["FUEL-XFEED"].setColorFill(0.7333,0.3803,0);
obj["FUEL-XFEED-Cross"].setColorFill(0.7333,0.3803,0);
}
} elsif (val.fuelCrossfeedValve == 0) {
obj["FUEL-XFEED"].setRotation(90 * D2R);
obj["FUEL-XFEED-pipes"].hide();
if (!val.fuelCrossfeedSwitch) {
obj["FUEL-XFEED"].setColor(0.0509,0.7529,0.2941);
obj["FUEL-XFEED"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-XFEED-Cross"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["FUEL-XFEED"].setColor(0.7333,0.3803,0);
obj["FUEL-XFEED"].setColorFill(0.7333,0.3803,0);
obj["FUEL-XFEED-Cross"].setColorFill(0.7333,0.3803,0);
}
} else {
obj["FUEL-XFEED"].setRotation(45 * D2R);
obj["FUEL-XFEED-pipes"].hide();
obj["FUEL-XFEED"].setColor(0.7333,0.3803,0);
obj["FUEL-XFEED"].setColorFill(0.7333,0.3803,0);
obj["FUEL-XFEED-Cross"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["fuelEngine1Valve","engineCutoff1"], nil, func(val) {
if (val.fuelEngine1Valve) {
if (val.fuelEngine1Valve == 1) {
obj["FUEL-ENG-Master-1"].setRotation(0);
} else {
obj["FUEL-ENG-Master-1"].setRotation(45 * D2R);
}
if (val.engineCutoff1) {
obj["FUEL-ENG-Master-1"].setColor(0.7333,0.3803,0);
obj["FUEL-ENG-Master-1"].setColorFill(0.7333,0.3803,0);
obj["FUEL-ENG-Master-1-Cross"].setColorFill(0.7333,0.3803,0);
obj["FUEL-ENG-1-pipe"].setColorFill(0.7333,0.3803,0);
obj["FUEL-ENG-1-pipe"].setColorFill(0.7333,0.3803,0);
} else {
obj["FUEL-ENG-Master-1"].setColor(0.0509,0.7529,0.2941);
obj["FUEL-ENG-Master-1"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-ENG-Master-1-Cross"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-ENG-1-pipe"].setColor(0.0509,0.7529,0.2941);
obj["FUEL-ENG-1-pipe"].setColorFill(0.0509,0.7529,0.2941);
}
} else {
obj["FUEL-ENG-Master-1"].setRotation(90 * D2R);
obj["FUEL-ENG-Master-1"].setColor(0.7333,0.3803,0);
obj["FUEL-ENG-Master-1"].setColorFill(0.7333,0.3803,0);
obj["FUEL-ENG-Master-1-Cross"].setColorFill(0.7333,0.3803,0);
obj["FUEL-ENG-1-pipe"].setColor(0.7333,0.3803,0);
obj["FUEL-ENG-1-pipe"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["fuelEngine2Valve","engineCutoff2"], nil, func(val) {
if (val.fuelEngine2Valve) {
if (val.fuelEngine2Valve == 1) {
obj["FUEL-ENG-Master-2"].setRotation(0);
} else {
obj["FUEL-ENG-Master-2"].setRotation(45 * D2R);
}
if (val.engineCutoff1) {
obj["FUEL-ENG-Master-2"].setColor(0.7333,0.3803,0);
obj["FUEL-ENG-Master-2"].setColorFill(0.7333,0.3803,0);
obj["FUEL-ENG-Master-2-Cross"].setColorFill(0.7333,0.3803,0);
obj["FUEL-ENG-2-pipe"].setColorFill(0.7333,0.3803,0);
obj["FUEL-ENG-2-pipe"].setColorFill(0.7333,0.3803,0);
} else {
obj["FUEL-ENG-Master-2"].setColor(0.0509,0.7529,0.2941);
obj["FUEL-ENG-Master-2"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-ENG-Master-2-Cross"].setColorFill(0.0509,0.7529,0.2941);
obj["FUEL-ENG-2-pipe"].setColor(0.0509,0.7529,0.2941);
obj["FUEL-ENG-2-pipe"].setColorFill(0.0509,0.7529,0.2941);
}
} else {
obj["FUEL-ENG-Master-2"].setRotation(90 * D2R);
obj["FUEL-ENG-Master-2"].setColor(0.7333,0.3803,0);
obj["FUEL-ENG-Master-2"].setColorFill(0.7333,0.3803,0);
obj["FUEL-ENG-Master-2-Cross"].setColorFill(0.7333,0.3803,0);
obj["FUEL-ENG-2-pipe"].setColor(0.7333,0.3803,0);
obj["FUEL-ENG-2-pipe"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("fuelTransferValve1", nil, func(val) {
if (val == 0) {
obj["FUEL-Left-Transfer"].hide();
} else {
if (val == 1) {
obj["FUEL-Left-Transfer"].setColor(0.0509,0.7529,0.2941);
} else {
obj["FUEL-Left-Transfer"].setColor(0.7333,0.3803,0);
}
obj["FUEL-Left-Transfer"].show();
}
}),
props.UpdateManager.FromHashValue("fuelTransferValve2", nil, func(val) {
if (val == 0) {
obj["FUEL-Right-Transfer"].hide();
} else {
if (val == 1) {
obj["FUEL-Right-Transfer"].setColor(0.0509,0.7529,0.2941);
} else {
obj["FUEL-Right-Transfer"].setColor(0.7333,0.3803,0);
}
obj["FUEL-Right-Transfer"].show();
}
}),
props.UpdateManager.FromHashValue("fuelTotalLbs", 1, func(val) {
if (obj.units) {
obj["FUEL-On-Board"].setText(sprintf("%s", math.round(val * LBS2KGS, 10)));
} else {
obj["FUEL-On-Board"].setText(sprintf("%s", math.round(val, 10)));
}
}),
props.UpdateManager.FromHashValue("fuelTempLeftOuter", 0.25, func(val) {
obj["FUEL-Left-Outer-temp"].setText(sprintf("%s", math.round(val)));
if (val > 55 or val < -40) {
obj["FUEL-Left-Outer-temp"].setColor(0.7333,0.3803,0);
} else {
obj["FUEL-Left-Outer-temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("fuelTempLeftInner", 0.25, func(val) {
obj["FUEL-Left-Inner-temp"].setText(sprintf("%s", math.round(val)));
if (val > 45 or val < -40) {
obj["FUEL-Left-Inner-temp"].setColor(0.7333,0.3803,0);
} else {
obj["FUEL-Left-Inner-temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("fuelTempRightInner", 0.25, func(val) {
obj["FUEL-Right-Inner-temp"].setText(sprintf("%s", math.round(val)));
if (val > 45 or val < -40) {
obj["FUEL-Right-Inner-temp"].setColor(0.7333,0.3803,0);
} else {
obj["FUEL-Right-Inner-temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("fuelTempRightOuter", 0.25, func(val) {
obj["FUEL-Right-Outer-temp"].setText(sprintf("%s", math.round(val)));
if (val > 55 or val < -40) {
obj["FUEL-Right-Outer-temp"].setColor(0.7333,0.3803,0);
} else {
obj["FUEL-Right-Outer-temp"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashList(["fuelApuValve","apuMaster","apuFireBtn"], nil, func(val) {
if (val.fuelApuValve == 0) {
if (val.apuMaster or val.apuFireBtn) {
obj["FUEL-APU-label"].setColor(0.7333,0.3803,0);
obj["FUEL-APU-line"].hide();
obj["FUEL-APU-arrow"].hide();
} else {
obj["FUEL-APU-label"].setColor(0.8078, 0.8039, 0.8078);
obj["FUEL-APU-arrow"].setColor(0.8078, 0.8039, 0.8078);
obj["FUEL-APU-line"].hide();
obj["FUEL-APU-arrow"].show();
}
} else {
if (!val.apuMaster or val.apuFireBtn) {
obj["FUEL-APU-label"].setColor(0.7333,0.3803,0);
obj["FUEL-APU-line"].setColor(0.7333,0.3803,0);
obj["FUEL-APU-line"].setColorFill(0.7333,0.3803,0);
obj["FUEL-APU-arrow"].setColor(0.7333,0.3803,0);
obj["FUEL-APU-line"].show();
obj["FUEL-APU-arrow"].show();
} else {
obj["FUEL-APU-label"].setColor(0.8078, 0.8039, 0.8078);
obj["FUEL-APU-line"].setColor(0.0509,0.7529,0.2941);
obj["FUEL-APU-arrow"].setColor(0.0509,0.7529,0.2941);
obj["FUEL-APU-line"].show();
obj["FUEL-APU-arrow"].show();
}
}
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
];
return obj;
},
getKeysBottom: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
return["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit","FUEL-Pump-Left-1","FUEL-Pump-Left-2","FUEL-Pump-Center-1","FUEL-Pump-Center-2","FUEL-Pump-Right-1","FUEL-Pump-Right-2","FUEL-Left-blocked","FUEL-Right-blocked","FUEL-Center-blocked","FUEL-Left-Transfer",
"FUEL-Right-Transfer","FUEL-Left-Outer-Inacc","FUEL-Left-Inner-Inacc","FUEL-Center-Inacc","FUEL-Right-Inner-Inacc","FUEL-Right-Outer-Inacc","FUEL-Left-Outer-quantity","FUEL-Left-Inner-quantity","FUEL-Center-quantity","FUEL-Right-Inner-quantity",
"FUEL-Right-Outer-quantity","FUEL-On-Board","FUEL-Flow-per-min","FUEL-APU-arrow","FUEL-APU-line","FUEL-APU-label","FUEL-used-1","FUEL-used-both","FUEL-used-2","FUEL-ENG-Master-1","FUEL-ENG-Master-2","FUEL-XFEED","FUEL-XFEED-Cross","FUEL-XFEED-pipes","FUEL-Left-Outer-temp",
"FUEL-Left-Inner-temp","FUEL-Right-Inner-temp","FUEL-Right-Outer-temp","FUEL-Pump-Left-1-Closed","FUEL-Pump-Left-1-Open","FUEL-Pump-Left-2-Closed","FUEL-Pump-Left-2-Open","FUEL-Pump-Center-1-Open","FUEL-Pump-Center-1-Closed","FUEL-Pump-Center-2-Closed",
"FUEL-Pump-Center-2-Open","FUEL-Pump-Right-1-Closed","FUEL-Pump-Right-1-Open","FUEL-Pump-Right-2-Closed","FUEL-Pump-Right-2-Open","FUEL-ENG-1-label","FUEL-ENG-2-label","FUEL-ENG-1-pipe","FUEL-ENG-2-pipe","ENG1idFFlow","ENG2idFFlow","FUEL-used-1","FUEL-used-2","FUEL-used-both",
"Fused-weight-unit","FFlow-weight-unit","FOB-weight-unit","FUEL-ENG-Master-1-Cross","FUEL-ENG-Master-2-Cross","FUEL-Pump-Left-1-Square","FUEL-Pump-Left-2-Square","FUEL-Pump-Center-1-Square","FUEL-Pump-Center-2-Square","FUEL-Pump-Right-1-Square","FUEL-Pump-Right-2-Square"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
}
me["GW"].setColor(0.0509,0.7529,0.2941);
} else {
me["GW"].setText(sprintf("%s", "-----"));
me["GW"].setColor(0.0901,0.6039,0.7176);
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setColor(0.7333,0.3803,0);
}
},
update: func(notification) {
me.updatePower();
if (me.test.getVisible() == 1) {
me.updateTest(notification);
}
if (me.group.getVisible() == 0) {
return;
}
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
me.updateBottom(notification);
},
updatePower: func() {
if (me.name == ecam.SystemDisplayController.displayedPage.name) {
if (du4_lgt.getValue() > 0.01 and systems.ELEC.Bus.ac2.getValue() >= 110) {
if (du4_test_time.getValue() + du4_test_amount.getValue() >= pts.Sim.Time.elapsedSec.getValue()) {
me.group.setVisible(0);
me.test.setVisible(1);
} else {
me.group.setVisible(1);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
# don't hide the test group; just let whichever page is active control it
}
},
};
var input = {
engineCutoff1: "/controls/engines/engine[0]/cutoff-switch",
engineCutoff2: "/controls/engines/engine[1]/cutoff-switch",
fuelApuValve: "/systems/fuel/valves/apu-lp-valve",
fuelCrossfeedSwitch: "/controls/fuel/switches/crossfeed",
fuelCrossfeedValve: "/systems/fuel/valves/crossfeed-valve",
fuelEngine1Valve: "/systems/fuel/valves/engine-1-lp-valve",
fuelEngine2Valve: "/systems/fuel/valves/engine-2-lp-valve",
fuelTransferValve1: "/systems/fuel/valves/outer-inner-transfer-valve-1",
fuelTransferValve2: "/systems/fuel/valves/outer-inner-transfer-valve-2",
fuelLeftSwitch1: "/controls/fuel/switches/pump-left-1",
fuelLeftSwitch2: "/controls/fuel/switches/pump-left-2",
fuelCenterSwitch1: "/controls/fuel/switches/pump-center-1",
fuelCenterSwitch2: "/controls/fuel/switches/pump-center-2",
fuelRightSwitch1: "/controls/fuel/switches/pump-right-1",
fuelRightSwitch2: "/controls/fuel/switches/pump-right-2",
fuelTempLeftOuter: "/consumables/fuel/tank[0]/temperature_degC",
fuelTempLeftInner: "/consumables/fuel/tank[1]/temperature_degC",
fuelTempRightOuter: "/consumables/fuel/tank[4]/temperature_degC",
fuelTempRightInner: "/consumables/fuel/tank[3]/temperature_degC",
fuelLeftOuterQty: "/consumables/fuel/tank[0]/level-lbs",
fuelLeftInnerQty: "/consumables/fuel/tank[1]/level-lbs",
fuelRightOuterQty: "/consumables/fuel/tank[4]/level-lbs",
fuelRightInnerQty: "/consumables/fuel/tank[3]/level-lbs",
fuelCenterQty: "/consumables/fuel/tank[2]/level-lbs",
fuelTotalLbs: "/consumables/fuel/total-fuel-lbs",
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 System Display", name, input[name]));
}

View file

@ -0,0 +1,528 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
var elec_pump_y_ovht = props.globals.initNode("/systems/hydraulic/elec-pump-yellow-ovht", 0, "BOOL");
var elec_pump_b_ovht = props.globals.initNode("/systems/hydraulic/elec-pump-blue-ovht", 0, "BOOL");
var y_resv_ovht = props.globals.initNode("/systems/hydraulic/yellow-resv-ovht", 0, "BOOL");
var b_resv_ovht = props.globals.initNode("/systems/hydraulic/blue-resv-ovht", 0, "BOOL");
var g_resv_ovht = props.globals.initNode("/systems/hydraulic/green-resv-ovht", 0, "BOOL");
var y_resv_lo_press = props.globals.initNode("/systems/hydraulic/yellow-resv-lo-air-press", 0, "BOOL");
var b_resv_lo_press = props.globals.initNode("/systems/hydraulic/blue-resv-lo-air-press", 0, "BOOL");
var g_resv_lo_press = props.globals.initNode("/systems/hydraulic/green-resv-lo-air-press", 0, "BOOL");
var canvas_lowerECAMPageHyd =
{
new: func(svg,name) {
var obj = {parents: [canvas_lowerECAMPageHyd,canvas_lowerECAM_base] };
obj.group = obj.canvas.createGroup();
obj.name = name;
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
foreach(var key; obj.getKeys()) {
obj[key] = obj.group.getElementById(key);
var clip_el = obj.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],
tran_rect[2],
tran_rect[3],
tran_rect[0]);
obj[key].set("clip", clip_rect);
obj[key].set("clip-frame", canvas.Element.PARENT);
}
};
foreach(var key; obj.getKeysBottom()) {
obj[key] = obj.group.getElementById(key);
};
obj.units = acconfig_weight_kgs.getValue();
# init
obj.update_items = [
props.UpdateManager.FromHashValue("blue", 25, func(val) {
if (val >= 100) {
obj["Press-Blue"].setText(sprintf("%s", math.round(val, 50)));
} else {
obj["Press-Blue"].setText(sprintf("%s", 0));
}
if (val > 1450) {
obj["Blue-Line"].setColor(0.0509,0.7529,0.2941);
obj["Blue-Line"].setColorFill(0.0509,0.7529,0.2941);
obj["Blue-Line-Top"].setColorFill(0.0509,0.7529,0.2941);
obj["Blue-Line-Bottom"].setColorFill(0.0509,0.7529,0.2941);
obj["Blue-Indicator"].setColor(0.0509,0.7529,0.2941);
obj["Press-Blue"].setColor(0.0509,0.7529,0.2941);
obj["Blue-label"].setColor(0.8078,0.8039,0.8078);
} else {
obj["Blue-Line"].setColor(0.7333,0.3803,0);
obj["Blue-Line"].setColorFill(0.7333,0.3803,0);
obj["Blue-Line-Top"].setColorFill(0.7333,0.3803,0);
obj["Blue-Line-Bottom"].setColorFill(0.7333,0.3803,0);
obj["Blue-Indicator"].setColor(0.7333,0.3803,0);
obj["Press-Blue"].setColor(0.7333,0.3803,0);
obj["Blue-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("yellow", 25, func(val) {
if (val >= 100) {
obj["Press-Yellow"].setText(sprintf("%s", math.round(val, 50)));
} else {
obj["Press-Yellow"].setText(sprintf("%s", 0));
}
if (val > 1450) {
obj["Yellow-Line"].setColor(0.0509,0.7529,0.2941);
obj["Yellow-Line"].setColorFill(0.0509,0.7529,0.2941);
obj["Yellow-Line-Top"].setColorFill(0.0509,0.7529,0.2941);
obj["Yellow-Line-Middle"].setColorFill(0.0509,0.7529,0.2941);
obj["Yellow-Line-Bottom"].setColorFill(0.0509,0.7529,0.2941);
obj["Yellow-Indicator"].setColor(0.0509,0.7529,0.2941);
obj["Press-Yellow"].setColor(0.0509,0.7529,0.2941);
obj["Yellow-label"].setColor(0.8078,0.8039,0.8078);
} else {
obj["Yellow-Line"].setColor(0.7333,0.3803,0);
obj["Yellow-Line"].setColorFill(0.7333,0.3803,0);
obj["Yellow-Line-Top"].setColorFill(0.7333,0.3803,0);
obj["Yellow-Line-Middle"].setColorFill(0.7333,0.3803,0);
obj["Yellow-Line-Bottom"].setColorFill(0.7333,0.3803,0);
obj["Yellow-Indicator"].setColor(0.7333,0.3803,0);
obj["Press-Yellow"].setColor(0.7333,0.3803,0);
obj["Yellow-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("green", 25, func(val) {
if (val >= 100) {
obj["Press-Green"].setText(sprintf("%s", math.round(val, 50)));
} else {
obj["Press-Green"].setText(sprintf("%s", 0));
}
if (val > 1450) {
obj["Green-Line"].setColor(0.0509,0.7529,0.2941);
obj["Green-Line"].setColorFill(0.0509,0.7529,0.2941);
obj["Green-Line-Top"].setColorFill(0.0509,0.7529,0.2941);
obj["Green-Line-Middle"].setColorFill(0.0509,0.7529,0.2941);
obj["Green-Line-Bottom"].setColorFill(0.0509,0.7529,0.2941);
obj["Green-Indicator"].setColor(0.0509,0.7529,0.2941);
obj["Press-Green"].setColor(0.0509,0.7529,0.2941);
obj["Green-label"].setColor(0.8078,0.8039,0.8078);
} else {
obj["Green-Line"].setColor(0.7333,0.3803,0);
obj["Green-Line"].setColorFill(0.7333,0.3803,0);
obj["Green-Line-Top"].setColorFill(0.7333,0.3803,0);
obj["Green-Line-Middle"].setColorFill(0.7333,0.3803,0);
obj["Green-Line-Bottom"].setColorFill(0.7333,0.3803,0);
obj["Green-Indicator"].setColor(0.7333,0.3803,0);
obj["Press-Green"].setColor(0.7333,0.3803,0);
obj["Green-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("N2_actual_1", 0.5, func(val) {
if (val >= 59) {
obj["Pump-Green-label"].setColor(0.8078,0.8039,0.8078);
} else {
obj["Pump-Green-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("N2_actual_2", 0.5, func(val) {
if (val >= 59) {
obj["Pump-Yellow-label"].setColor(0.8078,0.8039,0.8078);
} else {
obj["Pump-Yellow-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("hydBlueResvLoPrs", nil, func(val) {
if (val) {
obj["LO-AIR-PRESS-Blue"].show();
} else {
obj["LO-AIR-PRESS-Blue"].hide();
}
}),
props.UpdateManager.FromHashValue("hydGreenResvLoPrs", nil, func(val) {
if (val) {
obj["LO-AIR-PRESS-Green"].show();
} else {
obj["LO-AIR-PRESS-Green"].hide();
}
}),
props.UpdateManager.FromHashValue("hydYellowResvLoPrs", nil, func(val) {
if (val) {
obj["LO-AIR-PRESS-Yellow"].show();
} else {
obj["LO-AIR-PRESS-Yellow"].hide();
}
}),
props.UpdateManager.FromHashValue("hydYellowElecPumpOvht", nil, func(val) {
if (val) {
obj["ELEC-OVHT-Yellow"].show();
} else {
obj["ELEC-OVHT-Yellow"].hide();
}
}),
props.UpdateManager.FromHashValue("hydBlueElecPumpOvht", nil, func(val) {
if (val) {
obj["ELEC-OVHT-Blue"].show();
} else {
obj["ELEC-OVHT-Blue"].hide();
}
}),
props.UpdateManager.FromHashValue("hydBlueResvOvht", nil, func(val) {
if (val) {
obj["OVHT-Blue"].show();
} else {
obj["OVHT-Blue"].hide();
}
}),
props.UpdateManager.FromHashValue("hydGreenResvOvht", nil, func(val) {
if (val) {
obj["OVHT-Green"].show();
} else {
obj["OVHT-Green"].hide();
}
}),
props.UpdateManager.FromHashValue("hydYellowResvOvht", nil, func(val) {
if (val) {
obj["OVHT-Yellow"].show();
} else {
obj["OVHT-Yellow"].hide();
}
}),
props.UpdateManager.FromHashValue("hydRATPosition", nil, func(val) {
if (val) {
obj["RAT-stowed"].hide();
obj["RAT-not-stowed"].show();
} else {
obj["RAT-stowed"].show();
obj["RAT-not-stowed"].hide();
}
}),
props.UpdateManager.FromHashValue("hydGreenFireValve", nil, func(val) {
if (val != 0) {
obj["Fire-Valve-Green"].setColor(0.7333,0.3803,0);
obj["Fire-Valve-Green-Cross"].setColorFill(0.7333,0.3803,0);
obj["Fire-Valve-Green"].setRotation(90 * D2R);
} else {
obj["Fire-Valve-Green"].setColor(0.0509,0.7529,0.2941);
obj["Fire-Valve-Green-Cross"].setColorFill(0.0509,0.7529,0.2941);
obj["Fire-Valve-Green"].setRotation(0);
}
}),
props.UpdateManager.FromHashValue("hydYellowFireValve", nil, func(val) {
if (val != 0) {
obj["Fire-Valve-Yellow"].setColor(0.7333,0.3803,0);
obj["Fire-Valve-Yellow-Cross"].setColorFill(0.7333,0.3803,0);
obj["Fire-Valve-Yellow"].setRotation(90 * D2R);
} else {
obj["Fire-Valve-Yellow"].setColor(0.0509,0.7529,0.2941);
obj["Fire-Valve-Yellow-Cross"].setColorFill(0.0509,0.7529,0.2941);
obj["Fire-Valve-Yellow"].setRotation(0);
}
}),
props.UpdateManager.FromHashList(["elecAC1","dcEss"], 1, func(val) {
if (val.elecAC1 >= 110 and val.dcEss >= 25) {
obj["ELEC-Blue-label"].setColor(0.8078,0.8039,0.8078);
} else {
obj["ELEC-Blue-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["elecAC2","dc2"], 1, func(val) {
if (val.elecAC2 >= 110 and val.dc2 >= 25) {
obj["ELEC-Yellow-label"].setColor(0.8078,0.8039,0.8078);
} else {
obj["ELEC-Yellow-label"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["yellow","hydYellowElecPumpSwitch"], nil, func(val) {
if (!val.hydYellowElecPumpSwitch) {
obj["ELEC-Yellow-on"].hide();
obj["ELEC-Yellow-off"].show();
} else {
obj["ELEC-Yellow-on"].show();
obj["ELEC-Yellow-off"].hide();
if (val.yellow > 1450) {
obj["ELEC-Yellow-on"].setColor(0.0509,0.7529,0.2941);
} else {
obj["ELEC-Yellow-on"].setColor(0.7333,0.3803,0);
}
}
}),
props.UpdateManager.FromHashList(["blue","hydBlueElecPumpSwitch"], nil, func(val) {
if (val.hydBlueElecPumpSwitch) {
obj["Pump-Blue-off"].hide();
if (val.blue > 1450) {
obj["Pump-Blue-on"].show();
obj["Pump-LOPR-Blue"].hide();
obj["Pump-Blue"].setColorFill(0.0509,0.7529,0.2941);
obj["Pump-Blue"].setColor(0.0509,0.7529,0.2941);
} else {
obj["Pump-Blue-on"].hide();
obj["Pump-LOPR-Blue"].show();
obj["Pump-Blue"].setColorFill(0.7333,0.3803,0);
obj["Pump-Blue"].setColor(0.7333,0.3803,0);
}
} else {
obj["Pump-Blue-off"].show();
obj["Pump-Blue-on"].hide();
obj["Pump-LOPR-Blue"].hide();
obj["Pump-Blue"].setColorFill(0.7333,0.3803,0);
obj["Pump-Blue"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["yellow","hydYellowEDPPumpSwitch"], nil, func(val) {
if (val.hydYellowEDPPumpSwitch) {
obj["Pump-Yellow-off"].hide();
if (val.yellow > 1450) {
obj["Pump-Yellow-on"].show();
obj["Pump-LOPR-Yellow"].hide();
obj["Pump-Yellow"].setColorFill(0.0509,0.7529,0.2941);
obj["Pump-Yellow"].setColor(0.0509,0.7529,0.2941);
} else {
obj["Pump-Yellow-on"].hide();
obj["Pump-LOPR-Yellow"].show();
obj["Pump-Yellow"].setColorFill(0.7333,0.3803,0);
obj["Pump-Yellow"].setColor(0.7333,0.3803,0);
}
} else {
obj["Pump-Yellow-off"].show();
obj["Pump-Yellow-on"].hide();
obj["Pump-LOPR-Yellow"].hide();
obj["Pump-Yellow"].setColorFill(0.7333,0.3803,0);
obj["Pump-Yellow"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["green","hydGreenEDPPumpSwitch"], nil, func(val) {
if (val.hydGreenEDPPumpSwitch) {
obj["Pump-Green-off"].hide();
if (val.green > 1450) {
obj["Pump-Green-on"].show();
obj["Pump-LOPR-Green"].hide();
obj["Pump-Green"].setColor(0.0509,0.7529,0.2941);
obj["Pump-Green"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["Pump-Green-on"].hide();
obj["Pump-LOPR-Green"].show();
obj["Pump-Green"].setColor(0.7333,0.3803,0);
obj["Pump-Green"].setColorFill(0.7333,0.3803,0);
}
} else {
obj["Pump-Green-off"].show();
obj["Pump-Green-on"].hide();
obj["Pump-LOPR-Green"].hide();
obj["Pump-Green"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashList(["hydPTUSwitch","hydPTUDiff","hydPTUActive","hydPTUFault"], nil, func(val) {
if (val.hydPTUSwitch and !val.hydPTUFault) {
obj["PTU-connection"].setColor(0.0509,0.7529,0.2941);
if (val.hydPTUActive) {
if (val.hydPTUDiff < 0) {
obj["PTU-Supply-Line"].show();
obj["PTU-supply-yellow"].show();
obj["PTU-supply-green"].hide();
obj["PTU-Auto-or-off"].hide();
} else {
obj["PTU-Supply-Line"].show();
obj["PTU-supply-yellow"].hide();
obj["PTU-supply-green"].show();
obj["PTU-Auto-or-off"].hide();
}
} else {
obj["PTU-Auto-or-off"].setColor(0.0509,0.7529,0.2941);
obj["PTU-Supply-Line"].hide();
obj["PTU-supply-yellow"].hide();
obj["PTU-supply-green"].hide();
obj["PTU-Auto-or-off"].show();
}
} else {
obj["PTU-connection"].setColor(0.7333,0.3803,0);
obj["PTU-Auto-or-off"].setColor(0.7333,0.3803,0);
obj["PTU-Supply-Line"].hide();
obj["PTU-supply-yellow"].hide();
obj["PTU-supply-green"].hide();
obj["PTU-Auto-or-off"].show();
}
}),
props.UpdateManager.FromHashValue("hydBlueQTY", 0.05, func(val) {
obj["Quantity-Indicator-Blue"].setTranslation(0,((val / 8) * -140) + 140);
if (val >= 2.4) {
obj["Quantity-Indicator-Blue"].setColor(0.0509,0.7529,0.2941);
obj["path5561-4"].setColor(0.0509,0.7529,0.2941);
} else {
obj["Quantity-Indicator-Blue"].setColor(0.7333,0.3803,0);
obj["path5561-4"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("hydGreenQTY", 0.05, func(val) {
obj["Quantity-Indicator-Green"].setTranslation(0,((val / 18) * -140) + 140);
if (val >= 3.5) {
obj["Quantity-Indicator-Green"].setColor(0.0509,0.7529,0.2941);
obj["path5561-5"].setColor(0.0509,0.7529,0.2941);
} else {
obj["Quantity-Indicator-Green"].setColor(0.7333,0.3803,0);
obj["path5561-5"].setColor(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("hydYellowQTY", 0.05, func(val) {
obj["Quantity-Indicator-Yellow"].setTranslation(0,((val / 15) * -140) + 140);
if (val >= 3.5) {
obj["Quantity-Indicator-Yellow"].setColor(0.0509,0.7529,0.2941);
obj["path5561"].setColor(0.0509,0.7529,0.2941);
} else {
obj["Quantity-Indicator-Yellow"].setColor(0.7333,0.3803,0);
obj["path5561"].setColor(0.7333,0.3803,0);
}
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
];
return obj;
},
getKeysBottom: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit","Green-Indicator","HYD-Quantity-Group-Blue","HYD-Quantity-Group-Yellow","HYD-Quantity-Group-Green","Blue-Indicator","Yellow-Indicator","Press-Green","Press-Blue","Press-Yellow","Green-Line","Blue-Line","Yellow-Line","Green-Line-Top","Blue-Line-Top","Yellow-Line-Middle","Green-Line-Middle","Yellow-Line-Bottom","Green-Line-Bottom","Blue-Line-Bottom","Yellow-Line-Top","PTU-Supply-Line","PTU-supply-yellow","PTU-supply-green","PTU-connection",
"PTU-Auto-or-off","RAT-label","RAT-stowed","RAT-not-stowed","ELEC-Yellow-off","ELEC-Yellow-on","ELEC-Yellow-label","ELEC-OVTH-Yellow","ELEC-Blue-label","ELEC-OVHT-Blue","ELEC-OVHT-Yellow","Pump-Green-label","Pump-Yellow-label","Pump-Green",
"Pump-LOPR-Green","Pump-Green-off","Pump-Green-on","Pump-Yellow","Pump-LOPR-Yellow","Pump-Yellow-off","Pump-Yellow-on","Pump-Blue","Pump-LOPR-Blue","Pump-Blue-off","Pump-Blue-on","Fire-Valve-Green","Fire-Valve-Yellow","LO-AIR-PRESS-Green",
"LO-AIR-PRESS-Yellow","LO-AIR-PRESS-Blue","OVHT-Green","OVHT-Blue","OVHT-Yellow","Quantity-Indicator-Green","Quantity-Indicator-Blue","Quantity-Indicator-Yellow","Green-label","Blue-label","Yellow-label","Fire-Valve-Yellow-Cross","Fire-Valve-Green-Cross","path5561","path5561-4","path5561-5"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
}
me["GW"].setColor(0.0509,0.7529,0.2941);
} else {
me["GW"].setText(sprintf("%s", "-----"));
me["GW"].setColor(0.0901,0.6039,0.7176);
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setColor(0.7333,0.3803,0);
}
},
update: func(notification) {
me.updatePower();
if (me.test.getVisible() == 1) {
me.updateTest(notification);
}
if (me.group.getVisible() == 0) {
return;
}
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
me.updateBottom(notification);
},
updatePower: func() {
if (me.name == ecam.SystemDisplayController.displayedPage.name) {
if (du4_lgt.getValue() > 0.01 and systems.ELEC.Bus.ac2.getValue() >= 110) {
if (du4_test_time.getValue() + du4_test_amount.getValue() >= pts.Sim.Time.elapsedSec.getValue()) {
me.group.setVisible(0);
me.test.setVisible(1);
} else {
me.group.setVisible(1);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
# don't hide the test group; just let whichever page is active control it
}
},
};
var input = {
hydBlueResvOvht: "/systems/hydraulic/blue-resv-ovht",
hydGreenResvOvht: "/systems/hydraulic/green-resv-ovht",
hydYellowResvOvht: "/systems/hydraulic/yellow-resv-ovht",
hydBlueResvLoPrs: "/systems/hydraulic/blue-resv-lo-air-press",
hydGreenResvLoPrs: "/systems/hydraulic/green-resv-lo-air-press",
hydYellowResvLoPrs: "/systems/hydraulic/yellow-resv-lo-air-press",
hydYellowElecPumpOvht: "/systems/hydraulic/elec-pump-yellow-ovht",
hydBlueElecPumpOvht: "/systems/hydraulic/elec-pump-blue-ovht",
hydRATPosition: "/systems/hydraulic/sources/rat/position",
hydGreenFireValve: "/systems/hydraulic/sources/green-edp/fire-valve",
hydYellowFireValve: "/systems/hydraulic/sources/yellow-edp/fire-valve",
hydBlueElecPumpSwitch: "/controls/hydraulic/switches/blue-elec",
hydGreenEDPPumpSwitch: "/controls/hydraulic/switches/green-edp",
hydYellowElecPumpSwitch: "/controls/hydraulic/switches/yellow-elec",
hydYellowEDPPumpSwitch: "/controls/hydraulic/switches/yellow-edp",
hydPTUSwitch: "/controls/hydraulic/switches/ptu",
hydPTUFault: "/systems/failures/hydraulic/ptu",
hydPTUActive: "/systems/hydraulic/sources/ptu/ptu-hydraulic-condition",
hydPTUDiff: "/systems/hydraulic/yellow-psi-diff",
hydBlueQTY: "/systems/hydraulic/blue-qty",
hydGreenQTY: "/systems/hydraulic/green-qty",
hydYellowQTY: "/systems/hydraulic/yellow-qty",
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 System Display", name, input[name]));
}

View file

@ -0,0 +1,229 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
var canvas_lowerECAMPagePress =
{
new: func(svg,name) {
var obj = {parents: [canvas_lowerECAMPagePress,canvas_lowerECAM_base] };
obj.group = obj.canvas.createGroup();
obj.name = name;
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
foreach(var key; obj.getKeys()) {
obj[key] = obj.group.getElementById(key);
};
foreach(var key; obj.getKeysBottom()) {
obj[key] = obj.group.getElementById(key);
};
obj.units = acconfig_weight_kgs.getValue();
# init
obj["PRESS-Sys-2"].hide();
obj["PRESS-Outlet-Transit-Failed"].hide();
obj["PRESS-Inlet-Transit-Failed"].hide();
obj.update_items = [
props.UpdateManager.FromHashValue("pressDelta", 0.05, func(val) {
if (val > 31.9) {
obj["PRESS-deltaP"].setText(sprintf("%2.1f", 31.9));
} else if (val < -9.9) {
obj["PRESS-deltaP"].setText(sprintf("%2.1f", -9.9));
} else {
obj["PRESS-deltaP"].setText(sprintf("%2.1f", val));
}
if (val < -0.4 or val > 8.5) {
obj["PRESS-deltaP"].setColor(0.7333,0.3803,0);
} else {
obj["PRESS-deltaP"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("pressVS", 25, func(val) {
if (val > 9950) {
obj["PRESS-Cab-VS"].setText(sprintf("%4.0f", 9950));
} else if (val < -9950) {
obj["PRESS-Cab-VS"].setText(sprintf("%4.0f", -9950));
} else {
obj["PRESS-Cab-VS"].setText(sprintf("%-4.0f", math.round(val,50)));
}
if (abs(val) > 2000) {
obj["PRESS-Cab-VS"].setColor(0.7333,0.3803,0);
} else {
obj["PRESS-Cab-VS"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("pressAlt", 25, func(val) {
if (val > 32750) {
obj["PRESS-Cab-Alt"].setText(sprintf("%5.0f", 32750));
} else if (val < -9950) {
obj["PRESS-Cab-Alt"].setText(sprintf("%5.0f", -9950));
} else {
obj["PRESS-Cab-Alt"].setText(sprintf("%5.0f", math.round(val,50)));
}
if (val > 9550) {
obj["PRESS-Cab-Alt"].setColor(1,0,0);
} else {
obj["PRESS-Cab-Alt"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("pressAuto", nil, func(val) {
if (val) {
obj["PRESS-Man"].hide();
obj["PRESS-Sys-1"].show();
} else {
obj["PRESS-Man"].show();
obj["PRESS-Sys-1"].hide();
}
}),
props.UpdateManager.FromHashList(["flowCtlValve1","engine1State"], nil, func(val) {
if (val.flowCtlValve1 == 0 and val.engine1State == 3) {
obj["PRESS-Pack-1-Triangle"].setColor(0.7333,0.3803,0);
obj["PRESS-Pack-1"].setColor(0.7333,0.3803,0);
} else {
obj["PRESS-Pack-1-Triangle"].setColor(0.0509,0.7529,0.2941);
obj["PRESS-Pack-1"].setColor(0.8078,0.8039,0.8078);
}
}),
props.UpdateManager.FromHashList(["flowCtlValve2","engine2State"], nil, func(val) {
if (val.flowCtlValve2 == 0 and val.engine2State == 3) {
obj["PRESS-Pack-2-Triangle"].setColor(0.7333,0.3803,0);
obj["PRESS-Pack-2"].setColor(0.7333,0.3803,0);
} else {
obj["PRESS-Pack-2-Triangle"].setColor(0.0509,0.7529,0.2941);
obj["PRESS-Pack-2"].setColor(0.8078,0.8039,0.8078);
}
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
];
return obj;
},
getKeysBottom: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
return["PRESS-Cab-VS", "PRESS-Cab-VS-neg", "PRESS-Cab-Alt", "PRESS-deltaP", "PRESS-LDG-Elev", "PRESS-deltaP-needle", "PRESS-VS-needle", "PRESS-Alt-needle",
"PRESS-Man", "PRESS-Sys-1", "PRESS-Sys-2", "PRESS-Outlet-Transit-Failed", "PRESS-Inlet-Transit-Failed", "PRESS-LDG-Elev-mode","PRESS-Pack-1-Triangle","PRESS-Pack-2-Triangle",
"PRESS-Pack-1","PRESS-Pack-2"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
}
me["GW"].setColor(0.0509,0.7529,0.2941);
} else {
me["GW"].setText(sprintf("%s", "-----"));
me["GW"].setColor(0.0901,0.6039,0.7176);
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setColor(0.7333,0.3803,0);
}
},
update: func(notification) {
me.updatePower();
if (me.test.getVisible() == 1) {
me.updateTest(notification);
}
if (me.group.getVisible() == 0) {
return;
}
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
me.updateBottom(notification);
},
updatePower: func() {
if (me.name == ecam.SystemDisplayController.displayedPage.name) {
if (du4_lgt.getValue() > 0.01 and systems.ELEC.Bus.ac2.getValue() >= 110) {
if (du4_test_time.getValue() + du4_test_amount.getValue() >= pts.Sim.Time.elapsedSec.getValue()) {
me.group.setVisible(0);
me.test.setVisible(1);
} else {
me.group.setVisible(1);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
# don't hide the test group; just let whichever page is active control it
}
},
};
var input = {
pressAlt: "/systems/pressurization/cabinalt-norm",
pressAuto: "/systems/pressurization/auto",
pressDelta: "/systems/pressurization/deltap-norm",
pressVS: "/systems/pressurization/vs-norm",
flowCtlValve1: "/systems/air-conditioning/valves/flow-control-valve-1",
flowCtlValve2: "/systems/air-conditioning/valves/flow-control-valve-2",
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 System Display", name, input[name]));
}

View file

@ -0,0 +1,147 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
var canvas_lowerECAMPageSts =
{
new: func(svg,name) {
var obj = {parents: [canvas_lowerECAMPageSts,canvas_lowerECAM_base] };
obj.group = obj.canvas.createGroup();
obj.name = name;
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
foreach(var key; obj.getKeys()) {
obj[key] = obj.group.getElementById(key);
};
foreach(var key; obj.getKeysBottom()) {
obj[key] = obj.group.getElementById(key);
};
obj.units = acconfig_weight_kgs.getValue();
# init
obj.update_items = [
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
];
return obj;
},
getKeysBottom: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
return["Bulk","BulkLine","BulkLbl","Exit1L","Exit1R","Cabin1Left","Cabin1LeftLbl","Cabin1LeftLine","Cabin1LeftSlide","Cabin1Right","Cabin1RightLbl","Cabin1RightLine","Cabin1RightSlide","Cabin2Left","Cabin2LeftLbl",
"Cabin2LeftLine","Cabin2LeftSlide","Cabin2Right","Cabin2RightLbl","Cabin2RightLine","Cabin2RightSlide","Cabin3Left","Cabin3LeftLbl","Cabin3LeftLine","Cabin3LeftSlide","Cabin3Right","Cabin3RightLbl","Cabin3RightLine","Cabin3RightSlide","AvionicsLine1",
"AvionicsLbl1","AvionicsLine2","AvionicsLbl2","Cargo1Line","Cargo1Lbl","Cargo1Door","Cargo2Line","Cargo2Lbl","Cargo2Door","ExitLSlide","ExitLLine","ExitLLbl","ExitRSlide","ExitRLine","ExitRLbl","Cabin4Left","Cabin4LeftLbl","Cabin4LeftLine",
"Cabin4LeftSlide","Cabin4Right","Cabin4RightLbl","Cabin4RightLine","Cabin4RightSlide","DOOROXY-REGUL-LO-PR"];},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
}
me["GW"].setColor(0.0509,0.7529,0.2941);
} else {
me["GW"].setText(sprintf("%s", "-----"));
me["GW"].setColor(0.0901,0.6039,0.7176);
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setColor(0.7333,0.3803,0);
}
},
update: func(notification) {
me.updatePower();
if (me.test.getVisible() == 1) {
me.updateTest(notification);
}
if (me.group.getVisible() == 0) {
return;
}
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
me.updateBottom(notification);
},
updatePower: func() {
if (me.name == ecam.SystemDisplayController.displayedPage.name) {
if (du4_lgt.getValue() > 0.01 and systems.ELEC.Bus.ac2.getValue() >= 110) {
if (du4_test_time.getValue() + du4_test_amount.getValue() >= pts.Sim.Time.elapsedSec.getValue()) {
me.group.setVisible(0);
me.test.setVisible(1);
} else {
me.group.setVisible(1);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
# don't hide the test group; just let whichever page is active control it
}
},
};
var input = {
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 System Display", name, input[name]));
}

View file

@ -0,0 +1,745 @@
# A3XX Lower ECAM Canvas
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath
var canvas_lowerECAMPageWheel =
{
new: func(svg,name) {
var obj = {parents: [canvas_lowerECAMPageWheel,canvas_lowerECAM_base] };
obj.group = obj.canvas.createGroup();
obj.name = name;
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
foreach(var key; obj.getKeys()) {
obj[key] = obj.group.getElementById(key);
};
foreach(var key; obj.getKeysBottom()) {
obj[key] = obj.group.getElementById(key);
};
obj.units = acconfig_weight_kgs.getValue();
# init
obj["leftuplock"].hide();
obj["noseuplock"].hide();
obj["rightuplock"].hide();
obj["tirepress1"].hide();
obj["tirepress2"].hide();
obj["tirepress3"].hide();
obj["tirepress4"].hide();
obj["tirepress5"].hide();
obj["tirepress6"].hide();
obj.update_items = [
props.UpdateManager.FromHashList(["gearPosNorm","gearPosNorm1","gearPosNorm2","gearLever"], nil, func(val) {
if (val.gearLever and (val.gearPosNorm != 1 or val.gearPosNorm1 != 1 or val.gearPosNorm2 != 1)) {
obj["lgctltext"].show();
} elsif (!val.gearLever and (val.gearPosNorm != 0 or val.gearPosNorm1 != 0 or val.gearPosNorm2 != 0)) {
obj["lgctltext"].show();
} else {
obj["lgctltext"].hide();
}
}),
props.UpdateManager.FromHashValue("gearPosNorm", nil, func(val) {
if (val < 0.2) {
obj["Triangle-Nose1"].hide();
obj["Triangle-Nose2"].hide();
} else {
obj["Triangle-Nose1"].show();
obj["Triangle-Nose2"].show();
}
if (val == 1) {
obj["Triangle-Nose1"].setColor(0.0509,0.7529,0.2941);
obj["Triangle-Nose2"].setColor(0.0509,0.7529,0.2941);
} else {
obj["Triangle-Nose1"].setColor(1,0,0);
obj["Triangle-Nose2"].setColor(1,0,0);
}
}),
props.UpdateManager.FromHashValue("gearPosNorm1", nil, func(val) {
if (val < 0.2) {
obj["Triangle-Left1"].hide();
obj["Triangle-Left2"].hide();
} else {
obj["Triangle-Left1"].show();
obj["Triangle-Left2"].show();
}
if (val == 1) {
obj["Triangle-Left1"].setColor(0.0509,0.7529,0.2941);
obj["Triangle-Left2"].setColor(0.0509,0.7529,0.2941);
} else {
obj["Triangle-Left1"].setColor(1,0,0);
obj["Triangle-Left2"].setColor(1,0,0);
}
}),
props.UpdateManager.FromHashValue("gearPosNorm2", nil, func(val) {
if (val < 0.2) {
obj["Triangle-Right1"].hide();
obj["Triangle-Right2"].hide();
} else {
obj["Triangle-Right1"].show();
obj["Triangle-Right2"].show();
}
if (val == 1) {
obj["Triangle-Right1"].setColor(0.0509,0.7529,0.2941);
obj["Triangle-Right2"].setColor(0.0509,0.7529,0.2941);
} else {
obj["Triangle-Right1"].setColor(1,0,0);
obj["Triangle-Right2"].setColor(1,0,0);
}
}),
props.UpdateManager.FromHashList(["yellow","green","NWSSwitch","brakesMode","val.accumPressPsiPressPsi","leftBrakeFCS","rightBrakeFCS"], nil, func(val) {
if (val.NWSSwitch and val.yellow >= 1500) {
obj["NWStext"].hide();
obj["NWS"].hide();
obj["NWSrect"].hide();
} else if (!val.NWSSwitch and val.yellow >= 1500) {
obj["NWStext"].show();
obj["NWS"].show();
obj["NWS"].setColor(0.0509,0.7529,0.2941);
obj["NWSrect"].show();
} else {
obj["NWStext"].show();
obj["NWS"].show();
obj["NWS"].setColor(0.7333,0.3803,0);
obj["NWSrect"].show();
}
if ((val.yellow < 1500 and val.brakesMode == 1) or !val.NWSSwitch) {
obj["antiskidtext"].show();
obj["antiskidtext"].setColor(0.7333,0.3803,0);
obj["BSCUrect1"].show();
obj["BSCUrect2"].show();
obj["BSCU1"].show();
obj["BSCU2"].show();
} else {
obj["antiskidtext"].hide();
obj["BSCUrect1"].hide();
obj["BSCUrect2"].hide();
obj["BSCU1"].hide();
obj["BSCU2"].hide();
}
if (val.green >= 1500) {
obj["normbrkhyd"].setColor(0.0509,0.7529,0.2941);
} else {
obj["normbrkhyd"].setColor(0.7333,0.3803,0);
}
if (val.yellow >= 1500) {
obj["altnbrkhyd"].setColor(0.0509,0.7529,0.2941);
} else {
obj["altnbrkhyd"].setColor(0.7333,0.3803,0);
}
if (!val.NWSSwitch or val.green < 1500) {
obj["NORMbrk"].show();
obj["normbrk-rect"].show();
obj["normbrkhyd"].show();
} else {
obj["NORMbrk"].hide();
obj["normbrk-rect"].hide();
obj["normbrkhyd"].hide();
}
if (val.brakesMode != 2 or val.green < 1500 or val.yellow < 1500 or !val.NWSSwitch) {
obj["ALTNbrk"].hide();
obj["altnbrk-rect"].hide();
obj["altnbrkhyd"].hide();
} else {
obj["ALTNbrk"].show();
obj["altnbrk-rect"].show();
obj["altnbrkhyd"].show();
if (val.yellow < 1500 and val.accumPressPsi < 1500) {
obj["ALTNbrk"].setColor(0.7333,0.3803,0);
} else {
obj["ALTNbrk"].setColor(0.0509,0.7529,0.2941);
}
}
if (val.brakesMode == 2 and val.accumPressPsi < 200 and val.yellow < 1500) {
obj["accuonlyarrow"].hide();
obj["accuonly"].hide();
obj["accupress_text"].show();
obj["brakearrow"].hide();
obj["accupress_text"].setColor(0.7333,0.3803,0);
} else if (val.brakesMode == 2 and val.NWSSwitch and val.accumPressPsi > 200 and val.yellow >= 1500){
obj["accuonlyarrow"].hide();
obj["accuonly"].hide();
obj["accupress_text"].show();
obj["brakearrow"].show();
obj["accupress_text"].setColor(0.0509,0.7529,0.2941);
} else if (val.brakesMode == 2 and val.accumPressPsi > 200 and val.yellow < 1500) {
obj["accuonlyarrow"].show();
obj["accuonly"].show();
obj["brakearrow"].hide();
obj["accupress_text"].hide();
} else {
obj["accuonlyarrow"].hide();
obj["accuonly"].hide();
obj["brakearrow"].hide();
obj["accupress_text"].hide();
}
if (val.brakesMode == 1) {
obj["releaseL1"].hide();
obj["releaseL2"].hide();
obj["releaseL3"].hide();
obj["releaseL4"].hide();
obj["releaseR1"].hide();
obj["releaseR2"].hide();
obj["releaseR3"].hide();
obj["releaseR4"].hide();
} else { # Display if the brakes are released and in alternate braking
if (val.leftBrakeFCS == 0) {
obj["releaseL1"].show();
obj["releaseL2"].show();
obj["releaseL3"].show();
obj["releaseL4"].show();
} else {
obj["releaseL1"].hide();
obj["releaseL2"].hide();
obj["releaseL3"].hide();
obj["releaseL4"].hide();
}
if (val.rightBrakeFCS == 0) {
obj["releaseR1"].show();
obj["releaseR2"].show();
obj["releaseR3"].show();
obj["releaseR4"].show();
} else {
obj["releaseR1"].hide();
obj["releaseR2"].hide();
obj["releaseR3"].hide();
obj["releaseR4"].hide();
}
}
}),
props.UpdateManager.FromHashList(["brakeAutobrkMode","NWSSwitch"], nil, func(val) {
if (val.brakeAutobrkMode == 0) {
obj["autobrkind"].hide();
} elsif (val.brakeAutobrkMode == 1) {
obj["autobrkind"].show();
obj["autobrkind"].setText(sprintf("%s", "LO"));
} elsif (val.brakeAutobrkMode == 2) {
obj["autobrkind"].show();
obj["autobrkind"].setText(sprintf("%s", "MED"));
} elsif (val.brakeAutobrkMode == 3) {
obj["autobrkind"].show();
obj["autobrkind"].setText(sprintf("%s", "MAX"));
}
if (val.brakeAutobrkMode != 0 or !val.NWSSwitch) {
obj["autobrk"].show();
} else {
obj["autobrk"].hide();
}
if (!val.NWSSwitch) {
obj["autobrk"].setColor(0.7333,0.3803,0);
} else {
obj["autobrk"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("brakeLeft1", 0.5, func(val) {
obj["braketemp1"].setText(sprintf("%s", math.round(val, 5)));
if (val > 300) {
obj["braketemp1"].setColor(0.7333,0.3803,0);
obj["toparc1"].setColor(0.7333,0.3803,0);
} else {
if (val > 100 and val <= 300) {
obj["toparc1"].setColor(0.0509,0.7529,0.2941);
} else {
obj["toparc1"].setColor(0.8078,0.8039,0.8078);
}
obj["braketemp1"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("brakeLeft2", 0.5, func(val) {
obj["braketemp2"].setText(sprintf("%s", math.round(val, 5)));
if (val > 300) {
obj["braketemp2"].setColor(0.7333,0.3803,0);
obj["toparc2"].setColor(0.7333,0.3803,0);
} else {
if (val > 100 and val <= 300) {
obj["toparc2"].setColor(0.0509,0.7529,0.2941);
} else {
obj["toparc2"].setColor(0.8078,0.8039,0.8078);
}
obj["braketemp2"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("brakeRight1", 0.5, func(val) {
obj["braketemp3"].setText(sprintf("%s", math.round(val, 5)));
if (val > 300) {
obj["braketemp3"].setColor(0.7333,0.3803,0);
obj["toparc3"].setColor(0.7333,0.3803,0);
} else {
if (val > 100 and val <= 300) {
obj["toparc3"].setColor(0.0509,0.7529,0.2941);
} else {
obj["toparc3"].setColor(0.8078,0.8039,0.8078);
}
obj["braketemp3"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("brakeRight2", 0.5, func(val) {
obj["braketemp4"].setText(sprintf("%s", math.round(val, 5)));
if (val > 300) {
obj["braketemp4"].setColor(0.7333,0.3803,0);
obj["toparc4"].setColor(0.7333,0.3803,0);
} else {
if (val > 100 and val <= 300) {
obj["toparc4"].setColor(0.0509,0.7529,0.2941);
} else {
obj["toparc4"].setColor(0.8078,0.8039,0.8078);
}
obj["braketemp4"].setColor(0.0509,0.7529,0.2941);
}
}),
props.UpdateManager.FromHashValue("wheelLeftDoor", 0.5, func(val) {
obj["leftdoor"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashValue("wheelNoseLeftDoor", 0.5, func(val) {
obj["nosegeardoorL"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashValue("wheelNoseRightDoor", 0.5, func(val) {
obj["nosegeardoorR"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashValue("wheelRightDoor", 0.5, func(val) {
obj["rightdoor"].setRotation(val * D2R);
}),
props.UpdateManager.FromHashValue("wheelLeftDoorPos", 0.01, func(val) {
if (val == 0) {
obj["leftdoor"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["leftdoor"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("wheelNoseDoorPos", 0.01, func(val) {
if (val == 0) {
obj["nosegeardoorL"].setColorFill(0.0509,0.7529,0.2941);
obj["nosegeardoorR"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["nosegeardoorL"].setColorFill(0.7333,0.3803,0);
obj["nosegeardoorR"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("wheelRightDoorPos", 0.01, func(val) {
if (val == 0) {
obj["rightdoor"].setColorFill(0.0509,0.7529,0.2941);
} else {
obj["rightdoor"].setColorFill(0.7333,0.3803,0);
}
}),
props.UpdateManager.FromHashValue("spoilerL1", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler1Lex"].hide();
obj["spoiler1Lrt"].show();
} else {
obj["spoiler1Lrt"].hide();
obj["spoiler1Lex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerL2", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler2Lex"].hide();
obj["spoiler2Lrt"].show();
} else {
obj["spoiler2Lrt"].hide();
obj["spoiler2Lex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerL3", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler3Lex"].hide();
obj["spoiler3Lrt"].show();
} else {
obj["spoiler3Lrt"].hide();
obj["spoiler3Lex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerL4", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler4Lex"].hide();
obj["spoiler4Lrt"].show();
} else {
obj["spoiler4Lrt"].hide();
obj["spoiler4Lex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerL5", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler5Lex"].hide();
obj["spoiler5Lrt"].show();
} else {
obj["spoiler5Lrt"].hide();
obj["spoiler5Lex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerR1", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler1Rex"].hide();
obj["spoiler1Rrt"].show();
} else {
obj["spoiler1Rrt"].hide();
obj["spoiler1Rex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerR2", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler2Rex"].hide();
obj["spoiler2Rrt"].show();
} else {
obj["spoiler2Rrt"].hide();
obj["spoiler2Rex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerR3", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler3Rex"].hide();
obj["spoiler3Rrt"].show();
} else {
obj["spoiler3Rrt"].hide();
obj["spoiler3Rex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerR4", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler4Rex"].hide();
obj["spoiler4Rrt"].show();
} else {
obj["spoiler4Rrt"].hide();
obj["spoiler4Rex"].show();
}
}),
props.UpdateManager.FromHashValue("spoilerR5", 0.5, func(val) {
if (val < 1.5) {
obj["spoiler5Rex"].hide();
obj["spoiler5Rrt"].show();
} else {
obj["spoiler5Rrt"].hide();
obj["spoiler5Rex"].show();
}
}),
props.UpdateManager.FromHashList(["spoilerL1Failure","spoilerL1","green"], nil, func(val) {
if (val.spoilerL1Failure or val.green < 1500) {
obj["spoiler1Lex"].setColor(0.7333,0.3803,0);
obj["spoiler1Lrt"].setColor(0.7333,0.3803,0);
if (val.spoilerL1 < 1.5) {
obj["spoiler1Lf"].show();
} else {
obj["spoiler1Lf"].hide();
}
} else {
obj["spoiler1Lex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler1Lrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler1Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL2Failure","spoilerL2","yellow"], nil, func(val) {
if (val.spoilerL2Failure or val.yellow < 1500) {
obj["spoiler2Lex"].setColor(0.7333,0.3803,0);
obj["spoiler2Lrt"].setColor(0.7333,0.3803,0);
if (val.spoilerL2 < 1.5) {
obj["spoiler2Lf"].show();
} else {
obj["spoiler2Lf"].hide();
}
} else {
obj["spoiler2Lex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler2Lrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler2Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL3Failure","spoilerL3","blue"], nil, func(val) {
if (val.spoilerL3Failure or val.blue < 1500) {
obj["spoiler3Lex"].setColor(0.7333,0.3803,0);
obj["spoiler3Lrt"].setColor(0.7333,0.3803,0);
if (val.spoilerL3 < 1.5) {
obj["spoiler3Lf"].show();
} else {
obj["spoiler3Lf"].hide();
}
} else {
obj["spoiler3Lex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler3Lrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler3Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL4Failure","spoilerL4","yellow"], nil, func(val) {
if (val.spoilerL4Failure or val.yellow < 1500) {
obj["spoiler4Lex"].setColor(0.7333,0.3803,0);
obj["spoiler4Lrt"].setColor(0.7333,0.3803,0);
if (val.spoilerL4 < 1.5) {
obj["spoiler4Lf"].show();
} else {
obj["spoiler4Lf"].hide();
}
} else {
obj["spoiler4Lex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler4Lrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler4Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerL5Failure","spoilerL5","green"], nil, func(val) {
if (val.spoilerL5Failure or val.green < 1500) {
obj["spoiler5Lex"].setColor(0.7333,0.3803,0);
obj["spoiler5Lrt"].setColor(0.7333,0.3803,0);
if (val.spoilerL5 < 1.5) {
obj["spoiler5Lf"].show();
} else {
obj["spoiler5Lf"].hide();
}
} else {
obj["spoiler5Lex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler5Lrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler5Lf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR1Failure","spoilerR1","green"], nil, func(val) {
if (val.spoilerR1Failure or val.green < 1500) {
obj["spoiler1Rex"].setColor(0.7333,0.3803,0);
obj["spoiler1Rrt"].setColor(0.7333,0.3803,0);
if (val.spoilerR1 < 1.5) {
obj["spoiler1Rf"].show();
} else {
obj["spoiler1Rf"].hide();
}
} else {
obj["spoiler1Rex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler1Rrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler1Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR2Failure","spoilerR2","yellow"], nil, func(val) {
if (val.spoilerR2Failure or val.yellow < 1500) {
obj["spoiler2Rex"].setColor(0.7333,0.3803,0);
obj["spoiler2Rrt"].setColor(0.7333,0.3803,0);
if (val.spoilerR2 < 1.5) {
obj["spoiler2Rf"].show();
} else {
obj["spoiler2Rf"].hide();
}
} else {
obj["spoiler2Rex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler2Rrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler2Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR3Failure","spoilerR3","blue"], nil, func(val) {
if (val.spoilerR3Failure or val.blue < 1500) {
obj["spoiler3Rex"].setColor(0.7333,0.3803,0);
obj["spoiler3Rrt"].setColor(0.7333,0.3803,0);
if (val.spoilerR3 < 1.5) {
obj["spoiler3Rf"].show();
} else {
obj["spoiler3Rf"].hide();
}
} else {
obj["spoiler3Rex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler3Rrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler3Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR4Failure","spoilerR4","yellow"], nil, func(val) {
if (val.spoilerR4Failure or val.yellow < 1500) {
obj["spoiler4Rex"].setColor(0.7333,0.3803,0);
obj["spoiler4Rrt"].setColor(0.7333,0.3803,0);
if (val.spoilerR4 < 1.5) {
obj["spoiler4Rf"].show();
} else {
obj["spoiler4Rf"].hide();
}
} else {
obj["spoiler4Rex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler4Rrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler4Rf"].hide();
}
}),
props.UpdateManager.FromHashList(["spoilerR5Failure","spoilerR5","green"], nil, func(val) {
if (val.spoilerR5Failure or val.green < 1500) {
obj["spoiler5Rex"].setColor(0.7333,0.3803,0);
obj["spoiler5Rrt"].setColor(0.7333,0.3803,0);
if (val.spoilerR5 < 1.5) {
obj["spoiler5Rf"].show();
} else {
obj["spoiler5Rf"].hide();
}
} else {
obj["spoiler5Rex"].setColor(0.0509,0.7529,0.2941);
obj["spoiler5Rrt"].setColor(0.0509,0.7529,0.2941);
obj["spoiler5Rf"].hide();
}
}),
];
obj.displayedGForce = 0;
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
if (val) {
obj["GW-weight-unit"].setText("KG");
} else {
obj["GW-weight-unit"].setText("LBS");
}
}),
props.UpdateManager.FromHashValue("hour", nil, func(val) {
obj["UTCh"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("minute", nil, func(val) {
obj["UTCm"].setText(sprintf("%02d", val));
}),
props.UpdateManager.FromHashValue("gForce", 0.05, func(val) {
if (obj.displayedGForce) {
obj["GLoad"].setText("G.LOAD " ~ sprintf("%3.1f", val));
}
}),
props.UpdateManager.FromHashValue("gForceDisplay", nil, func(val) {
if ((val == 1 and !obj.displayedGForce) or (val != 0 and obj.displayedGForce)) {
obj.displayedGForce = 1;
obj["GLoad"].show();
} else {
obj.displayedGForce = 0;
obj["GLoad"].hide();
}
}),
];
return obj;
},
getKeysBottom: func() {
return ["TAT","SAT","GW","UTCh","UTCm","GLoad","GW-weight-unit"];
},
getKeys: func() {
return["lgctltext","NORMbrk","NWStext","leftdoor","rightdoor","nosegeardoorL","nosegeardoorR",
"autobrk","autobrkind","NWS","NWSrect","normbrk-rect","altnbrk","normbrkhyd","spoiler1Rex","spoiler1Rrt","spoiler2Rex","spoiler2Rrt","spoiler3Rex",
"spoiler3Rrt","spoiler4Rex","spoiler4Rrt","spoiler5Rex","spoiler5Rrt","spoiler1Lex","spoiler1Lrt","spoiler2Lex","spoiler2Lrt",
"spoiler3Lex","spoiler3Lrt","spoiler4Lex","spoiler4Lrt","spoiler5Lex","spoiler5Lrt","spoiler1Rf","spoiler2Rf","spoiler3Rf","spoiler4Rf","spoiler5Rf",
"spoiler1Lf","spoiler2Lf","spoiler3Lf","spoiler4Lf","spoiler5Lf","ALTNbrk","altnbrkhyd","altnbrk-rect","antiskidtext","brakearrow","accupress_text",
"accuonlyarrow","accuonly","braketemp1","normbrkhyd","braketemp2","braketemp3","braketemp4","toparc1","toparc2","toparc3","toparc4","leftuplock",
"noseuplock","rightuplock","Triangle-Left1","Triangle-Left2","Triangle-Nose1","Triangle-Nose2","Triangle-Right1","Triangle-Right2","BSCUrect1",
"BSCUrect2","BSCU1","BSCU2","tirepress1","tirepress2","tirepress3","tirepress4","tirepress5","tirepress6","releaseL1","releaseL2","releaseR1","releaseR2",
"releaseL3","releaseL4","releaseR3","releaseR4"];
},
updateBottom: func(notification) {
foreach(var update_item_bottom; me.updateItemsBottom)
{
update_item_bottom.update(notification);
}
if (fmgc.FMGCInternal.fuelRequest and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and notification.FWCPhase != 1) {
if (me.units) {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000 * LBS2KGS, 100)));
} else {
me["GW"].setText(sprintf("%s", math.round(fmgc.FMGCInternal.fuelPredGw * 1000, 100)));
}
me["GW"].setColor(0.0509,0.7529,0.2941);
} else {
me["GW"].setText(sprintf("%s", "-----"));
me["GW"].setColor(0.0901,0.6039,0.7176);
}
if (dmc.DMController.DMCs[1].outputs[4] != nil) {
me["SAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
me["SAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["SAT"].setText(sprintf("%s", "XX"));
me["SAT"].setColor(0.7333,0.3803,0);
}
if (dmc.DMController.DMCs[1].outputs[5] != nil) {
me["TAT"].setText(sprintf("%+2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
me["TAT"].setColor(0.0509,0.7529,0.2941);
} else {
me["TAT"].setText(sprintf("%s", "XX"));
me["TAT"].setColor(0.7333,0.3803,0);
}
},
update: func(notification) {
me.updatePower();
if (me.test.getVisible() == 1) {
me.updateTest(notification);
}
if (me.group.getVisible() == 0) {
return;
}
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
me.updateBottom(notification);
},
updatePower: func() {
if (me.name == ecam.SystemDisplayController.displayedPage.name) {
if (du4_lgt.getValue() > 0.01 and systems.ELEC.Bus.ac2.getValue() >= 110) {
if (du4_test_time.getValue() + du4_test_amount.getValue() >= pts.Sim.Time.elapsedSec.getValue()) {
me.group.setVisible(0);
me.test.setVisible(1);
} else {
me.group.setVisible(1);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
me.test.setVisible(0);
}
} else {
me.group.setVisible(0);
# don't hide the test group; just let whichever page is active control it
}
},
};
var input = {
brakeAutobrkMode: "/controls/autobrake/mode",
brakeLeft1: "/gear/gear[1]/L1brake-temp-degc",
brakeLeft2: "/gear/gear[1]/L2brake-temp-degc",
brakeRight1: "/gear/gear[2]/R3brake-temp-degc",
brakeRight2: "/gear/gear[2]/R4brake-temp-degc",
wheelLeftDoor: "/ECAM/Lower/door-left",
wheelNoseLeftDoor: "/ECAM/Lower/door-nose-left",
wheelNoseRightDoor: "/ECAM/Lower/door-nose-right",
wheelRightDoor: "/ECAM/Lower/door-right",
wheelLeftDoorPos: "/systems/hydraulic/gear/door-left",
wheelNoseDoorPos: "/systems/hydraulic/gear/door-nose",
wheelRightDoorPos: "/systems/hydraulic/gear/door-right",
spoilerL1: "/fdm/jsbsim/hydraulics/spoiler-l1/final-deg",
spoilerL2: "/fdm/jsbsim/hydraulics/spoiler-l2/final-deg",
spoilerL3: "/fdm/jsbsim/hydraulics/spoiler-l3/final-deg",
spoilerL4: "/fdm/jsbsim/hydraulics/spoiler-l4/final-deg",
spoilerL5: "/fdm/jsbsim/hydraulics/spoiler-l5/final-deg",
spoilerR1: "/fdm/jsbsim/hydraulics/spoiler-r1/final-deg",
spoilerR2: "/fdm/jsbsim/hydraulics/spoiler-r2/final-deg",
spoilerR3: "/fdm/jsbsim/hydraulics/spoiler-r3/final-deg",
spoilerR4: "/fdm/jsbsim/hydraulics/spoiler-r4/final-deg",
spoilerR5: "/fdm/jsbsim/hydraulics/spoiler-r5/final-deg",
spoilerL1Failure: "/systems/failures/spoilers/spoiler-l1",
spoilerL2Failure: "/systems/failures/spoilers/spoiler-l2",
spoilerL3Failure: "/systems/failures/spoilers/spoiler-l3",
spoilerL4Failure: "/systems/failures/spoilers/spoiler-l4",
spoilerL5Failure: "/systems/failures/spoilers/spoiler-l5",
spoilerR1Failure: "/systems/failures/spoilers/spoiler-r1",
spoilerR2Failure: "/systems/failures/spoilers/spoiler-r2",
spoilerR3Failure: "/systems/failures/spoilers/spoiler-r3",
spoilerR4Failure: "/systems/failures/spoilers/spoiler-r4",
spoilerR5Failure: "/systems/failures/spoilers/spoiler-r5",
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 System Display", name, input[name]));
}

File diff suppressed because it is too large Load diff

View file

@ -42,8 +42,8 @@
id="namedview371"
showgrid="true"
inkscape:zoom="0.76543687"
inkscape:cx="663.42185"
inkscape:cy="457.30228"
inkscape:cx="1295.1967"
inkscape:cy="1096.0742"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -569,8 +569,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="APUBleedValveCrossBar"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2" />
</g>
<g
id="APUBleedOnline"
@ -774,4 +775,17 @@
y="803.22437"
style="font-size:48px;line-height:1.25;fill:#bb6100;fill-opacity:1;stroke-width:1px"
id="tspan953">LEVEL</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:11.99996376px;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:-1.59999526px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:4.02421808px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="202.75914"
y="240.23238"
id="APUGenOff"
inkscape:label="#text5149"
transform="scale(0.96120251,1.0403635)"><tspan
sodipodi:role="line"
id="tspan4735"
x="201.95914"
y="240.23238"
style="font-size:35.999897px;line-height:0;text-align:center;letter-spacing:-1.59999526px;text-anchor:middle;stroke-width:4.02421808px">OFF</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View file

@ -42,8 +42,8 @@
id="namedview371"
showgrid="true"
inkscape:zoom="0.73868665"
inkscape:cx="272.22904"
inkscape:cy="280.96379"
inkscape:cx="201.82373"
inkscape:cy="930.76571"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -67,8 +67,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="BLEED-XFEED-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2" />
</g>
<text
xml:space="preserve"
@ -189,8 +190,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2-5-7"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="BLEED-ENG-1-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2-5-7" />
</g>
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.35079527;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
@ -231,8 +233,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2-5-3"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="BLEED-Ram-Air-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2-5-3" />
</g>
<rect
style="fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1.99221587;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
@ -389,8 +392,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2-5-3-6-9"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="BLEED-Pack-1-Flow-Valve-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2-5-3-6-9" />
</g>
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:2.32549167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
@ -421,8 +425,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2-5-3-6-9-2"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="BLEED-Pack-2-Flow-Valve-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2-5-3-6-9-2" />
</g>
<g
id="BLEED-Pack1"
@ -867,8 +872,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2-5-7-7"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="BLEED-ENG-2-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2-5-7-7" />
</g>
<g
id="BLEED-HP-Valve-2"

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View file

@ -41,9 +41,9 @@
inkscape:window-height="705"
id="namedview371"
showgrid="false"
inkscape:zoom="163.84"
inkscape:cx="931.44175"
inkscape:cy="894.81836"
inkscape:zoom="0.64"
inkscape:cx="695.07573"
inkscape:cy="944.3933"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -116,8 +116,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="CONDHotAirValveCross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2" />
</g>
<text
xml:space="preserve"

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View file

@ -12,7 +12,7 @@
viewBox="0 0 1024 1024"
version="1.1"
id="svg2"
inkscape:version="0.92.1 r15371"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="crz.svg">
<metadata
id="metadata375">
@ -37,16 +37,16 @@
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1047"
inkscape:window-width="1366"
inkscape:window-height="705"
id="namedview371"
showgrid="true"
inkscape:zoom="0.5"
inkscape:cx="703.8872"
inkscape:cy="827.31856"
inkscape:window-x="3840"
inkscape:window-y="33"
inkscape:window-maximized="0"
inkscape:zoom="1"
inkscape:cx="470.5927"
inkscape:cy="1012.5262"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
inkscape:snap-nodes="false"
inkscape:snap-global="false"
@ -298,13 +298,13 @@
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="555.73187"
x="543.46399"
y="220.23506"
id="FUsed"
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan4506"
x="555.73187"
x="543.46399"
y="220.23506"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b">400</tspan></text>
<text
@ -337,14 +337,14 @@
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:-1.60000002px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:4.02423px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="399.71744"
y="631.84998"
y="628.96643"
id="ELEC-IDG-2-num-label"
inkscape:label="#text5149"
transform="scale(0.96119963,1.0403666)"><tspan
sodipodi:role="line"
id="tspan3714"
x="398.91745"
y="631.84998"
y="628.96643"
style="font-size:36px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle">P</tspan></text>
<text
xml:space="preserve"
@ -414,7 +414,7 @@
d="m 776.33019,117.10687 12.494,-21.584521 12.44575,21.612381 z"
inkscape:transform-center-x="0.023774226"
inkscape:transform-center-y="-3.0226495"
transform="matrix(-0.55570012,0,0,0.85384443,799.83103,554.6097)" />
transform="matrix(-0.55570012,0,0,0.85384443,799.83103,551.6097)" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
@ -543,7 +543,7 @@
d="M 642.63812,444.15624 H 601.42434"
style="fill:none;stroke:#4d4d4d;stroke-width:2.68409395;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
id="text3907-0"
id="OilUnit"
y="298.28555"
x="549.48846"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
@ -572,13 +572,13 @@
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:-1.60000002px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:4.02423px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="568.92786"
y="396.86365"
y="398.48981"
id="text3891-3-0"
inkscape:label="#text5149"
transform="scale(0.96119964,1.0403666)"><tspan
sodipodi:role="line"
x="568.12787"
y="396.86365"
y="398.48981"
style="font-size:36.00000381px;line-height:0;text-align:center;letter-spacing:-1.60000002px;text-anchor:middle;stroke-width:4.02423px"
id="tspan4870-6-6">N1</tspan></text>
<text
@ -629,7 +629,7 @@
y="416.89258"
x="340.44434"
id="tspan3905-8-0"
sodipodi:role="line">0.0</tspan></text>
sodipodi:role="line">0.2</tspan></text>
<text
inkscape:label="#text5149"
id="VIB2N1"
@ -641,7 +641,7 @@
y="419.89258"
x="745.04004"
id="tspan3905-8-0-3"
sodipodi:role="line">0.0</tspan></text>
sodipodi:role="line">0.3</tspan></text>
<text
inkscape:label="#text5149"
id="VIB1N2"
@ -653,7 +653,7 @@
y="464.89258"
x="340.04004"
id="tspan3905-8-0-5"
sodipodi:role="line">0.0</tspan></text>
sodipodi:role="line">0.1</tspan></text>
<text
inkscape:label="#text5149"
id="VIB2N2"
@ -665,7 +665,7 @@
y="460.39258"
x="742.04004"
id="tspan3905-8-0-5-2"
sodipodi:role="line">0.0</tspan></text>
sodipodi:role="line">0.2</tspan></text>
<text
inkscape:label="#text5149"
id="CABALT"
@ -707,15 +707,15 @@
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:'Liberation Sans';text-align:start;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="848.42493"
x="822.92493"
y="600.46124"
id="LDGELEV"
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan3739-2"
x="848.42493"
x="822.92493"
y="600.46124"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;stroke-width:1px">0</tspan></text>
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;stroke-width:1px">500</tspan></text>
<text
transform="scale(0.89169395,1.121461)"
inkscape:label="#text4495"

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View file

@ -12,7 +12,7 @@
viewBox="0 0 1024 1024"
version="1.1"
id="svg2"
inkscape:version="0.91 r13725"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="door.svg">
<metadata
id="metadata375">
@ -37,14 +37,14 @@
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1030"
inkscape:window-width="1366"
inkscape:window-height="705"
id="namedview371"
showgrid="true"
inkscape:zoom="0.7521195"
inkscape:cx="944.15154"
inkscape:cy="187.23728"
inkscape:window-x="1592"
inkscape:zoom="0.35355339"
inkscape:cx="354.52267"
inkscape:cy="1842.4796"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2">
@ -81,8 +81,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="500.75214"
y="977.31793"
id="text6232"
sodipodi:linespacing="0%"><tspan
id="text6232"><tspan
sodipodi:role="line"
id="tspan3726-1-4-5-7"
x="500.75214"
@ -93,8 +92,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="254.86758"
y="938.9859"
id="text6233"
sodipodi:linespacing="0%"><tspan
id="text6233"><tspan
sodipodi:role="line"
id="tspan3726-1-4-5-3"
x="254.86758"
@ -105,8 +103,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="940.17981"
y="939.82428"
id="GW-weight-unit"
sodipodi:linespacing="0%"><tspan
id="GW-weight-unit"><tspan
sodipodi:role="line"
id="tspan3726-1-4-5-7-7"
x="940.17981"
@ -117,8 +114,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="695.24951"
y="939.8045"
id="text3912"
sodipodi:linespacing="0%"><tspan
id="text3912"><tspan
sodipodi:role="line"
id="tspan3914"
x="695.24951"
@ -129,8 +125,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="48.73233"
y="939.2984"
id="text6235"
sodipodi:linespacing="0%"><tspan
id="text6235"><tspan
sodipodi:role="line"
id="tspan3914-9"
x="48.73233"
@ -141,8 +136,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="47.952412"
y="975.40332"
id="text6236"
sodipodi:linespacing="0%"><tspan
id="text6236"><tspan
sodipodi:role="line"
id="tspan3914-9-4"
x="47.952412"
@ -154,8 +148,7 @@
x="212.32626"
y="938.96637"
id="TAT"
inkscape:label="#text5149"
sodipodi:linespacing="0%"><tspan
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan5151-5-7-1"
x="212.32626"
@ -167,8 +160,7 @@
x="212.3264"
y="975.40363"
id="SAT"
inkscape:label="#text5149"
sodipodi:linespacing="0%"><tspan
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan5151-5-7-1-0"
x="212.3264"
@ -180,15 +172,13 @@
x="925.0899"
y="939.78522"
id="GW"
inkscape:label="#text5149"
sodipodi:linespacing="0%"><tspan
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan5151-5-7-1-9"
x="925.0899"
y="939.78522"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b">120000</tspan></text>
<text
sodipodi:linespacing="0%"
id="text4170"
y="975.42352"
x="254.86758"
@ -200,7 +190,6 @@
id="tspan4172"
sodipodi:role="line">°C</tspan></text>
<text
sodipodi:linespacing="0%"
inkscape:label="#text5149"
id="UTCh"
y="976.25214"
@ -218,8 +207,7 @@
x="560.88452"
y="976.25214"
id="UTCm"
inkscape:label="#text5149"
sodipodi:linespacing="0%"><tspan
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan4180"
x="560.88452"
@ -236,7 +224,7 @@
id="tspan861"
x="512.93152"
y="940.98541"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.99999905px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#bb6100;fill-opacity:1">G.LOAD 0.6</tspan></text>
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#bb6100;fill-opacity:1">G.LOAD 0.6</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
@ -343,7 +331,7 @@
sodipodi:nodetypes="ccccccccc" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="436.25317"
y="279.40991"
id="Cabin1LeftSlide"
@ -352,7 +340,7 @@
id="tspan4301"
x="436.25317"
y="279.40991"
style="font-size:32px;line-height:1.25">SLIDE</tspan></text>
style="font-size:32px;line-height:1.25;fill:#cecdce;fill-opacity:1;">SLIDE</tspan></text>
<text
transform="scale(1.0058142,0.9942194)"
id="AvionicsLbl2"
@ -403,7 +391,7 @@
id="Cabin1RightSlide"
y="289.65512"
x="665.71307"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
xml:space="preserve"
transform="scale(1.0269551,0.9737524)"
inkscape:label="#text4396"><tspan
@ -411,7 +399,7 @@
x="665.71307"
id="tspan4398"
sodipodi:role="line"
style="font-size:32.86256409px;line-height:1.25">SLIDE</tspan></text>
style="font-size:32.86256409px;line-height:1.25;fill:#cecdce;fill-opacity:1;">SLIDE</tspan></text>
<path
style="fill:#bb6100;fill-opacity:1;fill-rule:evenodd;stroke:#bb6100;stroke-width:2.61183023;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:7.67999983;stroke-opacity:1"
d="m 853.91992,336.04297 18.49805,0 z m 25.64844,0 18.49609,0 z m 23.00391,0.1543 18.49804,0 z"
@ -449,77 +437,77 @@
<text
transform="scale(1.0269551,0.9737524)"
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="663.55597"
y="550.51556"
y="522.78827"
id="ExitRSlide"
inkscape:label="#text4430"><tspan
sodipodi:role="line"
id="tspan4432"
x="663.55597"
y="550.51556"
style="font-size:32.86256409px;line-height:1.25">SLIDE</tspan></text>
y="522.78827"
style="font-size:32.86256409px;line-height:1.25;fill:#cecdce;fill-opacity:1;">SLIDE</tspan></text>
<text
id="ExitLSlide"
y="550.51556"
y="522.78827"
x="427.7142"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
xml:space="preserve"
transform="scale(1.0269551,0.9737524)"
inkscape:label="#text4434"><tspan
y="550.51556"
y="522.78827"
x="427.7142"
id="tspan4436"
sodipodi:role="line"
style="font-size:32.86256409px;line-height:1.25">SLIDE</tspan></text>
style="font-size:32.86256409px;line-height:1.25;fill:#cecdce;fill-opacity:1;">SLIDE</tspan></text>
<path
style="fill:#bb6100;fill-opacity:1;fill-rule:evenodd;stroke:#bb6100;stroke-width:2.61183023;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:7.67999983;stroke-opacity:1"
d="M 853.75 652.0918 L 872.24805 652.0918 L 853.75 652.0918 z M 879.39844 652.0918 L 897.89648 652.0918 L 879.39844 652.0918 z M 902.4043 652.24805 L 920.90039 652.24805 L 902.4043 652.24805 z "
transform="scale(0.8,0.8)"
style="fill:#bb6100;fill-opacity:1;fill-rule:evenodd;stroke:#bb6100;stroke-width:2.08946419;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:7.67999983;stroke-opacity:1"
d="m 683,497.67344 h 14.79844 z m 20.51875,0 h 14.79843 z m 18.40469,0.125 h 14.79687 z"
id="ExitRLine"
inkscape:label="#path4438" />
inkscape:label="#path4438"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
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:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="929.93616"
y="447.66263"
y="426.74124"
id="ExitRLbl"
transform="scale(0.87172238,1.1471542)"
inkscape:label="#text4444"><tspan
sodipodi:role="line"
x="929.93616"
y="447.66263"
y="426.74124"
id="tspan4448"
style="font-size:27.89511681px;line-height:1.25;fill:#bb6100;fill-opacity:1">EMER</tspan><tspan
sodipodi:role="line"
x="929.93616"
y="482.53152"
y="461.61014"
style="font-size:27.89511681px;line-height:1.25;fill:#bb6100;fill-opacity:1"
id="tspan4456">EXIT</tspan></text>
<text
transform="scale(0.87172238,1.1471542)"
id="ExitLLbl"
y="447.98447"
y="427.06308"
x="240.60371"
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:start;letter-spacing:0px;word-spacing:0px;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
inkscape:label="#text4458"><tspan
style="font-size:27.89511681px;line-height:1.25;text-align:start;text-anchor:start;fill:#bb6100;fill-opacity:1"
id="tspan4460"
y="447.98447"
y="427.06308"
x="240.60371"
sodipodi:role="line">EMER</tspan><tspan
id="tspan4462"
style="font-size:27.89511681px;line-height:1.25;text-align:start;text-anchor:start;fill:#bb6100;fill-opacity:1"
y="482.85336"
y="461.93198"
x="240.60371"
sodipodi:role="line">EXIT</tspan></text>
<path
style="fill:#bb6100;fill-opacity:1;fill-rule:evenodd;stroke:#bb6100;stroke-width:2.61183023;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:7.67999983;stroke-opacity:1"
d="M 359.47656 652.55273 L 377.97461 652.55273 L 359.47656 652.55273 z M 385.125 652.55273 L 403.62109 652.55273 L 385.125 652.55273 z M 408.12891 652.70898 L 426.62695 652.70898 L 408.12891 652.70898 z "
transform="scale(0.8,0.8)"
style="fill:#bb6100;fill-opacity:1;fill-rule:evenodd;stroke:#bb6100;stroke-width:2.08946419;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:7.67999983;stroke-opacity:1"
d="m 287.58125,498.04218 h 14.79844 z m 20.51875,0 h 14.79687 z m 18.40313,0.125 h 14.79843 z"
id="ExitLLine"
inkscape:label="#path4464" />
inkscape:label="#path4464"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#0dc04b;stroke-width:1.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 572.97783,450.91184 -10.90875,0.0633 0.0285,29.90121 10.83876,0.0238 z"
@ -631,14 +619,14 @@
id="Cabin4LeftSlide"
y="807.39655"
x="432.02954"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
xml:space="preserve"
inkscape:label="#text4276"><tspan
y="807.39655"
x="432.02954"
id="tspan4278"
sodipodi:role="line"
style="font-size:32px;line-height:1.25">SLIDE</tspan></text>
style="font-size:32px;line-height:1.25;fill:#cecdce;fill-opacity:1;">SLIDE</tspan></text>
<path
style="fill:#bb6100;fill-opacity:1;fill-rule:evenodd;stroke:#bb6100;stroke-width:2.08946419;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:7.67999983;stroke-opacity:1"
d="m 321.88282,794.0375 14.79843,0 z m -37.4,0.14219 14.79843,0 z m 18.40468,0.125 14.79688,0 z"
@ -662,7 +650,7 @@
<text
transform="scale(1.0269551,0.9737524)"
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="666.375"
y="829.13342"
id="Cabin4RightSlide"
@ -671,7 +659,7 @@
id="tspan4304"
x="666.375"
y="829.13342"
style="font-size:32.86256409px;line-height:1.25">SLIDE</tspan></text>
style="font-size:32.86256409px;line-height:1.25;fill:#cecdce;fill-opacity:1;">SLIDE</tspan></text>
<path
style="fill:#bb6100;fill-opacity:1;fill-rule:evenodd;stroke:#bb6100;stroke-width:2.08946419;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:7.67999983;stroke-opacity:1"
d="m 684.49531,794.17031 14.79687,0 z m 20.51719,0 14.79844,0 z m 18.40468,0.125 14.79844,0 z"
@ -839,80 +827,82 @@
sodipodi:nodetypes="ccccccccc" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.04751396px;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:2.50395942px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="752.48254"
y="106.23167"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:2.50395942px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="852.17371"
y="64.937149"
id="DOOROXY-OxyIndicator"
inkscape:label="#text3714"
transform="scale(0.90024385,1.1108101)"><tspan
transform="scale(0.90024388,1.1108101)"><tspan
sodipodi:role="line"
id="tspan4627"
x="752.48254"
y="106.23167"
style="stroke-width:2.50395942px;fill:#0dc04b;fill-opacity:1;">OXY</tspan></text>
x="852.17371"
y="64.937149"
style="font-size:30.04751396px;line-height:0;fill:#cecdce;fill-opacity:1;stroke-width:2.50395942px;">CKPT OXY</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.04800034px;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:2.50395942px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="757.76752"
y="141.4857"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:2.50395942px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="799.85938"
y="133.49768"
id="DOOROXY-REGUL-LO-PR"
inkscape:label="#text3714"
transform="scale(0.90024388,1.1108101)"><tspan
sodipodi:role="line"
id="tspan4647"
x="757.76752"
y="141.4857">REGUL LO PR</tspan></text>
x="799.85938"
y="133.49768"
style="font-size:30.04800034px;line-height:0">REGUL LO PR</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:45.96218491px;line-height:1.25;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.14905465;"
x="820.46686"
y="106.9913"
style="font-style:normal;font-weight:normal;font-size:32px;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.14905465;"
x="918.81921"
y="103.75028"
id="DOOROXY-PR"
transform="scale(0.91130679,1.0973253)"
inkscape:label="#text4651"><tspan
sodipodi:role="line"
x="820.46686"
y="106.9913"
style="stroke-width:1.14905465;fill:#0dc04b;fill-opacity:1;"
x="918.81921"
y="103.75028"
style="font-size:36px;line-height:1.25;text-align:end;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke-width:1.14905465;"
id="tspan4653">1300</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.04800034px;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:2.50395942px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="974.64819"
y="105.6836"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:2.50395942px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="953.60229"
y="100.29736"
id="DOOROXY-text-psi"
inkscape:label="#text3714"
transform="scale(0.90024388,1.1108101)"><tspan
sodipodi:role="line"
id="tspan4675"
x="974.64819"
y="105.6836">PSI</tspan></text>
x="953.60229"
y="100.29736"
style="font-size:30px;line-height:0">PSI</tspan></text>
<g
id="DOOR-VS-Container"
inkscape:label="#g4751"
transform="translate(3.9697981,11.253005)">
transform="translate(12.944435,6.250187)">
<text
id="text4619"
y="182.46194"
y="180.12952"
x="679.00989"
style="font-style:normal;font-weight:normal;font-size:30px;line-height:1.25;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.75"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.75"
xml:space="preserve"><tspan
id="tspan4621"
style="fill:#cecdce;fill-opacity:1;stroke-width:0.75"
y="182.46194"
style="font-size:30px;line-height:1.25;fill:#cecdce;fill-opacity:1;stroke-width:0.75"
y="180.12952"
x="679.00989"
sodipodi:role="line">V/S</tspan></text>
<text
inkscape:label="#text4619-2"
transform="scale(1.0181905,0.98213449)"
id="DOOR-VS"
y="183.64415"
x="769.71179"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:23.16251373px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.57906288"
y="183.35246"
x="737.38855"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.57906288"
xml:space="preserve"><tspan
style="stroke-width:0.57906288"
y="183.64415"
x="769.71179"
style="font-size:36px;line-height:1.25;stroke-width:0.57906288"
y="183.35246"
x="737.38855"
id="tspan4643"
sodipodi:role="line">1650</tspan></text>
<text
@ -920,44 +910,18 @@
id="text4619-2-6"
y="177.27403"
x="869.73895"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:22.38916969px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:0.55971754"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:0.55971754"
xml:space="preserve"><tspan
style="stroke-width:0.55971754"
style="font-size:29.99999809px;line-height:1.25;stroke-width:0.55971754"
y="177.27403"
x="869.73895"
id="tspan4663"
sodipodi:role="line">FT/MIN</tspan></text>
<g
id="DOOR-VS-Arrow-DN">
<path
style="fill:none;fill-rule:evenodd;stroke:#0dc04b;stroke-width:1.44767237;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 731.03018,172.74699 39.64077,0.003"
id="path4257-2"
inkscape:connector-curvature="0" />
<path
style="fill:#0dc04b;fill-opacity:1;stroke:#0dc04b;stroke-width:0.75px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 770.62688,172.50761 3.32903,4.16556 6.04407,-1.41023 3.492,26.73705 -16.992,-21.75 5.77627,-3 -2.82034,-3.99238 z"
id="path-1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc"
inkscape:label="#path4712" />
</g>
id="DOOR-VS-Arrow-DN" />
<g
inkscape:label="#DOOR-VS-Arrow-DN-3"
transform="matrix(1,0,0,-1,0.04406707,358.0076)"
id="DOOR-VS-Arrow-UP">
<path
style="fill:none;fill-rule:evenodd;stroke:#0dc04b;stroke-width:1.44767237;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 731.03018,172.74699 39.64077,0.003"
id="path4257-2-9"
inkscape:connector-curvature="0" />
<path
style="fill:#0dc04b;fill-opacity:1;stroke:#0dc04b;stroke-width:0.75px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 770.62688,172.50761 3.32903,4.16556 6.04407,-1.41023 3.492,26.73705 -16.992,-21.75 5.77627,-3 -2.82034,-3.99238 z"
id="path-1-0"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc"
inkscape:label="#path4712" />
</g>
id="DOOR-VS-Arrow-UP" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View file

@ -12,8 +12,8 @@
viewBox="0 0 1024 1024"
version="1.1"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="eng-eis2.svg">
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="eng.svg">
<metadata
id="metadata375">
<rdf:RDF>
@ -37,14 +37,14 @@
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1030"
inkscape:window-width="1366"
inkscape:window-height="705"
id="namedview371"
showgrid="true"
inkscape:zoom="0.5"
inkscape:cx="988.67552"
inkscape:cy="398.82462"
inkscape:window-x="1592"
inkscape:zoom="1"
inkscape:cx="593.89152"
inkscape:cy="650.40507"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2">
@ -81,8 +81,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="500.75214"
y="977.31793"
id="text6232"
sodipodi:linespacing="0%"><tspan
id="text6232"><tspan
sodipodi:role="line"
id="tspan3726-1-4-5-7"
x="500.75214"
@ -93,8 +92,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="254.86758"
y="938.9859"
id="text6233"
sodipodi:linespacing="0%"><tspan
id="text6233"><tspan
sodipodi:role="line"
id="tspan3726-1-4-5-3"
x="254.86758"
@ -105,8 +103,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="940.17981"
y="939.82428"
id="GW-weight-unit"
sodipodi:linespacing="0%"><tspan
id="GW-weight-unit"><tspan
sodipodi:role="line"
id="tspan3726-1-4-5-7-7"
x="940.17981"
@ -117,8 +114,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="695.24951"
y="939.8045"
id="text3912"
sodipodi:linespacing="0%"><tspan
id="text3912"><tspan
sodipodi:role="line"
id="tspan3914"
x="695.24951"
@ -129,8 +125,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="48.73233"
y="939.2984"
id="text6235"
sodipodi:linespacing="0%"><tspan
id="text6235"><tspan
sodipodi:role="line"
id="tspan3914-9"
x="48.73233"
@ -141,8 +136,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="47.952412"
y="975.40332"
id="text6236"
sodipodi:linespacing="0%"><tspan
id="text6236"><tspan
sodipodi:role="line"
id="tspan3914-9-4"
x="47.952412"
@ -154,8 +148,7 @@
x="212.32626"
y="938.96637"
id="TAT"
inkscape:label="#text5149"
sodipodi:linespacing="0%"><tspan
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan5151-5-7-1"
x="212.32626"
@ -167,8 +160,7 @@
x="212.3264"
y="975.40363"
id="SAT"
inkscape:label="#text5149"
sodipodi:linespacing="0%"><tspan
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan5151-5-7-1-0"
x="212.3264"
@ -180,15 +172,13 @@
x="925.0899"
y="939.78522"
id="GW"
inkscape:label="#text5149"
sodipodi:linespacing="0%"><tspan
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan5151-5-7-1-9"
x="925.0899"
y="939.78522"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b">120000</tspan></text>
<text
sodipodi:linespacing="0%"
id="text4170"
y="975.42352"
x="254.86758"
@ -200,7 +190,6 @@
id="tspan4172"
sodipodi:role="line">°C</tspan></text>
<text
sodipodi:linespacing="0%"
inkscape:label="#text5149"
id="UTCh"
y="976.25214"
@ -218,8 +207,7 @@
x="560.88452"
y="976.25214"
id="UTCm"
inkscape:label="#text5149"
sodipodi:linespacing="0%"><tspan
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan4180"
x="560.88452"
@ -236,7 +224,7 @@
id="tspan861"
x="512.93152"
y="940.98541"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.99999905px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#bb6100;fill-opacity:1">G.LOAD 0.6</tspan></text>
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#bb6100;fill-opacity:1">G.LOAD 0.6</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
@ -328,7 +316,8 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="482.23218"
y="296.8558"
id="text4949"><tspan
id="Fused-oil-unit"
inkscape:label="#text4949"><tspan
sodipodi:role="line"
id="tspan3726-1-4-5-3-5-9-4"
x="482.23218"
@ -342,7 +331,7 @@
id="text4476"><tspan
sodipodi:role="line"
id="tspan4478"
x="505.625"
x="504.4375"
y="284"
style="font-size:32px;line-height:1.25"> </tspan></text>
<text
@ -668,19 +657,20 @@
inkscape:transform-center-x="70.6625" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.75"
x="264.69138"
y="181.87299"
style="font-style:normal;font-weight:normal;font-size:12.00003052px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.75000191"
x="264.69104"
y="181.87344"
id="FUEL-used-1"
inkscape:label="#text5832"><tspan
inkscape:label="#text5832"
transform="scale(1.0000025,0.99999749)"><tspan
sodipodi:role="line"
id="tspan5830-5-2"
x="264.69138"
y="181.87299"
style="font-size:30.00000191px;line-height:1.25;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">0000</tspan></text>
x="264.69104"
y="181.87344"
style="font-size:30.0000782px;line-height:1.25;fill:#0dc04b;fill-opacity:1;stroke-width:0.75000191">0000</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.75"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.75"
x="682.74243"
y="181.74864"
id="FUEL-used-2"
@ -690,4 +680,128 @@
x="682.74243"
y="181.74864"
style="font-size:30.00000191px;line-height:1.25;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">0000</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:11.99998569px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:0.74999911"
x="679.57947"
y="209.71054"
id="FUEL-clog-2"
inkscape:label="#text5832"
transform="scale(0.9999988,1.0000012)"><tspan
sodipodi:role="line"
id="tspan5830-2"
x="679.57947"
y="209.71054"
style="font-size:29.99996567px;line-height:1.25;fill:#bb6100;fill-opacity:1;stroke-width:0.74999911">CLOG</tspan></text>
<text
transform="scale(0.9999988,1.0000012)"
inkscape:label="#text5832"
id="FUEL-clog-1"
y="209.71054"
x="261.52823"
style="font-style:normal;font-weight:normal;font-size:11.99998569px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:0.74999911"
xml:space="preserve"><tspan
style="font-size:29.99996567px;line-height:1.25;fill:#bb6100;fill-opacity:1;stroke-width:0.74999911"
y="209.71054"
x="261.52823"
id="tspan933"
sodipodi:role="line">CLOG</tspan></text>
<text
transform="scale(0.9999988,1.0000012)"
inkscape:label="#text5832"
id="OIL-clog-2"
y="476.71021"
x="679.57947"
style="font-style:normal;font-weight:normal;font-size:11.99998569px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:0.74999911"
xml:space="preserve"><tspan
style="font-size:29.99996567px;line-height:1.25;fill:#bb6100;fill-opacity:1;stroke-width:0.74999911"
y="476.71021"
x="679.57947"
id="tspan937"
sodipodi:role="line">CLOG</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:11.99998569px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:0.74999911"
x="261.52823"
y="476.71021"
id="OIL-clog-1"
inkscape:label="#text5832"
transform="scale(0.9999988,1.0000012)"><tspan
sodipodi:role="line"
id="tspan941"
x="261.52823"
y="476.71021"
style="font-size:29.99996567px;line-height:1.25;fill:#bb6100;fill-opacity:1;stroke-width:0.74999911">CLOG</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="327.60934"
y="538.25732"
id="OilTemp1"
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan5151-5-8-1"
x="327.60934"
y="538.25732"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:44px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b;stroke-width:1px">22</tspan></text>
<text
inkscape:label="#text5149"
id="VIB-N1-1"
y="623.00732"
x="327.60934"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;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:44px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b;stroke-width:1px"
y="623.00732"
x="327.60934"
id="tspan981"
sodipodi:role="line">0.6</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="327.60934"
y="683.75732"
id="VIB-N2-1"
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan985"
x="327.60934"
y="683.75732"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:44px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b;stroke-width:1px">0.1</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="757.85675"
y="623.00732"
id="VIB-N1-2"
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan989"
x="757.85675"
y="623.00732"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:44px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b;stroke-width:1px">0.6</tspan></text>
<text
inkscape:label="#text5149"
id="VIB-N2-2"
y="683.75732"
x="757.85675"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;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:44px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b;stroke-width:1px"
y="683.75732"
x="757.85675"
id="tspan993"
sodipodi:role="line">0.1</tspan></text>
<text
inkscape:label="#text5149"
id="OilTemp2"
y="538.25732"
x="745.15948"
style="font-style:normal;font-weight:normal;font-size:12px;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#000000;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:44px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b;stroke-width:1px"
y="538.25732"
x="745.15948"
id="tspan997"
sodipodi:role="line">22</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View file

@ -12,7 +12,7 @@
viewBox="0 0 1024 1024"
version="1.1"
id="svg2"
inkscape:version="0.91 r13725"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="fctl.svg">
<metadata
id="metadata375">
@ -37,14 +37,14 @@
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1030"
inkscape:window-width="1366"
inkscape:window-height="705"
id="namedview371"
showgrid="true"
inkscape:zoom="1"
inkscape:cx="683.58709"
inkscape:cy="286.7536"
inkscape:window-x="1592"
showgrid="false"
inkscape:zoom="1.28"
inkscape:cx="608.14718"
inkscape:cy="323.45523"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2">
@ -81,8 +81,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="500.75214"
y="977.31793"
id="text6232"
sodipodi:linespacing="0%"><tspan
id="text6232"><tspan
sodipodi:role="line"
id="tspan3726-1-4-5-7"
x="500.75214"
@ -93,8 +92,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="254.86758"
y="938.9859"
id="text6233"
sodipodi:linespacing="0%"><tspan
id="text6233"><tspan
sodipodi:role="line"
id="tspan3726-1-4-5-3"
x="254.86758"
@ -105,8 +103,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="940.17981"
y="939.82428"
id="GW-weight-unit"
sodipodi:linespacing="0%"><tspan
id="GW-weight-unit"><tspan
sodipodi:role="line"
id="tspan3726-1-4-5-7-7"
x="940.17981"
@ -117,8 +114,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="695.24951"
y="939.8045"
id="text3912"
sodipodi:linespacing="0%"><tspan
id="text3912"><tspan
sodipodi:role="line"
id="tspan3914"
x="695.24951"
@ -129,8 +125,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="48.73233"
y="939.2984"
id="text6235"
sodipodi:linespacing="0%"><tspan
id="text6235"><tspan
sodipodi:role="line"
id="tspan3914-9"
x="48.73233"
@ -141,8 +136,7 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="47.952412"
y="975.40332"
id="text6236"
sodipodi:linespacing="0%"><tspan
id="text6236"><tspan
sodipodi:role="line"
id="tspan3914-9-4"
x="47.952412"
@ -154,8 +148,7 @@
x="212.32626"
y="938.96637"
id="TAT"
inkscape:label="#text5149"
sodipodi:linespacing="0%"><tspan
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan5151-5-7-1"
x="212.32626"
@ -167,8 +160,7 @@
x="212.3264"
y="975.40363"
id="SAT"
inkscape:label="#text5149"
sodipodi:linespacing="0%"><tspan
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan5151-5-7-1-0"
x="212.3264"
@ -180,15 +172,13 @@
x="925.0899"
y="939.78522"
id="GW"
inkscape:label="#text5149"
sodipodi:linespacing="0%"><tspan
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan5151-5-7-1-9"
x="925.0899"
y="939.78522"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b">120000</tspan></text>
<text
sodipodi:linespacing="0%"
id="text4170"
y="975.42352"
x="254.86758"
@ -200,7 +190,6 @@
id="tspan4172"
sodipodi:role="line">°C</tspan></text>
<text
sodipodi:linespacing="0%"
inkscape:label="#text5149"
id="UTCh"
y="976.25214"
@ -218,8 +207,7 @@
x="560.88452"
y="976.25214"
id="UTCm"
inkscape:label="#text5149"
sodipodi:linespacing="0%"><tspan
inkscape:label="#text5149"><tspan
sodipodi:role="line"
id="tspan4180"
x="560.88452"
@ -236,7 +224,7 @@
id="tspan861"
x="512.93152"
y="940.98541"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.99999905px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#bb6100;fill-opacity:1">G.LOAD 0.6</tspan></text>
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#bb6100;fill-opacity:1">G.LOAD 0.6</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
@ -265,7 +253,7 @@
id="text4476"><tspan
sodipodi:role="line"
id="tspan4478"
x="505.625"
x="504.4375"
y="284"
style="font-size:32px;line-height:1.25"> </tspan></text>
<path
@ -417,11 +405,6 @@
id="path4423-0-9"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#969696;stroke-width:2.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="m 504.8,808 0,11.65 17.35,0 0,-11.7"
id="path4455"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#969696;stroke-width:1.60000002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 592.74899,784.57483 7.16728,9.18436 13.67801,-10.67402 -7.19805,-9.22378"
@ -501,8 +484,9 @@
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="371.59274"
y="519.38177"
id="text4343"
transform="scale(0.96916814,1.0318127)"><tspan
id="pitchTrimStatus"
transform="scale(0.96916814,1.0318127)"
inkscape:label="#text4343"><tspan
sodipodi:role="line"
id="tspan4345"
x="371.59274"
@ -563,7 +547,7 @@
style="font-size:32.03270721px;line-height:1.25">DN</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="515.71716"
y="567.75739"
id="PTcc"
@ -572,7 +556,7 @@
id="tspan4391"
x="515.71716"
y="567.75739"
style="font-size:32px;line-height:1.25">°</tspan></text>
style="font-size:32px;line-height:1.25;fill:#179ab7;fill-opacity:1;">°</tspan></text>
<rect
style="fill:#898989;fill-opacity:1;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"
id="rect4370-2-7-0"
@ -629,59 +613,59 @@
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="73.084137"
y="275.63892"
y="341.38232"
id="text4455"
transform="scale(0.99611221,1.003903)"><tspan
transform="scale(0.99611218,1.003903)"><tspan
sodipodi:role="line"
id="tspan4457"
x="73.084137"
y="275.63892"
y="341.38232"
style="font-size:38.63742447px;line-height:1.25;fill:#cecdce;fill-opacity:1"> </tspan><tspan
sodipodi:role="line"
x="73.084137"
y="323.9357"
y="389.67911"
id="tspan4459"
style="font-size:38.63742447px;line-height:1.25;fill:#cecdce;fill-opacity:1">AIL</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="100.07736"
y="267.37128"
y="328.55365"
id="text4461"
transform="scale(0.92700693,1.0787406)"><tspan
transform="scale(0.92700692,1.0787406)"><tspan
sodipodi:role="line"
id="tspan4463"
x="100.07736"
y="267.37128"
y="328.55365"
style="font-size:34.5196991px;line-height:1.25">L</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="896.62933"
y="275.65222"
y="341.39563"
id="text4455-9"
transform="scale(0.99611227,1.0039029)"><tspan
sodipodi:role="line"
id="tspan4457-3"
x="896.62933"
y="275.65222"
y="341.39563"
style="font-size:38.63742447px;line-height:1.25;fill:#cecdce;fill-opacity:1"> </tspan><tspan
sodipodi:role="line"
x="896.62933"
y="323.94901"
y="389.69241"
id="tspan4459-6"
style="font-size:38.63742447px;line-height:1.25;fill:#cecdce;fill-opacity:1">AIL</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="985.13922"
y="267.21289"
y="328.40674"
id="text4486"
transform="scale(0.9271786,1.0785409)"><tspan
transform="scale(0.92717857,1.0785409)"><tspan
sodipodi:role="line"
id="tspan4488"
x="985.13922"
y="267.21289"
y="328.40674"
style="font-size:34.51330566px;line-height:1.25">R</tspan></text>
<rect
style="fill:#898989;fill-opacity:1;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"
@ -709,51 +693,39 @@
width="32.775558"
height="36.044067"
x="106.94858"
y="327.59415" />
y="408.59415" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="118.64819"
y="335.1636"
y="410.806"
id="ailLgreen"
transform="scale(0.93385575,1.0708292)"
inkscape:label="#text4347-2-2-1"><tspan
sodipodi:role="line"
id="tspan4349-9-6-8"
x="118.64819"
y="335.1636"
y="410.806"
style="font-size:34.2665329px;line-height:1.25">G</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="78.4776"
y="329.96588"
id="text4351-1-7"
transform="scale(0.91900969,1.0881278)"><tspan
sodipodi:role="line"
id="tspan4353-2-9"
x="78.4776"
y="329.96588"
style="font-size:34.82009125px;line-height:1.25">B</tspan></text>
<rect
style="fill:#898989;fill-opacity:1;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"
id="rect4370-3-0-6"
width="32.775558"
height="36.044067"
x="927.58649"
y="327.1442" />
y="408.1442" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="1015.4791"
y="329.75821"
y="404.19797"
id="ailRblue"
transform="scale(0.91900969,1.0881278)"
inkscape:label="#text4351-1-7-2"><tspan
sodipodi:role="line"
id="tspan4353-2-9-0"
x="1015.4791"
y="329.75821"
y="404.19797"
style="font-size:34.82009125px;line-height:1.25">B</tspan></text>
<rect
style="fill:#898989;fill-opacity:1;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"
@ -761,43 +733,43 @@
width="32.775558"
height="36.044067"
x="887.91785"
y="327.1442" />
y="408.1442" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="955.30261"
y="335.05096"
y="410.69336"
id="ailRgreen"
transform="scale(0.93385575,1.0708292)"
inkscape:label="#text4347-2-2-1-2"><tspan
sodipodi:role="line"
id="tspan4349-9-6-8-3"
x="955.30261"
y="335.05096"
y="410.69336"
style="font-size:34.2665329px;line-height:1.25">G</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="203.8161"
y="548.85791"
y="562.763"
id="text4461-7"
transform="scale(0.92700692,1.0787406)"><tspan
sodipodi:role="line"
id="tspan4463-5"
x="203.8161"
y="548.85791"
y="562.763"
style="font-size:34.5196991px;line-height:1.25">L</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="881.46405"
y="548.97394"
y="562.88373"
id="text4486-9"
transform="scale(0.92732086,1.0783754)"><tspan
sodipodi:role="line"
id="tspan4488-2"
x="881.46405"
y="548.97394"
y="562.88373"
style="font-size:34.50801086px;line-height:1.25">R</tspan></text>
<rect
style="fill:#898989;fill-opacity:1;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"
@ -805,19 +777,19 @@
width="32.775558"
height="36.044067"
x="66.348572"
y="327.69415" />
y="408.69415" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="78.4776"
y="329.96588"
y="404.40564"
id="ailLblue"
transform="scale(0.91900969,1.0881278)"
inkscape:label="#text4351-1-7-28"><tspan
sodipodi:role="line"
id="tspan4353-2-9-9"
x="78.4776"
y="329.96588"
y="404.40564"
style="font-size:34.82009125px;line-height:1.25">B</tspan></text>
<rect
style="fill:#898989;fill-opacity:1;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"
@ -825,19 +797,19 @@
width="32.775558"
height="36.044067"
x="162.06201"
y="672.36768" />
y="664.86768" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="183.42683"
y="647.10468"
y="640.21198"
id="elevLblue"
transform="scale(0.91900969,1.0881278)"
inkscape:label="#text4351-1-7-7"><tspan
sodipodi:role="line"
id="tspan4353-2-9-3"
x="183.42683"
y="647.10468"
y="640.21198"
style="font-size:34.82009125px;line-height:1.25">B</tspan></text>
<rect
style="fill:#898989;fill-opacity:1;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"
@ -845,19 +817,19 @@
width="32.775558"
height="36.044067"
x="204.47299"
y="672.36139" />
y="664.86139" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="222.85838"
y="657.31158"
y="650.3078"
id="elevLgreen"
transform="scale(0.93385575,1.0708292)"
inkscape:label="#text4347-2-2-1-6"><tspan
sodipodi:role="line"
id="tspan4349-9-6-8-1"
x="222.85838"
y="657.31158"
y="650.3078"
style="font-size:34.2665329px;line-height:1.25">G</tspan></text>
<rect
style="fill:#898989;fill-opacity:1;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"
@ -865,19 +837,19 @@
width="32.775558"
height="36.044067"
x="831.81787"
y="671.34418" />
y="663.84418" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="911.57098"
y="646.80011"
y="639.90741"
id="elevRblue"
transform="scale(0.91900969,1.0881278)"
inkscape:label="#text4351-1-7-7-2"><tspan
sodipodi:role="line"
id="tspan4353-2-9-3-9"
x="911.57098"
y="646.80011"
y="639.90741"
style="font-size:34.82009125px;line-height:1.25">B</tspan></text>
<rect
style="fill:#898989;fill-opacity:1;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"
@ -885,43 +857,43 @@
width="32.775558"
height="36.044067"
x="791.61786"
y="671.34418" />
y="663.84418" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="860.73682"
y="651.89752"
y="644.94257"
id="elevRyellow"
transform="scale(0.92732085,1.0783754)"
inkscape:label="#text4355-3"><tspan
sodipodi:role="line"
id="tspan4357-1"
x="860.73682"
y="651.89752"
y="644.94257"
style="font-size:34.50801086px;line-height:1.25">Y</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="172.05634"
y="575.58044"
y="589.32837"
id="text4714"
transform="scale(0.91652932,1.0910726)"><tspan
transform="scale(0.91652931,1.0910726)"><tspan
sodipodi:role="line"
id="tspan4716"
x="172.05634"
y="575.58044"
y="589.32837"
style="font-size:36.08533478px;line-height:1.25">ELEV</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="858.55914"
y="575.03058"
y="588.7785"
id="text4714-9"
transform="scale(0.91652937,1.0910725)"><tspan
sodipodi:role="line"
id="tspan4716-4"
x="858.55914"
y="575.03058"
y="588.7785"
style="font-size:36.08533478px;line-height:1.25">ELEV</tspan></text>
<path
style="fill:none;fill-rule:evenodd;stroke:#0dc04b;stroke-width:2.4;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
@ -1292,4 +1264,11 @@
x="792.54504"
y="233.62128"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.1136055px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans'">5</tspan></text>
<path
style="fill:#179ab7;fill-opacity:1;stroke:#179ab7;stroke-width:1.67705202;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 513.74999,810.24995 v 18.75003"
id="rudderTrimInd"
inkscape:connector-curvature="0"
inkscape:transform-center-y="142.38281"
inkscape:label="#path1012" />
</svg>

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View file

@ -50,8 +50,8 @@
id="namedview371"
showgrid="false"
inkscape:zoom="0.68"
inkscape:cx="817.73616"
inkscape:cy="1022.6281"
inkscape:cx="434.43172"
inkscape:cy="1022.8371"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -148,8 +148,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2-5-3"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="FUEL-XFEED-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2-5-3" />
</g>
<rect
style="fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:6.70764637;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
@ -231,7 +232,7 @@
y="405.25" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:2.5165925px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:2.5165925px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="315.9696"
y="468.43625"
id="FUEL-Left-Inner-quantity"
@ -239,26 +240,26 @@
transform="scale(0.9562547,1.0457465)"><tspan
sodipodi:role="line"
id="tspan4819"
x="315.9696"
x="279.51846"
y="468.43625"
style="font-size:30.1989994px;line-height:0">0000</tspan></text>
style="font-size:30.1989994px;line-height:0;text-align:end;text-anchor:end;">0000</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:2.5165925px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:2.5165925px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="827.31793"
y="468.59464"
id="FUEL-Right-Inner-quantity"
inkscape:label="#text5149"
transform="scale(0.9562547,1.0457465)"><tspan
style="font-size:30.19900131px;line-height:0;stroke-width:2.5165925px"
style="font-size:30.19900131px;line-height:0;text-align:end;text-anchor:end;stroke-width:2.5165925px;"
y="468.59464"
x="827.31793"
x="790.86682"
sodipodi:role="line"
id="tspan4819-8">0000</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:2.5165925px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="1008.5436"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:2.5165925px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="981.7066"
y="468.28946"
id="FUEL-Right-Outer-quantity"
inkscape:label="#text5149"
@ -267,10 +268,10 @@
id="tspan4857"
x="1008.5436"
y="468.28946"
style="font-size:30.1989994px;line-height:0">000</tspan></text>
style="font-size:30.1989994px;line-height:0;text-anchor:middle;text-align:center;">000</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:2.5165925px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:2.5165925px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="106.37531"
y="468.35995"
id="FUEL-Left-Outer-quantity"
@ -278,9 +279,9 @@
transform="scale(0.9562547,1.0457465)"><tspan
sodipodi:role="line"
id="tspan4877"
x="106.37531"
x="79.538307"
y="468.35995"
style="font-size:30.1989994px;line-height:0">000</tspan></text>
style="font-size:30.1989994px;line-height:0;text-align:end;text-anchor:end;">000</tspan></text>
<rect
style="fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:3.17700815;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-7-3-8-3"
@ -374,8 +375,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2-5-3-4"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="FUEL-ENG-Master-1-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2-5-3-4" />
</g>
<g
id="FUEL-ENG-Master-2"
@ -392,8 +394,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2-5-3-4-3"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="FUEL-ENG-Master-2-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2-5-3-4-3" />
</g>
<text
xml:space="preserve"
@ -652,20 +655,6 @@
id="FUEL-Pump-Right-1"
inkscape:label="#g5620"
transform="translate(0,-6.6012608e-5)">
<rect
y="345.25"
x="710.85443"
height="63.750004"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="345.25"
x="654.60443"
height="63.750004"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="345.25"
x="682.5"
@ -674,22 +663,40 @@
id="FUEL-Pump-Right-1-Open"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5" />
<g
id="FUEL-Pump-Right-1-Square"
inkscape:label="#g1037">
<rect
transform="rotate(90)"
y="-712.5"
x="403.6044"
height="56.249981"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6"
width="5.3955846"
height="63.750004"
x="710.85443"
y="345.25" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7"
width="5.3955846"
height="63.750004"
x="654.60443"
y="345.25" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.60190916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5-6"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.60190916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
transform="rotate(90)"
y="-712.5"
x="345.25"
height="57.895527"
width="5.3955846"
height="56.249981"
x="403.6044"
y="-712.5"
transform="rotate(90)" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.62517166;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5-6-9"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.62517166;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
width="5.3955846"
height="57.895527"
x="345.25"
y="-712.5"
transform="rotate(90)" />
</g>
<rect
transform="rotate(90)"
y="-708.75"
@ -704,20 +711,6 @@
transform="translate(65.854409,-1.0289252e-5)"
id="FUEL-Pump-Right-2"
inkscape:label="#g5620">
<rect
y="345.25"
x="710.85443"
height="63.750004"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-2"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="345.25"
x="654.60443"
height="63.750004"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-8"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="345.25"
x="682.5"
@ -726,22 +719,40 @@
id="FUEL-Pump-Right-2-Open"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5" />
<g
id="FUEL-Pump-Right-2-Square"
inkscape:label="#g1043">
<rect
transform="rotate(90)"
y="-712.5"
x="403.6044"
height="56.249981"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-2"
width="5.3955846"
height="63.750004"
x="710.85443"
y="345.25" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-8"
width="5.3955846"
height="63.750004"
x="654.60443"
y="345.25" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.60190916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5-6-99"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.60190916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
transform="rotate(90)"
y="-712.5"
x="345.25"
height="57.895527"
width="5.3955846"
height="56.249981"
x="403.6044"
y="-712.5"
transform="rotate(90)" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.62517166;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5-6-9-6"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.62517166;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
width="5.3955846"
height="57.895527"
x="345.25"
y="-712.5"
transform="rotate(90)" />
</g>
<rect
transform="rotate(90)"
y="-708.75"
@ -756,20 +767,6 @@
transform="matrix(1,0,0,1.0022839,-420.75001,-0.78852587)"
id="FUEL-Pump-Left-1"
inkscape:label="#g5620">
<rect
y="345.25"
x="710.85443"
height="63.750004"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-76"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="345.25"
x="654.60443"
height="63.750004"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-1"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="345.25"
x="682.5"
@ -778,22 +775,39 @@
id="FUEL-Pump-Left-1-Open"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5" />
<g
id="FUEL-Pump-Left-1-Square">
<rect
transform="rotate(90)"
y="-712.5"
x="403.6044"
height="56.249981"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-76"
width="5.3955846"
height="63.750004"
x="710.85443"
y="345.25" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-1"
width="5.3955846"
height="63.750004"
x="654.60443"
y="345.25" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.60190916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5-6-2"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.60190916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
transform="rotate(90)"
y="-712.5"
x="345.25"
height="57.895527"
width="5.3955846"
height="56.249981"
x="403.6044"
y="-712.5"
transform="rotate(90)" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.62517166;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5-6-9-1"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.62517166;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
width="5.3955846"
height="57.895527"
x="345.25"
y="-712.5"
transform="rotate(90)" />
</g>
<rect
transform="rotate(90)"
y="-708.75"
@ -808,6 +822,8 @@
transform="translate(-355.50001,-4.5998985e-6)"
id="FUEL-Pump-Left-2"
inkscape:label="#g5620">
<g
id="FUEL-Pump-Left-2-Square">
<rect
y="345.25"
x="710.85443"
@ -822,14 +838,6 @@
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-8-1"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="345.25"
x="682.5"
height="63.750004"
width="5.3955846"
id="FUEL-Pump-Left-2-Open"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5" />
<rect
transform="rotate(90)"
y="-712.5"
@ -846,6 +854,15 @@
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5-6-9-6-1"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.62517166;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<rect
y="345.25"
x="682.5"
height="63.750004"
width="5.3955846"
id="FUEL-Pump-Left-2-Open"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5" />
<rect
transform="rotate(90)"
y="-708.75"
@ -861,20 +878,6 @@
id="FUEL-Pump-Center-1"
inkscape:label="#g5620"
style="stroke:none;stroke-opacity:1">
<rect
y="345.25"
x="710.85443"
height="63.750004"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-76-5"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="345.25"
x="654.60443"
height="63.750004"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-1-8"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="345.25"
x="682.5"
@ -883,22 +886,40 @@
id="FUEL-Pump-Center-1-Open"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5" />
<g
id="FUEL-Pump-Center-1-Square"
inkscape:label="#g1025">
<rect
transform="rotate(90)"
y="-712.5"
x="403.6044"
height="56.249981"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-76-5"
width="5.3955846"
height="63.750004"
x="710.85443"
y="345.25" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-1-8"
width="5.3955846"
height="63.750004"
x="654.60443"
y="345.25" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.60190916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5-6-2-0"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.60190916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
transform="rotate(90)"
y="-712.5"
x="345.25"
height="57.895527"
width="5.3955846"
height="56.249981"
x="403.6044"
y="-712.5"
transform="rotate(90)" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.62517166;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5-6-9-1-4"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.62517166;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
width="5.3955846"
height="57.895527"
x="345.25"
y="-712.5"
transform="rotate(90)" />
</g>
<rect
transform="rotate(90)"
y="-708.75"
@ -913,20 +934,6 @@
transform="translate(-131.39559,-15.00001)"
id="FUEL-Pump-Center-2"
inkscape:label="#g5620">
<rect
y="345.25"
x="710.85443"
height="63.750004"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-76-5-4"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="345.25"
x="654.60443"
height="63.750004"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-1-8-2"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="345.25"
x="682.5"
@ -935,22 +942,39 @@
id="FUEL-Pump-Center-2-Open"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5" />
<g
id="FUEL-Pump-Center-2-Square">
<rect
transform="rotate(90)"
y="-712.5"
x="403.6044"
height="56.249981"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-76-5-4"
width="5.3955846"
height="63.750004"
x="710.85443"
y="345.25" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.7053628;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-1-8-2"
width="5.3955846"
height="63.750004"
x="654.60443"
y="345.25" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.60190916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5-6-2-0-6"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.60190916;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
transform="rotate(90)"
y="-712.5"
x="345.25"
height="57.895527"
width="5.3955846"
height="56.249981"
x="403.6044"
y="-712.5"
transform="rotate(90)" />
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.62517166;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5-6-9-1-4-1"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.62517166;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
width="5.3955846"
height="57.895527"
x="345.25"
y="-712.5"
transform="rotate(90)" />
</g>
<rect
transform="rotate(90)"
y="-708.75"
@ -978,40 +1002,40 @@
style="fill:none;stroke:#0dc04b;stroke-width:2.77499986;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.80000019;stroke-dasharray:none;stroke-opacity:1" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.75"
x="714.24243"
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:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.75;"
x="786.66431"
y="105.24868"
id="FUEL-used-2"
inkscape:label="#text5832"><tspan
sodipodi:role="line"
id="tspan5830"
x="714.24243"
x="750.45337"
y="105.24868"
style="font-size:30px;line-height:1.25;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">0000</tspan></text>
style="font-size:30px;line-height:1.25;text-align:end;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke-width:0.75;">0000</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.75"
x="470.07513"
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:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.75;"
x="542.49701"
y="106.80015"
id="FUEL-used-both"
inkscape:label="#text5832"><tspan
sodipodi:role="line"
id="tspan5830-5"
x="470.07513"
x="506.28607"
y="106.80015"
style="font-size:30.00000191px;line-height:1.25;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">0000</tspan></text>
style="font-size:30.00000191px;line-height:1.25;text-align:end;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke-width:0.75;">0000</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.75"
x="228.69138"
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:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.75;"
x="301.11325"
y="105.37296"
id="FUEL-used-1"
inkscape:label="#text5832"><tspan
sodipodi:role="line"
id="tspan5830-5-2"
x="228.69138"
x="264.90231"
y="105.37296"
style="font-size:30.00000191px;line-height:1.25;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">0000</tspan></text>
style="font-size:30.00000191px;line-height:1.25;text-align:end;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke-width:0.75;">0000</tspan></text>
<rect
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.82722223;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="FUEL-ENG-1-pipe"

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 71 KiB

View file

@ -12,7 +12,7 @@
viewBox="0 0 1024 1024"
version="1.1"
id="svg2"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="hyd.svg">
<metadata
id="metadata375">
@ -55,10 +55,10 @@
inkscape:window-width="1366"
inkscape:window-height="705"
id="namedview371"
showgrid="true"
inkscape:zoom="4.0298682"
inkscape:cx="632.99286"
inkscape:cy="609.55322"
showgrid="false"
inkscape:zoom="5.6568542"
inkscape:cx="1081.6807"
inkscape:cy="259.15874"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -84,8 +84,9 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2-5-3"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="Fire-Valve-Green-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2-5-3" />
</g>
<text
xml:space="preserve"
@ -117,7 +118,7 @@
transform="translate(-504.6045,133.35439)"
id="Pump-Green"
inkscape:label="#g5620"
style="stroke:none;stroke-opacity:1;fill:#0dc04b;fill-opacity:1;stroke-width:0.99974997;stroke-miterlimit:4;stroke-dasharray:none">
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.99974996;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1">
<rect
transform="rotate(90)"
y="-722.10449"
@ -125,7 +126,7 @@
height="69.75222"
width="5.3955846"
id="Pump-Green-off"
style="fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:0.99974997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:0.99974996;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5-6-9-8" />
<rect
y="344.7912"
@ -133,21 +134,21 @@
height="63.750004"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-76"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.99974997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.99974996;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="344.7912"
x="650.70892"
height="63.750004"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-1"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.99974997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.99974996;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="346.8956"
x="686.70892"
height="60"
width="5.3955846"
id="Pump-Green-on"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.99974997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.99974996;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5" />
<rect
transform="rotate(90)"
@ -156,7 +157,7 @@
height="66"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5-6-2"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.99974997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.99974996;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
transform="rotate(90)"
y="-718.6366"
@ -164,7 +165,7 @@
height="67.927612"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-6-6-6-4-6-7-5-6-9-1"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.99974997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.99974996;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<text
xml:space="preserve"
@ -384,60 +385,67 @@
x="817.61298"
height="5.1203089"
width="53.195583"
id="rect5105-2-5-3-8"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="Fire-Valve-Yellow-Cross"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-2-5-3-8" />
</g>
<g
id="Green-Line"
inkscape:label="#g5511"
transform="matrix(1,0,0,0.91447869,0,20.867199)">
<rect
y="666.37177"
x="181.49602"
height="50.02853"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-7-3-8"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.5107255;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="567.01062"
x="182.10442"
height="37.850697"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-7-3-8-6"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.31405532;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="Green-Line-Middle"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.31405532;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-7-3-8-6" />
<rect
y="666.37177"
x="181.49602"
height="50.02853"
width="5.3955846"
id="Green-Line-Bottom"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.5107255;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-7-3-8" />
<rect
y="239.89929"
x="182.10442"
height="260.70981"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-7-3-8-6-8"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:3.44869995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="Green-Line-Top"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:3.44869995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-7-3-8-6-8" />
</g>
<g
id="Yellow-Line"
inkscape:label="#g5520"
transform="matrix(1,0,0,0.91744285,0,20.152178)">
<rect
y="669.08563"
x="812.10443"
height="47.414429"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-7-3-8-8"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.47072661;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
y="571.64478"
x="811.70526"
height="33.75"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-7-3-8-6-4"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.24083376;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="Yellow-Line-Middle"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.24083376;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-7-3-8-6-4" />
<rect
y="666.48438"
x="812.10443"
height="50.015663"
width="5.3955846"
id="Yellow-Line-Bottom"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1.51053119;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-7-3-8-8" />
<rect
y="235.81612"
x="812.71283"
height="269.77158"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-7-3-8-6-8-3"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:3.50812292;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="Yellow-Line-Top"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:3.50812292;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-7-3-8-6-8-3" />
</g>
<path
style="fill:none;stroke:#0dc04b;stroke-width:2.77499986;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.80000019;stroke-dasharray:none;stroke-opacity:1"
@ -858,15 +866,17 @@
x="497.1044"
height="322.44897"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-7-3-8-6-8-9"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:3.83536959;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="Blue-Line-Top"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:3.83536959;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-7-3-8-6-8-9" />
<rect
y="624.25513"
x="497.1044"
height="92.244881"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-7-3-8-6-8-9-6"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:2.05138826;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
id="Blue-Line-Bottom"
style="fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:2.05138826;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#rect5105-6-0-7-8-6-8-8-7-3-8-6-8-9-6" />
</g>
<path
style="fill:none;stroke:#0dc04b;stroke-width:3.89999986;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
@ -875,6 +885,16 @@
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc"
inkscape:label="#path5530" />
<rect
style="opacity:0.8;fill:#cecdce;fill-opacity:1;stroke:#179ab7;stroke-width:1.6348666;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
id="HYD-Quantity-Group-Yellow_clip"
width="33.343235"
height="180.96817"
x="793.64117"
y="677.14093"
inkscape:label="#rect1048"
inkscape:transform-center-x="22.540598"
inkscape:transform-center-y="-79.48293" />
<g
id="HYD-Quantity-Group-Yellow"
inkscape:label="#g5619">
@ -882,7 +902,7 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path5561"
d="m 812.24998,856.74997 h -17.25"
d="m 812.24998,856.74997 h -17.0677"
style="fill:none;stroke:#0dc04b;stroke-width:2.625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccc"
@ -893,15 +913,15 @@
<rect
y="677.5"
x="812.10443"
height="123.75005"
height="144.83067"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-7-3-8-8-1"
style="fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:2.3760159;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:2.57043672;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path5559"
d="m 813.38785,802.38785 h 11.25 v 54.39495 h -11.25 z"
style="fill:none;stroke:#bb6100;stroke-width:2.625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
d="m 813.15523,823.32891 h 11.71524 v 33.68651 h -11.71524 z"
style="fill:none;stroke:#bb6100;stroke-width:2.10803151;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="Quantity-Indicator-Yellow"
@ -909,15 +929,23 @@
style="fill:none;stroke:#0dc04b;stroke-width:2.625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#path5563" />
</g>
<rect
style="opacity:0.8;fill:#cecdce;fill-opacity:1;stroke:#179ab7;stroke-width:1.63897061;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
id="HYD-Quantity-Group-Blue_clip"
width="33.344971"
height="181.86841"
x="478.64029"
y="674.69995"
inkscape:label="#rect1048" />
<g
transform="translate(-314.99999)"
transform="translate(-314.99999,-1.6423255)"
id="HYD-Quantity-Group-Blue"
inkscape:label="#g5619">
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path5561-4"
d="m 812.24998,856.74997 h -17.25"
d="m 812.24998,856.74997 h -17.0677"
style="fill:none;stroke:#0dc04b;stroke-width:2.625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccc"
@ -928,15 +956,15 @@
<rect
y="677.5"
x="812.10443"
height="123.75005"
height="135.94765"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-7-3-8-8-1-6"
style="fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:2.3760159;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:2.49036217;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path5559-3"
d="m 813.38785,802.38785 h 11.25 v 54.39495 h -11.25 z"
style="fill:none;stroke:#bb6100;stroke-width:2.625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
d="m 813.26886,814.62253 h 11.48798 v 42.27926 h -11.48798 z"
style="fill:none;stroke:#bb6100;stroke-width:2.33861709;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="Quantity-Indicator-Blue"
@ -944,6 +972,14 @@
style="fill:none;stroke:#0dc04b;stroke-width:2.625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:label="#path5563" />
</g>
<rect
style="opacity:0.8;fill:#cecdce;fill-opacity:1;stroke:#179ab7;stroke-width:1.63411391;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
id="HYD-Quantity-Group-Green_clip"
width="33.336826"
height="180.83632"
x="163.64438"
y="675.72797"
inkscape:label="#rect1048" />
<g
transform="translate(-630.6084,-1.5000219)"
id="HYD-Quantity-Group-Green"
@ -952,7 +988,7 @@
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path5561-5"
d="m 812.24998,856.74997 h -17.25"
d="M 812.24998,856.74997 H 795.17576"
style="fill:none;stroke:#0dc04b;stroke-width:2.625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccc"
@ -963,15 +999,15 @@
<rect
y="677.5"
x="812.10443"
height="123.75005"
height="152.12271"
width="5.3955846"
id="rect5105-6-0-7-8-6-8-8-7-3-8-8-1-62"
style="fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:2.3760159;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
style="fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:2.63435125;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path5559-1"
d="m 813.38785,802.38785 h 11.25 v 54.39495 h -11.25 z"
style="fill:none;stroke:#bb6100;stroke-width:2.625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
d="m 812.88109,830.65833 h 12.26352 v 26.63123 h -12.26352 z"
style="fill:none;stroke:#bb6100;stroke-width:1.91768491;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="Quantity-Indicator-Green"
@ -1172,4 +1208,17 @@
x="560.88452"
y="976.25214"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b">00</tspan></text>
<text
transform="scale(0.87383883,1.1443758)"
inkscape:label="#text5149"
id="Pump-LOPR-Blue"
y="507.94836"
x="542.45435"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:3.77088857px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
sodipodi:role="line"
id="tspan4816-7"
x="542.45435"
y="507.94836"
style="font-size:45.25px;line-height:0;stroke-width:3.77088857px">LO</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 65 KiB

View file

@ -12,7 +12,7 @@
viewBox="0 0 1024 1024"
version="1.1"
id="svg2"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="press.svg">
<metadata
id="metadata375">
@ -41,9 +41,9 @@
inkscape:window-height="705"
id="namedview371"
showgrid="true"
inkscape:zoom="0.88"
inkscape:cx="397.64824"
inkscape:cy="880.3857"
inkscape:zoom="0.64"
inkscape:cx="770.48025"
inkscape:cy="620.45739"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -467,7 +467,7 @@
style="font-size:32.18700027px;line-height:0">SYS2</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;opacity:0.98999999;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:2.68228626px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;opacity:0.98999999;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:2.68228626px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="632.71191"
y="608.12244"
id="PRESS-Man"
@ -477,10 +477,10 @@
id="tspan5036"
x="632.71191"
y="608.12244"
style="font-size:32.18700027px;line-height:0">MAN</tspan></text>
style="font-size:32.18700027px;line-height:0;fill:#0dc04b;fill-opacity:1;">MAN</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.87310684"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.87310684;"
x="156.08197"
y="788.50562"
id="PRESS-Pack-1"
@ -490,10 +490,10 @@
id="tspan5038"
x="156.08197"
y="788.50562"
style="font-size:34.92427444px;line-height:1.25;fill:#0dc04b;fill-opacity:1;stroke-width:0.87310684">PACK 1</tspan></text>
style="font-size:34.92427444px;line-height:1.25;fill:#cecdce;fill-opacity:1;stroke-width:0.87310684;">PACK 1</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.87310684"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.87310684;"
x="802.58295"
y="788.27905"
id="PRESS-Pack-2"
@ -503,35 +503,24 @@
id="tspan5060"
x="802.58295"
y="788.27905"
style="font-size:34.92399979px;line-height:1.25">PACK 2</tspan></text>
style="font-size:34.92399979px;line-height:1.25;fill:#cecdce;fill-opacity:1;">PACK 2</tspan></text>
<path
style="fill:none;stroke:#cecdce;stroke-width:2.47499993;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
style="fill:none;stroke:#0dc04b;stroke-width:2.47499993;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="m 191.99999,797.49995 h 20.25 v 0 l -9.75,-25.5 v 0 z"
id="path5062"
inkscape:connector-curvature="0" />
id="PRESS-Pack-1-Triangle"
inkscape:connector-curvature="0"
inkscape:label="#path5062" />
<path
style="fill:none;stroke:#cecdce;stroke-width:2.4749999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;stroke:#0dc04b;stroke-width:2.4749999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 805.14493,798.24998 h 20.25 v 0 l -9.75,-25.5 v 0 z"
id="path5062-3"
inkscape:connector-curvature="0" />
id="PRESS-Pack-2-Triangle"
inkscape:connector-curvature="0"
inkscape:label="#path5062-3" />
<path
style="fill:none;stroke:#cecdce;stroke-width:2.4749999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 203.99999,195.24999 h 20.25 v 0 l -9.75,-25.5 v 0 z"
id="path5062-3-0"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dbe4a;fill-opacity:1;stroke:none;stroke-width:1.43711448"
x="506.89874"
y="334.31491"
id="PRESS-Cab-VS-neg"
transform="scale(0.98802114,1.0121241)"
inkscape:label="#text5100"><tspan
sodipodi:role="line"
id="tspan5098"
x="506.89874"
y="334.31491"
style="font-size:57.48457718px;line-height:1.25;fill:#0dbe4a;fill-opacity:1;stroke-width:1.43711448">-</tspan></text>
<rect
style="fill:#0dbe4a;fill-opacity:1;stroke:none;stroke-width:1.60198247;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="PRESS-Alt-needle"
@ -771,32 +760,6 @@
x="185.16533"
y="366.22198"
style="font-size:27.24699974px;line-height:0">0</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#0dbe4a;fill-opacity:1;stroke:none;stroke-width:4.99181652px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="169.68008"
y="538.0921"
id="PRESS-deltaP-period"
inkscape:label="#text3720"
transform="scale(1.3534057,0.73887673)"><tspan
sodipodi:role="line"
id="tspan5559"
x="169.68008"
y="538.0921"
style="font-size:59.90160751px;line-height:0;fill:#0dbe4a;fill-opacity:1;stroke-width:4.99181652px">.</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#0dbe4a;fill-opacity:1;stroke:none;stroke-width:2.27059054px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="278.09778"
y="360.78436"
id="PRESS-deltaP-Decimal"
inkscape:label="#text3720"
transform="scale(0.9147857,1.0931522)"><tspan
sodipodi:role="line"
id="tspan5595"
x="278.09778"
y="360.78436"
style="font-size:27.24699974px;line-height:0">1</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#0dbe4a;fill-opacity:1;stroke:none;stroke-width:2.27059054px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 55 KiB

View file

@ -41,9 +41,9 @@
inkscape:window-height="705"
id="namedview371"
showgrid="true"
inkscape:zoom="2.3145515"
inkscape:cx="701.70396"
inkscape:cy="947.29764"
inkscape:zoom="0.64"
inkscape:cx="1071.5554"
inkscape:cy="763.4389"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -370,14 +370,14 @@
id="NORMbrk"
y="616.38831"
x="426.55933"
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';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
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';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
xml:space="preserve"
inkscape:label="#text4285"><tspan
y="616.38831"
x="426.55933"
id="tspan4287"
sodipodi:role="line"
style="font-size:32px;line-height:1.25;fill:#0dc04b;fill-opacity:1">NORM BRK</tspan></text>
style="font-size:32px;line-height:1.25;fill:#bb6100;fill-opacity:1;">NORM BRK</tspan></text>
<text
id="accupress_text"
y="707.69037"
@ -484,7 +484,7 @@
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans'">999</tspan></text>
<text
xml:space="preserve"
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';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
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';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="926.31042"
y="555.97632"
id="releaseR3"
@ -494,33 +494,33 @@
id="tspan4329"
x="926.31042"
y="555.97632"
style="font-size:21.63888741px;line-height:1.25">|||</tspan></text>
style="font-size:21.63888741px;line-height:1.25;fill:#bb6100;fill-opacity:1;">|||</tspan></text>
<text
transform="scale(0.83828115,1.1929172)"
id="releaseL3"
y="555.97632"
x="852.14044"
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';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
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';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
xml:space="preserve"
inkscape:label="#text4331"><tspan
y="555.97632"
x="852.14044"
id="tspan4333"
sodipodi:role="line"
style="font-size:21.63888741px;line-height:1.25">|||</tspan></text>
style="font-size:21.63888741px;line-height:1.25;fill:#bb6100;fill-opacity:1;">|||</tspan></text>
<text
transform="scale(0.83828115,1.1929172)"
id="releaseL4"
y="556.23566"
x="1048.9662"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
xml:space="preserve"
inkscape:label="#text4335"><tspan
y="556.23566"
x="1048.9662"
id="tspan4337"
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.63888741px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans'">|||</tspan></text>
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.63888741px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#bb6100;fill-opacity:1;">|||</tspan></text>
<text
xml:space="preserve"
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';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
@ -547,7 +547,7 @@
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans'">REL</tspan></text>
<text
xml:space="preserve"
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';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
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';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="80.142349"
y="607.25616"
id="releaseL1"
@ -557,23 +557,23 @@
id="tspan4353"
x="80.142349"
y="607.25616"
style="font-size:23.3301487px;line-height:1.25">|||</tspan></text>
style="font-size:23.3301487px;line-height:1.25;fill:#bb6100;fill-opacity:1;">|||</tspan></text>
<text
transform="scale(0.91562312,1.0921524)"
id="releaseR1"
y="606.97186"
x="147.61992"
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';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
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';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
xml:space="preserve"
inkscape:label="#text4355"><tspan
y="606.97186"
x="147.61992"
id="tspan4357"
sodipodi:role="line"
style="font-size:23.3301487px;line-height:1.25">|||</tspan></text>
style="font-size:23.3301487px;line-height:1.25;fill:#bb6100;fill-opacity:1;">|||</tspan></text>
<text
xml:space="preserve"
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';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
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';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="254.77022"
y="607.25616"
id="releaseL2"
@ -583,20 +583,20 @@
id="tspan4361"
x="254.77022"
y="607.25616"
style="font-size:23.3301487px;line-height:1.25">|||</tspan></text>
style="font-size:23.3301487px;line-height:1.25;fill:#bb6100;fill-opacity:1;">|||</tspan></text>
<text
transform="scale(0.91562313,1.0921524)"
id="releaseR2"
y="606.97186"
x="321.23053"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
xml:space="preserve"
inkscape:label="#text4363"><tspan
y="606.97186"
x="321.23053"
id="tspan4365"
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:23.3301487px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans'">|||</tspan></text>
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:23.3301487px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#bb6100;fill-opacity:1;">|||</tspan></text>
<path
style="fill:#cecdce;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 62.082323,383.88565 50.858397,0 0,2.80598 -50.861852,-0.0503 z"
@ -1062,7 +1062,7 @@
inkscape:label="#rect4336" />
<text
xml:space="preserve"
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';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
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';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="636.59528"
y="554.79926"
id="BSCU2"
@ -1071,10 +1071,10 @@
id="tspan192"
x="636.59528"
y="554.79926"
style="font-size:32px;line-height:1.25;fill:#bb6100;fill-opacity:1">2</tspan></text>
style="font-size:32px;line-height:1.25;fill:#0dc04b;fill-opacity:1;">2</tspan></text>
<text
xml:space="preserve"
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';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
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';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="602.89856"
y="554.79913"
id="BSCU1"
@ -1083,7 +1083,7 @@
id="tspan195"
x="602.89856"
y="554.79913"
style="font-size:32px;line-height:1.25;fill:#bb6100;fill-opacity:1">1</tspan></text>
style="font-size:32px;line-height:1.25;fill:#0dc04b;fill-opacity:1;">1</tspan></text>
<rect
y="336.88196"
x="364.16824"
@ -1114,17 +1114,17 @@
inkscape:label="#path4358" />
<text
xml:space="preserve"
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';letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
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';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="1123.6205"
y="555.97632"
id="releaseR3-7"
id="releaseR4"
transform="scale(0.83828114,1.1929172)"
inkscape:label="#text4327"><tspan
sodipodi:role="line"
id="tspan4329-4"
x="1123.6205"
y="555.97632"
style="font-size:21.63888741px;line-height:1.25;stroke-width:1px">|||</tspan></text>
style="font-size:21.63888741px;line-height:1.25;stroke-width:1px;fill:#bb6100;fill-opacity:1;">|||</tspan></text>
<text
inkscape:label="#text4355-7"
transform="scale(0.92732085,1.0783754)"
@ -1190,14 +1190,14 @@
inkscape:label="#text4289"
xml:space="preserve"
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';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="455.59897"
y="707.69037"
x="441.43594"
y="707.69073"
id="accuonly"><tspan
style="font-size:32px;line-height:1.25"
sodipodi:role="line"
id="tspan4312"
x="455.59897"
y="707.69037">ACCU ONLY</tspan></text>
x="441.43594"
y="707.69073">ACCU ONLY</tspan></text>
<path
inkscape:label="#path4358"
sodipodi:nodetypes="cccccccccc"

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View file

@ -6567,7 +6567,7 @@ var canvas_MCDU_2 = {
},
};
setlistener("sim/signals/fdm-initialized", func {
setlistener("/sim/signals/fdm-initialized", func {
MCDU1_display = canvas.new({
"name": "MCDU1",
"size": [1024, 864],

View file

@ -330,7 +330,7 @@ var canvas_ND_2_test = {
},
};
setlistener("sim/signals/fdm-initialized", func {
setlistener("/sim/signals/fdm-initialized", func {
setprop("instrumentation/efis[0]/inputs/plan-wpt-index", -1);
setprop("instrumentation/efis[1]/inputs/plan-wpt-index", -1);

View file

@ -25,58 +25,97 @@ var easeArrow = {
m.duration = 0;
m.startval = 0;
m.diffval = 0;
m.nav = "";
m.mhz = 0;
m.changed = 1;
return m;
},
setVisible: func(v) {
if (v == 1 and me.last_rot_deg == nil) me.reset();
if (v == 1 and me.last_rot_deg == nil) me.setzero();
me.element.setVisible(v);
},
hide: func {
me.element.hide();
},
reset: func {
#me.element.hide();
me.duration = 0;
me.changed = 1;
},
setzero: func {
me.duration = 0;
me.last_rot_deg = 360 - getprop("orientation/heading-deg");
me.last_rot_rad = me.last_rot_deg * D2R;
me.duration = 0;
print("VOR reset");
me.req_rot_rad = me.last_rot_rad;
me.element.setRotation(me.last_rot_rad);
},
listen: func (path) {
me.nav = path ~ "/frequencies/selected-mhz";
setlistener(me.nav, func {
var freq = getprop(me.nav);
if (me.mhz != freq) {
me.mhz = freq;
me.reset();
}
});
},
setRotation: func(rad) {
var deg = 0;
var gap = 0;
if (me.last_rot_deg == nil) me.setzero();
rad = math.round(rad * 1000) / 1000;
gap = math.abs(rad - me.req_rot_rad);
if (gap>0.001) {
if (me.duration>0) gap = math.abs(rad - me.last_rot_rad);
if (gap>=180*D2R) gap = 360*D2R - gap;
#if (gap>=180*D2R) gap = 360*D2R - gap;
if (gap>0.0009) {
#print("VOR rotation");
#else if (me.duration>0) gap = math.abs(rad - me.last_rot_rad);
deg = rad * 57.29578;
me.req_rot_rad = rad;
me.req_rot_deg = deg;
me.duration = 0;
if (gap>0.2) {
if (me.last_rot_deg == nil) me.reset();
#me.duration = 0;
if (me.duration > 0) {
var add = deg - me.req_rot_deg;
if (add>=180) add = add - 360;
me.diffval += add;
me.duration = math.abs( math.round(me.diffval * 0.19) ); # rad 36/3
}
else if (me.changed == 1) {
#if (me.last_rot_deg == nil) me.reset();
me.startval = me.last_rot_deg;
me.diffval = deg - me.last_rot_deg;
if (me.diffval<0) me.diffval += 360;
me.time = 0;
me.duration = math.round(me.diffval * 0.21); # rad 36/3
while (me.diffval<0) me.diffval += 360;
if (me.changed == 1 and me.diffval < 180) me.diffval += 360;
#print("VOR animation:" ~ me.diffval);
#me.time = 0;
me.duration = math.abs( math.round(me.diffval * 0.19) ); # rad 36/3
} else {
me.duration = 0;
}
if (me.duration < 2) {
me.last_rot_rad = rad;
me.last_rot_deg = deg;
me.element.setRotation(rad);
me.duration = 0;
me.time = 0;
me.changed = 0;
}
me.req_rot_rad = rad;
me.req_rot_deg = deg;
}
if (me.duration > 0) {
var tx = me.time / me.duration;
if (tx>1) tx = 1;
#thanks to https://easings.net/#easeOutCubic
deg = (1 - math.pow(1 - tx, 3)) * me.diffval + me.startval;
deg = math.mod(deg,360);
#print("DEG: " ~ deg);
me.last_rot_deg = deg;
me.last_rot_rad = deg * D2R;
me.element.setRotation(me.last_rot_rad);
me.element.setRotation(deg * D2R);
me.time += 1;
if (tx>=1) me.duration = 0;
if (tx>=1) {
me.duration = 0;
me.time = 0;
me.changed = 0;
me.last_rot_deg = deg;
me.last_rot_rad = rad;
}
}
}
@ -173,7 +212,7 @@ canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update
# because things are much better configurable that way
# now look up all required SVG elements and initialize member fields using the same name to have a convenient handle
foreach(var element; ["dmeL","dmeR","vorL","vorR","vorLId","vorRId",
"status.wxr","status.wpt","status.sta","status.arpt","terrHI","terrLO","TerrLabel","terrAhead"])
"status.wxr","status.wpt","status.sta","status.arpt","terrHI","terrLO","TerrLabel","terrAhead","terrAltGroup"])
me.symbols[element] = me.nd.getElementById(element);
foreach(var element; ["dmeLDist","dmeRDist"])
@ -213,6 +252,12 @@ canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update
return 0;
}
# listen for (VOR) NAV frequency change
me.symbols.staArrowL.listen(vor1_path);
me.symbols.staArrowL2.listen(vor1_path);
me.symbols.staArrowR.listen(vor2_path);
me.symbols.staArrowR2.listen(vor2_path);
# another predicate for the draw controller
var get_course_by_freq = func(freq) {
if (freq == getprop(vor1_path~ "frequencies/selected-mhz"))
@ -610,36 +655,35 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
}
var adf0hdg = getprop("/instrumentation/adf/indicated-bearing-deg");
var adf1hdg = getprop("/instrumentation/adf[1]/indicated-bearing-deg");
if(!me.get_switch("toggle_centered"))
{
if(!me.get_switch("toggle_centered")) {
if(me.in_mode("toggle_display_mode", ["PLAN"]) or (me.adirs_property.getValue() != 1 or (me.change_phase == 1) and (adirs_3.getValue() != 1 or att_switch.getValue() != me.attitude_heading_setting)))
me.symbols.trkInd.hide();
else
me.symbols.trkInd.show();
if((getprop("/instrumentation/nav[2]/in-range") and me.get_switch("toggle_lh_vor_adf") == 1)) {
me.symbols.staArrowL.setVisible(staPtrVis);
me.symbols.staToL.setColor(0.195,0.96,0.097);
me.symbols.staFromL.setColor(0.195,0.96,0.097);
me.symbols.staArrowL.setRotation(nav0hdg*D2R);
me.symbols.staArrowL.setVisible(staPtrVis);
}
elsif(getprop("/instrumentation/adf/in-range") and (me.get_switch("toggle_lh_vor_adf") == -1)) {
me.symbols.staArrowL.setVisible(staPtrVis);
me.symbols.staToL.setColor(0,0.6,0.85);
me.symbols.staFromL.setColor(0,0.6,0.85);
me.symbols.staArrowL.setRotation(adf0hdg*D2R);
me.symbols.staArrowL.setVisible(staPtrVis);
} else {
me.symbols.staArrowL.hide();
}
if((getprop("/instrumentation/nav[3]/in-range") and me.get_switch("toggle_rh_vor_adf") == 1)) {
me.symbols.staArrowR.setVisible(staPtrVis);
me.symbols.staToR.setColor(0.195,0.96,0.097);
me.symbols.staFromR.setColor(0.195,0.96,0.097);
me.symbols.staArrowR.setRotation(nav1hdg*D2R);
} elsif(getprop("/instrumentation/adf[1]/in-range") and (me.get_switch("toggle_rh_vor_adf") == -1)) {
me.symbols.staArrowR.setVisible(staPtrVis);
} elsif(getprop("/instrumentation/adf[1]/in-range") and (me.get_switch("toggle_rh_vor_adf") == -1)) {
me.symbols.staToR.setColor(0,0.6,0.85);
me.symbols.staFromR.setColor(0,0.6,0.85);
me.symbols.staArrowR.setRotation(adf1hdg*D2R);
me.symbols.staArrowR.setVisible(staPtrVis);
} else {
me.symbols.staArrowR.hide();
}
@ -671,28 +715,28 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
} else {
me.symbols.trkInd.hide();
if((getprop("/instrumentation/nav[2]/in-range") and me.get_switch("toggle_lh_vor_adf") == 1)) {
me.symbols.staArrowL2.setVisible(staPtrVis);
me.symbols.staFromL2.setColor(0.195,0.96,0.097);
me.symbols.staToL2.setColor(0.195,0.96,0.097);
me.symbols.staArrowL2.setRotation(nav0hdg*D2R);
} elsif(getprop("/instrumentation/adf/in-range") and (me.get_switch("toggle_lh_vor_adf") == -1)) {
me.symbols.staArrowL2.setVisible(staPtrVis);
} elsif(getprop("/instrumentation/adf/in-range") and (me.get_switch("toggle_lh_vor_adf") == -1)) {
me.symbols.staFromL2.setColor(0,0.6,0.85);
me.symbols.staToL2.setColor(0,0.6,0.85);
me.symbols.staArrowL2.setRotation(adf0hdg*D2R);
me.symbols.staArrowL2.setVisible(staPtrVis);
} else {
me.symbols.staArrowL2.hide();
}
if((getprop("/instrumentation/nav[3]/in-range") and me.get_switch("toggle_rh_vor_adf") == 1)) {
me.symbols.staArrowR2.setVisible(staPtrVis);
me.symbols.staFromR2.setColor(0.195,0.96,0.097);
me.symbols.staToR2.setColor(0.195,0.96,0.097);
me.symbols.staArrowR2.setRotation(nav1hdg*D2R);
} elsif(getprop("/instrumentation/adf[1]/in-range") and (me.get_switch("toggle_rh_vor_adf") == -1)) {
me.symbols.staArrowR2.setVisible(staPtrVis);
} elsif(getprop("/instrumentation/adf[1]/in-range") and (me.get_switch("toggle_rh_vor_adf") == -1)) {
me.symbols.staFromR2.setColor(0,0.6,0.85);
me.symbols.staToR2.setColor(0,0.6,0.85);
me.symbols.staArrowR2.setRotation(adf1hdg*D2R);
me.symbols.staArrowR2.setVisible(staPtrVis);
} else {
me.symbols.staArrowR2.hide();
}

View file

@ -16,10 +16,6 @@ DotSym.makeinstance( name, __self__ );
var element_type = "group";
var terrain_minalt = props.globals.initNode("/instrumentation/efis[0]/nd/terrain-on-nd/min-altitude", 0,"INT");
var terrain_maxalt = props.globals.initNode("/instrumentation/efis[0]/nd/terrain-on-nd/max-altitude", -9999,"INT");
var terrain_maxcol = props.globals.initNode("/instrumentation/efis[0]/nd/terrain-on-nd/max-color", 0,"INT"); # 0= grn, 1= yel, 2= red
var terrain_alert = props.globals.getNode("/instrumentation/mk-viii/outputs/alert-mode");
var tile_list = [
@ -87,17 +83,22 @@ var updateTerrain = func {
#var proj_lat = pos_lat + ((col * (range/30) * math.cos(DEG2RAD * (heading - 90))) / 40);
# if me.tileradiusw == 20
var range_20f = range / 18.75;
var range_20f = range / 19.70; #18.75;
var heading_sin = math.sin(DEG2RAD * heading);
var heading_cos = math.cos(DEG2RAD * heading);
var proj_lon = pos_lon + ((col * range_20f * math.sin(DEG2RAD * (heading - 90))) / 60);
var proj_lat = pos_lat + ((col * range_20f * math.cos(DEG2RAD * (heading - 90))) / 60);
var col_x_range20f = col * range_20f;
var proj_lon = pos_lon + ((col_x_range20f * math.sin(DEG2RAD * (heading - 90))) / 60);
var proj_lat = pos_lat + ((col_x_range20f * math.cos(DEG2RAD * (heading - 90))) / 60);
var elevft = [];
me.radar_cleared = 0;
var altmin = 9999;
var altmax = -9999;
for (var row = 0; row < len; row += 1) {
if (trn[row] == nil) {
@ -105,23 +106,25 @@ var updateTerrain = func {
continue;
}
var point_lon = proj_lon + ((row * range_20f / 60) * heading_sin);
var point_lat = proj_lat + ((row * range_20f / 60) * heading_cos);
var row_x_r20f_60th = (row * range_20f / 60);
var point_lon = proj_lon + (row_x_r20f_60th * heading_sin);
var point_lat = proj_lat + (row_x_r20f_60th * heading_cos);
var elev = me.get_elevation(point_lat, point_lon);
var grad = 0; #black
if (elev != nil) {
if (elev>me.max_altitude) me.max_altitude = elev;
if (elev>altmax) altmax = elev;
if (me.is_terrain) {
if (elev<me.min_altitude) me.min_altitude = elev;
if (elev<altmin) altmin = elev;
if (elev < basealtft) grad = 0; # < 400 near runway use blank
else {
var diff = elev - altitudeft;
if (diff>=0) {
grad = int(diff/1000) + 3;
if (grad>5) grad = 5;
if (alert_level > 0 and a < 6 and grad > 3) {
if (alert_level == 1 and (grad == 3 or grad == 4)) grad = 12; # solid yellow
if (alert_level > 0 and a <= 6) {
if (alert_level == 1 and grad != 5) grad = 12; # solid yellow
else if (alert_level == 2 and grad == 5) grad = 13; # solid red
}
} else {
@ -135,17 +138,23 @@ var updateTerrain = func {
if (diff>=lowaltft) grad = 3; # lite yellow
else {
if (me.bands_range > 0 and elev > me.bands_minalt) {
grad = 9 - int((me.bands_maxalt - elev) / me.bands_range);
if (grad>9) grad = 9; # solid green
if (elev >= me.green_altitude) grad = 9; # solid green
else {
grad = 8 - int((me.bands_maxalt - elev) / me.bands_range); # 9 -
#if (grad>9) grad = 9; # solid green
if (grad>8) grad = 8; # high green
else if (grad<6) grad = 6; #light green
}
}
}
}
}
}
} else {
if (elev <= 0) {
grad = 11; #water/cyan
}
}
append(elevft,grad); # 0-5
} else {
append(elevft,0); # no data - black (magenta)
@ -153,8 +162,6 @@ var updateTerrain = func {
}
if (me.min_altitude > me.max_altitude) me.min_altitude = me.max_altitude; # occurs on sea areas
for (var r=0; r < len; r+=1) {
var imgx = elevft[r];
if (imgx == -1) continue;
@ -162,6 +169,20 @@ var updateTerrain = func {
else trn[r].setFile(me.imgpath ~ me.tile_list[imgx]).show();
}
if (altmax != -9999) {
if (altmin > altmax) altmin = altmax; # occurs on sea areas
if (me.max_altitude == -9999) {
me.min_altitude = altmin;
me.max_altitude = altmax;
} else {
if (altmin<me.min_altitude) me.min_altitude = altmin;
if (altmax>me.max_altitude) me.max_altitude = altmax;
}
}
me.radar_beacon += 1;
if (me.radar_beacon >= (me.tileradiusw*2)) {
me.restart_beacon();
@ -172,40 +193,41 @@ var updateTerrain = func {
var update_altitudes = func {
me.terrain_minalt.setValue(me.min_altitude);
me.terrain_maxalt.setValue(me.max_altitude);
var maxalt = int(me.max_altitude);
me.terrain_minalt.setValue(int(me.min_altitude));
me.terrain_maxalt.setValue(maxalt);
var altdif = me.max_altitude - me.refaltitudeft;
if (me.avg_maxalt == -9999) {
me.avg_minalt = int(me.min_altitude);
me.avg_maxalt = maxalt;
} else {
me.avg_minalt = math.avg(me.avg_minalt,me.min_altitude);
me.avg_maxalt = math.avg(me.avg_maxalt,maxalt);
}
var altdif = maxalt - me.refaltitudeft;
if (altdif <= 0) {
if (altdif >= me.reflowaltft) me.terrain_maxcol.setValue(1);
else me.terrain_maxcol.setValue(0);
} else {
if (altdif>2000) me.terrain_maxcol.setValue(2);
if (altdif>=2000) me.terrain_maxcol.setValue(2);
else me.terrain_maxcol.setValue(1);
}
if (me.min_altitude == 9999) {
me.avg_minalt = me.min_altitude;
me.avg_maxalt = me.max_altitude;
} else {
#if (me.min_altitude < me.avg_minalt) me.avg_minalt = me.min_altitude;else
me.avg_minalt = math.round((me.avg_minalt * 2 + me.min_altitude) / 3);
#if (me.max_altitude > me.avg_maxalt) me.avg_maxalt = me.max_altitude;else
me.avg_maxalt = math.round((me.avg_maxalt * 2 + me.max_altitude) / 3);
}
me.avg_diffalt = me.avg_maxalt - me.avg_minalt;
me.avg_peakalt = me.avg_maxalt - me.avg_minalt;
if (me.onground == 0 and (me.max_altitude + 250) < me.refaltitudeft) { # 250 ft tollerance
if (me.onground == 0 and (maxalt + 200) < me.refaltitudeft) { # 200 ft tollerance
me.hialtmode = 1;
var range = math.min(2400,(me.avg_maxalt - me.avg_minalt)) - 400;
if (range < 400) { # min elev number
var mxrange = math.max(1600,int((me.avg_maxalt - me.basealtitudeft) * 0.3));
var range = math.min(mxrange,me.avg_diffalt);
if (range < 160) { # min elev number
me.bands_range = 0;
} else {
me.bands_range = int(range / 4);
me.bands_maxalt = me.avg_maxalt;
me.bands_minalt = math.max( me.avg_maxalt - range, me.avg_minalt + 400 );
me.bands_minalt = math.max( me.avg_maxalt - range, me.avg_minalt + me.basealtitudeft );
me.bands_range = int( (me.bands_maxalt - me.bands_minalt) / 4);
}
me.green_altitude = math.max(maxalt - 1200, me.avg_maxalt - me.bands_range);
} else {
me.hialtmode = 0;
#me.avg_minalt = 9999;
@ -213,6 +235,7 @@ var update_altitudes = func {
me.min_altitude = 9999;
me.max_altitude = -9999;
me.avg_maxalt = -9999;
}
@ -223,7 +246,9 @@ var restart_beacon = func {
};
var init = func {
#print('TERRAIN init');
print('TERRAIN init');
#print(me.layer.efis_path);
me.tile = 33;
me.fetching = 0;
me.fetchRad = me.model.fetchRad; # Radius of radar layer to fetch
@ -236,9 +261,10 @@ var init = func {
me.request_clear = 0;
me.min_altitude = 9999;
me.max_altitude = -9999;
me.green_altitude = 0; # max altitude for solid green (peak color)
me.avg_minalt = 9999;
me.avg_maxalt = -9999;
me.avg_peakalt = nil;
me.avg_diffalt = nil;
me.maxalt_col = 0; # 0 = grn, 1 = yel, 2 = red
me.bands_minalt = 0;
me.bands_maxalt = 0;
@ -250,6 +276,10 @@ var init = func {
me.checkarrival = 0;
me.onground = 1;
me.terrain_minalt = props.globals.initNode(me.layer.efis_path ~ "/nd/terrain-on-nd/min-altitude", 0,"INT");
me.terrain_maxalt = props.globals.initNode(me.layer.efis_path ~ "/nd/terrain-on-nd/max-altitude", -9999,"INT");
me.terrain_maxcol = props.globals.initNode(me.layer.efis_path ~ "/nd/terrain-on-nd/max-color", -1,"INT"); # 0= grn, 1= yel, 2= red
var tile = me.tile;
var gx = int(me.viewport_radius / tile);
@ -325,12 +355,13 @@ var draw = func {
return;
}
if (me.layer.display_changed == 1) {
me.layer.display_changed = 0;
if (me.layer.display_hidden == 1) {
me.layer.display_hidden = 0;
me.clear();
me.terrain_maxalt.setValue(-9999);
me.min_altitude = 9999;
me.max_altitude = -9999;
terrain_maxalt.setValue(-9999);
me.avg_maxalt = -9999;
me.reference = nil;
}
@ -348,9 +379,9 @@ var draw = func {
me.reflowaltft = (pts.Gear.position[1].getValue()) ? -250 : -500;
me.onground = pts.Gear.wow[0].getValue();
if (me.min_altitude != 9999) me.update_altitudes();
if (me.max_altitude != -9999) me.update_altitudes();
var flatalt = (me.avg_peakalt != nil and me.avg_peakalt>499) ? 400 : 140;
var flatalt = (me.avg_diffalt == nil or me.avg_diffalt>499) ? 400 : 180;
var vspeed30s = int(getprop("velocities/vertical-speed-fps") * 30);
if (vspeed30s<-500) me.refaltitudeft = math.max(me.avg_minalt , me.refaltitudeft + vspeed30s);
@ -397,16 +428,7 @@ var draw = func {
print("set REFALT [blwbase]: "~me.basealtitudeft);
}
} else if (fmgc.FMGCInternal.phase >= 2) {
me.basealtitudeft = math.avg(me.basealtitudeft,flatalt + me.groundaltft,int(flatalt + me.avg_minalt));
#if (me.basealtitudeft > me.avg_maxalt) {
# if (me.avg_maxalt < 1000) me.basealtitudeft = 0; # 1000ft min elev number
# else me.basealtitudeft = int(400 + me.avg_minalt);
# print("set REFALT [blwmin]: "~me.basealtitudeft);
#}
#else if (me.basealtitudeft == 0 and me.avg_maxalt >= 1000) { # 1000ft min elev number
# me.basealtitudeft = int(400 + me.avg_minalt);
# print("set REFALT [abvmin]: "~me.basealtitudeft);
#}
if (me.avg_minalt != 9999) me.basealtitudeft = int(math.avg(me.basealtitudeft,flatalt + me.avg_minalt));
}
}

View file

@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="airbusND.svg"
inkscape:version="1.0.2 (e86c870879, 2021-01-15, custom)"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
xml:space="preserve"
id="svg5180"
height="1024"
width="1024"
version="1.1"><sodipodi:namedview
version="1.1"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"><sodipodi:namedview
pagecolor="#000000"
bordercolor="#666666"
borderopacity="1"
@ -26,13 +26,13 @@
inkscape:window-height="1017"
id="namedview102"
showgrid="false"
inkscape:zoom="3.1081105"
inkscape:cx="904.96427"
inkscape:cy="819.41055"
inkscape:zoom="0.5494415"
inkscape:cx="505.96833"
inkscape:cy="727.10197"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="terrGroup"
inkscape:current-layer="layer7"
inkscape:object-nodes="true"
inkscape:snap-smooth-nodes="true"
inkscape:snap-object-midpoints="true"
@ -41,7 +41,8 @@
showguides="true"
inkscape:guide-bbox="true"
inkscape:document-rotation="0"
inkscape:snap-text-baseline="true"><sodipodi:guide
inkscape:snap-text-baseline="true"
inkscape:pagecheckerboard="0"><sodipodi:guide
id="guide3167"
orientation="1,0"
position="512,811.5" /><sodipodi:guide
@ -298,7 +299,8 @@
sodipodi:role="line"
id="tspan1994"
x="952.74292"
y="826.34009">TERR</tspan></text><text
y="826.34009">TERR</tspan></text><g
id="terrAltGroup"><text
inkscape:label="#text7243"
id="terrHI"
y="858.63959"
@ -331,7 +333,7 @@
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#f2f235;stroke-width:3.15591;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.9941;stop-color:#000000;stop-opacity:1"
d="m 958.38792,861.87476 67.46618,0.61588"
id="path2033"
sodipodi:nodetypes="cc" /></g><path
sodipodi:nodetypes="cc" /></g></g><path
sodipodi:nodetypes="cc"
inkscape:label="#path3843"
inkscape:transform-center-y="-340.574"
@ -1465,7 +1467,26 @@
sodipodi:role="line"
id="tspan1346"
x="935.7326"
y="993.85461">.9</tspan></text></g></g><g
y="993.85461">.9</tspan></text></g><g
id="rangeRingMap"
style="display:inline"
inkscape:label="g5254-3"
transform="matrix(0.86976028,0,0,0.86976028,66.2654,369.90654)"><path
id="path4614-5"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:3.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 512.33846,407.68674 -1e-5,21.86538" /><path
id="path5199-2"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:4.36902;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 414.34242,464.79018 17.39829,10.04491" /><path
id="path5203-8"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:4.36902;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 569.56382,422.53255 -10.9327,18.93597" /><path
id="path5207-2"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:4.36902;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 455.91753,422.9266 10.04491,17.3983" /><path
id="path5211-5"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:4.36902;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 611.47202,463.94112 592.53604,474.8738" /></g></g><g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="CTR"
@ -2163,7 +2184,46 @@
transform="matrix(1.02827,0,0,1.02827,9.2744,-29.1838)"
inkscape:label="#g3956"
id="g3230"
style="display:inline" /></g><g
style="display:inline" /><g
id="rangeRingPlan"
style="display:inline"
inkscape:label="#g48782"><path
id="path3028"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:3.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 605.60382,521.89362 h 21.85153" /><path
id="path4632"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:3.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 399.0416,521.89362 h 20.08981" /><path
id="path4618"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:3.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 512.33845,616.03005 V 636.1005" /><path
id="path4614"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:3.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 512.33846,407.68674 -1e-5,21.86538" /><path
id="path5197"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:3.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 593.23055,568.07129 18.92398,10.92577" /><path
id="path5199"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:3.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 414.34242,464.79018 17.39829,10.04491" /><path
id="path5201"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:3.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 465.39216,602.96315 -10.03523,17.38152" /><path
id="path5203"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:3.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 569.56382,422.53255 -10.9327,18.93597" /><path
id="path5205"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:3.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 559.19864,601.81473 10.92577,18.92399" /><path
id="path5207"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:3.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 455.91753,422.9266 10.04491,17.3983" /><path
id="path5209"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:3.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 431.04142,568.11278 413.6599,578.148" /><path
id="path5211"
style="display:inline;opacity:1;mix-blend-mode:screen;fill:none;stroke:#ffffff;stroke-width:3.8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 611.47202,463.94112 592.53604,474.8738" /></g></g><g
inkscape:groupmode="layer"
id="layer9"
inkscape:label="ND_BOTTOM_MEMO"
@ -2270,7 +2330,11 @@
id="tspan2199"
x="510.7153"
y="399.58936"
style="font-size:53.3333px;line-height:1.25;fill:#ff0000">MAP NOT AVAIL</tspan></text></g><text
style="font-size:53.3333px;line-height:1.25;fill:#ff0000">MAP NOT AVAIL</tspan></text></g><g
inkscape:groupmode="layer"
id="layer7"
inkscape:label="ND_MAIN_MSG"
style="display:inline"><text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:53.3333px;line-height:0%;font-family:'Liberation Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#0dc04b;fill-opacity:1;stroke:none"
x="510.7153"
@ -2281,4 +2345,4 @@
id="tspan3544"
x="510.7153"
y="537.58936"
style="font-size:53.3333px;line-height:1.25;fill:#0dc04b">RANGE CHANGE</tspan></text></svg>
style="font-size:53.3333px;line-height:1.25;fill:#0dc04b">RANGE CHANGE</tspan></text></g></svg>

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 149 KiB

View file

@ -12,9 +12,6 @@ var adirs_3 = props.globals.getNode("/instrumentation/efis[0]/nd/ir-3", 1);
var vhdg_bug = props.globals.getNode("/it-autoflight/input/hdg",0); # ND compass position deg
var terrain_minalt = props.globals.getNode("/instrumentation/efis[0]/nd/terrain-on-nd/min-altitude", 0);
var terrain_maxalt = props.globals.getNode("/instrumentation/efis[0]/nd/terrain-on-nd/max-altitude", -9999);
var terrain_maxcol = props.globals.getNode("/instrumentation/efis[0]/nd/terrain-on-nd/max-color", 0);
var terrain_alert = props.globals.getNode("/instrumentation/mk-viii/outputs/alert-mode",0);
var GREEN = [0.0509,0.7529,0.2941];
@ -104,7 +101,8 @@ canvas.NDStyles["Airbus"] = {
if (visible) {
layer.update();
} else {
layer.display_changed = 1;
layer.efis_path = nd.efis_path;
layer.display_hidden = 1;
}
layer.group.setVisible(visible);
}, # end of layer update predicate
@ -1096,6 +1094,16 @@ canvas.NDStyles["Airbus"] = {
is_false: func(nd) nd.symbols.planArcs.hide(),
}, # of planArcs.impl
}, # of planArcs
{
id:"rangeRingPlan",
impl: {
init: func(nd,symbol),
predicate: func(nd) (((nd.in_mode("toggle_display_mode", ["PLAN"])) or ((nd.get_switch("toggle_display_mode") == "MAP") and (nd.get_switch("toggle_centered"))))
and (pts.Instrumentation.TCAS.Inputs.mode.getValue() >= 2) and (nd.rangeNm() <= 20) 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.rangeRingPlan.show(),
is_false: func(nd) nd.symbols.rangeRingPlan.hide(),
}, # of rangeRingPlan.impl
}, # of rangeRingPlan
{
id:"rangeArcs",
impl: {
@ -1106,6 +1114,16 @@ canvas.NDStyles["Airbus"] = {
is_false: func(nd) nd.symbols.rangeArcs.hide(),
}, # of rangeArcs.impl
}, # of rangeArcs
{
id:"rangeRingMap",
impl: {
init: func(nd,symbol),
predicate: func(nd) ((nd.get_switch("toggle_display_mode") == "MAP") and (!nd.get_switch("toggle_centered"))
and (pts.Instrumentation.TCAS.Inputs.mode.getValue() >= 2) and (nd.rangeNm() <= 20) 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.rangeRingMap.show(),
is_false: func(nd) nd.symbols.rangeRingMap.hide(),
}, # of rangeRingMap.impl
}, # of rangeRingMap
{
id:"rangePln1",
impl: {
@ -2003,7 +2021,7 @@ canvas.NDStyles["Airbus"] = {
nd.get_switch("toggle_display_mode") != "PLAN" and (nd.rangeNm() <= 40) and
(nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)) ),
is_true: func(nd){
if (terrain_maxalt.getValue() != -9999) {
var terrain_maxalt = props.globals.initNode(nd.efis_path ~ "/nd/terrain-on-nd/max-altitude", -9999,"INT");
var alert = terrain_alert.getValue();
if (alert == 0) {
nd.symbols.TerrLabel.setVisible(1);
@ -2014,17 +2032,28 @@ canvas.NDStyles["Airbus"] = {
if (alert == 1) nd.symbols.terrAhead.setColor(YELLOW[0],YELLOW[1],YELLOW[2]);
else nd.symbols.terrAhead.setColor(RED[0],RED[1],RED[2]);
}
nd.symbols.terrLO.setText(sprintf("%03d",math.round(terrain_minalt.getValue()/100)));
if (terrain_maxalt.getValue() != -9999) {
var terrain_minalt = getprop(nd.efis_path ~ "/nd/terrain-on-nd/min-altitude");
var terrain_maxcol = getprop(nd.efis_path ~ "/nd/terrain-on-nd/max-color");
nd.symbols.terrLO.setText(sprintf("%03d",math.round(terrain_minalt/100)));
nd.symbols.terrHI.setText(sprintf("%03d",math.round(terrain_maxalt.getValue()/100)));
if (terrain_maxcol.getValue() == 0) nd.symbols.terrHI.setColor(GREEN[0],GREEN[1],GREEN[2]);
else if (terrain_maxcol.getValue() == 1) nd.symbols.terrHI.setColor(YELLOW[0],YELLOW[1],YELLOW[2]);
if (terrain_maxcol == 0) nd.symbols.terrHI.setColor(GREEN[0],GREEN[1],GREEN[2]);
else if (terrain_maxcol == 1) nd.symbols.terrHI.setColor(YELLOW[0],YELLOW[1],YELLOW[2]);
else nd.symbols.terrHI.setColor(RED[0],RED[1],RED[2]);
nd.symbols.terrGroup.show();
terrain_maxalt.setValue(-9999); #update visual at radar cycle
nd.symbols.terrAltGroup.show();
}
if (nd.change_phase == 1) {
nd.symbols.terrAltGroup.hide();
}
nd.symbols.terrGroup.show();
},
is_false: func(nd){
nd.symbols.terrGroup.hide();
nd.symbols.terrAltGroup.hide();
}
}
},

View file

@ -164,6 +164,9 @@ var amberFlash1 = props.globals.initNode("/instrumentation/pfd/flash-indicators/
var amberFlash2 = props.globals.initNode("/instrumentation/pfd/flash-indicators/amber-flash-2", 0, "BOOL");
var dhFlash = props.globals.initNode("/instrumentation/pfd/flash-indicators/dh-flash", 0, "BOOL");
var light_autoland_armed = props.globals.initNode("/instrumentation/pfd/lights/autoland-armed", 0, "BOOL");
var light_autoland_on = props.globals.initNode("/instrumentation/pfd/lights/autoland-on", 0, "BOOL");
var canvas_PFD_base = {
init: func(canvas_group, file) {
var font_mapper = func(family, weight) {
@ -218,7 +221,7 @@ var canvas_PFD_base = {
"AI_agl_g","AI_agl","AI_error","AI_group","FD_roll","FD_pitch","ALT_box_flash","ALT_box","ALT_box_amber","ALT_scale","ALT_target","ALT_target_digit","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_digit_UP",
"ALT_digit_DN","ALT_error","ALT_neg","ALT_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting","QNH_std","QNH_box","LOC_pointer","LOC_scale","GS_scale","GS_pointer","CRS_pointer","HDG_target","HDG_scale",
"HDG_one","HDG_two","HDG_three","HDG_four","HDG_five","HDG_six","HDG_seven","HDG_digit_L","HDG_digit_R","HDG_error","HDG_group","HDG_frame","TRK_pointer","machError","ilsError","ils_code","ils_freq","dme_dist","dme_dist_legend","ILS_HDG_R","ILS_HDG_L",
"ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError"];
"ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError","vsFMArate"];
},
du1OffTimer: 0,
updateDu1: func() {
@ -881,7 +884,18 @@ var canvas_PFD_base = {
}
# FMA Pitch
if (pitch_mode_act == "V/S") {
me["FMA_pitch"].setText(sprintf("%s ", pitch_mode_act));
me["vsFMArate"].setText(sprintf("%+4.0f",fmgc.Input.vs.getValue()));
me["vsFMArate"].show();
} elsif (pitch_mode_act == "FPA") {
me["FMA_pitch"].setText(sprintf("%s ", pitch_mode_act));
me["vsFMArate"].setText(sprintf("%+3.1f°",fmgc.Input.fpa.getValue()));
me["vsFMArate"].show();
}else {
me["FMA_pitch"].setText(sprintf("%s", pitch_mode_act));
me["vsFMArate"].hide();
}
me["FMA_pitcharm"].setText(sprintf("%s", pitch_mode_armed_act));
me["FMA_pitcharm2"].setText(sprintf("%s", pitch_mode2_armed_act));
@ -2728,7 +2742,7 @@ var canvas_PFD_2_mismatch = {
},
};
setlistener("sim/signals/fdm-initialized", func {
setlistener("/sim/signals/fdm-initialized", func {
PFD1_display = canvas.new({
"name": "PFD1",
"size": [1024, 1024],

View file

@ -6256,4 +6256,17 @@
x="823.7511"
sodipodi:role="line"
id="tspan1797">G</tspan></text>
<text
inkscape:label="#text983"
xml:space="preserve"
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:0.65757698"
x="417.56354"
y="34.634907"
id="vsFMArate"
transform="scale(0.87678236,1.1405339)"><tspan
sodipodi:role="line"
id="tspan1777"
x="417.56354"
y="34.634907"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99950027px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.65757698">-800</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 340 KiB

After

Width:  |  Height:  |  Size: 341 KiB

View file

@ -994,9 +994,8 @@ var UpperECAMRecipient =
var A320EWD = UpperECAMRecipient.new("A320 E/WD");
emesary.GlobalTransmitter.Register(A320EWD);
input = {
var input = {
fuelTotalLbs: "/consumables/fuel/total-fuel-lbs",
acconfigUnits: "/systems/acconfig/options/weight-kgs",
slatLocked: "/fdm/jsbsim/fcs/slat-locked",
# N1 parameters

View file

@ -1,5 +1,5 @@
# A3XX Electronic Centralised Aircraft Monitoring System
# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
# Copyright (c) 2021 Jonathan Redpath (legoboyvdlp)
var lines = [props.globals.getNode("ECAM/msg/line1", 1), props.globals.getNode("ECAM/msg/line2", 1), props.globals.getNode("ECAM/msg/line3", 1), props.globals.getNode("ECAM/msg/line4", 1), props.globals.getNode("ECAM/msg/line5", 1), props.globals.getNode("ECAM/msg/line6", 1), props.globals.getNode("ECAM/msg/line7", 1), props.globals.getNode("ECAM/msg/line8", 1)];
var linesCol = [props.globals.getNode("ECAM/msg/linec1", 1), props.globals.getNode("ECAM/msg/linec2", 1), props.globals.getNode("ECAM/msg/linec3", 1), props.globals.getNode("ECAM/msg/linec4", 1), props.globals.getNode("ECAM/msg/linec5", 1), props.globals.getNode("ECAM/msg/linec6", 1), props.globals.getNode("ECAM/msg/linec7", 1), props.globals.getNode("ECAM/msg/linec8", 1)];
@ -14,7 +14,7 @@ var overflow = props.globals.initNode("/ECAM/warnings/overflow", 0, "BOOL");
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"), props.globals.initNode("/sim/sound/warnings/cchord", 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"), props.globals.initNode("/sim/sound/warnings/click", 0, "BOOL")];
var warningFlash = props.globals.initNode("/ECAM/warnings/master-warning-flash", 0, "BOOL");
var lineIndex = 0;
@ -29,145 +29,6 @@ var counterClear = 0;
var noMainMsg = 0;
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"),
bleed1LoTempXbleed: props.globals.initNode("/ECAM/warnings/logic/bleed-1-lo-temp-xbleed"),
bleed1LoTempBleed: props.globals.initNode("/ECAM/warnings/logic/bleed-1-lo-temp-bleed"),
bleed1LoTempPack: props.globals.initNode("/ECAM/warnings/logic/bleed-1-lo-temp-pack"),
bleed1WaiAvail: props.globals.initNode("/ECAM/warnings/logic/bleed-1-wai-avail"),
bleed2LoTempUnsuc: props.globals.initNode("/ECAM/warnings/logic/bleed-2-lo-temp-unsucc"),
bleed2LoTempXbleed: props.globals.initNode("/ECAM/warnings/logic/bleed-2-lo-temp-xbleed"),
bleed2LoTempBleed: props.globals.initNode("/ECAM/warnings/logic/bleed-2-lo-temp-bleed"),
bleed2LoTempPack: props.globals.initNode("/ECAM/warnings/logic/bleed-2-lo-temp-pack"),
bleed2WaiAvail: props.globals.initNode("/ECAM/warnings/logic/bleed-2-wai-avail"),
waiSysfault: props.globals.initNode("/ECAM/warnings/logic/wing-anti-ice-sys-fault"),
waiLclosed: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-left-closed"),
waiRclosed: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-right-closed"),
procWaiShutdown: props.globals.initNode("/ECAM/warnings/logic/proc-wai-shutdown-output"),
waiGndFlight: props.globals.initNode("/ECAM/warnings/logic/wing-anti-ice-gnd-fault"),
pack12Fault: props.globals.initNode("/ECAM/warnings/logic/pack-1-2-fault"),
pack1ResetPb: props.globals.initNode("/ECAM/warnings/logic/reset-pack-1-switch-cmd"),
pack2ResetPb: props.globals.initNode("/ECAM/warnings/logic/reset-pack-2-switch-cmd"),
cabinFans: props.globals.initNode("/ECAM/warnings/logic/cabin-fans-fault"),
rtlu1Fault: props.globals.initNode("/ECAM/warnings/logic/rud-trav-lim-sys-1-fault"),
rtlu2Fault: props.globals.initNode("/ECAM/warnings/logic/rud-trav-lim-sys-2-fault"),
rtlu12Fault: props.globals.initNode("/ECAM/warnings/logic/rud-trav-lim-sys-fault"),
fac12Fault: props.globals.initNode("/ECAM/warnings/logic/fac-12-fault"),
fac1Fault: props.globals.initNode("/ECAM/warnings/logic/fac-1-fault"),
fac2Fault: props.globals.initNode("/ECAM/warnings/logic/fac-2-fault"),
stallWarn: props.globals.initNode("/ECAM/warnings/logic/stall/stall-warn-on"),
yawDamper12Fault: props.globals.initNode("/ECAM/warnings/logic/yaw-damper-12-fault"),
gearNotDown1: props.globals.initNode("/ECAM/warnings/fctl/gear-not-down-not-cancellable"),
gearNotDown2: props.globals.initNode("/ECAM/warnings/fctl/gear-not-down-cancellable"),
gearNotDownLocked: props.globals.initNode("/ECAM/warnings/fctl/gear-not-down-locked"),
gearNotDownLockedFlipflop: props.globals.initNode("/ECAM/warnings/fctl/gear-not-downlocked-output"),
blueGreen: props.globals.initNode("/ECAM/warnings/hyd/blue-green-failure"),
blueGreenFuel: props.globals.initNode("/ECAM/warnings/hyd/blue-green-fuel-consumpt"),
blueYellow: props.globals.initNode("/ECAM/warnings/hyd/blue-yellow-failure"),
blueYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/blue-yellow-fuel-consumpt"),
greenYellow: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-failure"),
greenYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-fuel-consumpt"),
leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault"),
rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault"),
flapNotZero: props.globals.initNode("/ECAM/warnings/fctl/flaps-not-zero"),
slatsConfig: props.globals.initNode("/ECAM/warnings/fctl/slats-config-output"),
flapsConfig: props.globals.initNode("/ECAM/warnings/fctl/flaps-config-output"),
spdBrkConfig: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-config-output"),
pitchTrimConfig: props.globals.initNode("/ECAM/warnings/fctl/pitch-trim-config-output"),
rudTrimConfig: props.globals.initNode("/ECAM/warnings/fctl/rudder-trim-config-output"),
parkBrkConfig: props.globals.initNode("/ECAM/warnings/fctl/park-brk-config-output"),
slatsConfig2: props.globals.initNode("/ECAM/warnings/fctl/slats-config-range"),
flapsConfig2: props.globals.initNode("/ECAM/warnings/fctl/flaps-config-range"),
spdBrkConfig2: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-config-range"),
pitchTrimConfig2: props.globals.initNode("/ECAM/warnings/fctl/pitch-trim-config-range"),
rudTrimConfig2: props.globals.initNode("/ECAM/warnings/fctl/rudder-trim-config-range"),
dcEssFuelConsumptionIncreased: props.globals.initNode("/ECAM/warnings/logic/dc-ess-fuel-consumption-increased"),
dcEssFMSPredictions: props.globals.initNode("/ECAM/warnings/logic/dc-ess-fms-predictions-unreliable"),
dc2FuelConsumptionIncreased: props.globals.initNode("/ECAM/warnings/logic/dc-2-fuel-consumption-increased"),
dc2FMSPredictions: props.globals.initNode("/ECAM/warnings/logic/dc-2-fms-predictions-unreliable"),
thrLeversNotSet: props.globals.initNode("/ECAM/warnings/logic/eng/thr-lever-not-set"),
revSet: props.globals.initNode("/ECAM/warnings/logic/eng/reverse-set"),
eng1Fail: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-fail"),
eng2Fail: props.globals.initNode("/ECAM/warnings/logic/eng/eng-2-fail"),
phase5Trans: props.globals.initNode("/ECAM/warnings/logic/eng/phase-5-output"),
eng1Shutdown: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-shutdown"),
eng2Shutdown: props.globals.initNode("/ECAM/warnings/logic/eng/eng-2-shutdown"),
acEssBusAltn: props.globals.initNode("/ECAM/warnings/logic/ac-ess-bus-altn-feed"),
gen1Off: props.globals.initNode("/ECAM/warnings/logic/elec/gen-1-off"),
gen2Off: props.globals.initNode("/ECAM/warnings/logic/elec/gen-2-off"),
spdBrkOut: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-still-out"),
},
Timers: {
apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"),
bleed1Fault: props.globals.initNode("/ECAM/warnings/timer/bleed-1-fault"),
bleed1FaultOutput: props.globals.initNode("/ECAM/warnings/timer/bleed-1-fault-output"),
bleed2Fault: props.globals.initNode("/ECAM/warnings/timer/bleed-2-fault"),
bleed2FaultOutput: props.globals.initNode("/ECAM/warnings/timer/bleed-2-fault-output"),
bleed1NotShutOutput: props.globals.initNode("/ECAM/warnings/timer/prv-1-not-shut-output"),
bleed2NotShutOutput: props.globals.initNode("/ECAM/warnings/timer/prv-2-not-shut-output"),
bleed1And2LoTemp: props.globals.initNode("/ECAM/warnings/timer/bleed-1-and-2-low-temp"),
bleed1And2LoTempOutput: props.globals.initNode("/ECAM/warnings/timer/bleed-1-and-2-low-temp-output"),
bleed1Off60Output: props.globals.initNode("/ECAM/warnings/logic/bleed-1-off-60-output"),
bleed1Off5Output: props.globals.initNode("/ECAM/warnings/logic/bleed-1-off-5-output"),
bleed2Off60Output: props.globals.initNode("/ECAM/warnings/logic/bleed-2-off-60-output"),
bleed2Off5Output: props.globals.initNode("/ECAM/warnings/logic/bleed-2-off-5-output"),
eng1AiceNotClsd: props.globals.initNode("/ECAM/warnings/timer/eng-aice-1-open-output"),
eng2AiceNotClsd: props.globals.initNode("/ECAM/warnings/timer/eng-aice-2-open-output"),
eng1AiceNotOpen: props.globals.initNode("/ECAM/warnings/timer/eng-aice-1-closed-output"),
eng2AiceNotOpen: props.globals.initNode("/ECAM/warnings/timer/eng-aice-2-closed-output"),
LRElevFault: props.globals.initNode("/ECAM/warnings/fctl/lrElevFault-output"),
altnLaw: props.globals.initNode("/ECAM/warnings/fctl/altn-law-output"),
directLaw: props.globals.initNode("/ECAM/warnings/fctl/direct-law-output"),
waiLhiPr: props.globals.initNode("/ECAM/warnings/timer/wing-hi-pr-left"),
waiRhiPr: props.globals.initNode("/ECAM/warnings/timer/wing-hi-pr-right"),
pack1Fault: props.globals.initNode("/ECAM/warnings/timer/pack-1-fault-2"),
pack2Fault: props.globals.initNode("/ECAM/warnings/timer/pack-2-fault-2"),
pack1Off: props.globals.initNode("/ECAM/warnings/timer/pack-1-off"),
pack2Off: props.globals.initNode("/ECAM/warnings/timer/pack-2-off"),
trimAirFault: props.globals.initNode("/ECAM/warnings/timer/trim-air-fault"),
yawDamper1Fault: props.globals.initNode("/ECAM/warnings/timer/yaw-damper-1-fault"),
yawDamper2Fault: props.globals.initNode("/ECAM/warnings/timer/yaw-damper-2-fault"),
navTerrFault: props.globals.initNode("/ECAM/warnings/timer/nav-gpws-terr-fault"),
leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault-output"),
rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault-output"),
staticInverter: props.globals.initNode("/systems/electrical/some-electric-thingie/static-inverter-timer"),
dcEmerConfig: props.globals.initNode("/ECAM/warnings/logic/dc-emer-config-output"),
dc12Fault: props.globals.initNode("/ECAM/warnings/logic/dc-1-2-output"),
dcEssFault: props.globals.initNode("/ECAM/warnings/logic/dc-ess-output"),
dc1Fault: props.globals.initNode("/ECAM/warnings/logic/dc-1-output"),
dc2Fault: props.globals.initNode("/ECAM/warnings/logic/dc-2-output"),
dcBatFault: props.globals.initNode("/ECAM/warnings/logic/dc-bat-output"),
ac1Fault: props.globals.initNode("/ECAM/warnings/logic/ac-1-output"),
ac2Fault: props.globals.initNode("/ECAM/warnings/logic/ac-2-output"),
acEssFault: props.globals.initNode("/ECAM/warnings/logic/ac-ess-output"),
dcEssShed: props.globals.initNode("/ECAM/warnings/logic/dc-ess-shed-output"),
acEssShed: props.globals.initNode("/ECAM/warnings/logic/ac-ess-shed-output"),
centerPumpsOff: props.globals.initNode("/ECAM/warnings/fuel/center-pumps-off-output"),
lowLevelBoth: props.globals.initNode("/ECAM/warnings/fuel/lo-level-l-r-output"),
},
Flipflops: {
apuGenFault: props.globals.initNode("/ECAM/warnings/flipflop/apu-gen-fault"),
apuGenFaultOnOff: props.globals.initNode("/ECAM/warnings/flipflop/apu-gen-fault-on-off"),
bleed1LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-1-low-temp-flipflop-output"),
bleed2LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-2-low-temp-flipflop-output"),
gen1Fault: props.globals.initNode("/ECAM/warnings/flipflop/gen-1-fault"),
gen2Fault: props.globals.initNode("/ECAM/warnings/flipflop/gen-2-fault"),
gen1FaultOnOff: props.globals.initNode("/ECAM/warnings/flipflop/gen-1-fault-on-off"),
gen2FaultOnOff: props.globals.initNode("/ECAM/warnings/flipflop/gen-2-fault-on-off"),
pack1Ovht: props.globals.initNode("/ECAM/warnings/flipflop/pack-1-ovht"),
pack2Ovht: props.globals.initNode("/ECAM/warnings/flipflop/pack-2-ovht"),
parkBrk: props.globals.initNode("/ECAM/warnings/config/park-brk/park-brk-output"),
eng1ThrLvrAbvIdle: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-thr-lvr-abv-idle"),
eng2ThrLvrAbvIdle: props.globals.initNode("/ECAM/warnings/logic/eng/eng-2-thr-lvr-abv-idle"),
},
};
var warning = {
new: func(msg,colour = "g",aural = 9,light = 9,isMainMsg = 0,lastSubmsg = 0, sdPage = "nil", isMemo = 0) {
var t = {parents:[warning]};
@ -223,7 +84,7 @@ var warning = {
me.noRepeat = 1;
},
sound: func() {
if (me.aural > 3) { return; }
if (me.aural == 9) { return; }
if (me.active == 0 and me.wasActive == 1) {
aural[me.aural].setBoolValue(0);
me.wasActive = 0;
@ -243,7 +104,7 @@ var warning = {
},
callPage: func() {
if (me.sdPage == "nil" or me.hasCalled == 1) { return; }
ecam.SystemDisplay.failCall(me.sdPage);
ecam.SystemDisplayController.failureCall(me.sdPage);
me.hasCalled = 1;
}
};
@ -352,6 +213,7 @@ var ECAM_controller = {
if (counter < 9) {
w.write();
counter += 1;
w.callPage();
}
w.warnlight();
w.sound();
@ -477,9 +339,14 @@ var ECAM_controller = {
}
}
if (statusFlag == 1 and lines[0].getValue() == "") {
ecam.SystemDisplay.manCall("sts");
if (!hasCleared and statusFlag) {
statusFlag = 0;
ecam.SystemDisplayController.manCall("statusPage");
return;
}
if (!hasCleared and !statusFlag) {
SystemDisplayController.manCall("CLR");
}
},
recall: func() {

View file

@ -1,11 +1,9 @@
# A3XX Electronic Centralised Aircraft Monitoring System
# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
# Copyright (c) 2021 Jonathan Redpath (legoboyvdlp)
# props.nas:
var dualFailNode = props.globals.initNode("/ECAM/dual-failure-enabled", 0, "BOOL");
var phaseNode = props.globals.getNode("/ECAM/warning-phase", 1);
var apWarn = props.globals.getNode("/it-autoflight/output/ap-warning", 1);
var athrWarn = props.globals.getNode("/it-autoflight/output/athr-warning", 1);
var emerGen = props.globals.getNode("/controls/electrical/switches/emer-gen", 1);
@ -47,7 +45,7 @@ var _SATval = nil;
var ecamConfigTest = props.globals.initNode("/ECAM/to-config-test", 0, "BOOL");
var messages_priority_3 = func {
phaseVar3 = phaseNode.getValue();
phaseVar3 = pts.ECAM.fwcWarningPhase.getValue();
# Stall
# todo - altn law and emer cancel flipflops page 2440
@ -66,7 +64,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(flap_not_zero);
}
if (overspeed.clearFlag == 0 and (phaseVar3 == 1 or (phaseVar3 >= 5 and phaseVar3 <= 7)) and getprop("/systems/navigation/adr/output/overspeed")) {
if (overspeed.clearFlag == 0 and (phaseVar3 == 1 or (phaseVar3 >= 5 and phaseVar3 <= 7)) and pts.Systems.Navigation.ADR.Output.overspeed.getBoolValue()) {
overspeed.active = 1;
if (getprop("/systems/navigation/adr/computation/overspeed-vmo") or getprop("/systems/navigation/adr/computation/overspeed-mmo")) {
overspeedVMO.active = 1;
@ -211,19 +209,19 @@ var messages_priority_3 = func {
}
# ENG FIRE
if ((eng1FireFlAgent2.clearFlag == 0 and systems.eng1FireWarn.getValue() == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng1FireGnEvac.clearFlag == 0 and systems.eng1FireWarn.getValue() == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) {
if ((eng1Fire.clearFlag == 0 and systems.eng1FireWarn.getValue() == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng1FireGnEvac.clearFlag == 0 and systems.eng1FireWarn.getValue() == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) {
eng1Fire.active = 1;
} else {
ECAM_controller.warningReset(eng1Fire);
}
if ((eng2FireFlAgent2.clearFlag == 0 and systems.eng2FireWarn.getValue() == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng2FireGnEvac.clearFlag == 0 and systems.eng2FireWarn.getValue() == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) {
if ((eng2Fire.clearFlag == 0 and systems.eng2FireWarn.getValue() == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng2FireGnEvac.clearFlag == 0 and systems.eng2FireWarn.getValue() == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) {
eng2Fire.active = 1;
} else {
ECAM_controller.warningReset(eng2Fire);
}
if (apuFireMaster.clearFlag == 0 and systems.apuFireWarn.getValue() == 1) {
if (apuFire.clearFlag == 0 and systems.apuFireWarn.getValue() == 1) {
apuFire.active = 1;
} else {
ECAM_controller.warningReset(apuFire);
@ -551,13 +549,13 @@ var messages_priority_3 = func {
apuFireAgentTimer.msg = " -AGENT AFT " ~ systems.apuAgentTimer.getValue() ~ " S...DISCH";
}
if (apuFireAgent.clearFlag == 0 and systems.APUNodes.Controls.fire.getValue() and !systems.extinguisherBottles.vector[5].lightProp.getValue() and systems.apuAgentTimer.getValue() != 0) {
if (apuFireAgent.clearFlag == 0 and systems.APUNodes.Controls.fire.getValue() and !systems.extinguisherBottles.vector[4].lightProp.getValue() and systems.apuAgentTimer.getValue() != 0) {
apuFireAgentTimer.active = 1;
} else {
ECAM_controller.warningReset(apuFireAgentTimer);
}
if (apuFireAgent.clearFlag == 0 and systems.APUNodes.Controls.fire.getValue() and !systems.extinguisherBottles.vector[5].lightProp.getValue() and systems.apuAgentTimer.getValue() == 0) {
if (apuFireAgent.clearFlag == 0 and systems.APUNodes.Controls.fire.getValue() and !systems.extinguisherBottles.vector[4].lightProp.getValue() and systems.apuAgentTimer.getValue() == 0) {
apuFireAgent.active = 1;
} else {
ECAM_controller.warningReset(apuFireAgent);
@ -1162,7 +1160,7 @@ var messages_priority_3 = func {
}
var messages_priority_2 = func {
phaseVar2 = phaseNode.getValue();
phaseVar2 = pts.ECAM.fwcWarningPhase.getValue();
if ((phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 9) and warningNodes.Logic.thrLeversNotSet.getValue() and engThrustLvrNotSet.clearFlag == 0) {
engThrustLvrNotSet.active = 1;
@ -2155,7 +2153,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(athr_lim_1);
}
if (getprop("/instrumentation/tcas/serviceable") == 0 and phaseVar2 != 1 and phaseVar2 != 3 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8 and phaseVar2 != 10 and systems.ELEC.Bus.ac1.getValue() >= 110 and pts.Instrumentation.TCAS.Inputs.mode.getValue() != 1 and tcasFault.clearFlag == 0) {
if (pts.Instrumentation.TCAS.servicable.getValue() == 0 and phaseVar2 != 1 and phaseVar2 != 3 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8 and phaseVar2 != 10 and systems.ELEC.Bus.ac1.getValue() >= 110 and pts.Instrumentation.TCAS.Inputs.mode.getValue() != 1 and tcasFault.clearFlag == 0) {
tcasFault.active = 1;
} else {
ECAM_controller.warningReset(tcasFault);
@ -3131,7 +3129,7 @@ var messages_priority_0 = func {
}
var messages_config_memo = func {
phaseVarMemo = phaseNode.getValue();
phaseVarMemo = pts.ECAM.fwcWarningPhase.getValue();
if (pts.Controls.Flight.flapsInput.getValue() == 0 or pts.Controls.Flight.flapsInput.getValue() == 4 or pts.Controls.Flight.speedbrake.getValue() != 0 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 1.75 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -3.65 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.55 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.55) {
setprop("/ECAM/to-config-normal", 0);
} else {
@ -3158,7 +3156,7 @@ var messages_config_memo = func {
toMemoLine1.colour = "c";
}
if (getprop("/controls/switches/seatbelt-sign") and getprop("/controls/switches/no-smoking-sign")) {
if (libraries.seatbeltSwitch.getValue() and libraries.noSmokingSwitch.getValue() ) {
toMemoLine2.msg = " SIGNS ON";
toMemoLine2.colour = "g";
} else {
@ -3166,7 +3164,7 @@ var messages_config_memo = func {
toMemoLine2.colour = "c";
}
if (getprop("/controls/flight/speedbrake-arm")) {
if (pts.Controls.Flight.speedbrakeArm.getValue()) {
toMemoLine3.msg = " SPLRS ARM";
toMemoLine3.colour = "g";
} else {
@ -3202,7 +3200,7 @@ var messages_config_memo = func {
setprop("/ECAM/to-memo-reset", 0);
}
if ((phaseVarMemo == 2 and getprop("/ECAM/engine-start-time") != 0 and getprop("/ECAM/engine-start-time") + 120 < pts.Sim.Time.elapsedSec.getValue()) or getprop("/ECAM/to-memo-flipflop")) {
if ((phaseVarMemo == 2 and engStrtTime.getValue() != 0 and engStrtTime.getValue() + 120 < pts.Sim.Time.elapsedSec.getValue()) or getprop("/ECAM/to-memo-flipflop")) {
toMemoLine1.active = 1;
toMemoLine2.active = 1;
toMemoLine3.active = 1;
@ -3224,7 +3222,7 @@ var messages_config_memo = func {
ldgMemoLine1.colour = "c";
}
if (getprop("/controls/switches/seatbelt-sign") and getprop("/controls/switches/no-smoking-sign")) {
if (libraries.seatbeltSwitch.getValue() and libraries.noSmokingSwitch.getValue()) {
ldgMemoLine2.msg = " SIGNS ON";
ldgMemoLine2.colour = "g";
} else {
@ -3232,7 +3230,7 @@ var messages_config_memo = func {
ldgMemoLine2.colour = "c";
}
if (getprop("/controls/flight/speedbrake-arm")) {
if (pts.Controls.Flight.speedbrakeArm.getValue()) {
ldgMemoLine3.msg = " SPLRS ARM";
ldgMemoLine3.colour = "g";
} else {
@ -3297,7 +3295,7 @@ var messages_config_memo = func {
}
var messages_memo = func {
phaseVarMemo2 = phaseNode.getValue();
phaseVarMemo2 = pts.ECAM.fwcWarningPhase.getValue();
if (getprop("/services/fuel-truck/enable") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
refuelg.active = 1;
} else {
@ -3343,19 +3341,19 @@ var messages_memo = func {
}
}
if (getprop("/controls/flight/speedbrake-arm") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
if (pts.Controls.Flight.speedbrakeArm.getValue() == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
gnd_splrs.active = 1;
} else {
gnd_splrs.active = 0;
}
if (getprop("/controls/lighting/seatbelt-sign") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
if (libraries.seatbeltLight.getValue() == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
seatbelts.active = 1;
} else {
seatbelts.active = 0;
}
if (getprop("/controls/lighting/no-smoking-sign") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # should go off after takeoff assuming switch is in auto due to old logic from the days when smoking was allowed!
if (libraries.noSmokingLight.getValue() == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # should go off after takeoff assuming switch is in auto due to old logic from the days when smoking was allowed!
nosmoke.active = 1;
} else {
nosmoke.active = 0;
@ -3400,7 +3398,7 @@ var messages_memo = func {
}
var messages_right_memo = func {
phaseVarMemo3 = phaseNode.getValue();
phaseVarMemo3 = pts.ECAM.fwcWarningPhase.getValue();
if (FWC.Timer.toInhibitOutput.getValue() == 1) {
to_inhibit.active = 1;
} else {

View file

@ -1,37 +1,31 @@
# A3XX ECAM
# Joshua Davidson (Octal450) and Jonathan Redpath (legoboyvdlp)
# Copyright (c) 2020 Josh Davidson (Octal450) and Jonathan Redpath (legoboyvdlp)
# Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath (legoboyvdlp)
var ap_active = 0;
var athr_active = 0;
var aileron = 0;
var elevator = 0;
var engModeSel = 0;
var APUMaster = 0;
var APURPM = 0;
var gearDown = 0;
var apOffTime = 0;
var athrOffTime = 0;
var apWarnNode = 0;
var athrWarnNode = 0;
var engStrtTimeSw = 0;
var engStrtTime = 0;
var page = 0;
var apOffTime = props.globals.initNode("/ECAM/warnings/ap-off-time", 0, "INT");
var athrOffTime = props.globals.initNode("/ECAM/warnings/athr-off-time", 0, "INT");
var engStrtTimeSw = props.globals.initNode("/ECAM/engine-start-time-switch", 0, "BOOL");
var engStrtTime = props.globals.initNode("/ECAM/engine-start-time", 0.0, "DOUBLE");
var apWarnNode = props.globals.initNode("/it-autoflight/output/ap-warning", 0, "INT");
var athrWarnNode = props.globals.initNode("/it-autoflight/output/athr-warning", 0, "INT");
var page = props.globals.initNode("/ECAM/Lower/page", "door", "STRING");
var gearWarnLight = props.globals.initNode("/ECAM/warnings/landing-gear-warning-light", 0, "BOOL");
var ECAM = {
_cachePage: "",
init: func() {
page = props.globals.initNode("/ECAM/Lower/page", "door", "STRING");
apOffTime = props.globals.initNode("/ECAM/warnings/ap-off-time", 0, "INT");
athrOffTime = props.globals.initNode("/ECAM/warnings/athr-off-time", 0, "INT");
engStrtTimeSw = props.globals.initNode("/ECAM/engine-start-time-switch", 0, "BOOL");
engStrtTime = props.globals.initNode("/ECAM/engine-start-time", 0.0, "DOUBLE");
apWarnNode = props.globals.initNode("/it-autoflight/output/ap-warning", 0, "INT");
athrWarnNode = props.globals.initNode("/it-autoflight/output/athr-warning", 0, "INT");
page.setValue("door");
apOffTime.setValue(0);
athrOffTime.setValue(0);
engStrtTimeSw.setValue(0);
engStrtTime.setValue(0);
apWarnNode.setValue(0);
athrWarnNode.setValue(0);
SystemDisplayController.init();
me.reset();
},
update_items: [
@ -75,13 +69,12 @@ var ECAM = {
},
reset: func() {
for (var i = 0; i <= 8; i = i + 1) {
setprop("ECAM/msg/line" ~ i, "");
setprop("ECAM/rightmsg/line" ~ i, "");
setprop("ECAM/msg/linec" ~ i, "w");
setprop("ECAM/rightmsg/linec" ~ i, "w");
setprop("/ECAM/msg/line" ~ i, "");
setprop("/ECAM/rightmsg/line" ~ i, "");
setprop("/ECAM/msg/linec" ~ i, "w");
setprop("/ECAM/rightmsg/linec" ~ i, "w");
}
page.setValue("door");
me.lights.apu.setValue(0);
me.lights.bleed.setValue(0);
me.lights.cond.setValue(0);
@ -128,143 +121,19 @@ var ECAM = {
update_item.update(notification);
}
SystemDisplay.update(notification);
if (me._cachePage != SystemDisplay.page) {
me.updateSDPage(SystemDisplay.page);
if (me._cachePage != SystemDisplayController.displayedPage.name) {
me.updateSDPage(SystemDisplayController.displayedPage.name);
}
},
updateSDPage: func(newPage) {
me._cachePage = newPage;
page.setValue(newPage);
},
clrLight: func() {
me.lights.clr.setValue(1);
},
};
var SystemDisplay = {
page: "",
manShownPage: 0,
failShownPage: 0,
APU10sec: 9,
eng10sec: 9,
fctl20sc: 9,
_apuTime: 0,
_engTime: 0,
_fctlTime: 0,
failCall: func(page) {
if (me.manShownPage) {
me.manShownPage = 0;
ECAMControlPanel.lightOff(me.page);
}
ECAMControlPanel.lightOn(page);
me.page = page;
me.failShownPage = 1;
},
manCall: func(page) {
ECAMControlPanel.lightOff(me.page);
ECAMControlPanel.lightOn(page);
me.page = page;
me.manShownPage = 1;
},
autoCall: func(page) {
if (me.manShownPage or me.failShownPage) { return; }
if (me.page != page) {
me.page = page;
}
},
update: func(notification) {
APUMaster = systems.APUNodes.Controls.master.getValue();
APURPM = pts.APU.rpm.getValue();
engModeSel = pts.Controls.Engines.startSw.getValue();
if (APUMaster == 1 and me.APU10sec != 1) {
me.autoCall("apu");
me.fctl20sec = 0;
if (me.APU10sec == 9 and APURPM >= 95.0) {
me.APU10sec = 0;
me._apuTime = notification.elapsedTime;
}
if (me.APU10sec != 9 and notification.elapsedTime > me._apuTime + 10) {
me.APU10sec = 1;
}
} elsif (engModeSel == 0 or engModeSel == 2 or (engModeSel == 1 and me.eng10sec == 0)) {
me.autoCall("eng");
me.fctl20sec = 0;
if (me.eng10sec == 9 and engModeSel == 1) {
me.eng10sec = 0;
me._engTime = notification.elapsedTime;
}
if (me.eng10sec != 9 and notification.elapsedTime > me._engTime + 10) {
me.eng10sec = 1;
}
} else {
# Reset variables
if (APUMaster == 0) {
me.APU10sec = 9;
}
me.eng10sec = 9;
# Phase logic
if (notification.FWCPhase == 1) {
me.autoCall("door");
me.fctl20sec = 9;
} elsif (notification.FWCPhase == 2) {
if (notification.aileronFBW >= 0.15 or notification.elevatorFBW >= 0.15 and me.fctl20sec == 9) {
me.autoCall("fctl");
if (me.fctl20sec == 9) {
me.fctl20sec = 0;
me._fctlTime = notification.elapsedTime;
}
if (me.fctl20sec != 9 and notification.elapsedTime > me._fctlTime + 20) {
me.fctl20sec = 1;
}
} elsif (me.fctl20sec == 0) {
if (me.fctl20sec != 9 and notification.elapsedTime > me._fctlTime + 20) {
me.fctl20sec = 1;
}
} else {
me.autoCall("wheel");
me.fctl20sec = 9;
}
} elsif (notification.FWCPhase >= 3 and notification.FWCPhase <= 5) {
me.autoCall("eng");
me.fctl20sec = 9;
} elsif (notification.FWCPhase == 6) {
if (notification.gearLever and notification.agl <= 16000) {
me.autoCall("wheel");
} else {
me.autoCall("crz");
}
me.fctl20sec = 9;
} elsif (notification.FWCPhase >= 7 and notification.FWCPhase <= 9) {
me.autoCall("wheel");
me.fctl20sec = 9;
} elsif (notification.FWCPhase == 10) {
me.autoCall("door");
me.fctl20sec = 9;
}
}
},
};
var ECAMControlPanel = {
sysPageBtn: func(page) {
if (SystemDisplay.page != page) {
SystemDisplay.manCall(page);
} else {
me.lightOff(SystemDisplay.page);
SystemDisplay.manShownPage = 0;
}
SystemDisplayController.manCall(page);
},
rclBtn: func() {
ecam.ECAM_controller.recall();
@ -282,22 +151,12 @@ var ECAMControlPanel = {
return;
}
if (SystemDisplay.manShownPage) {
me.lightOff(SystemDisplay.page);
SystemDisplay.manShownPage = 0;
return;
}
if (SystemDisplay.failShownPage) {
me.lightOff(SystemDisplay.page);
SystemDisplay.failShownPage = 0;
return;
}
ecam.ECAM_controller.clear();
},
stsBtn: func() {
SystemDisplay.manCall("sts");
if (SystemDisplayController.displayedPage.name != "statusPage") {
SystemDisplayController.manCall("statusPage");
}
},
allBtn: func() {
# todo
@ -309,11 +168,11 @@ var ECAMControlPanel = {
# todo
},
lightOff: func(pageLightOff) {
if (pageLightOff == "crz") { return; }
if (pageLightOff == "cruise") { return; }
ECAM.lights[pageLightOff].setBoolValue(0);
},
lightOn: func(pageLightOn) {
if (pageLightOn == "crz") { return; }
if (pageLightOn == "cruise") { return; }
ECAM.lights[pageLightOn].setBoolValue(1);
},
};

View file

@ -1,6 +1,5 @@
# A3XX Electronic Centralised Aircraft Monitoring System
# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
# Copyright (c) 2021 Jonathan Redpath (legoboyvdlp)
# messages stored in vectors
@ -101,7 +100,7 @@ var warnings = std.Vector.new([
var ADR123FaultPROC = warning.new(msg: " -ALL ADR OFF PROC.APPLY", colour: "c"),
# APU FIRE
var apuFire = warning.new(msg: "APU FIRE ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "apu"),
var apuFire = warning.new(msg: "APU FIRE ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "apuPage"),
var apuFirePB = warning.new(msg: " -APU FIRE P/B......PUSH", colour: "c"),
var apuFireAgentTimer = warning.new(msg: " -AGENT AFT 10 S...DISCH", colour: "c"),
var apuFireAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"),

212
Nasal/ECAM/ECAM-nodes.nas Normal file
View file

@ -0,0 +1,212 @@
# A3XX Electronic Centralised Aircraft Monitoring System
# Copyright (c) 2021 Jonathan Redpath (legoboyvdlp)
var FWC = {
Btn: {
clr: props.globals.initNode("/ECAM/buttons/clear-btn", 0, "BOOL"),
recall: props.globals.initNode("/ECAM/buttons/recall-btn", 0, "BOOL"),
recallStsNormal: props.globals.initNode("/ECAM/buttons/recall-status-normal", 0, "BOOL"),
recallStsNormalOutput: props.globals.initNode("/ECAM/buttons/recall-status-normal-output", 0, "BOOL"),
},
Monostable: {
phase1: props.globals.initNode("/ECAM/phases/monostable/phase-1-300", 0, "BOOL"),
phase5: props.globals.initNode("/ECAM/phases/monostable/phase-5", 0, "BOOL"),
phase5Temp: 0,
phase7: props.globals.initNode("/ECAM/phases/monostable/phase-7", 0, "BOOL"),
phase7Temp: 0,
phase9: props.globals.initNode("/ECAM/phases/monostable/phase-9", 0, "BOOL"),
phase1Output: props.globals.initNode("/ECAM/phases/monostable/phase-1-300-output"),
phase1OutputTemp: 0,
phase5Output: props.globals.initNode("/ECAM/phases/monostable/phase-5-output"),
phase5OutputTemp: 0,
phase7Output: props.globals.initNode("/ECAM/phases/monostable/phase-7-output"),
phase7OutputTemp: 0,
phase9Output: props.globals.initNode("/ECAM/phases/monostable/phase-9-output"),
toPowerOutput: props.globals.getNode("/ECAM/phases/monostable/to-power-set-output"),
m80kt: props.globals.getNode("/ECAM/phases/monostable-80kt"),
altAlert1: props.globals.initNode("/ECAM/altitude-alert-monostable-set", 0, "BOOL"),
altAlert1Output: props.globals.initNode("/ECAM/altitude-alert-monostable-output"),
altAlert2: props.globals.initNode("/ECAM/flipflop/altitude-alert-rs-set", 0, "BOOL"),
},
Flipflop: {
phase2Set: props.globals.initNode("/ECAM/phases/flipflop/phase-2-set", 0, "BOOL"),
phase2Reset: props.globals.initNode("/ECAM/phases/flipflop/phase-2-reset", 0, "BOOL"),
phase2Output: props.globals.initNode("/ECAM/phases/flipflop/phase-2-output", 0, "BOOL"),
phase2OutputTemp: 0,
phase10Set: props.globals.initNode("/ECAM/phases/flipflop/phase-10-set", 0, "BOOL"),
phase10Reset: props.globals.initNode("/ECAM/phases/flipflop/phase-10-reset", 0, "BOOL"),
phase10Output: props.globals.initNode("/ECAM/phases/flipflop/phase-10-output", 0, "BOOL"),
recallSet: props.globals.initNode("/ECAM/flipflop/recall-set", 0, "BOOL"),
recallReset: props.globals.initNode("/ECAM/flipflop/recall-reset", 0, "BOOL"),
recallOutput: props.globals.initNode("/ECAM/flipflop/recall-output", 0, "BOOL"),
recallOutputTemp: 0,
},
Logic: {
gnd: props.globals.getNode("/ECAM/logic/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.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"),
eng1and2Off: props.globals.getNode("/ECAM/phases/phase-calculation/engines-1-2-not-running"),
eng1and2OffTemp: 0,
eng1or2Output: props.globals.getNode("/ECAM/phases/phase-calculation/engine-1-or-2-running"),
eng1or2OutputTemp: 0,
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"), # 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"),
speed80Temp: 0,
toPower: props.globals.getNode("/ECAM/phases/phase-calculation/takeoff-power"),
toPowerTemp: 0,
altChg: props.globals.getNode("/it-autoflight/input/alt-is-changing", 1),
};
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"),
bleed1LoTempXbleed: props.globals.initNode("/ECAM/warnings/logic/bleed-1-lo-temp-xbleed"),
bleed1LoTempBleed: props.globals.initNode("/ECAM/warnings/logic/bleed-1-lo-temp-bleed"),
bleed1LoTempPack: props.globals.initNode("/ECAM/warnings/logic/bleed-1-lo-temp-pack"),
bleed1WaiAvail: props.globals.initNode("/ECAM/warnings/logic/bleed-1-wai-avail"),
bleed2LoTempUnsuc: props.globals.initNode("/ECAM/warnings/logic/bleed-2-lo-temp-unsucc"),
bleed2LoTempXbleed: props.globals.initNode("/ECAM/warnings/logic/bleed-2-lo-temp-xbleed"),
bleed2LoTempBleed: props.globals.initNode("/ECAM/warnings/logic/bleed-2-lo-temp-bleed"),
bleed2LoTempPack: props.globals.initNode("/ECAM/warnings/logic/bleed-2-lo-temp-pack"),
bleed2WaiAvail: props.globals.initNode("/ECAM/warnings/logic/bleed-2-wai-avail"),
waiSysfault: props.globals.initNode("/ECAM/warnings/logic/wing-anti-ice-sys-fault"),
waiLclosed: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-left-closed"),
waiRclosed: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-right-closed"),
procWaiShutdown: props.globals.initNode("/ECAM/warnings/logic/proc-wai-shutdown-output"),
waiGndFlight: props.globals.initNode("/ECAM/warnings/logic/wing-anti-ice-gnd-fault"),
pack12Fault: props.globals.initNode("/ECAM/warnings/logic/pack-1-2-fault"),
pack1ResetPb: props.globals.initNode("/ECAM/warnings/logic/reset-pack-1-switch-cmd"),
pack2ResetPb: props.globals.initNode("/ECAM/warnings/logic/reset-pack-2-switch-cmd"),
cabinFans: props.globals.initNode("/ECAM/warnings/logic/cabin-fans-fault"),
rtlu1Fault: props.globals.initNode("/ECAM/warnings/logic/rud-trav-lim-sys-1-fault"),
rtlu2Fault: props.globals.initNode("/ECAM/warnings/logic/rud-trav-lim-sys-2-fault"),
rtlu12Fault: props.globals.initNode("/ECAM/warnings/logic/rud-trav-lim-sys-fault"),
fac12Fault: props.globals.initNode("/ECAM/warnings/logic/fac-12-fault"),
fac1Fault: props.globals.initNode("/ECAM/warnings/logic/fac-1-fault"),
fac2Fault: props.globals.initNode("/ECAM/warnings/logic/fac-2-fault"),
stallWarn: props.globals.initNode("/ECAM/warnings/logic/stall/stall-warn-on"),
yawDamper12Fault: props.globals.initNode("/ECAM/warnings/logic/yaw-damper-12-fault"),
gearNotDown1: props.globals.initNode("/ECAM/warnings/fctl/gear-not-down-not-cancellable"),
gearNotDown2: props.globals.initNode("/ECAM/warnings/fctl/gear-not-down-cancellable"),
gearNotDownLocked: props.globals.initNode("/ECAM/warnings/fctl/gear-not-down-locked"),
gearNotDownLockedFlipflop: props.globals.initNode("/ECAM/warnings/fctl/gear-not-downlocked-output"),
blueGreen: props.globals.initNode("/ECAM/warnings/hyd/blue-green-failure"),
blueGreenFuel: props.globals.initNode("/ECAM/warnings/hyd/blue-green-fuel-consumpt"),
blueYellow: props.globals.initNode("/ECAM/warnings/hyd/blue-yellow-failure"),
blueYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/blue-yellow-fuel-consumpt"),
greenYellow: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-failure"),
greenYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-fuel-consumpt"),
leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault"),
rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault"),
flapNotZero: props.globals.initNode("/ECAM/warnings/fctl/flaps-not-zero"),
slatsConfig: props.globals.initNode("/ECAM/warnings/fctl/slats-config-output"),
flapsConfig: props.globals.initNode("/ECAM/warnings/fctl/flaps-config-output"),
spdBrkConfig: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-config-output"),
pitchTrimConfig: props.globals.initNode("/ECAM/warnings/fctl/pitch-trim-config-output"),
rudTrimConfig: props.globals.initNode("/ECAM/warnings/fctl/rudder-trim-config-output"),
parkBrkConfig: props.globals.initNode("/ECAM/warnings/fctl/park-brk-config-output"),
slatsConfig2: props.globals.initNode("/ECAM/warnings/fctl/slats-config-range"),
flapsConfig2: props.globals.initNode("/ECAM/warnings/fctl/flaps-config-range"),
spdBrkConfig2: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-config-range"),
pitchTrimConfig2: props.globals.initNode("/ECAM/warnings/fctl/pitch-trim-config-range"),
rudTrimConfig2: props.globals.initNode("/ECAM/warnings/fctl/rudder-trim-config-range"),
dcEssFuelConsumptionIncreased: props.globals.initNode("/ECAM/warnings/logic/dc-ess-fuel-consumption-increased"),
dcEssFMSPredictions: props.globals.initNode("/ECAM/warnings/logic/dc-ess-fms-predictions-unreliable"),
dc2FuelConsumptionIncreased: props.globals.initNode("/ECAM/warnings/logic/dc-2-fuel-consumption-increased"),
dc2FMSPredictions: props.globals.initNode("/ECAM/warnings/logic/dc-2-fms-predictions-unreliable"),
thrLeversNotSet: props.globals.initNode("/ECAM/warnings/logic/eng/thr-lever-not-set"),
revSet: props.globals.initNode("/ECAM/warnings/logic/eng/reverse-set"),
eng1Fail: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-fail"),
eng2Fail: props.globals.initNode("/ECAM/warnings/logic/eng/eng-2-fail"),
phase5Trans: props.globals.initNode("/ECAM/warnings/logic/eng/phase-5-output"),
eng1Shutdown: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-shutdown"),
eng2Shutdown: props.globals.initNode("/ECAM/warnings/logic/eng/eng-2-shutdown"),
acEssBusAltn: props.globals.initNode("/ECAM/warnings/logic/ac-ess-bus-altn-feed"),
gen1Off: props.globals.initNode("/ECAM/warnings/logic/elec/gen-1-off"),
gen2Off: props.globals.initNode("/ECAM/warnings/logic/elec/gen-2-off"),
spdBrkOut: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-still-out"),
},
Timers: {
apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"),
bleed1Fault: props.globals.initNode("/ECAM/warnings/timer/bleed-1-fault"),
bleed1FaultOutput: props.globals.initNode("/ECAM/warnings/timer/bleed-1-fault-output"),
bleed2Fault: props.globals.initNode("/ECAM/warnings/timer/bleed-2-fault"),
bleed2FaultOutput: props.globals.initNode("/ECAM/warnings/timer/bleed-2-fault-output"),
bleed1NotShutOutput: props.globals.initNode("/ECAM/warnings/timer/prv-1-not-shut-output"),
bleed2NotShutOutput: props.globals.initNode("/ECAM/warnings/timer/prv-2-not-shut-output"),
bleed1And2LoTemp: props.globals.initNode("/ECAM/warnings/timer/bleed-1-and-2-low-temp"),
bleed1And2LoTempOutput: props.globals.initNode("/ECAM/warnings/timer/bleed-1-and-2-low-temp-output"),
bleed1Off60Output: props.globals.initNode("/ECAM/warnings/logic/bleed-1-off-60-output"),
bleed1Off5Output: props.globals.initNode("/ECAM/warnings/logic/bleed-1-off-5-output"),
bleed2Off60Output: props.globals.initNode("/ECAM/warnings/logic/bleed-2-off-60-output"),
bleed2Off5Output: props.globals.initNode("/ECAM/warnings/logic/bleed-2-off-5-output"),
eng1AiceNotClsd: props.globals.initNode("/ECAM/warnings/timer/eng-aice-1-open-output"),
eng2AiceNotClsd: props.globals.initNode("/ECAM/warnings/timer/eng-aice-2-open-output"),
eng1AiceNotOpen: props.globals.initNode("/ECAM/warnings/timer/eng-aice-1-closed-output"),
eng2AiceNotOpen: props.globals.initNode("/ECAM/warnings/timer/eng-aice-2-closed-output"),
LRElevFault: props.globals.initNode("/ECAM/warnings/fctl/lrElevFault-output"),
altnLaw: props.globals.initNode("/ECAM/warnings/fctl/altn-law-output"),
directLaw: props.globals.initNode("/ECAM/warnings/fctl/direct-law-output"),
waiLhiPr: props.globals.initNode("/ECAM/warnings/timer/wing-hi-pr-left"),
waiRhiPr: props.globals.initNode("/ECAM/warnings/timer/wing-hi-pr-right"),
pack1Fault: props.globals.initNode("/ECAM/warnings/timer/pack-1-fault-2"),
pack2Fault: props.globals.initNode("/ECAM/warnings/timer/pack-2-fault-2"),
pack1Off: props.globals.initNode("/ECAM/warnings/timer/pack-1-off"),
pack2Off: props.globals.initNode("/ECAM/warnings/timer/pack-2-off"),
trimAirFault: props.globals.initNode("/ECAM/warnings/timer/trim-air-fault"),
yawDamper1Fault: props.globals.initNode("/ECAM/warnings/timer/yaw-damper-1-fault"),
yawDamper2Fault: props.globals.initNode("/ECAM/warnings/timer/yaw-damper-2-fault"),
navTerrFault: props.globals.initNode("/ECAM/warnings/timer/nav-gpws-terr-fault"),
leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault-output"),
rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault-output"),
staticInverter: props.globals.initNode("/systems/electrical/some-electric-thingie/static-inverter-timer"),
dcEmerConfig: props.globals.initNode("/ECAM/warnings/logic/dc-emer-config-output"),
dc12Fault: props.globals.initNode("/ECAM/warnings/logic/dc-1-2-output"),
dcEssFault: props.globals.initNode("/ECAM/warnings/logic/dc-ess-output"),
dc1Fault: props.globals.initNode("/ECAM/warnings/logic/dc-1-output"),
dc2Fault: props.globals.initNode("/ECAM/warnings/logic/dc-2-output"),
dcBatFault: props.globals.initNode("/ECAM/warnings/logic/dc-bat-output"),
ac1Fault: props.globals.initNode("/ECAM/warnings/logic/ac-1-output"),
ac2Fault: props.globals.initNode("/ECAM/warnings/logic/ac-2-output"),
acEssFault: props.globals.initNode("/ECAM/warnings/logic/ac-ess-output"),
dcEssShed: props.globals.initNode("/ECAM/warnings/logic/dc-ess-shed-output"),
acEssShed: props.globals.initNode("/ECAM/warnings/logic/ac-ess-shed-output"),
centerPumpsOff: props.globals.initNode("/ECAM/warnings/fuel/center-pumps-off-output"),
lowLevelBoth: props.globals.initNode("/ECAM/warnings/fuel/lo-level-l-r-output"),
},
Flipflops: {
apuGenFault: props.globals.initNode("/ECAM/warnings/flipflop/apu-gen-fault"),
apuGenFaultOnOff: props.globals.initNode("/ECAM/warnings/flipflop/apu-gen-fault-on-off"),
bleed1LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-1-low-temp-flipflop-output"),
bleed2LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-2-low-temp-flipflop-output"),
gen1Fault: props.globals.initNode("/ECAM/warnings/flipflop/gen-1-fault"),
gen2Fault: props.globals.initNode("/ECAM/warnings/flipflop/gen-2-fault"),
gen1FaultOnOff: props.globals.initNode("/ECAM/warnings/flipflop/gen-1-fault-on-off"),
gen2FaultOnOff: props.globals.initNode("/ECAM/warnings/flipflop/gen-2-fault-on-off"),
pack1Ovht: props.globals.initNode("/ECAM/warnings/flipflop/pack-1-ovht"),
pack2Ovht: props.globals.initNode("/ECAM/warnings/flipflop/pack-2-ovht"),
parkBrk: props.globals.initNode("/ECAM/warnings/config/park-brk/park-brk-output"),
eng1ThrLvrAbvIdle: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-thr-lvr-abv-idle"),
eng2ThrLvrAbvIdle: props.globals.initNode("/ECAM/warnings/logic/eng/eng-2-thr-lvr-abv-idle"),
},
};

View file

@ -1,76 +1,7 @@
# A3XX FWC Phases
# Copyright (c) 2021 Jonathan Redpath (legoboyvdlp)
# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
var myPhase = nil;
var eng = nil;
var eng1epr = nil;
var eng2epr = nil;
var eng1n1 = nil;
var eng2n1 = nil;
var master1 = nil;
var master2 = nil;
var gear_agl_cur = nil;
var FWC = {
Btn: {
clr: props.globals.initNode("/ECAM/buttons/clear-btn", 0, "BOOL"),
recall: props.globals.initNode("/ECAM/buttons/recall-btn", 0, "BOOL"),
recallStsNormal: props.globals.initNode("/ECAM/buttons/recall-status-normal", 0, "BOOL"),
recallStsNormalOutput: props.globals.initNode("/ECAM/buttons/recall-status-normal-output", 0, "BOOL"),
},
Monostable: {
phase1: props.globals.initNode("/ECAM/phases/monostable/phase-1-300", 0, "BOOL"),
phase5: props.globals.initNode("/ECAM/phases/monostable/phase-5", 0, "BOOL"),
phase7: props.globals.initNode("/ECAM/phases/monostable/phase-7", 0, "BOOL"),
phase9: props.globals.initNode("/ECAM/phases/monostable/phase-9", 0, "BOOL"),
phase1Output: props.globals.initNode("/ECAM/phases/monostable/phase-1-300-output"),
phase5Output: props.globals.initNode("/ECAM/phases/monostable/phase-5-output"),
phase7Output: props.globals.initNode("/ECAM/phases/monostable/phase-7-output"),
phase9Output: props.globals.initNode("/ECAM/phases/monostable/phase-9-output"),
toPowerOutput: props.globals.getNode("/ECAM/phases/monostable/to-power-set-output"),
m80kt: props.globals.getNode("/ECAM/phases/monostable-80kt"),
altAlert1: props.globals.initNode("/ECAM/altitude-alert-monostable-set", 0, "BOOL"),
altAlert1Output: props.globals.initNode("/ECAM/altitude-alert-monostable-output"),
altAlert2: props.globals.initNode("/ECAM/flipflop/altitude-alert-rs-set", 0, "BOOL"),
},
Flipflop: {
phase2Set: props.globals.initNode("/ECAM/phases/flipflop/phase-2-set", 0, "BOOL"),
phase2Reset: props.globals.initNode("/ECAM/phases/flipflop/phase-2-reset", 0, "BOOL"),
phase2Output: props.globals.initNode("/ECAM/phases/flipflop/phase-2-output", 0, "BOOL"),
phase10Set: props.globals.initNode("/ECAM/phases/flipflop/phase-10-set", 0, "BOOL"),
phase10Reset: props.globals.initNode("/ECAM/phases/flipflop/phase-10-reset", 0, "BOOL"),
phase10Output: props.globals.initNode("/ECAM/phases/flipflop/phase-10-output", 0, "BOOL"),
recallSet: props.globals.initNode("/ECAM/flipflop/recall-set", 0, "BOOL"),
recallReset: props.globals.initNode("/ECAM/flipflop/recall-reset", 0, "BOOL"),
recallOutput: props.globals.initNode("/ECAM/flipflop/recall-output", 0, "BOOL"),
},
Logic: {
gnd: props.globals.getNode("/ECAM/logic/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.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"),
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"), # 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.getNode("/ECAM/phases/phase-calculation/takeoff-power"),
altChg: props.globals.getNode("/it-autoflight/input/alt-is-changing", 1),
};
var currentPhase = nil;
var gnd = nil;
var gndTimer = nil;
@ -79,124 +10,77 @@ var phaseLoop = func() {
if ((systems.ELEC.Bus.acEss.getValue() < 110 and systems.ELEC.Bus.ac2.getValue() < 110) or pts.Acconfig.running.getBoolValue()) { return; }
if (pts.Sim.Replay.replayActive.getBoolValue()) { return; }
myPhase = pts.ECAM.fwcWarningPhase.getValue();
eng = pts.Options.eng.getValue();
eng1epr = pts.Engines.Engine.eprActual[0].getValue();
eng2epr = pts.Engines.Engine.eprActual[1].getValue();
eng1n1 = pts.Engines.Engine.n1Actual[0].getValue();
eng2n1 = pts.Engines.Engine.n1Actual[1].getValue();
master1 = pts.Controls.Engines.Engine.cutoffSw[0].getBoolValue();
master2 = pts.Controls.Engines.Engine.cutoffSw[1].getBoolValue();
currentPhase = pts.ECAM.fwcWarningPhase.getValue();
gnd = FWC.Logic.gnd.getBoolValue();
gndTimer = FWC.Timer.gnd.getValue();
if (FWC.Flipflop.recallReset.getValue() != 0) {
FWC.Flipflop.recallReset.setValue(0);
# Various things
if (myPhase == 9) {
FWC.Monostable.phase9.setBoolValue(1);
} else {
FWC.Monostable.phase9.setBoolValue(0);
}
# Phase 1 / 10 flipflop
if (myPhase == 9) {
FWC.Flipflop.phase10Set.setBoolValue(1);
} else {
FWC.Flipflop.phase10Set.setBoolValue(0);
}
FWC.toPowerTemp = FWC.toPower.getBoolValue();
FWC.Timer.eng1and2OffTemp = FWC.Timer.eng1and2Off.getValue();
FWC.Timer.eng1or2OutputTemp = FWC.Timer.eng1or2Output.getBoolValue();
FWC.speed80Temp = FWC.speed80.getBoolValue();
if (gndTimer == 1 and pts.Controls.Engines.Engine.firePb[0].getBoolValue()) {
FWC.Flipflop.phase10Reset.setBoolValue(1);
} else {
FWC.Flipflop.phase10Reset.setBoolValue(0);
}
FWC.Monostable.phase1OutputTemp = FWC.Monostable.phase1Output.getBoolValue();
FWC.Flipflop.phase2OutputTemp = FWC.Flipflop.phase2Output.getBoolValue();
FWC.Monostable.phase5Temp = FWC.Monostable.phase5.getBoolValue();
FWC.Monostable.phase5OutputTemp = FWC.Monostable.phase5Output.getBoolValue();
FWC.Monostable.phase7Temp = FWC.Monostable.phase7.getBoolValue();
FWC.Monostable.phase7OutputTemp = FWC.Monostable.phase7Output.getBoolValue();
if ((gnd 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);
}
# Phase 2 flipflop
if (myPhase == 3 or myPhase == 8) {
FWC.Flipflop.phase2Set.setBoolValue(1);
} else {
FWC.Flipflop.phase2Set.setBoolValue(0);
}
if (!FWC.Monostable.m80kt.getBoolValue() and myPhase != 9 and ((!FWC.Monostable.phase9Output.getBoolValue() and gndTimer == 1) or (!FWC.Monostable.toPowerOutput.getBoolValue() and gndTimer == 1))) {
FWC.Flipflop.phase2Reset.setBoolValue(1);
} else {
FWC.Flipflop.phase2Reset.setBoolValue(0);
}
gear_agl_cur = pts.Position.gearAglFt.getValue();
# Phase 5 monostable
if (FWC.toPower.getBoolValue() and (!FWC.Logic.feet1500.getBoolValue() and !gnd 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 !FWC.Logic.feet1500.getBoolValue() and !FWC.Logic.feet800.getBoolValue() and !gnd and FWC.Timer.gnd2Sec.getValue() != 1) {
FWC.Monostable.phase7.setBoolValue(1);
} else {
FWC.Monostable.phase7.setBoolValue(0);
}
# Actual Phases
if ((gnd and FWC.Timer.eng1and2Off.getValue() and myPhase != 9) and !FWC.Monostable.phase1Output.getBoolValue()) {
# Set Phases
if ((gnd and FWC.Timer.eng1and2OffTemp and currentPhase != 9) and !FWC.Monostable.phase1OutputTemp) {
setPhase(1);
}
if (FWC.Timer.eng1or2Output.getBoolValue() and (gnd and !FWC.toPower.getBoolValue() and !FWC.speed80.getBoolValue()) and !FWC.Flipflop.phase2Output.getBoolValue()) {
if (FWC.Timer.eng1or2OutputTemp and (gnd and !FWC.toPowerTemp and !FWC.speed80Temp) and !FWC.Flipflop.phase2OutputTemp) {
setPhase(2);
}
if (FWC.Timer.eng1or2Output.getBoolValue() and (gndTimer == 1 and FWC.toPower.getBoolValue()) and !FWC.speed80.getBoolValue()) {
if (FWC.Timer.eng1or2OutputTemp and (gndTimer == 1 and FWC.toPowerTemp) and !FWC.speed80Temp) {
setPhase(3);
}
if ((gndTimer == 1 and FWC.toPower.getBoolValue()) and FWC.speed80.getBoolValue()) {
if ((gndTimer == 1 and FWC.toPowerTemp) and FWC.speed80Temp) {
setPhase(4);
}
if (FWC.Monostable.phase5.getBoolValue() and FWC.Monostable.phase5Output.getBoolValue()) {
if (FWC.Monostable.phase5Temp and FWC.Monostable.phase5OutputTemp) {
setPhase(5);
}
if (!gnd 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())) {
if (!gnd and FWC.Timer.gnd2SecHalf.getValue() != 1 and (!FWC.Monostable.phase5Temp or !FWC.Monostable.phase5OutputTemp) and (!FWC.Monostable.phase7Temp or !FWC.Monostable.phase7OutputTemp)) {
setPhase(6);
}
if ((FWC.Monostable.phase7.getBoolValue() and FWC.Monostable.phase7Output.getBoolValue()) and myPhase != 8) {
if ((FWC.Monostable.phase7Temp and FWC.Monostable.phase7OutputTemp) and currentPhase != 8) {
setPhase(7);
}
if (!FWC.toPower.getBoolValue() and FWC.speed80.getBoolValue() and (gnd or FWC.Timer.gnd2Sec.getValue == 1)) {
if (!FWC.toPowerTemp and FWC.speed80Temp and (gnd or FWC.Timer.gnd2Sec.getValue() == 1)) {
setPhase(8);
}
if (FWC.Flipflop.phase2Output.getBoolValue() and (gnd and !FWC.toPower.getBoolValue() and !FWC.speed80.getBoolValue()) and FWC.Timer.eng1or2.getBoolValue()) {
if (FWC.Flipflop.phase2OutputTemp and (gnd and !FWC.toPowerTemp and !FWC.speed80Temp) and FWC.Timer.eng1or2.getBoolValue()) {
setPhase(9);
}
if ((gnd and FWC.Timer.eng1and2Off.getValue() and myPhase == 9) and FWC.Monostable.phase1Output.getBoolValue()) {
if ((gnd and FWC.Timer.eng1and2OffTemp and currentPhase == 9) and FWC.Monostable.phase1OutputTemp) {
setPhase(10);
}
# FWC Inhibiting
myPhase = pts.ECAM.fwcWarningPhase.getValue();
if (myPhase >= 3 and myPhase <= 5 and !FWC.Flipflop.recallOutput.getValue()) {
currentPhase = pts.ECAM.fwcWarningPhase.getValue();
FWC.Flipflop.recallOutputTemp = FWC.Flipflop.recallOutput.getValue();
if (currentPhase >= 3 and currentPhase <= 5 and !FWC.Flipflop.recallOutputTemp) {
FWC.Timer.toInhibit.setValue(1);
} else {
FWC.Timer.toInhibit.setValue(0);
}
if (myPhase == 7 or myPhase == 8 and !FWC.Flipflop.recallOutput.getValue()) {
if (currentPhase == 7 or currentPhase == 8 and !FWC.Flipflop.recallOutputTemp) {
FWC.Timer.ldgInhibit.setValue(1);
} else {
FWC.Timer.ldgInhibit.setValue(0);
@ -215,7 +99,3 @@ var setPhase = func(newPhase) {
setlistener("/ECAM/buttons/recall-btn", func() {
FWC.Flipflop.recallSet.setValue(FWC.Btn.recall.getBoolValue());
}, 0, 0);
var clrBtn = func(btn) {
FWC.Btn.clr.setValue(btn);
}

View file

@ -0,0 +1,336 @@
# A3XX System Display Controller
# Copyright (c) 2021 Jonathan Redpath (legoboyvdlp)
var Page = {
new: func(name) {
var page = {parents:[Page]};
page.name = name;
return page;
},
};
var SystemDisplayController = {
PageList: {
apuPage: Page.new("apu"),
bleedPage: Page.new("bleed"),
cabPressPage: Page.new("press"),
condPage: Page.new("cond"),
cruisePage: Page.new("cruise"),
doorPage: Page.new("door"),
enginePage: Page.new("eng"),
elecPage: Page.new("elec"),
fctlPage: Page.new("fctl"),
fuelPage: Page.new("fuel"),
hydraulicPage: Page.new("hyd"),
statusPage: Page.new("sts"),
wheelPage: Page.new("wheel"),
},
displayedPage: nil,
lastDisplayedPage: nil,
lastMode: nil,
mode: 3, # 0 = man, 1 = warning, 2 = advisory (not used yet), 3 = auto
tempFWCPhase: nil,
tempElapsedTime: nil,
tempEngineModeSel: nil,
init: func() {
me.displayedPage = me.PageList.doorPage;
ECAMTimer.start();
},
autoCallLoop: func() {
if (me.mode != 3) { return; }
me.tempFWCPhase = pts.ECAM.fwcWarningPhase.getValue();
if (me.Display.APU) {
me.displayedPage = me.PageList.apuPage;
} else if (me.Display.Engine) {
me.displayedPage = me.PageList.enginePage;
} else if (me.tempFWCPhase == 1) {
if (me.Display.Elec) {
me.displayedPage = me.PageList.elecPage;
} else {
me.displayedPage = me.PageList.doorPage;
}
} else if (me.tempFWCPhase == 2) {
if (me.Display.Elec) {
me.displayedPage = me.PageList.elecPage;
} else if (me.Display.FCTL) {
me.displayedPage = me.PageList.fctlPage;
} else {
me.displayedPage = me.PageList.wheelPage;
}
} else if (me.tempFWCPhase == 3 or me.tempFWCPhase == 4 or me.tempFWCPhase == 5) {
me.displayedPage = me.PageList.enginePage;
} else if (me.tempFWCPhase == 6) {
if (pts.Controls.Gear.gearDown.getValue() and me.altitudeBelow16000) {
me.displayedPage = me.PageList.wheelPage;
} else if (me.Display.Cruise) {
me.displayedPage = me.PageList.cruisePage;
} else {
me.displayedPage = me.PageList.enginePage;
}
} else if (me.tempFWCPhase == 7) {
me.displayedPage = me.PageList.wheelPage;
} else if (me.tempFWCPhase == 8 or me.tempFWCPhase == 9) {
if (me.Display.Elec) {
me.displayedPage = me.PageList.elecPage;
} else {
me.displayedPage = me.PageList.wheelPage;
}
} else if (me.tempFWCPhase == 10) {
if (me.Display.Elec) {
me.displayedPage = me.PageList.elecPage;
} else {
me.displayedPage = me.PageList.doorPage;
}
}
},
Timers: {
APUTimeOn: 0,
APUTime: 0,
CruiseTime: 0,
CruiseTimeOn: 0,
EngineTime: 0,
EngineTimeStart: 0,
EngineTimeOn: 0,
FCTLTimeStart: 0,
FCTLTimeOn: 0,
FCTLTime: 0,
},
Display: {
APU: 0,
Cruise: 0,
Elec: 0,
Engine: 0,
FCTL: 0,
},
altitudeBelow16000: 0,
update: func() {
me.tempElapsedTime = pts.Sim.Time.elapsedSec.getValue();
me.altitude = pts.Position.altitudeFt.getValue();
if (me.altitude < 16000) {
if (!me.altitudeBelow16000) {
me.altitudeBelow16000 = 1;
me.autoCallLoop();
}
} else {
if (me.altitudeBelow16000) {
me.altitudeBelow16000 = 0;
me.autoCallLoop();
}
}
if (systems.ELEC.Switch.emerGenTest.getValue()) {
if (!me.Display.Elec) {
me.Display.Elec = 1;
me.autoCallLoop();
}
} else {
if (me.Display.Elec) {
me.Display.Elec = 0;
me.autoCallLoop();
}
}
if (systems.APUNodes.Controls.master.getValue()) {
if (pts.APU.rpm.getValue() > 95 and !me.Timers.APUTimeOn) {
me.Timers.APUTimeOn = 1;
me.Timers.APUTime = me.tempElapsedTime;
}
if ((me.Timers.APUTimeOn and (me.tempElapsedTime - me.Timers.APUTime) < 10) or !me.Timers.APUTimeOn) {
if (!me.Display.APU) {
me.Display.APU = 1;
me.autoCallLoop();
}
} else {
if (me.Display.APU) {
me.Display.APU = 0;
me.autoCallLoop();
}
}
} else {
me.Timers.APUTimeOn = 0;
me.Timers.APUTime = 0;
if (me.Display.APU) {
me.Display.APU = 0;
me.autoCallLoop();
}
}
if (abs(pts.Controls.Flight.aileron.getValue()) > 0.05 or abs(pts.Controls.Flight.elevator.getValue()) > 0.05 or abs(pts.Controls.Flight.rudder.getValue()) > 0.50) {
me.Timers.FCTLTimeStart = 1;
if (!me.Display.FCTL) {
me.Display.FCTL = 1;
me.autoCallLoop();
}
me.autoCallLoop();
} else {
if (!me.Timers.FCTLTimeOn and me.Timers.FCTLTimeStart) {
me.Timers.FCTLTimeOn = 1;
me.Timers.FCTLTimeStart = 0;
me.Timers.FCTLTime = me.tempElapsedTime;
} else if (me.Timers.FCTLTimeOn) {
if ((me.tempElapsedTime - me.Timers.FCTLTime) < 20) {
if (!me.Display.FCTL) {
me.Display.FCTL = 1;
me.autoCallLoop();
}
} else {
me.Timers.FCTLTimeOn = 0;
me.Timers.FCTLTime = 0;
}
} else {
if (me.Display.FCTL) {
me.Display.FCTL = 0;
me.autoCallLoop();
}
me.Timers.FCTLTime = 0;
}
}
me.tempFWCPhase = pts.ECAM.fwcWarningPhase.getValue();
if (me.tempFWCPhase == 6) {
if (!ecam.FWC.toPower.getValue() and pts.Controls.Flight.flapsPos.getValue() == 0) {
if (!me.Display.Cruise) {
me.Display.Cruise = 1;
me.autoCallLoop();
}
} else if (!me.Display.Cruise) {
if (!me.Timers.CruiseTimeOn) {
me.Timers.CruiseTimeOn = 1;
me.Timers.CruiseTime = me.tempElapsedTime;
} else {
if ((me.tempElapsedTime - me.Timers.CruiseTime) > 60) {
if (!me.Display.Cruise) {
me.Display.Cruise = 1;
me.autoCallLoop();
}
}
}
}
} else {
me.Timers.CruiseTime = 0;
me.Timers.CruiseTimeOn = 0;
if (me.Display.Cruise) {
me.Display.Cruise = 0;
me.autoCallLoop();
}
}
me.tempEngineModeSel = pts.Controls.Engines.startSw.getValue();
if (me.tempEngineModeSel == 0 or me.tempEngineModeSel == 2) {
if (!me.Display.Engine) {
me.Display.Engine = 1;
me.autoCallLoop();
}
if (me.tempEngineModeSel == 2) {
me.Timers.EngineTimeStart = 1;
}
} else {
if (me.Timers.EngineTimeStart and !me.Timers.EngineTimeOn) {
me.Timers.EngineTimeOn = 1;
me.Timers.EngineTime = me.tempElapsedTime;
}
if (me.Timers.EngineTimeOn) {
if ((me.tempElapsedTime - me.Timers.EngineTime) < 10) {
if (!me.Display.Engine) {
me.Display.Engine = 1;
me.autoCallLoop();
}
} else {
me.Timers.EngineTimeStart = 0;
me.Timers.EngineTimeOn = 0;
me.Timers.EngineTime = 0;
if (me.Display.Engine) {
me.Display.Engine = 0;
me.autoCallLoop();
}
}
} else {
if (me.Display.Engine) {
me.Display.Engine = 0;
me.autoCallLoop();
}
}
}
},
autoCall: func() {
me.mode = 3;
me.autoCallLoop();
},
failureCall: func(newPage) {
if (contains(me.PageList, newPage)) {
ECAMControlPanel.lightOff(me.displayedPage.name);
me.lastDisplayedPage = me.displayedPage;
me.displayedPage = me.PageList[newPage];
me.lastMode = me.mode;
me.mode = 1;
ECAMControlPanel.lightOn(me.displayedPage.name);
} else {
debug.dump("Attempted to set page to unknown page", newPage);
}
},
manCall: func(newPage) {
if (contains(me.PageList, newPage)) {
if (me.displayedPage == me.PageList[newPage] and me.mode != 3) {
ECAMControlPanel.lightOff(me.displayedPage.name);
me.displayedPage = me.autoCall();
} else {
ECAMControlPanel.lightOff(me.displayedPage.name);
if (me.mode == 1) {
me.lastDisplayedPage = me.displayedPage;
me.lastMode = me.mode;
}
me.displayedPage = me.PageList[newPage];
me.mode = 0;
ECAMControlPanel.lightOn(me.displayedPage.name);
}
} elsif (newPage == "CLR") {
if (me.mode == 1) {
if (me.lastMode == 0) {
ECAMControlPanel.lightOff(me.displayedPage.name);
me.displayedPage = me.lastDisplayedPage;
ECAMControlPanel.lightOn(me.displayedPage.name);
me.lastDisplayedPage = nil;
me.mode = 0;
} else {
ECAMControlPanel.lightOff(me.displayedPage.name);
me.displayedPage = me.autoCall();
}
} elsif (me.mode == 0) {
if (me.lastMode == 1) {
ECAMControlPanel.lightOff(me.displayedPage.name);
me.displayedPage = me.lastDisplayedPage;
ECAMControlPanel.lightOn(me.displayedPage.name);
me.lastDisplayedPage = nil;
me.mode = 1;
} else {
ECAMControlPanel.lightOff(me.displayedPage.name);
me.displayedPage = me.autoCall();
}
}
} else {
debug.dump("Attempted to set page to unknown page", newPage);
}
},
};
setlistener("/ECAM/warning-phase", func() {
if (SystemDisplayController.mode == 3) {
SystemDisplayController.autoCall();
}
}, 0, 0);
setlistener("/controls/gear/gear-down", func() {
if (SystemDisplayController.mode == 3) {
SystemDisplayController.autoCall();
}
}, 0, 0);
var ECAMTimer = maketimer(1, func() {
SystemDisplayController.update();
});

View file

@ -2,407 +2,253 @@
# in east/north/up coordinates the renderer uses
# Thanks to BAWV12 / Thorsten
var als_on = props.globals.getNode("/sim/rendering/shaders/skydome");
var als_on = props.globals.getNode("");
var alt_agl = props.globals.getNode("position/gear-agl-ft");
var cur_alt = 0;
var light_manager = {
var Light = {
new: func(n) {
var light = {parents: [Light]};
light.isOn = 0;
run: 0,
light.Pos = {
x: 0,
y: 0,
z: 0,
};
light.Color = {
r: 0,
g: 0,
b: 0,
};
light.colorr = props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[" ~ n ~ "]", 1);
light.colorg = props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[" ~ n ~ "]", 1);
light.colorb = props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[" ~ n ~ "]", 1);
light.dir = props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[" ~ n ~ "]", 1);
light.size = props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/size[" ~ n ~ "]", 1);
light.posx = props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[" ~ n ~ "]", 1);
light.posy = props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[" ~ n ~ "]", 1);
light.posz = props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[" ~ n ~ "]", 1);
if (n <= 1) {
light.stretch = props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/stretch[" ~ n ~ "]", 1);
}
return light;
},
setColor: func(r,g,b) {
me.Color.r = r;
me.Color.g = g;
me.Color.b = b;
},
setDir: func(dir) {
me.dir.setValue(dir);
},
setSize: func(size) {
me.size.setValue(size);
},
setStretch: func(stretch) {
me.stretch.setValue(stretch);
},
setPos: func(x,y,z) {
me.Pos.x = x;
me.Pos.y = y;
me.Pos.z = z;
},
on: func() {
if (me.isOn) { return; }
me.colorr.setValue(me.Color.r);
me.colorg.setValue(me.Color.g);
me.colorb.setValue(me.Color.b);
me.isOn = 1;
},
off: func() {
if (!me.isOn) { return; }
me.colorr.setValue(0);
me.colorg.setValue(0);
me.colorb.setValue(0);
me.isOn = 0;
},
};
var lightManager = {
lat_to_m: 110952.0,
lon_to_m: 0.0,
light1_xpos: 0.0,
light1_ypos: 0.0,
light1_zpos: 0.0,
light1_r: 0.0,
light1_g: 0.0,
light1_b: 0.0,
light1_size: 0.0,
light1_stretch: 0.0,
light1_is_on: 0,
light2_xpos: 0.0,
light2_ypos: 0.0,
light2_zpos: 0.0,
light2_r: 0.0,
light2_g: 0.0,
light2_b: 0.0,
light2_size: 0.0,
light2_stretch: 0.0,
light2_is_on: 0,
light3_xpos: 0.0,
light3_ypos: 0.0,
light3_zpos: 0.0,
light3_r: 0.0,
light3_g: 0.0,
light3_b: 0.0,
light3_size: 0.0,
light3_stretch: 0.0,
light3_is_on: 0,
light4_xpos: 0.0,
light4_ypos: 0.0,
light4_zpos: 0.0,
light4_r: 0.0,
light4_g: 0.0,
light4_b: 0.0,
light4_size: 0.0,
light4_stretch: 0.0,
light4_is_on: 0,
light5_xpos: 0.0,
light5_ypos: 0.0,
light5_zpos: 0.0,
light5_r: 0.0,
light5_g: 0.0,
light5_b: 0.0,
light5_size: 0.0,
light5_stretch: 0.0,
light5_is_on: 0,
flcpt: 0,
prev_view : 1,
nd_ref_light1_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m", 1),
nd_ref_light1_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m", 1),
nd_ref_light1_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m", 1),
nd_ref_light1_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir", 1),
nd_ref_light2_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[1]", 1),
nd_ref_light2_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[1]", 1),
nd_ref_light2_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[1]", 1),
nd_ref_light2_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[1]", 1),
nd_ref_light3_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[2]", 1),
nd_ref_light3_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[2]", 1),
nd_ref_light3_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[2]", 1),
nd_ref_light3_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[2]", 1),
nd_ref_light4_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[3]", 1),
nd_ref_light4_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[3]", 1),
nd_ref_light4_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[3]", 1),
nd_ref_light4_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[3]", 1),
nd_ref_light5_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[4]", 1),
nd_ref_light5_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[4]", 1),
nd_ref_light5_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[4]", 1),
nd_ref_light5_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[4]", 1),
init: func {
# define your lights here
# lights ########
# offsets to aircraft center
me.light1_xpos = 100.0;
me.light1_ypos = 0.0;
me.light1_zpos = 2.0;
me.light2_xpos = 60.0;
me.light2_ypos = 0.0;
me.light2_zpos = 2.0;
me.light3_xpos = -2.0;
me.light3_ypos = 18.0;
me.light3_zpos = 2.0;
me.light4_xpos = -2.0;
me.light4_ypos = -18.0;
me.light4_zpos = 2.0;
me.light5_xpos = -25.0;
me.light5_ypos = 0.0;
me.light5_zpos = 2.0;
# color values
me.light1_r = 0.7;
me.light1_g = 0.7;
me.light1_b = 0.7;
me.light2_r = 0.6;
me.light2_g = 0.6;
me.light2_b = 0.6;
me.light3_r = 0.4;
me.light3_g = 0.0;
me.light3_b = 0.0;
me.light4_r = 0.0;
me.light4_g = 0.4;
me.light4_b = 0.0;
me.light5_r = 0.4;
me.light5_g = 0.4;
me.light5_b = 0.4;
# spot size
me.light1_size = 12;
me.light1_stretch = 6;
me.light2_size = 6;
me.light2_stretch = 6;
me.light3_size = 4;
me.light4_size = 4;
me.light5_size = 5;
setprop("/sim/rendering/als-secondary-lights/flash-radius", 13);
me.start();
Lights: {
light1: Light.new(0),
light2: Light.new(1),
light3: Light.new(2),
light4: Light.new(3),
light5: Light.new(4),
},
start: func {
init: func() {
setprop("/sim/rendering/als-secondary-lights/flash-radius", 13);
setprop("/sim/rendering/als-secondary-lights/num-lightspots", 5);
setprop("/sim/rendering/als-secondary-lights/lightspot/size", me.light1_size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[1]", me.light2_size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[2]", me.light3_size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[3]", me.light4_size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[4]", me.light5_size);
me.Lights.light1.setPos(100,0,2);
me.Lights.light2.setPos(60,0,2);
me.Lights.light3.setPos(-2,18,2);
me.Lights.light4.setPos(-2,-18,2);
me.Lights.light5.setPos(-25,0,2);
setprop("/sim/rendering/als-secondary-lights/lightspot/stretch", me.light1_stretch);
setprop("/sim/rendering/als-secondary-lights/lightspot/stretch[1]", me.light2_stretch);
me.Lights.light1.setColor(0.7,0.7,0.7);
me.Lights.light2.setColor(0.7,0.7,0.7);
me.Lights.light3.setColor(0.4,0.0,0.0);
me.Lights.light4.setColor(0.0,0.4,0.0);
me.Lights.light5.setColor(0.4,0.4,0.4);
me.run = 1;
me.Lights.light1.setSize(12);
me.Lights.light2.setSize(6);
me.Lights.light3.setSize(4);
me.Lights.light4.setSize(4);
me.Lights.light5.setSize(5);
me.Lights.light1.setStretch(6);
me.Lights.light2.setStretch(6);
me.update();
},
stop: func {
me.run = 0;
apos: 0,
curAlt: 0,
ELEC: [0, 0],
ll1: 0,
ll2: 0,
ll3: 0,
nav: 0,
run: 0,
vpos: 0,
Pos: {
alt: 0,
heading: 0,
headingSine: 0,
headingCosine: 0,
lat: 0,
lon: 0,
},
update: func {
if (me.run == 0) {
update: func() {
if (!me.run) {
settimer ( func me.update(), 0.00);
return;
}
cur_alt = alt_agl.getValue();
if (als_on.getValue() == 1 and alt_agl.getValue() < 100.0) {
ll1 = getprop("/controls/lighting/landing-lights[1]");
ll2 = getprop("/controls/lighting/landing-lights[2]");
ll3 = getprop("/sim/model/lights/nose-lights");
nav = getprop("/sim/model/lights/nav-lights");
var apos = geo.aircraft_position();
var vpos = geo.viewer_position();
me.lon_to_m = math.cos(apos.lat()*math.pi/180.0) * me.lat_to_m;
var heading = getprop("orientation/heading-deg") * math.pi/180.0;
var lat = apos.lat();
var lon = apos.lon();
var alt = apos.alt();
var sh = math.sin(heading);
var ch = math.cos(heading);
if ((ll1 == 1 and systems.ELEC.Bus.ac1.getValue() != 0) and (ll2 == 1 and systems.ELEC.Bus.ac2.getValue() != 0)) {
me.light1_ypos = 0.0;
me.light1_setSize(16);
me.light1_on();
} else if (ll1 == 1 and systems.ELEC.Bus.ac1.getValue() != 0) {
me.light1_ypos = 3.0;
me.light1_setSize(12);
me.light1_on();
} else if (ll2 == 1 and systems.ELEC.Bus.ac2.getValue() != 0) {
me.light1_ypos = -3.0;
me.light1_setSize(12);
me.light1_on();
} else {
me.light1_off();
me.curAlt = pts.Position.gearAglFt.getValue();
if (me.curAlt > 100) {
settimer ( func me.update(), 1);
return;
}
if (ll3 != 0) {
me.light2_on();
me.ll1 = pts.Controls.Lighting.landingLights[1].getValue();
me.ll2 = pts.Controls.Lighting.landingLights[2].getValue();
me.ll3 = pts.Sim.Model.Lights.noseLights.getValue();
me.nav = pts.Sim.Model.Lights.navLights.getValue();
me.apos = geo.aircraft_position();
me.vpos = geo.viewer_position();
me.Pos.lat = me.apos.lat();
me.Pos.lon = me.apos.lon();
me.Pos.alt = me.apos.alt();
me.Pos.heading = pts.Orientation.heading.getValue() * D2R;
me.Pos.headingSine = math.sin(me.Pos.heading);
me.Pos.headingCosine = math.cos(me.Pos.heading);
me.lon_to_m = math.cos(me.Pos.lat*D2R) * me.lat_to_m;
me.ELEC[0] = systems.ELEC.Bus.ac1.getValue();
me.ELEC[1] = systems.ELEC.Bus.ac2.getValue();
if ((me.ll1 == 1 and me.ELEC[0] >= 110) and (me.ll2 == 1 and me.ELEC[1] >= 110)) {
me.Lights.light1.setPos(100,0,2);
me.Lights.light1.setSize(16);
me.Lights.light1.on();
} else if (me.ll1 == 1 and me.ELEC[0] >= 110) {
me.Lights.light1.setPos(100,3,2);
me.Lights.light1.setSize(12);
me.Lights.light1.on();
} else if (me.ll2 == 1 and me.ELEC[1] >= 110) {
me.Lights.light1.setPos(100,-3,2);
me.Lights.light1.setSize(12);
me.Lights.light1.on();
} else {
me.light2_off();
me.Lights.light1.off();
}
if (ll3 == 1) {
me.light2_setSize(8);
me.light2_xpos = 65.0;
if (me.ll3 != 0) {
me.Lights.light2.on();
} else {
me.light2_setSize(6);
me.light2_xpos = 60.0;
me.Lights.light2.off();
}
if (nav == 1) {
me.light3_on();
me.light4_on();
me.light5_on();
if (me.ll3 == 1) {
me.Lights.light2.setSize(8);
me.Lights.light2.setPos(65,0,2);
} else {
me.light3_off();
me.light4_off();
me.light5_off();
me.Lights.light2.setSize(6);
me.Lights.light2.setPos(60,0,2);
}
if (me.nav == 1) {
me.Lights.light3.on();
me.Lights.light4.on();
me.Lights.light5.on();
} else {
me.Lights.light3.off();
me.Lights.light4.off();
me.Lights.light5.off();
}
# light 1 position
var proj_x = cur_alt;
var proj_z = cur_alt/10.0;
apos.set_lat(lat + ((me.light1_xpos + proj_x) * ch + me.light1_ypos * sh) / me.lat_to_m);
apos.set_lon(lon + ((me.light1_xpos + proj_x)* sh - me.light1_ypos * ch) / me.lon_to_m);
delta_x = (apos.lat() - vpos.lat()) * me.lat_to_m;
delta_y = -(apos.lon() - vpos.lon()) * me.lon_to_m;
var delta_z = apos.alt()- proj_z - vpos.alt();
me.nd_ref_light1_x.setValue(delta_x);
me.nd_ref_light1_y.setValue(delta_y);
me.nd_ref_light1_z.setValue(delta_z);
me.nd_ref_light1_dir.setValue(heading);
me.apos.set_lat(me.Pos.lat + ((me.Lights.light1.Pos.x + me.curAlt) * me.Pos.headingCosine + me.Lights.light1.Pos.y * me.Pos.headingSine) / me.lat_to_m);
me.apos.set_lon(me.Pos.lon + ((me.Lights.light1.Pos.x + me.curAlt) * me.Pos.headingSine - me.Lights.light1.Pos.y * me.Pos.headingCosine) / me.lon_to_m);
me.Lights.light1.posx.setValue((me.apos.lat() - me.vpos.lat()) * me.lat_to_m);
me.Lights.light1.posy.setValue(-(me.apos.lon() - me.vpos.lon()) * me.lon_to_m);
me.Lights.light1.posz.setValue(me.apos.alt()- (me.curAlt / 10) - me.vpos.alt());
me.Lights.light1.dir.setValue(me.Pos.heading);
# light 2 position
me.apos.set_lat(me.Pos.lat + ((me.Lights.light2.Pos.x + me.curAlt) * me.Pos.headingCosine + me.Lights.light2.Pos.y * me.Pos.headingSine) / me.lat_to_m);
me.apos.set_lon(me.Pos.lon + ((me.Lights.light2.Pos.x + me.curAlt) * me.Pos.headingSine - me.Lights.light2.Pos.y * me.Pos.headingCosine) / me.lon_to_m);
apos.set_lat(lat + (me.light2_xpos * ch + me.light2_ypos * sh) / me.lat_to_m);
apos.set_lon(lon + (me.light2_xpos * sh - me.light2_ypos * ch) / me.lon_to_m);
delta_x = (apos.lat() - vpos.lat()) * me.lat_to_m;
delta_y = -(apos.lon() - vpos.lon()) * me.lon_to_m;
delta_z = apos.alt() - vpos.alt();
me.nd_ref_light2_x.setValue(delta_x);
me.nd_ref_light2_y.setValue(delta_y);
me.nd_ref_light2_z.setValue(delta_z);
me.nd_ref_light2_dir.setValue(heading);
me.Lights.light2.posx.setValue((me.apos.lat() - me.vpos.lat()) * me.lat_to_m);
me.Lights.light2.posy.setValue(-(me.apos.lon() - me.vpos.lon()) * me.lon_to_m);
me.Lights.light2.posz.setValue(me.apos.alt()- (me.curAlt / 10) - me.vpos.alt());
me.Lights.light2.dir.setValue(me.Pos.heading);
# light 3 position
me.apos.set_lat(me.Pos.lat + ((me.Lights.light3.Pos.x + me.curAlt) * me.Pos.headingCosine + me.Lights.light3.Pos.y * me.Pos.headingSine) / me.lat_to_m);
me.apos.set_lon(me.Pos.lon + ((me.Lights.light3.Pos.x + me.curAlt) * me.Pos.headingSine - me.Lights.light3.Pos.y * me.Pos.headingCosine) / me.lon_to_m);
apos.set_lat(lat + (me.light3_xpos * ch + me.light3_ypos * sh) / me.lat_to_m);
apos.set_lon(lon + (me.light3_xpos * sh - me.light3_ypos * ch) / me.lon_to_m);
delta_x = (apos.lat() - vpos.lat()) * me.lat_to_m;
delta_y = -(apos.lon() - vpos.lon()) * me.lon_to_m;
delta_z = apos.alt() - vpos.alt();
me.nd_ref_light3_x.setValue(delta_x);
me.nd_ref_light3_y.setValue(delta_y);
me.nd_ref_light3_z.setValue(delta_z);
me.nd_ref_light3_dir.setValue(heading);
me.Lights.light3.posx.setValue((me.apos.lat() - me.vpos.lat()) * me.lat_to_m);
me.Lights.light3.posy.setValue(-(me.apos.lon() - me.vpos.lon()) * me.lon_to_m);
me.Lights.light3.posz.setValue(me.apos.alt()- (me.curAlt / 10) - me.vpos.alt());
me.Lights.light3.dir.setValue(me.Pos.heading);
# light 4 position
me.apos.set_lat(me.Pos.lat + ((me.Lights.light4.Pos.x + me.curAlt) * me.Pos.headingCosine + me.Lights.light4.Pos.y * me.Pos.headingSine) / me.lat_to_m);
me.apos.set_lon(me.Pos.lon + ((me.Lights.light4.Pos.x + me.curAlt) * me.Pos.headingSine - me.Lights.light4.Pos.y * me.Pos.headingCosine) / me.lon_to_m);
apos.set_lat(lat + (me.light4_xpos * ch + me.light4_ypos * sh) / me.lat_to_m);
apos.set_lon(lon + (me.light4_xpos * sh - me.light4_ypos * ch) / me.lon_to_m);
delta_x = (apos.lat() - vpos.lat()) * me.lat_to_m;
delta_y = -(apos.lon() - vpos.lon()) * me.lon_to_m;
delta_z = apos.alt() - vpos.alt();
me.nd_ref_light4_x.setValue(delta_x);
me.nd_ref_light4_y.setValue(delta_y);
me.nd_ref_light4_z.setValue(delta_z);
me.nd_ref_light4_dir.setValue(heading);
me.Lights.light4.posx.setValue((me.apos.lat() - me.vpos.lat()) * me.lat_to_m);
me.Lights.light4.posy.setValue(-(me.apos.lon() - me.vpos.lon()) * me.lon_to_m);
me.Lights.light4.posz.setValue(me.apos.alt()- (me.curAlt / 10) - me.vpos.alt());
me.Lights.light4.dir.setValue(me.Pos.heading);
# light 5 position
me.apos.set_lat(me.Pos.lat + ((me.Lights.light5.Pos.x + me.curAlt) * me.Pos.headingCosine + me.Lights.light5.Pos.y * me.Pos.headingSine) / me.lat_to_m);
me.apos.set_lon(me.Pos.lon + ((me.Lights.light5.Pos.x + me.curAlt) * me.Pos.headingSine - me.Lights.light5.Pos.y * me.Pos.headingCosine) / me.lon_to_m);
apos.set_lat(lat + (me.light5_xpos * ch + me.light5_ypos * sh) / me.lat_to_m);
apos.set_lon(lon + (me.light5_xpos * sh - me.light5_ypos * ch) / me.lon_to_m);
delta_x = (apos.lat() - vpos.lat()) * me.lat_to_m;
delta_y = -(apos.lon() - vpos.lon()) * me.lon_to_m;
delta_z = apos.alt() - vpos.alt();
me.nd_ref_light5_x.setValue(delta_x);
me.nd_ref_light5_y.setValue(delta_y);
me.nd_ref_light5_z.setValue(delta_z);
me.nd_ref_light5_dir.setValue(heading);
}
me.Lights.light5.posx.setValue((me.apos.lat() - me.vpos.lat()) * me.lat_to_m);
me.Lights.light5.posy.setValue(-(me.apos.lon() - me.vpos.lon()) * me.lon_to_m);
me.Lights.light5.posz.setValue(me.apos.alt()- (me.curAlt / 10) - me.vpos.alt());
me.Lights.light5.dir.setValue(me.Pos.heading);
settimer ( func me.update(), 0.00);
},
light1_on : func {
if (me.light1_is_on == 1) {return;}
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r", me.light1_r);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g", me.light1_g);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b", me.light1_b);
me.light1_is_on = 1;
},
light1_off : func {
if (me.light1_is_on == 0) {return;}
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b", 0.0);
me.light1_is_on = 0;
},
light1_setSize : func(size) {
setprop("/sim/rendering/als-secondary-lights/lightspot/size[0]", size);
},
light2_on : func {
if (me.light2_is_on == 1) {return;}
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[1]", me.light2_r);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[1]", me.light2_g);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", me.light2_b);
me.light2_is_on = 1;
},
light2_off : func {
if (me.light2_is_on == 0) {return;}
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[1]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[1]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", 0.0);
me.light2_is_on = 0;
},
light2_setSize : func(size) {
setprop("/sim/rendering/als-secondary-lights/lightspot/size[1]", size);
},
light3_on : func {
if (me.light3_is_on == 1) {return;}
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[2]", me.light3_r);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[2]", me.light3_g);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", me.light3_b);
me.light3_is_on = 1;
},
light3_off : func {
if (me.light3_is_on == 0) {return;}
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[2]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[2]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", 0.0);
me.light3_is_on = 0;
},
light4_on : func {
if (me.light4_is_on == 1) {return;}
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[3]", me.light4_r);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[3]", me.light4_g);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", me.light4_b);
me.light4_is_on = 1;
},
light4_off : func {
if (me.light4_is_on == 0) {return;}
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[3]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[3]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", 0.0);
me.light4_is_on = 0;
},
light5_on : func {
if (me.light5_is_on == 1) {return;}
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[4]", me.light5_r);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[4]", me.light5_g);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", me.light5_b);
me.light5_is_on = 1;
},
light5_off : func {
if (me.light5_is_on == 0) {return;}
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[4]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[4]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", 0.0);
me.light5_is_on = 0;
},
};
setlistener(pts.Sim.Rendering.Shaders.skydome, func(v) {
lightManager.run = v.getValue() ? 1 : 0;
}, 1, 0);

View file

@ -64,8 +64,11 @@ var FBW = {
sec3: props.globals.getNode("/systems/failures/fctl/sec3"),
fac1: props.globals.getNode("/systems/failures/fctl/fac1"),
fac2: props.globals.getNode("/systems/failures/fctl/fac2"),
ths: props.globals.getNode("/systems/failures/fctl/ths-jam"),
spoilerl1: props.globals.getNode("/systems/failures/spoilers/spoiler-l1"),
rtlu1: props.globals.getNode("/systems/failures/fctl/rtlu-1"),
rtlu2: props.globals.getNode("/systems/failures/fctl/rtlu-2"),
rtlu2: props.globals.getNode("/systems/failures/fctl/rtlu-2"),
ths: props.globals.getNode(""),
spoilerl1: props.globals.getNode(""),
spoilerl2: props.globals.getNode("/systems/failures/spoilers/spoiler-l2"),
spoilerl3: props.globals.getNode("/systems/failures/spoilers/spoiler-l3"),
spoilerl4: props.globals.getNode("/systems/failures/spoilers/spoiler-l4"),
@ -338,7 +341,7 @@ var fbw_loop = func {
}
}
setlistener("systems/fctl/sec1", func() {
setlistener("/systems/fctl/sec1", func() {
if (FBW.Computers.sec1.getBoolValue()) {
FBW.Failures.spoilerl3.setBoolValue(0);
FBW.Failures.spoilerr3.setBoolValue(0);
@ -352,7 +355,7 @@ setlistener("systems/fctl/sec1", func() {
}
}, 0, 0);
setlistener("systems/fctl/sec2", func() {
setlistener("/systems/fctl/sec2", func() {
if (FBW.Computers.sec2.getBoolValue()) {
FBW.Failures.spoilerl5.setBoolValue(0);
FBW.Failures.spoilerr5.setBoolValue(0);
@ -362,7 +365,7 @@ setlistener("systems/fctl/sec2", func() {
}
}, 0, 0);
setlistener("systems/fctl/sec3", func() {
setlistener("/systems/fctl/sec3", func() {
if (FBW.Computers.sec3.getBoolValue()) {
FBW.Failures.spoilerl1.setBoolValue(0);
FBW.Failures.spoilerr1.setBoolValue(0);

View file

@ -2,37 +2,11 @@
# Copyright (c) 2020 Josh Davidson (Octal450), Jonathan Redpath (legoboyvdlp)
# Nodes
var fd1 = props.globals.getNode("/it-autoflight/output/fd1", 1);
var fd2 = props.globals.getNode("/it-autoflight/output/fd2", 1);
var ap1 = props.globals.getNode("/it-autoflight/output/ap1", 1);
var ap2 = props.globals.getNode("/it-autoflight/output/ap2", 1);
var athr = props.globals.getNode("/it-autoflight/output/athr", 1);
var fd1Input = props.globals.getNode("/it-autoflight/input/fd1", 1);
var fd2Input = props.globals.getNode("/it-autoflight/input/fd2", 1);
var ap1Input = props.globals.getNode("/it-autoflight/input/ap1", 1);
var ap2Input = props.globals.getNode("/it-autoflight/input/ap2", 1);
var athrInput = props.globals.getNode("/it-autoflight/input/athr", 1);
var ktsMach = props.globals.getNode("/it-autoflight/input/kts-mach", 1);
var iasSet = props.globals.getNode("/it-autoflight/input/kts", 1);
var machSet = props.globals.getNode("/it-autoflight/input/mach", 1);
var hdgSet = props.globals.getNode("/it-autoflight/input/hdg", 1);
var altSet = props.globals.getNode("/it-autoflight/input/alt", 1);
var altSetMode = props.globals.getNode("/it-autoflight/config/altitude-dial-mode", 1);
var vsSet = props.globals.getNode("/it-autoflight/input/vs", 1);
var fpaSet = props.globals.getNode("/it-autoflight/input/fpa", 1);
var iasNow = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt", 1);
var machNow = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach", 1);
var spdManaged = props.globals.getNode("/it-autoflight/input/spd-managed", 1);
var showHDG = props.globals.getNode("/it-autoflight/custom/show-hdg", 1);
var trkFpaSW = props.globals.getNode("/it-autoflight/custom/trk-fpa", 1);
var latMode = props.globals.getNode("/it-autoflight/output/lat", 1);
var vertMode = props.globals.getNode("/it-autoflight/output/vert", 1);
var fpaModeInput = props.globals.getNode("/it-autoflight/input/fpa", 1);
var latModeInput = props.globals.getNode("/it-autoflight/input/lat", 1);
var vertModeInput = props.globals.getNode("/it-autoflight/input/vert", 1);
var vsModeInput = props.globals.getNode("/it-autoflight/input/vs", 1);
var locArm = props.globals.getNode("/it-autoflight/output/loc-armed", 1);
var apprArm = props.globals.getNode("/it-autoflight/output/appr-armed", 1);
var apOffSound = [props.globals.getNode("/it-autoflight/sound/apoffsound"),props.globals.getNode("/it-autoflight/sound/apoffsound2")];
var apWarningNode = props.globals.getNode("/it-autoflight/output/ap-warning");
var athrWarningNode = props.globals.getNode("/it-autoflight/output/athr-warning");
var apDiscBtn = props.globals.getNode("/sim/sounde/apdiscbtn");
var FCUworkingNode = props.globals.initNode("/FMGC/FCU-working", 0, "BOOL");
var FCU = {
@ -99,8 +73,8 @@ var FCUController = {
},
AP1: func() {
if (me.FCUworking) {
if (!ap1.getBoolValue() and fbw.FBW.apOff == 0) {
ap1Input.setValue(1);
if (!fmgc.Output.ap1.getBoolValue() and fbw.FBW.apOff == 0) {
fmgc.Input.ap1.setValue(1);
ecam.apWarnNode.setValue(0);
pts.Controls.Flight.rudderTrim.setValue(0);
} else {
@ -110,8 +84,8 @@ var FCUController = {
},
AP2: func() {
if (me.FCUworking) {
if (!ap2.getBoolValue() and fbw.FBW.apOff == 0) {
ap2Input.setValue(1);
if (!fmgc.Output.ap2.getBoolValue() and fbw.FBW.apOff == 0) {
fmgc.Input.ap2.setValue(1);
ecam.apWarnNode.setValue(0);
pts.Controls.Flight.rudderTrim.setValue(0);
} else {
@ -121,8 +95,8 @@ var FCUController = {
},
ATHR: func() {
if (me.FCUworking) {
if (!athr.getBoolValue() and !pts.FMGC.CasCompare.casRejectAll.getBoolValue() and fbw.FBW.apOff == 0) {
athrInput.setValue(1);
if (!fmgc.Output.athr.getBoolValue() and !pts.FMGC.CasCompare.casRejectAll.getBoolValue() and fbw.FBW.apOff == 0) {
fmgc.Input.athr.setValue(1);
} else {
athrOff("hard");
}
@ -130,39 +104,39 @@ var FCUController = {
},
FD1: func() {
if (me.FCUworking) {
if (!fd1.getBoolValue()) {
fd1Input.setValue(1);
if (!fmgc.Output.fd1.getBoolValue()) {
fmgc.Input.fd1.setValue(1);
} else {
fd1Input.setValue(0);
fmgc.Input.fd1.setValue(0);
}
}
},
FD2: func() {
if (me.FCUworking) {
if (!fd2.getBoolValue()) {
fd2Input.setValue(1);
if (!fmgc.Output.fd2.getBoolValue()) {
fmgc.Input.fd2.setValue(1);
} else {
fd2Input.setValue(0);
fmgc.Input.fd2.setValue(0);
}
}
},
APDisc: func() {
# physical button sound - so put it outside here as you get a sound even if it doesn't work!
setprop("/sim/sounde/apdiscbtn", 1);
apDiscBtn.setValue(1);
settimer(func {
setprop("/sim/sounde/apdiscbtn", 0);
apDiscBtn.setValue(0);
}, 0.5);
if (me.FCUworking) {
if (ap1.getBoolValue() or ap2.getBoolValue()) {
if (fmgc.Output.ap1.getBoolValue() or fmgc.Output.ap2.getBoolValue()) {
apOff("soft", 0);
} else {
if (getprop("/it-autoflight/sound/apoffsound") == 1 or getprop("/it-autoflight/sound/apoffsound2") == 1) {
setprop("/it-autoflight/sound/apoffsound", 0);
setprop("/it-autoflight/sound/apoffsound2", 0);
if (apOffSound[0].getValue() or apOffSound[1].getValue()) {
apOffSound[0].setValue(0);
apOffSound[1].setValue(0);
}
if (getprop("/it-autoflight/output/ap-warning") != 0) {
setprop("/it-autoflight/output/ap-warning", 0);
if (apWarningNode.getValue() != 0) {
apWarningNode.setValue(0);
ecam.lights[0].setValue(0);
}
}
@ -170,18 +144,18 @@ var FCUController = {
},
ATDisc: func() {
# physical button sound - so put it outside here as you get a sound even if it doesn't work!
setprop("/sim/sounde/apdiscbtn", 1);
apDiscBtn.setValue(1);
settimer(func {
setprop("/sim/sounde/apdiscbtn", 0);
apDiscBtn.setValue(0);
}, 0.5);
if (me.FCUworking) {
if (athr.getBoolValue()) {
if (fmgc.Output.athr.getBoolValue()) {
athrOff("soft");
ecam.lights[1].setValue(1);
} else {
if (getprop("/it-autoflight/output/athr-warning") == 1) {
setprop("/it-autoflight/output/athr-warning", 0);
if (athrWarningNode.getValue() == 1) {
athrWarningNode.setValue(0);
ecam.lights[1].setValue(0);
}
}
@ -189,84 +163,88 @@ var FCUController = {
},
IASMach: func() {
if (me.FCUworking) {
if (ktsMach.getBoolValue()) {
ktsMach.setBoolValue(0);
if (fmgc.Input.ktsMach.getBoolValue()) {
fmgc.Input.ktsMach.setBoolValue(0);
} else {
ktsMach.setBoolValue(1);
fmgc.Input.ktsMach.setBoolValue(1);
}
}
},
SPDPush: func() {
if (me.FCUworking) {
if (fmgc.FMGCInternal.crzSet and fmgc.FMGCInternal.costIndexSet) {
spdManaged.setBoolValue(1);
fmgc.Custom.Input.spdManaged.setBoolValue(1);
fmgc.ManagedSPD.start();
}
}
},
ias: nil,
mach: nil,
SPDPull: func() {
if (me.FCUworking) {
spdManaged.setBoolValue(0);
fmgc.Custom.Input.spdManaged.setBoolValue(0);
fmgc.ManagedSPD.stop();
var ias = iasNow.getValue();
var mach = machNow.getValue();
if (!ktsMach.getBoolValue()) {
if (ias >= 100 and ias <= 350) {
iasSet.setValue(math.round(ias));
} else if (ias < 100) {
iasSet.setValue(100);
} else if (ias > 350) {
iasSet.setValue(350);
me.ias = fmgc.Velocities.indicatedAirspeedKt.getValue();
me.mach = fmgc.Velocities.indicatedMach.getValue();
if (!fmgc.Input.ktsMach.getBoolValue()) {
if (me.ias >= 100 and me.ias <= 399) {
fmgc.Input.kts.setValue(math.round(me.ias));
} else if (me.ias < 100) {
fmgc.Input.kts.setValue(100);
} else if (me.ias > 399) {
fmgc.Input.kts.setValue(399);
}
} else if (ktsMach.getBoolValue()) {
if (mach >= 0.50 and mach <= 0.82) {
machSet.setValue(math.round(mach, 0.001));
} else if (mach < 0.50) {
machSet.setValue(0.50);
} else if (mach > 0.82) {
machSet.setValue(0.82);
} else if (fmgc.Input.ktsMach.getBoolValue()) {
if (me.mach >= 0.10 and me.mach <= 0.99) {
fmgc.Input.mach.setValue(math.round(me.mach, 0.001));
} else if (me.mach < 0.10) {
fmgc.Input.mach.setValue(0.10);
} else if (me.mach > 0.99) {
fmgc.Input.mach.setValue(0.99);
}
}
}
},
machTemp: nil,
iasTemp: nil,
SPDAdjust: func(d) {
if (me.FCUworking) {
if (!spdManaged.getBoolValue()) {
if (ktsMach.getBoolValue()) {
var machTemp = machSet.getValue();
if (!fmgc.Custom.Input.spdManaged.getBoolValue()) {
if (fmgc.Input.ktsMach.getBoolValue()) {
me.machTemp = fmgc.Input.mach.getValue();
if (d == 1) {
machTemp = math.round(machTemp + 0.001, 0.001); # Kill floating point error
me.machTemp = math.round(me.machTemp + 0.001, 0.001); # Kill floating point error
} else if (d == -1) {
machTemp = math.round(machTemp - 0.001, 0.001); # Kill floating point error
me.machTemp = math.round(me.machTemp - 0.001, 0.001); # Kill floating point error
} else if (d == 10) {
machTemp = math.round(machTemp + 0.01, 0.01); # Kill floating point error
me.machTemp = math.round(me.machTemp + 0.01, 0.01); # Kill floating point error
} else if (d == -10) {
machTemp = math.round(machTemp - 0.01, 0.01); # Kill floating point error
me.machTemp = math.round(me.machTemp - 0.01, 0.01); # Kill floating point error
}
if (machTemp < 0.50) {
machSet.setValue(0.50);
} else if (machTemp > 0.82) {
machSet.setValue(0.82);
if (me.machTemp < 0.10) {
fmgc.Input.mach.setValue(0.10);
} else if (me.machTemp > 0.99) {
fmgc.Input.mach.setValue(0.99);
} else {
machSet.setValue(machTemp);
fmgc.Input.mach.setValue(me.machTemp);
}
} else {
var iasTemp = iasSet.getValue();
me.iasTemp = fmgc.Input.kts.getValue();
if (d == 1) {
iasTemp = iasTemp + 1;
me.iasTemp = me.iasTemp + 1;
} else if (d == -1) {
iasTemp = iasTemp - 1;
me.iasTemp = me.iasTemp - 1;
} else if (d == 10) {
iasTemp = iasTemp + 10;
me.iasTemp = me.iasTemp + 10;
} else if (d == -10) {
iasTemp = iasTemp - 10;
me.iasTemp = me.iasTemp - 10;
}
if (iasTemp < 100) {
iasSet.setValue(100);
} else if (iasTemp > 350) {
iasSet.setValue(350);
if (me.iasTemp < 100) {
fmgc.Input.kts.setValue(100);
} else if (me.iasTemp > 399) {
fmgc.Input.kts.setValue(399);
} else {
iasSet.setValue(iasTemp);
fmgc.Input.kts.setValue(me.iasTemp);
}
}
}
@ -274,66 +252,68 @@ var FCUController = {
},
HDGPush: func() {
if (me.FCUworking) {
if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) {
latModeInput.setValue(1);
if (fmgc.Output.fd1.getBoolValue() or fmgc.Output.fd2.getBoolValue() or fmgc.Output.ap1.getBoolValue() or fmgc.Output.ap2.getBoolValue()) {
fmgc.Input.lat.setValue(1);
}
}
},
HDGPull: func() {
if (me.FCUworking) {
if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) {
if (latMode.getValue() == 0 or !showHDG.getBoolValue()) {
latModeInput.setValue(3);
if (fmgc.Output.fd1.getBoolValue() or fmgc.Output.fd2.getBoolValue() or fmgc.Output.ap1.getBoolValue() or fmgc.Output.ap2.getBoolValue()) {
if (fmgc.Output.lat.getValue() == 0 or !fmgc.Custom.showHdg.getBoolValue()) {
fmgc.Input.lat.setValue(3);
} else {
latModeInput.setValue(0);
fmgc.Input.lat.setValue(0);
}
}
}
},
hdgTemp: nil,
HDGAdjust: func(d) {
if (me.FCUworking) {
if (latMode.getValue() != 0) {
if (fmgc.Output.lat.getValue() != 0) {
hdgInput();
}
if (showHDG.getBoolValue()) {
var hdgTemp = hdgSet.getValue();
if (fmgc.Custom.showHdg.getBoolValue()) {
me.hdgTemp = fmgc.Input.hdg.getValue();
if (d == 1) {
hdgTemp = hdgTemp + 1;
me.hdgTemp = me.hdgTemp + 1;
} else if (d == -1) {
hdgTemp = hdgTemp - 1;
me.hdgTemp = me.hdgTemp - 1;
} else if (d == 10) {
hdgTemp = hdgTemp + 10;
me.hdgTemp = me.hdgTemp + 10;
} else if (d == -10) {
hdgTemp = hdgTemp - 10;
me.hdgTemp = me.hdgTemp - 10;
}
if (hdgTemp < 0.5) {
hdgSet.setValue(hdgTemp + 360);
} else if (hdgTemp >= 360.5) {
hdgSet.setValue(hdgTemp - 360);
if (me.hdgTemp < 0.5) {
fmgc.Input.hdg.setValue(me.hdgTemp + 360);
} else if (me.hdgTemp >= 360.5) {
fmgc.Input.hdg.setValue(me.hdgTemp - 360);
} else {
hdgSet.setValue(hdgTemp);
fmgc.Input.hdg.setValue(me.hdgTemp);
}
}
}
},
vertTemp: nil,
LOCButton: func() {
if (me.FCUworking) {
var vertTemp = vertMode.getValue();
if ((locArm.getBoolValue() or latMode.getValue() == 2) and !apprArm.getBoolValue() and vertTemp != 2 and vertTemp != 6) {
if (latMode.getValue() == 2) {
latModeInput.setValue(0);
me.vertTemp = fmgc.Output.vert.getValue();
if ((fmgc.Output.locArm.getBoolValue() or fmgc.Output.lat.getValue() == 2) and !fmgc.Output.apprArm.getBoolValue() and me.vertTemp != 2 and me.vertTemp != 6) {
if (fmgc.Output.lat.getValue() == 2) {
fmgc.Input.lat.setValue(0);
} else {
fmgc.ITAF.disarmLOC();
}
if (vertTemp == 2 or vertTemp == 6) {
if (me.vertTemp == 2 or me.vertTemp == 6) {
me.VSPull();
} else {
fmgc.ITAF.disarmGS();
}
} else {
if (pts.Position.gearAglFt.getValue() >= 400 and vertTemp != 7) {
latModeInput.setValue(2);
if (vertTemp == 2 or vertTemp == 6) {
if (pts.Position.gearAglFt.getValue() >= 400 and me.vertTemp != 7) {
fmgc.Input.lat.setValue(2);
if (me.vertTemp == 2 or me.vertTemp == 6) {
me.VSPull();
} else {
fmgc.ITAF.disarmGS();
@ -354,123 +334,128 @@ var FCUController = {
},
ALTPull: func() {
if (me.FCUworking) {
vertModeInput.setValue(4);
fmgc.Input.vert.setValue(4);
}
},
altTemp: nil,
ALTAdjust: func(d) {
if (me.FCUworking) {
var altTemp = altSet.getValue();
me.altTemp = fmgc.Input.alt.getValue();
if (d == 1) {
if (altSetMode.getBoolValue()) {
altTemp = altTemp + 1000;
me.altTemp = me.altTemp + 1000;
} else {
altTemp = altTemp + 100;
me.altTemp = me.altTemp + 100;
}
} else if (d == -1) {
if (altSetMode.getBoolValue()) {
altTemp = altTemp - 1000;
me.altTemp = me.altTemp - 1000;
} else {
altTemp = altTemp - 100;
me.altTemp = me.altTemp - 100;
}
} else if (d == 2) {
altTemp = altTemp + 100;
me.altTemp = me.altTemp + 100;
} else if (d == -2) {
altTemp = altTemp - 100;
me.altTemp = me.altTemp - 100;
} else if (d == 10) {
altTemp = altTemp + 1000;
me.altTemp = me.altTemp + 1000;
} else if (d == -10) {
altTemp = altTemp - 1000;
me.altTemp = me.altTemp - 1000;
}
if (altTemp < 100) {
altSet.setValue(100);
} else if (altTemp > 49000) {
altSet.setValue(49000);
if (me.altTemp < 100) {
fmgc.Input.alt.setValue(100);
} else if (me.altTemp > 49000) {
fmgc.Input.alt.setValue(49000);
} else {
altSet.setValue(altTemp);
fmgc.Input.alt.setValue(me.altTemp);
}
}
},
VSPush: func() {
if (me.FCUworking) {
if (trkFpaSW.getBoolValue()) {
vertModeInput.setValue(5);
fpaModeInput.setValue(0);
if (fmgc.Custom.trkFpa.getBoolValue()) {
fmgc.Input.vert.setValue(5);
fmgc.Input.fpa.setValue(0);
} else {
vertModeInput.setValue(1);
vsModeInput.setValue(0);
fmgc.Input.vert.setValue(1);
fmgc.Input.vs.setValue(0);
fmgc.Custom.Output.vsFCU.setValue(left(sprintf("%+05.0f",0),3));
}
}
},
VSPull: func() {
if (me.FCUworking) {
if (trkFpaSW.getBoolValue()) {
vertModeInput.setValue(5);
if (fmgc.Custom.trkFpa.getBoolValue()) {
fmgc.Input.vert.setValue(5);
} else {
vertModeInput.setValue(1);
fmgc.Input.vert.setValue(1);
}
}
},
vsTemp: nil,
fpaTemp: nil,
VSAdjust: func(d) {
if (me.FCUworking) {
if (vertMode.getValue() == 1) {
var vsTemp = vsSet.getValue();
if (fmgc.Output.vert.getValue() == 1) {
me.vsTemp = fmgc.Input.vs.getValue();
if (d == 1) {
vsTemp = vsTemp + 100;
me.vsTemp = me.vsTemp + 100;
} else if (d == -1) {
vsTemp = vsTemp - 100;
me.vsTemp = me.vsTemp - 100;
} else if (d == 10) {
vsTemp = vsTemp + 1000;
me.vsTemp = me.vsTemp + 1000;
} else if (d == -10) {
vsTemp = vsTemp - 1000;
me.vsTemp = me.vsTemp - 1000;
}
if (vsTemp < -6000) {
vsSet.setValue(-6000);
} else if (vsTemp > 6000) {
vsSet.setValue(6000);
if (me.vsTemp < -6000) {
fmgc.Input.vs.setValue(-6000);
} else if (me.vsTemp > 6000) {
fmgc.Input.vs.setValue(6000);
} else {
vsSet.setValue(vsTemp);
fmgc.Input.vs.setValue(me.vsTemp);
}
} else if (vertMode.getValue() == 5) {
var fpaTemp = fpaSet.getValue();
fmgc.Custom.Output.vsFCU.setValue(left(sprintf("%+05.0f",fmgc.Input.vs.getValue()),3));
} else if (fmgc.Output.vert.getValue() == 5) {
me.fpaTemp = fmgc.Input.fpa.getValue();
if (d == 1) {
fpaTemp = math.round(fpaTemp + 0.1, 0.1);
me.fpaTemp = math.round(me.fpaTemp + 0.1, 0.1);
} else if (d == -1) {
fpaTemp = math.round(fpaTemp - 0.1, 0.1);
me.fpaTemp = math.round(me.fpaTemp - 0.1, 0.1);
} else if (d == 10) {
fpaTemp = fpaTemp + 1;
me.fpaTemp = me.fpaTemp + 1;
} else if (d == -10) {
fpaTemp = fpaTemp - 1;
me.fpaTemp = me.fpaTemp - 1;
}
if (fpaTemp < -9.9) {
fpaSet.setValue(-9.9);
} else if (fpaTemp > 9.9) {
fpaSet.setValue(9.9);
if (me.fpaTemp < -9.9) {
fmgc.Input.fpa.setValue(-9.9);
} else if (me.fpaTemp > 9.9) {
fmgc.Input.fpa.setValue(9.9);
} else {
fpaSet.setValue(fpaTemp);
fmgc.Input.fpa.setValue(me.fpaTemp);
}
}
if ((vertMode.getValue() != 1 and !trkFpaSW.getBoolValue()) or (vertMode.getValue() != 5 and trkFpaSW.getBoolValue())) {
if ((fmgc.Output.vert.getValue() != 1 and !fmgc.Custom.trkFpa.getBoolValue()) or (fmgc.Output.vert.getValue() != 5 and fmgc.Custom.trkFpa.getBoolValue())) {
me.VSPull();
}
}
},
APPRButton: func() {
if (me.FCUworking) {
var vertTemp = vertMode.getValue();
if ((locArm.getBoolValue() or latMode.getValue() == 2) and (apprArm.getBoolValue() or vertTemp == 2 or vertTemp == 6)) {
if (latMode.getValue() == 2) {
latModeInput.setValue(0);
me.vertTemp = fmgc.Output.vert.getValue();
if ((fmgc.Output.locArm.getBoolValue() or fmgc.Output.lat.getValue() == 2) and (fmgc.Output.apprArm.getBoolValue() or me.vertTemp == 2 or me.vertTemp == 6)) {
if (fmgc.Output.lat.getValue() == 2) {
fmgc.Input.lat.setValue(0);
} else {
fmgc.ITAF.disarmLOC();
}
if (vertTemp == 2 or vertTemp == 6) {
if (me.vertTemp == 2 or me.vertTemp == 6) {
me.VSPull();
} else {
fmgc.ITAF.disarmGS();
}
} else {
if (pts.Position.gearAglFt.getValue() >= 400 and vertTemp != 7) {
vertModeInput.setValue(2);
if (pts.Position.gearAglFt.getValue() >= 400 and me.vertTemp != 7) {
fmgc.Input.vert.setValue(2);
}
}
}
@ -479,13 +464,13 @@ var FCUController = {
# Master / slave principle of operation depending on the autopilot / flight director engagement
var updateActiveFMGC = func {
if (ap1.getBoolValue()) {
if (fmgc.Output.ap1.getBoolValue()) {
FCUController.activeFMGC.setValue(1);
} elsif (ap2.getBoolValue()) {
} elsif (fmgc.Output.ap2.getBoolValue()) {
FCUController.activeFMGC.setValue(2);
} elsif (fd1.getBoolValue()) {
} elsif (fmgc.Output.fd1.getBoolValue()) {
FCUController.activeFMGC.setValue(1);
} elsif (fd2.getBoolValue()) {
} elsif (fmgc.Output.fd2.getBoolValue()) {
FCUController.activeFMGC.setValue(2);
} else {
FCUController.activeFMGC.setValue(1);
@ -494,36 +479,35 @@ var updateActiveFMGC = func {
# Autopilot Disconnection
var apOff = func(type, side) {
if ((ap1Input.getValue() and (side == 1 or side == 0)) or (ap2Input.getValue() and (side == 2 or side == 0))) {
if ((fmgc.Input.ap1.getValue() and (side == 1 or side == 0)) or (fmgc.Input.ap2.getValue() and (side == 2 or side == 0))) {
ecam.doApWarn(type);
}
if (side == 0) {
ap1Input.setValue(0);
ap2Input.setValue(0);
fmgc.Input.ap1.setValue(0);
fmgc.Input.ap2.setValue(0);
} elsif (side == 1) {
ap1Input.setValue(0);
fmgc.Input.ap1.setValue(0);
} elsif (side == 2) {
ap2Input.setValue(0);
fmgc.Input.ap2.setValue(0);
}
}
# Autothrust Disconnection
var athrOff = func(type) {
if (athrInput.getValue() == 1) {
if (fmgc.Input.athr.getValue() == 1) {
if (type == "hard") {
fadec.lockThr();
}
athrInput.setValue(0);
fmgc.Input.athr.setValue(0);
ecam.doAthrWarn(type);
}
}
# If the heading knob is turned while in nav mode, it will display heading for a period of time
var hdgInput = func {
if (latMode.getValue() != 0) {
showHDG.setBoolValue(1);
var hdgnow = fmgc.Input.hdg.getValue();
if (fmgc.Output.lat.getValue() != 0) {
fmgc.Custom.showHdg.setBoolValue(1);
fmgc.Custom.hdgTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
}

View file

@ -174,6 +174,7 @@ var Custom = {
},
Output: {
fmaPower: props.globals.initNode("/it-autoflight/output/fma-pwr", 0, "BOOL"),
vsFCU: props.globals.initNode("/it-autoflight/output/vs-fcu-display", "", "STRING"),
},
Sound: {
athrOff: props.globals.initNode("/it-autoflight/sound/athrsound", 0, "BOOL"),
@ -196,6 +197,7 @@ var ITAF = {
Input.hdg.setValue(360);
Input.alt.setValue(10000);
Input.vs.setValue(0);
Custom.Output.vsFCU.setValue(left(sprintf("%+05.0f",0),3));
Input.fpa.setValue(0);
Input.lat.setValue(9);
Input.vert.setValue(9);
@ -252,6 +254,10 @@ var ITAF = {
Internal.vsTemp = Internal.vs.getValue();
Position.indicatedAltitudeFtTemp = Position.indicatedAltitudeFt.getValue();
# Update VLS / VMAX for autothrust
FMGCNodes.vmax.setValue(FMGCInternal.maxspeed);
FMGCNodes.vlsMin.setValue(FMGCInternal.vls_min);
# LNAV Engagement
if (Output.lnavArm.getBoolValue()) {
me.checkLNAV(1);
@ -846,13 +852,13 @@ var ITAF = {
}
},
syncKts: func() {
Input.kts.setValue(math.clamp(math.round(Velocities.indicatedAirspeedKt.getValue()), 100, 350));
Input.kts.setValue(math.clamp(math.round(Velocities.indicatedAirspeedKt.getValue()), 100, 399));
},
syncKtsGa: func() { # Same as syncKts, except doesn't go below V2
Input.kts.setValue(math.clamp(math.round(Velocities.indicatedAirspeedKt.getValue()), FMGCInternal.v2, 350));
Input.kts.setValue(math.clamp(math.round(Velocities.indicatedAirspeedKt.getValue()), FMGCInternal.v2, 399));
},
syncMach: func() {
Input.mach.setValue(math.clamp(math.round(Velocities.indicatedMach.getValue(), 0.001), 0.5, 0.82));
Input.mach.setValue(math.clamp(math.round(Velocities.indicatedMach.getValue(), 0.001), 0.1, 0.99));
},
syncHdg: func() {
Input.hdg.setValue(math.round(Internal.hdgPredicted.getValue())); # Switches to track automatically
@ -861,8 +867,11 @@ var ITAF = {
Input.alt.setValue(math.clamp(math.round(Internal.altPredicted.getValue(), 100), 0, 50000));
Internal.alt.setValue(math.clamp(math.round(Internal.altPredicted.getValue(), 100), 0, 50000));
},
tempVS: 0,
syncVs: func() {
Input.vs.setValue(math.clamp(math.round(Internal.vs.getValue(), 100), -6000, 6000));
me.tempVS = math.clamp(math.round(Internal.vs.getValue(), 100), -6000, 6000);
Input.vs.setValue(me.tempVS);
fmgc.Custom.Output.vsFCU.setValue(left(sprintf("%+05.0f",me.tempVS),3));
},
syncFpa: func() {
Input.fpa.setValue(math.clamp(math.round(Internal.fpa.getValue(), 0.1), -9.9, 9.9));
@ -998,6 +1007,7 @@ setlistener("/it-autoflight/input/lat", func {
Output.ap2Temp = Output.ap2.getBoolValue();
Output.fd1Temp = Output.fd1.getBoolValue();
Output.fd2Temp = Output.fd2.getBoolValue();
if (!Gear.wow1.getBoolValue() and !Gear.wow2.getBoolValue()) {
if (Output.ap1Temp or Output.ap2Temp or Output.fd1Temp or Output.fd2Temp) {
ITAF.setLatMode(Input.latTemp);
@ -1021,17 +1031,41 @@ setlistener("/it-autoflight/input/vert", func {
}
});
# Mode Reversions
setlistener(pts.Systems.Navigation.ADR.Output.overspeed, func(v) {
if (v.getBoolValue() and !Output.ap1.getBoolValue() and !Output.ap2.getBoolValue() and Output.athr.getBoolValue() and Modes.PFD.FMA.pitchMode.getValue() == "OP CLB" and Modes.PFD.FMA.throttle.getValue() == "THR CLB") {
Input.fd1.setValue(0);
Input.fd2.setValue(0);
ecam.aural[5].setBoolValue(0);
settimer(func() {
ecam.aural[5].setBoolValue(1);
}, 0.15);
}
}, 0, 0);
setlistener(pts.Systems.Navigation.ADR.Output.underspeed, func(v) {
if (v.getBoolValue() and !Output.ap1.getBoolValue() and !Output.ap2.getBoolValue() and Output.athr.getBoolValue() and Modes.PFD.FMA.pitchMode.getValue() == "OP DES" and Modes.PFD.FMA.throttle.getValue() == "THR IDLE") {
Input.fd1.setValue(0);
Input.fd2.setValue(0);
ecam.aural[5].setBoolValue(0);
settimer(func() {
ecam.aural[5].setBoolValue(1);
}, 0.15);
}
}, 0, 0);
setlistener("/sim/signals/fdm-initialized", func {
ITAF.init();
});
# For Canvas Nav Display.
setlistener("/it-autoflight/input/hdg", func {
setprop("/autopilot/settings/heading-bug-deg", Input.hdg.getValue());
setlistener("/it-autoflight/input/hdg", func() {
pts.Autopilot.Settings.headingBugDeg.setValue(Input.hdg.getValue());
}, 0, 0);
setlistener("/it-autoflight/internal/alt", func {
setprop("/autopilot/settings/target-altitude-ft", Internal.alt.getValue());
setlistener("/it-autoflight/internal/alt", func() {
pts.Autopilot.Settings.targetAltitudeFt.setValue(Internal.alt.getValue());
}, 0, 0);
var loopTimer = maketimer(0.1, ITAF, ITAF.loop);

View file

@ -670,6 +670,6 @@ setlistener("/modes/pfd/fma/pitch-mode2-armed", func {
}
});
setlistener("sim/signals/fdm-initialized", func {
setlistener("/sim/signals/fdm-initialized", func {
init();
});

View file

@ -16,7 +16,7 @@ var dep = "";
var arr = "";
var n1_left = 0;
var n1_right = 0;
var modelat = 0;
var modelat = "";
var mode = 0;
var gs = 0;
var cruiseft = 0;
@ -31,6 +31,7 @@ var hdg = 0;
var alt = 0;
var altitude = 0;
var flap = 0;
var flaps = 0;
var freqnav0uf = 0;
var freqnav0 = 0;
var namenav0 = "XX";
@ -63,12 +64,14 @@ var crzFl = 0;
var windHdg = 0;
var windSpeed = 0;
var windsDidChange = 0;
var tempOverspeed = nil;
setprop("position/gear-agl-ft", 0);
setprop("/it-autoflight/settings/accel-agl-ft", 1500); #eventually set to 1500 above runway
setprop("/it-autoflight/internal/vert-speed-fpm", 0);
setprop("/it-autoflight/output/fma-pwr", 0);
setprop("instrumentation/nav[0]/nav-id", "XXX");
setprop("instrumentation/nav[1]/nav-id", "XXX");
setprop("/instrumentation/nav[0]/nav-id", "XXX");
setprop("/instrumentation/nav[1]/nav-id", "XXX");
setprop("/FMGC/internal/ils1-mcdu", "XXX/999.99");
setprop("/FMGC/internal/ils2-mcdu", "XXX/999.99");
setprop("/FMGC/internal/vor1-mcdu", "XXX/999.99");
@ -76,6 +79,9 @@ setprop("/FMGC/internal/vor2-mcdu", "999.99/XXX");
setprop("/FMGC/internal/adf1-mcdu", "XXX/999.99");
setprop("/FMGC/internal/adf2-mcdu", "999.99/XXX");
var FMGCAlignDone = [props.globals.initNode("/FMGC/internal/align1-done", 0, "BOOL"), props.globals.initNode("/FMGC/internal/align2-done", 0, "BOOL"), props.globals.initNode("/FMGC/internal/align3-done", 0, "BOOL")];
var FMGCAlignTime = [props.globals.initNode("/FMGC/internal/align1-time", 0, "DOUBLE"), props.globals.initNode("/FMGC/internal/align2-time", 0, "DOUBLE"), props.globals.initNode("/FMGC/internal/align3-time", 0, "DOUBLE")];
var adirsSkip = props.globals.getNode("/systems/acconfig/options/adirs-skip");
var blockCalculating = props.globals.initNode("/FMGC/internal/block-calculating", 0, "BOOL");
var fuelCalculating = props.globals.initNode("/FMGC/internal/fuel-calculating", 0, "BOOL");
@ -84,6 +90,7 @@ var FMGCinit = func {
FMGCInternal.minspeed = 0;
FMGCInternal.maxspeed = 338;
FMGCInternal.phase = 0; # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done
FMGCNodes.phase.setValue(0);
FMGCInternal.mngSpd = 157;
FMGCInternal.mngSpdCmd = 157;
FMGCInternal.mngKtsMach = 0;
@ -91,9 +98,9 @@ var FMGCinit = func {
setprop("/FMGC/internal/loc-source", "NAV0");
setprop("/FMGC/internal/optalt", 0);
setprop("/FMGC/internal/landing-time", -99);
setprop("/FMGC/internal/align1-time", -99);
setprop("/FMGC/internal/align2-time", -99);
setprop("/FMGC/internal/align3-time", -99);
FMGCAlignTime[0].setValue(-99);
FMGCAlignTime[1].setValue(-99);
FMGCAlignTime[2].setValue(-99);
setprop("/FMGC/internal/block-fuel-time", -99);
setprop("/FMGC/internal/fuel-pred-time", -99);
masterFMGC.start();
@ -257,6 +264,9 @@ var FMGCNodes = {
toState: props.globals.initNode("/FMGC/internal/to-state", 0, "BOOL"),
v1: props.globals.initNode("/FMGC/internal/v1", 0, "DOUBLE"),
v1set: props.globals.initNode("/FMGC/internal/v1-set", 0, "BOOL"),
phase: props.globals.initNode("/FMGC/internal/phase", 0, "INT"),
vlsMin: props.globals.initNode("/FMGC/internal/vls-min", 0, "DOUBLE"),
vmax: props.globals.initNode("/FMGC/internal/vmax", 0, "DOUBLE"),
};
############
@ -279,9 +289,9 @@ var trimReset = func {
###############
var updateARPT = func {
setprop("autopilot/route-manager/departure/airport", FMGCInternal.depApt);
setprop("autopilot/route-manager/destination/airport", FMGCInternal.arrApt);
setprop("autopilot/route-manager/alternate/airport", FMGCInternal.altAirport);
setprop("/autopilot/route-manager/departure/airport", FMGCInternal.depApt);
setprop("/autopilot/route-manager/destination/airport", FMGCInternal.arrApt);
setprop("/autopilot/route-manager/alternate/airport", FMGCInternal.altAirport);
if (getprop("/autopilot/route-manager/active") != 1) {
fgcommand("activate-flightplan", props.Node.new({"activate": 1}));
}
@ -310,7 +320,7 @@ var updateArptLatLon = func {
}
updateRouteManagerAlt = func() {
setprop("autopilot/route-manager/cruise/altitude-ft", FMGCInternal.crzFt);
setprop("/autopilot/route-manager/cruise/altitude-ft", FMGCInternal.crzFt);
# TODO - update FMGCInternal.phase when DES to re-enter in CLIMB/CRUIZE
};
@ -329,7 +339,7 @@ var updateFuel = func {
final_time = final_fuel / (2.0 * ((zfw*zfw*-2e-10) + (zfw*0.0003) + 2.8903)); # x2 for 2 engines
if (final_time < 0) {
final_time = 0;
} else if (final_time > 480) {
} elsif (final_time > 480) {
final_time = 480;
}
if (num(final_time) >= 60) {
@ -351,7 +361,7 @@ var updateFuel = func {
final_fuel = final_time * 2.0 * ((zfw*zfw*-2e-10) + (zfw*0.0003) + 2.8903); # x2 for 2 engines
if (final_fuel < 0) {
final_fuel = 0;
} else if (final_fuel > 80000) {
} elsif (final_fuel > 80000) {
final_fuel = 80000;
}
FMGCInternal.finalFuel = final_fuel / 1000;
@ -360,14 +370,14 @@ var updateFuel = func {
# Calculate alternate fuel
if (!FMGCInternal.altFuelSet and FMGCInternal.altAirportSet) {
#calc
} else if (FMGCInternal.altFuelSet and FMGCInternal.altAirportSet) {
} elsif (FMGCInternal.altFuelSet and FMGCInternal.altAirportSet) {
#dummy calc for now
alt_fuel = 1000 * num(FMGCInternal.altFuel);
zfw = 1000 * FMGCInternal.zfw;
alt_time = alt_fuel / (2.0 * ((zfw*zfw*-2e-10) + (zfw*0.0003) + 2.8903)); # x2 for 2 engines
if (alt_time < 0) {
alt_time = 0;
} else if (alt_time > 480) {
} elsif (alt_time > 480) {
alt_time = 480;
}
if (num(alt_time) >= 60) {
@ -377,7 +387,7 @@ var updateFuel = func {
} else {
FMGCInternal.altTime = sprintf("%04d", alt_time);
}
} else if (!FMGCInternal.altFuelSet) {
} elsif (!FMGCInternal.altFuelSet) {
FMGCInternal.altFuel = 0.0;
FMGCInternal.altTime = "0000";
}
@ -408,7 +418,7 @@ var updateFuel = func {
trip_fuel = 4.018e+02 + (dist*3.575e+01) + (dist*dist*-4.260e-02) + (dist*dist*dist*-1.446e-05) + (dist*dist*dist*dist*4.101e-09) + (dist*dist*dist*dist*dist*-6.753e-13) + (dist*dist*dist*dist*dist*dist*5.074e-17) + (crz*-2.573e+01) + (dist*crz*-1.583e-01) + (dist*dist*crz*8.147e-04) + (dist*dist*dist*crz*4.485e-08) + (dist*dist*dist*dist*crz*-7.656e-12) + (dist*dist*dist*dist*dist*crz*4.503e-16) + (crz*crz*4.427e-01) + (dist*crz*crz*-1.137e-03) + (dist*dist*crz*crz*-4.409e-06) + (dist*dist*dist*crz*crz*-3.345e-11) + (dist*dist*dist*dist*crz*crz*4.985e-15) + (crz*crz*crz*-2.471e-03) + (dist*crz*crz*crz*1.223e-05) + (dist*dist*crz*crz*crz*9.660e-09) + (dist*dist*dist*crz*crz*crz*-2.127e-14) + (crz*crz*crz*crz*5.714e-06) + (dist*crz*crz*crz*crz*-3.546e-08) + (dist*dist*crz*crz*crz*crz*-7.536e-12) + (crz*crz*crz*crz*crz*-4.061e-09) + (dist*crz*crz*crz*crz*crz*3.355e-11) + (crz*crz*crz*crz*crz*crz*-1.451e-12);
if (trip_fuel < 400) {
trip_fuel = 400;
} else if (trip_fuel > 80000) {
} elsif (trip_fuel > 80000) {
trip_fuel = 80000;
}
@ -418,7 +428,7 @@ var updateFuel = func {
trip_time = 9.095e-02 + (dist*-3.968e-02) + (dist*dist*4.302e-04) + (dist*dist*dist*2.005e-07) + (dist*dist*dist*dist*-6.876e-11) + (dist*dist*dist*dist*dist*1.432e-14) + (dist*dist*dist*dist*dist*dist*-1.177e-18) + (crz*7.348e-01) + (dist*crz*3.310e-03) + (dist*dist*crz*-8.700e-06) + (dist*dist*dist*crz*-4.214e-10) + (dist*dist*dist*dist*crz*5.652e-14) + (dist*dist*dist*dist*dist*crz*-6.379e-18) + (crz*crz*-1.449e-02) + (dist*crz*crz*-7.508e-06) + (dist*dist*crz*crz*4.529e-08) + (dist*dist*dist*crz*crz*3.699e-13) + (dist*dist*dist*dist*crz*crz*8.466e-18) + (crz*crz*crz*1.108e-04) + (dist*crz*crz*crz*-4.126e-08) + (dist*dist*crz*crz*crz*-9.645e-11) + (dist*dist*dist*crz*crz*crz*-1.544e-16) + (crz*crz*crz*crz*-4.123e-07) + (dist*crz*crz*crz*crz*1.831e-10) + (dist*dist*crz*crz*crz*crz*7.438e-14) + (crz*crz*crz*crz*crz*7.546e-10) + (dist*crz*crz*crz*crz*crz*-1.921e-13) + (crz*crz*crz*crz*crz*crz*-5.453e-13);
if (trip_time < 10) {
trip_time = 10;
} else if (trip_time > 480) {
} elsif (trip_time > 480) {
trip_time = 480;
}
# if (low air conditioning) {
@ -426,7 +436,7 @@ var updateFuel = func {
#}
# if (total anti-ice) {
# trip_fuel = trip_fuel * 1.045;
#} else if (engine anti-ice) {
#} elsif (engine anti-ice) {
# trip_fuel = trip_fuel * 1.02;
#}
@ -435,7 +445,7 @@ var updateFuel = func {
trip_fuel = trip_fuel + (landing_weight_correction * (FMGCInternal.lw * 1000 - 121254.24421) / 2204.622622);
if (trip_fuel < 400) {
trip_fuel = 400;
} else if (trip_fuel > 80000) {
} elsif (trip_fuel > 80000) {
trip_fuel = 80000;
}
@ -463,7 +473,7 @@ var updateFuel = func {
FMGCInternal.rtePercent = 15.0; # need reasearch on this value
}
}
} else if (FMGCInternal.rtePercentSet) {
} elsif (FMGCInternal.rtePercentSet) {
FMGCInternal.rteRsv = num(FMGCInternal.tripFuel * FMGCInternal.rtePercent / 100.0);
} else {
if (num(FMGCInternal.tripFuel) <= 0.0) {
@ -493,7 +503,7 @@ var updateFuel = func {
extra_time = extra_fuel / (2.0 * ((lw*lw*-2e-10) + (lw*0.0003) + 2.8903)); # x2 for 2 engines
if (extra_time < 0) {
extra_time = 0;
} else if (extra_time > 480) {
} elsif (extra_time > 480) {
extra_time = 480;
}
if (num(extra_time) >= 60) {
@ -601,7 +611,10 @@ var radios = maketimer(1, func() {
adf1();
});
var newphase = nil;
var masterFMGC = maketimer(0.2, func {
n1_left = pts.Engines.Engine.n1Actual[0].getValue();
n1_right = pts.Engines.Engine.n1Actual[1].getValue();
modelat = Modes.PFD.FMA.rollMode.getValue();
@ -613,75 +626,86 @@ var masterFMGC = maketimer(0.2, func {
state1 = pts.Systems.Thrust.state[0].getValue();
state2 = pts.Systems.Thrust.state[1].getValue();
accel_agl_ft = Setting.reducAglFt.getValue();
gear0 = pts.Gear.wow[0].getBoolValue();
gear0 = pts.Gear.wow[0].getValue();
altSel = Input.alt.getValue();
if ((n1_left < 85 or n1_right < 85) and gs < 90 and mode == " " and gear0 and FMGCInternal.phase == 1) { # rejected takeoff
FMGCInternal.phase = 0;
newphase = FMGCInternal.phase;
if (FMGCInternal.phase == 0) {
if (gear0 and ((n1_left >= 85 and n1_right >= 85 and mode == "SRS") or gs >= 90)) {
newphase = 1;
systems.PNEU.pressMode.setValue("TO");
}
} elsif (FMGCInternal.phase == 1) {
if (gear0) {
if ((n1_left < 85 or n1_right < 85) and gs < 90 and mode == " ") { # rejected takeoff
newphase = 0;
systems.PNEU.pressMode.setValue("GN");
}
if (gear0 and FMGCInternal.phase == 0 and ((n1_left >= 85 and n1_right >= 85 and mode == "SRS") or gs >= 90)) {
FMGCInternal.phase = 1;
} elsif (((mode != "SRS" and mode != " ") or alt >= accel_agl_ft)) {
newphase = 2;
systems.PNEU.pressMode.setValue("TO");
}
if (FMGCInternal.phase == 1 and ((mode != "SRS" and mode != " ") or alt >= accel_agl_ft)) {
FMGCInternal.phase = 2;
systems.PNEU.pressMode.setValue("TO");
}
if (FMGCInternal.phase == 2 and (mode == "ALT CRZ" or mode == "ALT CRZ*")) {
FMGCInternal.phase = 3;
} elsif (FMGCInternal.phase == 2) {
if ((mode == "ALT CRZ" or mode == "ALT CRZ*")) {
newphase = 3;
systems.PNEU.pressMode.setValue("CR");
}
} elsif (FMGCInternal.phase == 3) {
if (FMGCInternal.crzFl >= 200) {
if (FMGCInternal.phase == 3 and (flightPlanController.arrivalDist <= 200 or altSel < 20000)) {
FMGCInternal.phase = 4;
if ((flightPlanController.arrivalDist <= 200 or altSel < 20000)) {
newphase = 4;
systems.PNEU.pressMode.setValue("DE");
}
} else {
if (FMGCInternal.phase == 3 and (flightPlanController.arrivalDist <= 200 or altSel < (FMGCInternal.crzFl * 100))) { # todo - not sure about crzFl condition, investigate what happens!
FMGCInternal.phase = 4;
if ((flightPlanController.arrivalDist <= 200 and altSel < (FMGCInternal.crzFl * 100))) { # todo - not sure about crzFl condition, investigate what happens!
newphase = 4;
systems.PNEU.pressMode.setValue("DE");
}
}
if (FMGCInternal.phase == 4) {
} elsif (FMGCInternal.phase == 4) {
if (getprop("/FMGC/internal/decel")) {
FMGCInternal.phase = 5;
newphase = 5;
}
else if (altSel == (FMGCInternal.crzFl * 100)) { # back to CRZ state
FMGCInternal.phase = 3;
elsif (altSel == (FMGCInternal.crzFl * 100)) { # back to CRZ state
newphase = 3;
systems.PNEU.pressMode.setValue("CR");
}
}
if (flightPlanController.num[2].getValue() > 0 and getprop("/FMGC/flightplan[2]/active") == 1 and flightPlanController.arrivalDist <= 15 and (modelat == "NAV" or modelat == "LOC" or modelat == "LOC*") and pts.Position.gearAglFt.getValue() < 9500) { #todo decel pseudo waypoint
setprop("/FMGC/internal/decel", 1);
} else if (getprop("/FMGC/internal/decel") == 1 and (FMGCInternal.phase == 0 or FMGCInternal.phase == 6)) {
setprop("/FMGC/internal/decel", 0);
}
if ((FMGCInternal.phase == 5) and state1 == "TOGA" and state2 == "TOGA") {
FMGCInternal.phase = 6;
} elsif (FMGCInternal.phase == 5) {
if (state1 == "TOGA" and state2 == "TOGA") {
newphase = 6;
systems.PNEU.pressMode.setValue("TO");
Input.toga.setValue(1);
}
if (FMGCInternal.phase == 6 and alt >= accel_agl_ft) { # todo when insert altn or new dest
FMGCInternal.phase = 2;
} elsif (FMGCInternal.phase == 6) {
if (alt >= accel_agl_ft) { # todo when insert altn or new dest
newphase = 2;
}
}
if (getprop("/systems/navigation/adr/computation/overspeed-vfe-spd") != 1024) {
FMGCInternal.maxspeed = getprop("/systems/navigation/adr/computation/overspeed-vfe-spd") - 4;
if (flightPlanController.num[2].getValue() > 0 and getprop("/FMGC/flightplan[2]/active") == 1 and
flightPlanController.arrivalDist <= 15 and (modelat == "NAV" or modelat == "LOC" or modelat == "LOC*") and pts.Position.gearAglFt.getValue() < 9500) { #todo decel pseudo waypoint
setprop("/FMGC/internal/decel", 1);
} elsif (getprop("/FMGC/internal/decel") == 1 and (FMGCInternal.phase == 0 or FMGCInternal.phase == 6)) {
setprop("/FMGC/internal/decel", 0);
}
tempOverspeed = systems.ADIRS.overspeedVFE.getValue();
if (tempOverspeed != 1024) {
FMGCInternal.maxspeed = tempOverspeed - 4;
} elsif (pts.Gear.position[0].getValue() != 0 or pts.Gear.position[1].getValue() != 0 or pts.Gear.position[2].getValue() != 0) {
FMGCInternal.maxspeed = 284;
} else {
FMGCInternal.maxspeed = fmgc.FMGCInternal.vmo_mmo;
}
if (newphase != FMGCInternal.phase) { # phase changed
FMGCInternal.phase = newphase;
FMGCNodes.phase.setValue(newphase);
}
############################
# fuel
############################
@ -763,7 +787,7 @@ var masterFMGC = maketimer(0.2, func {
if (!fmgc.FMGCInternal.vappSpeedSet) {
if (FMGCInternal.destWind < 5) {
FMGCInternal.vapp = FMGCInternal.vls + 5;
} else if (FMGCInternal.destWind > 15) {
} elsif (FMGCInternal.destWind > 15) {
FMGCInternal.vapp = FMGCInternal.vls + 15;
} else {
FMGCInternal.vapp = FMGCInternal.vls + FMGCInternal.destWind;
@ -827,7 +851,7 @@ var masterFMGC = maketimer(0.2, func {
if (!fmgc.FMGCInternal.vappSpeedSet) {
if (FMGCInternal.destWind < 5) {
FMGCInternal.vapp_appr = FMGCInternal.vls_appr + 5;
} else if (FMGCInternal.destWind > 15) {
} elsif (FMGCInternal.destWind > 15) {
FMGCInternal.vapp_appr = FMGCInternal.vls_appr + 15;
} else {
FMGCInternal.vapp_appr = FMGCInternal.vls_appr + FMGCInternal.destWind;
@ -863,7 +887,7 @@ var masterFMGC = maketimer(0.2, func {
} else {
FMGCInternal.vls_min = FMGCInternal.vs1g_clean * 1.23;
}
} else if (flap == 1) { # 1
} elsif (flap == 1) { # 1
FMGCInternal.vsw = FMGCInternal.vs1g_conf_2;
FMGCInternal.minspeed = FMGCInternal.slat;
@ -872,7 +896,7 @@ var masterFMGC = maketimer(0.2, func {
} else {
FMGCInternal.vls_min = FMGCInternal.vs1g_conf_1 * 1.23;
}
} else if (flap == 2) { # 1+F
} elsif (flap == 2) { # 1+F
FMGCInternal.vsw = FMGCInternal.vs1g_conf_1f;
FMGCInternal.minspeed = FMGCInternal.slat;
@ -881,7 +905,7 @@ var masterFMGC = maketimer(0.2, func {
} else {
FMGCInternal.vls_min = FMGCInternal.vs1g_conf_1f * 1.23;
}
} else if (flap == 3) { # 2
} elsif (flap == 3) { # 2
FMGCInternal.vsw = FMGCInternal.vs1g_conf_2;
FMGCInternal.minspeed = FMGCInternal.flap2;
@ -890,7 +914,7 @@ var masterFMGC = maketimer(0.2, func {
} else {
FMGCInternal.vls_min = FMGCInternal.vs1g_conf_2 * 1.23;
}
} else if (flap == 4) { # 3
} elsif (flap == 4) { # 3
FMGCInternal.vsw = FMGCInternal.vs1g_conf_3;
FMGCInternal.minspeed = FMGCInternal.flap3;
@ -899,7 +923,7 @@ var masterFMGC = maketimer(0.2, func {
} else {
FMGCInternal.vls_min = FMGCInternal.vs1g_conf_3 * 1.23;
}
} else if (flap == 5) { # FULL
} elsif (flap == 5) { # FULL
FMGCInternal.vsw = FMGCInternal.vs1g_conf_full;
if (FMGCInternal.vappSpeedSet) {
FMGCInternal.minspeed = FMGCInternal.vapp_appr;
@ -914,7 +938,7 @@ var masterFMGC = maketimer(0.2, func {
}
}
if (gear0 and pts.Controls.Flight.flapsPos.getValue() < 5 and (state1 == "MCT" or state1 == "MAN THR" or state1 == "TOGA") and (state2 == "MCT" or state2 == "MAN THR" or state2 == "TOGA")) {
if (gear0 and flap < 5 and (state1 == "MCT" or state1 == "MAN THR" or state1 == "TOGA") and (state2 == "MCT" or state2 == "MAN THR" or state2 == "TOGA")) {
if (!FMGCInternal.takeoffState) {
fmgc.FMGCNodes.toState.setValue(1);
}
@ -926,45 +950,56 @@ var masterFMGC = maketimer(0.2, func {
FMGCInternal.takeoffState = 0;
}
############################
#handle radios, runways, v1/vr/v2
############################
});
############################
#handle radios, runways, v1/vr/v2
############################
var airportRadiosPhase = nil;
var updateAirportRadios = func {
airportRadiosPhase = FMGCInternal.phase;
departure_rwy = fmgc.flightPlanController.flightplans[2].departure_runway;
destination_rwy = fmgc.flightPlanController.flightplans[2].destination_runway;
if (destination_rwy != nil and FMGCInternal.phase >= 2) {
if (airportRadiosPhase >= 2 and destination_rwy != nil) {
var airport = airportinfo(FMGCInternal.arrApt);
setprop("/FMGC/internal/ldg-elev", airport.elevation * M2FT); # eventually should be runway elevation
magnetic_hdg = geo.normdeg(destination_rwy.heading - getprop("/environment/magnetic-variation-deg"));
runway_ils = destination_rwy.ils_frequency_mhz;
if (runway_ils != nil and !getprop("/FMGC/internal/ils1freq-set") and !getprop("/FMGC/internal/ils1crs-set")) {
setprop("/FMGC/internal/ils1freq-calculated", runway_ils);
setprop("instrumentation/nav[0]/frequencies/selected-mhz", runway_ils);
setprop("instrumentation/nav[0]/radials/selected-deg", magnetic_hdg);
} else if (runway_ils != nil and !getprop("/FMGC/internal/ils1freq-set")) {
setprop("/instrumentation/nav[0]/frequencies/selected-mhz", runway_ils);
setprop("/instrumentation/nav[0]/radials/selected-deg", magnetic_hdg);
} elsif (runway_ils != nil and !getprop("/FMGC/internal/ils1freq-set")) {
setprop("/FMGC/internal/ils1freq-calculated", runway_ils);
setprop("instrumentation/nav[0]/frequencies/selected-mhz", runway_ils);
} else if (!getprop("/FMGC/internal/ils1crs-set")) {
setprop("instrumentation/nav[0]/radials/selected-deg", magnetic_hdg);
setprop("/instrumentation/nav[0]/frequencies/selected-mhz", runway_ils);
} elsif (!getprop("/FMGC/internal/ils1crs-set")) {
setprop("/instrumentation/nav[0]/radials/selected-deg", magnetic_hdg);
}
} else if (departure_rwy != nil and FMGCInternal.phase <= 1) {
} elsif (airportRadiosPhase <= 1 and departure_rwy != nil) {
magnetic_hdg = geo.normdeg(departure_rwy.heading - getprop("/environment/magnetic-variation-deg"));
runway_ils = departure_rwy.ils_frequency_mhz;
if (runway_ils != nil and !getprop("/FMGC/internal/ils1freq-set") and !getprop("/FMGC/internal/ils1crs-set")) {
setprop("/FMGC/internal/ils1freq-calculated", runway_ils);
setprop("instrumentation/nav[0]/frequencies/selected-mhz", runway_ils);
setprop("instrumentation/nav[0]/radials/selected-deg", magnetic_hdg);
} else if (runway_ils != nil and !getprop("/FMGC/internal/ils1freq-set")) {
setprop("/instrumentation/nav[0]/frequencies/selected-mhz", runway_ils);
setprop("/instrumentation/nav[0]/radials/selected-deg", magnetic_hdg);
} elsif (runway_ils != nil and !getprop("/FMGC/internal/ils1freq-set")) {
setprop("/FMGC/internal/ils1freq-calculated", runway_ils);
setprop("instrumentation/nav[0]/frequencies/selected-mhz", runway_ils);
} else if (!getprop("/FMGC/internal/ils1crs-set")) {
setprop("instrumentation/nav[0]/radials/selected-deg", magnetic_hdg);
setprop("/instrumentation/nav[0]/frequencies/selected-mhz", runway_ils);
} elsif (!getprop("/FMGC/internal/ils1crs-set")) {
setprop("/instrumentation/nav[0]/radials/selected-deg", magnetic_hdg);
}
}
});
};
setlistener(FMGCNodes.phase, updateAirportRadios,0,0);
setlistener(flightPlanController.changed, updateAirportRadios,0,0);
var reset_FMGC = func {
FMGCInternal.phase = 0;
FMGCNodes.phase.setValue(0);
fd1 = Input.fd1.getValue();
fd2 = Input.fd2.getValue();
spd = Input.kts.getValue();
@ -978,6 +1013,7 @@ var reset_FMGC = func {
windController.init();
mcdu.MCDU_reset(0);
mcdu.MCDU_reset(1);
Simbrief.SimbriefParser.inhibit = 0;
mcdu.ReceivedMessagesDatabase.clearDatabase();
mcdu.FlightLogDatabase.reset(); # track reset events without loosing recorded data
@ -1042,59 +1078,59 @@ var ManagedSPD = maketimer(0.25, func {
if (FMGCInternal.mngSpdCmd != srsSPD) {
FMGCInternal.mngSpdCmd = srsSPD;
}
} else if ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude <= 10050) {
} elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude <= 10050) {
if (FMGCInternal.mngKtsMach) {
FMGCInternal.mngKtsMach = 0;
}
if (FMGCInternal.mngSpdCmd != 250 and !decel) {
FMGCInternal.mngSpdCmd = 250;
} else if (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) {
} elsif (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) {
FMGCInternal.mngSpdCmd = FMGCInternal.minspeed;
}
} else if ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and !FMGCInternal.machSwitchover) {
} elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and !FMGCInternal.machSwitchover) {
if (FMGCInternal.mngKtsMach) {
FMGCInternal.mngKtsMach = 0;
}
if (FMGCInternal.mngSpdCmd != mng_alt_spd) {
FMGCInternal.mngSpdCmd = mng_alt_spd;
}
} else if ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and FMGCInternal.machSwitchover) {
} elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and FMGCInternal.machSwitchover) {
if (!FMGCInternal.mngKtsMach) {
FMGCInternal.mngKtsMach = 1;
}
if (FMGCInternal.mngSpdCmd != mng_alt_mach) {
FMGCInternal.mngSpdCmd = mng_alt_mach;
}
} else if (FMGCInternal.phase == 4 and altitude > 11000 and !FMGCInternal.machSwitchover) {
} elsif (FMGCInternal.phase == 4 and altitude > 11000 and !FMGCInternal.machSwitchover) {
if (FMGCInternal.mngKtsMach) {
FMGCInternal.mngKtsMach = 0;
}
if (FMGCInternal.mngSpdCmd != mng_alt_spd) {
FMGCInternal.mngSpdCmd = mng_alt_spd;
}
} else if (FMGCInternal.phase == 4 and altitude > 11000 and FMGCInternal.machSwitchover) {
} elsif (FMGCInternal.phase == 4 and altitude > 11000 and FMGCInternal.machSwitchover) {
if (!FMGCInternal.mngKtsMach) {
FMGCInternal.mngKtsMach = 1;
}
if (FMGCInternal.mngSpdCmd != mng_alt_mach) {
FMGCInternal.mngSpdCmd = mng_alt_mach;
}
} else if ((FMGCInternal.phase == 4 or FMGCInternal.phase == 5 or FMGCInternal.phase == 6) and altitude > 11000 and !FMGCInternal.machSwitchover) {
} elsif ((FMGCInternal.phase == 4 or FMGCInternal.phase == 5 or FMGCInternal.phase == 6) and altitude > 11000 and !FMGCInternal.machSwitchover) {
if (FMGCInternal.mngKtsMach) {
FMGCInternal.mngKtsMach = 0;
}
if (FMGCInternal.mngSpdCmd != mng_alt_spd and !decel) {
FMGCInternal.mngSpdCmd = mng_alt_spd;
} else if (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) {
} elsif (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) {
FMGCInternal.mngSpdCmd = FMGCInternal.minspeed;
}
} else if ((FMGCInternal.phase == 4 or FMGCInternal.phase == 5 or FMGCInternal.phase == 6) and altitude <= 10980) {
} elsif ((FMGCInternal.phase == 4 or FMGCInternal.phase == 5 or FMGCInternal.phase == 6) and altitude <= 10980) {
if (FMGCInternal.mngKtsMach) {
FMGCInternal.mngKtsMach = 0;
}
if (FMGCInternal.mngSpdCmd != 250 and !decel) {
FMGCInternal.mngSpdCmd = 250;
} else if (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) {
} elsif (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) {
FMGCInternal.mngSpdCmd = FMGCInternal.minspeed;
}
}
@ -1107,13 +1143,13 @@ var ManagedSPD = maketimer(0.25, func {
if (ktsmach and !FMGCInternal.mngKtsMach) {
Input.ktsMach.setValue(0);
} else if (!ktsmach and FMGCInternal.mngKtsMach) {
} elsif (!ktsmach and FMGCInternal.mngKtsMach) {
Input.ktsMach.setValue(1);
}
if (kts_sel != FMGCInternal.mngSpd and !ktsmach) {
Input.kts.setValue(FMGCInternal.mngSpd);
} else if (mach_sel != FMGCInternal.mngSpd and ktsmach) {
} elsif (mach_sel != FMGCInternal.mngSpd and ktsmach) {
Input.mach.setValue(FMGCInternal.mngSpd);
}
} else {
@ -1155,9 +1191,9 @@ setlistener("/systems/navigation/adr/operating-1", func() {
timer48gpsAlign1.stop();
}
if (getprop("/FMGC/internal/align1-time") == -99) {
if (FMGCAlignTime[0].getValue() == -99) {
timer48gpsAlign1.start();
setprop("/FMGC/internal/align1-time", pts.Sim.Time.elapsedSec.getValue());
FMGCAlignTime[0].setValue(pts.Sim.Time.elapsedSec.getValue());
}
}, 0, 0);
@ -1167,9 +1203,9 @@ setlistener("/systems/navigation/adr/operating-2", func() {
timer48gpsAlign2.stop();
}
if (getprop("/FMGC/internal/align2-time") == -99) {
if (FMGCAlignTime[1].getValue() == -99) {
timer48gpsAlign2.start();
setprop("/FMGC/internal/align2-time", pts.Sim.Time.elapsedSec.getValue());
FMGCAlignTime[1].setValue(pts.Sim.Time.elapsedSec.getValue());
}
}, 0, 0);
@ -1179,9 +1215,9 @@ setlistener("/systems/navigation/adr/operating-3", func() {
timer48gpsAlign3.stop();
}
if (getprop("/FMGC/internal/align3-time") == -99) {
if (FMGCAlignTime[2].getValue() == -99) {
timer48gpsAlign3.start();
setprop("/FMGC/internal/align3-time", pts.Sim.Time.elapsedSec.getValue());
FMGCAlignTime[2].setValue(pts.Sim.Time.elapsedSec.getValue());
}
}, 0, 0);
@ -1228,25 +1264,25 @@ var timer30secLanding = maketimer(1, func() {
});
var timer48gpsAlign1 = maketimer(1, func() {
if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/align1-time") + 48 or getprop("/systems/acconfig/options/adirs-skip")) {
setprop("/FMGC/internal/align1-done", 1);
setprop("/FMGC/internal/align1-time", -99);
if (pts.Sim.Time.elapsedSec.getValue() > (FMGCAlignTime[0].getValue() + 48) or adirsSkip.getValue()) {
FMGCAlignDone[0].setValue(1);
FMGCAlignTime[0].setValue(-99);
timer48gpsAlign1.stop();
}
});
var timer48gpsAlign2 = maketimer(1, func() {
if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/align2-time") + 48 or getprop("/systems/acconfig/options/adirs-skip")) {
setprop("/FMGC/internal/align2-done", 1);
setprop("/FMGC/internal/align2-time", -99);
if (pts.Sim.Time.elapsedSec.getValue() > (FMGCAlignTime[1].getValue() + 48) or adirsSkip.getValue()) {
FMGCAlignDone[1].setValue(1);
FMGCAlignTime[1].setValue(-99);
timer48gpsAlign2.stop();
}
});
var timer48gpsAlign3 = maketimer(1, func() {
if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/align3-time") + 48 or getprop("/systems/acconfig/options/adirs-skip")) {
setprop("/FMGC/internal/align3-done", 1);
setprop("/FMGC/internal/align3-time", -99);
if (pts.Sim.Time.elapsedSec.getValue() > (FMGCAlignTime[2].getValue() + 48) or adirsSkip.getValue()) {
FMGCAlignDone[2].setValue(1);
FMGCAlignTime[2].setValue(-99);
timer48gpsAlign3.stop();
}
});

View file

@ -13,11 +13,11 @@ var SimbriefParser = {
fetch: func(username, i) {
me.inhibit = 1;
var stamp = systime();
http.save("https://www.simbrief.com/api/xml.fetcher.php?username=" ~ username, getprop('/sim/fg-home') ~ "/Export/A320-family-simbrief.xml")
http.save("https://www.simbrief.com/api/xml.fetcher.php?username=" ~ username, pts.Sim.fgHome.getValue() ~ "/Export/A320-family-simbrief.xml")
.fail(func { me.failure(i) })
.done(func {
var errs = [];
call(me.read, [(getprop('/sim/fg-home') ~ "/Export/A320-family-simbrief.xml"),i], SimbriefParser, {}, errs);
call(me.read, [(pts.Sim.fgHome.getValue() ~ "/Export/A320-family-simbrief.xml"),i], SimbriefParser, {}, errs);
if (size(errs) > 0) {
debug.printerror(errs);
me.failure(i);

View file

@ -160,7 +160,7 @@ var WaypointDatabase = {
},
# write - write to file, as a hash structure
write: func() {
var path = getprop("/sim/fg-home") ~ "/Export/A320SavedWaypoints.xml";
var path = pts.Sim.fgHome.getValue() ~ "/Export/A320SavedWaypoints.xml";
var tree = {
waypoints: {
@ -177,7 +177,7 @@ var WaypointDatabase = {
},
# read - read from a file, extract using props interface
read: func() {
var path = getprop("/sim/fg-home") ~ "/Export/A320SavedWaypoints.xml";
var path = pts.Sim.fgHome.getValue() ~ "/Export/A320SavedWaypoints.xml";
# create file if it doesn't exist
if (io.stat(path) == nil) {
me.write();

View file

@ -33,6 +33,8 @@ var flightPlanController = {
# These flags are only for the main flgiht-plan
active: props.globals.initNode("/FMGC/flightplan[2]/active", 0, "BOOL"),
changed: props.globals.initNode("/FMGC/flightplan[2]/changed", 0, "BOOL"),
currentToWpt: nil, # container for the current TO waypoint ghost
currentToWptIndex: props.globals.initNode("/FMGC/flightplan[2]/current-wp", 0, "INT"),
currentToWptIndexTemp: 0,
@ -765,6 +767,9 @@ var flightPlanController = {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
if (n == 2) flightPlanController.changed.setBoolValue(1);
canvas_nd.A3XXRouteDriver.triggerSignal("fp-added");
},

View file

@ -226,7 +226,7 @@ var windController = {
},
# read - read from hist wind file, create one if it doesn't exist
read: func() {
var path = getprop("/sim/fg-home") ~ "/Export/A320SavedWinds.txt";
var path = pts.Sim.fgHome.getValue() ~ "/Export/A320SavedWinds.txt";
# create file if it doesn't exist
if (io.stat(path) == nil) {
me.write();
@ -267,7 +267,7 @@ var windController = {
# write - write to hist wind file, called whenever winds changed
write: func() {
if (me.des_winds[2] != 0) {
var path = getprop("/sim/fg-home") ~ "/Export/A320SavedWinds.txt";
var path = pts.Sim.fgHome.getValue() ~ "/Export/A320SavedWinds.txt";
var file = io.open(path, "wb");
var winds_added = 0;

View file

@ -24,7 +24,7 @@ var variousReset = func() {
setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override", 0);
setprop("/controls/switches/cabinCall", 0);
setprop("/controls/switches/mechCall", 0);
setprop("/controls/switches/emer-lights", 0.5);
libraries.emerLtsSwitch.setValue(0.5);
# cockpit voice recorder stuff
setprop("/controls/CVR/power", 0);
setprop("/controls/CVR/test", 0);
@ -62,9 +62,9 @@ var variousReset = func() {
setprop("/modes/fcu/hdg-time", -45);
setprop("/controls/navigation/switching/att-hdg", 0);
setprop("/controls/navigation/switching/air-data", 0);
setprop("/controls/switches/no-smoking-sign", 0.0);
setprop("/controls/switches/seatbelt-sign", 0);
setprop("/controls/switches/emer-lights", 0);
libraries.noSmokingSwitch.setValue(0.0);
libraries.seatbeltSwitch.setValue(0.0);
libraries.emerLtsSwitch.setValue(0.0);
}
var BUTTONS = {

View file

@ -88,7 +88,7 @@ var A320Libraries = nil;
var systemsInit = func() {
systemsInitialized = 0;
fbw.FBW.init();
effects.light_manager.init();
effects.lightManager.init();
systems.ELEC.init();
systems.PNEU.init();
systems.HYD.init();
@ -142,6 +142,9 @@ var groundspeed = 0;
var stateL = 0;
var stateR = 0;
var seatbeltSwitch = props.globals.getNode("/controls/switches/seatbelt-sign");
var noSmokingSwitch = props.globals.getNode("/controls/switches/no-smoking-sign");
var emerLtsSwitch = props.globals.getNode("/controls/switches/emer-lights");
var seatbeltLight = props.globals.getNode("/controls/lighting/seatbelt-sign");
var noSmokingLight = props.globals.getNode("/controls/lighting/no-smoking-sign");
@ -250,8 +253,8 @@ setlistener("/instrumentation/mk-viii/inputs/discretes/ta-tcf-inhibit", func{
# Replay
var replayState = props.globals.getNode("/sim/replay/replay-state");
setlistener("/sim/replay/replay-state", func() {
if (replayState.getBoolValue()) {
setlistener(replayState, func(v) {
if (v.getBoolValue()) {
} else {
acconfig.colddark();
gui.popupTip("Replay Ended: Setting Cold and Dark state...");
@ -392,6 +395,10 @@ var input = {
"seatbelt": "/controls/switches/seatbelt-sign",
"noSmoking": "/controls/switches/no-smoking-sign",
"gearPosNorm": "/gear/gear[0]/position-norm",
"gearPosNorm1": "/gear/gear[1]/position-norm",
"gearPosNorm2": "/gear/gear[2]/position-norm",
"engine1Running": "/engines/engine[0]/running",
"engine2Running": "/engines/engine[1]/running",
};
foreach (var name; keys(input)) {

View file

@ -4,6 +4,13 @@
# Anything that says Temp is set by another file to avoid multiple getValue calls
# Usage Example: pts.Class.SubClass.node.getValue()
var Autopilot = {
Settings: {
headingBugDeg: props.globals.getNode("/autopilot/settings/heading-bug-deg",1),
targetAltitudeFt: props.globals.getNode("/autopilot/settings/target-altitude-ft",1),
},
};
var Accelerations = {
pilotGDamped: props.globals.getNode("/accelerations/pilot-gdamped"),
};
@ -43,6 +50,7 @@ var Controls = {
aileron: props.globals.getNode("/controls/flight/aileron"),
aileronDrivesTiller: props.globals.getNode("/controls/flight/aileron-drives-tiller"),
autoCoordination: props.globals.getNode("/controls/flight/auto-coordination"),
elevator: props.globals.getNode("/controls/flight/elevator"),
elevatorTrim: props.globals.getNode("/controls/flight/elevator-trim"),
flaps: props.globals.getNode("/controls/flight/flaps"),
flapsTemp: 0,
@ -50,6 +58,7 @@ var Controls = {
flapsPos: props.globals.getNode("/controls/flight/flaps-pos"),
speedbrake: props.globals.getNode("/controls/flight/speedbrake"),
speedbrakeArm: props.globals.getNode("/controls/flight/speedbrake-arm"),
rudder: props.globals.getNode("/controls/flight/rudder"),
rudderTrim: props.globals.getNode("/controls/flight/rudder-trim"),
},
Gear: {
@ -58,6 +67,9 @@ var Controls = {
parkingBrake: props.globals.getNode("/controls/gear/brake-parking"),
chocks: props.globals.getNode("/services/chocks/enable"),
},
Lighting: {
landingLights: [props.globals.getNode("/controls/lighting/landing-lights[0]"),props.globals.getNode("/controls/lighting/landing-lights[1]"),props.globals.getNode("/controls/lighting/landing-lights[2]")],
},
Switches: {
annunTest: props.globals.getNode("/controls/switches/annun-test"),
},
@ -75,6 +87,7 @@ var Engines = {
n1Actual: [props.globals.getNode("/engines/engine[0]/n1-actual"), props.globals.getNode("/engines/engine[1]/n1-actual")],
n2Actual: [props.globals.getNode("/engines/engine[0]/n2-actual"), props.globals.getNode("/engines/engine[1]/n2-actual")],
oilPsi: [props.globals.getNode("/engines/engine[0]/oil-psi-actual"), props.globals.getNode("/engines/engine[1]/oil-psi-actual")],
oilQt: [props.globals.getNode("/engines/engine[0]/oil-qt-actual"), props.globals.getNode("/engines/engine[1]/oil-qt-actual")],
thrust: [props.globals.getNode("/engines/engine[0]/thrust-lb"), props.globals.getNode("/engines/engine[1]/thrust-lb")],
reverser: [props.globals.getNode("/engines/engine[0]/reverser-pos-norm"), props.globals.getNode("/engines/engine[1]/reverser-pos-norm")],
state: [props.globals.getNode("/engines/engine[0]/state"), props.globals.getNode("/engines/engine[1]/state")],
@ -192,6 +205,7 @@ var Instrumentation = {
locDeflection: props.globals.getNode("/instrumentation/nav[0]/heading-needle-deflection-norm"),
},
TCAS: {
servicable: props.globals.getNode("/instrumentation/tcas/serviceable"),
Inputs: {
mode: props.globals.getNode("/instrumentation/tcas/inputs/mode"),
},
@ -203,12 +217,14 @@ var Options = {
};
var Orientation = {
heading: props.globals.getNode("/orientation/heading-deg"),
pitch: props.globals.getNode("/orientation/pitch-deg"),
roll: props.globals.getNode("/orientation/roll-deg"),
yaw: props.globals.getNode("/orientation/yaw-deg"),
};
var Position = {
altitudeFt: props.globals.getNode("/position/altitude-ft"),
gearAglFt: props.globals.getNode("/position/gear-agl-ft"),
latitude: props.globals.getNode("/position/latitude-deg"),
longitude: props.globals.getNode("/position/longitude-deg"),
@ -216,6 +232,7 @@ var Position = {
var Sim = {
aero: props.globals.getNode("/sim/aero"),
aircraft: props.globals.getNode("/sim/aircraft"),
CurrentView: {
fieldOfView: props.globals.getNode("/sim/current-view/field-of-view", 1),
headingOffsetDeg: props.globals.getNode("/sim/current-view/heading-offset-deg", 1),
@ -231,11 +248,18 @@ var Sim = {
zOffsetMaxM: props.globals.getNode("/sim/current-view/z-offset-max-m", 1),
zOffsetMinM: props.globals.getNode("/sim/current-view/z-offset-min-m", 1),
},
fgHome: props.globals.getNode("/sim/fg-home"),
Input: {
Selected: {
engine: [props.globals.getNode("/sim/input/selected/engine[0]", 1),props.globals.getNode("/sim/input/selected/engine[1]", 1)],
}
},
Model: {
Lights: {
navLights: props.globals.getNode("/sim/model/lights/nav-lights"),
noseLights: props.globals.getNode("/sim/model/lights/nose-lights"),
},
},
Multiplay: {
online: props.globals.getNode("/sim/multiplay/online"),
},
@ -244,6 +268,9 @@ var Sim = {
Headshake: {
enabled: props.globals.getNode("/sim/rendering/headshake/enabled"),
},
Shaders: {
skydome: props.globals.getNode("/sim/rendering/shaders/skydome"),
},
},
replayState: props.globals.getNode("/sim/freeze/replay-state"),
Replay: {
@ -268,6 +295,14 @@ var Sim = {
};
var Systems = {
Navigation: {
ADR: {
Output: {
overspeed: props.globals.getNode("/systems/navigation/adr/output/overspeed"),
underspeed: props.globals.getNode("/systems/navigation/adr/output/underspeed"),
},
},
},
Thrust: {
engOut: props.globals.getNode("/systems/thrust/eng-out"),
state: [props.globals.getNode("/systems/thrust/state1"), props.globals.getNode("/systems/thrust/state2")],

View file

@ -2,8 +2,6 @@ var isNoStar = [0, 0, 0];
var isNoTransArr = [0, 0, 0];
var isNoVia = [0, 0, 0];
var version = nil;
var arrivalPage = {
title: [nil, nil, nil],
subtitle: [nil, nil],
@ -42,9 +40,11 @@ var arrivalPage = {
enableScrollApproach: 0,
enableScrollStars: 0,
enableScrollVias: 0,
enableScrollTrans: 0,
scrollApproach: 0,
scrollStars: 0,
scrollVias: 0,
scrollTrans: 0,
activePage: 0, # runways, stars, vias
oldPage: 0,
_approaches: nil,
@ -76,15 +76,12 @@ var arrivalPage = {
if (fmgc.flightPlanController.flightplans[2].approach != nil) {
me.selectedApproach = fmgc.flightPlanController.flightplans[2].approach;
version = pts.Sim.Version.getValue();
if (version == "2020.2.0" or version == "2020.2.1" or version == "2020.3.0") {
if (fmgc.flightPlanController.flightplans[2].approach_trans != nil) {
me.selectedVIA = fmgc.flightPlanController.flightplans[2].approach_trans;
} elsif (isNoVia[2] == 1) {
me.selectedVIA = "NO VIA";
}
}
}
if (fmgc.flightPlanController.flightplans[2].star != nil) {
me.selectedSTAR = fmgc.flightPlanController.flightplans[2].star;
@ -101,23 +98,17 @@ var arrivalPage = {
} else {
if (fmgc.flightPlanController.flightplans[me.computer].approach != nil) {
me.selectedApproach = fmgc.flightPlanController.flightplans[me.computer].approach;
version = pts.Sim.Version.getValue();
if (version == "2020.2.0" or version == "2020.2.1" or version == "2020.3.0") {
if (fmgc.flightPlanController.flightplans[me.computer].approach_trans != nil) {
me.selectedVIA = fmgc.flightPlanController.flightplans[me.computer].approach_trans;
} elsif (isNoVia[me.computer] == 1) {
me.selectedVIA = "NO VIA";
}
}
} elsif (fmgc.flightPlanController.flightplans[2].approach != nil) {
me.selectedApproach = fmgc.flightPlanController.flightplans[2].approach;
version = pts.Sim.Version.getValue();
if (version == "2020.2.0" or version == "2020.2.1" or version == "2020.3.0") {
if (fmgc.flightPlanController.flightplans[2].approach_trans != nil) {
me.selectedVIA = fmgc.flightPlanController.flightplans[2].approach_trans;
}
}
}
if (fmgc.flightPlanController.flightplans[me.computer].star != nil) {
me.selectedSTAR = fmgc.flightPlanController.flightplans[me.computer].star;
isNoStar[me.computer] = 0;
@ -237,9 +228,6 @@ var arrivalPage = {
},
updateActiveVIAs: func() {
version = pts.Sim.Version.getValue();
if (version != "2020.2.0" and version != "2020.2.1" and version != "2020.3.0") { return; }
if (me.selectedVIA == "NO VIA") {
if (!fmgc.flightPlanController.temporaryFlag[me.computer]) {
me.C1 = ["NONE", "VIA", "grn"];
@ -509,8 +497,6 @@ var arrivalPage = {
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
},
updateVIAs: func() {
version = pts.Sim.Version.getValue();
if (version != "2020.2.0" and version != "2020.2.1" and version != "2020.3.0") { return; }
if (me.selectedApproach == nil or me.activePage != 2) {
me.clearVias();
return;
@ -617,8 +603,8 @@ var arrivalPage = {
append(me.transitions, "NO TRANS");
if (size(me.transitions) >= 1) {
me.R3 = [me.transitions[0] ~ " ", "TRANS", "blu"];
if (me.transitions[0] != me.selectedTransition) {
me.R3 = [me.transitions[0 + me.scrollTrans] ~ " ", "TRANS", "blu"];
if (me.transitions[0 + me.scrollTrans] != me.selectedTransition) {
me.arrowsMatrix[1][2] = 1;
me.arrowsColour[1][2] = "blu";
} else {
@ -627,8 +613,8 @@ var arrivalPage = {
}
}
if (size(me.transitions) >= 2) {
me.R4 = [me.transitions[1] ~ " ", nil, "blu"];
if (me.transitions[1] != me.selectedTransition) {
me.R4 = [me.transitions[1 + me.scrollTrans] ~ " ", nil, "blu"];
if (me.transitions[1 + me.scrollTrans] != me.selectedTransition) {
me.arrowsMatrix[1][3] = 1;
me.arrowsColour[1][3] = "blu";
} else {
@ -637,8 +623,8 @@ var arrivalPage = {
}
}
if (size(me.transitions) >= 3) {
me.R5 = [me.transitions[2] ~ " ", nil, "blu"];
if (me.transitions[2] != me.selectedTransition) {
me.R5 = [me.transitions[2 + me.scrollTrans] ~ " ", nil, "blu"];
if (me.transitions[2 + me.scrollTrans] != me.selectedTransition) {
me.arrowsMatrix[1][4] = 1;
me.arrowsColour[1][4] = "blu";
} else {
@ -647,7 +633,9 @@ var arrivalPage = {
}
}
# no indication it is scrollable...
if (size(me.transitions) > 3) {
me.enableScrollTrans = 1;
}
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
},
makeTmpy: func() {
@ -683,6 +671,7 @@ var arrivalPage = {
me.updateApproaches();
}
} elsif (me.activePage == 1) {
if (me.selectedSTAR == nil) {
if (me.enableScrollStars) {
me.scrollStars += 1;
if (me.scrollStars > size(me.stars) - 3) {
@ -695,6 +684,15 @@ var arrivalPage = {
me.updateTransitions();
}
}
} else {
if (me.enableScrollTrans) {
me.scrollTrans += 1;
if (me.scrollTrans > size(me.transitions) - 4) {
me.scrollTrans = 0;
}
me.updateTransitions();
}
}
} elsif (me.activePage == 2) {
if (me.enableScrollVias) {
me.scrollVias += 1;
@ -716,6 +714,7 @@ var arrivalPage = {
me.updateApproaches();
}
} elsif (me.activePage == 1) {
if (me.selectedSTAR == nil) {
if (me.enableScrollStars) {
me.scrollStars -= 1;
if (me.scrollStars < 0) {
@ -728,6 +727,15 @@ var arrivalPage = {
me.updateTransitions();
}
}
} else {
if (me.enableScrollTrans) {
me.scrollTrans -= 1;
if (me.scrollTrans < 0) {
me.scrollTrans = size(me.transitions) - 4;
}
me.updateTransitions();
}
}
} elsif (me.activePage == 2) {
if (me.enableScrollVias) {
me.scrollVias -= 1;
@ -753,8 +761,6 @@ var arrivalPage = {
},
arrPushbuttonLeft: func(index) {
if (index == 2 and me.activePage == 1 and me.selectedApproach != nil) {
version = pts.Sim.Version.getValue();
if (version != "2020.2.0" and version != "2020.2.1" and version != "2020.3.0") { return; }
me.oldPage = me.activePage;
me.activePage = 2;
me.updatePage();
@ -773,6 +779,14 @@ var arrivalPage = {
if (size(me.approaches) >= (index - 2) and index != 2) { # index = 3, size = 1
if (!dirToFlag) {
me.selectedVIA = nil;
fmgc.flightPlanController.flightplans[me.computer].approach_trans = nil;
me.scrollVias = 0;
me.selectedSTAR = nil;
fmgc.flightPlanController.flightplans[me.computer].star = nil;
me.scrollStars = 0;
me.selectedTransition = nil;
fmgc.flightPlanController.flightplans[me.computer].star_trans = nil;
me.scrollTrans = 0;
isNoTransArr[me.computer] = 0;
isNoStar[me.computer] = 0;
me.makeTmpy();
@ -815,8 +829,11 @@ var arrivalPage = {
}
}
me.updateSTARs();
me.scrollTrans = 0;
if (me.selectedSTAR != "NO STAR") {
isNoTransArr[me.computer] = 0;
me.selectedTransition = nil;
fmgc.flightPlanController.flightplans[me.computer].star_trans = nil;
} else {
isNoTransArr[me.computer] = 1;
me.selectedTransition = "NO TRANS";
@ -857,7 +874,7 @@ var arrivalPage = {
arrPushbuttonRight: func(index) {
if (size(me.transitions) >= (index - 2)) {
if (!dirToFlag) {
me.selectedTransition = me.transitions[index - 3];
me.selectedTransition = me.transitions[index - 3 + me.scrollTrans];
me.makeTmpy();
if (me.selectedTransition != "NO TRANS") {
isNoTransArr[me.computer] = 0;

View file

@ -33,8 +33,10 @@ var departurePage = {
computer: nil,
enableScrollRwy: 0,
enableScrollSids: 0,
enableScrollTrans: 0,
scrollRwy: 0,
scrollSids: 0,
scrollTrans: 0,
activePage: 0, # runways, sids, trans
_runways: nil,
_sids: nil,
@ -399,13 +401,12 @@ var departurePage = {
} else {
me._transitions = me.depAirport[0].getSid(me.selectedSID).transitions;
}
me._transitions = me.depAirport[0].getSid(me.selectedSID).transitions;
me.transitions = sort(me._transitions,func(a,b) cmp(a,b));
append(me.transitions, "NO TRANS");
if (size(me.transitions) >= 1) {
me.R2 = [me.transitions[0] ~ " ", "TRANS", "blu"];
if (me.transitions[0] != me.selectedTransition) {
me.R2 = [me.transitions[0 + me.scrollTrans] ~ " ", "TRANS", "blu"];
if (me.transitions[0 + me.scrollTrans] != me.selectedTransition) {
me.arrowsMatrix[1][1] = 1;
me.arrowsColour[1][1] = "blu";
} else {
@ -414,8 +415,8 @@ var departurePage = {
}
}
if (size(me.transitions) >= 2) {
me.R3 = [me.transitions[1] ~ " ", nil, "blu"];
if (me.transitions[1] != me.selectedTransition) {
me.R3 = [me.transitions[1 + me.scrollTrans] ~ " ", nil, "blu"];
if (me.transitions[1 + me.scrollTrans] != me.selectedTransition) {
me.arrowsMatrix[1][2] = 1;
me.arrowsColour[1][2] = "blu";
} else {
@ -424,8 +425,8 @@ var departurePage = {
}
}
if (size(me.transitions) >= 3) {
me.R4 = [me.transitions[2] ~ " ", nil, "blu"];
if (me.transitions[2] != me.selectedTransition) {
me.R4 = [me.transitions[2 + me.scrollTrans] ~ " ", nil, "blu"];
if (me.transitions[2 + me.scrollTrans] != me.selectedTransition) {
me.arrowsMatrix[1][3] = 1;
me.arrowsColour[1][3] = "blu";
} else {
@ -434,8 +435,8 @@ var departurePage = {
}
}
if (size(me.transitions) >= 4) {
me.R5 = [me.transitions[3] ~ " ", nil, "blu"];
if (me.transitions[3] != me.selectedTransition) {
me.R5 = [me.transitions[3 + me.scrollTrans] ~ " ", nil, "blu"];
if (me.transitions[3 + me.scrollTrans] != me.selectedTransition) {
me.arrowsMatrix[1][4] = 1;
me.arrowsColour[1][4] = "blu";
} else {
@ -443,6 +444,10 @@ var departurePage = {
me.arrowsColour[1][4] = "ack";
}
}
if (size(me.transitions) > 4) {
me.enableScrollTrans = 1;
}
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
},
makeTmpy: func() {
@ -467,6 +472,7 @@ var departurePage = {
me.updateRunways();
}
} else {
if (me.selectedSID == nil) {
if (me.enableScrollSids) {
me.scrollSids += 1;
if (me.scrollSids > size(me.sids) - 4) {
@ -479,6 +485,15 @@ var departurePage = {
me.updateTransitions();
}
}
} else {
if (me.enableScrollTrans) {
me.scrollTrans += 1;
if (me.scrollTrans > size(me.transitions) - 4) {
me.scrollTrans = 0;
}
me.updateTransitions();
}
}
}
},
scrollDn: func() {
@ -491,6 +506,7 @@ var departurePage = {
me.updateRunways();
}
} else {
if (me.selectedSID == nil) {
if (me.enableScrollSids) {
me.scrollSids -= 1;
if (me.scrollSids < 0) {
@ -503,13 +519,30 @@ var departurePage = {
me.updateTransitions();
}
}
} else {
if (me.enableScrollTrans) {
me.scrollTrans -= 1;
if (me.scrollTrans < 0) {
me.scrollTrans = size(me.transitions) - 4;
}
me.updateTransitions();
}
}
}
},
scrollLeft: func() {
if (me.activePage == 0 and me.selectedRunway == nil) {
mcdu_message(me.computer, "NOT ALLOWED");
return;
}
me.activePage = !me.activePage;
me.updatePage();
},
scrollRight: func() {
if (me.activePage == 0 and me.selectedRunway == nil) {
mcdu_message(me.computer, "NOT ALLOWED");
return;
}
me.activePage = !me.activePage;
me.updatePage();
},
@ -518,6 +551,11 @@ var departurePage = {
if (size(me.runways) >= (index - 1)) {
if (!dirToFlag) {
me.selectedSID = nil;
fmgc.flightPlanController.flightplans[me.computer].sid = nil;
me.scrollSids = 0;
me.selectedTransition = nil;
fmgc.flightPlanController.flightplans[me.computer].sid_trans = nil;
me.scrollTrans = 0;
isNoSid[me.computer] = 0;
isNoTransDep[me.computer] = 0;
me.selectedRunway = me.depAirport[0].runway(me.runways[index - 2 + me.scrollRwy]);
@ -547,8 +585,11 @@ var departurePage = {
fmgc.flightPlanController.insertNOSID(me.computer);
}
me.updateSIDs();
me.scrollTrans = 0;
if (me.selectedSID != "NO SID") {
isNoTransDep[me.computer] = 0;
me.selectedTransition = nil;
fmgc.flightPlanController.flightplans[me.computer].sid_trans = nil;
} else {
isNoTransDep[me.computer] = 1;
me.selectedTransition = "NO TRANS";
@ -566,7 +607,7 @@ var departurePage = {
depPushbuttonRight: func(index) {
if (size(me.transitions) >= (index - 1)) {
if (!dirToFlag) {
me.selectedTransition = me.transitions[index - 2];
me.selectedTransition = me.transitions[index - 2 + me.scrollTrans];
me.makeTmpy();
if (me.selectedTransition != "NO TRANS") {
isNoTransDep[me.computer] = 0;

View file

@ -128,15 +128,17 @@ var doorR4_pos = props.globals.getNode("/sim/model/door-positions/doorr4/positio
# Detect OFF without IN
var lastgs0 = 0;
#var lastgear0 = 0;
var phase = 0;
var gs = 0;
var gear0 = 0;
var lastgsrestart = 0;
# Check for A/C state change - advice me for a better method, please :/
var waitingOOOIChange = maketimer(1, func(){ # 1sec precision
var phase = fmgc.FMGCInternal.phase;
var gs = pts.Velocities.groundspeed.getValue();
var gear0 = pts.Gear.wow[0].getBoolValue();
phase = fmgc.FMGCInternal.phase;
gs = pts.Velocities.groundspeed.getValue();
gear0 = pts.Gear.wow[0].getBoolValue();
#print(sprintf("OOOI check: %d %d %.2f %s",expectedOOOIState,phase,gs,gear0));
@ -183,14 +185,14 @@ var waitingOOOIChange = maketimer(1, func(){ # 1sec precision
expectedOOOIState = 1; # go on to OFF state
}
else if (gs > 9 and lastgsrestart == 0) { # try to detect OFF without IN
lastgsrestart = int(getprop("/sim/time/elapsed-sec"));
lastgsrestart = int(pts.Sim.Time.elapsedSec.getValue());
}
}
});
var engine_one_chk_OOOI = setlistener("/engines/engine[0]/state", func {
if (getprop("/engines/engine[0]/state") == 3) {
if (pts.Engines.Engine.state[0].getValue() == 3) {
removelistener(engine_one_chk_OOOI);
waitingOOOIChange.start();
}

View file

@ -138,10 +138,10 @@ var initInputA = func(key, i) {
} else if (find("/", scratchpad) != -1) {
var crztemp = split("/", scratchpad);
if (find("FL", crztemp[0]) != -1) {
var crz = int(substr(crztemp[0], 2));
var crz = substr(crztemp[0], 2);
var crzs = size(substr(crztemp[0], 2));
} else {
var crz = int(crztemp[0]);
var crz = crztemp[0];
var crzs = size(crztemp[0]);
}
var temp = int(crztemp[1]);
@ -160,17 +160,17 @@ var initInputA = func(key, i) {
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (crzs >= 1 and crzs <= 3 and crz != nil and temps >= 1 and temps <= 3 and temp != nil) {
} else if (find(".", crz) == -1 and crzs >= 1 and crzs <= 3 and crz != nil and temps >= 1 and temps <= 3 and temp != nil) {
if (crz > 0 and crz <= 390 and temp >= -99 and temp <= 99) {
fmgc.FMGCInternal.crzFt = crz * 100;
fmgc.FMGCInternal.crzFl = crz;
fmgc.FMGCInternal.crzFt = int(crz) * 100;
fmgc.FMGCInternal.crzFl = int(crz);
fmgc.altvert();
fmgc.updateRouteManagerAlt();
fmgc.FMGCInternal.crzSet = 1;
updateCrzLvlCallback();
fmgc.FMGCInternal.crzTemp = temp;
fmgc.FMGCInternal.crzTempSet = 1;
fmgc.FMGCInternal.crzProg = crz;
fmgc.FMGCInternal.crzProg = int(crz);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
@ -186,21 +186,21 @@ var initInputA = func(key, i) {
}
} else {
if (find("FL", scratchpad) != -1) {
var crz = int(substr(scratchpad, 2));
var crz = substr(scratchpad, 2);
var crzs = size(substr(scratchpad, 2));
} else {
var crz = int(scratchpad);
var crz = scratchpad;
var crzs = size(scratchpad);
}
if (crzs >= 1 and crzs <= 3 and crz != nil) {
if (find(".", crz) == -1 and crzs >= 1 and crzs <= 3 and crz != nil) {
if (crz > 0 and crz <= 390) {
fmgc.FMGCInternal.crzFt = crz * 100;
fmgc.FMGCInternal.crzFl = crz;
fmgc.FMGCInternal.crzFt = int(crz) * 100;
fmgc.FMGCInternal.crzFl = int(crz);
fmgc.altvert();
fmgc.updateRouteManagerAlt();
fmgc.FMGCInternal.crzSet = 1;
updateCrzLvlCallback();
fmgc.FMGCInternal.crzProg = crz;
fmgc.FMGCInternal.crzProg = int(crz);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
@ -279,7 +279,7 @@ var initInputA = func(key, i) {
}
}
} else if (key == "R2") {
if (pts.Engines.Engine.state[0].getValue() != 3 and pts.Engines.Engine.state[1].getValue() != 3) {
if (pts.Engines.Engine.state[0].getValue() != 3 and pts.Engines.Engine.state[1].getValue() != 3 and fmgc.FMGCInternal.toFromSet == 0) {
if (!ecam.vhf3_voice.active) {
if (atsu.ATSU.working) {
if (getprop("/FMGC/simbrief-username") == "") {

View file

@ -91,9 +91,9 @@ var MCDU_reset = func(i) {
setprop("/FMGC/internal/align-ref-long-sign", "");
setprop("/FMGC/internal/align-ref-lat-edit", 0);
setprop("/FMGC/internal/align-ref-long-edit", 0);
setprop("/FMGC/internal/align1-done", 0);
setprop("/FMGC/internal/align2-done", 0);
setprop("/FMGC/internal/align3-done", 0);
fmgc.FMGCAlignDone[0].setValue(0);
fmgc.FMGCAlignDone[1].setValue(0);
fmgc.FMGCAlignDone[2].setValue(0);
# ROUTE SELECTION
fmgc.FMGCInternal.altSelected = 0;

View file

@ -32,7 +32,7 @@ var init = func() {
}
var update_com1 = func() {
if (getprop("/systems/acconfig/options/fo-view") == 1) {
if (acconfig.foViewNode.getValue() == 1) {
if (vhf1_fo_recive.getValue()) {
com1_volume.setValue(vhf1_fo_volume.getValue());
} else {
@ -48,7 +48,7 @@ var update_com1 = func() {
}
var update_com2 = func() {
if (getprop("/systems/acconfig/options/fo-view") == 1) {
if (acconfig.foViewNode.getValue() == 1) {
if (vhf2_fo_recive.getValue()) {
com2_volume.setValue(vhf2_fo_volume.getValue());
} else {

View file

@ -141,10 +141,11 @@ var transponderPanel = {
code: "2000",
codeDisp: "2000",
codeProp: props.globals.initNode("/systems/atc/transponder-code", "2000", "STRING"),
failNode: props.globals.getNode("/systems/atc/failed"),
failLight: 0,
clearFlag: 0,
keypad: func(keyNum) {
if (props.globals.getNode("/controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("/systems/electrical/bus/dc-ess", 1).getValue() < 25) {
if (pts.Controls.Switches.annunTest.getBoolValue() or systems.ELEC.Bus.dcEss.getValue() < 25) {
return;
}
if (keyNum < 0 or keyNum > 7) {
@ -162,7 +163,7 @@ var transponderPanel = {
}
},
clearKey: func() {
if (props.globals.getNode("/controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("/systems/electrical/bus/dc-ess", 1).getValue() < 25) {
if (pts.Controls.Switches.annunTest.getBoolValue() or systems.ELEC.Bus.dcEss.getValue() < 25) {
return;
}
if (me.codeDisp != "") {
@ -214,7 +215,7 @@ var transponderPanel = {
return;
}
me.failLight = newFail;
props.globals.getNode("/systems/atc/failed").setBoolValue(me.failLight);
me.failNode.setBoolValue(me.failLight);
},
identSwitch: func() {
Transponders.vector[me.atcSel - 1].ident();
@ -255,27 +256,27 @@ var transponderPanel = {
updateADR1: func(val) {
if (Transponders.vector[me.atcSel - 1].activeADIRS == 1) {
if (val) {
setprop("/instrumentation/tcas/serviceable", 1);
pts.Instrumentation.TCAS.servicable.setValue(1);
} else {
setprop("/instrumentation/tcas/serviceable", 0);
pts.Instrumentation.TCAS.servicable.setValue(0);
}
}
},
updateADR2: func(val) {
if (Transponders.vector[me.atcSel - 1].activeADIRS == 2) {
if (val) {
setprop("/instrumentation/tcas/serviceable", 1);
pts.Instrumentation.TCAS.servicable.setValue(1);
} else {
setprop("/instrumentation/tcas/serviceable", 0);
pts.Instrumentation.TCAS.servicable.setValue(0);
}
}
},
updateADR3: func(val) {
if (Transponders.vector[me.atcSel - 1].activeADIRS == 3) {
if (val) {
setprop("/instrumentation/tcas/serviceable", 1);
pts.Instrumentation.TCAS.servicable.setValue(1);
} else {
setprop("/instrumentation/tcas/serviceable", 0);
pts.Instrumentation.TCAS.servicable.setValue(0);
}
}
},
@ -295,7 +296,6 @@ setlistener("/instrumentation/transponder/id-code", func {
var Transponders = std.Vector.new([Transponder.new("/systems/electrical/bus/ac-ess-shed", 1), Transponder.new("/systems/electrical/bus/ac-2", 2)]);
setlistener("/systems/navigation/adr/operating-1", func() {
transponderPanel.updateADR1(systems.ADIRS.Operating.adr[0].getValue());
}, 1, 0);

View file

@ -1,10 +1,12 @@
#
# Chrono - Clock - ET
#
var chr = aircraft.timer.new("instrumentation/chrono[0]/elapsetime-sec",1);
var clk = aircraft.timer.new("instrumentation/clock/elapsetime-sec",1);
var chrono_cpt = aircraft.timer.new("instrumentation/ndchrono[0]/elapsetime-sec",1);
var chrono_fo = aircraft.timer.new("instrumentation/ndchrono[1]/elapsetime-sec",1);
var chr = aircraft.timer.new("/instrumentation/chrono[0]/elapsetime-sec",1);
var clk = aircraft.timer.new("/instrumentation/clock/elapsetime-sec",1);
var chrono_cpt = aircraft.timer.new("/instrumentation/ndchrono[0]/elapsetime-sec",1);
var chrono_fo = aircraft.timer.new("/instrumentation/ndchrono[1]/elapsetime-sec",1);
var chrono_cpt_node = props.globals.getNode("/instrumentation/ndchrono[0]/elapsetime-sec");
var chrono_fo_node = props.globals.getNode("/instrumentation/ndchrono[1]/elapsetime-sec");
var chr_min = nil;
var chr_sec = nil;
@ -72,7 +74,7 @@ var rudderTrim = {
rudderTrimDisplayLetter: props.globals.initNode("/controls/flight/rudder-trim-letter-display", "", "STRING"),
};
setlistener("sim/signals/fdm-initialized", func {
setlistener("/sim/signals/fdm-initialized", func {
chr.stop();
chr.reset();
clk.stop();
@ -141,7 +143,7 @@ setlistener("/instrumentation/chrono[0]/chrono-reset", func(et){
}, 0, 0);
#Chrono
setlistener("instrumentation/efis[0]/inputs/CHRONO", func(et){
setlistener("/instrumentation/efis[0]/inputs/CHRONO", func(et){
chrono0 = et.getValue();
if (chrono0 == 1){
chrono_cpt.start();
@ -149,11 +151,11 @@ setlistener("instrumentation/efis[0]/inputs/CHRONO", func(et){
chrono_cpt.stop();
} elsif (chrono0 == 0) {
chrono_cpt.reset();
setprop("instrumentation/ndchrono[0]/elapsetime-sec", 0);
chrono_cpt_node.setValue(0);
}
}, 0, 0);
setlistener("instrumentation/efis[1]/inputs/CHRONO", func(et){
setlistener("/instrumentation/efis[1]/inputs/CHRONO", func(et){
chrono1 = et.getValue();
if (chrono1 == 1){
chrono_fo.start();
@ -161,11 +163,11 @@ setlistener("instrumentation/efis[1]/inputs/CHRONO", func(et){
chrono_fo.stop();
} elsif (chrono1 == 0) {
chrono_fo.reset();
setprop("instrumentation/ndchrono[1]/elapsetime-sec", 0);
chrono_fo_node.setValue(0);
}
}, 0, 0);
setlistener("instrumentation/clock/et-selector", func(et){
setlistener("/instrumentation/clock/et-selector", func(et){
tmp1 = et.getValue();
if (tmp1 == 2){
clk.reset();
@ -272,37 +274,39 @@ var start_loop = maketimer(0.1, func {
}
#Cpt Chrono
chr0_tmp = getprop("instrumentation/ndchrono[0]/elapsetime-sec");
chr0_tmp = chrono_cpt_node.getValue();
if (chr0_tmp >= 360000) {
setprop("instrumentation/ndchrono[0]/elapsetime-sec", getprop("instrumentation/ndchrono[0]/elapsetime-sec") - 360000);
};
chrono_cpt_node.setValue(chrono_cpt_node.getValue() - 360000);
}
chr0_hh = int(chr0_tmp * 0.000277777777778);
chr0_min = int((chr0_tmp * 0.0166666666667) - (chr0_hh * 60));
chr0_sec = int(chr0_tmp - (chr0_min * 60) - (chr0_hh * 3600));
setprop("instrumentation/ndchrono[0]/etHh_cpt", chr0_hh);
setprop("instrumentation/ndchrono[0]/etMin_cpt", chr0_min);
setprop("instrumentation/ndchrono[0]/etSec_cpt", chr0_sec);
cpt_chrono.etHh_cpt.setValue(chr0_hh);
cpt_chrono.etMin_cpt.setValue(chr0_min);
cpt_chrono.etSec_cpt.setValue(chr0_sec);
if (chr0_tmp >= 3600) {
setprop("instrumentation/ndchrono[0]/text", sprintf("%02d H %02d'", chr0_hh, chr0_min));
cpt_chrono.text.setValue(sprintf("%02d H %02d'", chr0_hh, chr0_min));
} else {
setprop("instrumentation/ndchrono[0]/text", sprintf("%02d' %02d''", chr0_min, chr0_sec));
cpt_chrono.text.setValue(sprintf("%02d' %02d''", chr0_min, chr0_sec));
}
#Fo Chrono
chr1_tmp = getprop("instrumentation/ndchrono[1]/elapsetime-sec");
chr1_tmp = chrono_fo_node.getValue();
if (chr1_tmp >= 360000) {
setprop("instrumentation/ndchrono[1]/elapsetime-sec", getprop("instrumentation/ndchrono[1]/elapsetime-sec") - 360000);
};
chrono_fo_node.setValue(chrono_fo_node.getValue() - 360000);
}
chr1_hh = int(chr1_tmp * 0.000277777777778);
chr1_min = int(chr1_tmp * 0.0166666666667);
chr1_sec = int(chr1_tmp - (chr1_min * 60) - (chr1_hh * 3600));
setprop("instrumentation/ndchrono[1]/etHh_fo", chr1_hh);
setprop("instrumentation/ndchrono[1]/etMin_fo", chr1_min);
setprop("instrumentation/ndchrono[1]/etSec_fo", chr1_sec);
fo_chrono.etHh_fo.setValue(chr1_hh);
fo_chrono.etMin_fo.setValue(chr1_min);
fo_chrono.etSec_fo.setValue(chr1_sec);
if (chr1_tmp >= 3600) {
setprop("instrumentation/ndchrono[1]/text", sprintf("%02d H %02d'", chr1_hh, chr1_min));
fo_chrono.text.setValue(sprintf("%02d H %02d'", chr1_hh, chr1_min));
} else {
setprop("instrumentation/ndchrono[1]/text", sprintf("%02d' %02d''", chr1_min, chr1_sec));
fo_chrono.text.setValue(sprintf("%02d' %02d''", chr1_min, chr1_sec));
}
});

View file

@ -4,7 +4,7 @@
var mode = "NAV";
var rng = 20;
setlistener("sim/signals/fdm-initialized", func { # Fix completely retarded shit on the ND
setlistener("/sim/signals/fdm-initialized", func { # Fix completely retarded shit on the ND
pts.Instrumentation.Efis.Mfd.pnlModeNum[0].setValue(2);
pts.Instrumentation.Efis.Mfd.pnlModeNum[1].setValue(2);
pts.Instrumentation.Efis.Nd.displayMode[0].setValue("NAV");

View file

@ -27,23 +27,23 @@ var chan_rmp1_v = "vhr1";
var chan_rmp2_v = "vhr2";
var chan_rmp3_v = "vhr3";
var act_vhf1 = props.globals.getNode("instrumentation/comm[0]/frequencies/selected-mhz");
var act_vhf2 = props.globals.getNode("instrumentation/comm[1]/frequencies/selected-mhz");
var act_vhf3 = props.globals.getNode("instrumentation/comm[2]/frequencies/selected-mhz");
var act_vhf1 = props.globals.getNode("/instrumentation/comm[0]/frequencies/selected-mhz");
var act_vhf2 = props.globals.getNode("/instrumentation/comm[1]/frequencies/selected-mhz");
var act_vhf3 = props.globals.getNode("/instrumentation/comm[2]/frequencies/selected-mhz");
var act_ls1 = props.globals.getNode("instrumentation/nav[0]/frequencies/selected-mhz");
var act_vor1 = props.globals.getNode("instrumentation/nav[2]/frequencies/selected-mhz");
var act_vor2 = props.globals.getNode("instrumentation/nav[3]/frequencies/selected-mhz");
var act_adf1 = props.globals.getNode("instrumentation/adf[0]/frequencies/selected-khz");
var act_adf2 = props.globals.getNode("instrumentation/adf[1]/frequencies/selected-khz");
var stby_ls1 = props.globals.getNode("instrumentation/nav[0]/frequencies/standby-mhz");
var stby_vor1 = props.globals.getNode("instrumentation/nav[2]/frequencies/standby-mhz");
var stby_vor2 = props.globals.getNode("instrumentation/nav[3]/frequencies/standby-mhz");
var stby_adf1 = props.globals.getNode("instrumentation/adf[0]/frequencies/standby-khz");
var stby_adf2 = props.globals.getNode("instrumentation/adf[1]/frequencies/standby-khz");
var act_ls1_crs = props.globals.getNode("instrumentation/nav[0]/radials/selected-deg");
var act_vor1_crs = props.globals.getNode("instrumentation/nav[2]/radials/selected-deg");
var act_vor2_crs = props.globals.getNode("instrumentation/nav[3]/radials/selected-deg");
var act_ls1 = props.globals.getNode("/instrumentation/nav[0]/frequencies/selected-mhz");
var act_vor1 = props.globals.getNode("/instrumentation/nav[2]/frequencies/selected-mhz");
var act_vor2 = props.globals.getNode("/instrumentation/nav[3]/frequencies/selected-mhz");
var act_adf1 = props.globals.getNode("/instrumentation/adf[0]/frequencies/selected-khz");
var act_adf2 = props.globals.getNode("/instrumentation/adf[1]/frequencies/selected-khz");
var stby_ls1 = props.globals.getNode("/instrumentation/nav[0]/frequencies/standby-mhz");
var stby_vor1 = props.globals.getNode("/instrumentation/nav[2]/frequencies/standby-mhz");
var stby_vor2 = props.globals.getNode("/instrumentation/nav[3]/frequencies/standby-mhz");
var stby_adf1 = props.globals.getNode("/instrumentation/adf[0]/frequencies/standby-khz");
var stby_adf2 = props.globals.getNode("/instrumentation/adf[1]/frequencies/standby-khz");
var act_ls1_crs = props.globals.getNode("/instrumentation/nav[0]/radials/selected-deg");
var act_vor1_crs = props.globals.getNode("/instrumentation/nav[2]/radials/selected-deg");
var act_vor2_crs = props.globals.getNode("/instrumentation/nav[3]/radials/selected-deg");
if (rand() > 0.5) {
var hf1 = genFourRand();
@ -149,13 +149,19 @@ var rmpUpdate = func() {
}
}
var act = nil;
var data_mode = nil;
var sel1 = nil;
var sel2 = nil;
var sel3 = nil;
var update_active_vhf = func(vhf) {
var sel1 = chan_rmp1.getValue();
var sel2 = chan_rmp2.getValue();
var sel3 = chan_rmp3.getValue();
sel1 = chan_rmp1.getValue();
sel2 = chan_rmp2.getValue();
sel3 = chan_rmp3.getValue();
if (vhf == 1) {
var act = sprintf("%3.3f", act_vhf1.getValue());
act = sprintf("%3.3f", act_vhf1.getValue());
if (sel1 == "vhf1") {
act_display_rmp1.setValue(act);
@ -167,7 +173,7 @@ var update_active_vhf = func(vhf) {
act_display_rmp3.setValue(act);
}
} else if (vhf == 2) {
var act = sprintf("%3.3f", act_vhf2.getValue());
act = sprintf("%3.3f", act_vhf2.getValue());
if (sel1 == "vhf2") {
act_display_rmp1.setValue(act);
@ -179,8 +185,8 @@ var update_active_vhf = func(vhf) {
act_display_rmp3.setValue(act);
}
} else if (vhf == 3) {
var act = sprintf("%3.3f", act_vhf3.getValue());
var data_mode = vhf3_data_mode.getValue();
act = sprintf("%3.3f", act_vhf3.getValue());
data_mode = vhf3_data_mode.getValue();
if (sel1 == "vhf3") {
if (data_mode == 1) {
@ -205,7 +211,7 @@ var update_active_vhf = func(vhf) {
}
} else if (vhf == 4) {
if (sel1 == "hf1" or sel2 == "hf1") {
var act = sprintf("%5.0f", systems.HFS[0].selectedChannelKhz);
act = sprintf("%5.0f", systems.HFS[0].selectedChannelKhz);
if (sel1 == "hf1") {
act_display_rmp1.setValue(act);
@ -219,7 +225,7 @@ var update_active_vhf = func(vhf) {
}
} else if (vhf == 5) {
if (sel1 == "hf2" or sel2 == "hf2") {
var act = sprintf("%5.0f", systems.HFS[1].selectedChannelKhz);
act = sprintf("%5.0f", systems.HFS[1].selectedChannelKhz);
if (sel1 == "hf2") {
act_display_rmp1.setValue(act);
@ -279,65 +285,67 @@ var update_displays_nav = func(nav) {
}
}
var stby = nil;
var update_stby_freq = func(rmp_no, freq) {
var data_mode = vhf3_data_mode.getValue();
data_mode = vhf3_data_mode.getValue();
if (rmp_no == 0) {
if (freq == 1) {
var stby = sprintf("%3.3f", stby_rmp1_vhf1.getValue());
stby = sprintf("%3.3f", stby_rmp1_vhf1.getValue());
} else if (freq == 2) {
var stby = sprintf("%3.3f", stby_rmp1_vhf2.getValue());
stby = sprintf("%3.3f", stby_rmp1_vhf2.getValue());
} else if (freq == 3) {
if (data_mode == 0) {
var stby = "data";
stby = "data";
} else {
var stby = sprintf("%3.3f", stby_rmp1_vhf3.getValue());
stby = sprintf("%3.3f", stby_rmp1_vhf3.getValue());
}
} else if (freq == 4) {
var stby = sprintf("%5.0f", stby_rmp1_hf1.getValue());
stby = sprintf("%5.0f", stby_rmp1_hf1.getValue());
} else if (freq == 5) {
var stby = sprintf("%5.0f", stby_rmp1_hf2.getValue());
stby = sprintf("%5.0f", stby_rmp1_hf2.getValue());
}
stby_display_rmp1.setValue(stby);
} else if (rmp_no == 1) {
if (freq == 1) {
var stby = sprintf("%3.3f", stby_rmp2_vhf1.getValue());
stby = sprintf("%3.3f", stby_rmp2_vhf1.getValue());
} else if (freq == 2) {
var stby = sprintf("%3.3f", stby_rmp2_vhf2.getValue());
stby = sprintf("%3.3f", stby_rmp2_vhf2.getValue());
} else if (freq == 3) {
if (data_mode == 0) {
var stby = "data";
stby = "data";
} else {
var stby = sprintf("%3.3f", stby_rmp2_vhf3.getValue());
stby = sprintf("%3.3f", stby_rmp2_vhf3.getValue());
}
} else if (freq == 4) {
var stby = sprintf("%5.0f", stby_rmp2_hf1.getValue());
stby = sprintf("%5.0f", stby_rmp2_hf1.getValue());
} else if (freq == 5) {
var stby = sprintf("%5.0f", stby_rmp2_hf2.getValue());
stby = sprintf("%5.0f", stby_rmp2_hf2.getValue());
}
stby_display_rmp2.setValue(stby);
} else {
if (freq == 1) {
var stby = sprintf("%3.3f", stby_rmp3_vhf1.getValue());
stby = sprintf("%3.3f", stby_rmp3_vhf1.getValue());
} else if (freq == 2) {
var stby = sprintf("%3.3f", stby_rmp3_vhf2.getValue());
stby = sprintf("%3.3f", stby_rmp3_vhf2.getValue());
} else if (freq == 3) {
if (data_mode == 0) {
var stby = "data";
stby = "data";
} else {
var stby = sprintf("%3.3f", stby_rmp3_vhf3.getValue());
stby = sprintf("%3.3f", stby_rmp3_vhf3.getValue());
}
} else if (freq == 4) {
var stby = sprintf("%5.0f", stby_rmp3_hf1.getValue());
stby = sprintf("%5.0f", stby_rmp3_hf1.getValue());
} else if (freq == 5) {
var stby = sprintf("%5.0f", stby_rmp3_hf2.getValue());
stby = sprintf("%5.0f", stby_rmp3_hf2.getValue());
}
stby_display_rmp3.setValue(stby);
}
}
var chan = nil;
var update_chan_sel = func(rmp_no) {
update_active_vhf(1);
update_active_vhf(2);
@ -350,7 +358,7 @@ var update_chan_sel = func(rmp_no) {
update_displays_nav(rmp_no + 5);
if (rmp_no == 0) {
var chan = chan_rmp1.getValue();
chan = chan_rmp1.getValue();
if (chan == "vhf1") {
update_stby_freq(rmp_no, 1);
} else if (chan == "vhf2") {
@ -363,7 +371,7 @@ var update_chan_sel = func(rmp_no) {
update_stby_freq(rmp_no, 5);
}
} else if (rmp_no == 1) {
var chan = chan_rmp2.getValue();
chan = chan_rmp2.getValue();
if (chan == "vhf1") {
update_stby_freq(rmp_no, 1);
} else if (chan == "vhf2") {
@ -376,7 +384,7 @@ var update_chan_sel = func(rmp_no) {
update_stby_freq(rmp_no, 5);
}
} else {
var chan = chan_rmp3.getValue();
chan = chan_rmp3.getValue();
if (chan == "vhf1") {
update_stby_freq(rmp_no, 1);
} else if (chan == "vhf2") {
@ -391,13 +399,19 @@ var update_chan_sel = func(rmp_no) {
}
}
var sel_chan = nil;
var sel_crs = nil;
var mod1 = nil;
var mod = nil;
var mem = nil;
var transfer = func(rmp_no) {
rmp_no = rmp_no - 1;
var sel_chan = getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/sel_chan");
var sel_crs = getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs");
sel_chan = getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/sel_chan");
sel_crs = getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs");
if (string.match(sel_chan, "vhf[1-3]")) {
var data_mode = vhf3_data_mode.getValue();
data_mode = vhf3_data_mode.getValue();
if (string.match(sel_chan, "vhf3")) {
if (data_mode == 0) {
vhf3_data_mode.setValue(1);
@ -415,41 +429,41 @@ var transfer = func(rmp_no) {
update_stby_freq(2, 3);
}
}
var mod1 = int(string.replace(sel_chan, "vhf", ""));
var mod = mod1 - 1;
mod1 = int(string.replace(sel_chan, "vhf", ""));
mod = mod1 - 1;
var mem = getprop("instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz");
setprop("instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz", getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby"));
mem = getprop("/instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz");
setprop("/instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz", getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby"));
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby", mem);
} elsif (string.match(sel_chan, "hf[1-2]")) {
var mod1 = int(string.replace(sel_chan, "hf", ""));
var mod = mod1 - 1;
mod1 = int(string.replace(sel_chan, "hf", ""));
mod = mod1 - 1;
var mem = systems.HFS[mod].selectedChannelKhz;
mem = systems.HFS[mod].selectedChannelKhz;
systems.HFS[mod].selectChannel(getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/hf" ~ mod1 ~ "-standby"));
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/hf" ~ mod1 ~ "-standby", mem);
} elsif (sel_chan == "adf") {
var mem = getprop("instrumentation/adf[" ~ rmp_no ~ "]/frequencies/selected-khz");
setprop("instrumentation/adf[" ~ rmp_no ~ "]/frequencies/selected-khz", getprop("instrumentation/adf[" ~ rmp_no ~ "]/frequencies/standby-khz"));
setprop("instrumentation/adf[" ~ rmp_no ~ "]/frequencies/standby-khz", mem);
mem = getprop("/instrumentation/adf[" ~ rmp_no ~ "]/frequencies/selected-khz");
setprop("/instrumentation/adf[" ~ rmp_no ~ "]/frequencies/selected-khz", getprop("/instrumentation/adf[" ~ rmp_no ~ "]/frequencies/standby-khz"));
setprop("/instrumentation/adf[" ~ rmp_no ~ "]/frequencies/standby-khz", mem);
update_displays_nav(rmp_no + 5);
} elsif (sel_chan == "vor") {
if (sel_crs) {
setprop("instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/standby-mhz", getprop("instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/selected-mhz"));
setprop("/instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/standby-mhz", getprop("/instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/selected-mhz"));
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 0);
update_displays_nav(rmp_no + 3);
} else {
setprop("instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/selected-mhz", getprop("instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/standby-mhz"));
setprop("/instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/selected-mhz", getprop("/instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/standby-mhz"));
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 1);
update_displays_nav(rmp_no + 3);
}
} elsif (sel_chan == "ls") {
if (sel_crs) {
setprop("instrumentation/nav[0]/frequencies/standby-mhz", getprop("instrumentation/nav[0]/frequencies/selected-mhz"));
setprop("/instrumentation/nav[0]/frequencies/standby-mhz", getprop("/instrumentation/nav[0]/frequencies/selected-mhz"));
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 0);
update_displays_nav(1);
} else {
setprop("instrumentation/nav[0]/frequencies/selected-mhz", getprop("instrumentation/nav[0]/frequencies/standby-mhz"));
setprop("/instrumentation/nav[0]/frequencies/selected-mhz", getprop("/instrumentation/nav[0]/frequencies/standby-mhz"));
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 1);
update_displays_nav(1);
}
@ -475,6 +489,21 @@ var change_nav_mode = func(rmp_nr, nav_mode) {
}
}
# ADF Radio: Implement BFO such that you will hear audio
var BFOActive = [props.globals.getNode("/systems/radio/rmp[0]/bfo-active"),props.globals.getNode("/systems/radio/rmp[1]/bfo-active")];
var ADFIdent = [props.globals.getNode("/instrumentation/adf[0]/ident-audible"),props.globals.getNode("/instrumentation/adf[1]/ident-audible")];
var ADFMode = [props.globals.getNode("/instrumentation/adf[0]/mode"),props.globals.getNode("/instrumentation/adf[1]/mode")];
setlistener("/systems/radio/rmp[0]/bfo-active", func (val) {
ADFIdent[0].setValue(val.getValue());
ADFMode[0].setValue(val.getValue() == 1 ? "bfo" : "adf");
},0,0);
setlistener("/systems/radio/rmp[1]/bfo-active", func (val) {
ADFIdent[1].setValue(val.getValue());
ADFMode[1].setValue(val.getValue() == 1 ? "bfo" : "adf");
},0,0);
setlistener("/systems/radio/rmp[0]/vhf1-standby", func {
update_stby_freq(0, 1);
});
@ -613,9 +642,11 @@ setlistener("/instrumentation/nav[3]/radials/selected-deg", func {
setlistener("/systems/radio/rmp[0]/nav", func(nav_mode) {
change_nav_mode(1, nav_mode);
if (nav_mode.getValue() == 0) { BFOActive[0].setValue(0); }
});
setlistener("/systems/radio/rmp[1]/nav", func(nav_mode) {
change_nav_mode(2, nav_mode);
if (nav_mode.getValue() == 0) { BFOActive[1].setValue(0); }
});

View file

@ -285,7 +285,7 @@ var thrust_loop = maketimer(0.04, func {
togaLock = alphaProt - 1;
if (!pts.Gear.wow[1].getValue() and !pts.Gear.wow[2].getValue() and fbw.FBW.activeLaw.getValue() == 0 and (!pts.Systems.Thrust.engOut.getValue() or (pts.Systems.Thrust.engOut.getValue() and flaps == 0)) and !Fadec.n1Mode[0].getValue()
and !Fadec.n1Mode[1].getValue()) {
and !Fadec.n1Mode[1].getValue() and fcu.FCUworkingNode.getBoolValue()) {
if (alpha > alphaProt and pts.Position.gearAglFt.getValue() >= 100) {
Thrust.alphaFloor.setValue(1);
Thrust.togaLk.setValue(0);

View file

@ -82,6 +82,6 @@ var ground_message = func (string) {
setprop("/sim/messages/ground", string);
}
setlistener("sim/signals/fdm-initialized", func {
setlistener("/sim/signals/fdm-initialized", func {
ground_services.init();
});

View file

@ -2,10 +2,10 @@
# Jonathan Redpath
# Copyright (c) 2019 Jonathan Redpath
var lcont = 0;
var rcont = 0;
var HYD = {
lcont: 0,
rcont: 0,
Brakes: {
accumPressPsi: props.globals.initNode("/systems/hydraulic/yellow-accumulator-psi-cmd", 0, "INT"),
leftPressPsi: props.globals.initNode("/systems/hydraulic/brakes/pressure-left-psi", 0, "INT"),
@ -64,9 +64,9 @@ var HYD = {
},
init: func() {
me.resetFail();
me.Qty.blueInput.setValue(math.round((rand() * 4) + 8 , 0.1)); # Random between 8 and 12
me.Qty.greenInput.setValue(math.round((rand() * 4) + 8 , 0.1)); # Random between 8 and 12
me.Qty.yellowInput.setValue(math.round((rand() * 4) + 8 , 0.1)); # Random between 8 and 12
me.Qty.blueInput.setValue(math.round((rand() * 2) + 6 , 0.1)); # Random between 6 and 8
me.Qty.greenInput.setValue(math.round((rand() * 4) + 14 , 0.1)); # Random between 14 and 18
me.Qty.yellowInput.setValue(math.round((rand() * 4) + 10 , 0.1)); # Random between 10 and 14
me.Switch.blueElec.setValue(1);
me.Switch.blueElecOvrd.setValue(0);
me.Switch.greenEDP.setValue(1);
@ -86,22 +86,23 @@ var HYD = {
me.Fail.yellowLeak.setBoolValue(0);
},
loop: func(notification) {
# Decrease accumPressPsi when green and yellow hydraulic's aren't pressurized
# Decrease accumPressPsi when green and yellow hydraulics aren't pressurized
if (me.Brakes.leftbrake.getValue() > 0 or notification.brakesMode == 0) {
lcont = lcont + 1;
me.lcont = me.lcont + 1;
} else {
lcont = 0;
me.lcont = 0;
}
if (me.Brakes.rightbrake.getValue() > 0 or notification.brakesMode == 0) {
rcont = rcont + 1;
me.rcont = me.rcont + 1;
} else {
rcont = 0;
me.rcont = 0;
}
if (notification.yellow < notification.accumPressPsi and notification.accumPressPsi > 0) {
if (lcont == 1) {
if (me.lcont == 1) {
me.Brakes.accumPressPsi.setValue(notification.accumPressPsi - 200);
}
if (rcont == 1) {
if (me.rcont == 1) {
me.Brakes.accumPressPsi.setValue(notification.accumPressPsi - 200);
}
if (notification.accumPressPsi < 0) {
@ -181,6 +182,7 @@ var HYD = {
},
};
# Restrict gear raising on the ground
setlistener("/controls/gear/gear-down", func {
if (!pts.Controls.Gear.gearDown.getValue() and (pts.Gear.wow[0].getValue() or pts.Gear.wow[1].getValue() or pts.Gear.wow[2].getValue())) {
pts.Controls.Gear.gearDown.setValue(1);

View file

@ -233,14 +233,12 @@ setlistener("/controls/oxygen/masksDeployMan", func {
setlistener("/controls/oxygen/masksDeployMan", func {
masks = getprop("/controls/oxygen/masksDeployMan");
autoMasks = getprop("/controls/oxygen/masksDeploy");
if (!masks) {
setprop("/controls/oxygen/masksDeployMan", 1);
}
}, 0, 0);
setlistener("/controls/oxygen/masksDeploy", func {
masks = getprop("/controls/oxygen/masksDeployMan");
autoMasks = getprop("/controls/oxygen/masksDeploy");
if (!autoMasks) {
setprop("/controls/oxygen/masksDeploy", 1);

View file

@ -7,7 +7,7 @@ var tyresmoke_1 = aircraft.tyresmoke.new(1, 0, 0.8, 0);
var tyresmoke_2 = aircraft.tyresmoke.new(2, 0, 0.8, 0);
# =============================== listeners ===============================
setlistener("gear/gear[0]/position-norm", func {
setlistener("/gear/gear[0]/position-norm", func {
if (pts.Gear.position[0].getValue()){
run_tyresmoke0 = 1;
}else{
@ -15,7 +15,7 @@ setlistener("gear/gear[0]/position-norm", func {
}
},1,0);
setlistener("gear/gear[1]/position-norm", func {
setlistener("/gear/gear[1]/position-norm", func {
if (pts.Gear.position[1].getValue()){
run_tyresmoke1 = 1;
}else{
@ -23,7 +23,7 @@ setlistener("gear/gear[1]/position-norm", func {
}
},1,0);
setlistener("gear/gear[2]/position-norm", func {
setlistener("/gear/gear[2]/position-norm", func {
if (pts.Gear.position[2].getValue()){
run_tyresmoke2 = 1;
}else{

View file

@ -42,6 +42,7 @@ input = {
frame_rate: "/sim/frame-rate",
elapsedTime: "/sim/time/elapsed-sec",
FWCPhase: "/ECAM/warning-phase",
acconfigUnits: "/systems/acconfig/options/weight-kgs",
# Just about everything uses these properties at some stage, lets add them here!
gear0Wow: "/gear/gear[0]/wow",

View file

@ -22,7 +22,8 @@ It is highly reccomended to purchase a NAVIGRAPH subscription and download their
To install navdata, create a folder FMSDATA, and add it to your additional scenery folders, at the top of the list. Inside that folder, place all the XXXX.procedures.xml files, in the format FMSDATA/X/X/X/XXXX.procedures.xml. For instance, FMSDATA/Airports/E/G/K/EGKK.procedures.xml.
## Remote MCDU
If you want to run the MCDU on a phone or tablet for better realism and easier input, put mcdu.html into the FGDATA/Phi folder, run FlightGear with enabled HTTP server (i.e. command line --httpd=8080) and open http://your-flightgear-computer:8080/mcdu.html in the browser on your phone or tablet.
If you want to run the MCDU on a your smarthphone or tablet for better realism and easier input, run FlightGear with enabled HTTP server (i.e. command line --httpd=<Port; e.g. 8080>) then go to main menu -> Instruments -> Remote MCDU.
You can generate a QR-code to lauch directly on your smartphone/tablet, first insert your local ip. Your device must run on the same local network of your computer.
## Installation
If you have issues installing, please check INSTALL.MD!

View file

@ -1913,6 +1913,21 @@
</volume>
</announcements>
<chime>
<name>Click</name>
<path>Aircraft/A320-family/Sounds/Cockpit/click.wav</path>
<mode>once</mode>
<type>avionics</type>
<condition>
<property>/sim/sound/warnings/click</property>
</condition>
<volume>
<property>/sim/current-view/internal</property>
</volume>
<reference-dist>10</reference-dist>
<max-dist>100</max-dist>
</chime>
<chime>
<name>Chime</name>
<path>Aircraft/A320-family/Sounds/Cockpit/chime.wav</path>

View file

@ -736,6 +736,33 @@
</function>
</fcs_function>
<switch name="/systems/navigation/adr/computation/underspeed-difference">
<default value="2"/>
<test logic="OR" value="19">
/controls/flight/speedbrake eq 1.0
</test>
</switch>
<fcs_function name="/systems/navigation/adr/computation/underspeed">
<function>
<ifthen>
<lt>
<max>
<property>/systems/navigation/adr/output/cas-1</property>
<property>/systems/navigation/adr/output/cas-2</property>
<property>/systems/navigation/adr/output/cas-3</property>
</max>
<difference>
<property>/FMGC/internal/vls-min</property>
<property>/systems/navigation/adr/computation/underspeed-difference</property>
</difference>
</lt>
<value>1</value>
<value>0</value>
</ifthen>
</function>
</fcs_function>
</channel>
<channel name="ADR Output" execrate="2"> <!-- todo - need lowpass? -->
@ -905,6 +932,11 @@
<gain>/systems/navigation/adr/any-adr-on</gain>
</pure_gain>
<pure_gain name="/systems/navigation/adr/output/underspeed">
<input>/systems/navigation/adr/computation/underspeed</input>
<gain>/systems/navigation/adr/any-adr-on</gain>
</pure_gain>
<pure_gain name="/instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected">
<input>/instrumentation/radar-altimeter[0]/radar-altitude-ft</input>
<gain>1</gain>
@ -923,6 +955,17 @@
</clipto>
</pure_gain>
<fcs_function name="/instrumentation/radar-altimeter-difference-ft">
<function>
<abs>
<difference>
<property>/instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected</property>
<property>/instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected</property>
</difference>
</abs>
</function>
</fcs_function>
<switch name="/instrumentation/transponder/altimeter-input/mode-c-alt-ft">
<test logic="AND" value="/instrumentation/altimeter[0]/mode-c-alt-ft">
/instrumentation/transponder/altimeter-input-src eq 1

View file

@ -182,6 +182,7 @@
</function>
<output>/systems/apu/oil/level-l</output>
</fcs_function>
</channel>
</system>

View file

@ -19,10 +19,10 @@
<rate_limit sense="incr">0.03333333333</rate_limit>
</actuator>
<actuator name="/ECAM/phases/monostable/phase-1-300-output">
<actuator name="/ECAM/phases/monostable/phase-1-300-timer">
<input>/ECAM/phases/monostable/phase-1-300</input>
<rate_limit sense="incr">0.00333333333</rate_limit>
<rate_limit sense="decr">120</rate_limit>
<rate_limit sense="decr">0.00333333333</rate_limit>
<rate_limit sense="incr">120</rate_limit>
</actuator>
</channel>
@ -95,8 +95,8 @@
<switch name="/ECAM/phases/monostable/phase-1-300-output">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/phases/monostable/phase-1-300-output ne 1
<test logic="OR" value="1">
/ECAM/phases/monostable/phase-1-300-timer ne 0
/ECAM/phases/monostable/phase-1-300 eq 1
</test>
</switch>
@ -230,6 +230,27 @@
</test>
</switch>
<switch name="/ECAM/phases/monostable/phase-5">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/phases/phase-calculation/takeoff-power eq 1
/ECAM/phases/phase-calculation/altitude-ge-1500 eq 0
/ECAM/logic/ground-calc-immediate eq 0
/ECAM/phases/monostable/gnd-output ne 1
</test>
</switch>
<switch name="/ECAM/phases/monostable/phase-7">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/phases/phase-calculation/takeoff-power eq 0
/ECAM/phases/phase-calculation/altitude-ge-1500 eq 0
/ECAM/phases/phase-calculation/altitude-ge-800 eq 0
/ECAM/logic/ground-calc-immediate eq 0
/ECAM/phases/monostable/gnd-output ne 1
</test>
</switch>
<switch name="/ECAM/phases/monostable/phase-8">
<default value="0"/>
<test logic="OR" value="1">
@ -237,6 +258,60 @@
</test>
</switch>
<switch name="/ECAM/phases/monostable/phase-9">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warning-phase eq 9
</test>
</switch>
<switch name="/ECAM/phases/flipflop/phase-10-set">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warning-phase eq 9
</test>
</switch>
<switch name="/ECAM/phases/flipflop/phase-10-reset">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/timer/ground-calc eq 1
/controls/engines/engine[0]/fire-btn eq 1
</test>
</switch>
<switch name="/ECAM/phases/monostable/phase-1-300">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/phases/phase-calculation/engines-1-2-not-running eq 1
/ECAM/logic/ground-calc-immediate eq 1
/ECAM/warning-phase eq 9
/ECAM/phases/flipflop/phase-10-output eq 1
</test>
</switch>
<switch name="/ECAM/phases/flipflop/phase-2-set">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 3
/ECAM/warning-phase eq 8
</test>
</switch>
<switch name="/ECAM/phases/flipflop/phase-2-reset">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/phases/monostable-80kt eq 0
/ECAM/warning-phase ne 9
/ECAM/timer/ground-calc eq 1
<test logic="OR">
/ECAM/phases/monostable/phase-9-output eq 0
/ECAM/phases/monostable/to-power-set-output eq 0
</test>
</test>
</switch>
</channel>
</system>

View file

@ -2301,6 +2301,40 @@
</test>
</switch>
<switch name="/instrumentation/pfd/lights/autoland-armed">
<default value="0"/>
<test logic="OR" value="1">
<!-- /gear/gear[0]/wow eq 0 -->
<test logic="AND">
/modes/pfd/ILS1 eq 1
/instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected le 200
</test>
<test logic="AND">
/modes/pfd/ILS2 eq 1
/instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected le 200
</test>
<!-- /instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected le 200 -->
</test>
</switch>
<switch name="/instrumentation/pfd/lights/autoland-on">
<default value="0"/>
<test logic="AND" value="1">
/instrumentation/pfd/lights/autoland-armed eq 1
<test logic="OR">
<test logic="AND">
/it-autoflight/output/ap1 eq 0
/it-autoflight/output/ap2 eq 0
</test>
/instrumentation/radar-altimeter-difference-ft gt 15
<!-- TODO
- Localizer deviation excessive
- Loss of localizer signal
-->
</test>
</test>
</switch>
</channel>
<channel name="ENG" execrate="16">

View file

@ -29,13 +29,25 @@
</actuator>
<!-- Green -->
<switch name="/systems/hydraulic/green-qty-cmd">
<switch name="/systems/hydraulic/green-qty-cmd-cmd">
<default value="/systems/hydraulic/green-qty-input"/>
<test value="0">
/systems/failures/hydraulic/green-leak eq 1
</test>
</switch>
<fcs_function name="/systems/hydraulic/green-qty-cmd">
<function>
<sum>
<property>/systems/hydraulic/green-qty-cmd-cmd</property>
<product>
<value>2.1</value>
<property>/gear/gear[0]/position-norm</property>
</product>
</sum>
</function>
</fcs_function>
<switch name="/systems/hydraulic/green-qty-decr-rate">
<default value="100"/> <!-- Instant -->
<test value="0.25">
@ -541,6 +553,36 @@
/systems/hydraulic/yellow-accumulator-psi-cmd ge 0
</test>
</switch>
<lag_filter name="/systems/hydraulic/yellow-accumulator-psi-output">
<input>/systems/hydraulic/yellow-accumulator-psi</input>
<c1>9</c1>
</lag_filter>
<switch name="/systems/hydraulic/brakes/pressure-left-psi-input">
<default value="0"/>
<test logic="AND" value="/systems/hydraulic/brakes/pressure-left-psi">
/systems/hydraulic/brakes/mode ne 1
</test>
</switch>
<switch name="/systems/hydraulic/brakes/pressure-right-psi-input">
<default value="0"/>
<test logic="AND" value="/systems/hydraulic/brakes/pressure-right-psi">
/systems/hydraulic/brakes/mode ne 1
</test>
</switch>
<lag_filter name="/systems/hydraulic/brakes/pressure-left-psi-output">
<input>/systems/hydraulic/brakes/pressure-left-psi-input</input>
<c1>9</c1>
</lag_filter>
<lag_filter name="/systems/hydraulic/brakes/pressure-right-psi-output">
<input>/systems/hydraulic/brakes/pressure-right-psi-input</input>
<c1>9</c1>
</lag_filter>
</channel>
<channel name="Lights" execrate="8">

View file

@ -1325,5 +1325,4 @@
</input>
<output>/instrumentation/mk-viii/inputs/discretes/landing-flaps</output>
</logic>
</PropertyList>

View file

@ -1,12 +1,17 @@
<!DOCTYPE html>
<html>
<html lang="en" translate="no">
<head>
<title>MCDU</title>
<title>A320 MCDU</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="manifest" href="mcdu_manifest.json" />
<meta name="apple-mobile-web-app-status-bar" content="#db4938" />
<meta name="theme-color" content="#db4938" />
<script>
let screen;
let screen_src;
let blank_src;
let loading = 0;
let scheduled_load = 0;
function refresh_screen() {
@ -40,30 +45,50 @@
refresh_screen();
}, true);
}
var preventzoomaction = function(e) { //https://exceptionshub.com/disable-double-tap-zoom-option-in-browser-on-touch-devices.html
var t2 = e.timeStamp;
var t1 = e.currentTarget.dataset.lastTouch || t2;
var dt = t2 - t1;
var fingers = e.touches.length;
e.currentTarget.dataset.lastTouch = t2;
if (!dt || dt > 500 || fingers > 1) return; // not double-tap
e.preventDefault();
e.target.click();
};
window.addEventListener('load', function () {
let tds = document.querySelectorAll('.input td');
for (const td of tds) {
td.addEventListener('click', function () {
if (td.className == "disabled") return;
press_button("button", td.textContent);
}, true);
td.addEventListener('touchstart', preventzoomaction, true);
}
tds = document.querySelectorAll('.enter td');
for (const td of tds) {
td.addEventListener('click', function () {
press_button(td.getAttribute("button-side") == "l" ? "lskbutton" : "rskbutton", td.getAttribute("button-id"));
}, true);
td.addEventListener('touchstart', preventzoomaction, true);
}
tds = document.querySelectorAll('.menu td');
for (const td of tds) {
td.addEventListener('click', function () {
press_button("pagebutton", td.className);
}, true);
td.addEventListener('touchstart', preventzoomaction, true);
}
tds = document.querySelectorAll('.arrows td');
for (const td of tds) {
td.addEventListener('click', function () {
press_button(td.className == 'airport' ? "pagebutton" : "arrowbutton", td.className);
}, true);
td.addEventListener('touchstart', preventzoomaction, true);
}
screen = document.querySelector('img');
screen.addEventListener('load', function () {
@ -73,8 +98,9 @@
refresh_screen();
}
});
screen_src = screen.src;
window.setInterval(refresh_screen, 1000);
blank_src = screen_src;
screen_src = "/screenshot?canvasindex=10&type=png";
setInterval(refresh_screen, 1000);
}, true);
</script>
<style>
@ -89,12 +115,14 @@
table {
margin: 0;
padding: 0
padding: 0;
word-wrap: normal;
overflow-wrap: normal;
}
tr {
margin: 0;
padding: 0
padding: 0;
}
td {
@ -102,23 +130,32 @@
padding: 0;
text-align: center;
outline: 1px solid gray;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
-webkit-touch-callout: none;
-khtml-user-select: none;
user-select: none;
overflow: hidden;
text-overflow: clip;
}
td:active {
background-color: white;
color: black
color: black;
}
.enter {
font-size: 60%
font-size: 60%;
}
.enter tr:first-child {
font-size: 70%
font-size: 70%;
}
.enter tr:last-child {
font-size: 50%
font-size: 50%;
}
.enter td:first-child,
@ -148,11 +185,11 @@
</style>
</head>
<body style="width: 100%">
<body style="width: 100%" oncontextmenu="return false;">
<table class="enter" style="width: 100%">
<tr>
<td><br></td>
<td rowspan="8" style="vertical-align: top"><img src="/screenshot?canvasindex=10&type=png"
<td rowspan="8" style="vertical-align: top"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAAAAANgAQMAAACIgIgUAAAAA1BMVEUAAACnej3aAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAgklEQVR42u3BAQEAAACCIP+vbkhAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA7wazbwABRxu5owAAAABJRU5ErkJggg=="
style="width: 100%" /></td>
<td><br></td>
</tr>
@ -245,7 +282,7 @@
<td>Z</td>
<td>/</td>
<td style="font-size: 50%">SP</td>
<td style="font-size: 33%">OVFY<br></td>
<td style="font-size: 33%" class="disabled">OVFY<br></td>
<td style="font-size: 33%">CLR</td>
</tr>
</table>
@ -283,7 +320,7 @@
<td>.</td>
<td>0</td>
<td
style="font-size: 3vw; width: 33.333333333333333333333333333333333333333333333333333333333333333333333%; /* :) */">
style="font-size: 3vw; width: 33.333333333333333333333333333333333333333333333333333333333333333333333%; /* :) */" class="disabled">
+/-
</td>
</tr>

171
gui/dialogs/mcduweb.xml Normal file
View file

@ -0,0 +1,171 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Copyright (c) 2020 Josh Davidson (Octal450) -->
<!-- A3XX MCDU web launcher Dialog -->
<PropertyList>
<name>mcdu-web</name>
<layout>vbox</layout>
<pref-width>480</pref-width>
<nasal>
<open>
props.globals.initNode("/sim/http/mcduweb/local-ip", "", "STRING");
</open>
</nasal>
<group>
<layout>hbox</layout>
<text>
<halign>left</halign>
<label>Remote MCDU for browser/tablet/smartphone</label>
</text>
<button>
<halign>right</halign>
<pref-width>20</pref-width>
<pref-height>20</pref-height>
<legend>X</legend>
<key>Esc</key>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<text>
<halign>left</halign>
<label>Please check: HTTP service running is required.</label>
<visible>
<equals>
<property>/sim/http/running</property>
<value>0</value>
</equals>
</visible>
</text>
<text>
<halign>left</halign>
<label>Start FlightGear with -httpd=8080</label>
<visible>
<equals>
<property>/sim/http/running</property>
<value>0</value>
</equals>
</visible>
</text>
</group>
<group>
<layout>vbox</layout>
<text>
<halign>center</halign>
<label>Open MCDU on browser</label>
</text>
<button>
<halign>center</halign>
<legend>launch browser</legend>
<binding>
<command>nasal</command>
<script>
var n = getprop("/sim/http/running",0);
if( n != 1 ) {
gui.popupTip("Internal webserver not running. Restart FlightGear with -httpd=8080", 5.0);
} else {
var _url = "http://localhost:" ~ getprop("/sim/http/options/listening-port") ~ "/aircraft-dir/WebPanel/mcdu.html";
fgcommand("open-browser", props.Node.new({ "url": _url }));
}
</script>
</binding>
</button>
</group>
<group>
<layout>vbox</layout>
<text>
<halign>center</halign>
<label></label>
</text>
<text>
<halign>center</halign>
<label>Scan QR code with your smartphone or tablet</label>
</text>
</group>
<group>
<layout>hbox</layout>
<input>
<width>220</width>
<height>25</height>
<padding>5</padding>
<label>Local IP</label>
<property>/sim/http/mcduweb/local-ip</property>
<binding>
<command>dialog-apply</command>
</binding>
<live type="bool">true</live>
</input>
<button>
<legend>get qrcode</legend>
<pref-height>25</pref-height>
<pref-width>180</pref-width>
<padding>5</padding>
<binding>
<command>nasal</command>
<script>
var _url = "";
if (size(getprop("/sim/http/mcduweb/local-ip"))>6) {
if ( getprop("sim/http/running",0) == 1 ) _url = "http://" ~ getprop("/sim/http/mcduweb/local-ip") ~ ":" ~ getprop("/sim/http/options/listening-port") ~ "/aircraft-dir/WebPanel/mcdu.html";
root.createChild("image").set("src", "https://qr.eletto.dev/" ~ _url).setSize(300,300).setTranslation(10,10);
}
</script>
</binding>
</button>
</group>
<canvas>
<name>mcduwebqr</name>
<valign>center</valign>
<halign>center</halign>
<stretch>false</stretch>
<pref-width>320</pref-width>
<pref-height>320</pref-height>
<nasal>
<load>
<![CDATA[
var n = props.globals.getNode("/sim/http/running");
var mcdu_canvas_dlg = canvas.get(cmdarg());
var root = mcdu_canvas_dlg.createGroup();
mcdu_canvas_dlg.setColorBackground(1, 1, 1, 1);
]]>
</load>
<unload>
<![CDATA[
mcdu_canvas_dlg.del();
mcdu_canvas_dlg = nil;
root = nil;
]]>
</unload>
</nasal>
</canvas>
<group>
<layout>vbox</layout>
<text>
<halign>center</halign>
<label>* QRCode provided by https://qr.eletto.dev/</label>
</text>
</group>
</PropertyList>