Merge branch 'legoboyvdlp-dev' into dev
This commit is contained in:
commit
d25a96d434
107 changed files with 5602 additions and 5099 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@ MyDevWIP
|
||||||
# ignore swap files
|
# ignore swap files
|
||||||
*.swp
|
*.swp
|
||||||
*.swo
|
*.swo
|
||||||
|
.DS_Store
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
</hud>
|
</hud>
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
|
<fallback-model-index>212</fallback-model-index>
|
||||||
|
|
||||||
<autopush include="AircraftConfig/autopush-config.xml"/>
|
<autopush include="AircraftConfig/autopush-config.xml"/>
|
||||||
<icing>
|
<icing>
|
||||||
<iceable>
|
<iceable>
|
||||||
|
@ -424,7 +426,7 @@
|
||||||
|
|
||||||
<current-view>
|
<current-view>
|
||||||
<z-offset-default type="float">80.0</z-offset-default>
|
<z-offset-default type="float">80.0</z-offset-default>
|
||||||
<z-offset-min-m type="float">30.0</z-offset-min-m>
|
<z-offset-min-m type="float">10.0</z-offset-min-m>
|
||||||
<z-offset-max-m type="float">300.0</z-offset-max-m>
|
<z-offset-max-m type="float">300.0</z-offset-max-m>
|
||||||
</current-view>
|
</current-view>
|
||||||
|
|
||||||
|
@ -1455,8 +1457,8 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/controls/engines/engine[0]/throttle", getprop("/controls/engines/engine[0]/throttle") + 0.01);
|
setprop("controls/engines/engine[0]/throttle", getprop("controls/engines/engine[0]/throttle") + 0.01);
|
||||||
setprop("/controls/engines/engine[1]/throttle", getprop("/controls/engines/engine[0]/throttle") + 0.01); # Not a typo, always use engine[0] as a reference
|
setprop("controls/engines/engine[1]/throttle", getprop("controls/engines/engine[0]/throttle") + 0.01); # Not a typo, always use engine[0] as a reference
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
@ -1466,8 +1468,8 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/controls/engines/engine[0]/throttle", getprop("/controls/engines/engine[0]/throttle") - 0.01);
|
setprop("controls/engines/engine[0]/throttle", getprop("controls/engines/engine[0]/throttle") - 0.01);
|
||||||
setprop("/controls/engines/engine[1]/throttle", getprop("/controls/engines/engine[0]/throttle") - 0.01); # Not a typo, always use engine[0] as a reference
|
setprop("controls/engines/engine[1]/throttle", getprop("controls/engines/engine[0]/throttle") - 0.01); # Not a typo, always use engine[0] as a reference
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
@ -1508,7 +1510,7 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/controls/flight/elevator", getprop("/controls/flight/elevator") - 0.05);
|
setprop("controls/flight/elevator", getprop("controls/flight/elevator") - 0.05);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
@ -1529,8 +1531,8 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/controls/engines/engine[0]/throttle", getprop("/controls/engines/engine[0]/throttle") - 0.01);
|
setprop("controls/engines/engine[0]/throttle", getprop("controls/engines/engine[0]/throttle") - 0.01);
|
||||||
setprop("/controls/engines/engine[1]/throttle", getprop("/controls/engines/engine[0]/throttle") - 0.01); # Not a typo, always use engine[0] as a reference
|
setprop("controls/engines/engine[1]/throttle", getprop("controls/engines/engine[0]/throttle") - 0.01); # Not a typo, always use engine[0] as a reference
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
@ -1551,7 +1553,7 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/controls/flight/aileron", getprop("/controls/flight/aileron") - 0.05);
|
setprop("controls/flight/aileron", getprop("controls/flight/aileron") - 0.05);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
@ -1572,9 +1574,9 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/controls/flight/aileron", 0);
|
setprop("controls/flight/aileron", 0);
|
||||||
setprop("/controls/flight/elevator", 0);
|
setprop("controls/flight/elevator", 0);
|
||||||
setprop("/controls/flight/rudder", 0);
|
setprop("controls/flight/rudder", 0);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
@ -1595,7 +1597,7 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/controls/flight/aileron", getprop("/controls/flight/aileron") + 0.05);
|
setprop("controls/flight/aileron", getprop("controls/flight/aileron") + 0.05);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
@ -1636,7 +1638,7 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/controls/flight/elevator", getprop("/controls/flight/elevator") + 0.05);
|
setprop("controls/flight/elevator", getprop("controls/flight/elevator") + 0.05);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
@ -1657,8 +1659,8 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/controls/engines/engine[0]/throttle", getprop("/controls/engines/engine[0]/throttle") + 0.01);
|
setprop("controls/engines/engine[0]/throttle", getprop("controls/engines/engine[0]/throttle") + 0.01);
|
||||||
setprop("/controls/engines/engine[1]/throttle", getprop("/controls/engines/engine[0]/throttle") + 0.01); # Not a typo, always use engine[0] as a reference
|
setprop("controls/engines/engine[1]/throttle", getprop("controls/engines/engine[0]/throttle") + 0.01); # Not a typo, always use engine[0] as a reference
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
|
|
@ -4,19 +4,19 @@
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
||||||
|
|
||||||
var spinning = maketimer(0.05, func {
|
var spinning = maketimer(0.05, func {
|
||||||
var spinning = getprop("/systems/acconfig/spinning");
|
var spinning = getprop("systems/acconfig/spinning");
|
||||||
if (spinning == 0) {
|
if (spinning == 0) {
|
||||||
setprop("/systems/acconfig/spin", "\\");
|
setprop("systems/acconfig/spin", "\\");
|
||||||
setprop("/systems/acconfig/spinning", 1);
|
setprop("systems/acconfig/spinning", 1);
|
||||||
} else if (spinning == 1) {
|
} else if (spinning == 1) {
|
||||||
setprop("/systems/acconfig/spin", "|");
|
setprop("systems/acconfig/spin", "|");
|
||||||
setprop("/systems/acconfig/spinning", 2);
|
setprop("systems/acconfig/spinning", 2);
|
||||||
} else if (spinning == 2) {
|
} else if (spinning == 2) {
|
||||||
setprop("/systems/acconfig/spin", "/");
|
setprop("systems/acconfig/spin", "/");
|
||||||
setprop("/systems/acconfig/spinning", 3);
|
setprop("systems/acconfig/spinning", 3);
|
||||||
} else if (spinning == 3) {
|
} else if (spinning == 3) {
|
||||||
setprop("/systems/acconfig/spin", "-");
|
setprop("systems/acconfig/spin", "-");
|
||||||
setprop("/systems/acconfig/spinning", 0);
|
setprop("systems/acconfig/spinning", 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -25,84 +25,84 @@ var failReset = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
var failResetOld = func {
|
var failResetOld = func {
|
||||||
setprop("/systems/failures/elac1", 0);
|
setprop("systems/failures/elac1", 0);
|
||||||
setprop("/systems/failures/elac2", 0);
|
setprop("systems/failures/elac2", 0);
|
||||||
setprop("/systems/failures/sec1", 0);
|
setprop("systems/failures/sec1", 0);
|
||||||
setprop("/systems/failures/sec2", 0);
|
setprop("systems/failures/sec2", 0);
|
||||||
setprop("/systems/failures/sec3", 0);
|
setprop("systems/failures/sec3", 0);
|
||||||
setprop("/systems/failures/fac1", 0);
|
setprop("systems/failures/fac1", 0);
|
||||||
setprop("/systems/failures/fac2", 0);
|
setprop("systems/failures/fac2", 0);
|
||||||
setprop("/systems/failures/aileron-left", 0);
|
setprop("systems/failures/aileron-left", 0);
|
||||||
setprop("/systems/failures/aileron-right", 0);
|
setprop("systems/failures/aileron-right", 0);
|
||||||
setprop("/systems/failures/elevator-left", 0);
|
setprop("systems/failures/elevator-left", 0);
|
||||||
setprop("/systems/failures/elevator-right", 0);
|
setprop("systems/failures/elevator-right", 0);
|
||||||
setprop("/systems/failures/rudder", 0);
|
setprop("systems/failures/rudder", 0);
|
||||||
setprop("/systems/failures/spoiler-l1", 0);
|
setprop("systems/failures/spoiler-l1", 0);
|
||||||
setprop("/systems/failures/spoiler-l2", 0);
|
setprop("systems/failures/spoiler-l2", 0);
|
||||||
setprop("/systems/failures/spoiler-l3", 0);
|
setprop("systems/failures/spoiler-l3", 0);
|
||||||
setprop("/systems/failures/spoiler-l4", 0);
|
setprop("systems/failures/spoiler-l4", 0);
|
||||||
setprop("/systems/failures/spoiler-l5", 0);
|
setprop("systems/failures/spoiler-l5", 0);
|
||||||
setprop("/systems/failures/spoiler-r1", 0);
|
setprop("systems/failures/spoiler-r1", 0);
|
||||||
setprop("/systems/failures/spoiler-r2", 0);
|
setprop("systems/failures/spoiler-r2", 0);
|
||||||
setprop("/systems/failures/spoiler-r3", 0);
|
setprop("systems/failures/spoiler-r3", 0);
|
||||||
setprop("/systems/failures/spoiler-r4", 0);
|
setprop("systems/failures/spoiler-r4", 0);
|
||||||
setprop("/systems/failures/spoiler-r5", 0);
|
setprop("systems/failures/spoiler-r5", 0);
|
||||||
setprop("/systems/failures/elec-ac-ess", 0);
|
setprop("systems/failures/elec-ac-ess", 0);
|
||||||
setprop("/systems/failures/elec-batt1", 0);
|
setprop("systems/failures/elec-batt1", 0);
|
||||||
setprop("/systems/failures/elec-batt2", 0);
|
setprop("systems/failures/elec-batt2", 0);
|
||||||
setprop("/systems/failures/elec-galley", 0);
|
setprop("systems/failures/elec-galley", 0);
|
||||||
setprop("/systems/failures/elec-genapu", 0);
|
setprop("systems/failures/elec-genapu", 0);
|
||||||
setprop("/systems/failures/elec-gen1", 0);
|
setprop("systems/failures/elec-gen1", 0);
|
||||||
setprop("/systems/failures/elec-gen2", 0);
|
setprop("systems/failures/elec-gen2", 0);
|
||||||
setprop("/systems/failures/bleed-apu", 0);
|
setprop("systems/failures/bleed-apu", 0);
|
||||||
setprop("/systems/failures/bleed-ext", 0);
|
setprop("systems/failures/bleed-ext", 0);
|
||||||
setprop("/systems/failures/bleed-eng1", 0);
|
setprop("systems/failures/bleed-eng1", 0);
|
||||||
setprop("/systems/failures/bleed-eng2", 0);
|
setprop("systems/failures/bleed-eng2", 0);
|
||||||
setprop("/systems/failures/pack1", 0);
|
setprop("systems/failures/pack1", 0);
|
||||||
setprop("/systems/failures/pack2", 0);
|
setprop("systems/failures/pack2", 0);
|
||||||
setprop("/systems/failures/hyd-blue", 0);
|
setprop("systems/failures/hyd-blue", 0);
|
||||||
setprop("/systems/failures/hyd-green", 0);
|
setprop("systems/failures/hyd-green", 0);
|
||||||
setprop("/systems/failures/hyd-yellow", 0);
|
setprop("systems/failures/hyd-yellow", 0);
|
||||||
setprop("/systems/failures/ptu", 0);
|
setprop("systems/failures/ptu", 0);
|
||||||
setprop("/systems/failures/pump-blue", 0);
|
setprop("systems/failures/pump-blue", 0);
|
||||||
setprop("/systems/failures/pump-green", 0);
|
setprop("systems/failures/pump-green", 0);
|
||||||
setprop("/systems/failures/pump-yellow-eng", 0);
|
setprop("systems/failures/pump-yellow-eng", 0);
|
||||||
setprop("/systems/failures/pump-yellow-elec", 0);
|
setprop("systems/failures/pump-yellow-elec", 0);
|
||||||
setprop("/systems/failures/tank0pump1", 0);
|
setprop("systems/failures/tank0pump1", 0);
|
||||||
setprop("/systems/failures/tank0pump2", 0);
|
setprop("systems/failures/tank0pump2", 0);
|
||||||
setprop("/systems/failures/tank1pump1", 0);
|
setprop("systems/failures/tank1pump1", 0);
|
||||||
setprop("/systems/failures/tank1pump2", 0);
|
setprop("systems/failures/tank1pump2", 0);
|
||||||
setprop("/systems/failures/tank2pump1", 0);
|
setprop("systems/failures/tank2pump1", 0);
|
||||||
setprop("/systems/failures/tank2pump2", 0);
|
setprop("systems/failures/tank2pump2", 0);
|
||||||
setprop("/systems/failures/fuelmode", 0);
|
setprop("systems/failures/fuelmode", 0);
|
||||||
setprop("/systems/failures/cargo-aft-fire", 0);
|
setprop("systems/failures/cargo-aft-fire", 0);
|
||||||
setprop("/systems/failures/cargo-fwd-fire", 0);
|
setprop("systems/failures/cargo-fwd-fire", 0);
|
||||||
setprop("/systems/failures/engine-left-fire", 0);
|
setprop("systems/failures/engine-left-fire", 0);
|
||||||
setprop("/systems/failures/engine-right-fire", 0);
|
setprop("systems/failures/engine-right-fire", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
failResetOld();
|
failResetOld();
|
||||||
setprop("/systems/acconfig/autoconfig-running", 0);
|
setprop("systems/acconfig/autoconfig-running", 0);
|
||||||
setprop("/systems/acconfig/spinning", 0);
|
setprop("systems/acconfig/spinning", 0);
|
||||||
setprop("/systems/acconfig/spin", "-");
|
setprop("systems/acconfig/spin", "-");
|
||||||
setprop("/systems/acconfig/options/revision", 0);
|
setprop("systems/acconfig/options/revision", 0);
|
||||||
setprop("/systems/acconfig/new-revision", 0);
|
setprop("systems/acconfig/new-revision", 0);
|
||||||
setprop("/systems/acconfig/out-of-date", 0);
|
setprop("systems/acconfig/out-of-date", 0);
|
||||||
setprop("/systems/acconfig/mismatch-code", "0x000");
|
setprop("systems/acconfig/mismatch-code", "0x000");
|
||||||
setprop("/systems/acconfig/mismatch-reason", "XX");
|
setprop("systems/acconfig/mismatch-reason", "XX");
|
||||||
setprop("/systems/acconfig/options/keyboard-mode", 0);
|
setprop("systems/acconfig/options/keyboard-mode", 0);
|
||||||
# TODO Revert default weight-kgs to 1, when fully implemented
|
# TODO Revert default weight-kgs to 1, when fully implemented
|
||||||
setprop("/systems/acconfig/options/weight-kgs", 0);
|
setprop("systems/acconfig/options/weight-kgs", 0);
|
||||||
setprop("/systems/acconfig/options/adirs-skip", 0);
|
setprop("systems/acconfig/options/adirs-skip", 0);
|
||||||
setprop("/systems/acconfig/options/welcome-skip", 0);
|
setprop("systems/acconfig/options/welcome-skip", 0);
|
||||||
setprop("/systems/acconfig/options/no-rendering-warn", 0);
|
setprop("systems/acconfig/options/no-rendering-warn", 0);
|
||||||
setprop("/systems/acconfig/options/pfd-rate", 1);
|
setprop("systems/acconfig/options/pfd-rate", 1);
|
||||||
setprop("/systems/acconfig/options/nd-rate", 1);
|
setprop("systems/acconfig/options/nd-rate", 1);
|
||||||
setprop("/systems/acconfig/options/uecam-rate", 1);
|
setprop("systems/acconfig/options/uecam-rate", 1);
|
||||||
setprop("/systems/acconfig/options/lecam-rate", 1);
|
setprop("systems/acconfig/options/lecam-rate", 1);
|
||||||
setprop("/systems/acconfig/options/iesi-rate", 1);
|
setprop("systems/acconfig/options/iesi-rate", 1);
|
||||||
setprop("/systems/acconfig/options/autopush/show-route", 1);
|
setprop("systems/acconfig/options/autopush/show-route", 1);
|
||||||
setprop("/systems/acconfig/options/autopush/show-wingtip", 1);
|
setprop("systems/acconfig/options/autopush/show-wingtip", 1);
|
||||||
var main_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/main/dialog", "Aircraft/A320-family/AircraftConfig/main.xml");
|
var main_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/main/dialog", "Aircraft/A320-family/AircraftConfig/main.xml");
|
||||||
var welcome_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/welcome/dialog", "Aircraft/A320-family/AircraftConfig/welcome.xml");
|
var welcome_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/welcome/dialog", "Aircraft/A320-family/AircraftConfig/welcome.xml");
|
||||||
var ps_load_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psload/dialog", "Aircraft/A320-family/AircraftConfig/psload.xml");
|
var ps_load_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psload/dialog", "Aircraft/A320-family/AircraftConfig/psload.xml");
|
||||||
|
@ -121,43 +121,43 @@ var du_quality = gui.Dialog.new("sim/gui/dialogs/acconfig/du-quality/dialog", "A
|
||||||
var rendering_dlg = gui.Dialog.new("sim/gui/dialogs/rendering/dialog", "Aircraft/A320-family/AircraftConfig/rendering.xml");
|
var rendering_dlg = gui.Dialog.new("sim/gui/dialogs/rendering/dialog", "Aircraft/A320-family/AircraftConfig/rendering.xml");
|
||||||
spinning.start();
|
spinning.start();
|
||||||
init_dlg.open();
|
init_dlg.open();
|
||||||
http.load("https://raw.githubusercontent.com/legoboyvdlp/A320-family/201912/revision.txt").done(func(r) setprop("/systems/acconfig/new-revision", r.response));
|
http.load("https://raw.githubusercontent.com/legoboyvdlp/A320-family/201912/revision.txt").done(func(r) setprop("systems/acconfig/new-revision", r.response));
|
||||||
var revisionFile = (getprop("/sim/aircraft-dir") ~ "/revision.txt");
|
var revisionFile = (getprop("sim/aircraft-dir") ~ "/revision.txt");
|
||||||
var current_revision = io.readfile(revisionFile);
|
var current_revision = io.readfile(revisionFile);
|
||||||
print("A320-family Revision: " ~ current_revision);
|
print("A320-family Revision: " ~ current_revision);
|
||||||
setprop("/systems/acconfig/revision", current_revision);
|
setprop("systems/acconfig/revision", current_revision);
|
||||||
|
|
||||||
setlistener("/systems/acconfig/new-revision", func {
|
setlistener("/systems/acconfig/new-revision", func {
|
||||||
if (getprop("/systems/acconfig/new-revision") > current_revision) {
|
if (getprop("systems/acconfig/new-revision") > current_revision) {
|
||||||
setprop("/systems/acconfig/out-of-date", 1);
|
setprop("systems/acconfig/out-of-date", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/acconfig/out-of-date", 0);
|
setprop("systems/acconfig/out-of-date", 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var mismatch_chk = func {
|
var mismatch_chk = func {
|
||||||
if (num(string.replace(getprop("/sim/version/flightgear"),".","")) < 201912) {
|
if (num(string.replace(getprop("sim/version/flightgear"),".","")) < 201912) {
|
||||||
setprop("/systems/acconfig/mismatch-code", "0x121");
|
setprop("systems/acconfig/mismatch-code", "0x121");
|
||||||
setprop("/systems/acconfig/mismatch-reason", "FGFS version is too old! Please update FlightGear to at least 2019.1.2.");
|
setprop("systems/acconfig/mismatch-reason", "FGFS version is too old! Please update FlightGear to at least 2019.1.2.");
|
||||||
if (getprop("/systems/acconfig/out-of-date") != 1) {
|
if (getprop("systems/acconfig/out-of-date") != 1) {
|
||||||
error_mismatch.open();
|
error_mismatch.open();
|
||||||
}
|
}
|
||||||
libraries.systemsLoop.stop();
|
libraries.systemsLoop.stop();
|
||||||
print("Mismatch: 0x121");
|
print("Mismatch: 0x121");
|
||||||
welcome_dlg.close();
|
welcome_dlg.close();
|
||||||
} else if (getprop("/gear/gear[0]/wow") == 0 or getprop("/position/altitude-ft") >= 15000) {
|
} else if (getprop("gear/gear[0]/wow") == 0 or getprop("position/altitude-ft") >= 15000) {
|
||||||
setprop("/systems/acconfig/mismatch-code", "0x223");
|
setprop("systems/acconfig/mismatch-code", "0x223");
|
||||||
setprop("/systems/acconfig/mismatch-reason", "Preposterous configuration detected for initialization. Check your position or scenery.");
|
setprop("systems/acconfig/mismatch-reason", "Preposterous configuration detected for initialization. Check your position or scenery.");
|
||||||
if (getprop("/systems/acconfig/out-of-date") != 1) {
|
if (getprop("systems/acconfig/out-of-date") != 1) {
|
||||||
error_mismatch.open();
|
error_mismatch.open();
|
||||||
}
|
}
|
||||||
libraries.systemsLoop.stop();
|
libraries.systemsLoop.stop();
|
||||||
print("Mismatch: 0x223");
|
print("Mismatch: 0x223");
|
||||||
welcome_dlg.close();
|
welcome_dlg.close();
|
||||||
} else if (getprop("/systems/acconfig/libraries-loaded") != 1) {
|
} else if (getprop("systems/acconfig/libraries-loaded") != 1) {
|
||||||
setprop("/systems/acconfig/mismatch-code", "0x247");
|
setprop("systems/acconfig/mismatch-code", "0x247");
|
||||||
setprop("/systems/acconfig/mismatch-reason", "System files are missing or damaged. Please download a new copy of the aircraft.");
|
setprop("systems/acconfig/mismatch-reason", "System files are missing or damaged. Please download a new copy of the aircraft.");
|
||||||
if (getprop("/systems/acconfig/out-of-date") != 1) {
|
if (getprop("systems/acconfig/out-of-date") != 1) {
|
||||||
error_mismatch.open();
|
error_mismatch.open();
|
||||||
}
|
}
|
||||||
libraries.systemsLoop.stop();
|
libraries.systemsLoop.stop();
|
||||||
|
@ -168,74 +168,74 @@ var mismatch_chk = func {
|
||||||
|
|
||||||
setlistener("/sim/signals/fdm-initialized", func {
|
setlistener("/sim/signals/fdm-initialized", func {
|
||||||
init_dlg.close();
|
init_dlg.close();
|
||||||
if (getprop("/systems/acconfig/out-of-date") == 1) {
|
if (getprop("systems/acconfig/out-of-date") == 1) {
|
||||||
update_dlg.open();
|
update_dlg.open();
|
||||||
print("System: The A320-family is out of date!");
|
print("System: The A320-family is out of date!");
|
||||||
}
|
}
|
||||||
mismatch_chk();
|
mismatch_chk();
|
||||||
readSettings();
|
readSettings();
|
||||||
if (getprop("/systems/acconfig/out-of-date") != 1 and getprop("/systems/acconfig/options/revision") < current_revision and getprop("/systems/acconfig/mismatch-code") == "0x000") {
|
if (getprop("systems/acconfig/out-of-date") != 1 and getprop("systems/acconfig/options/revision") < current_revision and getprop("systems/acconfig/mismatch-code") == "0x000") {
|
||||||
updated_dlg.open();
|
updated_dlg.open();
|
||||||
if (getprop("/systems/acconfig/options/no-rendering-warn") != 1) {
|
if (getprop("systems/acconfig/options/no-rendering-warn") != 1) {
|
||||||
renderingSettings.check();
|
renderingSettings.check();
|
||||||
}
|
}
|
||||||
} else if (getprop("/systems/acconfig/out-of-date") != 1 and getprop("/systems/acconfig/mismatch-code") == "0x000" and getprop("/systems/acconfig/options/welcome-skip") != 1) {
|
} else if (getprop("systems/acconfig/out-of-date") != 1 and getprop("systems/acconfig/mismatch-code") == "0x000" and getprop("systems/acconfig/options/welcome-skip") != 1) {
|
||||||
welcome_dlg.open();
|
welcome_dlg.open();
|
||||||
if (getprop("/systems/acconfig/options/no-rendering-warn") != 1) {
|
if (getprop("systems/acconfig/options/no-rendering-warn") != 1) {
|
||||||
renderingSettings.check();
|
renderingSettings.check();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setprop("/systems/acconfig/options/revision", current_revision);
|
setprop("systems/acconfig/options/revision", current_revision);
|
||||||
writeSettings();
|
writeSettings();
|
||||||
spinning.stop();
|
spinning.stop();
|
||||||
});
|
});
|
||||||
|
|
||||||
var renderingSettings = {
|
var renderingSettings = {
|
||||||
check: func() {
|
check: func() {
|
||||||
var rembrandt = getprop("/sim/rendering/rembrandt/enabled");
|
var rembrandt = getprop("sim/rendering/rembrandt/enabled");
|
||||||
var ALS = getprop("/sim/rendering/shaders/skydome");
|
var ALS = getprop("sim/rendering/shaders/skydome");
|
||||||
var customSettings = getprop("/sim/rendering/shaders/custom-settings") == 1;
|
var customSettings = getprop("sim/rendering/shaders/custom-settings") == 1;
|
||||||
var landmass = getprop("/sim/rendering/shaders/landmass") >= 4;
|
var landmass = getprop("sim/rendering/shaders/landmass") >= 4;
|
||||||
var model = getprop("/sim/rendering/shaders/model") >= 2;
|
var model = getprop("sim/rendering/shaders/model") >= 2;
|
||||||
if (!rembrandt and (!ALS or !customSettings or !landmass or !model)) {
|
if (!rembrandt and (!ALS or !customSettings or !landmass or !model)) {
|
||||||
rendering_dlg.open();
|
rendering_dlg.open();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fixAll: func() {
|
fixAll: func() {
|
||||||
me.fixCore();
|
me.fixCore();
|
||||||
var landmass = getprop("/sim/rendering/shaders/landmass") >= 4;
|
var landmass = getprop("sim/rendering/shaders/landmass") >= 4;
|
||||||
var model = getprop("/sim/rendering/shaders/model") >= 2;
|
var model = getprop("sim/rendering/shaders/model") >= 2;
|
||||||
if (!landmass) {
|
if (!landmass) {
|
||||||
setprop("/sim/rendering/shaders/landmass", 4);
|
setprop("sim/rendering/shaders/landmass", 4);
|
||||||
}
|
}
|
||||||
if (!model) {
|
if (!model) {
|
||||||
setprop("/sim/rendering/shaders/model", 2);
|
setprop("sim/rendering/shaders/model", 2);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fixCore: func() {
|
fixCore: func() {
|
||||||
setprop("/sim/rendering/shaders/skydome", 1); # ALS on
|
setprop("sim/rendering/shaders/skydome", 1); # ALS on
|
||||||
setprop("/sim/rendering/shaders/custom-settings", 1);
|
setprop("sim/rendering/shaders/custom-settings", 1);
|
||||||
gui.popupTip("Rendering Settings updated!");
|
gui.popupTip("Rendering Settings updated!");
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var readSettings = func {
|
var readSettings = func {
|
||||||
io.read_properties(getprop("/sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options");
|
io.read_properties(getprop("sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options");
|
||||||
setprop("/options/system/keyboard-mode", getprop("/systems/acconfig/options/keyboard-mode"));
|
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/weight-kgs", getprop("systems/acconfig/options/weight-kgs"));
|
||||||
setprop("/controls/adirs/skip", getprop("/systems/acconfig/options/adirs-skip"));
|
setprop("controls/adirs/skip", getprop("systems/acconfig/options/adirs-skip"));
|
||||||
setprop("/sim/model/autopush/route/show", getprop("/systems/acconfig/options/autopush/show-route"));
|
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("sim/model/autopush/route/show-wingtip", getprop("systems/acconfig/options/autopush/show-wingtip"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var writeSettings = func {
|
var writeSettings = func {
|
||||||
setprop("/systems/acconfig/options/keyboard-mode", getprop("/options/system/keyboard-mode"));
|
setprop("systems/acconfig/options/keyboard-mode", getprop("options/system/keyboard-mode"));
|
||||||
setprop("/systems/acconfig/options/weight-kgs", getprop("/options/system/weight-kgs"));
|
setprop("systems/acconfig/options/weight-kgs", getprop("options/system/weight-kgs"));
|
||||||
setprop("/systems/acconfig/options/adirs-skip", getprop("/controls/adirs/skip"));
|
setprop("systems/acconfig/options/adirs-skip", getprop("controls/adirs/skip"));
|
||||||
setprop("/systems/acconfig/options/autopush/show-route", getprop("/sim/model/autopush/route/show"));
|
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/autopush/show-wingtip", getprop("sim/model/autopush/route/show-wingtip"));
|
||||||
io.write_properties(getprop("/sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options");
|
io.write_properties(getprop("sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options");
|
||||||
}
|
}
|
||||||
|
|
||||||
################
|
################
|
||||||
|
@ -244,47 +244,47 @@ var writeSettings = func {
|
||||||
|
|
||||||
# Cold and Dark
|
# Cold and Dark
|
||||||
var colddark = func {
|
var colddark = func {
|
||||||
if (getprop("/systems/acconfig/mismatch-code") == "0x000") {
|
if (getprop("systems/acconfig/mismatch-code") == "0x000") {
|
||||||
spinning.start();
|
spinning.start();
|
||||||
ps_loaded_dlg.close();
|
ps_loaded_dlg.close();
|
||||||
ps_load_dlg.open();
|
ps_load_dlg.open();
|
||||||
setprop("/systems/acconfig/autoconfig-running", 1);
|
setprop("systems/acconfig/autoconfig-running", 1);
|
||||||
setprop("/controls/gear/brake-left", 1);
|
setprop("controls/gear/brake-left", 1);
|
||||||
setprop("/controls/gear/brake-right", 1);
|
setprop("controls/gear/brake-right", 1);
|
||||||
# Initial shutdown, and reinitialization.
|
# Initial shutdown, and reinitialization.
|
||||||
setprop("/controls/engines/engine-start-switch", 1);
|
setprop("controls/engines/engine-start-switch", 1);
|
||||||
setprop("/controls/engines/engine[0]/cutoff-switch", 1);
|
setprop("controls/engines/engine[0]/cutoff-switch", 1);
|
||||||
setprop("/controls/engines/engine[1]/cutoff-switch", 1);
|
setprop("controls/engines/engine[1]/cutoff-switch", 1);
|
||||||
setprop("/controls/flight/slats", 0.000);
|
setprop("controls/flight/slats", 0.000);
|
||||||
setprop("/controls/flight/flaps", 0.000);
|
setprop("controls/flight/flaps", 0.000);
|
||||||
setprop("/controls/flight/flap-lever", 0);
|
setprop("controls/flight/flap-lever", 0);
|
||||||
setprop("/controls/flight/flap-pos", 0);
|
setprop("controls/flight/flap-pos", 0);
|
||||||
setprop("/controls/flight/flap-txt", " ");
|
setprop("controls/flight/flap-txt", " ");
|
||||||
libraries.flaptimer.stop();
|
libraries.flaptimer.stop();
|
||||||
setprop("/controls/flight/speedbrake-arm", 0);
|
setprop("controls/flight/speedbrake-arm", 0);
|
||||||
setprop("/controls/flight/speedbrake", 0);
|
setprop("controls/flight/speedbrake", 0);
|
||||||
setprop("/controls/gear/gear-down", 1);
|
setprop("controls/gear/gear-down", 1);
|
||||||
setprop("/controls/flight/elevator-trim", 0);
|
setprop("controls/flight/elevator-trim", 0);
|
||||||
setprop("/controls/switches/beacon", 0);
|
setprop("controls/switches/beacon", 0);
|
||||||
setprop("/controls/switches/strobe", 0.0);
|
setprop("controls/switches/strobe", 0.0);
|
||||||
setprop("/controls/switches/wing-lights", 0);
|
setprop("controls/switches/wing-lights", 0);
|
||||||
setprop("/controls/lighting/nav-lights-switch", 0);
|
setprop("controls/lighting/nav-lights-switch", 0);
|
||||||
setprop("/controls/lighting/turnoff-light-switch", 0);
|
setprop("controls/lighting/turnoff-light-switch", 0);
|
||||||
setprop("/controls/lighting/taxi-light-switch", 0.0);
|
setprop("controls/lighting/taxi-light-switch", 0.0);
|
||||||
setprop("/controls/switches/landing-lights-l", 0.0);
|
setprop("controls/switches/landing-lights-l", 0.0);
|
||||||
setprop("/controls/switches/landing-lights-r", 0.0);
|
setprop("controls/switches/landing-lights-r", 0.0);
|
||||||
setprop("/controls/atc/mode-knob", 0);
|
setprop("controls/atc/mode-knob", 0);
|
||||||
setprop("/controls/lighting/fcu-panel-knb", 0);
|
setprop("controls/lighting/fcu-panel-knb", 0);
|
||||||
setprop("/controls/lighting/main-panel-knb", 0);
|
setprop("controls/lighting/main-panel-knb", 0);
|
||||||
setprop("/controls/lighting/overhead-panel-knb", 0);
|
setprop("controls/lighting/overhead-panel-knb", 0);
|
||||||
atc.transponderPanel.modeSwitch(1);
|
atc.transponderPanel.modeSwitch(1);
|
||||||
libraries.systemsInit();
|
libraries.systemsInit();
|
||||||
failResetOld();
|
failResetOld();
|
||||||
if (getprop("/engines/engine[1]/n2-actual") < 2) {
|
if (getprop("engines/engine[1]/n2-actual") < 2) {
|
||||||
colddark_b();
|
colddark_b();
|
||||||
} else {
|
} else {
|
||||||
var colddark_eng_off = setlistener("/engines/engine[1]/n2-actual", func {
|
var colddark_eng_off = setlistener("/engines/engine[1]/n2-actual", func {
|
||||||
if (getprop("/engines/engine[1]/n2-actual") < 2) {
|
if (getprop("engines/engine[1]/n2-actual") < 2) {
|
||||||
removelistener(colddark_eng_off);
|
removelistener(colddark_eng_off);
|
||||||
colddark_b();
|
colddark_b();
|
||||||
}
|
}
|
||||||
|
@ -294,12 +294,12 @@ var colddark = func {
|
||||||
}
|
}
|
||||||
var colddark_b = func {
|
var colddark_b = func {
|
||||||
# Continues the Cold and Dark script, after engines fully shutdown.
|
# Continues the Cold and Dark script, after engines fully shutdown.
|
||||||
setprop("/controls/APU/master", 0);
|
setprop("controls/APU/master", 0);
|
||||||
setprop("/controls/APU/start", 0);
|
setprop("controls/APU/start", 0);
|
||||||
settimer(func {
|
settimer(func {
|
||||||
setprop("/controls/gear/brake-left", 0);
|
setprop("controls/gear/brake-left", 0);
|
||||||
setprop("/controls/gear/brake-right", 0);
|
setprop("controls/gear/brake-right", 0);
|
||||||
setprop("/systems/acconfig/autoconfig-running", 0);
|
setprop("systems/acconfig/autoconfig-running", 0);
|
||||||
ps_load_dlg.close();
|
ps_load_dlg.close();
|
||||||
ps_loaded_dlg.open();
|
ps_loaded_dlg.open();
|
||||||
spinning.stop();
|
spinning.stop();
|
||||||
|
@ -308,39 +308,39 @@ var colddark_b = func {
|
||||||
|
|
||||||
# Ready to Start Eng
|
# Ready to Start Eng
|
||||||
var beforestart = func {
|
var beforestart = func {
|
||||||
if (getprop("/systems/acconfig/mismatch-code") == "0x000") {
|
if (getprop("systems/acconfig/mismatch-code") == "0x000") {
|
||||||
spinning.start();
|
spinning.start();
|
||||||
ps_loaded_dlg.close();
|
ps_loaded_dlg.close();
|
||||||
ps_load_dlg.open();
|
ps_load_dlg.open();
|
||||||
setprop("/systems/acconfig/autoconfig-running", 1);
|
setprop("systems/acconfig/autoconfig-running", 1);
|
||||||
setprop("/controls/gear/brake-left", 1);
|
setprop("controls/gear/brake-left", 1);
|
||||||
setprop("/controls/gear/brake-right", 1);
|
setprop("controls/gear/brake-right", 1);
|
||||||
# First, we set everything to cold and dark.
|
# First, we set everything to cold and dark.
|
||||||
setprop("/controls/engines/engine-start-switch", 1);
|
setprop("controls/engines/engine-start-switch", 1);
|
||||||
setprop("/controls/engines/engine[0]/cutoff-switch", 1);
|
setprop("controls/engines/engine[0]/cutoff-switch", 1);
|
||||||
setprop("/controls/engines/engine[1]/cutoff-switch", 1);
|
setprop("controls/engines/engine[1]/cutoff-switch", 1);
|
||||||
setprop("/controls/flight/slats", 0.000);
|
setprop("controls/flight/slats", 0.000);
|
||||||
setprop("/controls/flight/flaps", 0.000);
|
setprop("controls/flight/flaps", 0.000);
|
||||||
setprop("/controls/flight/flap-lever", 0);
|
setprop("controls/flight/flap-lever", 0);
|
||||||
setprop("/controls/flight/flap-pos", 0);
|
setprop("controls/flight/flap-pos", 0);
|
||||||
setprop("/controls/flight/flap-txt", " ");
|
setprop("controls/flight/flap-txt", " ");
|
||||||
libraries.flaptimer.stop();
|
libraries.flaptimer.stop();
|
||||||
setprop("/controls/flight/speedbrake-arm", 0);
|
setprop("controls/flight/speedbrake-arm", 0);
|
||||||
setprop("/controls/flight/speedbrake", 0);
|
setprop("controls/flight/speedbrake", 0);
|
||||||
setprop("/controls/gear/gear-down", 1);
|
setprop("controls/gear/gear-down", 1);
|
||||||
setprop("/controls/flight/elevator-trim", 0);
|
setprop("controls/flight/elevator-trim", 0);
|
||||||
libraries.systemsInit();
|
libraries.systemsInit();
|
||||||
failResetOld();
|
failResetOld();
|
||||||
setprop("/controls/APU/master", 0);
|
setprop("controls/APU/master", 0);
|
||||||
setprop("/controls/APU/start", 0);
|
setprop("controls/APU/start", 0);
|
||||||
|
|
||||||
# Now the Startup!
|
# Now the Startup!
|
||||||
props.globals.getNode("/controls/electrical/switches/bat-1").setValue(1);
|
props.globals.getNode("controls/electrical/switches/bat-1").setValue(1);
|
||||||
props.globals.getNode("/controls/electrical/switches/bat-2").setValue(1);
|
props.globals.getNode("controls/electrical/switches/bat-2").setValue(1);
|
||||||
setprop("/controls/APU/master", 1);
|
setprop("controls/APU/master", 1);
|
||||||
setprop("/controls/APU/start", 1);
|
setprop("controls/APU/start", 1);
|
||||||
var apu_rpm_chk = setlistener("/systems/apu/rpm", func {
|
var apu_rpm_chk = setlistener("/systems/apu/rpm", func {
|
||||||
if (getprop("/systems/apu/rpm") >= 98) {
|
if (getprop("systems/apu/rpm") >= 98) {
|
||||||
removelistener(apu_rpm_chk);
|
removelistener(apu_rpm_chk);
|
||||||
beforestart_b();
|
beforestart_b();
|
||||||
}
|
}
|
||||||
|
@ -355,21 +355,21 @@ var beforestart_b = func {
|
||||||
systems.FUEL.Switches.pumpCenter2.setValue(1);
|
systems.FUEL.Switches.pumpCenter2.setValue(1);
|
||||||
systems.FUEL.Switches.pumpRight1.setValue(1);
|
systems.FUEL.Switches.pumpRight1.setValue(1);
|
||||||
systems.FUEL.Switches.pumpRight2.setValue(1);
|
systems.FUEL.Switches.pumpRight2.setValue(1);
|
||||||
setprop("/controls/lighting/fcu-panel-knb", 1);
|
setprop("controls/lighting/fcu-panel-knb", 1);
|
||||||
setprop("/controls/lighting/main-panel-knb", 1);
|
setprop("controls/lighting/main-panel-knb", 1);
|
||||||
setprop("/controls/lighting/overhead-panel-knb", 1);
|
setprop("controls/lighting/overhead-panel-knb", 1);
|
||||||
setprop("/controls/electrical/switches/apu", 1);
|
setprop("controls/electrical/switches/apu", 1);
|
||||||
setprop("/controls/electrical/switches/galley", 1);
|
setprop("controls/electrical/switches/galley", 1);
|
||||||
setprop("/controls/electrical/switches/gen-1", 1);
|
setprop("controls/electrical/switches/gen-1", 1);
|
||||||
setprop("/controls/electrical/switches/gen-2", 1);
|
setprop("controls/electrical/switches/gen-2", 1);
|
||||||
setprop("/controls/pneumatic/switches/bleedapu", 1);
|
setprop("controls/pneumatic/switches/bleedapu", 1);
|
||||||
setprop("/controls/pneumatic/switches/bleed1", 1);
|
setprop("controls/pneumatic/switches/bleed1", 1);
|
||||||
setprop("/controls/pneumatic/switches/bleed2", 1);
|
setprop("controls/pneumatic/switches/bleed2", 1);
|
||||||
setprop("/controls/pneumatic/switches/pack1", 1);
|
setprop("controls/pneumatic/switches/pack1", 1);
|
||||||
setprop("/controls/pneumatic/switches/pack2", 1);
|
setprop("controls/pneumatic/switches/pack2", 1);
|
||||||
setprop("/controls/adirs/ir[0]/knob","1");
|
setprop("controls/adirs/ir[0]/knob","1");
|
||||||
setprop("/controls/adirs/ir[1]/knob","1");
|
setprop("controls/adirs/ir[1]/knob","1");
|
||||||
setprop("/controls/adirs/ir[2]/knob","1");
|
setprop("controls/adirs/ir[2]/knob","1");
|
||||||
if (systems.ADIRSnew.Switches.adrSw[0].getValue() != 1) { systems.ADIRSControlPanel.adrSw(0); }
|
if (systems.ADIRSnew.Switches.adrSw[0].getValue() != 1) { systems.ADIRSControlPanel.adrSw(0); }
|
||||||
if (systems.ADIRSnew.Switches.adrSw[1].getValue() != 1) { systems.ADIRSControlPanel.adrSw(1); }
|
if (systems.ADIRSnew.Switches.adrSw[1].getValue() != 1) { systems.ADIRSControlPanel.adrSw(1); }
|
||||||
if (systems.ADIRSnew.Switches.adrSw[2].getValue() != 1) { systems.ADIRSControlPanel.adrSw(2); }
|
if (systems.ADIRSnew.Switches.adrSw[2].getValue() != 1) { systems.ADIRSControlPanel.adrSw(2); }
|
||||||
|
@ -379,18 +379,18 @@ var beforestart_b = func {
|
||||||
systems.ADIRSnew.ADIRunits[0].instAlign();
|
systems.ADIRSnew.ADIRunits[0].instAlign();
|
||||||
systems.ADIRSnew.ADIRunits[1].instAlign();
|
systems.ADIRSnew.ADIRunits[1].instAlign();
|
||||||
systems.ADIRSnew.ADIRunits[2].instAlign();
|
systems.ADIRSnew.ADIRunits[2].instAlign();
|
||||||
setprop("/controls/adirs/mcducbtn", 1);
|
setprop("controls/adirs/mcducbtn", 1);
|
||||||
setprop("/controls/switches/beacon", 1);
|
setprop("controls/switches/beacon", 1);
|
||||||
setprop("/controls/lighting/nav-lights-switch", 1);
|
setprop("controls/lighting/nav-lights-switch", 1);
|
||||||
setprop("/controls/radio/rmp[0]/on", 1);
|
setprop("controls/radio/rmp[0]/on", 1);
|
||||||
setprop("/controls/radio/rmp[1]/on", 1);
|
setprop("controls/radio/rmp[1]/on", 1);
|
||||||
setprop("/controls/radio/rmp[2]/on", 1);
|
setprop("controls/radio/rmp[2]/on", 1);
|
||||||
setprop("/systems/fadec/power-avail", 1);
|
setprop("systems/fadec/power-avail", 1);
|
||||||
setprop("/systems/fadec/powered-time", -310);
|
setprop("systems/fadec/powered-time", -310);
|
||||||
settimer(func {
|
settimer(func {
|
||||||
setprop("/controls/gear/brake-left", 0);
|
setprop("controls/gear/brake-left", 0);
|
||||||
setprop("/controls/gear/brake-right", 0);
|
setprop("controls/gear/brake-right", 0);
|
||||||
setprop("/systems/acconfig/autoconfig-running", 0);
|
setprop("systems/acconfig/autoconfig-running", 0);
|
||||||
ps_load_dlg.close();
|
ps_load_dlg.close();
|
||||||
ps_loaded_dlg.open();
|
ps_loaded_dlg.open();
|
||||||
spinning.stop();
|
spinning.stop();
|
||||||
|
@ -399,39 +399,39 @@ var beforestart_b = func {
|
||||||
|
|
||||||
# Ready to Taxi
|
# Ready to Taxi
|
||||||
var taxi = func {
|
var taxi = func {
|
||||||
if (getprop("/systems/acconfig/mismatch-code") == "0x000") {
|
if (getprop("systems/acconfig/mismatch-code") == "0x000") {
|
||||||
spinning.start();
|
spinning.start();
|
||||||
ps_loaded_dlg.close();
|
ps_loaded_dlg.close();
|
||||||
ps_load_dlg.open();
|
ps_load_dlg.open();
|
||||||
setprop("/systems/acconfig/autoconfig-running", 1);
|
setprop("systems/acconfig/autoconfig-running", 1);
|
||||||
setprop("/controls/gear/brake-left", 1);
|
setprop("controls/gear/brake-left", 1);
|
||||||
setprop("/controls/gear/brake-right", 1);
|
setprop("controls/gear/brake-right", 1);
|
||||||
# First, we set everything to cold and dark.
|
# First, we set everything to cold and dark.
|
||||||
setprop("/controls/engines/engine-start-switch", 1);
|
setprop("controls/engines/engine-start-switch", 1);
|
||||||
setprop("/controls/engines/engine[0]/cutoff-switch", 1);
|
setprop("controls/engines/engine[0]/cutoff-switch", 1);
|
||||||
setprop("/controls/engines/engine[1]/cutoff-switch", 1);
|
setprop("controls/engines/engine[1]/cutoff-switch", 1);
|
||||||
setprop("/controls/flight/slats", 0.000);
|
setprop("controls/flight/slats", 0.000);
|
||||||
setprop("/controls/flight/flaps", 0.000);
|
setprop("controls/flight/flaps", 0.000);
|
||||||
setprop("/controls/flight/flap-lever", 0);
|
setprop("controls/flight/flap-lever", 0);
|
||||||
setprop("/controls/flight/flap-pos", 0);
|
setprop("controls/flight/flap-pos", 0);
|
||||||
setprop("/controls/flight/flap-txt", " ");
|
setprop("controls/flight/flap-txt", " ");
|
||||||
libraries.flaptimer.stop();
|
libraries.flaptimer.stop();
|
||||||
setprop("/controls/flight/speedbrake-arm", 0);
|
setprop("controls/flight/speedbrake-arm", 0);
|
||||||
setprop("/controls/flight/speedbrake", 0);
|
setprop("controls/flight/speedbrake", 0);
|
||||||
setprop("/controls/gear/gear-down", 1);
|
setprop("controls/gear/gear-down", 1);
|
||||||
setprop("/controls/flight/elevator-trim", 0);
|
setprop("controls/flight/elevator-trim", 0);
|
||||||
libraries.systemsInit();
|
libraries.systemsInit();
|
||||||
failResetOld();
|
failResetOld();
|
||||||
setprop("/controls/APU/master", 0);
|
setprop("controls/APU/master", 0);
|
||||||
setprop("/controls/APU/start", 0);
|
setprop("controls/APU/start", 0);
|
||||||
|
|
||||||
# Now the Startup!
|
# Now the Startup!
|
||||||
props.globals.getNode("/controls/electrical/switches/bat-1").setValue(1);
|
props.globals.getNode("controls/electrical/switches/bat-1").setValue(1);
|
||||||
props.globals.getNode("/controls/electrical/switches/bat-2").setValue(1);
|
props.globals.getNode("controls/electrical/switches/bat-2").setValue(1);
|
||||||
setprop("/controls/APU/master", 1);
|
setprop("controls/APU/master", 1);
|
||||||
setprop("/controls/APU/start", 1);
|
setprop("controls/APU/start", 1);
|
||||||
var apu_rpm_chk = setlistener("/systems/apu/rpm", func {
|
var apu_rpm_chk = setlistener("/systems/apu/rpm", func {
|
||||||
if (getprop("/systems/apu/rpm") >= 98) {
|
if (getprop("systems/apu/rpm") >= 98) {
|
||||||
removelistener(apu_rpm_chk);
|
removelistener(apu_rpm_chk);
|
||||||
taxi_b();
|
taxi_b();
|
||||||
}
|
}
|
||||||
|
@ -446,21 +446,21 @@ var taxi_b = func {
|
||||||
systems.FUEL.Switches.pumpCenter2.setValue(1);
|
systems.FUEL.Switches.pumpCenter2.setValue(1);
|
||||||
systems.FUEL.Switches.pumpRight1.setValue(1);
|
systems.FUEL.Switches.pumpRight1.setValue(1);
|
||||||
systems.FUEL.Switches.pumpRight2.setValue(1);
|
systems.FUEL.Switches.pumpRight2.setValue(1);
|
||||||
setprop("/controls/lighting/fcu-panel-knb", 1);
|
setprop("controls/lighting/fcu-panel-knb", 1);
|
||||||
setprop("/controls/lighting/main-panel-knb", 1);
|
setprop("controls/lighting/main-panel-knb", 1);
|
||||||
setprop("/controls/lighting/overhead-panel-knb", 1);
|
setprop("controls/lighting/overhead-panel-knb", 1);
|
||||||
setprop("/controls/electrical/switches/apu", 1);
|
setprop("controls/electrical/switches/apu", 1);
|
||||||
setprop("/controls/electrical/switches/galley", 1);
|
setprop("controls/electrical/switches/galley", 1);
|
||||||
setprop("/controls/electrical/switches/gen-1", 1);
|
setprop("controls/electrical/switches/gen-1", 1);
|
||||||
setprop("/controls/electrical/switches/gen-2", 1);
|
setprop("controls/electrical/switches/gen-2", 1);
|
||||||
setprop("/controls/pneumatic/switches/bleedapu", 1);
|
setprop("controls/pneumatic/switches/bleedapu", 1);
|
||||||
setprop("/controls/pneumatic/switches/bleed1", 1);
|
setprop("controls/pneumatic/switches/bleed1", 1);
|
||||||
setprop("/controls/pneumatic/switches/bleed2", 1);
|
setprop("controls/pneumatic/switches/bleed2", 1);
|
||||||
setprop("/controls/pneumatic/switches/pack1", 1);
|
setprop("controls/pneumatic/switches/pack1", 1);
|
||||||
setprop("/controls/pneumatic/switches/pack2", 1);
|
setprop("controls/pneumatic/switches/pack2", 1);
|
||||||
setprop("/controls/adirs/ir[0]/knob","1");
|
setprop("controls/adirs/ir[0]/knob","1");
|
||||||
setprop("/controls/adirs/ir[1]/knob","1");
|
setprop("controls/adirs/ir[1]/knob","1");
|
||||||
setprop("/controls/adirs/ir[2]/knob","1");
|
setprop("controls/adirs/ir[2]/knob","1");
|
||||||
if (systems.ADIRSnew.Switches.adrSw[0].getValue() != 1) { systems.ADIRSControlPanel.adrSw(0); }
|
if (systems.ADIRSnew.Switches.adrSw[0].getValue() != 1) { systems.ADIRSControlPanel.adrSw(0); }
|
||||||
if (systems.ADIRSnew.Switches.adrSw[1].getValue() != 1) { systems.ADIRSControlPanel.adrSw(1); }
|
if (systems.ADIRSnew.Switches.adrSw[1].getValue() != 1) { systems.ADIRSControlPanel.adrSw(1); }
|
||||||
if (systems.ADIRSnew.Switches.adrSw[2].getValue() != 1) { systems.ADIRSControlPanel.adrSw(2); }
|
if (systems.ADIRSnew.Switches.adrSw[2].getValue() != 1) { systems.ADIRSControlPanel.adrSw(2); }
|
||||||
|
@ -470,41 +470,41 @@ var taxi_b = func {
|
||||||
systems.ADIRSnew.ADIRunits[0].instAlign();
|
systems.ADIRSnew.ADIRunits[0].instAlign();
|
||||||
systems.ADIRSnew.ADIRunits[1].instAlign();
|
systems.ADIRSnew.ADIRunits[1].instAlign();
|
||||||
systems.ADIRSnew.ADIRunits[2].instAlign();
|
systems.ADIRSnew.ADIRunits[2].instAlign();
|
||||||
setprop("/controls/adirs/mcducbtn", 1);
|
setprop("controls/adirs/mcducbtn", 1);
|
||||||
setprop("/controls/switches/beacon", 1);
|
setprop("controls/switches/beacon", 1);
|
||||||
setprop("/controls/switches/wing-lights", 1);
|
setprop("controls/switches/wing-lights", 1);
|
||||||
setprop("/controls/lighting/nav-lights-switch", 1);
|
setprop("controls/lighting/nav-lights-switch", 1);
|
||||||
setprop("/controls/radio/rmp[0]/on", 1);
|
setprop("controls/radio/rmp[0]/on", 1);
|
||||||
setprop("/controls/radio/rmp[1]/on", 1);
|
setprop("controls/radio/rmp[1]/on", 1);
|
||||||
setprop("/controls/radio/rmp[2]/on", 1);
|
setprop("controls/radio/rmp[2]/on", 1);
|
||||||
setprop("/controls/atc/mode-knob", 2);
|
setprop("controls/atc/mode-knob", 2);
|
||||||
atc.transponderPanel.modeSwitch(3);
|
atc.transponderPanel.modeSwitch(3);
|
||||||
setprop("/systems/fadec/power-avail", 1);
|
setprop("systems/fadec/power-avail", 1);
|
||||||
setprop("/systems/fadec/powered-time", -310);
|
setprop("systems/fadec/powered-time", -310);
|
||||||
setprop("/controls/lighting/turnoff-light-switch", 1);
|
setprop("controls/lighting/turnoff-light-switch", 1);
|
||||||
setprop("/controls/lighting/taxi-light-switch", 0.5);
|
setprop("controls/lighting/taxi-light-switch", 0.5);
|
||||||
setprop("/controls/switches/landing-lights-l", 0.5);
|
setprop("controls/switches/landing-lights-l", 0.5);
|
||||||
setprop("/controls/switches/landing-lights-r", 0.5);
|
setprop("controls/switches/landing-lights-r", 0.5);
|
||||||
setprop("/instrumentation/altimeter[0]/setting-inhg", getprop("/environment/pressure-sea-level-inhg"));
|
setprop("instrumentation/altimeter[0]/setting-inhg", getprop("environment/pressure-sea-level-inhg"));
|
||||||
settimer(taxi_c, 2);
|
settimer(taxi_c, 2);
|
||||||
}
|
}
|
||||||
var taxi_c = func {
|
var taxi_c = func {
|
||||||
setprop("/controls/engines/engine-start-switch", 2);
|
setprop("controls/engines/engine-start-switch", 2);
|
||||||
setprop("/controls/engines/engine[0]/cutoff-switch", 0);
|
setprop("controls/engines/engine[0]/cutoff-switch", 0);
|
||||||
setprop("/controls/engines/engine[1]/cutoff-switch", 0);
|
setprop("controls/engines/engine[1]/cutoff-switch", 0);
|
||||||
settimer(func {
|
settimer(func {
|
||||||
taxi_d();
|
taxi_d();
|
||||||
}, 10);
|
}, 10);
|
||||||
}
|
}
|
||||||
var taxi_d = func {
|
var taxi_d = func {
|
||||||
# After Start items.
|
# After Start items.
|
||||||
setprop("/controls/engines/engine-start-switch", 1);
|
setprop("controls/engines/engine-start-switch", 1);
|
||||||
setprop("/controls/APU/master", 0);
|
setprop("controls/APU/master", 0);
|
||||||
setprop("/controls/APU/start", 0);
|
setprop("controls/APU/start", 0);
|
||||||
setprop("/controls/pneumatic/switches/bleedapu", 0);
|
setprop("controls/pneumatic/switches/bleedapu", 0);
|
||||||
setprop("/controls/gear/brake-left", 0);
|
setprop("controls/gear/brake-left", 0);
|
||||||
setprop("/controls/gear/brake-right", 0);
|
setprop("controls/gear/brake-right", 0);
|
||||||
setprop("/systems/acconfig/autoconfig-running", 0);
|
setprop("systems/acconfig/autoconfig-running", 0);
|
||||||
ps_load_dlg.close();
|
ps_load_dlg.close();
|
||||||
ps_loaded_dlg.open();
|
ps_loaded_dlg.open();
|
||||||
spinning.stop();
|
spinning.stop();
|
||||||
|
@ -512,30 +512,30 @@ var taxi_d = func {
|
||||||
|
|
||||||
# Ready to Takeoff
|
# Ready to Takeoff
|
||||||
var takeoff = func {
|
var takeoff = func {
|
||||||
if (getprop("/systems/acconfig/mismatch-code") == "0x000") {
|
if (getprop("systems/acconfig/mismatch-code") == "0x000") {
|
||||||
# The same as taxi, except we set some things afterwards.
|
# The same as taxi, except we set some things afterwards.
|
||||||
taxi();
|
taxi();
|
||||||
var eng_one_chk_c = setlistener("/engines/engine[0]/state", func {
|
var eng_one_chk_c = setlistener("/engines/engine[0]/state", func {
|
||||||
if (getprop("/engines/engine[0]/state") == 3) {
|
if (getprop("engines/engine[0]/state") == 3) {
|
||||||
removelistener(eng_one_chk_c);
|
removelistener(eng_one_chk_c);
|
||||||
setprop("/controls/switches/strobe", 1.0);
|
setprop("controls/switches/strobe", 1.0);
|
||||||
setprop("/controls/lighting/taxi-light-switch", 1);
|
setprop("controls/lighting/taxi-light-switch", 1);
|
||||||
setprop("/controls/switches/landing-lights-l", 1);
|
setprop("controls/switches/landing-lights-l", 1);
|
||||||
setprop("/controls/switches/landing-lights-r", 1);
|
setprop("controls/switches/landing-lights-r", 1);
|
||||||
setprop("/controls/flight/speedbrake-arm", 1);
|
setprop("controls/flight/speedbrake-arm", 1);
|
||||||
setprop("/controls/flight/flaps", 0.290);
|
setprop("controls/flight/flaps", 0.290);
|
||||||
setprop("/controls/flight/slats", 0.666);
|
setprop("controls/flight/slats", 0.666);
|
||||||
setprop("/controls/flight/flap-lever", 1);
|
setprop("controls/flight/flap-lever", 1);
|
||||||
setprop("/controls/flight/flap-pos", 2);
|
setprop("controls/flight/flap-pos", 2);
|
||||||
setprop("/controls/flight/flap-txt", "1+F");
|
setprop("controls/flight/flap-txt", "1+F");
|
||||||
setprop("/controls/atc/mode-knob", 4);
|
setprop("controls/atc/mode-knob", 4);
|
||||||
atc.transponderPanel.modeSwitch(5);
|
atc.transponderPanel.modeSwitch(5);
|
||||||
libraries.flaptimer.start();
|
libraries.flaptimer.start();
|
||||||
setprop("/controls/flight/elevator-trim", -0.07);
|
setprop("controls/flight/elevator-trim", -0.07);
|
||||||
systems.arm_autobrake(3);
|
systems.arm_autobrake(3);
|
||||||
setprop("/ECAM/to-config-test", 1);
|
setprop("ECAM/to-config-test", 1);
|
||||||
settimer(func {
|
settimer(func {
|
||||||
setprop("/ECAM/to-config-test", 0);
|
setprop("ECAM/to-config-test", 0);
|
||||||
}, 1);
|
}, 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -51,8 +51,8 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/it-fbw/degrade-law", 0);
|
setprop("it-fbw/degrade-law", 0);
|
||||||
setprop("/it-fbw/law", 0);
|
setprop("it-fbw/law", 0);
|
||||||
gui.popupTip("Fly By Wire switched to NORMAL law!");
|
gui.popupTip("Fly By Wire switched to NORMAL law!");
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
|
@ -67,8 +67,8 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/it-fbw/degrade-law", 1);
|
setprop("it-fbw/degrade-law", 1);
|
||||||
setprop("/it-fbw/law", 1);
|
setprop("it-fbw/law", 1);
|
||||||
gui.popupTip("Fly By Wire switched to ALTERNATE law!");
|
gui.popupTip("Fly By Wire switched to ALTERNATE law!");
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
|
@ -83,8 +83,8 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/it-fbw/degrade-law", 2);
|
setprop("it-fbw/degrade-law", 2);
|
||||||
setprop("/it-fbw/law", 2);
|
setprop("it-fbw/law", 2);
|
||||||
gui.popupTip("Fly By Wire switched to DIRECT law!");
|
gui.popupTip("Fly By Wire switched to DIRECT law!");
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
|
@ -99,8 +99,8 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/it-fbw/degrade-law", 3);
|
setprop("it-fbw/degrade-law", 3);
|
||||||
setprop("/it-fbw/law", 3);
|
setprop("it-fbw/law", 3);
|
||||||
gui.popupTip("Fly By Wire switched to MECHANICAL BACKUP law!");
|
gui.popupTip("Fly By Wire switched to MECHANICAL BACKUP law!");
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
|
|
|
@ -143,7 +143,7 @@
|
||||||
<script>
|
<script>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
if (systems.fuelSvc.Nodes.requestLbs.getValue() > 0) {
|
if (systems.fuelSvc.Nodes.requestLbs.getValue() > 0) {
|
||||||
if ((getprop("/services/fuel-truck/enable") == 1) and getprop("/services/fuel-truck/connect") == 1) {
|
if ((getprop("services/fuel-truck/enable") == 1) and getprop("services/fuel-truck/connect") == 1) {
|
||||||
if (systems.fuelSvc.Nodes.requestTotalLbs.getValue() - pts.Consumables.Fuel.totalFuelLbs.getValue() > 0) {
|
if (systems.fuelSvc.Nodes.requestTotalLbs.getValue() - pts.Consumables.Fuel.totalFuelLbs.getValue() > 0) {
|
||||||
systems.fuelSvc.refuel();
|
systems.fuelSvc.refuel();
|
||||||
screen.log.write("Refueling process started.", 0, 0.584, 1);
|
screen.log.write("Refueling process started.", 0, 0.584, 1);
|
||||||
|
|
|
@ -158,8 +158,8 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/systems/acconfig/mismatch-code") == "0x000") {
|
if (getprop("systems/acconfig/mismatch-code") == "0x000") {
|
||||||
if (getprop("/systems/acconfig/options/welcome-skip") != 1) {
|
if (getprop("systems/acconfig/options/welcome-skip") != 1) {
|
||||||
acconfig.welcome_dlg.open();
|
acconfig.welcome_dlg.open();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/systems/acconfig/options/welcome-skip") != 1) {
|
if (getprop("systems/acconfig/options/welcome-skip") != 1) {
|
||||||
acconfig.welcome_dlg.open();
|
acconfig.welcome_dlg.open();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -38,7 +38,7 @@ var someOtherThing = func {
|
||||||
something = 1;
|
something = 1;
|
||||||
}
|
}
|
||||||
settimer(func {
|
settimer(func {
|
||||||
setprop("/something", something);
|
setprop("something", something);
|
||||||
}, 5);
|
}, 5);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
@ -16,20 +16,17 @@
|
||||||
<path>Aircraft/A320-family/Models/Fuselages/A320-100/fuselage.xml</path>
|
<path>Aircraft/A320-family/Models/Fuselages/A320-100/fuselage.xml</path>
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
<!-- Separate Flightdeck to fit the modified nose -->
|
|
||||||
<model>
|
|
||||||
<name>Flightdeck</name>
|
|
||||||
<path>Aircraft/A320-family/Models/FlightDeck/a320.flightdeck.xml</path>
|
|
||||||
<offsets>
|
|
||||||
<x-m>4.81794</x-m>
|
|
||||||
<y-m>0.0</y-m>
|
|
||||||
<z-m>0.0</z-m>
|
|
||||||
</offsets>
|
|
||||||
</model>
|
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
<name>Interior</name>
|
<name>Interior</name>
|
||||||
<path>Aircraft/A320-family/Models/Interior/a320.interior.xml</path>
|
<path>Aircraft/A320-family/Models/A320-interior.xml</path>
|
||||||
|
<!-- On multiplayer models, the interior is loaded separately and global
|
||||||
|
offsets are not applied. This cancels the global offsets, so that
|
||||||
|
the interior is loaded at (0,0,0) anyway. -->
|
||||||
|
<offsets>
|
||||||
|
<x-m>18.8499</x-m>
|
||||||
|
<z-m>-1.7005004</z-m>
|
||||||
|
</offsets>
|
||||||
|
<usage>interior</usage>
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
|
|
|
@ -16,20 +16,17 @@
|
||||||
<path>Aircraft/A320-family/Models/Fuselages/A320/fuselage.xml</path>
|
<path>Aircraft/A320-family/Models/Fuselages/A320/fuselage.xml</path>
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
<!-- Separate Flightdeck to fit the modified nose -->
|
|
||||||
<model>
|
|
||||||
<name>Flightdeck</name>
|
|
||||||
<path>Aircraft/A320-family/Models/FlightDeck/a320.flightdeck.xml</path>
|
|
||||||
<offsets>
|
|
||||||
<x-m>4.81794</x-m>
|
|
||||||
<y-m>0.0</y-m>
|
|
||||||
<z-m>0.0</z-m>
|
|
||||||
</offsets>
|
|
||||||
</model>
|
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
<name>Interior</name>
|
<name>Interior</name>
|
||||||
<path>Aircraft/A320-family/Models/Interior/a320.interior.xml</path>
|
<path>Aircraft/A320-family/Models/A320-interior.xml</path>
|
||||||
|
<!-- On multiplayer models, the interior is loaded separately and global
|
||||||
|
offsets are not applied. This cancels the global offsets, so that
|
||||||
|
the interior is loaded at (0,0,0) anyway. -->
|
||||||
|
<offsets>
|
||||||
|
<x-m>18.8499</x-m>
|
||||||
|
<z-m>-1.7005004</z-m>
|
||||||
|
</offsets>
|
||||||
|
<usage>interior</usage>
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
|
|
|
@ -16,20 +16,17 @@
|
||||||
<path>Aircraft/A320-family/Models/Fuselages/A320/fuselage.xml</path>
|
<path>Aircraft/A320-family/Models/Fuselages/A320/fuselage.xml</path>
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
<!-- Separate Flightdeck to fit the modified nose -->
|
|
||||||
<model>
|
|
||||||
<name>Flightdeck</name>
|
|
||||||
<path>Aircraft/A320-family/Models/FlightDeck/a320.flightdeck.xml</path>
|
|
||||||
<offsets>
|
|
||||||
<x-m>4.81794</x-m>
|
|
||||||
<y-m>0.0</y-m>
|
|
||||||
<z-m>0.0</z-m>
|
|
||||||
</offsets>
|
|
||||||
</model>
|
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
<name>Interior</name>
|
<name>Interior</name>
|
||||||
<path>Aircraft/A320-family/Models/Interior/a320.interior.xml</path>
|
<path>Aircraft/A320-family/Models/A320-interior.xml</path>
|
||||||
|
<!-- On multiplayer models, the interior is loaded separately and global
|
||||||
|
offsets are not applied. This cancels the global offsets, so that
|
||||||
|
the interior is loaded at (0,0,0) anyway. -->
|
||||||
|
<offsets>
|
||||||
|
<x-m>18.8499</x-m>
|
||||||
|
<z-m>-1.7005004</z-m>
|
||||||
|
</offsets>
|
||||||
|
<usage>interior</usage>
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
|
|
23
Models/A320-interior.xml
Normal file
23
Models/A320-interior.xml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<PropertyList>
|
||||||
|
<!-- Separate Flightdeck to fit the modified nose -->
|
||||||
|
<model>
|
||||||
|
<name>Flightdeck</name>
|
||||||
|
<path>Aircraft/A320-family/Models/FlightDeck/a320.flightdeck.xml</path>
|
||||||
|
<offsets>
|
||||||
|
<x-m>-14.0320</x-m>
|
||||||
|
<y-m>0.0</y-m>
|
||||||
|
<z-m>1.7005004</z-m>
|
||||||
|
</offsets>
|
||||||
|
</model>
|
||||||
|
|
||||||
|
<model>
|
||||||
|
<name>Interior</name>
|
||||||
|
<path>Aircraft/A320-family/Models/Interior/a320.interior.xml</path>
|
||||||
|
<offsets>
|
||||||
|
<x-m>-18.8499</x-m>
|
||||||
|
<z-m>1.7005004</z-m>
|
||||||
|
</offsets>
|
||||||
|
</model>
|
||||||
|
</PropertyList>
|
|
@ -16,20 +16,17 @@
|
||||||
<path>Aircraft/A320-family/Models/Fuselages/A320neo/fuselage.xml</path>
|
<path>Aircraft/A320-family/Models/Fuselages/A320neo/fuselage.xml</path>
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
<!-- Separate Flightdeck to fit the modified nose -->
|
|
||||||
<model>
|
|
||||||
<name>Flightdeck</name>
|
|
||||||
<path>Aircraft/A320-family/Models/FlightDeck/a320.flightdeck.xml</path>
|
|
||||||
<offsets>
|
|
||||||
<x-m>4.81794</x-m>
|
|
||||||
<y-m>0.0</y-m>
|
|
||||||
<z-m>0.0</z-m>
|
|
||||||
</offsets>
|
|
||||||
</model>
|
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
<name>Interior</name>
|
<name>Interior</name>
|
||||||
<path>Aircraft/A320-family/Models/Interior/a320.interior.xml</path>
|
<path>Aircraft/A320-family/Models/A320-interior.xml</path>
|
||||||
|
<!-- On multiplayer models, the interior is loaded separately and global
|
||||||
|
offsets are not applied. This cancels the global offsets, so that
|
||||||
|
the interior is loaded at (0,0,0) anyway. -->
|
||||||
|
<offsets>
|
||||||
|
<x-m>18.8499</x-m>
|
||||||
|
<z-m>-1.7005004</z-m>
|
||||||
|
</offsets>
|
||||||
|
<usage>interior</usage>
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
|
|
|
@ -16,20 +16,17 @@
|
||||||
<path>Aircraft/A320-family/Models/Fuselages/A320neo/fuselage.xml</path>
|
<path>Aircraft/A320-family/Models/Fuselages/A320neo/fuselage.xml</path>
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
<!-- Separate Flightdeck to fit the modified nose -->
|
|
||||||
<model>
|
|
||||||
<name>Flightdeck</name>
|
|
||||||
<path>Aircraft/A320-family/Models/FlightDeck/a320.flightdeck.xml</path>
|
|
||||||
<offsets>
|
|
||||||
<x-m>4.81794</x-m>
|
|
||||||
<y-m>0.0</y-m>
|
|
||||||
<z-m>0.0</z-m>
|
|
||||||
</offsets>
|
|
||||||
</model>
|
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
<name>Interior</name>
|
<name>Interior</name>
|
||||||
<path>Aircraft/A320-family/Models/Interior/a320.interior.xml</path>
|
<path>Aircraft/A320-family/Models/A320-interior.xml</path>
|
||||||
|
<!-- On multiplayer models, the interior is loaded separately and global
|
||||||
|
offsets are not applied. This cancels the global offsets, so that
|
||||||
|
the interior is loaded at (0,0,0) anyway. -->
|
||||||
|
<offsets>
|
||||||
|
<x-m>18.8499</x-m>
|
||||||
|
<z-m>-1.7005004</z-m>
|
||||||
|
</offsets>
|
||||||
|
<usage>interior</usage>
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
|
|
|
@ -36,7 +36,7 @@ Original code author Maggse.
|
||||||
<phi-min-deg>0</phi-min-deg>
|
<phi-min-deg>0</phi-min-deg>
|
||||||
<phi-max-deg>0</phi-max-deg>
|
<phi-max-deg>0</phi-max-deg>
|
||||||
<speed>
|
<speed>
|
||||||
<value>10</value>
|
<value>0</value>
|
||||||
<spread>1</spread>
|
<spread>1</spread>
|
||||||
</speed>
|
</speed>
|
||||||
<rotation-speed>
|
<rotation-speed>
|
||||||
|
@ -51,8 +51,8 @@ Original code author Maggse.
|
||||||
|
|
||||||
<counter>
|
<counter>
|
||||||
<particles-per-sec>
|
<particles-per-sec>
|
||||||
<value>100</value>
|
<value>50</value>
|
||||||
<spread>10</spread>
|
<spread>0</spread>
|
||||||
</particles-per-sec>
|
</particles-per-sec>
|
||||||
</counter>
|
</counter>
|
||||||
|
|
||||||
|
|
125
Models/Effects/engine-spray-left.xml
Normal file
125
Models/Effects/engine-spray-left.xml
Normal file
|
@ -0,0 +1,125 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
|
||||||
|
|
||||||
|
<PropertyList>
|
||||||
|
|
||||||
|
<particlesystem>
|
||||||
|
<name>engine-spray-l</name>
|
||||||
|
<texture>tiresmoke.png</texture>
|
||||||
|
<emissive>false</emissive>
|
||||||
|
<lighting>false</lighting>
|
||||||
|
|
||||||
|
<offsets>
|
||||||
|
<x-m>0</x-m>
|
||||||
|
<y-m>0</y-m>
|
||||||
|
<z-m>0</z-m>
|
||||||
|
</offsets>
|
||||||
|
|
||||||
|
<condition>
|
||||||
|
<and>
|
||||||
|
<greater-than>
|
||||||
|
<property>engines/engine[0]/n2-actual</property>
|
||||||
|
<value>50</value>
|
||||||
|
</greater-than>
|
||||||
|
<less-than>
|
||||||
|
<property>position/altitude-ft</property>
|
||||||
|
<value>10</value>
|
||||||
|
</less-than>
|
||||||
|
<equals>
|
||||||
|
<property>engines/engine[0]/state</property>
|
||||||
|
<value>3</value>
|
||||||
|
</equals>
|
||||||
|
</and>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
<attach>world</attach>
|
||||||
|
|
||||||
|
<placer>
|
||||||
|
<type>point</type>
|
||||||
|
</placer>
|
||||||
|
|
||||||
|
<shooter>
|
||||||
|
<theta-min-deg>45</theta-min-deg>
|
||||||
|
<theta-max-deg>85</theta-max-deg>
|
||||||
|
<phi-min-deg>-60</phi-min-deg>
|
||||||
|
<phi-max-deg>60</phi-max-deg>
|
||||||
|
<speed-mps>
|
||||||
|
<value>engines/engine[0]/thrust_lbs</value>
|
||||||
|
<spread>5</spread>
|
||||||
|
</speed-mps>
|
||||||
|
<rotation-speed>
|
||||||
|
<x-max-deg-sec>15</x-max-deg-sec>
|
||||||
|
<x-min-deg-sec>-15</x-min-deg-sec>
|
||||||
|
<y-max-deg-sec>15</y-max-deg-sec>
|
||||||
|
<y-min-deg-sec>-15</y-min-deg-sec>
|
||||||
|
<z-max-deg-sec>15</z-max-deg-sec>
|
||||||
|
<z-min-deg-sec>-15</z-min-deg-sec>
|
||||||
|
</rotation-speed>
|
||||||
|
</shooter>
|
||||||
|
|
||||||
|
<counter>
|
||||||
|
<particles-per-sec>
|
||||||
|
<property>engines/engine[0]/n2-actual</property>
|
||||||
|
<factor>20</factor>
|
||||||
|
<spread>70</spread>
|
||||||
|
</particles-per-sec>
|
||||||
|
</counter>
|
||||||
|
|
||||||
|
<align>billboard</align>
|
||||||
|
|
||||||
|
<particle>
|
||||||
|
<start>
|
||||||
|
<color>
|
||||||
|
<red>
|
||||||
|
<value>0.8</value>
|
||||||
|
</red>
|
||||||
|
<green>
|
||||||
|
<value>0.8</value>
|
||||||
|
</green>
|
||||||
|
<blue>
|
||||||
|
<value>0.8</value>
|
||||||
|
</blue>
|
||||||
|
<alpha>
|
||||||
|
<value>0.5</value>
|
||||||
|
</alpha>
|
||||||
|
</color>
|
||||||
|
<size>
|
||||||
|
<value>1.5</value>
|
||||||
|
</size>
|
||||||
|
</start>
|
||||||
|
<end>
|
||||||
|
<color>
|
||||||
|
<red>
|
||||||
|
<value>0.7</value>
|
||||||
|
</red>
|
||||||
|
<green>
|
||||||
|
<value>0.7</value>
|
||||||
|
</green>
|
||||||
|
<blue>
|
||||||
|
<value>0.7</value>
|
||||||
|
</blue>
|
||||||
|
<alpha>
|
||||||
|
<value>0.005</value>
|
||||||
|
</alpha>
|
||||||
|
</color>
|
||||||
|
<size>
|
||||||
|
<value>10</value>
|
||||||
|
</size>
|
||||||
|
</end>
|
||||||
|
<life-sec>
|
||||||
|
<value>2</value>
|
||||||
|
</life-sec>
|
||||||
|
<mass-kg>0.025</mass-kg>
|
||||||
|
<radius-m>0.175</radius-m>
|
||||||
|
</particle>
|
||||||
|
|
||||||
|
<program>
|
||||||
|
<fluid>water</fluid>
|
||||||
|
<gravity>true</gravity>
|
||||||
|
<wind>true</wind>
|
||||||
|
</program>
|
||||||
|
|
||||||
|
</particlesystem>
|
||||||
|
|
||||||
|
</PropertyList>
|
115
Models/Effects/engine-spray-right.xml
Normal file
115
Models/Effects/engine-spray-right.xml
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
|
||||||
|
<!-- Copyright (c) 2019 Joshua Davidson (Octal450) -->
|
||||||
|
|
||||||
|
<PropertyList>
|
||||||
|
|
||||||
|
<particlesystem>
|
||||||
|
<name>tyre-smoke-r</name>
|
||||||
|
<texture>tiresmoke.png</texture>
|
||||||
|
<emissive>false</emissive>
|
||||||
|
<lighting>false</lighting>
|
||||||
|
|
||||||
|
<offsets>
|
||||||
|
<x-m>0</x-m>
|
||||||
|
<y-m>0</y-m>
|
||||||
|
<z-m>0</z-m>
|
||||||
|
</offsets>
|
||||||
|
|
||||||
|
<condition>
|
||||||
|
<equals>
|
||||||
|
<property>gear/gear[2]/Rbrake-smoke</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
<attach>world</attach>
|
||||||
|
|
||||||
|
<placer>
|
||||||
|
<type>point</type>
|
||||||
|
</placer>
|
||||||
|
|
||||||
|
<shooter>
|
||||||
|
<theta-min-deg>45</theta-min-deg>
|
||||||
|
<theta-max-deg>85</theta-max-deg>
|
||||||
|
<phi-min-deg>-60</phi-min-deg>
|
||||||
|
<phi-max-deg>60</phi-max-deg>
|
||||||
|
<speed-mps>
|
||||||
|
<value>50</value>
|
||||||
|
<spread>5</spread>
|
||||||
|
</speed-mps>
|
||||||
|
<rotation-speed>
|
||||||
|
<x-max-deg-sec>15</x-max-deg-sec>
|
||||||
|
<x-min-deg-sec>-15</x-min-deg-sec>
|
||||||
|
<y-max-deg-sec>15</y-max-deg-sec>
|
||||||
|
<y-min-deg-sec>-15</y-min-deg-sec>
|
||||||
|
<z-max-deg-sec>15</z-max-deg-sec>
|
||||||
|
<z-min-deg-sec>-15</z-min-deg-sec>
|
||||||
|
</rotation-speed>
|
||||||
|
</shooter>
|
||||||
|
|
||||||
|
<counter>
|
||||||
|
<particles-per-sec>
|
||||||
|
<property>gear/gear[2]/Rbrake-thermal-energy</property>
|
||||||
|
<factor>20</factor>
|
||||||
|
<spread>70</spread>
|
||||||
|
</particles-per-sec>
|
||||||
|
</counter>
|
||||||
|
|
||||||
|
<align>billboard</align>
|
||||||
|
|
||||||
|
<particle>
|
||||||
|
<start>
|
||||||
|
<color>
|
||||||
|
<red>
|
||||||
|
<value>0.8</value>
|
||||||
|
</red>
|
||||||
|
<green>
|
||||||
|
<value>0.8</value>
|
||||||
|
</green>
|
||||||
|
<blue>
|
||||||
|
<value>0.8</value>
|
||||||
|
</blue>
|
||||||
|
<alpha>
|
||||||
|
<value>0.5</value>
|
||||||
|
</alpha>
|
||||||
|
</color>
|
||||||
|
<size>
|
||||||
|
<value>1.5</value>
|
||||||
|
</size>
|
||||||
|
</start>
|
||||||
|
<end>
|
||||||
|
<color>
|
||||||
|
<red>
|
||||||
|
<value>0.7</value>
|
||||||
|
</red>
|
||||||
|
<green>
|
||||||
|
<value>0.7</value>
|
||||||
|
</green>
|
||||||
|
<blue>
|
||||||
|
<value>0.7</value>
|
||||||
|
</blue>
|
||||||
|
<alpha>
|
||||||
|
<value>0.005</value>
|
||||||
|
</alpha>
|
||||||
|
</color>
|
||||||
|
<size>
|
||||||
|
<value>10</value>
|
||||||
|
</size>
|
||||||
|
</end>
|
||||||
|
<life-sec>
|
||||||
|
<value>2</value>
|
||||||
|
</life-sec>
|
||||||
|
<mass-kg>0.025</mass-kg>
|
||||||
|
<radius-m>0.175</radius-m>
|
||||||
|
</particle>
|
||||||
|
|
||||||
|
<program>
|
||||||
|
<fluid>air</fluid>
|
||||||
|
<gravity>false</gravity>
|
||||||
|
<wind>true</wind>
|
||||||
|
</program>
|
||||||
|
|
||||||
|
</particlesystem>
|
||||||
|
|
||||||
|
</PropertyList>
|
|
@ -90,6 +90,17 @@
|
||||||
</offsets>
|
</offsets>
|
||||||
</model>
|
</model>
|
||||||
|
|
||||||
|
<!-- Takeoff/Landing Engine spray -->
|
||||||
|
<model>
|
||||||
|
<path>Aircraft/A320-family/Models/Effects/engine-spray-left.xml</path>
|
||||||
|
<name>engine-spray-l</name>
|
||||||
|
<offsets>
|
||||||
|
<x-m>4.875</x-m>
|
||||||
|
<y-m>0</y-m>
|
||||||
|
<z-m>0</z-m>
|
||||||
|
</offsets>
|
||||||
|
</model>
|
||||||
|
|
||||||
<model>
|
<model>
|
||||||
<name>Engine fire</name>
|
<name>Engine fire</name>
|
||||||
<path>Aircraft/A320-family/Models/Effects/enginefire.xml</path>
|
<path>Aircraft/A320-family/Models/Effects/enginefire.xml</path>
|
||||||
|
|
|
@ -497,8 +497,8 @@
|
||||||
<object-name>vs-text-test</object-name>
|
<object-name>vs-text-test</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<or>
|
<or>
|
||||||
<not><property>/FMGC/FCU-working</property></not>
|
<not><property>FMGC/FCU-working</property></not>
|
||||||
<property>/controls/switches/annun-test</property>
|
<property>controls/switches/annun-test</property>
|
||||||
</or>
|
</or>
|
||||||
</condition>
|
</condition>
|
||||||
</animation>
|
</animation>
|
||||||
|
@ -520,9 +520,9 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
var TrimVal = getprop("/controls/flight/rudder-trim");
|
var TrimVal = getprop("controls/flight/rudder-trim");
|
||||||
setprop("/controls/flight/rudder-trim", TrimVal + 0.005);
|
setprop("controls/flight/rudder-trim", TrimVal + 0.005);
|
||||||
setprop("/controls/switches/rudder-trim", 1);
|
setprop("controls/switches/rudder-trim", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
<mod-up>
|
<mod-up>
|
||||||
|
@ -546,9 +546,9 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
var TrimVal = getprop("/controls/flight/rudder-trim");
|
var TrimVal = getprop("controls/flight/rudder-trim");
|
||||||
setprop("/controls/flight/rudder-trim", TrimVal - 0.005);
|
setprop("controls/flight/rudder-trim", TrimVal - 0.005);
|
||||||
setprop("/controls/switches/rudder-trim", -1);
|
setprop("controls/switches/rudder-trim", -1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
<mod-up>
|
<mod-up>
|
||||||
|
@ -586,7 +586,7 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/controls/flight/rudder-trim", 0);
|
setprop("controls/flight/rudder-trim", 0);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -880,12 +880,12 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/controls/autobrake/mode") != 1) {
|
if (getprop("controls/autobrake/mode") != 1) {
|
||||||
systems.arm_autobrake(1);
|
systems.arm_autobrake(1);
|
||||||
} else {
|
} else {
|
||||||
systems.arm_autobrake(0);
|
systems.arm_autobrake(0);
|
||||||
}
|
}
|
||||||
setprop("/sim/sounde/oh-btn", 1);
|
setprop("sim/sounde/oh-btn", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -907,12 +907,12 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/controls/autobrake/mode") != 2) {
|
if (getprop("controls/autobrake/mode") != 2) {
|
||||||
systems.arm_autobrake(2);
|
systems.arm_autobrake(2);
|
||||||
} else {
|
} else {
|
||||||
systems.arm_autobrake(0);
|
systems.arm_autobrake(0);
|
||||||
}
|
}
|
||||||
setprop("/sim/sounde/oh-btn", 1);
|
setprop("sim/sounde/oh-btn", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -934,12 +934,12 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/controls/autobrake/mode") != 3) {
|
if (getprop("controls/autobrake/mode") != 3) {
|
||||||
systems.arm_autobrake(3);
|
systems.arm_autobrake(3);
|
||||||
} else {
|
} else {
|
||||||
systems.arm_autobrake(0);
|
systems.arm_autobrake(0);
|
||||||
}
|
}
|
||||||
setprop("/sim/sounde/oh-btn", 1);
|
setprop("sim/sounde/oh-btn", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -980,7 +980,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/switch1", 1);</script>
|
<script>setprop("sim/sounde/switch1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
@ -1511,13 +1511,13 @@
|
||||||
</greater-than-equals>
|
</greater-than-equals>
|
||||||
</condition>
|
</condition>
|
||||||
<command>property-assign</command>
|
<command>property-assign</command>
|
||||||
<property>/ECAM/to-config-test</property>
|
<property>ECAM/to-config-test</property>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</binding>
|
</binding>
|
||||||
<mod-up>
|
<mod-up>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-assign</command>
|
<command>property-assign</command>
|
||||||
<property>/ECAM/to-config-test</property>
|
<property>ECAM/to-config-test</property>
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
</binding>
|
</binding>
|
||||||
</mod-up>
|
</mod-up>
|
||||||
|
@ -1934,7 +1934,7 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/instrumentation/altimeter/setting-inhg", getprop("instrumentation/altimeter/setting-inhg") + 0.01);
|
setprop("instrumentation/altimeter/setting-inhg", getprop("instrumentation/altimeter/setting-inhg") + 0.01);
|
||||||
</script>
|
</script>
|
||||||
<condition>
|
<condition>
|
||||||
<and>
|
<and>
|
||||||
|
@ -1956,7 +1956,7 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/instrumentation/altimeter/setting-hpa", getprop("instrumentation/altimeter/setting-hpa") + 1.0);
|
setprop("instrumentation/altimeter/setting-hpa", getprop("instrumentation/altimeter/setting-hpa") + 1.0);
|
||||||
</script>
|
</script>
|
||||||
<condition>
|
<condition>
|
||||||
<and>
|
<and>
|
||||||
|
@ -1990,7 +1990,7 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/instrumentation/altimeter/setting-inhg", getprop("instrumentation/altimeter/setting-inhg") - 0.01);
|
setprop("instrumentation/altimeter/setting-inhg", getprop("instrumentation/altimeter/setting-inhg") - 0.01);
|
||||||
</script>
|
</script>
|
||||||
<condition>
|
<condition>
|
||||||
<and>
|
<and>
|
||||||
|
@ -2012,7 +2012,7 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/instrumentation/altimeter/setting-hpa", getprop("instrumentation/altimeter/setting-hpa") - 1.0);
|
setprop("instrumentation/altimeter/setting-hpa", getprop("instrumentation/altimeter/setting-hpa") - 1.0);
|
||||||
</script>
|
</script>
|
||||||
<condition>
|
<condition>
|
||||||
<and>
|
<and>
|
||||||
|
@ -2120,7 +2120,7 @@
|
||||||
<axis-alignment>xy-plane</axis-alignment>
|
<axis-alignment>xy-plane</axis-alignment>
|
||||||
<type type="string">number-value</type>
|
<type type="string">number-value</type>
|
||||||
<format type="string">%2.2f</format>
|
<format type="string">%2.2f</format>
|
||||||
<property>/instrumentation/altimeter/setting-inhg</property>
|
<property>instrumentation/altimeter/setting-inhg</property>
|
||||||
<truncate>false</truncate>
|
<truncate>false</truncate>
|
||||||
<font type="string">led.txf</font>
|
<font type="string">led.txf</font>
|
||||||
<draw-text>true</draw-text>
|
<draw-text>true</draw-text>
|
||||||
|
@ -2146,7 +2146,7 @@
|
||||||
<axis-alignment>xy-plane</axis-alignment>
|
<axis-alignment>xy-plane</axis-alignment>
|
||||||
<type type="string">number-value</type>
|
<type type="string">number-value</type>
|
||||||
<format type="string">%2.2f</format>
|
<format type="string">%2.2f</format>
|
||||||
<property>/instrumentation/altimeter/setting-inhg</property>
|
<property>instrumentation/altimeter/setting-inhg</property>
|
||||||
<truncate>false</truncate>
|
<truncate>false</truncate>
|
||||||
<font type="string">led.txf</font>
|
<font type="string">led.txf</font>
|
||||||
<draw-text>true</draw-text>
|
<draw-text>true</draw-text>
|
||||||
|
@ -2172,7 +2172,7 @@
|
||||||
<axis-alignment>xy-plane</axis-alignment>
|
<axis-alignment>xy-plane</axis-alignment>
|
||||||
<type type="string">number-value</type>
|
<type type="string">number-value</type>
|
||||||
<format type="string">%2.0f</format>
|
<format type="string">%2.0f</format>
|
||||||
<property>/instrumentation/altimeter/setting-hpa</property>
|
<property>instrumentation/altimeter/setting-hpa</property>
|
||||||
<truncate>false</truncate>
|
<truncate>false</truncate>
|
||||||
<font type="string">led.txf</font>
|
<font type="string">led.txf</font>
|
||||||
<draw-text>true</draw-text>
|
<draw-text>true</draw-text>
|
||||||
|
@ -2198,7 +2198,7 @@
|
||||||
<axis-alignment>xy-plane</axis-alignment>
|
<axis-alignment>xy-plane</axis-alignment>
|
||||||
<type type="string">number-value</type>
|
<type type="string">number-value</type>
|
||||||
<format type="string">%2.0f</format>
|
<format type="string">%2.0f</format>
|
||||||
<property>/instrumentation/altimeter/setting-hpa</property>
|
<property>instrumentation/altimeter/setting-hpa</property>
|
||||||
<truncate>false</truncate>
|
<truncate>false</truncate>
|
||||||
<font type="string">led.txf</font>
|
<font type="string">led.txf</font>
|
||||||
<draw-text>true</draw-text>
|
<draw-text>true</draw-text>
|
||||||
|
@ -2384,7 +2384,7 @@
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
fcu.FCUController.FD1();
|
fcu.FCUController.FD1();
|
||||||
setprop("/sim/sounde/btn1", 1);
|
setprop("sim/sounde/btn1", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -2486,7 +2486,7 @@
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
fcu.FCUController.FD2();
|
fcu.FCUController.FD2();
|
||||||
setprop("/sim/sounde/btn1", 1);
|
setprop("sim/sounde/btn1", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -2524,12 +2524,12 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/instrumentation/efis/inputs/CSTR") != 1) {
|
if (getprop("instrumentation/efis/inputs/CSTR") != 1) {
|
||||||
libraries.cpt_efis_btns("cstr");
|
libraries.cpt_efis_btns("cstr");
|
||||||
} else {
|
} else {
|
||||||
libraries.cpt_efis_btns("off");
|
libraries.cpt_efis_btns("off");
|
||||||
}
|
}
|
||||||
setprop("/sim/sounde/btn1", 1);
|
setprop("sim/sounde/btn1", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -2566,12 +2566,12 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/instrumentation/efis[1]/inputs/CSTR") != 1) {
|
if (getprop("instrumentation/efis[1]/inputs/CSTR") != 1) {
|
||||||
libraries.fo_efis_btns("cstr");
|
libraries.fo_efis_btns("cstr");
|
||||||
} else {
|
} else {
|
||||||
libraries.fo_efis_btns("off");
|
libraries.fo_efis_btns("off");
|
||||||
}
|
}
|
||||||
setprop("/sim/sounde/btn1", 1);
|
setprop("sim/sounde/btn1", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -2608,12 +2608,12 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/instrumentation/efis/inputs/wpt") != 1) {
|
if (getprop("instrumentation/efis/inputs/wpt") != 1) {
|
||||||
libraries.cpt_efis_btns("wpt");
|
libraries.cpt_efis_btns("wpt");
|
||||||
} else {
|
} else {
|
||||||
libraries.cpt_efis_btns("off");
|
libraries.cpt_efis_btns("off");
|
||||||
}
|
}
|
||||||
setprop("/sim/sounde/btn1", 1);
|
setprop("sim/sounde/btn1", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -2650,12 +2650,12 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/instrumentation/efis[1]/inputs/wpt") != 1) {
|
if (getprop("instrumentation/efis[1]/inputs/wpt") != 1) {
|
||||||
libraries.fo_efis_btns("wpt");
|
libraries.fo_efis_btns("wpt");
|
||||||
} else {
|
} else {
|
||||||
libraries.fo_efis_btns("off");
|
libraries.fo_efis_btns("off");
|
||||||
}
|
}
|
||||||
setprop("/sim/sounde/btn1", 1);
|
setprop("sim/sounde/btn1", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -2692,12 +2692,12 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/instrumentation/efis/inputs/VORD") != 1) {
|
if (getprop("instrumentation/efis/inputs/VORD") != 1) {
|
||||||
libraries.cpt_efis_btns("vord");
|
libraries.cpt_efis_btns("vord");
|
||||||
} else {
|
} else {
|
||||||
libraries.cpt_efis_btns("off");
|
libraries.cpt_efis_btns("off");
|
||||||
}
|
}
|
||||||
setprop("/sim/sounde/btn1", 1);
|
setprop("sim/sounde/btn1", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -2734,12 +2734,12 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/instrumentation/efis[1]/inputs/VORD") != 1) {
|
if (getprop("instrumentation/efis[1]/inputs/VORD") != 1) {
|
||||||
libraries.fo_efis_btns("vord");
|
libraries.fo_efis_btns("vord");
|
||||||
} else {
|
} else {
|
||||||
libraries.fo_efis_btns("off");
|
libraries.fo_efis_btns("off");
|
||||||
}
|
}
|
||||||
setprop("/sim/sounde/btn1", 1);
|
setprop("sim/sounde/btn1", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -2776,12 +2776,12 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/instrumentation/efis/inputs/NDB") != 1) {
|
if (getprop("instrumentation/efis/inputs/NDB") != 1) {
|
||||||
libraries.cpt_efis_btns("ndb");
|
libraries.cpt_efis_btns("ndb");
|
||||||
} else {
|
} else {
|
||||||
libraries.cpt_efis_btns("off");
|
libraries.cpt_efis_btns("off");
|
||||||
}
|
}
|
||||||
setprop("/sim/sounde/btn1", 1);
|
setprop("sim/sounde/btn1", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -2818,12 +2818,12 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/instrumentation/efis[1]/inputs/NDB") != 1) {
|
if (getprop("instrumentation/efis[1]/inputs/NDB") != 1) {
|
||||||
libraries.fo_efis_btns("ndb");
|
libraries.fo_efis_btns("ndb");
|
||||||
} else {
|
} else {
|
||||||
libraries.fo_efis_btns("off");
|
libraries.fo_efis_btns("off");
|
||||||
}
|
}
|
||||||
setprop("/sim/sounde/btn1", 1);
|
setprop("sim/sounde/btn1", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -2860,12 +2860,12 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/instrumentation/efis/inputs/arpt") != 1) {
|
if (getprop("instrumentation/efis/inputs/arpt") != 1) {
|
||||||
libraries.cpt_efis_btns("arpt");
|
libraries.cpt_efis_btns("arpt");
|
||||||
} else {
|
} else {
|
||||||
libraries.cpt_efis_btns("off");
|
libraries.cpt_efis_btns("off");
|
||||||
}
|
}
|
||||||
setprop("/sim/sounde/btn1", 1);
|
setprop("sim/sounde/btn1", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -2902,12 +2902,12 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/instrumentation/efis[1]/inputs/arpt") != 1) {
|
if (getprop("instrumentation/efis[1]/inputs/arpt") != 1) {
|
||||||
libraries.fo_efis_btns("arpt");
|
libraries.fo_efis_btns("arpt");
|
||||||
} else {
|
} else {
|
||||||
libraries.fo_efis_btns("off");
|
libraries.fo_efis_btns("off");
|
||||||
}
|
}
|
||||||
setprop("/sim/sounde/btn1", 1);
|
setprop("sim/sounde/btn1", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -3900,7 +3900,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/btn1", 1);</script>
|
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
@ -3927,7 +3927,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/btn1", 1);</script>
|
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
<action>
|
<action>
|
||||||
|
@ -3939,7 +3939,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/btn1", 1);</script>
|
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
<action>
|
<action>
|
||||||
|
@ -4018,7 +4018,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/btn1", 1);</script>
|
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
<action>
|
<action>
|
||||||
|
@ -4030,7 +4030,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/btn1", 1);</script>
|
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
<action>
|
<action>
|
||||||
|
@ -4099,7 +4099,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/btn1", 1);</script>
|
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
@ -4152,7 +4152,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/btn1", 1);</script>
|
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
@ -4167,7 +4167,7 @@
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
fcu.FCUController.AP1();
|
fcu.FCUController.AP1();
|
||||||
setprop("/sim/sounde/btn1", 1);
|
setprop("sim/sounde/btn1", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -4199,7 +4199,7 @@
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
fcu.FCUController.AP2();
|
fcu.FCUController.AP2();
|
||||||
setprop("/sim/sounde/btn1", 1);
|
setprop("sim/sounde/btn1", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -4231,7 +4231,7 @@
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
fcu.FCUController.ATHR();
|
fcu.FCUController.ATHR();
|
||||||
setprop("/sim/sounde/btn1", 1);
|
setprop("sim/sounde/btn1", 1);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -4275,7 +4275,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/btn1", 1);</script>
|
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
<action>
|
<action>
|
||||||
|
@ -4287,7 +4287,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/btn1", 1);</script>
|
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
<action>
|
<action>
|
||||||
|
@ -4356,7 +4356,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/knb1", 1);</script>
|
<script>setprop("sim/sounde/knb1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
@ -4383,7 +4383,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/btn1", 1);</script>
|
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
<action>
|
<action>
|
||||||
|
@ -4395,7 +4395,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/btn1", 1);</script>
|
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
<action>
|
<action>
|
||||||
|
@ -4464,7 +4464,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/btn1", 1);</script>
|
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
@ -5307,12 +5307,12 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/it-autoflight/output/ap-warning") == 1) {
|
if (getprop("it-autoflight/output/ap-warning") == 1) {
|
||||||
setprop("/it-autoflight/output/ap-warning", 0);
|
setprop("it-autoflight/output/ap-warning", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/it-autoflight/sound/apoffsound") == 1 or getprop("/it-autoflight/sound/apoffsound2") == 1) {
|
if (getprop("it-autoflight/sound/apoffsound") == 1 or getprop("it-autoflight/sound/apoffsound2") == 1) {
|
||||||
setprop("/it-autoflight/sound/apoffsound", 0);
|
setprop("it-autoflight/sound/apoffsound", 0);
|
||||||
setprop("/it-autoflight/sound/apoffsound2", 0);
|
setprop("it-autoflight/sound/apoffsound2", 0);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
|
@ -5345,8 +5345,8 @@
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
if (getprop("/it-autoflight/output/athr-warning") == 1) {
|
if (getprop("it-autoflight/output/athr-warning") == 1) {
|
||||||
setprop("/it-autoflight/output/athr-warning", 0);
|
setprop("it-autoflight/output/athr-warning", 0);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
|
@ -5418,7 +5418,7 @@
|
||||||
<repeatable>true</repeatable>
|
<repeatable>true</repeatable>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-adjust</command>
|
<command>property-adjust</command>
|
||||||
<property>/controls/flight/elevator-trim</property>
|
<property>controls/flight/elevator-trim</property>
|
||||||
<step>0.01</step>
|
<step>0.01</step>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -5428,7 +5428,7 @@
|
||||||
<repeatable>true</repeatable>
|
<repeatable>true</repeatable>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-adjust</command>
|
<command>property-adjust</command>
|
||||||
<property>/controls/flight/elevator-trim</property>
|
<property>controls/flight/elevator-trim</property>
|
||||||
<step>-0.01</step>
|
<step>-0.01</step>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -5543,17 +5543,17 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
var spdBrk = getprop("/controls/flight/speedbrake" );
|
var spdBrk = getprop("controls/flight/speedbrake" );
|
||||||
if(spdBrk == 0){
|
if(spdBrk == 0){
|
||||||
setprop("/controls/flight/speedbrake-arm", 0);
|
setprop("controls/flight/speedbrake-arm", 0);
|
||||||
setprop("/controls/flight/speedbrake", 0.5);
|
setprop("controls/flight/speedbrake", 0.5);
|
||||||
}
|
}
|
||||||
elsif(spdBrk == 0.5){
|
elsif(spdBrk == 0.5){
|
||||||
setprop("/controls/flight/speedbrake-arm", 0);
|
setprop("controls/flight/speedbrake-arm", 0);
|
||||||
setprop("/controls/flight/speedbrake", 1);
|
setprop("controls/flight/speedbrake", 1);
|
||||||
}
|
}
|
||||||
elsif(spdBrk == 1){
|
elsif(spdBrk == 1){
|
||||||
setprop("/controls/flight/speedbrake-arm", 0);
|
setprop("controls/flight/speedbrake-arm", 0);
|
||||||
# Do nothing because spoilers are fully up.
|
# Do nothing because spoilers are fully up.
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -5565,18 +5565,18 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
var spdBrk = getprop("/controls/flight/speedbrake");
|
var spdBrk = getprop("controls/flight/speedbrake");
|
||||||
if(spdBrk == 0){
|
if(spdBrk == 0){
|
||||||
setprop("/controls/flight/speedbrake-arm", 0);
|
setprop("controls/flight/speedbrake-arm", 0);
|
||||||
# Do nothing because spoilers are fully down.
|
# Do nothing because spoilers are fully down.
|
||||||
}
|
}
|
||||||
elsif(spdBrk == 0.5){
|
elsif(spdBrk == 0.5){
|
||||||
setprop("/controls/flight/speedbrake-arm", 0);
|
setprop("controls/flight/speedbrake-arm", 0);
|
||||||
setprop("/controls/flight/speedbrake", 0);
|
setprop("controls/flight/speedbrake", 0);
|
||||||
}
|
}
|
||||||
elsif(spdBrk == 1){
|
elsif(spdBrk == 1){
|
||||||
setprop("/controls/flight/speedbrake-arm", 0);
|
setprop("controls/flight/speedbrake-arm", 0);
|
||||||
setprop("/controls/flight/speedbrake", 0.5);
|
setprop("controls/flight/speedbrake", 0.5);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
|
@ -5815,10 +5815,10 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
var a = getprop("/controls/flight/rudder");
|
var a = getprop("controls/flight/rudder");
|
||||||
a += 0.1;
|
a += 0.1;
|
||||||
if (a > 1) a = 1;
|
if (a > 1) a = 1;
|
||||||
setprop("/controls/flight/rudder", a);
|
setprop("controls/flight/rudder", a);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -5828,10 +5828,10 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
var a = getprop("/controls/flight/rudder");
|
var a = getprop("controls/flight/rudder");
|
||||||
a -= 0.1;
|
a -= 0.1;
|
||||||
if (abs(a) > 1) a = -1;
|
if (abs(a) > 1) a = -1;
|
||||||
setprop("/controls/flight/rudder", a);
|
setprop("controls/flight/rudder", a);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -5841,7 +5841,7 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>
|
<script>
|
||||||
setprop("/controls/flight/rudder", 0);
|
setprop("controls/flight/rudder", 0);
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
|
@ -6167,7 +6167,7 @@
|
||||||
<object-name>ecam_air_data</object-name>
|
<object-name>ecam_air_data</object-name>
|
||||||
<object-name>ecam_air_data.mark</object-name>
|
<object-name>ecam_air_data.mark</object-name>
|
||||||
<factor>30</factor>
|
<factor>30</factor>
|
||||||
<property>/controls/navigation/switching/air-data</property>
|
<property>controls/navigation/switching/air-data</property>
|
||||||
<axis>
|
<axis>
|
||||||
<x1-m>-0.428673</x1-m>
|
<x1-m>-0.428673</x1-m>
|
||||||
<y1-m>-0.022557</y1-m>
|
<y1-m>-0.022557</y1-m>
|
||||||
|
@ -6197,7 +6197,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/knb1", 1);</script>
|
<script>setprop("sim/sounde/knb1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
<action>
|
<action>
|
||||||
|
@ -6216,7 +6216,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/knb1", 1);</script>
|
<script>setprop("sim/sounde/knb1", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
@ -6717,7 +6717,7 @@
|
||||||
<object-name>HeadsetCpt</object-name>
|
<object-name>HeadsetCpt</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<not>
|
<not>
|
||||||
<property>/controls/audio/headset-toggle</property>
|
<property>controls/audio/headset-toggle</property>
|
||||||
</not>
|
</not>
|
||||||
</condition>
|
</condition>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<object-name>Rudder</object-name>
|
<object-name>Rudder</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<equals>
|
||||||
<property>/sim/model/lights/logo-lights</property>
|
<property>sim/model/lights/logo-lights</property>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</equals>
|
</equals>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<object-name>Rudder</object-name>
|
<object-name>Rudder</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<equals>
|
||||||
<property>/sim/model/lights/logo-lights</property>
|
<property>sim/model/lights/logo-lights</property>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</equals>
|
</equals>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<object-name>Rudder</object-name>
|
<object-name>Rudder</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<equals>
|
||||||
<property>/sim/model/lights/logo-lights</property>
|
<property>sim/model/lights/logo-lights</property>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</equals>
|
</equals>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<button>0</button>
|
<button>0</button>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-toggle</command>
|
<command>property-toggle</command>
|
||||||
<property>/controls/audio/headset-toggle</property>
|
<property>controls/audio/headset-toggle</property>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
|
@ -14,24 +14,24 @@ var mach_act = 0;
|
||||||
# props.nas nodes
|
# props.nas nodes
|
||||||
var iesi_init = props.globals.initNode("/instrumentation/iesi/iesi-init", 0, "BOOL");
|
var iesi_init = props.globals.initNode("/instrumentation/iesi/iesi-init", 0, "BOOL");
|
||||||
var iesi_time = props.globals.initNode("/instrumentation/iesi/iesi-init-time", 0.0, "DOUBLE");
|
var iesi_time = props.globals.initNode("/instrumentation/iesi/iesi-init-time", 0.0, "DOUBLE");
|
||||||
var iesi_rate = props.globals.getNode("/systems/acconfig/options/iesi-rate");
|
var iesi_rate = props.globals.getNode("systems/acconfig/options/iesi-rate");
|
||||||
var et = props.globals.getNode("/sim/time/elapsed-sec");
|
var et = props.globals.getNode("sim/time/elapsed-sec");
|
||||||
var aconfig = props.globals.getNode("/systems/acconfig/autoconfig-running");
|
var aconfig = props.globals.getNode("systems/acconfig/autoconfig-running");
|
||||||
|
|
||||||
var dcess = 0;
|
var dcess = 0;
|
||||||
var dchot1 = 0;
|
var dchot1 = 0;
|
||||||
|
|
||||||
var airspeed = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt");
|
var airspeed = props.globals.getNode("instrumentation/airspeed-indicator/indicated-speed-kt");
|
||||||
var mach = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach");
|
var mach = props.globals.getNode("instrumentation/airspeed-indicator/indicated-mach");
|
||||||
var pitch = props.globals.getNode("/orientation/pitch-deg");
|
var pitch = props.globals.getNode("orientation/pitch-deg");
|
||||||
var roll = props.globals.getNode("/orientation/roll-deg");
|
var roll = props.globals.getNode("orientation/roll-deg");
|
||||||
var skid = props.globals.getNode("/instrumentation/slip-skid-ball/indicated-slip-skid");
|
var skid = props.globals.getNode("instrumentation/slip-skid-ball/indicated-slip-skid");
|
||||||
var altitude = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft");
|
var altitude = props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft");
|
||||||
var altitude_ind = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft-pfd");
|
var altitude_ind = props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft-pfd");
|
||||||
|
|
||||||
var altimeter_mode = props.globals.getNode("/modes/altimeter/std");
|
var altimeter_mode = props.globals.getNode("modes/altimeter/std");
|
||||||
var qnh_hpa = props.globals.getNode("/instrumentation/altimeter/setting-hpa");
|
var qnh_hpa = props.globals.getNode("instrumentation/altimeter/setting-hpa");
|
||||||
var qnh_inhg = props.globals.getNode("/instrumentation/altimeter/setting-inhg");
|
var qnh_inhg = props.globals.getNode("instrumentation/altimeter/setting-inhg");
|
||||||
|
|
||||||
var canvas_IESI_base = {
|
var canvas_IESI_base = {
|
||||||
init: func(canvas_group, file) {
|
init: func(canvas_group, file) {
|
||||||
|
|
|
@ -18,7 +18,7 @@ var lowerECAM_wheel = nil;
|
||||||
var lowerECAM_test = nil;
|
var lowerECAM_test = nil;
|
||||||
var lowerECAM_display = nil;
|
var lowerECAM_display = nil;
|
||||||
var page = "fctl";
|
var page = "fctl";
|
||||||
var oat = getprop("/environment/temperature-degc");
|
var oat = getprop("environment/temperature-degc");
|
||||||
var blue_psi = 0;
|
var blue_psi = 0;
|
||||||
var green_psi = 0;
|
var green_psi = 0;
|
||||||
var yellow_psi = 0;
|
var yellow_psi = 0;
|
||||||
|
@ -42,217 +42,217 @@ var essTrvolts = 0;
|
||||||
LBS2KGS = 0.4535924;
|
LBS2KGS = 0.4535924;
|
||||||
|
|
||||||
# Fetch Nodes
|
# Fetch Nodes
|
||||||
var acconfig_weight_kgs = props.globals.getNode("/systems/acconfig/options/weight-kgs", 1);
|
var acconfig_weight_kgs = props.globals.getNode("systems/acconfig/options/weight-kgs", 1);
|
||||||
var elapsed_sec = props.globals.getNode("/sim/time/elapsed-sec", 1);
|
var elapsed_sec = props.globals.getNode("sim/time/elapsed-sec", 1);
|
||||||
var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2", 1);
|
var ac2 = props.globals.getNode("systems/electrical/bus/ac-2", 1);
|
||||||
var autoconfig_running = props.globals.getNode("/systems/acconfig/autoconfig-running", 1);
|
var autoconfig_running = props.globals.getNode("systems/acconfig/autoconfig-running", 1);
|
||||||
var ac1_src = props.globals.getNode("/systems/electrical/ac1-src", 1);
|
var ac1_src = props.globals.getNode("systems/electrical/ac1-src", 1);
|
||||||
var ac2_src = props.globals.getNode("/systems/electrical/ac2-src", 1);
|
var ac2_src = props.globals.getNode("systems/electrical/ac2-src", 1);
|
||||||
var lighting_du4 = props.globals.getNode("/controls/lighting/DU/du4", 1);
|
var lighting_du4 = props.globals.getNode("controls/lighting/DU/du4", 1);
|
||||||
var ecam_page = props.globals.getNode("/ECAM/Lower/page", 1);
|
var ecam_page = props.globals.getNode("ECAM/Lower/page", 1);
|
||||||
var hour = props.globals.getNode("/sim/time/utc/hour", 1);
|
var hour = props.globals.getNode("sim/time/utc/hour", 1);
|
||||||
var minute = props.globals.getNode("/sim/time/utc/minute", 1);
|
var minute = props.globals.getNode("sim/time/utc/minute", 1);
|
||||||
var apu_flap = props.globals.getNode("/systems/apu/flap", 1);
|
var apu_flap = props.globals.getNode("systems/apu/flap", 1);
|
||||||
var apu_rpm = props.globals.getNode("/systems/apu/rpm", 1);
|
var apu_rpm = props.globals.getNode("systems/apu/rpm", 1);
|
||||||
var apu_egt = props.globals.getNode("/systems/apu/egt", 1);
|
var apu_egt = props.globals.getNode("systems/apu/egt", 1);
|
||||||
var door_left = props.globals.getNode("/ECAM/Lower/door-left", 1);
|
var door_left = props.globals.getNode("ECAM/Lower/door-left", 1);
|
||||||
var door_right = props.globals.getNode("/ECAM/Lower/door-right", 1);
|
var door_right = props.globals.getNode("ECAM/Lower/door-right", 1);
|
||||||
var door_nose_left = props.globals.getNode("/ECAM/Lower/door-nose-left", 1);
|
var door_nose_left = props.globals.getNode("ECAM/Lower/door-nose-left", 1);
|
||||||
var door_nose_right = props.globals.getNode("/ECAM/Lower/door-nose-right", 1);
|
var door_nose_right = props.globals.getNode("ECAM/Lower/door-nose-right", 1);
|
||||||
var apu_rpm_rot = props.globals.getNode("/ECAM/Lower/APU-N", 1);
|
var apu_rpm_rot = props.globals.getNode("ECAM/Lower/APU-N", 1);
|
||||||
var apu_egt_rot = props.globals.getNode("/ECAM/Lower/APU-EGT", 1);
|
var apu_egt_rot = props.globals.getNode("ECAM/Lower/APU-EGT", 1);
|
||||||
var oil_qt1 = props.globals.getNode("/ECAM/Lower/Oil-QT[0]", 1);
|
var oil_qt1 = props.globals.getNode("ECAM/Lower/Oil-QT[0]", 1);
|
||||||
var oil_qt2 = props.globals.getNode("/ECAM/Lower/Oil-QT[1]", 1);
|
var oil_qt2 = props.globals.getNode("ECAM/Lower/Oil-QT[1]", 1);
|
||||||
var oil_psi1 = props.globals.getNode("/ECAM/Lower/Oil-PSI[0]", 1);
|
var oil_psi1 = props.globals.getNode("ECAM/Lower/Oil-PSI[0]", 1);
|
||||||
var oil_psi2 = props.globals.getNode("/ECAM/Lower/Oil-PSI[1]", 1);
|
var oil_psi2 = props.globals.getNode("ECAM/Lower/Oil-PSI[1]", 1);
|
||||||
var bleedapu = props.globals.getNode("/systems/pneumatic/bleedapu", 1);
|
var bleedapu = props.globals.getNode("systems/pneumatic/bleedapu", 1);
|
||||||
var oil_psi_actual1 = props.globals.getNode("/engines/engine[0]/oil-psi-actual", 1);
|
var oil_psi_actual1 = props.globals.getNode("engines/engine[0]/oil-psi-actual", 1);
|
||||||
var oil_psi_actual2 = props.globals.getNode("/engines/engine[1]/oil-psi-actual", 1);
|
var oil_psi_actual2 = props.globals.getNode("engines/engine[1]/oil-psi-actual", 1);
|
||||||
var aileron_ind_left = props.globals.getNode("/ECAM/Lower/aileron-ind-left", 1);
|
var aileron_ind_left = props.globals.getNode("ECAM/Lower/aileron-ind-left", 1);
|
||||||
var aileron_ind_right = props.globals.getNode("/ECAM/Lower/aileron-ind-right", 1);
|
var aileron_ind_right = props.globals.getNode("ECAM/Lower/aileron-ind-right", 1);
|
||||||
var elevator_ind_left = props.globals.getNode("/ECAM/Lower/elevator-ind-left", 1);
|
var elevator_ind_left = props.globals.getNode("ECAM/Lower/elevator-ind-left", 1);
|
||||||
var elevator_ind_right = props.globals.getNode("/ECAM/Lower/elevator-ind-right", 1);
|
var elevator_ind_right = props.globals.getNode("ECAM/Lower/elevator-ind-right", 1);
|
||||||
var elevator_trim_deg = props.globals.getNode("/ECAM/Lower/elevator-trim-deg", 1);
|
var elevator_trim_deg = props.globals.getNode("ECAM/Lower/elevator-trim-deg", 1);
|
||||||
var final_deg = props.globals.getNode("/fdm/jsbsim/hydraulics/rudder/final-deg", 1);
|
var final_deg = props.globals.getNode("fdm/jsbsim/hydraulics/rudder/final-deg", 1);
|
||||||
var temperature_degc = props.globals.getNode("/environment/temperature-degc", 1);
|
var temperature_degc = props.globals.getNode("environment/temperature-degc", 1);
|
||||||
var gw = props.globals.getNode("/FMGC/internal/gw", 1);
|
var gw = props.globals.getNode("FMGC/internal/gw", 1);
|
||||||
var tank3_content_lbs = props.globals.getNode("/fdm/jsbsim/propulsion/tank[2]/contents-lbs", 1);
|
var tank3_content_lbs = props.globals.getNode("fdm/jsbsim/propulsion/tank[2]/contents-lbs", 1);
|
||||||
var apu_master = props.globals.getNode("/controls/APU/master", 1);
|
var apu_master = props.globals.getNode("controls/APU/master", 1);
|
||||||
var ir2_knob = props.globals.getNode("/controls/adirs/ir[1]/knob", 1);
|
var ir2_knob = props.globals.getNode("controls/adirs/ir[1]/knob", 1);
|
||||||
var switch_bleedapu = props.globals.getNode("/controls/pneumatic/switches/bleedapu", 1);
|
var switch_bleedapu = props.globals.getNode("controls/pneumatic/switches/bleedapu", 1);
|
||||||
var pneumatic_xbleed_state = props.globals.getNode("/systems/pneumatic/xbleed-state", 1);
|
var pneumatic_xbleed_state = props.globals.getNode("systems/pneumatic/xbleed-state", 1);
|
||||||
var xbleed = props.globals.getNode("/systems/pneumatic/xbleed", 1);
|
var xbleed = props.globals.getNode("systems/pneumatic/xbleed", 1);
|
||||||
var hp_valve1_state = props.globals.getNode("/systems/pneumatic/hp-valve-1-state", 1);
|
var hp_valve1_state = props.globals.getNode("systems/pneumatic/hp-valve-1-state", 1);
|
||||||
var hp_valve2_state = props.globals.getNode("/systems/pneumatic/hp-valve-2-state", 1);
|
var hp_valve2_state = props.globals.getNode("systems/pneumatic/hp-valve-2-state", 1);
|
||||||
var hp_valve1 = props.globals.getNode("/systems/pneumatic/hp-valve-1", 1);
|
var hp_valve1 = props.globals.getNode("systems/pneumatic/hp-valve-1", 1);
|
||||||
var hp_valve2 = props.globals.getNode("/systems/pneumatic/hp-valve-2", 1);
|
var hp_valve2 = props.globals.getNode("systems/pneumatic/hp-valve-2", 1);
|
||||||
var eng_valve1_state = props.globals.getNode("/systems/pneumatic/eng-valve-1-state", 1);
|
var eng_valve1_state = props.globals.getNode("systems/pneumatic/eng-valve-1-state", 1);
|
||||||
var eng_valve2_state = props.globals.getNode("/systems/pneumatic/eng-valve-2-state", 1);
|
var eng_valve2_state = props.globals.getNode("systems/pneumatic/eng-valve-2-state", 1);
|
||||||
var eng_valve1 = props.globals.getNode("/systems/pneumatic/eng-valve-1", 1);
|
var eng_valve1 = props.globals.getNode("systems/pneumatic/eng-valve-1", 1);
|
||||||
var eng_valve2 = props.globals.getNode("/systems/pneumatic/eng-valve-2", 1);
|
var eng_valve2 = props.globals.getNode("systems/pneumatic/eng-valve-2", 1);
|
||||||
var precooler1_psi = props.globals.getNode("/systems/pneumatic/precooler-1-psi", 1);
|
var precooler1_psi = props.globals.getNode("systems/pneumatic/precooler-1-psi", 1);
|
||||||
var precooler2_psi = props.globals.getNode("/systems/pneumatic/precooler-2-psi", 1);
|
var precooler2_psi = props.globals.getNode("systems/pneumatic/precooler-2-psi", 1);
|
||||||
var precooler1_temp = props.globals.getNode("/systems/pneumatic/precooler-1-temp", 1);
|
var precooler1_temp = props.globals.getNode("systems/pneumatic/precooler-1-temp", 1);
|
||||||
var precooler2_temp = props.globals.getNode("/systems/pneumatic/precooler-2-temp", 1);
|
var precooler2_temp = props.globals.getNode("systems/pneumatic/precooler-2-temp", 1);
|
||||||
var precooler1_ovht = props.globals.getNode("/systems/pneumatic/precooler-1-ovht", 1);
|
var precooler1_ovht = props.globals.getNode("systems/pneumatic/precooler-1-ovht", 1);
|
||||||
var precooler2_ovht = props.globals.getNode("/systems/pneumatic/precooler-2-ovht", 1);
|
var precooler2_ovht = props.globals.getNode("systems/pneumatic/precooler-2-ovht", 1);
|
||||||
var gs_kt = props.globals.getNode("/velocities/groundspeed-kt", 1);
|
var gs_kt = props.globals.getNode("velocities/groundspeed-kt", 1);
|
||||||
var switch_wing_aice = props.globals.getNode("/controls/switches/wing", 1);
|
var switch_wing_aice = props.globals.getNode("controls/switches/wing", 1);
|
||||||
var deice_wing = props.globals.getNode("/controls/deice/wing", 1);
|
var deice_wing = props.globals.getNode("controls/deice/wing", 1);
|
||||||
var eng1_n2_actual = props.globals.getNode("/engines/engine[0]/n2-actual", 1);
|
var eng1_n2_actual = props.globals.getNode("engines/engine[0]/n2-actual", 1);
|
||||||
var eng2_n2_actual = props.globals.getNode("/engines/engine[1]/n2-actual", 1);
|
var eng2_n2_actual = props.globals.getNode("engines/engine[1]/n2-actual", 1);
|
||||||
var pack1_out_temp = props.globals.getNode("/systems/pressurization/pack-1-out-temp", 1);
|
var pack1_out_temp = props.globals.getNode("systems/pressurization/pack-1-out-temp", 1);
|
||||||
var pack2_out_temp = props.globals.getNode("/systems/pressurization/pack-2-out-temp", 1);
|
var pack2_out_temp = props.globals.getNode("systems/pressurization/pack-2-out-temp", 1);
|
||||||
var pack1_comp_out_temp = props.globals.getNode("/systems/pressurization/pack-1-comp-out-temp", 1);
|
var pack1_comp_out_temp = props.globals.getNode("systems/pressurization/pack-1-comp-out-temp", 1);
|
||||||
var pack2_comp_out_temp = props.globals.getNode("/systems/pressurization/pack-2-comp-out-temp", 1);
|
var pack2_comp_out_temp = props.globals.getNode("systems/pressurization/pack-2-comp-out-temp", 1);
|
||||||
var pack1_bypass = props.globals.getNode("/systems/pressurization/pack-1-bypass", 1);
|
var pack1_bypass = props.globals.getNode("systems/pressurization/pack-1-bypass", 1);
|
||||||
var pack2_bypass = props.globals.getNode("/systems/pressurization/pack-2-bypass", 1);
|
var pack2_bypass = props.globals.getNode("systems/pressurization/pack-2-bypass", 1);
|
||||||
var pack1_flow = props.globals.getNode("/systems/pressurization/pack-1-flow", 1);
|
var pack1_flow = props.globals.getNode("systems/pressurization/pack-1-flow", 1);
|
||||||
var pack2_flow = props.globals.getNode("/systems/pressurization/pack-2-flow", 1);
|
var pack2_flow = props.globals.getNode("systems/pressurization/pack-2-flow", 1);
|
||||||
var pack1_valve = props.globals.getNode("/systems/pressurization/pack-1-valve", 1);
|
var pack1_valve = props.globals.getNode("systems/pressurization/pack-1-valve", 1);
|
||||||
var pack2_valve = props.globals.getNode("/systems/pressurization/pack-2-valve", 1);
|
var pack2_valve = props.globals.getNode("systems/pressurization/pack-2-valve", 1);
|
||||||
var switch_pack1 = props.globals.getNode("/controls/pneumatic/switches/pack1", 1);
|
var switch_pack1 = props.globals.getNode("controls/pneumatic/switches/pack1", 1);
|
||||||
var switch_pack2 = props.globals.getNode("/controls/pneumatic/switches/pack2", 1);
|
var switch_pack2 = props.globals.getNode("controls/pneumatic/switches/pack2", 1);
|
||||||
var oil_qt1_actual = props.globals.getNode("/engines/engine[0]/oil-qt-actual", 1);
|
var oil_qt1_actual = props.globals.getNode("engines/engine[0]/oil-qt-actual", 1);
|
||||||
var oil_qt2_actual = props.globals.getNode("/engines/engine[1]/oil-qt-actual", 1);
|
var oil_qt2_actual = props.globals.getNode("engines/engine[1]/oil-qt-actual", 1);
|
||||||
var fuel_used_lbs1 = props.globals.getNode("/systems/fuel/fuel-used-1", 1);
|
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 fuel_used_lbs2 = props.globals.getNode("systems/fuel/fuel-used-2", 1);
|
||||||
var doorL1_pos = props.globals.getNode("sim/model/door-positions/doorl1/position-norm", 1);
|
var doorL1_pos = props.globals.getNode("sim/model/door-positions/doorl1/position-norm", 1);
|
||||||
var doorR1_pos = props.globals.getNode("sim/model/door-positions/doorr1/position-norm", 1);
|
var doorR1_pos = props.globals.getNode("sim/model/door-positions/doorr1/position-norm", 1);
|
||||||
var doorL4_pos = props.globals.getNode("sim/model/door-positions/doorl4/position-norm", 1);
|
var doorL4_pos = props.globals.getNode("sim/model/door-positions/doorl4/position-norm", 1);
|
||||||
var doorR4_pos = props.globals.getNode("sim/model/door-positions/doorr4/position-norm", 1);
|
var doorR4_pos = props.globals.getNode("sim/model/door-positions/doorr4/position-norm", 1);
|
||||||
var cargobulk_pos = props.globals.getNode("/sim/model/door-positions/cargobulk/position-norm", 1);
|
var cargobulk_pos = props.globals.getNode("sim/model/door-positions/cargobulk/position-norm", 1);
|
||||||
var cargofwd_pos = props.globals.getNode("/sim/model/door-positions/cargofwd/position-norm", 1);
|
var cargofwd_pos = props.globals.getNode("sim/model/door-positions/cargofwd/position-norm", 1);
|
||||||
var cargoaft_pos = props.globals.getNode("/sim/model/door-positions/cargoaft/position-norm", 1);
|
var cargoaft_pos = props.globals.getNode("sim/model/door-positions/cargoaft/position-norm", 1);
|
||||||
|
|
||||||
# Electrical nodes
|
# Electrical nodes
|
||||||
var apu_volts = props.globals.getNode("/systems/electrical/sources/apu/output-volt", 1);
|
var apu_volts = props.globals.getNode("systems/electrical/sources/apu/output-volt", 1);
|
||||||
var apu_hz = props.globals.getNode("/systems/electrical/sources/apu/output-hertz", 1);
|
var apu_hz = props.globals.getNode("systems/electrical/sources/apu/output-hertz", 1);
|
||||||
var gen_apu = props.globals.getNode("/systems/electrical/relay/apu-glc/contact-pos", 1);
|
var gen_apu = props.globals.getNode("systems/electrical/relay/apu-glc/contact-pos", 1);
|
||||||
var switch_bat1 = props.globals.getNode("/controls/electrical/switches/bat-1", 1);
|
var switch_bat1 = props.globals.getNode("controls/electrical/switches/bat-1", 1);
|
||||||
var switch_bat2 = props.globals.getNode("/controls/electrical/switches/bat-2", 1);
|
var switch_bat2 = props.globals.getNode("controls/electrical/switches/bat-2", 1);
|
||||||
var bat1_amps = props.globals.getNode("/systems/electrical/sources/bat-1/amp", 1);
|
var bat1_amps = props.globals.getNode("systems/electrical/sources/bat-1/amp", 1);
|
||||||
var bat2_amps = props.globals.getNode("/systems/electrical/sources/bat-2/amp", 1);
|
var bat2_amps = props.globals.getNode("systems/electrical/sources/bat-2/amp", 1);
|
||||||
var bat1_volts = props.globals.getNode("/systems/electrical/sources/bat-1/volt", 1);
|
var bat1_volts = props.globals.getNode("systems/electrical/sources/bat-1/volt", 1);
|
||||||
var bat2_volts = props.globals.getNode("/systems/electrical/sources/bat-2/volt", 1);
|
var bat2_volts = props.globals.getNode("systems/electrical/sources/bat-2/volt", 1);
|
||||||
var bat1_fault = props.globals.getNode("/systems/electrical/light/bat-1-fault", 1);
|
var bat1_fault = props.globals.getNode("systems/electrical/light/bat-1-fault", 1);
|
||||||
var bat2_fault = props.globals.getNode("/systems/electrical/light/bat-2-fault", 1);
|
var bat2_fault = props.globals.getNode("systems/electrical/light/bat-2-fault", 1);
|
||||||
var emerGenVolts = props.globals.getNode("/systems/electrical/relay/emer-glc/output", 1);
|
var emerGenVolts = props.globals.getNode("systems/electrical/relay/emer-glc/output", 1);
|
||||||
var emerGenHz = props.globals.getNode("/systems/electrical/sources/emer-gen/output-hertz", 1);
|
var emerGenHz = props.globals.getNode("systems/electrical/sources/emer-gen/output-hertz", 1);
|
||||||
var tr1_volts = props.globals.getNode("/systems/electrical/relay/tr-contactor-1/output", 1);
|
var tr1_volts = props.globals.getNode("systems/electrical/relay/tr-contactor-1/output", 1);
|
||||||
var tr2_volts = props.globals.getNode("/systems/electrical/relay/tr-contactor-2/output", 1);
|
var tr2_volts = props.globals.getNode("systems/electrical/relay/tr-contactor-2/output", 1);
|
||||||
var tr1_amps = props.globals.getNode("/systems/electrical/relay/tr-contactor-1/output-amp", 1);
|
var tr1_amps = props.globals.getNode("systems/electrical/relay/tr-contactor-1/output-amp", 1);
|
||||||
var tr2_amps = props.globals.getNode("/systems/electrical/relay/tr-contactor-2/output-amp", 1);
|
var tr2_amps = props.globals.getNode("systems/electrical/relay/tr-contactor-2/output-amp", 1);
|
||||||
var dc1 = props.globals.getNode("/systems/electrical/bus/dc-1", 1);
|
var dc1 = props.globals.getNode("systems/electrical/bus/dc-1", 1);
|
||||||
var dc2 = props.globals.getNode("/systems/electrical/bus/dc-2", 1);
|
var dc2 = props.globals.getNode("systems/electrical/bus/dc-2", 1);
|
||||||
var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess", 1);
|
var dc_ess = props.globals.getNode("systems/electrical/bus/dc-ess", 1);
|
||||||
var switch_emer_gen = props.globals.getNode("/systems/electrical/sources/emer-gen/output-volt", 1);
|
var switch_emer_gen = props.globals.getNode("systems/electrical/sources/emer-gen/output-volt", 1);
|
||||||
var switch_gen1 = props.globals.getNode("/controls/electrical/switches/gen-1", 1);
|
var switch_gen1 = props.globals.getNode("controls/electrical/switches/gen-1", 1);
|
||||||
var switch_gen2 = props.globals.getNode("/controls/electrical/switches/gen-2", 1);
|
var switch_gen2 = props.globals.getNode("controls/electrical/switches/gen-2", 1);
|
||||||
var gen1_volts = props.globals.getNode("/systems/electrical/sources/idg-1/output-volt", 1);
|
var gen1_volts = props.globals.getNode("systems/electrical/sources/idg-1/output-volt", 1);
|
||||||
var gen2_volts = props.globals.getNode("/systems/electrical/sources/idg-2/output-volt", 1);
|
var gen2_volts = props.globals.getNode("systems/electrical/sources/idg-2/output-volt", 1);
|
||||||
var gen1_hz = props.globals.getNode("/systems/electrical/sources/idg-1/output-hertz", 1);
|
var gen1_hz = props.globals.getNode("systems/electrical/sources/idg-1/output-hertz", 1);
|
||||||
var gen2_hz = props.globals.getNode("/systems/electrical/sources/idg-2/output-hertz", 1);
|
var gen2_hz = props.globals.getNode("systems/electrical/sources/idg-2/output-hertz", 1);
|
||||||
var ext_volts = props.globals.getNode("/systems/electrical/sources/ext/output-volt", 1);
|
var ext_volts = props.globals.getNode("systems/electrical/sources/ext/output-volt", 1);
|
||||||
var ext_hz = props.globals.getNode("/systems/electrical/sources/ext/output-hertz", 1);
|
var ext_hz = props.globals.getNode("systems/electrical/sources/ext/output-hertz", 1);
|
||||||
var galleyshed = props.globals.getNode("/systems/electrical/extra/galleyshed", 1);
|
var galleyshed = props.globals.getNode("systems/electrical/extra/galleyshed", 1);
|
||||||
var switch_galley = props.globals.getNode("/controls/electrical/switches/galley", 1);
|
var switch_galley = props.globals.getNode("controls/electrical/switches/galley", 1);
|
||||||
var dcbat = props.globals.getNode("/systems/electrical/bus/dc-bat", 1);
|
var dcbat = props.globals.getNode("systems/electrical/bus/dc-bat", 1);
|
||||||
var ac_ess = props.globals.getNode("/systems/electrical/bus/ac-ess", 1);
|
var ac_ess = props.globals.getNode("systems/electrical/bus/ac-ess", 1);
|
||||||
var ac1 = props.globals.getNode("/systems/electrical/bus/ac-1", 1);
|
var ac1 = props.globals.getNode("systems/electrical/bus/ac-1", 1);
|
||||||
var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2", 1);
|
var ac2 = props.globals.getNode("systems/electrical/bus/ac-2", 1);
|
||||||
var switch_ac_ess_feed = props.globals.getNode("/controls/electrical/switches/ac-ess-feed", 1);
|
var switch_ac_ess_feed = props.globals.getNode("controls/electrical/switches/ac-ess-feed", 1);
|
||||||
var tr1_fault = props.globals.getNode("/systems/failures/electrical/tr-1", 1);
|
var tr1_fault = props.globals.getNode("systems/failures/electrical/tr-1", 1);
|
||||||
var tr2_fault = props.globals.getNode("/systems/failures/electrical/tr-2", 1);
|
var tr2_fault = props.globals.getNode("systems/failures/electrical/tr-2", 1);
|
||||||
var essTrVolt = props.globals.getNode("/systems/electrical/relay/dc-ess-feed-tr/output", 1);
|
var essTrVolt = props.globals.getNode("systems/electrical/relay/dc-ess-feed-tr/output", 1);
|
||||||
var essTrAmp = props.globals.getNode("/systems/electrical/relay/dc-ess-feed-tr/output-amp", 1);
|
var essTrAmp = props.globals.getNode("systems/electrical/relay/dc-ess-feed-tr/output-amp", 1);
|
||||||
|
|
||||||
# Hydraulic
|
# Hydraulic
|
||||||
var blue_psi = 0;
|
var blue_psi = 0;
|
||||||
var green_psi = 0;
|
var green_psi = 0;
|
||||||
var yellow_psi = 0;
|
var yellow_psi = 0;
|
||||||
var y_resv_lo_air_press = props.globals.getNode("/systems/hydraulic/yellow-resv-lo-air-press", 1);
|
var y_resv_lo_air_press = props.globals.getNode("systems/hydraulic/yellow-resv-lo-air-press", 1);
|
||||||
var b_resv_lo_air_press = props.globals.getNode("/systems/hydraulic/blue-resv-lo-air-press", 1);
|
var b_resv_lo_air_press = props.globals.getNode("systems/hydraulic/blue-resv-lo-air-press", 1);
|
||||||
var g_resv_lo_air_press = props.globals.getNode("/systems/hydraulic/green-resv-lo-air-press", 1);
|
var g_resv_lo_air_press = props.globals.getNode("systems/hydraulic/green-resv-lo-air-press", 1);
|
||||||
var elec_pump_y_ovht = props.globals.getNode("/systems/hydraulic/elec-pump-yellow-ovht", 1);
|
var elec_pump_y_ovht = props.globals.getNode("systems/hydraulic/elec-pump-yellow-ovht", 1);
|
||||||
var elec_pump_b_ovht = props.globals.getNode("/systems/hydraulic/elec-pump-blue-ovht", 1);
|
var elec_pump_b_ovht = props.globals.getNode("systems/hydraulic/elec-pump-blue-ovht", 1);
|
||||||
var rat_deployed = props.globals.getNode("/controls/hydraulic/rat-deployed", 1);
|
var rat_deployed = props.globals.getNode("controls/hydraulic/rat-deployed", 1);
|
||||||
var y_resv_ovht = props.globals.getNode("/systems/hydraulic/yellow-resv-ovht", 1);
|
var y_resv_ovht = props.globals.getNode("systems/hydraulic/yellow-resv-ovht", 1);
|
||||||
var b_resv_ovht = props.globals.getNode("/systems/hydraulic/blue-resv-ovht", 1);
|
var b_resv_ovht = props.globals.getNode("systems/hydraulic/blue-resv-ovht", 1);
|
||||||
var g_resv_ovht = props.globals.getNode("/systems/hydraulic/green-resv-ovht", 1);
|
var g_resv_ovht = props.globals.getNode("systems/hydraulic/green-resv-ovht", 1);
|
||||||
var askidsw = 0;
|
var askidsw = 0;
|
||||||
var brakemode = 0;
|
var brakemode = 0;
|
||||||
var accum = 0;
|
var accum = 0;
|
||||||
var L1BrakeTempc = props.globals.getNode("/gear/gear[1]/L1brake-temp-degc", 1);
|
var L1BrakeTempc = props.globals.getNode("gear/gear[1]/L1brake-temp-degc", 1);
|
||||||
var L2BrakeTempc = props.globals.getNode("/gear/gear[1]/L2brake-temp-degc", 1);
|
var L2BrakeTempc = props.globals.getNode("gear/gear[1]/L2brake-temp-degc", 1);
|
||||||
var R3BrakeTempc = props.globals.getNode("/gear/gear[2]/R3brake-temp-degc", 1);
|
var R3BrakeTempc = props.globals.getNode("gear/gear[2]/R3brake-temp-degc", 1);
|
||||||
var R4BrakeTempc = props.globals.getNode("/gear/gear[2]/R4brake-temp-degc", 1);
|
var R4BrakeTempc = props.globals.getNode("gear/gear[2]/R4brake-temp-degc", 1);
|
||||||
|
|
||||||
var eng1_running = props.globals.getNode("/engines/engine[0]/running", 1);
|
var eng1_running = props.globals.getNode("engines/engine[0]/running", 1);
|
||||||
var eng2_running = props.globals.getNode("/engines/engine[1]/running", 1);
|
var eng2_running = props.globals.getNode("engines/engine[1]/running", 1);
|
||||||
var switch_cart = props.globals.getNode("/controls/electrical/ground-cart", 1);
|
var switch_cart = props.globals.getNode("controls/electrical/ground-cart", 1);
|
||||||
var total_psi = props.globals.getNode("/systems/pneumatic/total-psi", 1);
|
var total_psi = props.globals.getNode("systems/pneumatic/total-psi", 1);
|
||||||
var spoiler_L1 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l1/final-deg", 1);
|
var spoiler_L1 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-l1/final-deg", 1);
|
||||||
var spoiler_L2 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l2/final-deg", 1);
|
var spoiler_L2 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-l2/final-deg", 1);
|
||||||
var spoiler_L3 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l3/final-deg", 1);
|
var spoiler_L3 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-l3/final-deg", 1);
|
||||||
var spoiler_L4 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l4/final-deg", 1);
|
var spoiler_L4 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-l4/final-deg", 1);
|
||||||
var spoiler_L5 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-l5/final-deg", 1);
|
var spoiler_L5 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-l5/final-deg", 1);
|
||||||
var spoiler_R1 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r1/final-deg", 1);
|
var spoiler_R1 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-r1/final-deg", 1);
|
||||||
var spoiler_R2 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r2/final-deg", 1);
|
var spoiler_R2 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-r2/final-deg", 1);
|
||||||
var spoiler_R3 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r3/final-deg", 1);
|
var spoiler_R3 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-r3/final-deg", 1);
|
||||||
var spoiler_R4 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r4/final-deg", 1);
|
var spoiler_R4 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-r4/final-deg", 1);
|
||||||
var spoiler_R5 = props.globals.getNode("/fdm/jsbsim/hydraulics/spoiler-r5/final-deg", 1);
|
var spoiler_R5 = props.globals.getNode("fdm/jsbsim/hydraulics/spoiler-r5/final-deg", 1);
|
||||||
var spoiler_L1_fail = props.globals.getNode("/systems/failures/spoiler-l1", 1);
|
var spoiler_L1_fail = props.globals.getNode("systems/failures/spoiler-l1", 1);
|
||||||
var spoiler_L2_fail = props.globals.getNode("/systems/failures/spoiler-l2", 1);
|
var spoiler_L2_fail = props.globals.getNode("systems/failures/spoiler-l2", 1);
|
||||||
var spoiler_L3_fail = props.globals.getNode("/systems/failures/spoiler-l3", 1);
|
var spoiler_L3_fail = props.globals.getNode("systems/failures/spoiler-l3", 1);
|
||||||
var spoiler_L4_fail = props.globals.getNode("/systems/failures/spoiler-l4", 1);
|
var spoiler_L4_fail = props.globals.getNode("systems/failures/spoiler-l4", 1);
|
||||||
var spoiler_L5_fail = props.globals.getNode("/systems/failures/spoiler-l5", 1);
|
var spoiler_L5_fail = props.globals.getNode("systems/failures/spoiler-l5", 1);
|
||||||
var spoiler_R1_fail = props.globals.getNode("/systems/failures/spoiler-r1", 1);
|
var spoiler_R1_fail = props.globals.getNode("systems/failures/spoiler-r1", 1);
|
||||||
var spoiler_R2_fail = props.globals.getNode("/systems/failures/spoiler-r2", 1);
|
var spoiler_R2_fail = props.globals.getNode("systems/failures/spoiler-r2", 1);
|
||||||
var spoiler_R3_fail = props.globals.getNode("/systems/failures/spoiler-r3", 1);
|
var spoiler_R3_fail = props.globals.getNode("systems/failures/spoiler-r3", 1);
|
||||||
var spoiler_R4_fail = props.globals.getNode("/systems/failures/spoiler-r4", 1);
|
var spoiler_R4_fail = props.globals.getNode("systems/failures/spoiler-r4", 1);
|
||||||
var spoiler_R5_fail = props.globals.getNode("/systems/failures/spoiler-r5", 1);
|
var spoiler_R5_fail = props.globals.getNode("systems/failures/spoiler-r5", 1);
|
||||||
var elac1 = props.globals.getNode("/systems/fctl/elac1", 1);
|
var elac1 = props.globals.getNode("systems/fctl/elac1", 1);
|
||||||
var elac2 = props.globals.getNode("/systems/fctl/elac2", 1);
|
var elac2 = props.globals.getNode("systems/fctl/elac2", 1);
|
||||||
var sec1 = props.globals.getNode("/systems/fctl/sec1", 1);
|
var sec1 = props.globals.getNode("systems/fctl/sec1", 1);
|
||||||
var sec2 = props.globals.getNode("/systems/fctl/sec2", 1);
|
var sec2 = props.globals.getNode("systems/fctl/sec2", 1);
|
||||||
var sec3 = props.globals.getNode("/systems/fctl/sec3", 1);
|
var sec3 = props.globals.getNode("systems/fctl/sec3", 1);
|
||||||
var elac1_fail = props.globals.getNode("/systems/failures/elac1", 1);
|
var elac1_fail = props.globals.getNode("systems/failures/elac1", 1);
|
||||||
var elac2_fail = props.globals.getNode("/systems/failures/elac2", 1);
|
var elac2_fail = props.globals.getNode("systems/failures/elac2", 1);
|
||||||
var sec1_fail = props.globals.getNode("/systems/failures/sec1", 1);
|
var sec1_fail = props.globals.getNode("systems/failures/sec1", 1);
|
||||||
var sec2_fail = props.globals.getNode("/systems/failures/sec2", 1);
|
var sec2_fail = props.globals.getNode("systems/failures/sec2", 1);
|
||||||
var sec3_fail = props.globals.getNode("/systems/failures/sec3", 1);
|
var sec3_fail = props.globals.getNode("systems/failures/sec3", 1);
|
||||||
var eng1_n1 = props.globals.getNode("engines/engine[0]/n1-actual", 1);
|
var eng1_n1 = props.globals.getNode("engines/engine[0]/n1-actual", 1);
|
||||||
var eng2_n1 = props.globals.getNode("engines/engine[1]/n1-actual", 1);
|
var eng2_n1 = props.globals.getNode("engines/engine[1]/n1-actual", 1);
|
||||||
var total_fuel_lbs = props.globals.getNode("/consumables/fuel/total-fuel-lbs", 1);
|
var total_fuel_lbs = props.globals.getNode("consumables/fuel/total-fuel-lbs", 1);
|
||||||
var fadec1 = props.globals.getNode("/systems/fadec/powered1", 1);
|
var fadec1 = props.globals.getNode("systems/fadec/powered1", 1);
|
||||||
var fadec2 = props.globals.getNode("/systems/fadec/powered2", 1);
|
var fadec2 = props.globals.getNode("systems/fadec/powered2", 1);
|
||||||
var fuel_flow1 = props.globals.getNode("/engines/engine[0]/fuel-flow_actual", 1);
|
var fuel_flow1 = props.globals.getNode("engines/engine[0]/fuel-flow_actual", 1);
|
||||||
var fuel_flow2 = props.globals.getNode("/engines/engine[1]/fuel-flow_actual", 1);
|
var fuel_flow2 = props.globals.getNode("engines/engine[1]/fuel-flow_actual", 1);
|
||||||
var fuel_left_outer_temp = props.globals.getNode("/consumables/fuel/tank[0]/temperature_degC", 1);
|
var fuel_left_outer_temp = props.globals.getNode("consumables/fuel/tank[0]/temperature_degC", 1);
|
||||||
var fuel_left_inner_temp = props.globals.getNode("/consumables/fuel/tank[1]/temperature_degC", 1);
|
var fuel_left_inner_temp = props.globals.getNode("consumables/fuel/tank[1]/temperature_degC", 1);
|
||||||
var fuel_right_outer_temp = props.globals.getNode("/consumables/fuel/tank[3]/temperature_degC", 1);
|
var fuel_right_outer_temp = props.globals.getNode("consumables/fuel/tank[3]/temperature_degC", 1);
|
||||||
var fuel_right_inner_temp = props.globals.getNode("/consumables/fuel/tank[4]/temperature_degC", 1);
|
var fuel_right_inner_temp = props.globals.getNode("consumables/fuel/tank[4]/temperature_degC", 1);
|
||||||
var cutoff_switch1 = props.globals.getNode("/controls/engines/engine[0]/cutoff-switch", 1);
|
var cutoff_switch1 = props.globals.getNode("controls/engines/engine[0]/cutoff-switch", 1);
|
||||||
var cutoff_switch2 = props.globals.getNode("/controls/engines/engine[1]/cutoff-switch", 1);
|
var cutoff_switch2 = props.globals.getNode("controls/engines/engine[1]/cutoff-switch", 1);
|
||||||
var fuel_xfeed = props.globals.getNode("/controls/fuel/x-feed", 1);
|
var fuel_xfeed = props.globals.getNode("controls/fuel/x-feed", 1);
|
||||||
var tank0pump1 = props.globals.getNode("controls/fuel/tank0pump1", 1);
|
var tank0pump1 = props.globals.getNode("controls/fuel/tank0pump1", 1);
|
||||||
var tank0pump2 = props.globals.getNode("controls/fuel/tank0pump2", 1);
|
var tank0pump2 = props.globals.getNode("controls/fuel/tank0pump2", 1);
|
||||||
var tank1pump1 = props.globals.getNode("controls/fuel/tank1pump1", 1);
|
var tank1pump1 = props.globals.getNode("controls/fuel/tank1pump1", 1);
|
||||||
var tank1pump2 = props.globals.getNode("controls/fuel/tank1pump2", 1);
|
var tank1pump2 = props.globals.getNode("controls/fuel/tank1pump2", 1);
|
||||||
var tank2pump1 = props.globals.getNode("controls/fuel/tank2pump1", 1);
|
var tank2pump1 = props.globals.getNode("controls/fuel/tank2pump1", 1);
|
||||||
var tank2pump2 = props.globals.getNode("controls/fuel/tank2pump2", 1);
|
var tank2pump2 = props.globals.getNode("controls/fuel/tank2pump2", 1);
|
||||||
var autobreak_mode = props.globals.getNode("/controls/autobrake/mode", 1);
|
var autobreak_mode = props.globals.getNode("controls/autobrake/mode", 1);
|
||||||
var gear1_pos = props.globals.getNode("gear/gear[0]/position-norm", 1);
|
var gear1_pos = props.globals.getNode("gear/gear[0]/position-norm", 1);
|
||||||
var gear2_pos = props.globals.getNode("gear/gear[1]/position-norm", 1);
|
var gear2_pos = props.globals.getNode("gear/gear[1]/position-norm", 1);
|
||||||
var gear3_pos = props.globals.getNode("gear/gear[2]/position-norm", 1);
|
var gear3_pos = props.globals.getNode("gear/gear[2]/position-norm", 1);
|
||||||
var gear_door_L = props.globals.getNode("/systems/hydraulic/gear/door-left", 1);
|
var gear_door_L = props.globals.getNode("systems/hydraulic/gear/door-left", 1);
|
||||||
var gear_door_R = props.globals.getNode("/systems/hydraulic/gear/door-right", 1);
|
var gear_door_R = props.globals.getNode("systems/hydraulic/gear/door-right", 1);
|
||||||
var gear_door_N = props.globals.getNode("/systems/hydraulic/gear/door-nose", 1);
|
var gear_door_N = props.globals.getNode("systems/hydraulic/gear/door-nose", 1);
|
||||||
var gear_down = props.globals.getNode("/controls/gear/gear-down", 1);
|
var gear_down = props.globals.getNode("controls/gear/gear-down", 1);
|
||||||
var press_vs_norm = props.globals.getNode("/systems/pressurization/vs-norm", 1);
|
var press_vs_norm = props.globals.getNode("systems/pressurization/vs-norm", 1);
|
||||||
var cabinalt = props.globals.getNode("/systems/pressurization/cabinalt-norm", 1);
|
var cabinalt = props.globals.getNode("systems/pressurization/cabinalt-norm", 1);
|
||||||
var gear0_wow = props.globals.getNode("/gear/gear[0]/wow", 1);
|
var gear0_wow = props.globals.getNode("gear/gear[0]/wow", 1);
|
||||||
|
|
||||||
# Create Nodes:
|
# Create Nodes:
|
||||||
var apu_load = props.globals.initNode("/systems/electrical/extra/apu-load", 0, "DOUBLE");
|
var apu_load = props.globals.initNode("/systems/electrical/extra/apu-load", 0, "DOUBLE");
|
||||||
|
@ -1676,25 +1676,25 @@ var canvas_lowerECAM_elec = {
|
||||||
|
|
||||||
|
|
||||||
# Managment of the connecting lines between the components
|
# Managment of the connecting lines between the components
|
||||||
if (getprop("/systems/electrical/relay/apu-glc/contact-pos") and (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") or getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos"))) {
|
if (getprop("systems/electrical/relay/apu-glc/contact-pos") and (getprop("systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") or getprop("systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos"))) {
|
||||||
me["APU-out"].show();
|
me["APU-out"].show();
|
||||||
} else {
|
} else {
|
||||||
me["APU-out"].hide();
|
me["APU-out"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/electrical/relay/ext-epc/contact-pos") and (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") or getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos"))) {
|
if (getprop("systems/electrical/relay/ext-epc/contact-pos") and (getprop("systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") or getprop("systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos"))) {
|
||||||
me["EXT-out"].show();
|
me["EXT-out"].show();
|
||||||
} else {
|
} else {
|
||||||
me["EXT-out"].hide();
|
me["EXT-out"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gen1_volts.getValue() >= 110 and getprop("/systems/electrical/relay/gen-1-glc/contact-pos")) {
|
if (gen1_volts.getValue() >= 110 and getprop("systems/electrical/relay/gen-1-glc/contact-pos")) {
|
||||||
me["ELEC-Line-GEN1-AC1"].show();
|
me["ELEC-Line-GEN1-AC1"].show();
|
||||||
} else {
|
} else {
|
||||||
me["ELEC-Line-GEN1-AC1"].hide();
|
me["ELEC-Line-GEN1-AC1"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gen2_volts.getValue() >= 110 and getprop("/systems/electrical/relay/gen-2-glc/contact-pos")) {
|
if (gen2_volts.getValue() >= 110 and getprop("systems/electrical/relay/gen-2-glc/contact-pos")) {
|
||||||
me["ELEC-Line-GEN2-AC2"].show();
|
me["ELEC-Line-GEN2-AC2"].show();
|
||||||
} else {
|
} else {
|
||||||
me["ELEC-Line-GEN2-AC2"].hide();
|
me["ELEC-Line-GEN2-AC2"].hide();
|
||||||
|
@ -1712,38 +1712,38 @@ var canvas_lowerECAM_elec = {
|
||||||
me["AC2-in"].hide();
|
me["AC2-in"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") and getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos")) {
|
if (getprop("systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") and getprop("systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos")) {
|
||||||
me["ELEC-Line-APU-AC1"].show();
|
me["ELEC-Line-APU-AC1"].show();
|
||||||
me["ELEC-Line-APU-EXT"].show();
|
me["ELEC-Line-APU-EXT"].show();
|
||||||
me["ELEC-Line-EXT-AC2"].show();
|
me["ELEC-Line-EXT-AC2"].show();
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos")) {
|
if (getprop("systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos")) {
|
||||||
me["ELEC-Line-APU-AC1"].show();
|
me["ELEC-Line-APU-AC1"].show();
|
||||||
} else {
|
} else {
|
||||||
me["ELEC-Line-APU-AC1"].hide();
|
me["ELEC-Line-APU-AC1"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos") and getprop("/systems/electrical/relay/apu-glc/contact-pos") and !getprop("/systems/electrical/relay/gen-2-glc/contact-pos")) or (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") and getprop("/systems/electrical/relay/ext-epc/contact-pos") and !getprop("/systems/electrical/relay/gen-1-glc/contact-pos"))) {
|
if ((getprop("systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos") and getprop("systems/electrical/relay/apu-glc/contact-pos") and !getprop("systems/electrical/relay/gen-2-glc/contact-pos")) or (getprop("systems/electrical/relay/ac-bus-ac-bus-tie-1/contact-pos") and getprop("systems/electrical/relay/ext-epc/contact-pos") and !getprop("systems/electrical/relay/gen-1-glc/contact-pos"))) {
|
||||||
me["ELEC-Line-APU-EXT"].show();
|
me["ELEC-Line-APU-EXT"].show();
|
||||||
} else {
|
} else {
|
||||||
me["ELEC-Line-APU-EXT"].hide();
|
me["ELEC-Line-APU-EXT"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos")) {
|
if (getprop("systems/electrical/relay/ac-bus-ac-bus-tie-2/contact-pos")) {
|
||||||
me["ELEC-Line-EXT-AC2"].show();
|
me["ELEC-Line-EXT-AC2"].show();
|
||||||
} else {
|
} else {
|
||||||
me["ELEC-Line-EXT-AC2"].hide();
|
me["ELEC-Line-EXT-AC2"].hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/electrical/relay/ac-ess-feed-1/contact-pos") == 1) {
|
if (getprop("systems/electrical/relay/ac-ess-feed-1/contact-pos") == 1) {
|
||||||
if (ac1.getValue() >= 110) {
|
if (ac1.getValue() >= 110) {
|
||||||
me["ELEC-Line-AC1-ACESS"].show();
|
me["ELEC-Line-AC1-ACESS"].show();
|
||||||
} else {
|
} else {
|
||||||
me["ELEC-Line-AC1-ACESS"].hide();
|
me["ELEC-Line-AC1-ACESS"].hide();
|
||||||
}
|
}
|
||||||
me["ELEC-Line-AC2-ACESS"].hide();
|
me["ELEC-Line-AC2-ACESS"].hide();
|
||||||
} elsif (getprop("/systems/electrical/relay/ac-ess-feed-2/contact-pos") == 1) {
|
} elsif (getprop("systems/electrical/relay/ac-ess-feed-2/contact-pos") == 1) {
|
||||||
me["ELEC-Line-AC1-ACESS"].hide();
|
me["ELEC-Line-AC1-ACESS"].hide();
|
||||||
if (ac2.getValue() >= 110) {
|
if (ac2.getValue() >= 110) {
|
||||||
me["ELEC-Line-AC2-ACESS"].show();
|
me["ELEC-Line-AC2-ACESS"].show();
|
||||||
|
@ -1755,7 +1755,7 @@ var canvas_lowerECAM_elec = {
|
||||||
me["ELEC-Line-AC2-ACESS"].hide();
|
me["ELEC-Line-AC2-ACESS"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/electrical/relay/tr-contactor-1/contact-pos") == 1) {
|
if (getprop("systems/electrical/relay/tr-contactor-1/contact-pos") == 1) {
|
||||||
if (ac1.getValue() < 110) {
|
if (ac1.getValue() < 110) {
|
||||||
me["ELEC-Line-AC1-TR1"].setColorFill(0.7333,0.3803,0);
|
me["ELEC-Line-AC1-TR1"].setColorFill(0.7333,0.3803,0);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1768,7 +1768,7 @@ var canvas_lowerECAM_elec = {
|
||||||
me["ELEC-Line-TR1-DC1"].hide();
|
me["ELEC-Line-TR1-DC1"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/electrical/relay/tr-contactor-2/contact-pos") == 1) {
|
if (getprop("systems/electrical/relay/tr-contactor-2/contact-pos") == 1) {
|
||||||
if (ac2.getValue() < 110) {
|
if (ac2.getValue() < 110) {
|
||||||
me["ELEC-Line-AC2-TR2"].setColorFill(0.7333,0.3803,0);
|
me["ELEC-Line-AC2-TR2"].setColorFill(0.7333,0.3803,0);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1781,25 +1781,25 @@ var canvas_lowerECAM_elec = {
|
||||||
me["ELEC-Line-TR2-DC2"].hide();
|
me["ELEC-Line-TR2-DC2"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/electrical/relay/dc-bus-tie-dc-1/contact-pos")) {
|
if (getprop("systems/electrical/relay/dc-bus-tie-dc-1/contact-pos")) {
|
||||||
me["ELEC-Line-DC1-DCESS_DCBAT"].show();
|
me["ELEC-Line-DC1-DCESS_DCBAT"].show();
|
||||||
} else {
|
} else {
|
||||||
me["ELEC-Line-DC1-DCESS_DCBAT"].hide();
|
me["ELEC-Line-DC1-DCESS_DCBAT"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/electrical/relay/dc-ess-feed-bat/contact-pos")) {
|
if (getprop("systems/electrical/relay/dc-ess-feed-bat/contact-pos")) {
|
||||||
me["ELEC-Line-DC1-DCESS"].show();
|
me["ELEC-Line-DC1-DCESS"].show();
|
||||||
} else {
|
} else {
|
||||||
me["ELEC-Line-DC1-DCESS"].hide();
|
me["ELEC-Line-DC1-DCESS"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/electrical/relay/dc-ess-feed-bat/contact-pos") or getprop("/systems/electrical/relay/dc-bus-tie-dc-1/contact-pos")) {
|
if (getprop("systems/electrical/relay/dc-ess-feed-bat/contact-pos") or getprop("systems/electrical/relay/dc-bus-tie-dc-1/contact-pos")) {
|
||||||
me["ELEC-Line-DC1-DCBAT"].show();
|
me["ELEC-Line-DC1-DCBAT"].show();
|
||||||
} else {
|
} else {
|
||||||
me["ELEC-Line-DC1-DCBAT"].hide();
|
me["ELEC-Line-DC1-DCBAT"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/electrical/relay/dc-bus-tie-dc-2/contact-pos")) {
|
if (getprop("systems/electrical/relay/dc-bus-tie-dc-2/contact-pos")) {
|
||||||
me["ELEC-Line-DC2-DCBAT"].show();
|
me["ELEC-Line-DC2-DCBAT"].show();
|
||||||
me["ELEC-Line-DC2-DCESS_DCBAT"].show();
|
me["ELEC-Line-DC2-DCESS_DCBAT"].show();
|
||||||
} else {
|
} else {
|
||||||
|
@ -1807,7 +1807,7 @@ var canvas_lowerECAM_elec = {
|
||||||
me["ELEC-Line-DC2-DCESS_DCBAT"].hide();
|
me["ELEC-Line-DC2-DCESS_DCBAT"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/electrical/relay/ac-ess-feed-emer-gen/contact-pos")) {
|
if (getprop("systems/electrical/relay/ac-ess-feed-emer-gen/contact-pos")) {
|
||||||
me["EMERGEN-out"].show();
|
me["EMERGEN-out"].show();
|
||||||
me["ELEC-Line-Emergen-ESSTR"].show();
|
me["ELEC-Line-Emergen-ESSTR"].show();
|
||||||
} else {
|
} else {
|
||||||
|
@ -1815,13 +1815,13 @@ var canvas_lowerECAM_elec = {
|
||||||
me["ELEC-Line-Emergen-ESSTR"].hide();
|
me["ELEC-Line-Emergen-ESSTR"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (systems.ELEC.Bus.acEss.getValue() >= 110 and !getprop("/systems/electrical/relay/ac-ess-feed-emer-gen/contact-pos") and (!getprop("/systems/electrical/relay/tr-contactor-1/contact-pos") or !getprop("/systems/electrical/relay/tr-contactor-2/contact-pos"))) {
|
if (systems.ELEC.Bus.acEss.getValue() >= 110 and !getprop("systems/electrical/relay/ac-ess-feed-emer-gen/contact-pos") and (!getprop("systems/electrical/relay/tr-contactor-1/contact-pos") or !getprop("systems/electrical/relay/tr-contactor-2/contact-pos"))) {
|
||||||
me["ELEC-Line-ACESS-TRESS"].show();
|
me["ELEC-Line-ACESS-TRESS"].show();
|
||||||
} else {
|
} else {
|
||||||
me["ELEC-Line-ACESS-TRESS"].hide();
|
me["ELEC-Line-ACESS-TRESS"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/electrical/relay/dc-ess-feed-tr/contact-pos")) {
|
if (getprop("systems/electrical/relay/dc-ess-feed-tr/contact-pos")) {
|
||||||
me["ELEC-Line-ESSTR-DCESS"].show();
|
me["ELEC-Line-ESSTR-DCESS"].show();
|
||||||
} else {
|
} else {
|
||||||
me["ELEC-Line-ESSTR-DCESS"].hide();
|
me["ELEC-Line-ESSTR-DCESS"].hide();
|
||||||
|
@ -2302,7 +2302,7 @@ var canvas_lowerECAM_fuel = {
|
||||||
update: func() {
|
update: func() {
|
||||||
_weight_kgs = acconfig_weight_kgs.getValue();
|
_weight_kgs = acconfig_weight_kgs.getValue();
|
||||||
|
|
||||||
# if (getprop("engines/engine[0]/n1-actual") < getprop("/controls/engines/idle-limit")) {
|
# if (getprop("engines/engine[0]/n1-actual") < getprop("controls/engines/idle-limit")) {
|
||||||
if (eng1_n1.getValue() <= 18.8) {
|
if (eng1_n1.getValue() <= 18.8) {
|
||||||
me["ENG1idFFlow"].setColor(0.7333,0.3803,0);
|
me["ENG1idFFlow"].setColor(0.7333,0.3803,0);
|
||||||
me["FUEL-ENG-1-label"].setColor(0.7333,0.3803,0);
|
me["FUEL-ENG-1-label"].setColor(0.7333,0.3803,0);
|
||||||
|
@ -2311,7 +2311,7 @@ var canvas_lowerECAM_fuel = {
|
||||||
me["FUEL-ENG-1-label"].setColor(0.8078,0.8039,0.8078);
|
me["FUEL-ENG-1-label"].setColor(0.8078,0.8039,0.8078);
|
||||||
}
|
}
|
||||||
|
|
||||||
# if (getprop("engines/engine[1]/n1-actual") < getprop("/controls/engines/idle-limit")) {
|
# if (getprop("engines/engine[1]/n1-actual") < getprop("controls/engines/idle-limit")) {
|
||||||
if (eng2_n1.getValue() <= 18.5) {
|
if (eng2_n1.getValue() <= 18.5) {
|
||||||
me["ENG2idFFlow"].setColor(0.7333,0.3803,0);
|
me["ENG2idFFlow"].setColor(0.7333,0.3803,0);
|
||||||
me["FUEL-ENG-2-label"].setColor(0.7333,0.3803,0);
|
me["FUEL-ENG-2-label"].setColor(0.7333,0.3803,0);
|
||||||
|
@ -3454,13 +3454,13 @@ setlistener("sim/signals/fdm-initialized", func {
|
||||||
lowerECAM_test = canvas_lowerECAM_test.new(group_test, "Aircraft/A320-family/Models/Instruments/Common/res/du-test.svg");
|
lowerECAM_test = canvas_lowerECAM_test.new(group_test, "Aircraft/A320-family/Models/Instruments/Common/res/du-test.svg");
|
||||||
|
|
||||||
lowerECAM_update.start();
|
lowerECAM_update.start();
|
||||||
if (getprop("/systems/acconfig/options/lecam-rate") > 1) {
|
if (getprop("systems/acconfig/options/lecam-rate") > 1) {
|
||||||
l_rateApply();
|
l_rateApply();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var l_rateApply = func {
|
var l_rateApply = func {
|
||||||
lowerECAM_update.restart(0.05 * getprop("/systems/acconfig/options/lecam-rate"));
|
lowerECAM_update.restart(0.05 * getprop("systems/acconfig/options/lecam-rate"));
|
||||||
}
|
}
|
||||||
|
|
||||||
var lowerECAM_update = maketimer(0.05, func {
|
var lowerECAM_update = maketimer(0.05, func {
|
||||||
|
|
|
@ -11,92 +11,92 @@ var symbol = "helvetica_medium.txf";
|
||||||
var normal = 70;
|
var normal = 70;
|
||||||
var small = 56;
|
var small = 56;
|
||||||
var page = "";
|
var page = "";
|
||||||
setprop("/MCDUC/colors/wht/r", 1);
|
setprop("MCDUC/colors/wht/r", 1);
|
||||||
setprop("/MCDUC/colors/wht/g", 1);
|
setprop("MCDUC/colors/wht/g", 1);
|
||||||
setprop("/MCDUC/colors/wht/b", 1);
|
setprop("MCDUC/colors/wht/b", 1);
|
||||||
setprop("/MCDUC/colors/grn/r", 0.0509);
|
setprop("MCDUC/colors/grn/r", 0.0509);
|
||||||
setprop("/MCDUC/colors/grn/g", 0.7529);
|
setprop("MCDUC/colors/grn/g", 0.7529);
|
||||||
setprop("/MCDUC/colors/grn/b", 0.2941);
|
setprop("MCDUC/colors/grn/b", 0.2941);
|
||||||
setprop("/MCDUC/colors/blu/r", 0.0901);
|
setprop("MCDUC/colors/blu/r", 0.0901);
|
||||||
setprop("/MCDUC/colors/blu/g", 0.6039);
|
setprop("MCDUC/colors/blu/g", 0.6039);
|
||||||
setprop("/MCDUC/colors/blu/b", 0.7176);
|
setprop("MCDUC/colors/blu/b", 0.7176);
|
||||||
setprop("/MCDUC/colors/amb/r", 0.7333);
|
setprop("MCDUC/colors/amb/r", 0.7333);
|
||||||
setprop("/MCDUC/colors/amb/g", 0.3803);
|
setprop("MCDUC/colors/amb/g", 0.3803);
|
||||||
setprop("/MCDUC/colors/amb/b", 0.0000);
|
setprop("MCDUC/colors/amb/b", 0.0000);
|
||||||
setprop("/MCDUC/colors/yel/r", 0.9333);
|
setprop("MCDUC/colors/yel/r", 0.9333);
|
||||||
setprop("/MCDUC/colors/yel/g", 0.9333);
|
setprop("MCDUC/colors/yel/g", 0.9333);
|
||||||
setprop("/MCDUC/colors/yel/b", 0.0000);
|
setprop("MCDUC/colors/yel/b", 0.0000);
|
||||||
|
|
||||||
# Fetch nodes:
|
# Fetch nodes:
|
||||||
var ac1 = props.globals.getNode("/systems/electrical/bus/ac-1", 1);
|
var ac1 = props.globals.getNode("systems/electrical/bus/ac-1", 1);
|
||||||
var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2", 1);
|
var ac2 = props.globals.getNode("systems/electrical/bus/ac-2", 1);
|
||||||
var mcdu1_lgt = props.globals.getNode("/controls/lighting/DU/mcdu1", 1);
|
var mcdu1_lgt = props.globals.getNode("controls/lighting/DU/mcdu1", 1);
|
||||||
var mcdu2_lgt = props.globals.getNode("/controls/lighting/DU/mcdu2", 1);
|
var mcdu2_lgt = props.globals.getNode("controls/lighting/DU/mcdu2", 1);
|
||||||
var acType = props.globals.getNode("/MCDUC/type", 1);
|
var acType = props.globals.getNode("MCDUC/type", 1);
|
||||||
var engType = props.globals.getNode("/MCDUC/eng", 1);
|
var engType = props.globals.getNode("MCDUC/eng", 1);
|
||||||
var database1 = props.globals.getNode("/FMGC/internal/navdatabase", 1);
|
var database1 = props.globals.getNode("FMGC/internal/navdatabase", 1);
|
||||||
var database2 = props.globals.getNode("/FMGC/internal/navdatabase2", 1);
|
var database2 = props.globals.getNode("FMGC/internal/navdatabase2", 1);
|
||||||
var databaseCode = props.globals.getNode("/FMGC/internal/navdatabasecode", 1);
|
var databaseCode = props.globals.getNode("FMGC/internal/navdatabasecode", 1);
|
||||||
var vor1 = props.globals.getNode("/FMGC/internal/vor1-mcdu", 1);
|
var vor1 = props.globals.getNode("FMGC/internal/vor1-mcdu", 1);
|
||||||
var vor2 = props.globals.getNode("/FMGC/internal/vor2-mcdu", 1);
|
var vor2 = props.globals.getNode("FMGC/internal/vor2-mcdu", 1);
|
||||||
var ils1 = props.globals.getNode("/FMGC/internal/ils1-mcdu", 1);
|
var ils1 = props.globals.getNode("FMGC/internal/ils1-mcdu", 1);
|
||||||
var adf1 = props.globals.getNode("/FMGC/internal/adf1-mcdu", 1);
|
var adf1 = props.globals.getNode("FMGC/internal/adf1-mcdu", 1);
|
||||||
var adf2 = props.globals.getNode("/FMGC/internal/adf2-mcdu", 1);
|
var adf2 = props.globals.getNode("FMGC/internal/adf2-mcdu", 1);
|
||||||
var vor1FreqSet = props.globals.getNode("/FMGC/internal/vor1freq-set", 1);
|
var vor1FreqSet = props.globals.getNode("FMGC/internal/vor1freq-set", 1);
|
||||||
var vor1CRSSet = props.globals.getNode("/FMGC/internal/vor1crs-set", 1);
|
var vor1CRSSet = props.globals.getNode("FMGC/internal/vor1crs-set", 1);
|
||||||
var vor2FreqSet = props.globals.getNode("/FMGC/internal/vor2freq-set", 1);
|
var vor2FreqSet = props.globals.getNode("FMGC/internal/vor2freq-set", 1);
|
||||||
var vor2CRSSet = props.globals.getNode("/FMGC/internal/vor2crs-set", 1);
|
var vor2CRSSet = props.globals.getNode("FMGC/internal/vor2crs-set", 1);
|
||||||
var ils1FreqSet = props.globals.getNode("/FMGC/internal/ils1freq-set", 1);
|
var ils1FreqSet = props.globals.getNode("FMGC/internal/ils1freq-set", 1);
|
||||||
var ils1CRSSet = props.globals.getNode("/FMGC/internal/ils1crs-set", 1);
|
var ils1CRSSet = props.globals.getNode("FMGC/internal/ils1crs-set", 1);
|
||||||
var adf1FreqSet = props.globals.getNode("/FMGC/internal/adf1freq-set", 1);
|
var adf1FreqSet = props.globals.getNode("FMGC/internal/adf1freq-set", 1);
|
||||||
var adf2FreqSet = props.globals.getNode("/FMGC/internal/adf2freq-set", 1);
|
var adf2FreqSet = props.globals.getNode("FMGC/internal/adf2freq-set", 1);
|
||||||
var ils1CRS = props.globals.getNode("/instrumentation/nav[0]/radials/selected-deg", 1);
|
var ils1CRS = props.globals.getNode("instrumentation/nav[0]/radials/selected-deg", 1);
|
||||||
var vor1CRS = props.globals.getNode("/instrumentation/nav[2]/radials/selected-deg", 1);
|
var vor1CRS = props.globals.getNode("instrumentation/nav[2]/radials/selected-deg", 1);
|
||||||
var vor2CRS = props.globals.getNode("/instrumentation/nav[3]/radials/selected-deg", 1);
|
var vor2CRS = props.globals.getNode("instrumentation/nav[3]/radials/selected-deg", 1);
|
||||||
var flightNum = props.globals.getNode("/MCDUC/flight-num", 1);
|
var flightNum = props.globals.getNode("MCDUC/flight-num", 1);
|
||||||
var flightNumSet = props.globals.getNode("/MCDUC/flight-num-set", 1);
|
var flightNumSet = props.globals.getNode("MCDUC/flight-num-set", 1);
|
||||||
var depArpt = props.globals.getNode("/FMGC/internal/dep-arpt", 1);
|
var depArpt = props.globals.getNode("FMGC/internal/dep-arpt", 1);
|
||||||
var arrArpt = props.globals.getNode("/FMGC/internal/arr-arpt", 1);
|
var arrArpt = props.globals.getNode("FMGC/internal/arr-arpt", 1);
|
||||||
var toFromSet = props.globals.getNode("/FMGC/internal/tofrom-set", 1);
|
var toFromSet = props.globals.getNode("FMGC/internal/tofrom-set", 1);
|
||||||
var costIndex = props.globals.getNode("/FMGC/internal/cost-index", 1);
|
var costIndex = props.globals.getNode("FMGC/internal/cost-index", 1);
|
||||||
var costIndexSet = props.globals.getNode("/FMGC/internal/cost-index-set", 1);
|
var costIndexSet = props.globals.getNode("FMGC/internal/cost-index-set", 1);
|
||||||
var cruiseFL = props.globals.getNode("/FMGC/internal/cruise-fl", 1);
|
var cruiseFL = props.globals.getNode("FMGC/internal/cruise-fl", 1);
|
||||||
var cruiseSet = props.globals.getNode("/FMGC/internal/cruise-lvl-set", 1);
|
var cruiseSet = props.globals.getNode("FMGC/internal/cruise-lvl-set", 1);
|
||||||
var tropo = props.globals.getNode("/FMGC/internal/tropo", 1);
|
var tropo = props.globals.getNode("FMGC/internal/tropo", 1);
|
||||||
var tropoSet = props.globals.getNode("/FMGC/internal/tropo-set", 1);
|
var tropoSet = props.globals.getNode("FMGC/internal/tropo-set", 1);
|
||||||
var ADIRSMCDUBTN = props.globals.getNode("/controls/adirs/mcducbtn", 1);
|
var ADIRSMCDUBTN = props.globals.getNode("controls/adirs/mcducbtn", 1);
|
||||||
var zfwcg = props.globals.getNode("/FMGC/internal/zfwcg", 1);
|
var zfwcg = props.globals.getNode("FMGC/internal/zfwcg", 1);
|
||||||
var zfwcgSet = props.globals.getNode("/FMGC/internal/zfwcg-set", 1);
|
var zfwcgSet = props.globals.getNode("FMGC/internal/zfwcg-set", 1);
|
||||||
var zfw = props.globals.getNode("/FMGC/internal/zfw", 1);
|
var zfw = props.globals.getNode("FMGC/internal/zfw", 1);
|
||||||
var zfwSet = props.globals.getNode("/FMGC/internal/zfw-set", 1);
|
var zfwSet = props.globals.getNode("FMGC/internal/zfw-set", 1);
|
||||||
var block = props.globals.getNode("/FMGC/internal/block", 1);
|
var block = props.globals.getNode("FMGC/internal/block", 1);
|
||||||
var blockSet = props.globals.getNode("/FMGC/internal/block-set", 1);
|
var blockSet = props.globals.getNode("FMGC/internal/block-set", 1);
|
||||||
var state1 = props.globals.getNode("/engines/engine[0]/state", 1);
|
var state1 = props.globals.getNode("engines/engine[0]/state", 1);
|
||||||
var state2 = props.globals.getNode("/engines/engine[1]/state", 1);
|
var state2 = props.globals.getNode("engines/engine[1]/state", 1);
|
||||||
var engrdy = props.globals.getNode("/engines/ready", 1);
|
var engrdy = props.globals.getNode("engines/ready", 1);
|
||||||
var v1 = props.globals.getNode("/FMGC/internal/v1", 1);
|
var v1 = props.globals.getNode("FMGC/internal/v1", 1);
|
||||||
var v1Set = props.globals.getNode("/FMGC/internal/v1-set", 1);
|
var v1Set = props.globals.getNode("FMGC/internal/v1-set", 1);
|
||||||
var vr = props.globals.getNode("/FMGC/internal/vr", 1);
|
var vr = props.globals.getNode("FMGC/internal/vr", 1);
|
||||||
var vrSet = props.globals.getNode("/FMGC/internal/vr-set", 1);
|
var vrSet = props.globals.getNode("FMGC/internal/vr-set", 1);
|
||||||
var v2 = props.globals.getNode("/FMGC/internal/v2", 1);
|
var v2 = props.globals.getNode("FMGC/internal/v2", 1);
|
||||||
var v2Set = props.globals.getNode("/FMGC/internal/v2-set", 1);
|
var v2Set = props.globals.getNode("FMGC/internal/v2-set", 1);
|
||||||
var clbReducFt = props.globals.getNode("/systems/thrust/clbreduc-ft", 1);
|
var clbReducFt = props.globals.getNode("systems/thrust/clbreduc-ft", 1);
|
||||||
var reducFt = props.globals.getNode("/FMGC/internal/reduc-agl-ft", 1); # It's not AGL anymore
|
var reducFt = props.globals.getNode("FMGC/internal/reduc-agl-ft", 1); # It's not AGL anymore
|
||||||
var thrAccSet = props.globals.getNode("/MCDUC/thracc-set", 1);
|
var thrAccSet = props.globals.getNode("MCDUC/thracc-set", 1);
|
||||||
var flapTO = props.globals.getNode("/FMGC/internal/to-flap", 1);
|
var flapTO = props.globals.getNode("FMGC/internal/to-flap", 1);
|
||||||
var THSTO = props.globals.getNode("/FMGC/internal/to-ths", 1);
|
var THSTO = props.globals.getNode("FMGC/internal/to-ths", 1);
|
||||||
var flapTHSSet = props.globals.getNode("/FMGC/internal/flap-ths-set", 1);
|
var flapTHSSet = props.globals.getNode("FMGC/internal/flap-ths-set", 1);
|
||||||
var flex = props.globals.getNode("/FMGC/internal/flex", 1);
|
var flex = props.globals.getNode("FMGC/internal/flex", 1);
|
||||||
var flexSet = props.globals.getNode("/FMGC/internal/flex-set", 1);
|
var flexSet = props.globals.getNode("FMGC/internal/flex-set", 1);
|
||||||
var engOutAcc = props.globals.getNode("/FMGC/internal/eng-out-reduc", 1);
|
var engOutAcc = props.globals.getNode("FMGC/internal/eng-out-reduc", 1);
|
||||||
var engOutAccSet = props.globals.getNode("/MCDUC/reducacc-set", 1);
|
var engOutAccSet = props.globals.getNode("MCDUC/reducacc-set", 1);
|
||||||
var transAlt = props.globals.getNode("/FMGC/internal/trans-alt", 1);
|
var transAlt = props.globals.getNode("FMGC/internal/trans-alt", 1);
|
||||||
var managedSpeed = props.globals.getNode("/it-autoflight/input/spd-managed", 1);
|
var managedSpeed = props.globals.getNode("it-autoflight/input/spd-managed", 1);
|
||||||
|
|
||||||
# Fetch nodes into vectors
|
# Fetch nodes into vectors
|
||||||
var pageProp = [props.globals.getNode("/MCDU[0]/page", 1), props.globals.getNode("/MCDU[1]/page", 1)];
|
var pageProp = [props.globals.getNode("MCDU[0]/page", 1), props.globals.getNode("MCDU[1]/page", 1)];
|
||||||
var active = [props.globals.getNode("/MCDU[0]/active", 1), props.globals.getNode("/MCDU[1]/active", 1)];
|
var active = [props.globals.getNode("MCDU[0]/active", 1), props.globals.getNode("MCDU[1]/active", 1)];
|
||||||
var scratchpad = [props.globals.getNode("/MCDU[0]/scratchpad", 1), props.globals.getNode("/MCDU[1]/scratchpad", 1)];
|
var scratchpad = [props.globals.getNode("MCDU[0]/scratchpad", 1), props.globals.getNode("MCDU[1]/scratchpad", 1)];
|
||||||
|
|
||||||
# Create Nodes:
|
# Create Nodes:
|
||||||
var pageSwitch = [props.globals.initNode("/MCDU[0]/internal/switch", 0, "BOOL"), props.globals.initNode("/MCDU[1]/internal/switch", 0, "BOOL")];
|
var pageSwitch = [props.globals.initNode("/MCDU[0]/internal/switch", 0, "BOOL"), props.globals.initNode("/MCDU[1]/internal/switch", 0, "BOOL")];
|
||||||
|
@ -1417,162 +1417,162 @@ var canvas_MCDU_base = {
|
||||||
# ack = ignore, wht = white, grn = green, blu = blue, amb = amber, yel = yellow
|
# ack = ignore, wht = white, grn = green, blu = blue, amb = amber, yel = yellow
|
||||||
colorLeft: func(a, b, c, d, e, f) {
|
colorLeft: func(a, b, c, d, e, f) {
|
||||||
if (a != "ack") {
|
if (a != "ack") {
|
||||||
me["Simple_L1"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
|
me["Simple_L1"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
|
||||||
}
|
}
|
||||||
if (b != "ack") {
|
if (b != "ack") {
|
||||||
me["Simple_L2"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
|
me["Simple_L2"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
|
||||||
}
|
}
|
||||||
if (c != "ack") {
|
if (c != "ack") {
|
||||||
me["Simple_L3"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
|
me["Simple_L3"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
|
||||||
}
|
}
|
||||||
if (d != "ack") {
|
if (d != "ack") {
|
||||||
me["Simple_L4"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
|
me["Simple_L4"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
|
||||||
}
|
}
|
||||||
if (e != "ack") {
|
if (e != "ack") {
|
||||||
me["Simple_L5"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
|
me["Simple_L5"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
|
||||||
}
|
}
|
||||||
if (f != "ack") {
|
if (f != "ack") {
|
||||||
me["Simple_L6"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
|
me["Simple_L6"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colorLeftS: func(a, b, c, d, e, f) {
|
colorLeftS: func(a, b, c, d, e, f) {
|
||||||
if (a != "ack") {
|
if (a != "ack") {
|
||||||
me["Simple_L1S"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
|
me["Simple_L1S"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
|
||||||
}
|
}
|
||||||
if (b != "ack") {
|
if (b != "ack") {
|
||||||
me["Simple_L2S"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
|
me["Simple_L2S"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
|
||||||
}
|
}
|
||||||
if (c != "ack") {
|
if (c != "ack") {
|
||||||
me["Simple_L3S"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
|
me["Simple_L3S"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
|
||||||
}
|
}
|
||||||
if (d != "ack") {
|
if (d != "ack") {
|
||||||
me["Simple_L4S"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
|
me["Simple_L4S"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
|
||||||
}
|
}
|
||||||
if (e != "ack") {
|
if (e != "ack") {
|
||||||
me["Simple_L5S"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
|
me["Simple_L5S"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
|
||||||
}
|
}
|
||||||
if (f != "ack") {
|
if (f != "ack") {
|
||||||
me["Simple_L6S"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
|
me["Simple_L6S"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colorLeftArrow: func(a, b, c, d, e, f) {
|
colorLeftArrow: func(a, b, c, d, e, f) {
|
||||||
if (a != "ack") {
|
if (a != "ack") {
|
||||||
me["Simple_L1_Arrow"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
|
me["Simple_L1_Arrow"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
|
||||||
}
|
}
|
||||||
if (b != "ack") {
|
if (b != "ack") {
|
||||||
me["Simple_L2_Arrow"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
|
me["Simple_L2_Arrow"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
|
||||||
}
|
}
|
||||||
if (c != "ack") {
|
if (c != "ack") {
|
||||||
me["Simple_L3_Arrow"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
|
me["Simple_L3_Arrow"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
|
||||||
}
|
}
|
||||||
if (d != "ack") {
|
if (d != "ack") {
|
||||||
me["Simple_L4_Arrow"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
|
me["Simple_L4_Arrow"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
|
||||||
}
|
}
|
||||||
if (e != "ack") {
|
if (e != "ack") {
|
||||||
me["Simple_L5_Arrow"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
|
me["Simple_L5_Arrow"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
|
||||||
}
|
}
|
||||||
if (f != "ack") {
|
if (f != "ack") {
|
||||||
me["Simple_L6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
|
me["Simple_L6_Arrow"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colorRight: func(a, b, c, d, e, f) {
|
colorRight: func(a, b, c, d, e, f) {
|
||||||
if (a != "ack") {
|
if (a != "ack") {
|
||||||
me["Simple_R1"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
|
me["Simple_R1"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
|
||||||
}
|
}
|
||||||
if (b != "ack") {
|
if (b != "ack") {
|
||||||
me["Simple_R2"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
|
me["Simple_R2"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
|
||||||
}
|
}
|
||||||
if (c != "ack") {
|
if (c != "ack") {
|
||||||
me["Simple_R3"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
|
me["Simple_R3"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
|
||||||
}
|
}
|
||||||
if (d != "ack") {
|
if (d != "ack") {
|
||||||
me["Simple_R4"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
|
me["Simple_R4"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
|
||||||
}
|
}
|
||||||
if (e != "ack") {
|
if (e != "ack") {
|
||||||
me["Simple_R5"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
|
me["Simple_R5"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
|
||||||
}
|
}
|
||||||
if (f != "ack") {
|
if (f != "ack") {
|
||||||
me["Simple_R6"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
|
me["Simple_R6"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colorRightS: func(a, b, c, d, e, f) {
|
colorRightS: func(a, b, c, d, e, f) {
|
||||||
if (a != "ack") {
|
if (a != "ack") {
|
||||||
me["Simple_R1S"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
|
me["Simple_R1S"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
|
||||||
}
|
}
|
||||||
if (b != "ack") {
|
if (b != "ack") {
|
||||||
me["Simple_R2S"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
|
me["Simple_R2S"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
|
||||||
}
|
}
|
||||||
if (c != "ack") {
|
if (c != "ack") {
|
||||||
me["Simple_R3S"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
|
me["Simple_R3S"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
|
||||||
}
|
}
|
||||||
if (d != "ack") {
|
if (d != "ack") {
|
||||||
me["Simple_R4S"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
|
me["Simple_R4S"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
|
||||||
}
|
}
|
||||||
if (e != "ack") {
|
if (e != "ack") {
|
||||||
me["Simple_R5S"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
|
me["Simple_R5S"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
|
||||||
}
|
}
|
||||||
if (f != "ack") {
|
if (f != "ack") {
|
||||||
me["Simple_R6S"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
|
me["Simple_R6S"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colorRightArrow: func(a, b, c, d, e, f) {
|
colorRightArrow: func(a, b, c, d, e, f) {
|
||||||
if (a != "ack") {
|
if (a != "ack") {
|
||||||
me["Simple_R1_Arrow"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
|
me["Simple_R1_Arrow"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
|
||||||
}
|
}
|
||||||
if (b != "ack") {
|
if (b != "ack") {
|
||||||
me["Simple_R2_Arrow"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
|
me["Simple_R2_Arrow"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
|
||||||
}
|
}
|
||||||
if (c != "ack") {
|
if (c != "ack") {
|
||||||
me["Simple_R3_Arrow"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
|
me["Simple_R3_Arrow"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
|
||||||
}
|
}
|
||||||
if (d != "ack") {
|
if (d != "ack") {
|
||||||
me["Simple_R4_Arrow"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
|
me["Simple_R4_Arrow"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
|
||||||
}
|
}
|
||||||
if (e != "ack") {
|
if (e != "ack") {
|
||||||
me["Simple_R5_Arrow"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
|
me["Simple_R5_Arrow"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
|
||||||
}
|
}
|
||||||
if (f != "ack") {
|
if (f != "ack") {
|
||||||
me["Simple_R6_Arrow"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
|
me["Simple_R6_Arrow"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colorCenter: func(a, b, c, d, e, f) {
|
colorCenter: func(a, b, c, d, e, f) {
|
||||||
if (a != "ack") {
|
if (a != "ack") {
|
||||||
me["Simple_C1"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
|
me["Simple_C1"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
|
||||||
}
|
}
|
||||||
if (b != "ack") {
|
if (b != "ack") {
|
||||||
me["Simple_C2"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
|
me["Simple_C2"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
|
||||||
}
|
}
|
||||||
if (c != "ack") {
|
if (c != "ack") {
|
||||||
me["Simple_C3"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
|
me["Simple_C3"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
|
||||||
}
|
}
|
||||||
if (d != "ack") {
|
if (d != "ack") {
|
||||||
me["Simple_C4"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
|
me["Simple_C4"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
|
||||||
}
|
}
|
||||||
if (e != "ack") {
|
if (e != "ack") {
|
||||||
me["Simple_C5"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
|
me["Simple_C5"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
|
||||||
}
|
}
|
||||||
if (f != "ack") {
|
if (f != "ack") {
|
||||||
me["Simple_C6"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
|
me["Simple_C6"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colorCenterS: func(a, b, c, d, e, f) {
|
colorCenterS: func(a, b, c, d, e, f) {
|
||||||
if (a != "ack") {
|
if (a != "ack") {
|
||||||
me["Simple_C1S"].setColor(getprop("/MCDUC/colors/" ~ a ~ "/r"), getprop("/MCDUC/colors/" ~ a ~ "/g"), getprop("/MCDUC/colors/" ~ a ~ "/b"));
|
me["Simple_C1S"].setColor(getprop("MCDUC/colors/" ~ a ~ "/r"), getprop("MCDUC/colors/" ~ a ~ "/g"), getprop("MCDUC/colors/" ~ a ~ "/b"));
|
||||||
}
|
}
|
||||||
if (b != "ack") {
|
if (b != "ack") {
|
||||||
me["Simple_C2S"].setColor(getprop("/MCDUC/colors/" ~ b ~ "/r"), getprop("/MCDUC/colors/" ~ b ~ "/g"), getprop("/MCDUC/colors/" ~ b ~ "/b"));
|
me["Simple_C2S"].setColor(getprop("MCDUC/colors/" ~ b ~ "/r"), getprop("MCDUC/colors/" ~ b ~ "/g"), getprop("MCDUC/colors/" ~ b ~ "/b"));
|
||||||
}
|
}
|
||||||
if (c != "ack") {
|
if (c != "ack") {
|
||||||
me["Simple_C3S"].setColor(getprop("/MCDUC/colors/" ~ c ~ "/r"), getprop("/MCDUC/colors/" ~ c ~ "/g"), getprop("/MCDUC/colors/" ~ c ~ "/b"));
|
me["Simple_C3S"].setColor(getprop("MCDUC/colors/" ~ c ~ "/r"), getprop("MCDUC/colors/" ~ c ~ "/g"), getprop("MCDUC/colors/" ~ c ~ "/b"));
|
||||||
}
|
}
|
||||||
if (d != "ack") {
|
if (d != "ack") {
|
||||||
me["Simple_C4S"].setColor(getprop("/MCDUC/colors/" ~ d ~ "/r"), getprop("/MCDUC/colors/" ~ d ~ "/g"), getprop("/MCDUC/colors/" ~ d ~ "/b"));
|
me["Simple_C4S"].setColor(getprop("MCDUC/colors/" ~ d ~ "/r"), getprop("MCDUC/colors/" ~ d ~ "/g"), getprop("MCDUC/colors/" ~ d ~ "/b"));
|
||||||
}
|
}
|
||||||
if (e != "ack") {
|
if (e != "ack") {
|
||||||
me["Simple_C5S"].setColor(getprop("/MCDUC/colors/" ~ e ~ "/r"), getprop("/MCDUC/colors/" ~ e ~ "/g"), getprop("/MCDUC/colors/" ~ e ~ "/b"));
|
me["Simple_C5S"].setColor(getprop("MCDUC/colors/" ~ e ~ "/r"), getprop("MCDUC/colors/" ~ e ~ "/g"), getprop("MCDUC/colors/" ~ e ~ "/b"));
|
||||||
}
|
}
|
||||||
if (f != "ack") {
|
if (f != "ack") {
|
||||||
me["Simple_C6S"].setColor(getprop("/MCDUC/colors/" ~ f ~ "/r"), getprop("/MCDUC/colors/" ~ f ~ "/g"), getprop("/MCDUC/colors/" ~ f ~ "/b"));
|
me["Simple_C6S"].setColor(getprop("MCDUC/colors/" ~ f ~ "/r"), getprop("MCDUC/colors/" ~ f ~ "/g"), getprop("MCDUC/colors/" ~ f ~ "/b"));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
# 0 = ignore
|
# 0 = ignore
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
||||||
|
|
||||||
var get_local_path = func(file){
|
var get_local_path = func(file){
|
||||||
var aircraft_dir = split("/", getprop("/sim/aircraft-dir"))[-1];
|
var aircraft_dir = split("/", getprop("sim/aircraft-dir"))[-1];
|
||||||
return "Aircraft/" ~ aircraft_dir ~ "/Models/Instruments/ND/canvas/"~ file;
|
return "Aircraft/" ~ aircraft_dir ~ "/Models/Instruments/ND/canvas/"~ file;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -14,23 +14,23 @@ var ND_2_test = nil;
|
||||||
var elapsedtime = 0;
|
var elapsedtime = 0;
|
||||||
|
|
||||||
# Fetch nodes:
|
# Fetch nodes:
|
||||||
var du1_test = props.globals.getNode("/instrumentation/du/du1-test");
|
var du1_test = props.globals.getNode("instrumentation/du/du1-test");
|
||||||
var du1_test_time = props.globals.getNode("/instrumentation/du/du1-test-time");
|
var du1_test_time = props.globals.getNode("instrumentation/du/du1-test-time");
|
||||||
var du1_test_amount = props.globals.getNode("/instrumentation/du/du1-test-amount");
|
var du1_test_amount = props.globals.getNode("instrumentation/du/du1-test-amount");
|
||||||
var du2_test = props.globals.getNode("/instrumentation/du/du2-test");
|
var du2_test = props.globals.getNode("instrumentation/du/du2-test");
|
||||||
var du2_test_time = props.globals.getNode("/instrumentation/du/du2-test-time");
|
var du2_test_time = props.globals.getNode("instrumentation/du/du2-test-time");
|
||||||
var du2_test_amount = props.globals.getNode("/instrumentation/du/du2-test-amount");
|
var du2_test_amount = props.globals.getNode("instrumentation/du/du2-test-amount");
|
||||||
var du2_offtime = props.globals.initNode("/instrumentation/du/du2-off-time", 0.0, "DOUBLE");
|
var du2_offtime = props.globals.initNode("/instrumentation/du/du2-off-time", 0.0, "DOUBLE");
|
||||||
var du5_test = props.globals.getNode("/instrumentation/du/du5-test");
|
var du5_test = props.globals.getNode("instrumentation/du/du5-test");
|
||||||
var du5_test_time = props.globals.getNode("/instrumentation/du/du5-test-time");
|
var du5_test_time = props.globals.getNode("instrumentation/du/du5-test-time");
|
||||||
var du5_offtime = props.globals.initNode("/instrumentation/du/du5-off-time", 0.0, "DOUBLE");
|
var du5_offtime = props.globals.initNode("/instrumentation/du/du5-off-time", 0.0, "DOUBLE");
|
||||||
var du5_test_amount = props.globals.getNode("/instrumentation/du/du5-test-amount");
|
var du5_test_amount = props.globals.getNode("instrumentation/du/du5-test-amount");
|
||||||
var du6_test = props.globals.getNode("/instrumentation/du/du6-test");
|
var du6_test = props.globals.getNode("instrumentation/du/du6-test");
|
||||||
var du6_test_time = props.globals.getNode("/instrumentation/du/du6-test-time");
|
var du6_test_time = props.globals.getNode("instrumentation/du/du6-test-time");
|
||||||
var du6_test_amount = props.globals.getNode("/instrumentation/du/du6-test-amount");
|
var du6_test_amount = props.globals.getNode("instrumentation/du/du6-test-amount");
|
||||||
var cpt_du_xfr = props.globals.getNode("/modes/cpt-du-xfr");
|
var cpt_du_xfr = props.globals.getNode("modes/cpt-du-xfr");
|
||||||
var fo_du_xfr = props.globals.getNode("/modes/fo-du-xfr");
|
var fo_du_xfr = props.globals.getNode("modes/fo-du-xfr");
|
||||||
var wow0 = props.globals.getNode("/gear/gear[0]/wow");
|
var wow0 = props.globals.getNode("gear/gear[0]/wow");
|
||||||
|
|
||||||
var nd_display = {};
|
var nd_display = {};
|
||||||
|
|
||||||
|
@ -87,18 +87,18 @@ var canvas_nd_base = {
|
||||||
return [];
|
return [];
|
||||||
},
|
},
|
||||||
updateDu2: func() {
|
updateDu2: func() {
|
||||||
var elapsedtime = getprop("/sim/time/elapsed-sec");
|
var elapsedtime = getprop("sim/time/elapsed-sec");
|
||||||
if (getprop("/systems/electrical/bus/ac-ess-shed") >= 110) {
|
if (getprop("systems/electrical/bus/ac-ess-shed") >= 110) {
|
||||||
if (du2_offtime.getValue() + 3 < elapsedtime) {
|
if (du2_offtime.getValue() + 3 < elapsedtime) {
|
||||||
if (wow0.getValue() == 1) {
|
if (wow0.getValue() == 1) {
|
||||||
if (getprop("/systems/acconfig/autoconfig-running") != 1 and du2_test.getValue() != 1) {
|
if (getprop("systems/acconfig/autoconfig-running") != 1 and du2_test.getValue() != 1) {
|
||||||
du2_test.setValue(1);
|
du2_test.setValue(1);
|
||||||
du2_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
|
du2_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
|
||||||
du2_test_time.setValue(getprop("/sim/time/elapsed-sec"));
|
du2_test_time.setValue(getprop("sim/time/elapsed-sec"));
|
||||||
} else if (getprop("/systems/acconfig/autoconfig-running") == 1 and du2_test.getValue() != 1) {
|
} else if (getprop("systems/acconfig/autoconfig-running") == 1 and du2_test.getValue() != 1) {
|
||||||
du2_test.setValue(1);
|
du2_test.setValue(1);
|
||||||
du2_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
|
du2_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
|
||||||
du2_test_time.setValue(getprop("/sim/time/elapsed-sec") - 30);
|
du2_test_time.setValue(getprop("sim/time/elapsed-sec") - 30);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
du2_test.setValue(1);
|
du2_test.setValue(1);
|
||||||
|
@ -112,18 +112,18 @@ var canvas_nd_base = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateDu5: func() {
|
updateDu5: func() {
|
||||||
var elapsedtime = getprop("/sim/time/elapsed-sec");
|
var elapsedtime = getprop("sim/time/elapsed-sec");
|
||||||
if (getprop("/systems/electrical/bus/ac-2") >= 110) {
|
if (getprop("systems/electrical/bus/ac-2") >= 110) {
|
||||||
if (du5_offtime.getValue() + 3 < elapsedtime) {
|
if (du5_offtime.getValue() + 3 < elapsedtime) {
|
||||||
if (wow0.getValue() == 1) {
|
if (wow0.getValue() == 1) {
|
||||||
if (getprop("/systems/acconfig/autoconfig-running") != 1 and du5_test.getValue() != 1) {
|
if (getprop("systems/acconfig/autoconfig-running") != 1 and du5_test.getValue() != 1) {
|
||||||
du5_test.setValue(1);
|
du5_test.setValue(1);
|
||||||
du5_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
|
du5_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
|
||||||
du5_test_time.setValue(getprop("/sim/time/elapsed-sec"));
|
du5_test_time.setValue(getprop("sim/time/elapsed-sec"));
|
||||||
} else if (getprop("/systems/acconfig/autoconfig-running") == 1 and du5_test.getValue() != 1) {
|
} else if (getprop("systems/acconfig/autoconfig-running") == 1 and du5_test.getValue() != 1) {
|
||||||
du5_test.setValue(1);
|
du5_test.setValue(1);
|
||||||
du5_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
|
du5_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
|
||||||
du5_test_time.setValue(getprop("/sim/time/elapsed-sec") - 30);
|
du5_test_time.setValue(getprop("sim/time/elapsed-sec") - 30);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
du5_test.setValue(1);
|
du5_test.setValue(1);
|
||||||
|
@ -138,9 +138,9 @@ var canvas_nd_base = {
|
||||||
|
|
||||||
},
|
},
|
||||||
update: func() {
|
update: func() {
|
||||||
var elapsedtime = getprop("/sim/time/elapsed-sec");
|
var elapsedtime = getprop("sim/time/elapsed-sec");
|
||||||
|
|
||||||
if (getprop("/systems/electrical/bus/ac-ess-shed") >= 110 and getprop("/controls/lighting/DU/du2") > 0) {
|
if (getprop("systems/electrical/bus/ac-ess-shed") >= 110 and getprop("controls/lighting/DU/du2") > 0) {
|
||||||
if (du2_test_time.getValue() + du2_test_amount.getValue() >= elapsedtime and cpt_du_xfr.getValue() != 1) {
|
if (du2_test_time.getValue() + du2_test_amount.getValue() >= elapsedtime and cpt_du_xfr.getValue() != 1) {
|
||||||
ND_1.page.hide();
|
ND_1.page.hide();
|
||||||
ND_1_test.page.show();
|
ND_1_test.page.show();
|
||||||
|
@ -158,7 +158,7 @@ var canvas_nd_base = {
|
||||||
ND_1_test.page.hide();
|
ND_1_test.page.hide();
|
||||||
ND_1.page.hide();
|
ND_1.page.hide();
|
||||||
}
|
}
|
||||||
if (getprop("/systems/electrical/bus/ac-2") >= 110 and getprop("/controls/lighting/DU/du5") > 0) {
|
if (getprop("systems/electrical/bus/ac-2") >= 110 and getprop("controls/lighting/DU/du5") > 0) {
|
||||||
if (du5_test_time.getValue() + du5_test_amount.getValue() >= elapsedtime and fo_du_xfr.getValue() != 1) {
|
if (du5_test_time.getValue() + du5_test_amount.getValue() >= elapsedtime and fo_du_xfr.getValue() != 1) {
|
||||||
ND_2.page.hide();
|
ND_2.page.hide();
|
||||||
ND_2_test.page.show();
|
ND_2_test.page.show();
|
||||||
|
@ -246,12 +246,12 @@ var canvas_ND_1_test = {
|
||||||
return ["Test_white","Test_text"];
|
return ["Test_white","Test_text"];
|
||||||
},
|
},
|
||||||
update: func() {
|
update: func() {
|
||||||
elapsedtime = getprop("/sim/time/elapsed-sec") or 0;
|
elapsedtime = getprop("sim/time/elapsed-sec") or 0;
|
||||||
if ((du2_test_time.getValue() + 1 >= elapsedtime) and getprop("/modes/cpt-du-xfr") != 1) {
|
if ((du2_test_time.getValue() + 1 >= elapsedtime) and getprop("modes/cpt-du-xfr") != 1) {
|
||||||
me["Test_white"].show();
|
me["Test_white"].show();
|
||||||
me["Test_text"].hide();
|
me["Test_text"].hide();
|
||||||
} else if ((du1_test_time.getValue() + 1 >= elapsedtime) and getprop("/modes/cpt-du-xfr") != 0) {
|
} else if ((du1_test_time.getValue() + 1 >= elapsedtime) and getprop("modes/cpt-du-xfr") != 0) {
|
||||||
print(getprop("/modes/cpt-du-xfr"));
|
print(getprop("modes/cpt-du-xfr"));
|
||||||
me["Test_white"].show();
|
me["Test_white"].show();
|
||||||
me["Test_text"].hide();
|
me["Test_text"].hide();
|
||||||
} else {
|
} else {
|
||||||
|
@ -288,11 +288,11 @@ var canvas_ND_2_test = {
|
||||||
return ["Test_white","Test_text"];
|
return ["Test_white","Test_text"];
|
||||||
},
|
},
|
||||||
update: func() {
|
update: func() {
|
||||||
elapsedtime = getprop("/sim/time/elapsed-sec") or 0;
|
elapsedtime = getprop("sim/time/elapsed-sec") or 0;
|
||||||
if ((du5_test_time.getValue() + 1 >= elapsedtime) and getprop("/modes/cpt-du-xfr") != 1) {
|
if ((du5_test_time.getValue() + 1 >= elapsedtime) and getprop("modes/cpt-du-xfr") != 1) {
|
||||||
me["Test_white"].show();
|
me["Test_white"].show();
|
||||||
me["Test_text"].hide();
|
me["Test_text"].hide();
|
||||||
} else if ((du6_test_time.getValue() + 1 >= elapsedtime) and getprop("/modes/cpt-du-xfr") != 0) {
|
} else if ((du6_test_time.getValue() + 1 >= elapsedtime) and getprop("modes/cpt-du-xfr") != 0) {
|
||||||
me["Test_white"].show();
|
me["Test_white"].show();
|
||||||
me["Test_text"].hide();
|
me["Test_text"].hide();
|
||||||
} else {
|
} else {
|
||||||
|
@ -333,13 +333,13 @@ setlistener("sim/signals/fdm-initialized", func {
|
||||||
ND_2_test = canvas_ND_2_test.new(group_nd2_test, "Aircraft/A320-family/Models/Instruments/Common/res/du-test.svg");
|
ND_2_test = canvas_ND_2_test.new(group_nd2_test, "Aircraft/A320-family/Models/Instruments/Common/res/du-test.svg");
|
||||||
|
|
||||||
nd_update.start();
|
nd_update.start();
|
||||||
if (getprop("/systems/acconfig/options/nd-rate") > 1) {
|
if (getprop("systems/acconfig/options/nd-rate") > 1) {
|
||||||
rateApply();
|
rateApply();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var rateApply = func {
|
var rateApply = func {
|
||||||
nd_update.restart(0.05 * getprop("/systems/acconfig/options/nd-rate"));
|
nd_update.restart(0.05 * getprop("systems/acconfig/options/nd-rate"));
|
||||||
}
|
}
|
||||||
|
|
||||||
var nd_update = maketimer(0.05, func {
|
var nd_update = maketimer(0.05, func {
|
||||||
|
@ -352,7 +352,7 @@ for (i = 0; i < 2; i = i + 1 ) {
|
||||||
var idx = par.getIndex();
|
var idx = par.getIndex();
|
||||||
var canvas_mode = "/instrumentation/efis["~idx~"]/nd/canvas-display-mode";
|
var canvas_mode = "/instrumentation/efis["~idx~"]/nd/canvas-display-mode";
|
||||||
var nd_centered = "/instrumentation/efis["~idx~"]/inputs/nd-centered";
|
var nd_centered = "/instrumentation/efis["~idx~"]/inputs/nd-centered";
|
||||||
var mode = getprop("/instrumentation/efis["~idx~"]/nd/display-mode");
|
var mode = getprop("instrumentation/efis["~idx~"]/nd/display-mode");
|
||||||
var cvs_mode = "NAV";
|
var cvs_mode = "NAV";
|
||||||
var centered = 1;
|
var centered = 1;
|
||||||
if (mode == "ILS") {
|
if (mode == "ILS") {
|
||||||
|
@ -377,7 +377,7 @@ for (i = 0; i < 2; i = i + 1 ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/instrumentation/efis[0]/nd/terrain-on-nd", func{
|
setlistener("/instrumentation/efis[0]/nd/terrain-on-nd", func{
|
||||||
var terr_on_hd = getprop("/instrumentation/efis[0]/nd/terrain-on-nd");
|
var terr_on_hd = getprop("instrumentation/efis[0]/nd/terrain-on-nd");
|
||||||
var alpha = 1;
|
var alpha = 1;
|
||||||
if (terr_on_hd) {
|
if (terr_on_hd) {
|
||||||
alpha = 0.5;
|
alpha = 0.5;
|
||||||
|
|
|
@ -304,12 +304,12 @@ canvas.NavDisplay.update_sub = func(){
|
||||||
pos.lat = wp.wp_lat;
|
pos.lat = wp.wp_lat;
|
||||||
pos.lon = wp.wp_lon;
|
pos.lon = wp.wp_lon;
|
||||||
} else {
|
} else {
|
||||||
pos.lat = getprop("/autopilot/route-manager/route/wp["~pln_wpt_idx~"]/latitude-deg");
|
pos.lat = getprop("autopilot/route-manager/route/wp["~pln_wpt_idx~"]/latitude-deg");
|
||||||
pos.lon = getprop("/autopilot/route-manager/route/wp["~pln_wpt_idx~"]/longitude-deg");
|
pos.lon = getprop("autopilot/route-manager/route/wp["~pln_wpt_idx~"]/longitude-deg");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pos.lat = getprop("/autopilot/route-manager/route/wp["~pln_wpt_idx~"]/latitude-deg");
|
pos.lat = getprop("autopilot/route-manager/route/wp["~pln_wpt_idx~"]/latitude-deg");
|
||||||
pos.lon = getprop("/autopilot/route-manager/route/wp["~pln_wpt_idx~"]/longitude-deg");
|
pos.lon = getprop("autopilot/route-manager/route/wp["~pln_wpt_idx~"]/longitude-deg");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pos.lat = userLat;
|
pos.lat = userLat;
|
||||||
|
@ -407,8 +407,8 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
|
||||||
}
|
}
|
||||||
|
|
||||||
# Hide heading bug 10 secs after change
|
# Hide heading bug 10 secs after change
|
||||||
var vhdg_bug = getprop("/it-autoflight/input/hdg") or 0;
|
var vhdg_bug = getprop("it-autoflight/input/hdg") or 0;
|
||||||
var hdg_bug_active = getprop("/it-autoflight/custom/show-hdg");
|
var hdg_bug_active = getprop("it-autoflight/custom/show-hdg");
|
||||||
if (hdg_bug_active == nil)
|
if (hdg_bug_active == nil)
|
||||||
hdg_bug_active = 1;
|
hdg_bug_active = 1;
|
||||||
|
|
||||||
|
@ -445,13 +445,13 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
|
||||||
var vorheading = userHdgTru;
|
var vorheading = userHdgTru;
|
||||||
var adfheading = userHdgMag;
|
var adfheading = userHdgMag;
|
||||||
}
|
}
|
||||||
if (getprop("/instrumentation/nav[2]/heading-deg") != nil) {
|
if (getprop("instrumentation/nav[2]/heading-deg") != nil) {
|
||||||
var nav0hdg = getprop("/instrumentation/nav[2]/heading-deg") - getprop("/orientation/heading-deg");
|
var nav0hdg = getprop("instrumentation/nav[2]/heading-deg") - getprop("orientation/heading-deg");
|
||||||
} else {
|
} else {
|
||||||
var nav0hdg = 0;
|
var nav0hdg = 0;
|
||||||
}
|
}
|
||||||
if (getprop("/instrumentation/nav[3]/heading-deg") != nil) {
|
if (getprop("instrumentation/nav[3]/heading-deg") != nil) {
|
||||||
var nav1hdg = getprop("/instrumentation/nav[3]/heading-deg") - getprop("/orientation/heading-deg");
|
var nav1hdg = getprop("instrumentation/nav[3]/heading-deg") - getprop("orientation/heading-deg");
|
||||||
} else {
|
} else {
|
||||||
var nav1hdg = 0;
|
var nav1hdg = 0;
|
||||||
}
|
}
|
||||||
|
@ -595,5 +595,5 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec
|
||||||
me.symbols["status.sta"].setVisible( me.get_switch("toggle_stations") and me.in_mode("toggle_display_mode", ["MAP"]));
|
me.symbols["status.sta"].setVisible( me.get_switch("toggle_stations") and me.in_mode("toggle_display_mode", ["MAP"]));
|
||||||
# Okay, _how_ do we hook this up with FGPlot?
|
# Okay, _how_ do we hook this up with FGPlot?
|
||||||
printlog(_MP_dbg_lvl, "Total ND update took "~((systime()-_time)*100)~"ms");
|
printlog(_MP_dbg_lvl, "Total ND update took "~((systime()-_time)*100)~"ms");
|
||||||
setprop("/instrumentation/navdisplay["~ canvas.NavDisplay.id ~"]/update-ms", systime() - _time);
|
setprop("instrumentation/navdisplay["~ canvas.NavDisplay.id ~"]/update-ms", systime() - _time);
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,7 +23,7 @@ var SymbolPainter = {
|
||||||
},
|
},
|
||||||
getAircraftDir: func(){
|
getAircraftDir: func(){
|
||||||
if(me.aircraft_dir == nil)
|
if(me.aircraft_dir == nil)
|
||||||
me.aircraft_dir = split("/", getprop("/sim/aircraft-dir"))[-1];
|
me.aircraft_dir = split("/", getprop("sim/aircraft-dir"))[-1];
|
||||||
return me.aircraft_dir;
|
return me.aircraft_dir;
|
||||||
},
|
},
|
||||||
svgPath: func(file){
|
svgPath: func(file){
|
||||||
|
|
|
@ -13,7 +13,7 @@ setlistener("/nasal/canvas/loaded", func() {
|
||||||
####### LOAD FILES #######
|
####### LOAD FILES #######
|
||||||
#print("loading files");
|
#print("loading files");
|
||||||
(func {
|
(func {
|
||||||
var aircraft_root = getprop("/sim/aircraft-dir");
|
var aircraft_root = getprop("sim/aircraft-dir");
|
||||||
|
|
||||||
var load = func(file, name) {
|
var load = func(file, name) {
|
||||||
#print("Loading ..." ~ file);
|
#print("Loading ..." ~ file);
|
||||||
|
|
|
@ -12,7 +12,7 @@ var element_id = "airplane";
|
||||||
# Will have to be adapted if intended for use with other aircraft
|
# Will have to be adapted if intended for use with other aircraft
|
||||||
# (but one could simply copy the layer for that).
|
# (but one could simply copy the layer for that).
|
||||||
var draw = func {
|
var draw = func {
|
||||||
var rot = getprop("/orientation/heading-deg");
|
var rot = getprop("orientation/heading-deg");
|
||||||
rot -= me.layer.map.getHdg();
|
rot -= me.layer.map.getHdg();
|
||||||
me.element.setRotation(rot*D2R);
|
me.element.setRotation(rot*D2R);
|
||||||
};
|
};
|
||||||
|
|
|
@ -127,7 +127,7 @@ var draw = func{
|
||||||
}
|
}
|
||||||
if(me.model.is_departure or me.model.is_destination){
|
if(me.model.is_departure or me.model.is_destination){
|
||||||
var prop = (me.model.is_departure ? 'departure' : 'destination');
|
var prop = (me.model.is_departure ? 'departure' : 'destination');
|
||||||
var rwy = getprop("/autopilot/route-manager/"~prop~"/runway");
|
var rwy = getprop("autopilot/route-manager/"~prop~"/runway");
|
||||||
if(rwy != nil and size(rwy) > 0){
|
if(rwy != nil and size(rwy) > 0){
|
||||||
me.wp_sym.hide();
|
me.wp_sym.hide();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -25,9 +25,9 @@ var new = func(layer) {
|
||||||
};
|
};
|
||||||
layer.searcher._equals = func(l,r) l.equals(r);
|
layer.searcher._equals = func(l,r) l.equals(r);
|
||||||
m.addVisibilityListener();
|
m.addVisibilityListener();
|
||||||
var aircraft_dir = split('/', getprop("/sim/aircraft-dir"))[-1];
|
var aircraft_dir = split('/', getprop("sim/aircraft-dir"))[-1];
|
||||||
var saved_conf = getprop("/sim/fg-home") ~ "/Export/wxr_api.xml";
|
var saved_conf = getprop("sim/fg-home") ~ "/Export/wxr_api.xml";
|
||||||
var df_conf = getprop("/sim/fg-root") ~ "/Aircraft/" ~ aircraft_dir ~
|
var df_conf = getprop("sim/fg-root") ~ "/Aircraft/" ~ aircraft_dir ~
|
||||||
"/Models/Instruments/ND/canvas/wxr_api.xml";
|
"/Models/Instruments/ND/canvas/wxr_api.xml";
|
||||||
if(io.stat(saved_conf) != nil)
|
if(io.stat(saved_conf) != nil)
|
||||||
io.read_properties(saved_conf, wxr_tree);
|
io.read_properties(saved_conf, wxr_tree);
|
||||||
|
|
|
@ -51,11 +51,11 @@ var fetchWXRMap = func(size){
|
||||||
.setSize(sz, sz)
|
.setSize(sz, sz)
|
||||||
.setTranslation(transl, transl);
|
.setTranslation(transl, transl);
|
||||||
me.wxlayer.show();
|
me.wxlayer.show();
|
||||||
me.last_request = getprop("/sim/time/elapsed-sec");
|
me.last_request = getprop("sim/time/elapsed-sec");
|
||||||
})
|
})
|
||||||
.always(func(){
|
.always(func(){
|
||||||
setprop("/instrumentation/wxr/center/latitude-deg", lat);
|
setprop("instrumentation/wxr/center/latitude-deg", lat);
|
||||||
setprop("/instrumentation/wxr/center/longitude-deg", lon);
|
setprop("instrumentation/wxr/center/longitude-deg", lon);
|
||||||
me.fetching = 0;
|
me.fetching = 0;
|
||||||
print("[WXR] Live Layer Request: "~url); # Debugging
|
print("[WXR] Live Layer Request: "~url); # Debugging
|
||||||
});
|
});
|
||||||
|
@ -101,7 +101,7 @@ var draw = func {
|
||||||
me.wxlayer.show();
|
me.wxlayer.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(getprop("/sim/time/elapsed-sec") - me.last_request > me.update_interval) {
|
if(getprop("sim/time/elapsed-sec") - me.last_request > me.update_interval) {
|
||||||
#print('Fetching WXR map...');
|
#print('Fetching WXR map...');
|
||||||
me.key = me.model.key; # API Key from Wunderground API Subscription
|
me.key = me.model.key; # API Key from Wunderground API Subscription
|
||||||
me.res = me.model.res; # Resolution of image to fetch (default 2048)
|
me.res = me.model.res; # Resolution of image to fetch (default 2048)
|
||||||
|
|
|
@ -687,7 +687,7 @@ canvas.NDStyles["Airbus"] = {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) nd.aircraft_source.get_spd() > 100,
|
predicate: func(nd) nd.aircraft_source.get_spd() > 100,
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
nd.symbols.tas.setText(sprintf("%3.0f",getprop("/velocities/TAS") ));
|
nd.symbols.tas.setText(sprintf("%3.0f",getprop("velocities/TAS") ));
|
||||||
nd.symbols.tas.show();
|
nd.symbols.tas.show();
|
||||||
},
|
},
|
||||||
is_false: func(nd) nd.symbols.tas.hide(),
|
is_false: func(nd) nd.symbols.tas.hide(),
|
||||||
|
@ -740,11 +740,11 @@ canvas.NDStyles["Airbus"] = {
|
||||||
id: "wpActiveId",
|
id: "wpActiveId",
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) getprop("/autopilot/route-manager/wp/id") != nil and
|
predicate: func(nd) getprop("autopilot/route-manager/wp/id") != nil and
|
||||||
getprop("autopilot/route-manager/active") and
|
getprop("autopilot/route-manager/active") and
|
||||||
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
nd.symbols.wpActiveId.setText(getprop("/autopilot/route-manager/wp/id"));
|
nd.symbols.wpActiveId.setText(getprop("autopilot/route-manager/wp/id"));
|
||||||
nd.symbols.wpActiveId.show();
|
nd.symbols.wpActiveId.show();
|
||||||
},
|
},
|
||||||
is_false: func(nd) nd.symbols.wpActiveId.hide(),
|
is_false: func(nd) nd.symbols.wpActiveId.hide(),
|
||||||
|
@ -754,12 +754,12 @@ canvas.NDStyles["Airbus"] = {
|
||||||
id: "wpActiveCrs",
|
id: "wpActiveCrs",
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) getprop("/autopilot/route-manager/wp/id") != nil and
|
predicate: func(nd) getprop("autopilot/route-manager/wp/id") != nil and
|
||||||
getprop("autopilot/route-manager/active") and
|
getprop("autopilot/route-manager/active") and
|
||||||
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
#var cur_wp = getprop("autopilot/route-manager/current-wp");
|
#var cur_wp = getprop("autopilot/route-manager/current-wp");
|
||||||
var deg = int(getprop("/autopilot/route-manager/wp/bearing-deg"));
|
var deg = int(getprop("autopilot/route-manager/wp/bearing-deg"));
|
||||||
nd.symbols.wpActiveCrs.setText((deg or "")~"°");
|
nd.symbols.wpActiveCrs.setText((deg or "")~"°");
|
||||||
nd.symbols.wpActiveCrs.show();
|
nd.symbols.wpActiveCrs.show();
|
||||||
},
|
},
|
||||||
|
@ -770,11 +770,11 @@ canvas.NDStyles["Airbus"] = {
|
||||||
id: "wpActiveDist",
|
id: "wpActiveDist",
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) getprop("/autopilot/route-manager/wp/dist") != nil and
|
predicate: func(nd) getprop("autopilot/route-manager/wp/dist") != nil and
|
||||||
getprop("autopilot/route-manager/active") and
|
getprop("autopilot/route-manager/active") and
|
||||||
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
var dst = getprop("/autopilot/route-manager/wp/dist");
|
var dst = getprop("autopilot/route-manager/wp/dist");
|
||||||
nd.symbols.wpActiveDist.setText(sprintf("%3.01f",dst));
|
nd.symbols.wpActiveDist.setText(sprintf("%3.01f",dst));
|
||||||
nd.symbols.wpActiveDist.show();
|
nd.symbols.wpActiveDist.show();
|
||||||
},
|
},
|
||||||
|
@ -785,10 +785,10 @@ canvas.NDStyles["Airbus"] = {
|
||||||
id: "wpActiveDistLbl",
|
id: "wpActiveDistLbl",
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) getprop("/autopilot/route-manager/wp/dist") != nil and getprop("autopilot/route-manager/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
predicate: func(nd) getprop("autopilot/route-manager/wp/dist") != nil and getprop("autopilot/route-manager/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
nd.symbols.wpActiveDistLbl.show();
|
nd.symbols.wpActiveDistLbl.show();
|
||||||
if(getprop("/autopilot/route-manager/wp/dist") > 1000)
|
if(getprop("autopilot/route-manager/wp/dist") > 1000)
|
||||||
nd.symbols.wpActiveDistLbl.setText(" NM");
|
nd.symbols.wpActiveDistLbl.setText(" NM");
|
||||||
},
|
},
|
||||||
is_false: func(nd) nd.symbols.wpActiveDistLbl.hide(),
|
is_false: func(nd) nd.symbols.wpActiveDistLbl.hide(),
|
||||||
|
@ -800,7 +800,7 @@ canvas.NDStyles["Airbus"] = {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) getprop("autopilot/route-manager/wp/eta") != nil and getprop("autopilot/route-manager/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
predicate: func(nd) getprop("autopilot/route-manager/wp/eta") != nil and getprop("autopilot/route-manager/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
var etaSec = getprop("/sim/time/utc/day-seconds")+
|
var etaSec = getprop("sim/time/utc/day-seconds")+
|
||||||
getprop("autopilot/route-manager/wp/eta-seconds");
|
getprop("autopilot/route-manager/wp/eta-seconds");
|
||||||
var h = math.floor(etaSec/3600);
|
var h = math.floor(etaSec/3600);
|
||||||
etaSec = etaSec-3600*h;
|
etaSec = etaSec-3600*h;
|
||||||
|
@ -1190,9 +1190,9 @@ canvas.NDStyles["Airbus"] = {
|
||||||
var type = (is_ils ? "ils" : "vor");
|
var type = (is_ils ? "ils" : "vor");
|
||||||
var path = nd.get_nav_path(type, 0);
|
var path = nd.get_nav_path(type, 0);
|
||||||
if (is_ils) {
|
if (is_ils) {
|
||||||
nd.symbols.vorCrsPtr2.setRotation((getprop("/instrumentation/nav[0]/radials/selected-deg")-nd.aircraft_source.get_hdg_mag())*D2R);
|
nd.symbols.vorCrsPtr2.setRotation((getprop("instrumentation/nav[0]/radials/selected-deg")-nd.aircraft_source.get_hdg_mag())*D2R);
|
||||||
} else {
|
} else {
|
||||||
nd.symbols.vorCrsPtr2.setRotation((getprop("/instrumentation/nav[2]/radials/selected-deg")-nd.aircraft_source.get_hdg_mag())*D2R);
|
nd.symbols.vorCrsPtr2.setRotation((getprop("instrumentation/nav[2]/radials/selected-deg")-nd.aircraft_source.get_hdg_mag())*D2R);
|
||||||
}
|
}
|
||||||
var line = nd.symbols.vorCrsPtr2.getElementById("vorCrsPtr2_line");
|
var line = nd.symbols.vorCrsPtr2.getElementById("vorCrsPtr2_line");
|
||||||
if(!is_ils){
|
if(!is_ils){
|
||||||
|
@ -1213,7 +1213,7 @@ canvas.NDStyles["Airbus"] = {
|
||||||
predicate: func(nd) nd.in_mode("toggle_display_mode", ["APP"]),
|
predicate: func(nd) nd.in_mode("toggle_display_mode", ["APP"]),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
if(getprop("instrumentation/nav/gs-needle-deflection-norm") != nil)
|
if(getprop("instrumentation/nav/gs-needle-deflection-norm") != nil)
|
||||||
nd.symbols.gsDiamond.setTranslation(getprop("/instrumentation/nav[0]/gs-needle-deflection-norm")*150,0);
|
nd.symbols.gsDiamond.setTranslation(getprop("instrumentation/nav[0]/gs-needle-deflection-norm")*150,0);
|
||||||
},
|
},
|
||||||
is_false: func(nd) nd.symbols.gsGroup.hide(),
|
is_false: func(nd) nd.symbols.gsGroup.hide(),
|
||||||
},
|
},
|
||||||
|
@ -1225,7 +1225,7 @@ canvas.NDStyles["Airbus"] = {
|
||||||
predicate: func(nd) (nd.in_mode("toggle_display_mode", ["APP","VOR"]) and !nd.get_switch("toggle_centered") and getprop("instrumentation/nav/in-range")),
|
predicate: func(nd) (nd.in_mode("toggle_display_mode", ["APP","VOR"]) and !nd.get_switch("toggle_centered") and getprop("instrumentation/nav/in-range")),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
nd.symbols.locPtr.show();
|
nd.symbols.locPtr.show();
|
||||||
var deflection = getprop("/instrumentation/nav[0]/heading-needle-deflection-norm");
|
var deflection = getprop("instrumentation/nav[0]/heading-needle-deflection-norm");
|
||||||
nd.symbols.locPtr.setTranslation(deflection*150,0);
|
nd.symbols.locPtr.setTranslation(deflection*150,0);
|
||||||
},
|
},
|
||||||
is_false: func(nd) nd.symbols.locPtr.hide(),
|
is_false: func(nd) nd.symbols.locPtr.hide(),
|
||||||
|
@ -1274,8 +1274,8 @@ canvas.NDStyles["Airbus"] = {
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) {
|
predicate: func(nd) {
|
||||||
var nav_id = getprop("/instrumentation/nav/nav-id");
|
var nav_id = getprop("instrumentation/nav/nav-id");
|
||||||
var ils_mode = getprop("/flight-management/freq/ils-mode");
|
var ils_mode = getprop("flight-management/freq/ils-mode");
|
||||||
var has_ils = (nav_id != nil and nav_id != "");
|
var has_ils = (nav_id != nil and nav_id != "");
|
||||||
(nd.get_switch("toggle_display_mode") == "MAP" and
|
(nd.get_switch("toggle_display_mode") == "MAP" and
|
||||||
!nd.get_switch("toggle_centered") and has_ils and ils_mode);
|
!nd.get_switch("toggle_centered") and has_ils and ils_mode);
|
||||||
|
@ -1294,8 +1294,8 @@ canvas.NDStyles["Airbus"] = {
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) {
|
predicate: func(nd) {
|
||||||
var nav_id = getprop("/instrumentation/nav/nav-id");
|
var nav_id = getprop("instrumentation/nav/nav-id");
|
||||||
var ils_mode = getprop("/flight-management/freq/ils-mode");
|
var ils_mode = getprop("flight-management/freq/ils-mode");
|
||||||
var has_ils = (nav_id != nil and nav_id != "");
|
var has_ils = (nav_id != nil and nav_id != "");
|
||||||
(nd.get_switch("toggle_display_mode") == "MAP" and
|
(nd.get_switch("toggle_display_mode") == "MAP" and
|
||||||
nd.get_switch("toggle_centered") and has_ils and ils_mode);
|
nd.get_switch("toggle_centered") and has_ils and ils_mode);
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
<object-name>adirs-coords</object-name>
|
<object-name>adirs-coords</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<greater-than-equals>
|
<greater-than-equals>
|
||||||
<property>/systems/electrical/outputs/efis</property>
|
<property>systems/electrical/outputs/efis</property>
|
||||||
<value>9</value>
|
<value>9</value>
|
||||||
</greater-than-equals>
|
</greater-than-equals>
|
||||||
</condition>
|
</condition>
|
||||||
|
@ -2002,7 +2002,7 @@
|
||||||
<axis-alignment>xy-plane</axis-alignment>
|
<axis-alignment>xy-plane</axis-alignment>
|
||||||
<type type="string">text-value</type>
|
<type type="string">text-value</type>
|
||||||
<format type="string">%s</format>
|
<format type="string">%s</format>
|
||||||
<property>/instrumentation/oh-panel/pos-string</property>
|
<property>instrumentation/oh-panel/pos-string</property>
|
||||||
<font type="string">Helvetica.txf</font>
|
<font type="string">Helvetica.txf</font>
|
||||||
<draw-text type="bool">true</draw-text>
|
<draw-text type="bool">true</draw-text>
|
||||||
<draw-alignment type="bool">false</draw-alignment>
|
<draw-alignment type="bool">false</draw-alignment>
|
||||||
|
@ -2028,7 +2028,7 @@
|
||||||
<axis-alignment>xy-plane</axis-alignment>
|
<axis-alignment>xy-plane</axis-alignment>
|
||||||
<type type="string">number-value</type>
|
<type type="string">number-value</type>
|
||||||
<format type="string">%2.1f</format>
|
<format type="string">%2.1f</format>
|
||||||
<property>/systems/electrical/suppliers/battery</property>
|
<property>systems/electrical/suppliers/battery</property>
|
||||||
<font type="string">led.txf</font>
|
<font type="string">led.txf</font>
|
||||||
<draw-text type="bool">true</draw-text>
|
<draw-text type="bool">true</draw-text>
|
||||||
<draw-alignment type="bool">false</draw-alignment>
|
<draw-alignment type="bool">false</draw-alignment>
|
||||||
|
@ -2054,7 +2054,7 @@
|
||||||
<axis-alignment>xy-plane</axis-alignment>
|
<axis-alignment>xy-plane</axis-alignment>
|
||||||
<type type="string">number-value</type>
|
<type type="string">number-value</type>
|
||||||
<format type="string">%2.1f</format>
|
<format type="string">%2.1f</format>
|
||||||
<property>/systems/electrical/suppliers/battery</property>
|
<property>systems/electrical/suppliers/battery</property>
|
||||||
<font type="string">led.txf</font>
|
<font type="string">led.txf</font>
|
||||||
<draw-text type="bool">true</draw-text>
|
<draw-text type="bool">true</draw-text>
|
||||||
<draw-alignment type="bool">false</draw-alignment>
|
<draw-alignment type="bool">false</draw-alignment>
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -63,7 +63,7 @@
|
||||||
</equals>
|
</equals>
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/oh-btn", 1);</script>
|
<script>setprop("sim/sounde/oh-btn", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/oh-cover", 1);</script>
|
<script>setprop("sim/sounde/oh-cover", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</mod-up>
|
</mod-up>
|
||||||
</action>
|
</action>
|
||||||
|
@ -164,7 +164,7 @@
|
||||||
</equals>
|
</equals>
|
||||||
</condition>
|
</condition>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/oh-btn", 1);</script>
|
<script>setprop("sim/sounde/oh-btn", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
@ -190,7 +190,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/oh-cover", 1);</script>
|
<script>setprop("sim/sounde/oh-cover", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</mod-up>
|
</mod-up>
|
||||||
</action>
|
</action>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/oh-btn", 1);</script>
|
<script>setprop("sim/sounde/oh-btn", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
|
@ -17,106 +17,113 @@ var altTens = 0;
|
||||||
var altPolarity = "";
|
var altPolarity = "";
|
||||||
|
|
||||||
# Fetch nodes:
|
# Fetch nodes:
|
||||||
var state1 = props.globals.getNode("/systems/thrust/state1", 1);
|
var state1 = props.globals.getNode("systems/thrust/state1", 1);
|
||||||
var state2 = props.globals.getNode("/systems/thrust/state2", 1);
|
var state2 = props.globals.getNode("systems/thrust/state2", 1);
|
||||||
var throttle_mode = props.globals.getNode("/modes/pfd/fma/throttle-mode", 1);
|
var throttle_mode = props.globals.getNode("modes/pfd/fma/throttle-mode", 1);
|
||||||
var pitch_mode = props.globals.getNode("/modes/pfd/fma/pitch-mode", 1);
|
var pitch_mode = props.globals.getNode("modes/pfd/fma/pitch-mode", 1);
|
||||||
var pitch_mode_armed = props.globals.getNode("/modes/pfd/fma/pitch-mode-armed", 1);
|
var pitch_mode_armed = props.globals.getNode("modes/pfd/fma/pitch-mode-armed", 1);
|
||||||
var pitch_mode2_armed = props.globals.getNode("/modes/pfd/fma/pitch-mode2-armed", 1);
|
var pitch_mode2_armed = props.globals.getNode("modes/pfd/fma/pitch-mode2-armed", 1);
|
||||||
var pitch_mode_armed_box = props.globals.getNode("/modes/pfd/fma/pitch-mode-armed-box", 1);
|
var pitch_mode_armed_box = props.globals.getNode("modes/pfd/fma/pitch-mode-armed-box", 1);
|
||||||
var pitch_mode2_armed_box = props.globals.getNode("/modes/pfd/fma/pitch-mode2-armed-box", 1);
|
var pitch_mode2_armed_box = props.globals.getNode("modes/pfd/fma/pitch-mode2-armed-box", 1);
|
||||||
var roll_mode = props.globals.getNode("/modes/pfd/fma/roll-mode", 1);
|
var roll_mode = props.globals.getNode("modes/pfd/fma/roll-mode", 1);
|
||||||
var roll_mode_armed = props.globals.getNode("/modes/pfd/fma/roll-mode-armed", 1);
|
var roll_mode_armed = props.globals.getNode("modes/pfd/fma/roll-mode-armed", 1);
|
||||||
var roll_mode_box = props.globals.getNode("/modes/pfd/fma/roll-mode-box", 1);
|
var roll_mode_box = props.globals.getNode("modes/pfd/fma/roll-mode-box", 1);
|
||||||
var roll_mode_armed_box = props.globals.getNode("/modes/pfd/fma/roll-mode-armed-box", 1);
|
var roll_mode_armed_box = props.globals.getNode("modes/pfd/fma/roll-mode-armed-box", 1);
|
||||||
var thr1 = props.globals.getNode("/controls/engines/engine[0]/throttle-pos", 1);
|
var thr1 = props.globals.getNode("controls/engines/engine[0]/throttle-pos", 1);
|
||||||
var thr2 = props.globals.getNode("/controls/engines/engine[1]/throttle-pos", 1);
|
var thr2 = props.globals.getNode("controls/engines/engine[1]/throttle-pos", 1);
|
||||||
var wow0 = props.globals.getNode("/gear/gear[0]/wow");
|
var wow0 = props.globals.getNode("gear/gear[0]/wow");
|
||||||
var wow1 = props.globals.getNode("/gear/gear[1]/wow");
|
var wow1 = props.globals.getNode("gear/gear[1]/wow");
|
||||||
var wow2 = props.globals.getNode("/gear/gear[2]/wow");
|
var wow2 = props.globals.getNode("gear/gear[2]/wow");
|
||||||
var pitch = props.globals.getNode("/orientation/pitch-deg", 1);
|
var pitch = props.globals.getNode("orientation/pitch-deg", 1);
|
||||||
var roll = props.globals.getNode("/orientation/roll-deg", 1);
|
var roll = props.globals.getNode("orientation/roll-deg", 1);
|
||||||
var elapsedtime = props.globals.getNode("/sim/time/elapsed-sec", 1);
|
var elapsedtime = props.globals.getNode("sim/time/elapsed-sec", 1);
|
||||||
var acess = props.globals.getNode("/systems/electrical/bus/ac-ess", 1);
|
var acess = props.globals.getNode("systems/electrical/bus/ac-ess", 1);
|
||||||
var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2", 1);
|
var ac2 = props.globals.getNode("systems/electrical/bus/ac-2", 1);
|
||||||
var du1_lgt = props.globals.getNode("/controls/lighting/DU/du1", 1);
|
var du1_lgt = props.globals.getNode("controls/lighting/DU/du1", 1);
|
||||||
var du6_lgt = props.globals.getNode("/controls/lighting/DU/du6", 1);
|
var du6_lgt = props.globals.getNode("controls/lighting/DU/du6", 1);
|
||||||
var acconfig = props.globals.getNode("/systems/acconfig/autoconfig-running", 1);
|
var acconfig = props.globals.getNode("systems/acconfig/autoconfig-running", 1);
|
||||||
var acconfig_mismatch = props.globals.getNode("/systems/acconfig/mismatch-code", 1);
|
var acconfig_mismatch = props.globals.getNode("systems/acconfig/mismatch-code", 1);
|
||||||
var cpt_du_xfr = props.globals.getNode("/modes/cpt-du-xfr", 1);
|
var cpt_du_xfr = props.globals.getNode("modes/cpt-du-xfr", 1);
|
||||||
var fo_du_xfr = props.globals.getNode("/modes/fo-du-xfr", 1);
|
var fo_du_xfr = props.globals.getNode("modes/fo-du-xfr", 1);
|
||||||
var eng_out = props.globals.getNode("/systems/thrust/eng-out", 1);
|
var eng_out = props.globals.getNode("systems/thrust/eng-out", 1);
|
||||||
var eng0_state = props.globals.getNode("/engines/engine[0]/state", 1);
|
var eng0_state = props.globals.getNode("engines/engine[0]/state", 1);
|
||||||
var eng1_state = props.globals.getNode("/engines/engine[1]/state", 1);
|
var eng1_state = props.globals.getNode("engines/engine[1]/state", 1);
|
||||||
var alpha_floor = props.globals.getNode("/systems/thrust/alpha-floor", 1);
|
var alpha_floor = props.globals.getNode("systems/thrust/alpha-floor", 1);
|
||||||
var toga_lk = props.globals.getNode("/systems/thrust/toga-lk", 1);
|
var toga_lk = props.globals.getNode("systems/thrust/toga-lk", 1);
|
||||||
var thrust_limit = props.globals.getNode("/controls/engines/thrust-limit", 1);
|
var thrust_limit = props.globals.getNode("controls/engines/thrust-limit", 1);
|
||||||
var flex = props.globals.getNode("/FMGC/internal/flex", 1);
|
var flex = props.globals.getNode("FMGC/internal/flex", 1);
|
||||||
var lvr_clb = props.globals.getNode("/systems/thrust/lvrclb", 1);
|
var lvr_clb = props.globals.getNode("systems/thrust/lvrclb", 1);
|
||||||
var throt_box = props.globals.getNode("/modes/pfd/fma/throttle-mode-box", 1);
|
var throt_box = props.globals.getNode("modes/pfd/fma/throttle-mode-box", 1);
|
||||||
var pitch_box = props.globals.getNode("/modes/pfd/fma/pitch-mode-box", 1);
|
var pitch_box = props.globals.getNode("modes/pfd/fma/pitch-mode-box", 1);
|
||||||
var ap_box = props.globals.getNode("/modes/pfd/fma/ap-mode-box", 1);
|
var ap_box = props.globals.getNode("modes/pfd/fma/ap-mode-box", 1);
|
||||||
var fd_box = props.globals.getNode("/modes/pfd/fma/fd-mode-box", 1);
|
var fd_box = props.globals.getNode("modes/pfd/fma/fd-mode-box", 1);
|
||||||
var at_box = props.globals.getNode("/modes/pfd/fma/athr-mode-box", 1);
|
var at_box = props.globals.getNode("modes/pfd/fma/athr-mode-box", 1);
|
||||||
var fbw_law = props.globals.getNode("/it-fbw/law", 1);
|
var fbw_law = props.globals.getNode("it-fbw/law", 1);
|
||||||
var ap_mode = props.globals.getNode("/modes/pfd/fma/ap-mode", 1);
|
var ap_mode = props.globals.getNode("modes/pfd/fma/ap-mode", 1);
|
||||||
var fd_mode = props.globals.getNode("/modes/pfd/fma/fd-mode", 1);
|
var fd_mode = props.globals.getNode("modes/pfd/fma/fd-mode", 1);
|
||||||
var at_mode = props.globals.getNode("/modes/pfd/fma/at-mode", 1);
|
var at_mode = props.globals.getNode("modes/pfd/fma/at-mode", 1);
|
||||||
var alt_std_mode = props.globals.getNode("/modes/altimeter/std", 1);
|
var alt_std_mode = props.globals.getNode("modes/altimeter/std", 1);
|
||||||
var alt_inhg_mode = props.globals.getNode("/modes/altimeter/inhg", 1);
|
var alt_inhg_mode = props.globals.getNode("modes/altimeter/inhg", 1);
|
||||||
var alt_hpa = props.globals.getNode("/instrumentation/altimeter/setting-hpa", 1);
|
var alt_hpa = props.globals.getNode("instrumentation/altimeter/setting-hpa", 1);
|
||||||
var alt_inhg = props.globals.getNode("/instrumentation/altimeter/setting-inhg", 1);
|
var alt_inhg = props.globals.getNode("instrumentation/altimeter/setting-inhg", 1);
|
||||||
var altitude = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft", 1);
|
var altitude = props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft", 1);
|
||||||
var altitude_pfd = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft-pfd", 1);
|
var altitude_pfd = props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft-pfd", 1);
|
||||||
var alt_diff = props.globals.getNode("/instrumentation/pfd/alt-diff", 1);
|
var alt_diff = props.globals.getNode("instrumentation/pfd/alt-diff", 1);
|
||||||
var ap_alt = props.globals.getNode("/it-autoflight/internal/alt", 1);
|
var ap_alt = props.globals.getNode("it-autoflight/internal/alt", 1);
|
||||||
var vs_needle = props.globals.getNode("/instrumentation/pfd/vs-needle", 1);
|
var vs_needle = props.globals.getNode("instrumentation/pfd/vs-needle", 1);
|
||||||
var vs_digit = props.globals.getNode("/instrumentation/pfd/vs-digit-trans", 1);
|
var vs_digit = props.globals.getNode("instrumentation/pfd/vs-digit-trans", 1);
|
||||||
var ap_vs_pfd = props.globals.getNode("/it-autoflight/internal/vert-speed-fpm-pfd", 1);
|
var ap_vs_pfd = props.globals.getNode("it-autoflight/internal/vert-speed-fpm-pfd", 1);
|
||||||
var athr_arm = props.globals.getNode("/modes/pfd/fma/athr-armed", 1);
|
var athr_arm = props.globals.getNode("modes/pfd/fma/athr-armed", 1);
|
||||||
var FMGC_max_spd = props.globals.getNode("/FMGC/internal/maxspeed", 1);
|
var FMGC_max_spd = props.globals.getNode("FMGC/internal/maxspeed", 1);
|
||||||
var ind_spd_kt = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt", 1);
|
var ind_spd_kt = props.globals.getNode("instrumentation/airspeed-indicator/indicated-speed-kt", 1);
|
||||||
var ind_spd_mach = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach", 1);
|
var ind_spd_mach = props.globals.getNode("instrumentation/airspeed-indicator/indicated-mach", 1);
|
||||||
var at_mach_mode = props.globals.getNode("/it-autoflight/input/kts-mach", 1);
|
var at_mach_mode = props.globals.getNode("it-autoflight/input/kts-mach", 1);
|
||||||
var at_input_spd_mach = props.globals.getNode("/it-autoflight/input/spd-mach", 1);
|
var at_input_spd_mach = props.globals.getNode("it-autoflight/input/spd-mach", 1);
|
||||||
var at_input_spd_kts = props.globals.getNode("/it-autoflight/input/spd-kts", 1);
|
var at_input_spd_kts = props.globals.getNode("it-autoflight/input/spd-kts", 1);
|
||||||
var fd_roll = props.globals.getNode("/it-autoflight/fd/roll-bar", 1);
|
var fd_roll = props.globals.getNode("it-autoflight/fd/roll-bar", 1);
|
||||||
var fd_pitch = props.globals.getNode("/it-autoflight/fd/pitch-bar", 1);
|
var fd_pitch = props.globals.getNode("it-autoflight/fd/pitch-bar", 1);
|
||||||
var decision = props.globals.getNode("/instrumentation/mk-viii/inputs/arinc429/decision-height", 1);
|
var decision = props.globals.getNode("instrumentation/mk-viii/inputs/arinc429/decision-height", 1);
|
||||||
var slip_skid = props.globals.getNode("/instrumentation/pfd/slip-skid", 1);
|
var slip_skid = props.globals.getNode("instrumentation/pfd/slip-skid", 1);
|
||||||
var FMGCphase = props.globals.getNode("/FMGC/status/phase", 1);
|
var FMGCphase = props.globals.getNode("FMGC/status/phase", 1);
|
||||||
var loc = props.globals.getNode("/instrumentation/nav[0]/heading-needle-deflection-norm", 1);
|
var loc = props.globals.getNode("instrumentation/nav[0]/heading-needle-deflection-norm", 1);
|
||||||
var gs = props.globals.getNode("/instrumentation/nav[0]/gs-needle-deflection-norm", 1);
|
var gs = props.globals.getNode("instrumentation/nav[0]/gs-needle-deflection-norm", 1);
|
||||||
var show_hdg = props.globals.getNode("/it-autoflight/custom/show-hdg", 1);
|
var show_hdg = props.globals.getNode("it-autoflight/custom/show-hdg", 1);
|
||||||
var ap_hdg = props.globals.getNode("/it-autoflight/input/hdg", 1);
|
var ap_hdg = props.globals.getNode("it-autoflight/input/hdg", 1);
|
||||||
var ap_trk_sw = props.globals.getNode("/it-autoflight/custom/trk-fpa", 1);
|
var ap_trk_sw = props.globals.getNode("it-autoflight/custom/trk-fpa", 1);
|
||||||
var ap_ils_mode = props.globals.getNode("/modes/pfd/ILS1", 1);
|
var ap_ils_mode = props.globals.getNode("modes/pfd/ILS1", 1);
|
||||||
var ap_ils_mode2 = props.globals.getNode("/modes/pfd/ILS2", 1);
|
var ap_ils_mode2 = props.globals.getNode("modes/pfd/ILS2", 1);
|
||||||
var loc_in_range = props.globals.getNode("/instrumentation/nav[0]/in-range", 1);
|
var loc_in_range = props.globals.getNode("instrumentation/nav[0]/in-range", 1);
|
||||||
var gs_in_range = props.globals.getNode("/instrumentation/nav[0]/gs-in-range", 1);
|
var gs_in_range = props.globals.getNode("instrumentation/nav[0]/gs-in-range", 1);
|
||||||
var nav0_signalq = props.globals.getNode("/instrumentation/nav[0]/signal-quality-norm", 1);
|
var nav0_signalq = props.globals.getNode("instrumentation/nav[0]/signal-quality-norm", 1);
|
||||||
var hasloc = props.globals.getNode("/instrumentation/nav[0]/nav-loc", 1);
|
var hasloc = props.globals.getNode("instrumentation/nav[0]/nav-loc", 1);
|
||||||
var hasgs = props.globals.getNode("/instrumentation/nav[0]/has-gs", 1);
|
var hasgs = props.globals.getNode("instrumentation/nav[0]/has-gs", 1);
|
||||||
var pfdrate = props.globals.getNode("/systems/acconfig/options/pfd-rate", 1);
|
var pfdrate = props.globals.getNode("systems/acconfig/options/pfd-rate", 1);
|
||||||
var managed_spd = props.globals.getNode("/it-autoflight/input/spd-managed", 1);
|
var managed_spd = props.globals.getNode("it-autoflight/input/spd-managed", 1);
|
||||||
var at_tgt_ias = props.globals.getNode("/FMGC/internal/target-ias-pfd", 1);
|
var at_tgt_ias = props.globals.getNode("FMGC/internal/target-ias-pfd", 1);
|
||||||
var ap1 = props.globals.getNode("/it-autoflight/output/ap1", 1);
|
var ap1 = props.globals.getNode("it-autoflight/output/ap1", 1);
|
||||||
var ap2 = props.globals.getNode("/it-autoflight/output/ap2", 1);
|
var ap2 = props.globals.getNode("it-autoflight/output/ap2", 1);
|
||||||
var fd1 = props.globals.getNode("/it-autoflight/output/fd1", 1);
|
var fd1 = props.globals.getNode("it-autoflight/output/fd1", 1);
|
||||||
var fd2 = props.globals.getNode("/it-autoflight/output/fd2", 1);
|
var fd2 = props.globals.getNode("it-autoflight/output/fd2", 1);
|
||||||
var athr = props.globals.getNode("/it-autoflight/output/athr", 1);
|
var athr = props.globals.getNode("it-autoflight/output/athr", 1);
|
||||||
var gear_agl = props.globals.getNode("/position/gear-agl-ft", 1);
|
var gear_agl = props.globals.getNode("position/gear-agl-ft", 1);
|
||||||
var aileron_input = props.globals.getNode("/controls/flight/aileron-input-fast", 1);
|
var aileron_input = props.globals.getNode("controls/flight/aileron-input-fast", 1);
|
||||||
var elevator_input = props.globals.getNode("/controls/flight/elevator-input-fast", 1);
|
var elevator_input = props.globals.getNode("controls/flight/elevator-input-fast", 1);
|
||||||
var att_switch = props.globals.getNode("/controls/switching/ATTHDG", 1);
|
var att_switch = props.globals.getNode("controls/switching/ATTHDG", 1);
|
||||||
var air_switch = props.globals.getNode("/controls/switching/AIRDATA", 1);
|
var air_switch = props.globals.getNode("controls/switching/AIRDATA", 1);
|
||||||
var appr_enabled = props.globals.getNode("/it-autoflight/output/appr-armed/", 1);
|
var appr_enabled = props.globals.getNode("it-autoflight/output/appr-armed/", 1);
|
||||||
var loc_enabled = props.globals.getNode("/it-autoflight/output/loc-armed/", 1);
|
var loc_enabled = props.globals.getNode("it-autoflight/output/loc-armed/", 1);
|
||||||
var ils_data1 = props.globals.getNode("/FMGC/internal/ils1-mcdu/", 1);
|
var vert_state = props.globals.getNode("it-autoflight/output/vert/", 1);
|
||||||
|
var ils_data1 = props.globals.getNode("FMGC/internal/ils1-mcdu/", 1);
|
||||||
# Independent MCDU ILS not implemented yet, use MCDU1 in the meantime
|
# Independent MCDU ILS not implemented yet, use MCDU1 in the meantime
|
||||||
# var ils_data2 = props.globals.getNode("/FMGC/internal/ils2-mcdu/", 1);
|
# var ils_data2 = props.globals.getNode("FMGC/internal/ils2-mcdu/", 1);
|
||||||
var dme_in_range = props.globals.getNode("/instrumentation/nav[0]/dme-in-range", 1);
|
var dme_in_range = props.globals.getNode("instrumentation/nav[0]/dme-in-range", 1);
|
||||||
var dme_data = props.globals.getNode("/instrumentation/dme[0]/indicated-distance-nm", 1);
|
var dme_data = props.globals.getNode("instrumentation/dme[0]/indicated-distance-nm", 1);
|
||||||
|
var ils_crs = props.globals.getNode("instrumentation/nav[0]/radials/selected-deg", 1);
|
||||||
|
var ils1_crs_set = props.globals.getNode("FMGC/internal/ils1crs-set/", 1);
|
||||||
|
var arrival_airport = props.globals.getNode("FMGC/internal/arr-arpt", 1);
|
||||||
|
var outer_marker = props.globals.getNode("instrumentation/marker-beacon/outer", 1);
|
||||||
|
var middle_marker = props.globals.getNode("instrumentation/marker-beacon/middle", 1);
|
||||||
|
var inner_marker = props.globals.getNode("instrumentation/marker-beacon/inner", 1);
|
||||||
|
|
||||||
# Create Nodes:
|
# Create Nodes:
|
||||||
var vs_needle = props.globals.initNode("/instrumentation/pfd/vs-needle", 0.0, "DOUBLE");
|
var vs_needle = props.globals.initNode("/instrumentation/pfd/vs-needle", 0.0, "DOUBLE");
|
||||||
|
@ -194,7 +201,7 @@ var canvas_PFD_base = {
|
||||||
"AI_bank_lim","AI_bank_lim_X","AI_pitch_lim","AI_pitch_lim_X","AI_slipskid","AI_horizon","AI_horizon_ground","AI_horizon_sky","AI_stick","AI_stick_pos","AI_heading","AI_agl_g","AI_agl","AI_error","AI_group","FD_roll","FD_pitch","ALT_scale","ALT_target",
|
"AI_bank_lim","AI_bank_lim_X","AI_pitch_lim","AI_pitch_lim_X","AI_slipskid","AI_horizon","AI_horizon_ground","AI_horizon_sky","AI_stick","AI_stick_pos","AI_heading","AI_agl_g","AI_agl","AI_error","AI_group","FD_roll","FD_pitch","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_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting",
|
"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_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",
|
"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"];
|
"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"];
|
||||||
},
|
},
|
||||||
updateDu1: func() {
|
updateDu1: func() {
|
||||||
var elapsedtime_act = elapsedtime.getValue();
|
var elapsedtime_act = elapsedtime.getValue();
|
||||||
|
@ -704,7 +711,6 @@ var canvas_PFD_base = {
|
||||||
|
|
||||||
# ILS
|
# ILS
|
||||||
me["LOC_pointer"].setTranslation(loc.getValue() * 197, 0);
|
me["LOC_pointer"].setTranslation(loc.getValue() * 197, 0);
|
||||||
|
|
||||||
me["GS_pointer"].setTranslation(0, gs.getValue() * -197);
|
me["GS_pointer"].setTranslation(0, gs.getValue() * -197);
|
||||||
|
|
||||||
# Heading
|
# Heading
|
||||||
|
@ -768,8 +774,55 @@ var canvas_PFD_base = {
|
||||||
}
|
}
|
||||||
|
|
||||||
me["TRK_pointer"].setTranslation((track_diff.getValue() / 10) * 98.5416, 0);
|
me["TRK_pointer"].setTranslation((track_diff.getValue() / 10) * 98.5416, 0);
|
||||||
|
split_ils = split("/", ils_data1.getValue());
|
||||||
|
|
||||||
|
if (ap_ils_mode.getValue() == 1 and ils1_crs_set.getValue() == 1 and size(split_ils) == 2) {
|
||||||
|
magnetic_hdg = ils_crs.getValue();
|
||||||
|
magnetic_hdg_dif = geo.normdeg180(magnetic_hdg - heading.getValue());
|
||||||
|
if (magnetic_hdg_dif >= -23.62 and magnetic_hdg_dif <= 23.62) {
|
||||||
|
me["CRS_pointer"].setTranslation((magnetic_hdg_dif / 10) * 98.5416, 0);
|
||||||
|
me["ILS_HDG_R"].hide();
|
||||||
|
me["ILS_HDG_L"].hide();
|
||||||
|
me["CRS_pointer"].show();
|
||||||
|
} else if (magnetic_hdg_dif < -23.62 and magnetic_hdg_dif >= -180) {
|
||||||
|
me["ILS_left"].setText(sprintf("%3.0f", int(magnetic_hdg)));
|
||||||
|
me["ILS_HDG_L"].show();
|
||||||
|
me["ILS_HDG_R"].hide();
|
||||||
me["CRS_pointer"].hide();
|
me["CRS_pointer"].hide();
|
||||||
|
} else if (magnetic_hdg_dif > 23.62 and magnetic_hdg_dif <= 180) {
|
||||||
|
me["ILS_right"].setText(sprintf("%3.0f", int(magnetic_hdg)));
|
||||||
|
me["ILS_HDG_R"].show();
|
||||||
|
me["ILS_HDG_L"].hide();
|
||||||
|
me["CRS_pointer"].hide();
|
||||||
|
} else {
|
||||||
|
me["ILS_HDG_R"].hide();
|
||||||
|
me["ILS_HDG_L"].hide();
|
||||||
|
me["CRS_pointer"].hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
#Approach selected and tuned, overwrite RAD NAV
|
||||||
|
# } else if (0) {
|
||||||
|
# var runways = airportinfo(airportinfo(arrival_airport.getValue()).id).runways;
|
||||||
|
# var runway_keys = sort(keys(runways), string.icmp);
|
||||||
|
# foreach(var rwy; runway_keys) {
|
||||||
|
# var r = runways[rwy];
|
||||||
|
# if (r.ils_frequency_mhz == split_ils[1]) {
|
||||||
|
# magnetic_hdg = r.heading - getprop("environment/magnetic-variation-deg");
|
||||||
|
# magnetic_hdg_dif = geo.normdeg180(magnetic_hdg - heading.getValue());
|
||||||
|
#
|
||||||
|
# SET THE FMGC values here!!!!!
|
||||||
|
# course = r.heading;
|
||||||
|
# ils_frequency = r.ils_frequency_mhz;
|
||||||
|
#
|
||||||
|
# break;
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
|
} else {
|
||||||
|
me["ILS_HDG_R"].hide();
|
||||||
|
me["ILS_HDG_L"].hide();
|
||||||
|
me["CRS_pointer"].hide();
|
||||||
|
}
|
||||||
|
|
||||||
# AI HDG
|
# AI HDG
|
||||||
me.AI_horizon_hdg_trans.setTranslation(me.middleOffset, horizon_pitch.getValue() * 11.825);
|
me.AI_horizon_hdg_trans.setTranslation(me.middleOffset, horizon_pitch.getValue() * 11.825);
|
||||||
|
@ -836,12 +889,28 @@ var canvas_PFD_1 = {
|
||||||
if (ap_ils_mode.getValue() == 1) {
|
if (ap_ils_mode.getValue() == 1) {
|
||||||
me["LOC_scale"].show();
|
me["LOC_scale"].show();
|
||||||
me["GS_scale"].show();
|
me["GS_scale"].show();
|
||||||
me["ils_code"].setText(split("/", ils_data1.getValue())[0]);
|
split_ils = split("/", ils_data1.getValue());
|
||||||
me["ils_freq"].setText(split("/", ils_data1.getValue())[1]);
|
|
||||||
|
if (size(split_ils) < 2) {
|
||||||
|
me["ils_freq"].setText(split_ils[0]);
|
||||||
|
me["ils_freq"].show();
|
||||||
|
me["ils_code"].hide();
|
||||||
|
me["dme_dist"].hide();
|
||||||
|
me["dme_dist_legend"].hide();
|
||||||
|
} else {
|
||||||
|
me["ils_code"].setText(split_ils[0]);
|
||||||
|
me["ils_freq"].setText(split_ils[1]);
|
||||||
me["ils_code"].show();
|
me["ils_code"].show();
|
||||||
me["ils_freq"].show();
|
me["ils_freq"].show();
|
||||||
|
}
|
||||||
|
|
||||||
if (dme_in_range.getValue() == 1) {
|
if (dme_in_range.getValue() == 1) {
|
||||||
me["dme_dist"].setText(sprintf("%2.0f", int(dme_data.getValue())));
|
dme_dist_data = dme_data.getValue();
|
||||||
|
if (dme_dist_data < 20.0) {
|
||||||
|
me["dme_dist"].setText(sprintf("%1.1f", dme_dist_data));
|
||||||
|
} else {
|
||||||
|
me["dme_dist"].setText(sprintf("%2.0f", dme_dist_data));
|
||||||
|
}
|
||||||
me["dme_dist"].show();
|
me["dme_dist"].show();
|
||||||
me["dme_dist_legend"].show();
|
me["dme_dist_legend"].show();
|
||||||
}
|
}
|
||||||
|
@ -852,6 +921,27 @@ var canvas_PFD_1 = {
|
||||||
me["ils_freq"].hide();
|
me["ils_freq"].hide();
|
||||||
me["dme_dist"].hide();
|
me["dme_dist"].hide();
|
||||||
me["dme_dist_legend"].hide();
|
me["dme_dist_legend"].hide();
|
||||||
|
me["outerMarker"].hide();
|
||||||
|
me["middleMarker"].hide();
|
||||||
|
me["innerMarker"].hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (outer_marker.getValue() == 1) {
|
||||||
|
me["outerMarker"].show();
|
||||||
|
me["middleMarker"].hide();
|
||||||
|
me["innerMarker"].hide();
|
||||||
|
} else if (middle_marker.getValue() == 1) {
|
||||||
|
me["middleMarker"].show();
|
||||||
|
me["outerMarker"].hide();
|
||||||
|
me["innerMarker"].hide();
|
||||||
|
} else if (inner_marker.getValue() == 1) {
|
||||||
|
me["innerMarker"].show();
|
||||||
|
me["outerMarker"].hide();
|
||||||
|
me["middleMarker"].hide();
|
||||||
|
} else {
|
||||||
|
me["outerMarker"].hide();
|
||||||
|
me["middleMarker"].hide();
|
||||||
|
me["innerMarker"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ap_ils_mode.getValue() == 1 and loc_in_range.getValue() == 1 and hasloc.getValue() == 1 and nav0_signalq.getValue() > 0.99) {
|
if (ap_ils_mode.getValue() == 1 and loc_in_range.getValue() == 1 and hasloc.getValue() == 1 and nav0_signalq.getValue() > 0.99) {
|
||||||
|
@ -1144,13 +1234,28 @@ var canvas_PFD_2 = {
|
||||||
if (ap_ils_mode2.getValue() == 1) {
|
if (ap_ils_mode2.getValue() == 1) {
|
||||||
me["LOC_scale"].show();
|
me["LOC_scale"].show();
|
||||||
me["GS_scale"].show();
|
me["GS_scale"].show();
|
||||||
# Independent MCDU ILS not implemented yet, use MCDU1 in the meantime
|
split_ils = split("/", ils_data1.getValue());
|
||||||
me["ils_code"].setText(split("/", ils_data1.getValue())[0]);
|
|
||||||
me["ils_freq"].setText(split("/", ils_data1.getValue())[1]);
|
if (size(split_ils) < 2) {
|
||||||
|
me["ils_freq"].setText(split_ils[0]);
|
||||||
|
me["ils_freq"].show();
|
||||||
|
me["ils_code"].hide();
|
||||||
|
me["dme_dist"].hide();
|
||||||
|
me["dme_dist_legend"].hide();
|
||||||
|
} else {
|
||||||
|
me["ils_code"].setText(split_ils[0]);
|
||||||
|
me["ils_freq"].setText(split_ils[1]);
|
||||||
me["ils_code"].show();
|
me["ils_code"].show();
|
||||||
me["ils_freq"].show();
|
me["ils_freq"].show();
|
||||||
|
}
|
||||||
|
|
||||||
if (dme_in_range.getValue() == 1) {
|
if (dme_in_range.getValue() == 1) {
|
||||||
me["dme_dist"].setText(sprintf("%2.0f", int(dme_data.getValue())));
|
dme_dist_data = dme_data.getValue();
|
||||||
|
if (dme_dist_data < 20.0) {
|
||||||
|
me["dme_dist"].setText(sprintf("%1.1f", dme_dist_data));
|
||||||
|
} else {
|
||||||
|
me["dme_dist"].setText(sprintf("%2.0f", dme_dist_data));
|
||||||
|
}
|
||||||
me["dme_dist"].show();
|
me["dme_dist"].show();
|
||||||
me["dme_dist_legend"].show();
|
me["dme_dist_legend"].show();
|
||||||
}
|
}
|
||||||
|
@ -1161,6 +1266,33 @@ var canvas_PFD_2 = {
|
||||||
me["ils_freq"].hide();
|
me["ils_freq"].hide();
|
||||||
me["dme_dist"].hide();
|
me["dme_dist"].hide();
|
||||||
me["dme_dist_legend"].hide();
|
me["dme_dist_legend"].hide();
|
||||||
|
me["outerMarker"].hide();
|
||||||
|
me["middleMarker"].hide();
|
||||||
|
me["innerMarker"].hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ap_ils_mode2.getValue() == 1 and (appr_enabled.getValue() == 1 or loc_enabled.getValue() == 1 or vert_state.getValue() == 2)) {
|
||||||
|
if (outer_marker.getValue() == 1) {
|
||||||
|
me["outerMarker"].show();
|
||||||
|
me["middleMarker"].hide();
|
||||||
|
me["innerMarker"].hide();
|
||||||
|
} else if (middle_marker.getValue() == 1) {
|
||||||
|
me["middleMarker"].show();
|
||||||
|
me["outerMarker"].hide();
|
||||||
|
me["innerMarker"].hide();
|
||||||
|
} else if (inner_marker.getValue() == 1) {
|
||||||
|
me["innerMarker"].show();
|
||||||
|
me["outerMarker"].hide();
|
||||||
|
me["middleMarker"].hide();
|
||||||
|
} else {
|
||||||
|
me["outerMarker"].hide();
|
||||||
|
me["middleMarker"].hide();
|
||||||
|
me["innerMarker"].hide();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
me["outerMarker"].hide();
|
||||||
|
me["middleMarker"].hide();
|
||||||
|
me["innerMarker"].hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ap_ils_mode2.getValue() == 1 and loc_in_range.getValue() == 1 and hasloc.getValue() == 1 and nav0_signalq.getValue() > 0.99) {
|
if (ap_ils_mode2.getValue() == 1 and loc_in_range.getValue() == 1 and hasloc.getValue() == 1 and nav0_signalq.getValue() > 0.99) {
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
viewBox="0 0 1024 1024"
|
viewBox="0 0 1024 1024"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="svg2"
|
id="svg2"
|
||||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
inkscape:version="1.0beta2 (2b71d25, 2019-12-03)"
|
||||||
sodipodi:docname="pfd.svg">
|
sodipodi:docname="pfd.svg">
|
||||||
<metadata
|
<metadata
|
||||||
id="metadata375">
|
id="metadata375">
|
||||||
|
@ -37,15 +37,15 @@
|
||||||
guidetolerance="10"
|
guidetolerance="10"
|
||||||
inkscape:pageopacity="1"
|
inkscape:pageopacity="1"
|
||||||
inkscape:pageshadow="2"
|
inkscape:pageshadow="2"
|
||||||
inkscape:window-width="716"
|
inkscape:window-width="1280"
|
||||||
inkscape:window-height="403"
|
inkscape:window-height="755"
|
||||||
id="namedview371"
|
id="namedview371"
|
||||||
showgrid="true"
|
showgrid="true"
|
||||||
inkscape:zoom="1.025"
|
inkscape:zoom="0.44418625"
|
||||||
inkscape:cx="678.88837"
|
inkscape:cx="586.98959"
|
||||||
inkscape:cy="332.98605"
|
inkscape:cy="803.99797"
|
||||||
inkscape:window-x="-8"
|
inkscape:window-x="1"
|
||||||
inkscape:window-y="0"
|
inkscape:window-y="23"
|
||||||
inkscape:window-maximized="0"
|
inkscape:window-maximized="0"
|
||||||
inkscape:current-layer="svg2"
|
inkscape:current-layer="svg2"
|
||||||
showguides="true"
|
showguides="true"
|
||||||
|
@ -54,7 +54,8 @@
|
||||||
fit-margin-top="0"
|
fit-margin-top="0"
|
||||||
fit-margin-left="0"
|
fit-margin-left="0"
|
||||||
fit-margin-right="0"
|
fit-margin-right="0"
|
||||||
fit-margin-bottom="0">
|
fit-margin-bottom="0"
|
||||||
|
inkscape:document-rotation="0">
|
||||||
<inkscape:grid
|
<inkscape:grid
|
||||||
type="xygrid"
|
type="xygrid"
|
||||||
id="grid5153"
|
id="grid5153"
|
||||||
|
@ -1678,11 +1679,11 @@
|
||||||
id="AI_agl"
|
id="AI_agl"
|
||||||
y="680.72845"
|
y="680.72845"
|
||||||
x="511.25748"
|
x="511.25748"
|
||||||
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:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
inkscape:label="#text983"
|
inkscape:label="#text983"
|
||||||
inkscape:transform-center-y="245.55937"><tspan
|
inkscape:transform-center-y="245.55937"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:45px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:45px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577"
|
||||||
y="680.72845"
|
y="680.72845"
|
||||||
x="511.25748"
|
x="511.25748"
|
||||||
id="tspan4624"
|
id="tspan4624"
|
||||||
|
@ -1883,16 +1884,16 @@
|
||||||
id="text5096"
|
id="text5096"
|
||||||
y="569.32635"
|
y="569.32635"
|
||||||
x="1019.0017"
|
x="1019.0017"
|
||||||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
xml:space="preserve"><tspan
|
xml:space="preserve"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.77171135px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.7717px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.657577"
|
||||||
y="569.32635"
|
y="569.32635"
|
||||||
x="1019.0017"
|
x="1019.0017"
|
||||||
id="tspan5094"
|
id="tspan5094"
|
||||||
sodipodi:role="line">1</tspan></text>
|
sodipodi:role="line">1</tspan></text>
|
||||||
<text
|
<text
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
x="1019.0017"
|
x="1019.0017"
|
||||||
y="628.34387"
|
y="628.34387"
|
||||||
id="text5100"
|
id="text5100"
|
||||||
|
@ -1901,15 +1902,15 @@
|
||||||
id="tspan5098"
|
id="tspan5098"
|
||||||
x="1019.0017"
|
x="1019.0017"
|
||||||
y="628.34387"
|
y="628.34387"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.77171135px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">2</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.7717px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.657577">2</tspan></text>
|
||||||
<text
|
<text
|
||||||
transform="scale(0.87676975,1.1405503)"
|
transform="scale(0.87676975,1.1405503)"
|
||||||
id="text5104"
|
id="text5104"
|
||||||
y="687.27924"
|
y="687.27924"
|
||||||
x="1019.0017"
|
x="1019.0017"
|
||||||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
xml:space="preserve"><tspan
|
xml:space="preserve"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.77171135px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.7717px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.657577"
|
||||||
y="687.27924"
|
y="687.27924"
|
||||||
x="1019.0017"
|
x="1019.0017"
|
||||||
id="tspan5102"
|
id="tspan5102"
|
||||||
|
@ -1966,7 +1967,7 @@
|
||||||
id="g4317">
|
id="g4317">
|
||||||
<text
|
<text
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
x="1086.9194"
|
x="1086.9194"
|
||||||
y="183.6866"
|
y="183.6866"
|
||||||
id="text5130"
|
id="text5130"
|
||||||
|
@ -1975,22 +1976,22 @@
|
||||||
id="tspan5128"
|
id="tspan5128"
|
||||||
x="1086.9194"
|
x="1086.9194"
|
||||||
y="183.6866"
|
y="183.6866"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.75603485px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">6</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.756px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.657577">6</tspan></text>
|
||||||
<text
|
<text
|
||||||
transform="scale(0.87678236,1.1405339)"
|
transform="scale(0.87678236,1.1405339)"
|
||||||
id="text5134"
|
id="text5134"
|
||||||
y="246.63768"
|
y="246.63768"
|
||||||
x="1086.9194"
|
x="1086.9194"
|
||||||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
xml:space="preserve"><tspan
|
xml:space="preserve"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.75603485px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.756px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.657577"
|
||||||
y="246.63768"
|
y="246.63768"
|
||||||
x="1086.9194"
|
x="1086.9194"
|
||||||
id="tspan5132"
|
id="tspan5132"
|
||||||
sodipodi:role="line">2</tspan></text>
|
sodipodi:role="line">2</tspan></text>
|
||||||
<text
|
<text
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
x="1086.9194"
|
x="1086.9194"
|
||||||
y="309.50116"
|
y="309.50116"
|
||||||
id="text5138"
|
id="text5138"
|
||||||
|
@ -1999,7 +2000,7 @@
|
||||||
id="tspan5136"
|
id="tspan5136"
|
||||||
x="1086.9194"
|
x="1086.9194"
|
||||||
y="309.50116"
|
y="309.50116"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.75603485px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">1</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.756px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.657577">1</tspan></text>
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g
|
||||||
transform="matrix(1.0666667,0,0,1.066636,0.28284271,-0.50381959)"
|
transform="matrix(1.0666667,0,0,1.066636,0.28284271,-0.50381959)"
|
||||||
|
@ -2082,10 +2083,10 @@
|
||||||
id="VS_digit"
|
id="VS_digit"
|
||||||
y="405.05588"
|
y="405.05588"
|
||||||
x="1147.7107"
|
x="1147.7107"
|
||||||
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.65757734"
|
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.657577"
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
inkscape:label="#text5138-5"><tspan
|
inkscape:label="#text5138-5"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577"
|
||||||
y="405.05588"
|
y="405.05588"
|
||||||
x="1147.7107"
|
x="1147.7107"
|
||||||
id="tspan5136-1"
|
id="tspan5136-1"
|
||||||
|
@ -2343,7 +2344,7 @@
|
||||||
<text
|
<text
|
||||||
inkscape:label="#text983"
|
inkscape:label="#text983"
|
||||||
xml:space="preserve"
|
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:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
x="125.31013"
|
x="125.31013"
|
||||||
y="74.429817"
|
y="74.429817"
|
||||||
id="FMA_manmode"
|
id="FMA_manmode"
|
||||||
|
@ -2352,16 +2353,16 @@
|
||||||
id="tspan4307"
|
id="tspan4307"
|
||||||
x="125.31013"
|
x="125.31013"
|
||||||
y="74.429817"
|
y="74.429817"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948883px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.65757734">TOGA</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.657577">TOGA</tspan></text>
|
||||||
<text
|
<text
|
||||||
transform="scale(0.87678236,1.1405339)"
|
transform="scale(0.87678236,1.1405339)"
|
||||||
id="FMA_man"
|
id="FMA_man"
|
||||||
y="33.759209"
|
y="33.759209"
|
||||||
x="125.84993"
|
x="125.84993"
|
||||||
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:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
inkscape:label="#text983"><tspan
|
inkscape:label="#text983"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948883px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.657577"
|
||||||
y="33.759209"
|
y="33.759209"
|
||||||
x="125.84993"
|
x="125.84993"
|
||||||
id="tspan4303"
|
id="tspan4303"
|
||||||
|
@ -2378,10 +2379,10 @@
|
||||||
id="FMA_ctr_msg"
|
id="FMA_ctr_msg"
|
||||||
y="115.0584"
|
y="115.0584"
|
||||||
x="505.48523"
|
x="505.48523"
|
||||||
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:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#ff0000;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
inkscape:label="#text983"><tspan
|
inkscape:label="#text983"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ff0000;fill-opacity:1;stroke-width:0.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ff0000;fill-opacity:1;stroke-width:0.657577"
|
||||||
y="115.0584"
|
y="115.0584"
|
||||||
x="505.48523"
|
x="505.48523"
|
||||||
id="tspan4614"
|
id="tspan4614"
|
||||||
|
@ -2396,7 +2397,7 @@
|
||||||
<text
|
<text
|
||||||
inkscape:label="#text983"
|
inkscape:label="#text983"
|
||||||
xml:space="preserve"
|
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:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
x="370.20218"
|
x="370.20218"
|
||||||
y="34.986706"
|
y="34.986706"
|
||||||
id="FMA_pitch"
|
id="FMA_pitch"
|
||||||
|
@ -2405,16 +2406,16 @@
|
||||||
id="tspan4244"
|
id="tspan4244"
|
||||||
x="370.20218"
|
x="370.20218"
|
||||||
y="34.986706"
|
y="34.986706"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948883px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.65757734">ALT</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577">ALT</tspan></text>
|
||||||
<text
|
<text
|
||||||
transform="scale(0.87678236,1.1405339)"
|
transform="scale(0.87678236,1.1405339)"
|
||||||
id="FMA_pitcharm"
|
id="FMA_pitcharm"
|
||||||
y="74.709473"
|
y="74.709473"
|
||||||
x="422.80801"
|
x="422.80801"
|
||||||
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.65757734"
|
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.657577"
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
inkscape:label="#text983"><tspan
|
inkscape:label="#text983"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948883px;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.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;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.657577"
|
||||||
y="74.709473"
|
y="74.709473"
|
||||||
x="422.80801"
|
x="422.80801"
|
||||||
id="tspan4248"
|
id="tspan4248"
|
||||||
|
@ -2422,7 +2423,7 @@
|
||||||
<text
|
<text
|
||||||
inkscape:label="#text983"
|
inkscape:label="#text983"
|
||||||
xml:space="preserve"
|
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.65757734"
|
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.657577"
|
||||||
x="305.3663"
|
x="305.3663"
|
||||||
y="74.709473"
|
y="74.709473"
|
||||||
id="FMA_pitcharm2"
|
id="FMA_pitcharm2"
|
||||||
|
@ -2431,16 +2432,16 @@
|
||||||
id="tspan4252"
|
id="tspan4252"
|
||||||
x="305.3663"
|
x="305.3663"
|
||||||
y="74.709473"
|
y="74.709473"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948883px;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.65757734">CLB</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;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.657577">CLB</tspan></text>
|
||||||
<text
|
<text
|
||||||
transform="scale(0.87678237,1.1405339)"
|
transform="scale(0.87678237,1.1405339)"
|
||||||
id="FMA_roll"
|
id="FMA_roll"
|
||||||
y="34.635147"
|
y="34.635147"
|
||||||
x="629.61298"
|
x="629.61298"
|
||||||
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:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
inkscape:label="#text983"><tspan
|
inkscape:label="#text983"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948883px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577"
|
||||||
y="34.635147"
|
y="34.635147"
|
||||||
x="629.61298"
|
x="629.61298"
|
||||||
id="tspan4256"
|
id="tspan4256"
|
||||||
|
@ -2450,10 +2451,10 @@
|
||||||
id="FMA_rollarm"
|
id="FMA_rollarm"
|
||||||
y="74.709473"
|
y="74.709473"
|
||||||
x="629.22266"
|
x="629.22266"
|
||||||
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.65757734"
|
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.657577"
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
inkscape:label="#text983"><tspan
|
inkscape:label="#text983"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948883px;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.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;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.657577"
|
||||||
y="74.709473"
|
y="74.709473"
|
||||||
x="629.22266"
|
x="629.22266"
|
||||||
id="tspan4260"
|
id="tspan4260"
|
||||||
|
@ -2561,7 +2562,7 @@
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
transform="scale(1.0000144,0.9999856)"
|
transform="scale(1.0000144,0.9999856)"
|
||||||
inkscape:label="#text979"><tspan
|
inkscape:label="#text979"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.39944839px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.75"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.3994px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.75"
|
||||||
y="885.26117"
|
y="885.26117"
|
||||||
x="859.21783"
|
x="859.21783"
|
||||||
id="tspan4618"
|
id="tspan4618"
|
||||||
|
@ -2608,7 +2609,7 @@
|
||||||
x="890.99316"
|
x="890.99316"
|
||||||
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:#179ab7;fill-opacity:1;stroke:none;stroke-width:0.75"
|
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:0.75"
|
||||||
xml:space="preserve"><tspan
|
xml:space="preserve"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.83483124px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1;stroke-width:0.75"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.8348px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1;stroke-width:0.75"
|
||||||
y="506.26898"
|
y="506.26898"
|
||||||
x="890.99316"
|
x="890.99316"
|
||||||
id="tspan4800"
|
id="tspan4800"
|
||||||
|
@ -2654,9 +2655,9 @@
|
||||||
id="QNH"
|
id="QNH"
|
||||||
y="775.94104"
|
y="775.94104"
|
||||||
x="887.71545"
|
x="887.71545"
|
||||||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
xml:space="preserve"><tspan
|
xml:space="preserve"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.75603485px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.756px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.657577"
|
||||||
y="775.94104"
|
y="775.94104"
|
||||||
x="887.71545"
|
x="887.71545"
|
||||||
id="tspan5024"
|
id="tspan5024"
|
||||||
|
@ -2673,7 +2674,7 @@
|
||||||
id="tspan977"
|
id="tspan977"
|
||||||
x="907.61713"
|
x="907.61713"
|
||||||
y="885.26117"
|
y="885.26117"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.39944839px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.75">1013</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.3994px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.75">1013</tspan></text>
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g
|
||||||
id="GS_scale"
|
id="GS_scale"
|
||||||
|
@ -2809,57 +2810,57 @@
|
||||||
id="tspan911"
|
id="tspan911"
|
||||||
x="898.703"
|
x="898.703"
|
||||||
y="289.66925"
|
y="289.66925"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.83641052px;line-height:94.99999881%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75"> </tspan><tspan
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.8364px;line-height:95%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75"> </tspan><tspan
|
||||||
id="tspan919"
|
id="tspan919"
|
||||||
sodipodi:role="line"
|
sodipodi:role="line"
|
||||||
x="898.703"
|
x="898.703"
|
||||||
y="317.73038"
|
y="317.73038"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.83641052px;line-height:87.00000048%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">40</tspan><tspan
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.8364px;line-height:87%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">40</tspan><tspan
|
||||||
id="tspan4300"
|
id="tspan4300"
|
||||||
sodipodi:role="line"
|
sodipodi:role="line"
|
||||||
x="898.703"
|
x="898.703"
|
||||||
y="344.55807"
|
y="344.55807"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.83641052px;line-height:87.00000048%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">20</tspan><tspan
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.8364px;line-height:87%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">20</tspan><tspan
|
||||||
id="tspan931"
|
id="tspan931"
|
||||||
sodipodi:role="line"
|
sodipodi:role="line"
|
||||||
x="898.703"
|
x="898.703"
|
||||||
y="371.38574"
|
y="371.38574"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.83641052px;line-height:87.00000048%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">00</tspan><tspan
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.8364px;line-height:87%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">00</tspan><tspan
|
||||||
id="tspan927"
|
id="tspan927"
|
||||||
sodipodi:role="line"
|
sodipodi:role="line"
|
||||||
x="898.703"
|
x="898.703"
|
||||||
y="398.21341"
|
y="398.21341"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.83641052px;line-height:87.00000048%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">80</tspan><tspan
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.8364px;line-height:87%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">80</tspan><tspan
|
||||||
id="tspan925"
|
id="tspan925"
|
||||||
sodipodi:role="line"
|
sodipodi:role="line"
|
||||||
x="898.703"
|
x="898.703"
|
||||||
y="425.04111"
|
y="425.04111"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.83641052px;line-height:87.00000048%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">60</tspan><tspan
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.8364px;line-height:87%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">60</tspan><tspan
|
||||||
id="tspan923"
|
id="tspan923"
|
||||||
sodipodi:role="line"
|
sodipodi:role="line"
|
||||||
x="898.703"
|
x="898.703"
|
||||||
y="451.86877"
|
y="451.86877"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.83641052px;line-height:87.00000048%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">40</tspan><tspan
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.8364px;line-height:87%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">40</tspan><tspan
|
||||||
id="tspan921"
|
id="tspan921"
|
||||||
sodipodi:role="line"
|
sodipodi:role="line"
|
||||||
x="898.703"
|
x="898.703"
|
||||||
y="478.69644"
|
y="478.69644"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.83641052px;line-height:87.00000048%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">20</tspan><tspan
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.8364px;line-height:87%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">20</tspan><tspan
|
||||||
id="tspan917"
|
id="tspan917"
|
||||||
sodipodi:role="line"
|
sodipodi:role="line"
|
||||||
x="898.703"
|
x="898.703"
|
||||||
y="505.52414"
|
y="505.52414"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.83641052px;line-height:87.00000048%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">00</tspan><tspan
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.8364px;line-height:87%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">00</tspan><tspan
|
||||||
id="tspan915"
|
id="tspan915"
|
||||||
sodipodi:role="line"
|
sodipodi:role="line"
|
||||||
x="898.703"
|
x="898.703"
|
||||||
y="532.35181"
|
y="532.35181"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.83641052px;line-height:87.00000048%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">80</tspan><tspan
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.8364px;line-height:87%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">80</tspan><tspan
|
||||||
id="tspan4302"
|
id="tspan4302"
|
||||||
sodipodi:role="line"
|
sodipodi:role="line"
|
||||||
x="898.703"
|
x="898.703"
|
||||||
y="559.1795"
|
y="559.1795"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.83641052px;line-height:87.00000048%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">60</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:30.8364px;line-height:87%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b;fill-opacity:1;stroke-width:0.75">60</tspan></text>
|
||||||
<text
|
<text
|
||||||
inkscape:label="#text975"
|
inkscape:label="#text975"
|
||||||
transform="scale(0.95383277,1.0484018)"
|
transform="scale(0.95383277,1.0484018)"
|
||||||
|
@ -2868,7 +2869,7 @@
|
||||||
x="890.99316"
|
x="890.99316"
|
||||||
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"
|
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"
|
||||||
xml:space="preserve"><tspan
|
xml:space="preserve"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.83483124px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke-width:0.75"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.8348px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke-width:0.75"
|
||||||
y="506.23941"
|
y="506.23941"
|
||||||
x="890.99316"
|
x="890.99316"
|
||||||
id="tspan973"
|
id="tspan973"
|
||||||
|
@ -2895,7 +2896,7 @@
|
||||||
<text
|
<text
|
||||||
inkscape:label="#text983"
|
inkscape:label="#text983"
|
||||||
xml:space="preserve"
|
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:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
x="1080.6229"
|
x="1080.6229"
|
||||||
y="34.635155"
|
y="34.635155"
|
||||||
id="FMA_ap"
|
id="FMA_ap"
|
||||||
|
@ -2904,16 +2905,16 @@
|
||||||
id="tspan4268"
|
id="tspan4268"
|
||||||
x="1080.6229"
|
x="1080.6229"
|
||||||
y="34.635155"
|
y="34.635155"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">AP 1+2</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.657577">AP 1+2</tspan></text>
|
||||||
<text
|
<text
|
||||||
transform="scale(0.87678236,1.1405339)"
|
transform="scale(0.87678236,1.1405339)"
|
||||||
id="FMA_fd"
|
id="FMA_fd"
|
||||||
y="74.709656"
|
y="74.709656"
|
||||||
x="1080.6229"
|
x="1080.6229"
|
||||||
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:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
inkscape:label="#text983"><tspan
|
inkscape:label="#text983"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.657577"
|
||||||
y="74.709656"
|
y="74.709656"
|
||||||
x="1080.6229"
|
x="1080.6229"
|
||||||
id="tspan4272"
|
id="tspan4272"
|
||||||
|
@ -2921,7 +2922,7 @@
|
||||||
<text
|
<text
|
||||||
inkscape:label="#text983"
|
inkscape:label="#text983"
|
||||||
xml:space="preserve"
|
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:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
x="1080.6229"
|
x="1080.6229"
|
||||||
y="115.05846"
|
y="115.05846"
|
||||||
id="FMA_athr"
|
id="FMA_athr"
|
||||||
|
@ -2930,16 +2931,16 @@
|
||||||
id="tspan4276"
|
id="tspan4276"
|
||||||
x="1080.6229"
|
x="1080.6229"
|
||||||
y="115.05846"
|
y="115.05846"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">A/THR</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.657577">A/THR</tspan></text>
|
||||||
<text
|
<text
|
||||||
transform="scale(0.87678236,1.1405339)"
|
transform="scale(0.87678236,1.1405339)"
|
||||||
id="FMA_catmode"
|
id="FMA_catmode"
|
||||||
y="34.635155"
|
y="34.635155"
|
||||||
x="874.48682"
|
x="874.48682"
|
||||||
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:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
inkscape:label="#text983"><tspan
|
inkscape:label="#text983"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.657577"
|
||||||
y="34.635155"
|
y="34.635155"
|
||||||
x="874.48682"
|
x="874.48682"
|
||||||
id="tspan4280"
|
id="tspan4280"
|
||||||
|
@ -2947,7 +2948,7 @@
|
||||||
<text
|
<text
|
||||||
inkscape:label="#text983"
|
inkscape:label="#text983"
|
||||||
xml:space="preserve"
|
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:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
x="874.48682"
|
x="874.48682"
|
||||||
y="74.709656"
|
y="74.709656"
|
||||||
id="FMA_cattype"
|
id="FMA_cattype"
|
||||||
|
@ -2956,16 +2957,16 @@
|
||||||
id="tspan4284"
|
id="tspan4284"
|
||||||
x="874.48682"
|
x="874.48682"
|
||||||
y="74.709656"
|
y="74.709656"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">DUAL</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.657577">DUAL</tspan></text>
|
||||||
<text
|
<text
|
||||||
transform="scale(0.87678236,1.1405339)"
|
transform="scale(0.87678236,1.1405339)"
|
||||||
id="FMA_nodh"
|
id="FMA_nodh"
|
||||||
y="115.05846"
|
y="115.05846"
|
||||||
x="874.48682"
|
x="874.48682"
|
||||||
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:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
inkscape:label="#text983"><tspan
|
inkscape:label="#text983"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.657577"
|
||||||
y="115.05846"
|
y="115.05846"
|
||||||
x="874.48682"
|
x="874.48682"
|
||||||
id="tspan4288"
|
id="tspan4288"
|
||||||
|
@ -3023,10 +3024,10 @@
|
||||||
id="FMA_thrust"
|
id="FMA_thrust"
|
||||||
y="34.635437"
|
y="34.635437"
|
||||||
x="123.23077"
|
x="123.23077"
|
||||||
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:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
inkscape:label="#text983"><tspan
|
inkscape:label="#text983"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577"
|
||||||
y="34.635437"
|
y="34.635437"
|
||||||
x="123.23077"
|
x="123.23077"
|
||||||
id="tspan981"
|
id="tspan981"
|
||||||
|
@ -3050,7 +3051,7 @@
|
||||||
<text
|
<text
|
||||||
inkscape:label="#text983"
|
inkscape:label="#text983"
|
||||||
xml:space="preserve"
|
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:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#0dc04b;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
x="505.48523"
|
x="505.48523"
|
||||||
y="34.635437"
|
y="34.635437"
|
||||||
id="FMA_combined"
|
id="FMA_combined"
|
||||||
|
@ -3059,7 +3060,7 @@
|
||||||
id="tspan4354"
|
id="tspan4354"
|
||||||
x="505.48523"
|
x="505.48523"
|
||||||
y="34.635437"
|
y="34.635437"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.65757734">FLARE</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577">FLARE</tspan></text>
|
||||||
<rect
|
<rect
|
||||||
inkscape:label="#rect4290"
|
inkscape:label="#rect4290"
|
||||||
y="7.4160867"
|
y="7.4160867"
|
||||||
|
@ -3071,7 +3072,7 @@
|
||||||
<text
|
<text
|
||||||
inkscape:label="#text983"
|
inkscape:label="#text983"
|
||||||
xml:space="preserve"
|
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:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#cecdce;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
x="826.09802"
|
x="826.09802"
|
||||||
y="115.05846"
|
y="115.05846"
|
||||||
id="FMA_dh"
|
id="FMA_dh"
|
||||||
|
@ -3080,16 +3081,16 @@
|
||||||
id="tspan4301"
|
id="tspan4301"
|
||||||
x="826.09802"
|
x="826.09802"
|
||||||
y="115.05846"
|
y="115.05846"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">DH</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.657577">DH</tspan></text>
|
||||||
<text
|
<text
|
||||||
transform="scale(0.87678236,1.1405339)"
|
transform="scale(0.87678236,1.1405339)"
|
||||||
id="FMA_dhn"
|
id="FMA_dhn"
|
||||||
y="115.05846"
|
y="115.05846"
|
||||||
x="922.034"
|
x="922.034"
|
||||||
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.65757734"
|
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.657577"
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
inkscape:label="#text983"><tspan
|
inkscape:label="#text983"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;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.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;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.657577"
|
||||||
y="115.05846"
|
y="115.05846"
|
||||||
x="922.034"
|
x="922.034"
|
||||||
id="tspan4305"
|
id="tspan4305"
|
||||||
|
@ -3107,10 +3108,10 @@
|
||||||
id="FMA_flxtemp"
|
id="FMA_flxtemp"
|
||||||
y="74.429558"
|
y="74.429558"
|
||||||
x="185.85408"
|
x="185.85408"
|
||||||
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.65757734"
|
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.657577"
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
inkscape:label="#text983"><tspan
|
inkscape:label="#text983"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;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.65757734"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;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.657577"
|
||||||
y="74.429558"
|
y="74.429558"
|
||||||
x="185.85408"
|
x="185.85408"
|
||||||
id="tspan4316"
|
id="tspan4316"
|
||||||
|
@ -3118,7 +3119,7 @@
|
||||||
<text
|
<text
|
||||||
inkscape:label="#text983"
|
inkscape:label="#text983"
|
||||||
xml:space="preserve"
|
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:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.65757734"
|
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:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.657577"
|
||||||
x="123.23077"
|
x="123.23077"
|
||||||
y="114.70684"
|
y="114.70684"
|
||||||
id="FMA_lvrclb"
|
id="FMA_lvrclb"
|
||||||
|
@ -3127,7 +3128,7 @@
|
||||||
id="tspan4294"
|
id="tspan4294"
|
||||||
x="123.23077"
|
x="123.23077"
|
||||||
y="114.70684"
|
y="114.70684"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.65757734">LVR CLB</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.657577">LVR CLB</tspan></text>
|
||||||
<g
|
<g
|
||||||
id="HDG_group"
|
id="HDG_group"
|
||||||
inkscape:label="#g4853">
|
inkscape:label="#g4853">
|
||||||
|
@ -4694,7 +4695,7 @@
|
||||||
id="tspan4664"
|
id="tspan4664"
|
||||||
x="69.848434"
|
x="69.848434"
|
||||||
y="835.1153"
|
y="835.1153"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.83483124px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">000</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.8348px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">000</tspan></text>
|
||||||
<text
|
<text
|
||||||
inkscape:label="#text975"
|
inkscape:label="#text975"
|
||||||
transform="scale(0.95383277,1.0484018)"
|
transform="scale(0.95383277,1.0484018)"
|
||||||
|
@ -4703,7 +4704,7 @@
|
||||||
x="51.798809"
|
x="51.798809"
|
||||||
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"
|
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"
|
||||||
xml:space="preserve"><tspan
|
xml:space="preserve"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.83483124px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1;stroke-width:0.75"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.8348px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1;stroke-width:0.75"
|
||||||
y="835.1153"
|
y="835.1153"
|
||||||
x="51.798809"
|
x="51.798809"
|
||||||
id="tspan4668"
|
id="tspan4668"
|
||||||
|
@ -4770,9 +4771,9 @@
|
||||||
id="text4384-2"
|
id="text4384-2"
|
||||||
y="505.46484"
|
y="505.46484"
|
||||||
x="118.56967"
|
x="118.56967"
|
||||||
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:#f80000;fill-opacity:1;stroke:none;stroke-width:0.75;"
|
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:end;letter-spacing:0px;word-spacing:0px;text-anchor:end;fill:#f80000;fill-opacity:1;stroke:none;stroke-width:0.75"
|
||||||
xml:space="preserve"><tspan
|
xml:space="preserve"><tspan
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#f80000;fill-opacity:1;stroke-width:0.75;"
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#f80000;fill-opacity:1;stroke-width:0.75"
|
||||||
y="505.46484"
|
y="505.46484"
|
||||||
x="118.56967"
|
x="118.56967"
|
||||||
id="tspan4386-4"
|
id="tspan4386-4"
|
||||||
|
@ -4877,19 +4878,19 @@
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#ff0000;fill-opacity:1;stroke-width:0.75">MACH</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#ff0000;fill-opacity:1;stroke-width:0.75">MACH</tspan></text>
|
||||||
<text
|
<text
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
style="font-style:normal;font-weight:normal;font-size:30px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:0.75;"
|
style="font-style:normal;font-weight:normal;font-size:30px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:0.75"
|
||||||
x="667.37634"
|
x="658.3515"
|
||||||
y="855.60309"
|
y="792.62469"
|
||||||
id="ilsError"
|
id="ilsError"
|
||||||
inkscape:label="#text1608"><tspan
|
inkscape:label="#text1608"><tspan
|
||||||
sodipodi:role="line"
|
sodipodi:role="line"
|
||||||
id="tspan773"
|
id="tspan773"
|
||||||
x="667.37634"
|
x="658.3515"
|
||||||
y="855.60309"
|
y="792.62469"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#bb6100;fill-opacity:1;stroke-width:0.75;">ILS</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#bb6100;fill-opacity:1;stroke-width:0.75">ILS</tspan></text>
|
||||||
<text
|
<text
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
style="font-style:normal;font-weight:normal;font-size:38.98999884px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.75;"
|
style="font-style:normal;font-weight:normal;font-size:38.99px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.75"
|
||||||
x="34.684372"
|
x="34.684372"
|
||||||
y="935.95209"
|
y="935.95209"
|
||||||
id="ils_code"><tspan
|
id="ils_code"><tspan
|
||||||
|
@ -4897,10 +4898,10 @@
|
||||||
id="tspan978"
|
id="tspan978"
|
||||||
x="34.684372"
|
x="34.684372"
|
||||||
y="935.95209"
|
y="935.95209"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.98999884px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#b055be;fill-opacity:1;stroke-width:0.75;">ILS</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.99px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#b055be;fill-opacity:1;stroke-width:0.75">ILS</tspan></text>
|
||||||
<text
|
<text
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
style="font-style:normal;font-weight:normal;font-size:38.98999884px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.75;"
|
style="font-style:normal;font-weight:normal;font-size:38.99px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.75"
|
||||||
x="34.684372"
|
x="34.684372"
|
||||||
y="974.72784"
|
y="974.72784"
|
||||||
id="ils_freq"><tspan
|
id="ils_freq"><tspan
|
||||||
|
@ -4908,10 +4909,10 @@
|
||||||
id="tspan979"
|
id="tspan979"
|
||||||
x="34.684372"
|
x="34.684372"
|
||||||
y="974.72784"
|
y="974.72784"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.98999884px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#b055be;fill-opacity:1;stroke-width:0.75;">000.00</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.99px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#b055be;fill-opacity:1;stroke-width:0.75">000.00</tspan></text>
|
||||||
<text
|
<text
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
style="font-style:normal;font-weight:normal;font-size:38.98999884px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.75;"
|
style="font-style:normal;font-weight:normal;font-size:38.99px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.75"
|
||||||
x="34.684372"
|
x="34.684372"
|
||||||
y="1013.5292"
|
y="1013.5292"
|
||||||
id="dme_dist"><tspan
|
id="dme_dist"><tspan
|
||||||
|
@ -4919,10 +4920,10 @@
|
||||||
id="tspan780"
|
id="tspan780"
|
||||||
x="34.684372"
|
x="34.684372"
|
||||||
y="1013.5292"
|
y="1013.5292"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.98999884px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#b055be;fill-opacity:1;stroke-width:0.75;">0.0</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.99px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#b055be;fill-opacity:1;stroke-width:0.75">0.0</tspan></text>
|
||||||
<text
|
<text
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
style="font-style:normal;font-weight:normal;font-size:30.00000191px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:0.75"
|
style="font-style:normal;font-weight:normal;font-size:30px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:0.75"
|
||||||
x="116.45473"
|
x="116.45473"
|
||||||
y="1014.0706"
|
y="1014.0706"
|
||||||
id="dme_dist_legend"
|
id="dme_dist_legend"
|
||||||
|
@ -4932,4 +4933,90 @@
|
||||||
x="116.45473"
|
x="116.45473"
|
||||||
y="1014.0706"
|
y="1014.0706"
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#179ab7;fill-opacity:1;stroke-width:0.75">NM</tspan></text>
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#179ab7;fill-opacity:1;stroke-width:0.75">NM</tspan></text>
|
||||||
|
<g
|
||||||
|
id="ILS_HDG_L"
|
||||||
|
inkscape:label="#g4757"
|
||||||
|
transform="translate(6.4446604,0.08043884)">
|
||||||
|
<rect
|
||||||
|
y="970.26117"
|
||||||
|
x="170.52216"
|
||||||
|
height="43.153526"
|
||||||
|
width="70.482529"
|
||||||
|
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||||
|
id="rect791" />
|
||||||
|
<text
|
||||||
|
id="ILS_left"
|
||||||
|
y="960.26117"
|
||||||
|
x="216.52216"
|
||||||
|
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:#b055be;fill-opacity:1;stroke:none;stroke-width:0.75"
|
||||||
|
xml:space="preserve"
|
||||||
|
transform="scale(0.95383278,1.0484018)"
|
||||||
|
inkscape:label="#text979"><tspan
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#b055be;fill-opacity:1;stroke-width:0.75"
|
||||||
|
y="960.26117"
|
||||||
|
x="216.52216"
|
||||||
|
id="tspan793"
|
||||||
|
sodipodi:role="line">000</tspan></text>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="ILS_HDG_R"
|
||||||
|
inkscape:label="#g4757"
|
||||||
|
transform="translate(-4.971921,0.08077669)">
|
||||||
|
<rect
|
||||||
|
y="970.26117"
|
||||||
|
x="653.07788"
|
||||||
|
height="43.153526"
|
||||||
|
width="70.482529"
|
||||||
|
style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke"
|
||||||
|
id="rect797" />
|
||||||
|
<text
|
||||||
|
id="ILS_right"
|
||||||
|
y="960.26117"
|
||||||
|
x="722.07782"
|
||||||
|
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:#b055be;fill-opacity:1;stroke:none;stroke-width:0.75"
|
||||||
|
xml:space="preserve"
|
||||||
|
transform="scale(0.95383278,1.0484018)"
|
||||||
|
inkscape:label="#text979"><tspan
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#b055be;fill-opacity:1;stroke-width:0.75"
|
||||||
|
y="960.26117"
|
||||||
|
x="722.07782"
|
||||||
|
id="tspan799"
|
||||||
|
sodipodi:role="line">000</tspan></text>
|
||||||
|
</g>
|
||||||
|
<text
|
||||||
|
inkscape:label="#text1608"
|
||||||
|
id="middleMarker"
|
||||||
|
y="792.14221"
|
||||||
|
x="652.33966"
|
||||||
|
style="font-style:normal;font-weight:normal;font-size:30px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:0.75"
|
||||||
|
xml:space="preserve"><tspan
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#bb6100;fill-opacity:1;stroke-width:0.75"
|
||||||
|
y="792.14221"
|
||||||
|
x="652.33966"
|
||||||
|
id="tspan773-3"
|
||||||
|
sodipodi:role="line">MM</tspan></text>
|
||||||
|
<text
|
||||||
|
inkscape:label="#text1608"
|
||||||
|
id="outerMarker"
|
||||||
|
y="792.1355"
|
||||||
|
x="654.69263"
|
||||||
|
style="font-style:normal;font-weight:normal;font-size:30px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:0.75"
|
||||||
|
xml:space="preserve"><tspan
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#179ab7;fill-opacity:1;stroke-width:0.75"
|
||||||
|
y="792.1355"
|
||||||
|
x="654.69263"
|
||||||
|
id="tspan773-9"
|
||||||
|
sodipodi:role="line">OM</tspan></text>
|
||||||
|
<text
|
||||||
|
xml:space="preserve"
|
||||||
|
style="font-style:normal;font-weight:normal;font-size:30px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.75"
|
||||||
|
x="625.49036"
|
||||||
|
y="792.17651"
|
||||||
|
id="innerMarker"
|
||||||
|
inkscape:label="#text1608"><tspan
|
||||||
|
sodipodi:role="line"
|
||||||
|
id="tspan773-9-9"
|
||||||
|
x="625.49036"
|
||||||
|
y="792.17651"
|
||||||
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#ffffff;fill-opacity:1;stroke-width:0.75">IM</tspan></text>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 284 KiB |
|
@ -135,8 +135,8 @@
|
||||||
<object-name>engine_fire_1</object-name>
|
<object-name>engine_fire_1</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<or>
|
<or>
|
||||||
<property>/systems/fire/engine1/warning-active</property>
|
<property>systems/fire/engine1/warning-active</property>
|
||||||
<property>/controls/switches/annun-test</property>
|
<property>controls/switches/annun-test</property>
|
||||||
</or>
|
</or>
|
||||||
</condition>
|
</condition>
|
||||||
</animation>
|
</animation>
|
||||||
|
@ -164,8 +164,8 @@
|
||||||
<object-name>engine_fire_2</object-name>
|
<object-name>engine_fire_2</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<or>
|
<or>
|
||||||
<property>/systems/fire/engine2/warning-active</property>
|
<property>systems/fire/engine2/warning-active</property>
|
||||||
<property>/controls/switches/annun-test</property>
|
<property>controls/switches/annun-test</property>
|
||||||
</or>
|
</or>
|
||||||
</condition>
|
</condition>
|
||||||
</animation>
|
</animation>
|
||||||
|
@ -397,7 +397,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>atc.transponderPanel.atcSwitch(getprop("/controls/atc/system-knob") + 1);</script>
|
<script>atc.transponderPanel.atcSwitch(getprop("controls/atc/system-knob") + 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
@ -437,7 +437,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>atc.transponderPanel.modeSwitch(getprop("/controls/atc/mode-knob") + 1);</script>
|
<script>atc.transponderPanel.modeSwitch(getprop("controls/atc/mode-knob") + 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
<action>
|
<action>
|
||||||
|
@ -454,7 +454,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>atc.transponderPanel.modeSwitch(getprop("/controls/atc/mode-knob") + 1);</script>
|
<script>atc.transponderPanel.modeSwitch(getprop("controls/atc/mode-knob") + 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
|
@ -1090,7 +1090,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/oh-cover", 1);</script>
|
<script>setprop("sim/sounde/oh-cover", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</mod-up>
|
</mod-up>
|
||||||
</action>
|
</action>
|
||||||
|
|
|
@ -1090,7 +1090,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
<binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>setprop("/sim/sounde/oh-cover", 1);</script>
|
<script>setprop("sim/sounde/oh-cover", 1);</script>
|
||||||
</binding>
|
</binding>
|
||||||
</mod-up>
|
</mod-up>
|
||||||
</action>
|
</action>
|
||||||
|
|
|
@ -34,70 +34,70 @@ var du3_test_amount = props.globals.initNode("/instrumentation/du/du3-test-amoun
|
||||||
var du3_offtime = props.globals.initNode("/instrumentation/du/du3-off-time", 0.0, "DOUBLE");
|
var du3_offtime = props.globals.initNode("/instrumentation/du/du3-off-time", 0.0, "DOUBLE");
|
||||||
|
|
||||||
# Fetch nodes:
|
# Fetch nodes:
|
||||||
var acconfig_weight_kgs = props.globals.getNode("/systems/acconfig/options/weight-kgs", 1);
|
var acconfig_weight_kgs = props.globals.getNode("systems/acconfig/options/weight-kgs", 1);
|
||||||
var et = props.globals.getNode("/sim/time/elapsed-sec", 1);
|
var et = props.globals.getNode("sim/time/elapsed-sec", 1);
|
||||||
var acconfig = props.globals.getNode("/systems/acconfig/autoconfig-running", 1);
|
var acconfig = props.globals.getNode("systems/acconfig/autoconfig-running", 1);
|
||||||
var acess = props.globals.getNode("/systems/electrical/bus/ac-ess", 1);
|
var acess = props.globals.getNode("systems/electrical/bus/ac-ess", 1);
|
||||||
var eng_option = props.globals.getNode("/options/eng", 1);
|
var eng_option = props.globals.getNode("options/eng", 1);
|
||||||
var du3_lgt = props.globals.getNode("/controls/lighting/DU/du3", 1);
|
var du3_lgt = props.globals.getNode("controls/lighting/DU/du3", 1);
|
||||||
var rev_1 = props.globals.getNode("/engines/engine[0]/reverser-pos-norm", 1);
|
var rev_1 = props.globals.getNode("engines/engine[0]/reverser-pos-norm", 1);
|
||||||
var rev_2 = props.globals.getNode("/engines/engine[1]/reverser-pos-norm", 1);
|
var rev_2 = props.globals.getNode("engines/engine[1]/reverser-pos-norm", 1);
|
||||||
var eng1_n1mode = props.globals.getNode("/systems/fadec/eng1/n1", 1);
|
var eng1_n1mode = props.globals.getNode("systems/fadec/eng1/n1", 1);
|
||||||
var eng1_eprmode = props.globals.getNode("/systems/fadec/eng1/epr", 1);
|
var eng1_eprmode = props.globals.getNode("systems/fadec/eng1/epr", 1);
|
||||||
var eng2_n1mode = props.globals.getNode("/systems/fadec/eng2/n1", 1);
|
var eng2_n1mode = props.globals.getNode("systems/fadec/eng2/n1", 1);
|
||||||
var eng2_eprmode = props.globals.getNode("/systems/fadec/eng2/epr", 1);
|
var eng2_eprmode = props.globals.getNode("systems/fadec/eng2/epr", 1);
|
||||||
var eng1_n2mode = props.globals.getNode("/systems/fadec/eng1/n2", 1);
|
var eng1_n2mode = props.globals.getNode("systems/fadec/eng1/n2", 1);
|
||||||
var eng2_n2mode = props.globals.getNode("/systems/fadec/eng2/n2", 1);
|
var eng2_n2mode = props.globals.getNode("systems/fadec/eng2/n2", 1);
|
||||||
var flap_text = props.globals.getNode("/controls/flight/flap-txt", 1);
|
var flap_text = props.globals.getNode("controls/flight/flap-txt", 1);
|
||||||
var flap_pos = props.globals.getNode("/controls/flight/flap-pos", 1);
|
var flap_pos = props.globals.getNode("controls/flight/flap-pos", 1);
|
||||||
var fuel = props.globals.getNode("/consumables/fuel/total-fuel-lbs", 1);
|
var fuel = props.globals.getNode("consumables/fuel/total-fuel-lbs", 1);
|
||||||
var modeautobrake = props.globals.getNode("/controls/autobrake/mode", 1);
|
var modeautobrake = props.globals.getNode("controls/autobrake/mode", 1);
|
||||||
var speedbrakearm = props.globals.getNode("/controls/flight/speedbrake-arm", 1);
|
var speedbrakearm = props.globals.getNode("controls/flight/speedbrake-arm", 1);
|
||||||
var ECAMtoconfig = props.globals.getNode("/ECAM/to-config", 1);
|
var ECAMtoconfig = props.globals.getNode("ECAM/to-config", 1);
|
||||||
var gear = props.globals.getNode("/gear/gear[1]/position-norm", 1);
|
var gear = props.globals.getNode("gear/gear[1]/position-norm", 1);
|
||||||
var smoke = props.globals.getNode("/controls/lighting/no-smoking-sign", 1);
|
var smoke = props.globals.getNode("controls/lighting/no-smoking-sign", 1);
|
||||||
var seatbelt = props.globals.getNode("/controls/lighting/seatbelt-sign", 1);
|
var seatbelt = props.globals.getNode("controls/lighting/seatbelt-sign", 1);
|
||||||
var flaps3_ovr = props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override", 1);
|
var flaps3_ovr = props.globals.getNode("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override", 1);
|
||||||
var wow0 = props.globals.getNode("/gear/gear[0]/wow");
|
var wow0 = props.globals.getNode("gear/gear[0]/wow");
|
||||||
var eng1_n1 = props.globals.getNode("/engines/engine[0]/n1-actual", 1);
|
var eng1_n1 = props.globals.getNode("engines/engine[0]/n1-actual", 1);
|
||||||
var eng2_n1 = props.globals.getNode("/engines/engine[1]/n1-actual", 1);
|
var eng2_n1 = props.globals.getNode("engines/engine[1]/n1-actual", 1);
|
||||||
var eng1_n2 = props.globals.getNode("/engines/engine[0]/n2-actual", 1);
|
var eng1_n2 = props.globals.getNode("engines/engine[0]/n2-actual", 1);
|
||||||
var eng2_n2 = props.globals.getNode("/engines/engine[1]/n2-actual", 1);
|
var eng2_n2 = props.globals.getNode("engines/engine[1]/n2-actual", 1);
|
||||||
var eng1_epr = props.globals.getNode("/engines/engine[0]/epr-actual", 1);
|
var eng1_epr = props.globals.getNode("engines/engine[0]/epr-actual", 1);
|
||||||
var eng2_epr = props.globals.getNode("/engines/engine[1]/epr-actual", 1);
|
var eng2_epr = props.globals.getNode("engines/engine[1]/epr-actual", 1);
|
||||||
var eng1_egt = props.globals.getNode("/engines/engine[0]/egt-actual", 1);
|
var eng1_egt = props.globals.getNode("engines/engine[0]/egt-actual", 1);
|
||||||
var eng2_egt = props.globals.getNode("/engines/engine[1]/egt-actual", 1);
|
var eng2_egt = props.globals.getNode("engines/engine[1]/egt-actual", 1);
|
||||||
var eng1_egtmode = props.globals.getNode("/systems/fadec/eng1/egt", 1);
|
var eng1_egtmode = props.globals.getNode("systems/fadec/eng1/egt", 1);
|
||||||
var eng2_egtmode = props.globals.getNode("/systems/fadec/eng2/egt", 1);
|
var eng2_egtmode = props.globals.getNode("systems/fadec/eng2/egt", 1);
|
||||||
var eng1_ffmode = props.globals.getNode("/systems/fadec/eng1/ff", 1);
|
var eng1_ffmode = props.globals.getNode("systems/fadec/eng1/ff", 1);
|
||||||
var eng2_ffmode = props.globals.getNode("/systems/fadec/eng2/ff", 1);
|
var eng2_ffmode = props.globals.getNode("systems/fadec/eng2/ff", 1);
|
||||||
var fadecpower_1 = props.globals.getNode("/systems/fadec/powered1", 1);
|
var fadecpower_1 = props.globals.getNode("systems/fadec/powered1", 1);
|
||||||
var fadecpower_2 = props.globals.getNode("/systems/fadec/powered2", 1);
|
var fadecpower_2 = props.globals.getNode("systems/fadec/powered2", 1);
|
||||||
var fadecpowerup = props.globals.getNode("/systems/fadec/powerup", 1);
|
var fadecpowerup = props.globals.getNode("systems/fadec/powerup", 1);
|
||||||
var thr_limit = props.globals.getNode("/controls/engines/thrust-limit", 1);
|
var thr_limit = props.globals.getNode("controls/engines/thrust-limit", 1);
|
||||||
var n1_limit = props.globals.getNode("/controls/engines/n1-limit", 1);
|
var n1_limit = props.globals.getNode("controls/engines/n1-limit", 1);
|
||||||
var epr_limit = props.globals.getNode("/controls/engines/epr-limit", 1);
|
var epr_limit = props.globals.getNode("controls/engines/epr-limit", 1);
|
||||||
var n1mode1 = props.globals.getNode("/systems/fadec/n1mode1", 1);
|
var n1mode1 = props.globals.getNode("systems/fadec/n1mode1", 1);
|
||||||
var n1mode2 = props.globals.getNode("/systems/fadec/n1mode2", 1);
|
var n1mode2 = props.globals.getNode("systems/fadec/n1mode2", 1);
|
||||||
var ECAM_line1 = props.globals.getNode("/ECAM/msg/line1", 1);
|
var ECAM_line1 = props.globals.getNode("ECAM/msg/line1", 1);
|
||||||
var ECAM_line2 = props.globals.getNode("/ECAM/msg/line2", 1);
|
var ECAM_line2 = props.globals.getNode("ECAM/msg/line2", 1);
|
||||||
var ECAM_line3 = props.globals.getNode("/ECAM/msg/line3", 1);
|
var ECAM_line3 = props.globals.getNode("ECAM/msg/line3", 1);
|
||||||
var ECAM_line4 = props.globals.getNode("/ECAM/msg/line4", 1);
|
var ECAM_line4 = props.globals.getNode("ECAM/msg/line4", 1);
|
||||||
var ECAM_line5 = props.globals.getNode("/ECAM/msg/line5", 1);
|
var ECAM_line5 = props.globals.getNode("ECAM/msg/line5", 1);
|
||||||
var ECAM_line6 = props.globals.getNode("/ECAM/msg/line6", 1);
|
var ECAM_line6 = props.globals.getNode("ECAM/msg/line6", 1);
|
||||||
var ECAM_line7 = props.globals.getNode("/ECAM/msg/line7", 1);
|
var ECAM_line7 = props.globals.getNode("ECAM/msg/line7", 1);
|
||||||
var ECAM_line8 = props.globals.getNode("/ECAM/msg/line8", 1);
|
var ECAM_line8 = props.globals.getNode("ECAM/msg/line8", 1);
|
||||||
var ECAM_line1c = props.globals.getNode("/ECAM/msg/linec1", 1);
|
var ECAM_line1c = props.globals.getNode("ECAM/msg/linec1", 1);
|
||||||
var ECAM_line2c = props.globals.getNode("/ECAM/msg/linec2", 1);
|
var ECAM_line2c = props.globals.getNode("ECAM/msg/linec2", 1);
|
||||||
var ECAM_line3c = props.globals.getNode("/ECAM/msg/linec3", 1);
|
var ECAM_line3c = props.globals.getNode("ECAM/msg/linec3", 1);
|
||||||
var ECAM_line4c = props.globals.getNode("/ECAM/msg/linec4", 1);
|
var ECAM_line4c = props.globals.getNode("ECAM/msg/linec4", 1);
|
||||||
var ECAM_line5c = props.globals.getNode("/ECAM/msg/linec5", 1);
|
var ECAM_line5c = props.globals.getNode("ECAM/msg/linec5", 1);
|
||||||
var ECAM_line6c = props.globals.getNode("/ECAM/msg/linec6", 1);
|
var ECAM_line6c = props.globals.getNode("ECAM/msg/linec6", 1);
|
||||||
var ECAM_line7c = props.globals.getNode("/ECAM/msg/linec7", 1);
|
var ECAM_line7c = props.globals.getNode("ECAM/msg/linec7", 1);
|
||||||
var ECAM_line8c = props.globals.getNode("/ECAM/msg/linec8", 1);
|
var ECAM_line8c = props.globals.getNode("ECAM/msg/linec8", 1);
|
||||||
var ECAMleft = props.globals.getNode("/ECAM/left-msg", 1);
|
var ECAMleft = props.globals.getNode("ECAM/left-msg", 1);
|
||||||
var ECAMright = props.globals.getNode("/ECAM/right-msg", 1);
|
var ECAMright = props.globals.getNode("ECAM/right-msg", 1);
|
||||||
var rate = props.globals.getNode("/systems/acconfig/options/uecam-rate", 1);
|
var rate = props.globals.getNode("systems/acconfig/options/uecam-rate", 1);
|
||||||
|
|
||||||
var canvas_upperECAM_base = {
|
var canvas_upperECAM_base = {
|
||||||
init: func(canvas_group, file) {
|
init: func(canvas_group, file) {
|
||||||
|
@ -473,124 +473,124 @@ var canvas_upperECAM_base = {
|
||||||
|
|
||||||
# Right ECAM Messages
|
# Right ECAM Messages
|
||||||
if (rightmsg == "MSG") {
|
if (rightmsg == "MSG") {
|
||||||
me["ECAMR1"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line1")));
|
me["ECAMR1"].setText(sprintf("%s", getprop("ECAM/rightmsg/line1")));
|
||||||
me["ECAMR2"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line2")));
|
me["ECAMR2"].setText(sprintf("%s", getprop("ECAM/rightmsg/line2")));
|
||||||
me["ECAMR3"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line3")));
|
me["ECAMR3"].setText(sprintf("%s", getprop("ECAM/rightmsg/line3")));
|
||||||
me["ECAMR4"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line4")));
|
me["ECAMR4"].setText(sprintf("%s", getprop("ECAM/rightmsg/line4")));
|
||||||
me["ECAMR5"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line5")));
|
me["ECAMR5"].setText(sprintf("%s", getprop("ECAM/rightmsg/line5")));
|
||||||
me["ECAMR6"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line6")));
|
me["ECAMR6"].setText(sprintf("%s", getprop("ECAM/rightmsg/line6")));
|
||||||
me["ECAMR7"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line7")));
|
me["ECAMR7"].setText(sprintf("%s", getprop("ECAM/rightmsg/line7")));
|
||||||
me["ECAMR8"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line8")));
|
me["ECAMR8"].setText(sprintf("%s", getprop("ECAM/rightmsg/line8")));
|
||||||
|
|
||||||
if (getprop("/ECAM/rightmsg/linec1") == "w") {
|
if (getprop("ECAM/rightmsg/linec1") == "w") {
|
||||||
me["ECAMR1"].setColor(0.8078,0.8039,0.8078);
|
me["ECAMR1"].setColor(0.8078,0.8039,0.8078);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec1") == "c") {
|
} else if (getprop("ECAM/rightmsg/linec1") == "c") {
|
||||||
me["ECAMR1"].setColor(0.0901,0.6039,0.7176);
|
me["ECAMR1"].setColor(0.0901,0.6039,0.7176);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec1") == "g") {
|
} else if (getprop("ECAM/rightmsg/linec1") == "g") {
|
||||||
me["ECAMR1"].setColor(0.0509,0.7529,0.2941);
|
me["ECAMR1"].setColor(0.0509,0.7529,0.2941);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec1") == "a") {
|
} else if (getprop("ECAM/rightmsg/linec1") == "a") {
|
||||||
me["ECAMR1"].setColor(0.7333,0.3803,0);
|
me["ECAMR1"].setColor(0.7333,0.3803,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec1") == "r") {
|
} else if (getprop("ECAM/rightmsg/linec1") == "r") {
|
||||||
me["ECAMR1"].setColor(1,0,0);
|
me["ECAMR1"].setColor(1,0,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec1") == "m") {
|
} else if (getprop("ECAM/rightmsg/linec1") == "m") {
|
||||||
me["ECAMR1"].setColor(0.6901,0.3333,0.7450);
|
me["ECAMR1"].setColor(0.6901,0.3333,0.7450);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/ECAM/rightmsg/linec2") == "w") {
|
if (getprop("ECAM/rightmsg/linec2") == "w") {
|
||||||
me["ECAMR2"].setColor(0.8078,0.8039,0.8078);
|
me["ECAMR2"].setColor(0.8078,0.8039,0.8078);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec2") == "c") {
|
} else if (getprop("ECAM/rightmsg/linec2") == "c") {
|
||||||
me["ECAMR2"].setColor(0.0901,0.6039,0.7176);
|
me["ECAMR2"].setColor(0.0901,0.6039,0.7176);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec2") == "g") {
|
} else if (getprop("ECAM/rightmsg/linec2") == "g") {
|
||||||
me["ECAMR2"].setColor(0.0509,0.7529,0.2941);
|
me["ECAMR2"].setColor(0.0509,0.7529,0.2941);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec2") == "a") {
|
} else if (getprop("ECAM/rightmsg/linec2") == "a") {
|
||||||
me["ECAMR2"].setColor(0.7333,0.3803,0);
|
me["ECAMR2"].setColor(0.7333,0.3803,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec2") == "r") {
|
} else if (getprop("ECAM/rightmsg/linec2") == "r") {
|
||||||
me["ECAMR2"].setColor(1,0,0);
|
me["ECAMR2"].setColor(1,0,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec2") == "m") {
|
} else if (getprop("ECAM/rightmsg/linec2") == "m") {
|
||||||
me["ECAMR2"].setColor(0.6901,0.3333,0.7450);
|
me["ECAMR2"].setColor(0.6901,0.3333,0.7450);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/ECAM/rightmsg/linec3") == "w") {
|
if (getprop("ECAM/rightmsg/linec3") == "w") {
|
||||||
me["ECAMR3"].setColor(0.8078,0.8039,0.8078);
|
me["ECAMR3"].setColor(0.8078,0.8039,0.8078);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec3") == "c") {
|
} else if (getprop("ECAM/rightmsg/linec3") == "c") {
|
||||||
me["ECAMR3"].setColor(0.0901,0.6039,0.7176);
|
me["ECAMR3"].setColor(0.0901,0.6039,0.7176);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec3") == "g") {
|
} else if (getprop("ECAM/rightmsg/linec3") == "g") {
|
||||||
me["ECAMR3"].setColor(0.0509,0.7529,0.2941);
|
me["ECAMR3"].setColor(0.0509,0.7529,0.2941);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec3") == "a") {
|
} else if (getprop("ECAM/rightmsg/linec3") == "a") {
|
||||||
me["ECAMR3"].setColor(0.7333,0.3803,0);
|
me["ECAMR3"].setColor(0.7333,0.3803,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec3") == "r") {
|
} else if (getprop("ECAM/rightmsg/linec3") == "r") {
|
||||||
me["ECAMR3"].setColor(1,0,0);
|
me["ECAMR3"].setColor(1,0,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec3") == "m") {
|
} else if (getprop("ECAM/rightmsg/linec3") == "m") {
|
||||||
me["ECAMR3"].setColor(0.6901,0.3333,0.7450);
|
me["ECAMR3"].setColor(0.6901,0.3333,0.7450);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/ECAM/rightmsg/linec4") == "w") {
|
if (getprop("ECAM/rightmsg/linec4") == "w") {
|
||||||
me["ECAMR4"].setColor(0.8078,0.8039,0.8078);
|
me["ECAMR4"].setColor(0.8078,0.8039,0.8078);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec4") == "c") {
|
} else if (getprop("ECAM/rightmsg/linec4") == "c") {
|
||||||
me["ECAMR4"].setColor(0.0901,0.6039,0.7176);
|
me["ECAMR4"].setColor(0.0901,0.6039,0.7176);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec4") == "g") {
|
} else if (getprop("ECAM/rightmsg/linec4") == "g") {
|
||||||
me["ECAMR4"].setColor(0.0509,0.7529,0.2941);
|
me["ECAMR4"].setColor(0.0509,0.7529,0.2941);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec4") == "a") {
|
} else if (getprop("ECAM/rightmsg/linec4") == "a") {
|
||||||
me["ECAMR4"].setColor(0.7333,0.3803,0);
|
me["ECAMR4"].setColor(0.7333,0.3803,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec4") == "r") {
|
} else if (getprop("ECAM/rightmsg/linec4") == "r") {
|
||||||
me["ECAMR4"].setColor(1,0,0);
|
me["ECAMR4"].setColor(1,0,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec4") == "m") {
|
} else if (getprop("ECAM/rightmsg/linec4") == "m") {
|
||||||
me["ECAMR4"].setColor(0.6901,0.3333,0.7450);
|
me["ECAMR4"].setColor(0.6901,0.3333,0.7450);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/ECAM/rightmsg/linec5") == "w") {
|
if (getprop("ECAM/rightmsg/linec5") == "w") {
|
||||||
me["ECAMR5"].setColor(0.8078,0.8039,0.8078);
|
me["ECAMR5"].setColor(0.8078,0.8039,0.8078);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec5") == "c") {
|
} else if (getprop("ECAM/rightmsg/linec5") == "c") {
|
||||||
me["ECAMR5"].setColor(0.0901,0.6039,0.7176);
|
me["ECAMR5"].setColor(0.0901,0.6039,0.7176);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec5") == "g") {
|
} else if (getprop("ECAM/rightmsg/linec5") == "g") {
|
||||||
me["ECAMR5"].setColor(0.0509,0.7529,0.2941);
|
me["ECAMR5"].setColor(0.0509,0.7529,0.2941);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec5") == "a") {
|
} else if (getprop("ECAM/rightmsg/linec5") == "a") {
|
||||||
me["ECAMR5"].setColor(0.7333,0.3803,0);
|
me["ECAMR5"].setColor(0.7333,0.3803,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec5") == "r") {
|
} else if (getprop("ECAM/rightmsg/linec5") == "r") {
|
||||||
me["ECAMR5"].setColor(1,0,0);
|
me["ECAMR5"].setColor(1,0,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec5") == "m") {
|
} else if (getprop("ECAM/rightmsg/linec5") == "m") {
|
||||||
me["ECAMR5"].setColor(0.6901,0.3333,0.7450);
|
me["ECAMR5"].setColor(0.6901,0.3333,0.7450);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/ECAM/rightmsg/linec6") == "w") {
|
if (getprop("ECAM/rightmsg/linec6") == "w") {
|
||||||
me["ECAMR6"].setColor(0.8078,0.8039,0.8078);
|
me["ECAMR6"].setColor(0.8078,0.8039,0.8078);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec6") == "c") {
|
} else if (getprop("ECAM/rightmsg/linec6") == "c") {
|
||||||
me["ECAMR6"].setColor(0.0901,0.6039,0.7176);
|
me["ECAMR6"].setColor(0.0901,0.6039,0.7176);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec6") == "g") {
|
} else if (getprop("ECAM/rightmsg/linec6") == "g") {
|
||||||
me["ECAMR6"].setColor(0.0509,0.7529,0.2941);
|
me["ECAMR6"].setColor(0.0509,0.7529,0.2941);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec6") == "a") {
|
} else if (getprop("ECAM/rightmsg/linec6") == "a") {
|
||||||
me["ECAMR6"].setColor(0.7333,0.3803,0);
|
me["ECAMR6"].setColor(0.7333,0.3803,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec6") == "r") {
|
} else if (getprop("ECAM/rightmsg/linec6") == "r") {
|
||||||
me["ECAMR6"].setColor(1,0,0);
|
me["ECAMR6"].setColor(1,0,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec6") == "m") {
|
} else if (getprop("ECAM/rightmsg/linec6") == "m") {
|
||||||
me["ECAMR6"].setColor(0.6901,0.3333,0.7450);
|
me["ECAMR6"].setColor(0.6901,0.3333,0.7450);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/ECAM/rightmsg/linec7") == "w") {
|
if (getprop("ECAM/rightmsg/linec7") == "w") {
|
||||||
me["ECAMR7"].setColor(0.8078,0.8039,0.8078);
|
me["ECAMR7"].setColor(0.8078,0.8039,0.8078);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec7") == "c") {
|
} else if (getprop("ECAM/rightmsg/linec7") == "c") {
|
||||||
me["ECAMR7"].setColor(0.0901,0.6039,0.7176);
|
me["ECAMR7"].setColor(0.0901,0.6039,0.7176);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec7") == "g") {
|
} else if (getprop("ECAM/rightmsg/linec7") == "g") {
|
||||||
me["ECAMR7"].setColor(0.0509,0.7529,0.2941);
|
me["ECAMR7"].setColor(0.0509,0.7529,0.2941);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec7") == "a") {
|
} else if (getprop("ECAM/rightmsg/linec7") == "a") {
|
||||||
me["ECAMR7"].setColor(0.7333,0.3803,0);
|
me["ECAMR7"].setColor(0.7333,0.3803,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec7") == "r") {
|
} else if (getprop("ECAM/rightmsg/linec7") == "r") {
|
||||||
me["ECAMR7"].setColor(1,0,0);
|
me["ECAMR7"].setColor(1,0,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec7") == "m") {
|
} else if (getprop("ECAM/rightmsg/linec7") == "m") {
|
||||||
me["ECAMR7"].setColor(0.6901,0.3333,0.7450);
|
me["ECAMR7"].setColor(0.6901,0.3333,0.7450);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/ECAM/rightmsg/linec8") == "w") {
|
if (getprop("ECAM/rightmsg/linec8") == "w") {
|
||||||
me["ECAMR8"].setColor(0.8078,0.8039,0.8078);
|
me["ECAMR8"].setColor(0.8078,0.8039,0.8078);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec8") == "c") {
|
} else if (getprop("ECAM/rightmsg/linec8") == "c") {
|
||||||
me["ECAMR8"].setColor(0.0901,0.6039,0.7176);
|
me["ECAMR8"].setColor(0.0901,0.6039,0.7176);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec8") == "g") {
|
} else if (getprop("ECAM/rightmsg/linec8") == "g") {
|
||||||
me["ECAMR8"].setColor(0.0509,0.7529,0.2941);
|
me["ECAMR8"].setColor(0.0509,0.7529,0.2941);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec8") == "a") {
|
} else if (getprop("ECAM/rightmsg/linec8") == "a") {
|
||||||
me["ECAMR8"].setColor(0.7333,0.3803,0);
|
me["ECAMR8"].setColor(0.7333,0.3803,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec8") == "r") {
|
} else if (getprop("ECAM/rightmsg/linec8") == "r") {
|
||||||
me["ECAMR8"].setColor(1,0,0);
|
me["ECAMR8"].setColor(1,0,0);
|
||||||
} else if (getprop("/ECAM/rightmsg/linec8") == "m") {
|
} else if (getprop("ECAM/rightmsg/linec8") == "m") {
|
||||||
me["ECAMR8"].setColor(0.6901,0.3333,0.7450);
|
me["ECAMR8"].setColor(0.6901,0.3333,0.7450);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<object-name>Light</object-name>
|
<object-name>Light</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<equals>
|
||||||
<property>/sim/model/lights/nav-lights</property>
|
<property>sim/model/lights/nav-lights</property>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</equals>
|
</equals>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</greater-than-equals>
|
</greater-than-equals>
|
||||||
</or>
|
</or>
|
||||||
<greater-than-equals>
|
<greater-than-equals>
|
||||||
<property>/sim/model/lights/nose-lights</property>
|
<property>sim/model/lights/nose-lights</property>
|
||||||
<value>0.5</value>
|
<value>0.5</value>
|
||||||
</greater-than-equals>
|
</greater-than-equals>
|
||||||
<equals>
|
<equals>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<object-name>Light</object-name>
|
<object-name>Light</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<equals>
|
||||||
<property>/sim/model/lights/nav-lights</property>
|
<property>sim/model/lights/nav-lights</property>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</equals>
|
</equals>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<object-name>Light</object-name>
|
<object-name>Light</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<equals>
|
||||||
<property>/sim/model/lights/nav-lights</property>
|
<property>sim/model/lights/nav-lights</property>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</equals>
|
</equals>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<object-name>fan</object-name>
|
<object-name>fan</object-name>
|
||||||
<object-name>holder</object-name>
|
<object-name>holder</object-name>
|
||||||
<condition>
|
<condition>
|
||||||
<property>/systems/hydraulic/sources/rat/position</property>
|
<property>systems/hydraulic/sources/rat/position</property>
|
||||||
</condition>
|
</condition>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ var _unitconv = M2FT / 3.6;
|
||||||
var _debug = nil;
|
var _debug = nil;
|
||||||
|
|
||||||
var _loop = func() {
|
var _loop = func() {
|
||||||
if (!getprop("/sim/model/autopush/available")) {
|
if (!getprop("sim/model/autopush/available")) {
|
||||||
_stop();
|
_stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -35,11 +35,11 @@ var _loop = func() {
|
||||||
var y = 0.0;
|
var y = 0.0;
|
||||||
var z = 0.0;
|
var z = 0.0;
|
||||||
# Rollspeed is only adequate if the wheel is touching the ground.
|
# Rollspeed is only adequate if the wheel is touching the ground.
|
||||||
if (getprop("/gear/gear[0]/wow")) {
|
if (getprop("gear/gear[0]/wow")) {
|
||||||
var V = getprop("/gear/gear[0]/rollspeed-ms") * 3.6;
|
var V = getprop("gear/gear[0]/rollspeed-ms") * 3.6;
|
||||||
var deltaV = getprop("/sim/model/autopush/target-speed-km_h") - V;
|
var deltaV = getprop("sim/model/autopush/target-speed-km_h") - V;
|
||||||
var minus_dV = _V - V;
|
var minus_dV = _V - V;
|
||||||
var time = getprop("/sim/time/elapsed-sec");
|
var time = getprop("sim/time/elapsed-sec");
|
||||||
var prop = math.min(math.max(_K_p * deltaV, -_F_p), _F_p);
|
var prop = math.min(math.max(_K_p * deltaV, -_F_p), _F_p);
|
||||||
var dt = time - _time;
|
var dt = time - _time;
|
||||||
var deriv = 0.0;
|
var deriv = 0.0;
|
||||||
|
@ -59,28 +59,28 @@ var _loop = func() {
|
||||||
_V = V;
|
_V = V;
|
||||||
_time = time;
|
_time = time;
|
||||||
if (!_yasim) {
|
if (!_yasim) {
|
||||||
force = accel * getprop("/fdm/jsbsim/inertia/weight-lbs") * _unitconv;
|
force = accel * getprop("fdm/jsbsim/inertia/weight-lbs") * _unitconv;
|
||||||
} else {
|
} else {
|
||||||
force = accel * getprop("/fdm/yasim/gross-weight-lbs") * _unitconv;
|
force = accel * getprop("fdm/yasim/gross-weight-lbs") * _unitconv;
|
||||||
}
|
}
|
||||||
var pitch = getprop("/sim/model/autopush/pitch-deg") * D2R;
|
var pitch = getprop("sim/model/autopush/pitch-deg") * D2R;
|
||||||
z = math.sin(pitch);
|
z = math.sin(pitch);
|
||||||
var pz = math.cos(pitch);
|
var pz = math.cos(pitch);
|
||||||
var yaw = getprop("/sim/model/autopush/yaw") * _K_yaw;
|
var yaw = getprop("sim/model/autopush/yaw") * _K_yaw;
|
||||||
x = math.cos(yaw) * pz;
|
x = math.cos(yaw) * pz;
|
||||||
y = math.sin(yaw) * pz;
|
y = math.sin(yaw) * pz;
|
||||||
setprop("/sim/model/autopush/force-x", x);
|
setprop("sim/model/autopush/force-x", x);
|
||||||
setprop("/sim/model/autopush/force-y", y);
|
setprop("sim/model/autopush/force-y", y);
|
||||||
# JSBSim force's z is down.
|
# JSBSim force's z is down.
|
||||||
setprop("/sim/model/autopush/force-z", -z);
|
setprop("sim/model/autopush/force-z", -z);
|
||||||
}
|
}
|
||||||
setprop("/sim/model/autopush/force-lbf", force);
|
setprop("sim/model/autopush/force-lbf", force);
|
||||||
if (_yasim) {
|
if (_yasim) {
|
||||||
# The force is divided by YASim thrust="100000.0" setting.
|
# The force is divided by YASim thrust="100000.0" setting.
|
||||||
setprop("/sim/model/autopush/force-x-yasim", x * force * 0.00001);
|
setprop("sim/model/autopush/force-x-yasim", x * force * 0.00001);
|
||||||
# YASim force's y is to the left.
|
# YASim force's y is to the left.
|
||||||
setprop("/sim/model/autopush/force-y-yasim", -y * force * 0.00001);
|
setprop("sim/model/autopush/force-y-yasim", -y * force * 0.00001);
|
||||||
setprop("/sim/model/autopush/force-z-yasim", z * force * 0.00001);
|
setprop("sim/model/autopush/force-z-yasim", z * force * 0.00001);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,26 +89,26 @@ var _timer = maketimer(0.0167, func{_loop()});
|
||||||
var _start = func() {
|
var _start = func() {
|
||||||
# Else overwritten by dialog.
|
# Else overwritten by dialog.
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
setprop("/sim/model/autopush/target-speed-km_h", 0.0)
|
setprop("sim/model/autopush/target-speed-km_h", 0.0)
|
||||||
}, 0.1);
|
}, 0.1);
|
||||||
_K_p = getprop("/sim/model/autopush/K_p");
|
_K_p = getprop("sim/model/autopush/K_p");
|
||||||
_F_p = getprop("/sim/model/autopush/F_p");
|
_F_p = getprop("sim/model/autopush/F_p");
|
||||||
_K_i = getprop("/sim/model/autopush/K_i");
|
_K_i = getprop("sim/model/autopush/K_i");
|
||||||
_F_i = getprop("/sim/model/autopush/F_i");
|
_F_i = getprop("sim/model/autopush/F_i");
|
||||||
_K_d = getprop("/sim/model/autopush/K_d");
|
_K_d = getprop("sim/model/autopush/K_d");
|
||||||
_F_d = getprop("/sim/model/autopush/F_d");
|
_F_d = getprop("sim/model/autopush/F_d");
|
||||||
_F = getprop("/sim/model/autopush/F");
|
_F = getprop("sim/model/autopush/F");
|
||||||
_T_f = getprop("/sim/model/autopush/T_f");
|
_T_f = getprop("sim/model/autopush/T_f");
|
||||||
_K_yaw = getprop("/sim/model/autopush/yaw-mult") * D2R;
|
_K_yaw = getprop("sim/model/autopush/yaw-mult") * D2R;
|
||||||
_yasim = (getprop("/sim/flight-model") == "yasim");
|
_yasim = (getprop("sim/flight-model") == "yasim");
|
||||||
_debug = getprop("/sim/model/autopush/debug") or 0;
|
_debug = getprop("sim/model/autopush/debug") or 0;
|
||||||
_int = 0.0;
|
_int = 0.0;
|
||||||
_V = 0.0;
|
_V = 0.0;
|
||||||
_time = getprop("/sim/time/elapsed-sec");
|
_time = getprop("sim/time/elapsed-sec");
|
||||||
setprop("/sim/model/autopush/connected", 1);
|
setprop("sim/model/autopush/connected", 1);
|
||||||
if (!_timer.isRunning) {
|
if (!_timer.isRunning) {
|
||||||
if (getprop("/sim/model/autopush/chocks")) {
|
if (getprop("sim/model/autopush/chocks")) {
|
||||||
setprop("/sim/model/autopush/chocks", 0);
|
setprop("sim/model/autopush/chocks", 0);
|
||||||
screen.log.write("(pushback): Pushback connected, chocks removed. Please release brakes.");
|
screen.log.write("(pushback): Pushback connected, chocks removed. Please release brakes.");
|
||||||
} else {
|
} else {
|
||||||
screen.log.write("(pushback): Pushback connected, please release brakes.");
|
screen.log.write("(pushback): Pushback connected, please release brakes.");
|
||||||
|
@ -122,18 +122,18 @@ var _stop = func() {
|
||||||
screen.log.write("(pushback): Pushback and bypass pin removed.");
|
screen.log.write("(pushback): Pushback and bypass pin removed.");
|
||||||
}
|
}
|
||||||
_timer.stop();
|
_timer.stop();
|
||||||
setprop("/sim/model/autopush/force-lbf", 0.0);
|
setprop("sim/model/autopush/force-lbf", 0.0);
|
||||||
if (_yasim) {
|
if (_yasim) {
|
||||||
setprop("/sim/model/autopush/force-x-yasim", 0.0);
|
setprop("sim/model/autopush/force-x-yasim", 0.0);
|
||||||
setprop("/sim/model/autopush/force-y-yasim", 0.0);
|
setprop("sim/model/autopush/force-y-yasim", 0.0);
|
||||||
}
|
}
|
||||||
setprop("/sim/model/autopush/connected", 0);
|
setprop("sim/model/autopush/connected", 0);
|
||||||
setprop("/sim/model/autopush/enabled", 0);
|
setprop("sim/model/autopush/enabled", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/sim/model/autopush/enabled", func(p) {
|
setlistener("/sim/model/autopush/enabled", func(p) {
|
||||||
var enabled = p.getValue();
|
var enabled = p.getValue();
|
||||||
if ((enabled) and getprop("/sim/model/autopush/available")) {
|
if ((enabled) and getprop("sim/model/autopush/available")) {
|
||||||
_start();
|
_start();
|
||||||
} else {
|
} else {
|
||||||
_stop();
|
_stop();
|
||||||
|
|
|
@ -46,7 +46,7 @@ var _advance_wp = func(flip_sign = 0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var _loop = func() {
|
var _loop = func() {
|
||||||
if (!getprop("/sim/model/autopush/connected")) {
|
if (!getprop("sim/model/autopush/connected")) {
|
||||||
stop();
|
stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -54,9 +54,9 @@ var _loop = func() {
|
||||||
D *= NM2M;
|
D *= NM2M;
|
||||||
var (psi_leg, D_leg) = courseAndDistance(_route[_to_wp - 1], _route[_to_wp]);
|
var (psi_leg, D_leg) = courseAndDistance(_route[_to_wp - 1], _route[_to_wp]);
|
||||||
var deltapsi = geo.normdeg180(A - psi_leg);
|
var deltapsi = geo.normdeg180(A - psi_leg);
|
||||||
var psi = getprop("/orientation/heading-deg") + _push * 180.0;
|
var psi = getprop("orientation/heading-deg") + _push * 180.0;
|
||||||
var deltaA = math.min(math.max(_K_psi * geo.normdeg180(A - psi), -_F_psi), _F_psi);
|
var deltaA = math.min(math.max(_K_psi * geo.normdeg180(A - psi), -_F_psi), _F_psi);
|
||||||
var time = getprop("/sim/time/elapsed-sec");
|
var time = getprop("sim/time/elapsed-sec");
|
||||||
var dt = time - _time;
|
var dt = time - _time;
|
||||||
var minus_psidot = (dt > 0.002) * math.min(math.max(_K_psidot * (_psi - psi) / dt, -_F_psidot), _F_psidot);
|
var minus_psidot = (dt > 0.002) * math.min(math.max(_K_psidot * (_psi - psi) / dt, -_F_psidot), _F_psidot);
|
||||||
_psi = psi;
|
_psi = psi;
|
||||||
|
@ -83,8 +83,8 @@ var _loop = func() {
|
||||||
if (_debug > 1) {
|
if (_debug > 1) {
|
||||||
print("autopush_driver to_wp " ~ _to_wp ~ ", A " ~ geo.normdeg(A) ~ ", deltaA " ~ deltaA ~ ", minus_psidot " ~ minus_psidot);
|
print("autopush_driver to_wp " ~ _to_wp ~ ", A " ~ geo.normdeg(A) ~ ", deltaA " ~ deltaA ~ ", minus_psidot " ~ minus_psidot);
|
||||||
}
|
}
|
||||||
setprop("/sim/model/autopush/target-speed-km_h", _sign * V);
|
setprop("sim/model/autopush/target-speed-km_h", _sign * V);
|
||||||
setprop("/sim/model/autopush/steer-cmd-norm", steering);
|
setprop("sim/model/autopush/steer-cmd-norm", steering);
|
||||||
}
|
}
|
||||||
|
|
||||||
var _timer = maketimer(0.051, func{_loop()});
|
var _timer = maketimer(0.051, func{_loop()});
|
||||||
|
@ -100,7 +100,7 @@ var start = func() {
|
||||||
gui.popupTip("Already moving");
|
gui.popupTip("Already moving");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!getprop("/sim/model/autopush/connected")) {
|
if (!getprop("sim/model/autopush/connected")) {
|
||||||
gui.popupTip("Pushback not connected");
|
gui.popupTip("Pushback not connected");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -112,23 +112,23 @@ var start = func() {
|
||||||
} else {
|
} else {
|
||||||
autopush_route.done();
|
autopush_route.done();
|
||||||
}
|
}
|
||||||
_K_V = getprop("/sim/model/autopush/driver/K_V");
|
_K_V = getprop("sim/model/autopush/driver/K_V");
|
||||||
_F_V = getprop("/sim/model/autopush/driver/F_V");
|
_F_V = getprop("sim/model/autopush/driver/F_V");
|
||||||
_R_turn_min = getprop("/sim/model/autopush/min-turn-radius-m");
|
_R_turn_min = getprop("sim/model/autopush/min-turn-radius-m");
|
||||||
_D_stop = getprop("/sim/model/autopush/stopping-distance-m");
|
_D_stop = getprop("sim/model/autopush/stopping-distance-m");
|
||||||
_K_psi = getprop("/sim/model/autopush/driver/K_psi");
|
_K_psi = getprop("sim/model/autopush/driver/K_psi");
|
||||||
_F_psi = getprop("/sim/model/autopush/driver/F_psi");
|
_F_psi = getprop("sim/model/autopush/driver/F_psi");
|
||||||
_K_psidot = getprop("/sim/model/autopush/driver/K_psidot");
|
_K_psidot = getprop("sim/model/autopush/driver/K_psidot");
|
||||||
_F_psidot = getprop("/sim/model/autopush/driver/F_psidot");
|
_F_psidot = getprop("sim/model/autopush/driver/F_psidot");
|
||||||
_debug = getprop("/sim/model/autopush/debug") or 0;
|
_debug = getprop("sim/model/autopush/debug") or 0;
|
||||||
if (!_to_wp) {
|
if (!_to_wp) {
|
||||||
var (psi_park, D_park) = courseAndDistance(_route[0], _route[1]);
|
var (psi_park, D_park) = courseAndDistance(_route[0], _route[1]);
|
||||||
_push = (abs(geo.normdeg180(getprop("/orientation/heading-deg") - psi_park)) > 90.0);
|
_push = (abs(geo.normdeg180(getprop("orientation/heading-deg") - psi_park)) > 90.0);
|
||||||
_sign = 1.0 - 2.0 * _push;
|
_sign = 1.0 - 2.0 * _push;
|
||||||
_advance_wp();
|
_advance_wp();
|
||||||
_psi = 0.0;
|
_psi = 0.0;
|
||||||
}
|
}
|
||||||
_time = getprop("/sim/time/elapsed-sec");
|
_time = getprop("sim/time/elapsed-sec");
|
||||||
_timer.start();
|
_timer.start();
|
||||||
var endsign = _sign;
|
var endsign = _sign;
|
||||||
for (ii = _to_wp; ii < size(_route_reverse); ii += 1) {
|
for (ii = _to_wp; ii < size(_route_reverse); ii += 1) {
|
||||||
|
@ -146,7 +146,7 @@ var start = func() {
|
||||||
|
|
||||||
var pause = func() {
|
var pause = func() {
|
||||||
_timer.stop();
|
_timer.stop();
|
||||||
setprop("/sim/model/autopush/target-speed-km_h", 0.0);
|
setprop("sim/model/autopush/target-speed-km_h", 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
var stop = func() {
|
var stop = func() {
|
||||||
|
|
|
@ -29,7 +29,7 @@ var _R_turn_min = 0;
|
||||||
var _invalid = 0;
|
var _invalid = 0;
|
||||||
|
|
||||||
# Make top-down view point north in old FG.
|
# Make top-down view point north in old FG.
|
||||||
var __fg_version = num(string.replace(getprop("/sim/version/flightgear"),".",""));
|
var __fg_version = num(string.replace(getprop("sim/version/flightgear"),".",""));
|
||||||
if (__fg_version < 201920) {
|
if (__fg_version < 201920) {
|
||||||
_top_view_heading_offset_deg = 94.5;
|
_top_view_heading_offset_deg = 94.5;
|
||||||
}
|
}
|
||||||
|
@ -144,14 +144,14 @@ var top_view = func() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_top_view_index = view.indexof("Chase View Without Yaw");
|
_top_view_index = view.indexof("Chase View Without Yaw");
|
||||||
_reset_view_index = getprop("/sim/current-view/view-number");
|
_reset_view_index = getprop("sim/current-view/view-number");
|
||||||
setprop("/sim/current-view/view-number", _top_view_index);
|
setprop("sim/current-view/view-number", _top_view_index);
|
||||||
_view_pitch_offset_deg = getprop("/sim/current-view/pitch-offset-deg");
|
_view_pitch_offset_deg = getprop("sim/current-view/pitch-offset-deg");
|
||||||
_view_heading_offset_deg = getprop("/sim/current-view/heading-offset-deg");
|
_view_heading_offset_deg = getprop("sim/current-view/heading-offset-deg");
|
||||||
_view_z_offset = getprop("/sim/current-view/z-offset-m");
|
_view_z_offset = getprop("sim/current-view/z-offset-m");
|
||||||
setprop("/sim/current-view/z-offset-m", -500.0);
|
setprop("sim/current-view/z-offset-m", -500.0);
|
||||||
setprop("/sim/current-view/heading-offset-deg", _top_view_heading_offset_deg);
|
setprop("sim/current-view/heading-offset-deg", _top_view_heading_offset_deg);
|
||||||
setprop("/sim/current-view/pitch-offset-deg", 90.0);
|
setprop("sim/current-view/pitch-offset-deg", 90.0);
|
||||||
_view_listener = setlistener("/sim/current-view/name", func {
|
_view_listener = setlistener("/sim/current-view/name", func {
|
||||||
_finalize_top_view();
|
_finalize_top_view();
|
||||||
}, 0, 0);
|
}, 0, 0);
|
||||||
|
@ -164,11 +164,11 @@ var _finalize_top_view = func() {
|
||||||
removelistener(_view_listener);
|
removelistener(_view_listener);
|
||||||
_view_listener = nil;
|
_view_listener = nil;
|
||||||
# Go back to the view to restore settings, in case user has switched away.
|
# Go back to the view to restore settings, in case user has switched away.
|
||||||
setprop("/sim/current-view/view-number", _top_view_index);
|
setprop("sim/current-view/view-number", _top_view_index);
|
||||||
setprop("/sim/current-view/z-offset-m", _view_z_offset);
|
setprop("sim/current-view/z-offset-m", _view_z_offset);
|
||||||
setprop("/sim/current-view/heading-offset-deg", _view_heading_offset_deg);
|
setprop("sim/current-view/heading-offset-deg", _view_heading_offset_deg);
|
||||||
setprop("/sim/current-view/pitch-offset-deg", _view_pitch_offset_deg);
|
setprop("sim/current-view/pitch-offset-deg", _view_pitch_offset_deg);
|
||||||
setprop("/sim/current-view/view-number", _reset_view_index);
|
setprop("sim/current-view/view-number", _reset_view_index);
|
||||||
if (!_show) {
|
if (!_show) {
|
||||||
_clear_user_point_models();
|
_clear_user_point_models();
|
||||||
_clear_waypoint_models();
|
_clear_waypoint_models();
|
||||||
|
@ -330,7 +330,7 @@ var _check_turn_radius = func() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setprop("/sim/model/autopush/route/invalid", _invalid);
|
setprop("sim/model/autopush/route/invalid", _invalid);
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/sim/model/autopush/route/show", func(p) {
|
setlistener("/sim/model/autopush/route/show", func(p) {
|
||||||
|
@ -351,7 +351,7 @@ setlistener("/sim/model/autopush/route/show", func(p) {
|
||||||
var enter = func() {
|
var enter = func() {
|
||||||
clear();
|
clear();
|
||||||
top_view();
|
top_view();
|
||||||
_R_turn_min = getprop("/sim/model/autopush/min-turn-radius-m");
|
_R_turn_min = getprop("sim/model/autopush/min-turn-radius-m");
|
||||||
var wp = geo.aircraft_position();
|
var wp = geo.aircraft_position();
|
||||||
var H = geo.elevation(wp.lat(), wp.lon());
|
var H = geo.elevation(wp.lat(), wp.lon());
|
||||||
if (H != nil) {
|
if (H != nil) {
|
||||||
|
@ -362,17 +362,17 @@ var enter = func() {
|
||||||
_add(geo.click_position());
|
_add(geo.click_position());
|
||||||
});
|
});
|
||||||
# This property can be overridden manually, if needed.
|
# This property can be overridden manually, if needed.
|
||||||
var wingspan = getprop("/sim/model/autopush/route/wingspan-m");
|
var wingspan = getprop("sim/model/autopush/route/wingspan-m");
|
||||||
if ((wingspan == nil) or (wingspan == 0.0)) {
|
if ((wingspan == nil) or (wingspan == 0.0)) {
|
||||||
# JSBSim
|
# JSBSim
|
||||||
wingspan = getprop("/fdm/jsbsim/metrics/bw-ft");
|
wingspan = getprop("fdm/jsbsim/metrics/bw-ft");
|
||||||
if (wingspan != nil) {
|
if (wingspan != nil) {
|
||||||
wingspan *= FT2M;
|
wingspan *= FT2M;
|
||||||
} else {
|
} else {
|
||||||
# YAsim
|
# YAsim
|
||||||
wingspan = getprop("/fdm/yasim/model/wings/wing/wing-span");
|
wingspan = getprop("fdm/yasim/model/wings/wing/wing-span");
|
||||||
}
|
}
|
||||||
setprop("/sim/model/autopush/route/wingspan-m", wingspan);
|
setprop("sim/model/autopush/route/wingspan-m", wingspan);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,13 +9,13 @@ var DMC = {
|
||||||
|
|
||||||
activeADIRS: -9,
|
activeADIRS: -9,
|
||||||
|
|
||||||
airspeeds: [props.globals.getNode("/systems/navigation/adr/output/cas-1", 1), props.globals.getNode("/systems/navigation/adr/output/cas-2", 1), props.globals.getNode("/systems/navigation/adr/output/cas-3", 1)],
|
airspeeds: [props.globals.getNode("systems/navigation/adr/output/cas-1", 1), props.globals.getNode("systems/navigation/adr/output/cas-2", 1), props.globals.getNode("systems/navigation/adr/output/cas-3", 1)],
|
||||||
altitudes: [props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-1-capt", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-2-capt", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-3-capt", 1)],
|
altitudes: [props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-1-capt", 1), props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-2-capt", 1), props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-3-capt", 1)],
|
||||||
machs: [props.globals.getNode("/systems/navigation/adr/output/mach-1", 1), props.globals.getNode("/systems/navigation/adr/output/mach-2", 1), props.globals.getNode("/systems/navigation/adr/output/mach-3", 1)],
|
machs: [props.globals.getNode("systems/navigation/adr/output/mach-1", 1), props.globals.getNode("systems/navigation/adr/output/mach-2", 1), props.globals.getNode("systems/navigation/adr/output/mach-3", 1)],
|
||||||
altitudesPfd: [props.globals.getNode("/instrumentation/altimeter[0]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[1]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[2]/indicated-altitude-ft-pfd", 1)],
|
altitudesPfd: [props.globals.getNode("instrumentation/altimeter[0]/indicated-altitude-ft-pfd", 1), props.globals.getNode("instrumentation/altimeter[1]/indicated-altitude-ft-pfd", 1), props.globals.getNode("instrumentation/altimeter[2]/indicated-altitude-ft-pfd", 1)],
|
||||||
sats: [props.globals.getNode("/systems/navigation/adr/output/sat-1", 1), props.globals.getNode("/systems/navigation/adr/output/sat-2", 1), props.globals.getNode("/systems/navigation/adr/output/sat-3", 1)],
|
sats: [props.globals.getNode("systems/navigation/adr/output/sat-1", 1), props.globals.getNode("systems/navigation/adr/output/sat-2", 1), props.globals.getNode("systems/navigation/adr/output/sat-3", 1)],
|
||||||
tats: [props.globals.getNode("/systems/navigation/adr/output/tat-1", 1), props.globals.getNode("/systems/navigation/adr/output/tat-2", 1), props.globals.getNode("/systems/navigation/adr/output/tat-3", 1)],
|
tats: [props.globals.getNode("systems/navigation/adr/output/tat-1", 1), props.globals.getNode("systems/navigation/adr/output/tat-2", 1), props.globals.getNode("systems/navigation/adr/output/tat-3", 1)],
|
||||||
trends: [props.globals.getNode("/instrumentation/pfd/speed-lookahead-1", 1), props.globals.getNode("/instrumentation/pfd/speed-lookahead-2", 1), props.globals.getNode("/instrumentation/pfd/speed-lookahead-3", 1)],
|
trends: [props.globals.getNode("instrumentation/pfd/speed-lookahead-1", 1), props.globals.getNode("instrumentation/pfd/speed-lookahead-2", 1), props.globals.getNode("instrumentation/pfd/speed-lookahead-3", 1)],
|
||||||
outputs: [nil, nil, nil, nil, nil, nil, nil], # airspeed, altitude, mach, pfd altitude, sat, tat, speed trend
|
outputs: [nil, nil, nil, nil, nil, nil, nil], # airspeed, altitude, mach, pfd altitude, sat, tat, speed trend
|
||||||
|
|
||||||
new: func(num) {
|
new: func(num) {
|
||||||
|
@ -74,8 +74,8 @@ var DMController = {
|
||||||
me.DMCs = [DMC.new(0), DMC.new(1), DMC.new(2)];
|
me.DMCs = [DMC.new(0), DMC.new(1), DMC.new(2)];
|
||||||
|
|
||||||
# update DMC2 to correct properties for first officer PFD
|
# update DMC2 to correct properties for first officer PFD
|
||||||
me.DMCs[1].altitudes = [props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-1-fo", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-2-fo", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-3-fo", 1)];
|
me.DMCs[1].altitudes = [props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-1-fo", 1), props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-2-fo", 1), props.globals.getNode("systems/navigation/adr/output/baro-alt-corrected-3-fo", 1)];
|
||||||
me.DMCs[1].altitudesPfd = [props.globals.getNode("/instrumentation/altimeter[3]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[4]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[5]/indicated-altitude-ft-pfd", 1)];
|
me.DMCs[1].altitudesPfd = [props.globals.getNode("instrumentation/altimeter[3]/indicated-altitude-ft-pfd", 1), props.globals.getNode("instrumentation/altimeter[4]/indicated-altitude-ft-pfd", 1), props.globals.getNode("instrumentation/altimeter[5]/indicated-altitude-ft-pfd", 1)];
|
||||||
|
|
||||||
me._init = 1;
|
me._init = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
# A3XX Electronic Centralised Aircraft Monitoring System
|
# A3XX Electronic Centralised Aircraft Monitoring System
|
||||||
# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
|
# Copyright (c) 2019 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 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)];
|
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)];
|
||||||
var rightLines = [props.globals.getNode("/ECAM/rightmsg/line1", 1), props.globals.getNode("/ECAM/rightmsg/line2", 1), props.globals.getNode("/ECAM/rightmsg/line3", 1), props.globals.getNode("/ECAM/rightmsg/line4", 1), props.globals.getNode("/ECAM/rightmsg/line5", 1), props.globals.getNode("/ECAM/rightmsg/line6", 1), props.globals.getNode("/ECAM/rightmsg/line7", 1), props.globals.getNode("/ECAM/rightmsg/line8", 1)];
|
var rightLines = [props.globals.getNode("ECAM/rightmsg/line1", 1), props.globals.getNode("ECAM/rightmsg/line2", 1), props.globals.getNode("ECAM/rightmsg/line3", 1), props.globals.getNode("ECAM/rightmsg/line4", 1), props.globals.getNode("ECAM/rightmsg/line5", 1), props.globals.getNode("ECAM/rightmsg/line6", 1), props.globals.getNode("ECAM/rightmsg/line7", 1), props.globals.getNode("ECAM/rightmsg/line8", 1)];
|
||||||
var rightLinesCol = [props.globals.getNode("/ECAM/rightmsg/linec1", 1), props.globals.getNode("/ECAM/rightmsg/linec2", 1), props.globals.getNode("/ECAM/rightmsg/linec3", 1), props.globals.getNode("/ECAM/rightmsg/linec4", 1), props.globals.getNode("/ECAM/rightmsg/linec5", 1), props.globals.getNode("/ECAM/rightmsg/linec6", 1), props.globals.getNode("/ECAM/rightmsg/linec7", 1), props.globals.getNode("/ECAM/rightmsg/linec8", 1)];
|
var rightLinesCol = [props.globals.getNode("ECAM/rightmsg/linec1", 1), props.globals.getNode("ECAM/rightmsg/linec2", 1), props.globals.getNode("ECAM/rightmsg/linec3", 1), props.globals.getNode("ECAM/rightmsg/linec4", 1), props.globals.getNode("ECAM/rightmsg/linec5", 1), props.globals.getNode("ECAM/rightmsg/linec6", 1), props.globals.getNode("ECAM/rightmsg/linec7", 1), props.globals.getNode("ECAM/rightmsg/linec8", 1)];
|
||||||
var statusLines = [props.globals.getNode("/ECAM/status/line1", 1), props.globals.getNode("/ECAM/status/line2", 1), props.globals.getNode("/ECAM/status/line3", 1), props.globals.getNode("/ECAM/status/line4", 1), props.globals.getNode("/ECAM/status/line5", 1), props.globals.getNode("/ECAM/status/line6", 1), props.globals.getNode("/ECAM/status/line7", 1), props.globals.getNode("/ECAM/status/line8", 1)];
|
var statusLines = [props.globals.getNode("ECAM/status/line1", 1), props.globals.getNode("ECAM/status/line2", 1), props.globals.getNode("ECAM/status/line3", 1), props.globals.getNode("ECAM/status/line4", 1), props.globals.getNode("ECAM/status/line5", 1), props.globals.getNode("ECAM/status/line6", 1), props.globals.getNode("ECAM/status/line7", 1), props.globals.getNode("ECAM/status/line8", 1)];
|
||||||
var statusLinesCol = [props.globals.getNode("/ECAM/status/linec1", 1), props.globals.getNode("/ECAM/status/linec2", 1), props.globals.getNode("/ECAM/status/linec3", 1), props.globals.getNode("/ECAM/status/linec4", 1), props.globals.getNode("/ECAM/status/linec5", 1), props.globals.getNode("/ECAM/status/linec6", 1), props.globals.getNode("/ECAM/status/linec7", 1), props.globals.getNode("/ECAM/status/linec8", 1)];
|
var statusLinesCol = [props.globals.getNode("ECAM/status/linec1", 1), props.globals.getNode("ECAM/status/linec2", 1), props.globals.getNode("ECAM/status/linec3", 1), props.globals.getNode("ECAM/status/linec4", 1), props.globals.getNode("ECAM/status/linec5", 1), props.globals.getNode("ECAM/status/linec6", 1), props.globals.getNode("ECAM/status/linec7", 1), props.globals.getNode("ECAM/status/linec8", 1)];
|
||||||
|
|
||||||
var leftOverflow = props.globals.initNode("/ECAM/warnings/overflow-left", 0, "BOOL");
|
var leftOverflow = props.globals.initNode("/ECAM/warnings/overflow-left", 0, "BOOL");
|
||||||
var rightOverflow = props.globals.initNode("/ECAM/warnings/overflow-right", 0, "BOOL");
|
var rightOverflow = props.globals.initNode("/ECAM/warnings/overflow-right", 0, "BOOL");
|
||||||
var overflow = props.globals.initNode("/ECAM/warnings/overflow", 0, "BOOL");
|
var overflow = props.globals.initNode("/ECAM/warnings/overflow", 0, "BOOL");
|
||||||
|
|
||||||
var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess", 1);
|
var dc_ess = props.globals.getNode("systems/electrical/bus/dc-ess", 1);
|
||||||
|
|
||||||
var lights = [props.globals.initNode("/ECAM/warnings/master-warning-light", 0, "BOOL"), props.globals.initNode("/ECAM/warnings/master-caution-light", 0, "BOOL")];
|
var 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")];
|
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")];
|
||||||
|
@ -173,7 +173,7 @@ var ECAM_controller = {
|
||||||
me.reset();
|
me.reset();
|
||||||
},
|
},
|
||||||
loop: func() {
|
loop: func() {
|
||||||
if ((systems.ELEC.Bus.acEss.getValue() >= 110 or systems.ELEC.Bus.ac2.getValue() >= 110) and !getprop("/systems/acconfig/acconfig-running")) {
|
if ((systems.ELEC.Bus.acEss.getValue() >= 110 or systems.ELEC.Bus.ac2.getValue() >= 110) and !getprop("systems/acconfig/acconfig-running")) {
|
||||||
# update FWC phases
|
# update FWC phases
|
||||||
phaseLoop();
|
phaseLoop();
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ var ECAM_controller = {
|
||||||
# write to ECAM
|
# write to ECAM
|
||||||
var counter = 0;
|
var counter = 0;
|
||||||
|
|
||||||
if (!getprop("/systems/acconfig/autoconfig-running")) {
|
if (!getprop("systems/acconfig/autoconfig-running")) {
|
||||||
foreach (var w; warnings.vector) {
|
foreach (var w; warnings.vector) {
|
||||||
if (w.active == 1) {
|
if (w.active == 1) {
|
||||||
if (counter < 9) {
|
if (counter < 9) {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -42,7 +42,7 @@ var clrLight = 0;
|
||||||
var ECAM = {
|
var ECAM = {
|
||||||
_cachePage: "",
|
_cachePage: "",
|
||||||
init: func() {
|
init: func() {
|
||||||
setprop("/systems/gear/landing-gear-warning-light", 0);
|
setprop("systems/gear/landing-gear-warning-light", 0);
|
||||||
page = props.globals.initNode("/ECAM/Lower/page", "door", "STRING");
|
page = props.globals.initNode("/ECAM/Lower/page", "door", "STRING");
|
||||||
apuLight = props.globals.initNode("/ECAM/Lower/light/apu", 0, "BOOL");
|
apuLight = props.globals.initNode("/ECAM/Lower/light/apu", 0, "BOOL");
|
||||||
bleedLight = props.globals.initNode("/ECAM/Lower/light/bleed", 0, "BOOL");
|
bleedLight = props.globals.initNode("/ECAM/Lower/light/bleed", 0, "BOOL");
|
||||||
|
@ -70,38 +70,38 @@ var ECAM = {
|
||||||
me.reset();
|
me.reset();
|
||||||
},
|
},
|
||||||
reset: func() {
|
reset: func() {
|
||||||
setprop("/ECAM/msg/line1", "");
|
setprop("ECAM/msg/line1", "");
|
||||||
setprop("/ECAM/msg/line2", "");
|
setprop("ECAM/msg/line2", "");
|
||||||
setprop("/ECAM/msg/line3", "");
|
setprop("ECAM/msg/line3", "");
|
||||||
setprop("/ECAM/msg/line4", "");
|
setprop("ECAM/msg/line4", "");
|
||||||
setprop("/ECAM/msg/line5", "");
|
setprop("ECAM/msg/line5", "");
|
||||||
setprop("/ECAM/msg/line6", "");
|
setprop("ECAM/msg/line6", "");
|
||||||
setprop("/ECAM/msg/line7", "");
|
setprop("ECAM/msg/line7", "");
|
||||||
setprop("/ECAM/msg/line8", "");
|
setprop("ECAM/msg/line8", "");
|
||||||
setprop("/ECAM/msg/linec1", "w");
|
setprop("ECAM/msg/linec1", "w");
|
||||||
setprop("/ECAM/msg/linec2", "w");
|
setprop("ECAM/msg/linec2", "w");
|
||||||
setprop("/ECAM/msg/linec3", "w");
|
setprop("ECAM/msg/linec3", "w");
|
||||||
setprop("/ECAM/msg/linec4", "w");
|
setprop("ECAM/msg/linec4", "w");
|
||||||
setprop("/ECAM/msg/linec5", "w");
|
setprop("ECAM/msg/linec5", "w");
|
||||||
setprop("/ECAM/msg/linec6", "w");
|
setprop("ECAM/msg/linec6", "w");
|
||||||
setprop("/ECAM/msg/linec7", "w");
|
setprop("ECAM/msg/linec7", "w");
|
||||||
setprop("/ECAM/msg/linec8", "w");
|
setprop("ECAM/msg/linec8", "w");
|
||||||
setprop("/ECAM/rightmsg/line1", "");
|
setprop("ECAM/rightmsg/line1", "");
|
||||||
setprop("/ECAM/rightmsg/line2", "");
|
setprop("ECAM/rightmsg/line2", "");
|
||||||
setprop("/ECAM/rightmsg/line3", "");
|
setprop("ECAM/rightmsg/line3", "");
|
||||||
setprop("/ECAM/rightmsg/line4", "");
|
setprop("ECAM/rightmsg/line4", "");
|
||||||
setprop("/ECAM/rightmsg/line5", "");
|
setprop("ECAM/rightmsg/line5", "");
|
||||||
setprop("/ECAM/rightmsg/line6", "");
|
setprop("ECAM/rightmsg/line6", "");
|
||||||
setprop("/ECAM/rightmsg/line7", "");
|
setprop("ECAM/rightmsg/line7", "");
|
||||||
setprop("/ECAM/rightmsg/line8", "");
|
setprop("ECAM/rightmsg/line8", "");
|
||||||
setprop("/ECAM/rightmsg/linec1", "w");
|
setprop("ECAM/rightmsg/linec1", "w");
|
||||||
setprop("/ECAM/rightmsg/linec2", "w");
|
setprop("ECAM/rightmsg/linec2", "w");
|
||||||
setprop("/ECAM/rightmsg/linec3", "w");
|
setprop("ECAM/rightmsg/linec3", "w");
|
||||||
setprop("/ECAM/rightmsg/linec4", "w");
|
setprop("ECAM/rightmsg/linec4", "w");
|
||||||
setprop("/ECAM/rightmsg/linec5", "w");
|
setprop("ECAM/rightmsg/linec5", "w");
|
||||||
setprop("/ECAM/rightmsg/linec6", "w");
|
setprop("ECAM/rightmsg/linec6", "w");
|
||||||
setprop("/ECAM/rightmsg/linec7", "w");
|
setprop("ECAM/rightmsg/linec7", "w");
|
||||||
setprop("/ECAM/rightmsg/linec8", "w");
|
setprop("ECAM/rightmsg/linec8", "w");
|
||||||
|
|
||||||
page.setValue("door");
|
page.setValue("door");
|
||||||
apuLight.setValue(0);
|
apuLight.setValue(0);
|
||||||
|
|
|
@ -36,8 +36,8 @@ var FWC = {
|
||||||
phase5Output: props.globals.initNode("/ECAM/phases/monostable/phase-5-output"),
|
phase5Output: props.globals.initNode("/ECAM/phases/monostable/phase-5-output"),
|
||||||
phase7Output: props.globals.initNode("/ECAM/phases/monostable/phase-7-output"),
|
phase7Output: props.globals.initNode("/ECAM/phases/monostable/phase-7-output"),
|
||||||
phase9Output: props.globals.initNode("/ECAM/phases/monostable/phase-9-output"),
|
phase9Output: props.globals.initNode("/ECAM/phases/monostable/phase-9-output"),
|
||||||
toPowerOutput: props.globals.getNode("/ECAM/phases/monostable/to-power-set-output"),
|
toPowerOutput: props.globals.getNode("ECAM/phases/monostable/to-power-set-output"),
|
||||||
m80kt: props.globals.getNode("/ECAM/phases/monostable-80kt"),
|
m80kt: props.globals.getNode("ECAM/phases/monostable-80kt"),
|
||||||
},
|
},
|
||||||
Flipflop: {
|
Flipflop: {
|
||||||
gearSet: props.globals.initNode("/ECAM/phases/flipflop/gear-set", 0, "BOOL"),
|
gearSet: props.globals.initNode("/ECAM/phases/flipflop/gear-set", 0, "BOOL"),
|
||||||
|
@ -59,11 +59,11 @@ var FWC = {
|
||||||
eng1or2: props.globals.initNode("/ECAM/phases/timer/eng1or2", 0, "INT"),
|
eng1or2: props.globals.initNode("/ECAM/phases/timer/eng1or2", 0, "INT"),
|
||||||
toInhibit: props.globals.initNode("/ECAM/phases/timer/to-inhibit", 0, "INT"),
|
toInhibit: props.globals.initNode("/ECAM/phases/timer/to-inhibit", 0, "INT"),
|
||||||
ldgInhibit: props.globals.initNode("/ECAM/phases/timer/ldg-inhibit", 0, "INT"),
|
ldgInhibit: props.globals.initNode("/ECAM/phases/timer/ldg-inhibit", 0, "INT"),
|
||||||
eng1idleOutput: props.globals.getNode("/ECAM/phases/timer/eng1idle-output"),
|
eng1idleOutput: props.globals.getNode("ECAM/phases/timer/eng1idle-output"),
|
||||||
eng2idleOutput: props.globals.getNode("/ECAM/phases/timer/eng2idle-output"),
|
eng2idleOutput: props.globals.getNode("ECAM/phases/timer/eng2idle-output"),
|
||||||
eng1or2Output: props.globals.initNode("/ECAM/phases/timer/eng1or2-output", 0, "INT"),
|
eng1or2Output: props.globals.initNode("/ECAM/phases/timer/eng1or2-output", 0, "INT"),
|
||||||
toInhibitOutput: props.globals.getNode("/ECAM/phases/timer/to-inhibit-output"),
|
toInhibitOutput: props.globals.getNode("ECAM/phases/timer/to-inhibit-output"),
|
||||||
ldgInhibitOutput: props.globals.getNode("/ECAM/phases/timer/ldg-inhibit-output"),
|
ldgInhibitOutput: props.globals.getNode("ECAM/phases/timer/ldg-inhibit-output"),
|
||||||
},
|
},
|
||||||
speed80: props.globals.initNode("/ECAM/phases/speed-gt-80", 0, "BOOL"),
|
speed80: props.globals.initNode("/ECAM/phases/speed-gt-80", 0, "BOOL"),
|
||||||
toPower: props.globals.initNode("/ECAM/phases/to-power-set", 0, "BOOL"),
|
toPower: props.globals.initNode("/ECAM/phases/to-power-set", 0, "BOOL"),
|
||||||
|
@ -131,15 +131,15 @@ var phaseLoop = func() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eng == "IAE") {
|
if (eng == "IAE") {
|
||||||
eprlim = getprop("/controls/engines/epr-limit");
|
eprlim = getprop("controls/engines/epr-limit");
|
||||||
if ((!getprop("/controls/engines/engine[0]/reverser") and !getprop("/controls/engines/engine[1]/reverser")) and (((pts.Controls.Engines.Engine1.throttle.getValue() >= 0.8 or pts.Controls.Engines.Engine2.throttle.getValue() >= 0.8) and pts.PTSSystems.Thrust.flex.getBoolValue()) or (pts.Controls.Engines.Engine1.throttle.getValue() == 1.0 or pts.Controls.Engines.Engine2.throttle.getValue() == 1.0))) {
|
if ((!getprop("controls/engines/engine[0]/reverser") and !getprop("controls/engines/engine[1]/reverser")) and (((pts.Controls.Engines.Engine1.throttle.getValue() >= 0.8 or pts.Controls.Engines.Engine2.throttle.getValue() >= 0.8) and pts.PTSSystems.Thrust.flex.getBoolValue()) or (pts.Controls.Engines.Engine1.throttle.getValue() == 1.0 or pts.Controls.Engines.Engine2.throttle.getValue() == 1.0))) {
|
||||||
FWC.toPower.setBoolValue(1);
|
FWC.toPower.setBoolValue(1);
|
||||||
} else {
|
} else {
|
||||||
FWC.toPower.setBoolValue(0);
|
FWC.toPower.setBoolValue(0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
n1lim = getprop("/controls/engines/n1-limit");
|
n1lim = getprop("controls/engines/n1-limit");
|
||||||
if ((!getprop("/controls/engines/engine[0]/reverser") and !getprop("/controls/engines/engine[1]/reverser")) and (((pts.Controls.Engines.Engine1.throttle.getValue() >= 0.8 or pts.Controls.Engines.Engine2.throttle.getValue() >= 0.8) and pts.PTSSystems.Thrust.flex.getBoolValue()) or (pts.Controls.Engines.Engine1.throttle.getValue() == 1.0 or pts.Controls.Engines.Engine2.throttle.getValue() == 1.0))) {
|
if ((!getprop("controls/engines/engine[0]/reverser") and !getprop("controls/engines/engine[1]/reverser")) and (((pts.Controls.Engines.Engine1.throttle.getValue() >= 0.8 or pts.Controls.Engines.Engine2.throttle.getValue() >= 0.8) and pts.PTSSystems.Thrust.flex.getBoolValue()) or (pts.Controls.Engines.Engine1.throttle.getValue() == 1.0 or pts.Controls.Engines.Engine2.throttle.getValue() == 1.0))) {
|
||||||
FWC.toPower.setBoolValue(1);
|
FWC.toPower.setBoolValue(1);
|
||||||
} else {
|
} else {
|
||||||
FWC.toPower.setBoolValue(0);
|
FWC.toPower.setBoolValue(0);
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
# Thanks to BAWV12 / Thorsten
|
# Thanks to BAWV12 / Thorsten
|
||||||
|
|
||||||
|
|
||||||
var als_on = props.globals.getNode("/sim/rendering/shaders/skydome");
|
var als_on = props.globals.getNode("sim/rendering/shaders/skydome");
|
||||||
var alt_agl = props.globals.getNode("/position/gear-agl-ft");
|
var alt_agl = props.globals.getNode("position/gear-agl-ft");
|
||||||
var cur_alt = 0;
|
var cur_alt = 0;
|
||||||
|
|
||||||
var light_manager = {
|
var light_manager = {
|
||||||
|
@ -67,30 +67,30 @@ var light_manager = {
|
||||||
flcpt: 0,
|
flcpt: 0,
|
||||||
prev_view : 1,
|
prev_view : 1,
|
||||||
|
|
||||||
nd_ref_light1_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m", 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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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),
|
nd_ref_light5_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir[4]", 1),
|
||||||
|
|
||||||
init: func {
|
init: func {
|
||||||
# define your lights here
|
# define your lights here
|
||||||
|
@ -152,16 +152,16 @@ var light_manager = {
|
||||||
},
|
},
|
||||||
|
|
||||||
start: func {
|
start: func {
|
||||||
setprop("/sim/rendering/als-secondary-lights/num-lightspots", 5);
|
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", me.light1_size);
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/size[1]", me.light2_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[2]", me.light3_size);
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/size[3]", me.light4_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);
|
setprop("sim/rendering/als-secondary-lights/lightspot/size[4]", me.light5_size);
|
||||||
|
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/stretch", me.light1_stretch);
|
setprop("sim/rendering/als-secondary-lights/lightspot/stretch", me.light1_stretch);
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/stretch[1]", me.light2_stretch);
|
setprop("sim/rendering/als-secondary-lights/lightspot/stretch[1]", me.light2_stretch);
|
||||||
|
|
||||||
me.run = 1;
|
me.run = 1;
|
||||||
me.update();
|
me.update();
|
||||||
|
@ -181,14 +181,14 @@ var light_manager = {
|
||||||
ll1 = getprop("controls/lighting/landing-lights[1]");
|
ll1 = getprop("controls/lighting/landing-lights[1]");
|
||||||
ll2 = getprop("controls/lighting/landing-lights[2]");
|
ll2 = getprop("controls/lighting/landing-lights[2]");
|
||||||
ll3 = getprop("sim/model/lights/nose-lights");
|
ll3 = getprop("sim/model/lights/nose-lights");
|
||||||
nav = getprop("/sim/model/lights/nav-lights");
|
nav = getprop("sim/model/lights/nav-lights");
|
||||||
|
|
||||||
var apos = geo.aircraft_position();
|
var apos = geo.aircraft_position();
|
||||||
var vpos = geo.viewer_position();
|
var vpos = geo.viewer_position();
|
||||||
|
|
||||||
me.lon_to_m = math.cos(apos.lat()*math.pi/180.0) * me.lat_to_m;
|
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 heading = getprop("orientation/heading-deg") * math.pi/180.0;
|
||||||
|
|
||||||
var lat = apos.lat();
|
var lat = apos.lat();
|
||||||
var lon = apos.lon();
|
var lon = apos.lon();
|
||||||
|
@ -197,15 +197,15 @@ var light_manager = {
|
||||||
var sh = math.sin(heading);
|
var sh = math.sin(heading);
|
||||||
var ch = math.cos(heading);
|
var ch = math.cos(heading);
|
||||||
|
|
||||||
if ((ll1 == 1 and getprop("/systems/electrical/bus/ac-1") != 0) and (ll2 == 1 and getprop("/systems/electrical/bus/ac-2") !=0)) {
|
if ((ll1 == 1 and getprop("systems/electrical/bus/ac-1") != 0) and (ll2 == 1 and getprop("systems/electrical/bus/ac-2") !=0)) {
|
||||||
me.light1_ypos = 0.0;
|
me.light1_ypos = 0.0;
|
||||||
me.light1_setSize(16);
|
me.light1_setSize(16);
|
||||||
me.light1_on();
|
me.light1_on();
|
||||||
} else if (ll1 == 1 and getprop("/systems/electrical/bus/ac-1") != 0) {
|
} else if (ll1 == 1 and getprop("systems/electrical/bus/ac-1") != 0) {
|
||||||
me.light1_ypos = 3.0;
|
me.light1_ypos = 3.0;
|
||||||
me.light1_setSize(12);
|
me.light1_setSize(12);
|
||||||
me.light1_on();
|
me.light1_on();
|
||||||
} else if (ll2 == 1 and getprop("/systems/electrical/bus/ac-2") !=0) {
|
} else if (ll2 == 1 and getprop("systems/electrical/bus/ac-2") !=0) {
|
||||||
me.light1_ypos = -3.0;
|
me.light1_ypos = -3.0;
|
||||||
me.light1_setSize(12);
|
me.light1_setSize(12);
|
||||||
me.light1_on();
|
me.light1_on();
|
||||||
|
@ -320,89 +320,89 @@ var light_manager = {
|
||||||
|
|
||||||
light1_on : func {
|
light1_on : func {
|
||||||
if (me.light1_is_on == 1) {return;}
|
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-r", me.light1_r);
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g", me.light1_g);
|
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g", me.light1_g);
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b", me.light1_b);
|
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b", me.light1_b);
|
||||||
me.light1_is_on = 1;
|
me.light1_is_on = 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
light1_off : func {
|
light1_off : func {
|
||||||
if (me.light1_is_on == 0) {return;}
|
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-r", 0.0);
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g", 0.0);
|
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g", 0.0);
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b", 0.0);
|
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b", 0.0);
|
||||||
me.light1_is_on = 0;
|
me.light1_is_on = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
light1_setSize : func(size) {
|
light1_setSize : func(size) {
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/size[0]", size);
|
setprop("sim/rendering/als-secondary-lights/lightspot/size[0]", size);
|
||||||
},
|
},
|
||||||
|
|
||||||
light2_on : func {
|
light2_on : func {
|
||||||
if (me.light2_is_on == 1) {return;}
|
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-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-g[1]", me.light2_g);
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", me.light2_b);
|
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", me.light2_b);
|
||||||
me.light2_is_on = 1;
|
me.light2_is_on = 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
light2_off : func {
|
light2_off : func {
|
||||||
if (me.light2_is_on == 0) {return;}
|
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-r[1]", 0.0);
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[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);
|
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", 0.0);
|
||||||
me.light2_is_on = 0;
|
me.light2_is_on = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
light2_setSize : func(size) {
|
light2_setSize : func(size) {
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/size[1]", size);
|
setprop("sim/rendering/als-secondary-lights/lightspot/size[1]", size);
|
||||||
},
|
},
|
||||||
|
|
||||||
light3_on : func {
|
light3_on : func {
|
||||||
if (me.light3_is_on == 1) {return;}
|
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-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-g[2]", me.light3_g);
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", me.light3_b);
|
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", me.light3_b);
|
||||||
me.light3_is_on = 1;
|
me.light3_is_on = 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
light3_off : func {
|
light3_off : func {
|
||||||
if (me.light3_is_on == 0) {return;}
|
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-r[2]", 0.0);
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[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);
|
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", 0.0);
|
||||||
me.light3_is_on = 0;
|
me.light3_is_on = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
light4_on : func {
|
light4_on : func {
|
||||||
if (me.light4_is_on == 1) {return;}
|
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-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-g[3]", me.light4_g);
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", me.light4_b);
|
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", me.light4_b);
|
||||||
me.light4_is_on = 1;
|
me.light4_is_on = 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
light4_off : func {
|
light4_off : func {
|
||||||
if (me.light4_is_on == 0) {return;}
|
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-r[3]", 0.0);
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[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);
|
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", 0.0);
|
||||||
me.light4_is_on = 0;
|
me.light4_is_on = 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
light5_on : func {
|
light5_on : func {
|
||||||
if (me.light5_is_on == 1) {return;}
|
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-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-g[4]", me.light5_g);
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", me.light5_b);
|
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", me.light5_b);
|
||||||
me.light5_is_on = 1;
|
me.light5_is_on = 1;
|
||||||
},
|
},
|
||||||
|
|
||||||
light5_off : func {
|
light5_off : func {
|
||||||
if (me.light5_is_on == 0) {return;}
|
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-r[4]", 0.0);
|
||||||
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[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);
|
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", 0.0);
|
||||||
me.light5_is_on = 0;
|
me.light5_is_on = 0;
|
||||||
},
|
},
|
||||||
};
|
};
|
|
@ -44,49 +44,49 @@ var battery2_sw = 0;
|
||||||
var law = 0;
|
var law = 0;
|
||||||
|
|
||||||
var FBW = {
|
var FBW = {
|
||||||
degradeLaw: props.globals.getNode("/it-fbw/degrade-law"),
|
degradeLaw: props.globals.getNode("it-fbw/degrade-law"),
|
||||||
activeLaw: props.globals.getNode("/it-fbw/law"),
|
activeLaw: props.globals.getNode("it-fbw/law"),
|
||||||
override: props.globals.getNode("/it-fbw/override"),
|
override: props.globals.getNode("it-fbw/override"),
|
||||||
rollBack: props.globals.getNode("/it-fbw/roll-back"),
|
rollBack: props.globals.getNode("it-fbw/roll-back"),
|
||||||
rollLim: props.globals.getNode("/it-fbw/roll-lim"),
|
rollLim: props.globals.getNode("it-fbw/roll-lim"),
|
||||||
Computers: {
|
Computers: {
|
||||||
elac1: props.globals.getNode("/systems/fctl/elac1"),
|
elac1: props.globals.getNode("systems/fctl/elac1"),
|
||||||
elac2: props.globals.getNode("/systems/fctl/elac2"),
|
elac2: props.globals.getNode("systems/fctl/elac2"),
|
||||||
sec1: props.globals.getNode("/systems/fctl/sec1"),
|
sec1: props.globals.getNode("systems/fctl/sec1"),
|
||||||
sec2: props.globals.getNode("/systems/fctl/sec2"),
|
sec2: props.globals.getNode("systems/fctl/sec2"),
|
||||||
sec3: props.globals.getNode("/systems/fctl/sec3"),
|
sec3: props.globals.getNode("systems/fctl/sec3"),
|
||||||
fac1: props.globals.getNode("/systems/fctl/fac1"),
|
fac1: props.globals.getNode("systems/fctl/fac1"),
|
||||||
fac2: props.globals.getNode("/systems/fctl/fac2"),
|
fac2: props.globals.getNode("systems/fctl/fac2"),
|
||||||
},
|
},
|
||||||
Failures: {
|
Failures: {
|
||||||
elac1: props.globals.getNode("/systems/failures/fctl/elac1"),
|
elac1: props.globals.getNode("systems/failures/fctl/elac1"),
|
||||||
elac2: props.globals.getNode("/systems/failures/fctl/elac2"),
|
elac2: props.globals.getNode("systems/failures/fctl/elac2"),
|
||||||
sec1: props.globals.getNode("/systems/failures/fctl/sec1"),
|
sec1: props.globals.getNode("systems/failures/fctl/sec1"),
|
||||||
sec2: props.globals.getNode("/systems/failures/fctl/sec2"),
|
sec2: props.globals.getNode("systems/failures/fctl/sec2"),
|
||||||
sec3: props.globals.getNode("/systems/failures/fctl/sec3"),
|
sec3: props.globals.getNode("systems/failures/fctl/sec3"),
|
||||||
fac1: props.globals.getNode("/systems/failures/fctl/fac1"),
|
fac1: props.globals.getNode("systems/failures/fctl/fac1"),
|
||||||
fac2: props.globals.getNode("/systems/failures/fctl/fac2"),
|
fac2: props.globals.getNode("systems/failures/fctl/fac2"),
|
||||||
},
|
},
|
||||||
Lights: {
|
Lights: {
|
||||||
elac1: props.globals.getNode("/controls/fctl/lights/elac1-fault"),
|
elac1: props.globals.getNode("controls/fctl/lights/elac1-fault"),
|
||||||
elac2: props.globals.getNode("/controls/fctl/lights/elac2-fault"),
|
elac2: props.globals.getNode("controls/fctl/lights/elac2-fault"),
|
||||||
sec1: props.globals.getNode("/controls/fctl/lights/sec1-fault"),
|
sec1: props.globals.getNode("controls/fctl/lights/sec1-fault"),
|
||||||
sec2: props.globals.getNode("/controls/fctl/lights/sec2-fault"),
|
sec2: props.globals.getNode("controls/fctl/lights/sec2-fault"),
|
||||||
sec2: props.globals.getNode("/controls/fctl/lights/sec3-fault"),
|
sec2: props.globals.getNode("controls/fctl/lights/sec3-fault"),
|
||||||
fac1: props.globals.getNode("/controls/fctl/lights/fac1-fault"),
|
fac1: props.globals.getNode("controls/fctl/lights/fac1-fault"),
|
||||||
fac2: props.globals.getNode("/controls/fctl/lights/fac2-fault"),
|
fac2: props.globals.getNode("controls/fctl/lights/fac2-fault"),
|
||||||
},
|
},
|
||||||
Protections: {
|
Protections: {
|
||||||
overspeedRoll: props.globals.getNode("/it-fbw/protections/overspeed-roll-back"),
|
overspeedRoll: props.globals.getNode("it-fbw/protections/overspeed-roll-back"),
|
||||||
},
|
},
|
||||||
Switches: {
|
Switches: {
|
||||||
elac1Sw: props.globals.getNode("/controls/fctl/switches/elac1"),
|
elac1Sw: props.globals.getNode("controls/fctl/switches/elac1"),
|
||||||
elac2Sw: props.globals.getNode("/controls/fctl/switches/elac2"),
|
elac2Sw: props.globals.getNode("controls/fctl/switches/elac2"),
|
||||||
sec1Sw: props.globals.getNode("/controls/fctl/switches/sec1"),
|
sec1Sw: props.globals.getNode("controls/fctl/switches/sec1"),
|
||||||
sec2Sw: props.globals.getNode("/controls/fctl/switches/sec2"),
|
sec2Sw: props.globals.getNode("controls/fctl/switches/sec2"),
|
||||||
sec3Sw: props.globals.getNode("/controls/fctl/switches/sec3"),
|
sec3Sw: props.globals.getNode("controls/fctl/switches/sec3"),
|
||||||
fac1Sw: props.globals.getNode("/controls/fctl/switches/fac1"),
|
fac1Sw: props.globals.getNode("controls/fctl/switches/fac1"),
|
||||||
fac2Sw: props.globals.getNode("/controls/fctl/switches/fac2"),
|
fac2Sw: props.globals.getNode("controls/fctl/switches/fac2"),
|
||||||
},
|
},
|
||||||
init: func() {
|
init: func() {
|
||||||
if (updatet.isRunning) {
|
if (updatet.isRunning) {
|
||||||
|
@ -180,92 +180,92 @@ var update_loop = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sec1_sw and !sec1_fail and dc_ess >= 25) {
|
if (sec1_sw and !sec1_fail and dc_ess >= 25) {
|
||||||
setprop("/systems/fctl/sec1", 1);
|
setprop("systems/fctl/sec1", 1);
|
||||||
setprop("/systems/failures/spoiler-l3", 0);
|
setprop("systems/failures/spoiler-l3", 0);
|
||||||
setprop("/systems/failures/spoiler-r3", 0);
|
setprop("systems/failures/spoiler-r3", 0);
|
||||||
setprop("/systems/failures/spoiler-l4", 0);
|
setprop("systems/failures/spoiler-l4", 0);
|
||||||
setprop("/systems/failures/spoiler-r4", 0);
|
setprop("systems/failures/spoiler-r4", 0);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fctl/sec1", 0);
|
setprop("systems/fctl/sec1", 0);
|
||||||
setprop("/systems/failures/spoiler-l3", 1);
|
setprop("systems/failures/spoiler-l3", 1);
|
||||||
setprop("/systems/failures/spoiler-r3", 1);
|
setprop("systems/failures/spoiler-r3", 1);
|
||||||
setprop("/systems/failures/spoiler-l4", 1);
|
setprop("systems/failures/spoiler-l4", 1);
|
||||||
setprop("/systems/failures/spoiler-r4", 1);
|
setprop("systems/failures/spoiler-r4", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sec2_sw and !sec2_fail and dc2 >= 25) {
|
if (sec2_sw and !sec2_fail and dc2 >= 25) {
|
||||||
setprop("/systems/fctl/sec2", 1);
|
setprop("systems/fctl/sec2", 1);
|
||||||
setprop("/systems/failures/spoiler-l5", 0);
|
setprop("systems/failures/spoiler-l5", 0);
|
||||||
setprop("/systems/failures/spoiler-r5", 0);
|
setprop("systems/failures/spoiler-r5", 0);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fctl/sec2", 0);
|
setprop("systems/fctl/sec2", 0);
|
||||||
setprop("/systems/failures/spoiler-l5", 1);
|
setprop("systems/failures/spoiler-l5", 1);
|
||||||
setprop("/systems/failures/spoiler-r5", 1);
|
setprop("systems/failures/spoiler-r5", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sec3_sw and !sec3_fail and dc2 >= 25) {
|
if (sec3_sw and !sec3_fail and dc2 >= 25) {
|
||||||
setprop("/systems/fctl/sec3", 1);
|
setprop("systems/fctl/sec3", 1);
|
||||||
setprop("/systems/failures/spoiler-l1", 0);
|
setprop("systems/failures/spoiler-l1", 0);
|
||||||
setprop("/systems/failures/spoiler-r1", 0);
|
setprop("systems/failures/spoiler-r1", 0);
|
||||||
setprop("/systems/failures/spoiler-l2", 0);
|
setprop("systems/failures/spoiler-l2", 0);
|
||||||
setprop("/systems/failures/spoiler-r2", 0);
|
setprop("systems/failures/spoiler-r2", 0);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fctl/sec3", 0);
|
setprop("systems/fctl/sec3", 0);
|
||||||
setprop("/systems/failures/spoiler-l1", 1);
|
setprop("systems/failures/spoiler-l1", 1);
|
||||||
setprop("/systems/failures/spoiler-r1", 1);
|
setprop("systems/failures/spoiler-r1", 1);
|
||||||
setprop("/systems/failures/spoiler-l2", 1);
|
setprop("systems/failures/spoiler-l2", 1);
|
||||||
setprop("/systems/failures/spoiler-r2", 1);
|
setprop("systems/failures/spoiler-r2", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fac1_sw and !fac1_fail and (ac_ess >= 110 or dc_ess_shed >= 25)) {
|
if (fac1_sw and !fac1_fail and (ac_ess >= 110 or dc_ess_shed >= 25)) {
|
||||||
setprop("/systems/fctl/fac1", 1);
|
setprop("systems/fctl/fac1", 1);
|
||||||
setprop("/systems/failures/rudder", 0);
|
setprop("systems/failures/rudder", 0);
|
||||||
setprop("/systems/failures/fac1-fault", 0);
|
setprop("systems/failures/fac1-fault", 0);
|
||||||
} else if (fac1_sw and (battery1_sw or battery2_sw) and (fac1_fail or ac_ess < 110 or dc_ess_shed < 25)) {
|
} else if (fac1_sw and (battery1_sw or battery2_sw) and (fac1_fail or ac_ess < 110 or dc_ess_shed < 25)) {
|
||||||
setprop("/systems/failures/fac1-fault", 1);
|
setprop("systems/failures/fac1-fault", 1);
|
||||||
setprop("/systems/fctl/fac1", 0);
|
setprop("systems/fctl/fac1", 0);
|
||||||
if (!fac2_sw or fac2_fail) {
|
if (!fac2_sw or fac2_fail) {
|
||||||
setprop("/systems/failures/rudder", 1);
|
setprop("systems/failures/rudder", 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/failures/fac1-fault", 0);
|
setprop("systems/failures/fac1-fault", 0);
|
||||||
setprop("/systems/fctl/fac1", 0);
|
setprop("systems/fctl/fac1", 0);
|
||||||
if (!fac2_sw or fac2_fail) {
|
if (!fac2_sw or fac2_fail) {
|
||||||
setprop("/systems/failures/rudder", 1);
|
setprop("systems/failures/rudder", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fac2_sw and !fac2_fail and (ac2 >= 110 or dc2 >= 25)) {
|
if (fac2_sw and !fac2_fail and (ac2 >= 110 or dc2 >= 25)) {
|
||||||
setprop("/systems/fctl/fac2", 1);
|
setprop("systems/fctl/fac2", 1);
|
||||||
setprop("/systems/failures/fac2-fault", 0);
|
setprop("systems/failures/fac2-fault", 0);
|
||||||
} else if (fac2_sw and (fac2_fail or ac2 < 110 or dc2 < 25)) {
|
} else if (fac2_sw and (fac2_fail or ac2 < 110 or dc2 < 25)) {
|
||||||
setprop("/systems/failures/fac2-fault", 1);
|
setprop("systems/failures/fac2-fault", 1);
|
||||||
setprop("/systems/fctl/fac2", 0);
|
setprop("systems/fctl/fac2", 0);
|
||||||
if (!fac1_sw or fac1_fail) {
|
if (!fac1_sw or fac1_fail) {
|
||||||
setprop("/systems/failures/rudder", 1);
|
setprop("systems/failures/rudder", 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fctl/fac2", 0);
|
setprop("systems/fctl/fac2", 0);
|
||||||
setprop("/systems/failures/fac2-fault", 0);
|
setprop("systems/failures/fac2-fault", 0);
|
||||||
if (!fac1_sw or fac1_fail) {
|
if (!fac1_sw or fac1_fail) {
|
||||||
setprop("/systems/failures/rudder", 1);
|
setprop("systems/failures/rudder", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var elac1 = getprop("/systems/fctl/elac1");
|
var elac1 = getprop("systems/fctl/elac1");
|
||||||
var elac2 = getprop("/systems/fctl/elac2");
|
var elac2 = getprop("systems/fctl/elac2");
|
||||||
var sec1 = getprop("/systems/fctl/sec1");
|
var sec1 = getprop("systems/fctl/sec1");
|
||||||
var sec2 = getprop("/systems/fctl/sec2");
|
var sec2 = getprop("systems/fctl/sec2");
|
||||||
var sec3 = getprop("/systems/fctl/sec3");
|
var sec3 = getprop("systems/fctl/sec3");
|
||||||
var fac1 = getprop("/systems/fctl/fac1");
|
var fac1 = getprop("systems/fctl/fac1");
|
||||||
var fac2 = getprop("/systems/fctl/fac2");
|
var fac2 = getprop("systems/fctl/fac2");
|
||||||
law = FBW.activeLaw.getValue();
|
law = FBW.activeLaw.getValue();
|
||||||
|
|
||||||
# Degrade logic, all failures which degrade FBW need to go here. -JD
|
# Degrade logic, all failures which degrade FBW need to go here. -JD
|
||||||
blue = systems.HYD.Psi.blue.getValue();
|
blue = systems.HYD.Psi.blue.getValue();
|
||||||
green = systems.HYD.Psi.green.getValue();
|
green = systems.HYD.Psi.green.getValue();
|
||||||
yellow = systems.HYD.Psi.yellow.getValue();
|
yellow = systems.HYD.Psi.yellow.getValue();
|
||||||
if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0) {
|
if (getprop("gear/gear[1]/wow") == 0 and getprop("gear/gear[2]/wow") == 0) {
|
||||||
if (!elac1 and !elac2) {
|
if (!elac1 and !elac2) {
|
||||||
if (law == 0) {
|
if (law == 0) {
|
||||||
FBW.degradeLaw.setValue(1);
|
FBW.degradeLaw.setValue(1);
|
||||||
|
@ -273,7 +273,7 @@ var update_loop = func {
|
||||||
fcu.athrOff("hard");
|
fcu.athrOff("hard");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (getprop("/systems/electrical/some-electric-thingie/emer-elec-config") == 1) {
|
if (getprop("systems/electrical/some-electric-thingie/emer-elec-config") == 1) {
|
||||||
if (law == 0) {
|
if (law == 0) {
|
||||||
FBW.degradeLaw.setValue(1);
|
FBW.degradeLaw.setValue(1);
|
||||||
fcu.apOff("hard", 0);
|
fcu.apOff("hard", 0);
|
||||||
|
@ -294,7 +294,7 @@ var update_loop = func {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/controls/gear/gear-down") == 1 and getprop("/it-autoflight/output/ap1") == 0 and getprop("/it-autoflight/output/ap2") == 0) {
|
if (getprop("controls/gear/gear-down") == 1 and getprop("it-autoflight/output/ap1") == 0 and getprop("it-autoflight/output/ap2") == 0) {
|
||||||
if (law == 1) {
|
if (law == 1) {
|
||||||
FBW.degradeLaw.setValue(2);
|
FBW.degradeLaw.setValue(2);
|
||||||
}
|
}
|
||||||
|
@ -308,23 +308,23 @@ var update_loop = func {
|
||||||
FBW.degradeLaw.setValue(2);
|
FBW.degradeLaw.setValue(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
mmoIAS = (getprop("/instrumentation/airspeed-indicator/indicated-speed-kt") / getprop("/instrumentation/airspeed-indicator/indicated-mach")) * 0.82;
|
mmoIAS = (getprop("instrumentation/airspeed-indicator/indicated-speed-kt") / getprop("instrumentation/airspeed-indicator/indicated-mach")) * 0.82;
|
||||||
if (mmoIAS < 350) {
|
if (mmoIAS < 350) {
|
||||||
setprop("/it-fbw/speeds/vmo-mmo", mmoIAS);
|
setprop("it-fbw/speeds/vmo-mmo", mmoIAS);
|
||||||
} else {
|
} else {
|
||||||
setprop("/it-fbw/speeds/vmo-mmo", 350);
|
setprop("it-fbw/speeds/vmo-mmo", 350);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/instrumentation/airspeed-indicator/indicated-speed-kt") > getprop("/it-fbw/speeds/vmo-mmo") + 6 and (law == 0 or law == 1)) {
|
if (getprop("instrumentation/airspeed-indicator/indicated-speed-kt") > getprop("it-fbw/speeds/vmo-mmo") + 6 and (law == 0 or law == 1)) {
|
||||||
if (getprop("/it-autoflight/input/ap1") == 1 or getprop("/it-autoflight/input/ap2") == 1) {
|
if (getprop("it-autoflight/input/ap1") == 1 or getprop("it-autoflight/input/ap2") == 1) {
|
||||||
fcu.apOff("hard", 0);
|
fcu.apOff("hard", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/it-fbw/protections/overspeed") != 1) {
|
if (getprop("it-fbw/protections/overspeed") != 1) {
|
||||||
setprop("/it-fbw/protections/overspeed", 1);
|
setprop("it-fbw/protections/overspeed", 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/it-fbw/protections/overspeed") != 0) {
|
if (getprop("it-fbw/protections/overspeed") != 0) {
|
||||||
setprop("/it-fbw/protections/overspeed", 0);
|
setprop("it-fbw/protections/overspeed", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -361,7 +361,7 @@ var fbw_loop = func {
|
||||||
FBW.Protections.overspeedRoll.setValue(1);
|
FBW.Protections.overspeedRoll.setValue(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/it-fbw/override") == 0) {
|
if (getprop("it-fbw/override") == 0) {
|
||||||
var active = FBW.activeLaw.getValue();
|
var active = FBW.activeLaw.getValue();
|
||||||
var degrade = FBW.degradeLaw.getValue();
|
var degrade = FBW.degradeLaw.getValue();
|
||||||
if (degrade == 0) {
|
if (degrade == 0) {
|
||||||
|
@ -384,7 +384,7 @@ var fbw_loop = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FBW.activeLaw.getValue() != 0) {
|
if (FBW.activeLaw.getValue() != 0) {
|
||||||
if (getprop("/it-autoflight/output/ap1") == 1 or getprop("/it-autoflight/output/ap2") == 1) {
|
if (getprop("it-autoflight/output/ap1") == 1 or getprop("it-autoflight/output/ap2") == 1) {
|
||||||
fcu.apOff("hard", 0);
|
fcu.apOff("hard", 0);
|
||||||
fcu.athrOff("hard");
|
fcu.athrOff("hard");
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,37 +3,37 @@
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450), Jonathan Redpath (legoboyvdlp)
|
# Copyright (c) 2019 Joshua Davidson (Octal450), Jonathan Redpath (legoboyvdlp)
|
||||||
|
|
||||||
# Nodes
|
# Nodes
|
||||||
var fd1 = props.globals.getNode("/it-autoflight/output/fd1", 1);
|
var fd1 = props.globals.getNode("it-autoflight/output/fd1", 1);
|
||||||
var fd2 = props.globals.getNode("/it-autoflight/output/fd2", 1);
|
var fd2 = props.globals.getNode("it-autoflight/output/fd2", 1);
|
||||||
var ap1 = props.globals.getNode("/it-autoflight/output/ap1", 1);
|
var ap1 = props.globals.getNode("it-autoflight/output/ap1", 1);
|
||||||
var ap2 = props.globals.getNode("/it-autoflight/output/ap2", 1);
|
var ap2 = props.globals.getNode("it-autoflight/output/ap2", 1);
|
||||||
var athr = props.globals.getNode("/it-autoflight/output/athr", 1);
|
var athr = props.globals.getNode("it-autoflight/output/athr", 1);
|
||||||
var fd1Input = props.globals.getNode("/it-autoflight/input/fd1", 1);
|
var fd1Input = props.globals.getNode("it-autoflight/input/fd1", 1);
|
||||||
var fd2Input = props.globals.getNode("/it-autoflight/input/fd2", 1);
|
var fd2Input = props.globals.getNode("it-autoflight/input/fd2", 1);
|
||||||
var ap1Input = props.globals.getNode("/it-autoflight/input/ap1", 1);
|
var ap1Input = props.globals.getNode("it-autoflight/input/ap1", 1);
|
||||||
var ap2Input = props.globals.getNode("/it-autoflight/input/ap2", 1);
|
var ap2Input = props.globals.getNode("it-autoflight/input/ap2", 1);
|
||||||
var athrInput = props.globals.getNode("/it-autoflight/input/athr", 1);
|
var athrInput = props.globals.getNode("it-autoflight/input/athr", 1);
|
||||||
var ktsMach = props.globals.getNode("/it-autoflight/input/kts-mach", 1);
|
var ktsMach = props.globals.getNode("it-autoflight/input/kts-mach", 1);
|
||||||
var iasSet = props.globals.getNode("/it-autoflight/input/spd-kts", 1);
|
var iasSet = props.globals.getNode("it-autoflight/input/spd-kts", 1);
|
||||||
var machSet = props.globals.getNode("/it-autoflight/input/spd-mach", 1);
|
var machSet = props.globals.getNode("it-autoflight/input/spd-mach", 1);
|
||||||
var hdgSet = props.globals.getNode("/it-autoflight/input/hdg", 1);
|
var hdgSet = props.globals.getNode("it-autoflight/input/hdg", 1);
|
||||||
var altSet = props.globals.getNode("/it-autoflight/input/alt", 1);
|
var altSet = props.globals.getNode("it-autoflight/input/alt", 1);
|
||||||
var altSetMode = props.globals.getNode("/it-autoflight/config/altitude-dial-mode", 1);
|
var altSetMode = props.globals.getNode("it-autoflight/config/altitude-dial-mode", 1);
|
||||||
var vsSet = props.globals.getNode("/it-autoflight/input/vs", 1);
|
var vsSet = props.globals.getNode("it-autoflight/input/vs", 1);
|
||||||
var fpaSet = props.globals.getNode("/it-autoflight/input/fpa", 1);
|
var fpaSet = props.globals.getNode("it-autoflight/input/fpa", 1);
|
||||||
var iasNow = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt", 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 machNow = props.globals.getNode("instrumentation/airspeed-indicator/indicated-mach", 1);
|
||||||
var spdManaged = props.globals.getNode("/it-autoflight/input/spd-managed", 1);
|
var spdManaged = props.globals.getNode("it-autoflight/input/spd-managed", 1);
|
||||||
var showHDG = props.globals.getNode("/it-autoflight/custom/show-hdg", 1);
|
var showHDG = props.globals.getNode("it-autoflight/custom/show-hdg", 1);
|
||||||
var trkFpaSW = props.globals.getNode("/it-autoflight/custom/trk-fpa", 1);
|
var trkFpaSW = props.globals.getNode("it-autoflight/custom/trk-fpa", 1);
|
||||||
var latMode = props.globals.getNode("/it-autoflight/output/lat", 1);
|
var latMode = props.globals.getNode("it-autoflight/output/lat", 1);
|
||||||
var vertMode = props.globals.getNode("/it-autoflight/output/vert", 1);
|
var vertMode = props.globals.getNode("it-autoflight/output/vert", 1);
|
||||||
var fpaModeInput = props.globals.getNode("/it-autoflight/input/fpa", 1);
|
var fpaModeInput = props.globals.getNode("it-autoflight/input/fpa", 1);
|
||||||
var latModeInput = props.globals.getNode("/it-autoflight/input/lat", 1);
|
var latModeInput = props.globals.getNode("it-autoflight/input/lat", 1);
|
||||||
var vertModeInput = props.globals.getNode("/it-autoflight/input/vert", 1);
|
var vertModeInput = props.globals.getNode("it-autoflight/input/vert", 1);
|
||||||
var vsModeInput = props.globals.getNode("/it-autoflight/input/vs", 1);
|
var vsModeInput = props.globals.getNode("it-autoflight/input/vs", 1);
|
||||||
var locArm = props.globals.getNode("/it-autoflight/output/loc-armed", 1);
|
var locArm = props.globals.getNode("it-autoflight/output/loc-armed", 1);
|
||||||
var apprArm = props.globals.getNode("/it-autoflight/output/appr-armed", 1);
|
var apprArm = props.globals.getNode("it-autoflight/output/appr-armed", 1);
|
||||||
var FCUworkingNode = props.globals.initNode("/FMGC/FCU-working", 0, "BOOL");
|
var FCUworkingNode = props.globals.initNode("/FMGC/FCU-working", 0, "BOOL");
|
||||||
|
|
||||||
var FCU = {
|
var FCU = {
|
||||||
|
@ -59,7 +59,7 @@ var FCU = {
|
||||||
var FCUController = {
|
var FCUController = {
|
||||||
FCU1: nil,
|
FCU1: nil,
|
||||||
FCU2: nil,
|
FCU2: nil,
|
||||||
activeFMGC: props.globals.getNode("/FMGC/active-fmgc-channel"),
|
activeFMGC: props.globals.getNode("FMGC/active-fmgc-channel"),
|
||||||
FCUworking: 0,
|
FCUworking: 0,
|
||||||
_init: 0,
|
_init: 0,
|
||||||
init: func() {
|
init: func() {
|
||||||
|
@ -150,13 +150,13 @@ var FCUController = {
|
||||||
if (ap1.getBoolValue() or ap2.getBoolValue()) {
|
if (ap1.getBoolValue() or ap2.getBoolValue()) {
|
||||||
apOff("soft", 0);
|
apOff("soft", 0);
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/it-autoflight/sound/apoffsound") == 1 or getprop("/it-autoflight/sound/apoffsound2") == 1) {
|
if (getprop("it-autoflight/sound/apoffsound") == 1 or getprop("it-autoflight/sound/apoffsound2") == 1) {
|
||||||
setprop("/it-autoflight/sound/apoffsound", 0);
|
setprop("it-autoflight/sound/apoffsound", 0);
|
||||||
setprop("/it-autoflight/sound/apoffsound2", 0);
|
setprop("it-autoflight/sound/apoffsound2", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/it-autoflight/output/ap-warning") != 0) {
|
if (getprop("it-autoflight/output/ap-warning") != 0) {
|
||||||
setprop("/it-autoflight/output/ap-warning", 0);
|
setprop("it-autoflight/output/ap-warning", 0);
|
||||||
setprop("/ECAM/warnings/master-warning-light", 0);
|
setprop("ECAM/warnings/master-warning-light", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -165,11 +165,11 @@ var FCUController = {
|
||||||
if (me.FCUworking) {
|
if (me.FCUworking) {
|
||||||
if (athr.getBoolValue()) {
|
if (athr.getBoolValue()) {
|
||||||
athrOff("soft");
|
athrOff("soft");
|
||||||
setprop("/ECAM/warnings/master-caution-light", 1);
|
setprop("ECAM/warnings/master-caution-light", 1);
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/it-autoflight/output/athr-warning") == 1) {
|
if (getprop("it-autoflight/output/athr-warning") == 1) {
|
||||||
setprop("/it-autoflight/output/athr-warning", 0);
|
setprop("it-autoflight/output/athr-warning", 0);
|
||||||
setprop("/ECAM/warnings/master-caution-light", 0);
|
setprop("ECAM/warnings/master-caution-light", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ var FCUController = {
|
||||||
},
|
},
|
||||||
SPDPush: func() {
|
SPDPush: func() {
|
||||||
if (me.FCUworking) {
|
if (me.FCUworking) {
|
||||||
if (getprop("/FMGC/internal/cruise-lvl-set") == 1 and getprop("/FMGC/internal/cost-index-set") == 1) {
|
if (getprop("FMGC/internal/cruise-lvl-set") == 1 and getprop("FMGC/internal/cost-index-set") == 1) {
|
||||||
spdManaged.setBoolValue(1);
|
spdManaged.setBoolValue(1);
|
||||||
fmgc.ManagedSPD.start();
|
fmgc.ManagedSPD.start();
|
||||||
}
|
}
|
||||||
|
@ -334,7 +334,7 @@ var FCUController = {
|
||||||
},
|
},
|
||||||
ALTPush: func() {
|
ALTPush: func() {
|
||||||
if (me.FCUworking) {
|
if (me.FCUworking) {
|
||||||
# setprop("/it-autoflight/input/vert", 8); # He don't work yet m8
|
# setprop("it-autoflight/input/vert", 8); # He don't work yet m8
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ALTPull: func() {
|
ALTPull: func() {
|
||||||
|
@ -506,7 +506,7 @@ var athrOff = func(type) {
|
||||||
var hdgInput = func {
|
var hdgInput = func {
|
||||||
if (latMode.getValue() != 0) {
|
if (latMode.getValue() != 0) {
|
||||||
showHDG.setBoolValue(1);
|
showHDG.setBoolValue(1);
|
||||||
var hdgnow = getprop("/it-autoflight/input/hdg");
|
var hdgnow = getprop("it-autoflight/input/hdg");
|
||||||
setprop("/modes/fcu/hdg-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/fcu/hdg-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -5,53 +5,53 @@
|
||||||
# Initialize all used variables and property nodes
|
# Initialize all used variables and property nodes
|
||||||
# Sim
|
# Sim
|
||||||
var Velocity = {
|
var Velocity = {
|
||||||
airspeedKt: props.globals.getNode("/velocities/airspeed-kt", 1), # Only used for gain scheduling
|
airspeedKt: props.globals.getNode("velocities/airspeed-kt", 1), # Only used for gain scheduling
|
||||||
groundspeedKt: props.globals.getNode("/velocities/groundspeed-kt", 1),
|
groundspeedKt: props.globals.getNode("velocities/groundspeed-kt", 1),
|
||||||
groundspeedMps: 0,
|
groundspeedMps: 0,
|
||||||
indicatedAirspeedKt: props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt", 1),
|
indicatedAirspeedKt: props.globals.getNode("instrumentation/airspeed-indicator/indicated-speed-kt", 1),
|
||||||
indicatedMach: props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach", 1),
|
indicatedMach: props.globals.getNode("instrumentation/airspeed-indicator/indicated-mach", 1),
|
||||||
trueAirspeedKt: props.globals.getNode("/instrumentation/airspeed-indicator/true-speed-kt", 1),
|
trueAirspeedKt: props.globals.getNode("instrumentation/airspeed-indicator/true-speed-kt", 1),
|
||||||
trueAirspeedKtTemp: 0,
|
trueAirspeedKtTemp: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
var Position = {
|
var Position = {
|
||||||
gearAglFtTemp: 0,
|
gearAglFtTemp: 0,
|
||||||
gearAglFt: props.globals.getNode("/position/gear-agl-ft", 1),
|
gearAglFt: props.globals.getNode("position/gear-agl-ft", 1),
|
||||||
indicatedAltitudeFt: props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft", 1),
|
indicatedAltitudeFt: props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft", 1),
|
||||||
indicatedAltitudeFtTemp: 0,
|
indicatedAltitudeFtTemp: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
var Gear = {
|
var Gear = {
|
||||||
wow0: props.globals.getNode("/gear/gear[0]/wow", 1),
|
wow0: props.globals.getNode("gear/gear[0]/wow", 1),
|
||||||
wow1: props.globals.getNode("/gear/gear[1]/wow", 1),
|
wow1: props.globals.getNode("gear/gear[1]/wow", 1),
|
||||||
wow1Temp: 1,
|
wow1Temp: 1,
|
||||||
wow2: props.globals.getNode("/gear/gear[2]/wow", 1),
|
wow2: props.globals.getNode("gear/gear[2]/wow", 1),
|
||||||
wow2Temp: 1,
|
wow2Temp: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
var Control = {
|
var Control = {
|
||||||
aileron: props.globals.getNode("/controls/flight/aileron", 1),
|
aileron: props.globals.getNode("controls/flight/aileron", 1),
|
||||||
elevator: props.globals.getNode("/controls/flight/elevator", 1),
|
elevator: props.globals.getNode("controls/flight/elevator", 1),
|
||||||
rudder: props.globals.getNode("/controls/flight/rudder", 1),
|
rudder: props.globals.getNode("controls/flight/rudder", 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
var Radio = {
|
var Radio = {
|
||||||
gsDefl: [props.globals.getNode("/instrumentation/nav[0]/gs-needle-deflection-norm", 1), props.globals.getNode("/instrumentation/nav[1]/gs-needle-deflection-norm", 1)],
|
gsDefl: [props.globals.getNode("instrumentation/nav[0]/gs-needle-deflection-norm", 1), props.globals.getNode("instrumentation/nav[1]/gs-needle-deflection-norm", 1)],
|
||||||
gsDeflTemp: 0,
|
gsDeflTemp: 0,
|
||||||
inRange: [props.globals.getNode("/instrumentation/nav[0]/in-range", 1), props.globals.getNode("/instrumentation/nav[1]/in-range", 1)],
|
inRange: [props.globals.getNode("instrumentation/nav[0]/in-range", 1), props.globals.getNode("instrumentation/nav[1]/in-range", 1)],
|
||||||
inRangeTemp: 0,
|
inRangeTemp: 0,
|
||||||
locDefl: [props.globals.getNode("/instrumentation/nav[0]/heading-needle-deflection-norm", 1), props.globals.getNode("/instrumentation/nav[1]/heading-needle-deflection-norm", 1)],
|
locDefl: [props.globals.getNode("instrumentation/nav[0]/heading-needle-deflection-norm", 1), props.globals.getNode("instrumentation/nav[1]/heading-needle-deflection-norm", 1)],
|
||||||
locDeflTemp: 0,
|
locDeflTemp: 0,
|
||||||
radioSel: 0,
|
radioSel: 0,
|
||||||
signalQuality: [props.globals.getNode("/instrumentation/nav[0]/signal-quality-norm", 1), props.globals.getNode("/instrumentation/nav[1]/signal-quality-norm", 1)],
|
signalQuality: [props.globals.getNode("instrumentation/nav[0]/signal-quality-norm", 1), props.globals.getNode("instrumentation/nav[1]/signal-quality-norm", 1)],
|
||||||
signalQualityTemp: 0,
|
signalQualityTemp: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
var FPLN = {
|
var FPLN = {
|
||||||
active: props.globals.getNode("/autopilot/route-manager/active", 1),
|
active: props.globals.getNode("autopilot/route-manager/active", 1),
|
||||||
activeTemp: 0,
|
activeTemp: 0,
|
||||||
currentCourse: 0,
|
currentCourse: 0,
|
||||||
currentWP: props.globals.getNode("/autopilot/route-manager/current-wp", 1),
|
currentWP: props.globals.getNode("autopilot/route-manager/current-wp", 1),
|
||||||
currentWPTemp: 0,
|
currentWPTemp: 0,
|
||||||
deltaAngle: 0,
|
deltaAngle: 0,
|
||||||
deltaAngleRad: 0,
|
deltaAngleRad: 0,
|
||||||
|
@ -59,22 +59,22 @@ var FPLN = {
|
||||||
maxBank: 0,
|
maxBank: 0,
|
||||||
maxBankLimit: 0,
|
maxBankLimit: 0,
|
||||||
nextCourse: 0,
|
nextCourse: 0,
|
||||||
num: props.globals.getNode("/autopilot/route-manager/route/num", 1),
|
num: props.globals.getNode("autopilot/route-manager/route/num", 1),
|
||||||
numTemp: 0,
|
numTemp: 0,
|
||||||
R: 0,
|
R: 0,
|
||||||
radius: 0,
|
radius: 0,
|
||||||
turnDist: 0,
|
turnDist: 0,
|
||||||
wp0Dist: props.globals.getNode("/autopilot/route-manager/wp/dist", 1),
|
wp0Dist: props.globals.getNode("autopilot/route-manager/wp/dist", 1),
|
||||||
wpFlyFrom: 0,
|
wpFlyFrom: 0,
|
||||||
wpFlyTo: 0,
|
wpFlyTo: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
var Misc = {
|
var Misc = {
|
||||||
acEss: props.globals.getNode("/systems/electrical/bus/ac-ess", 1),
|
acEss: props.globals.getNode("systems/electrical/bus/ac-ess", 1),
|
||||||
elapsedSec: props.globals.getNode("/sim/time/elapsed-sec", 1),
|
elapsedSec: props.globals.getNode("sim/time/elapsed-sec", 1),
|
||||||
fbwLaw: props.globals.getNode("/it-fbw/law", 1),
|
fbwLaw: props.globals.getNode("it-fbw/law", 1),
|
||||||
flapNorm: props.globals.getNode("/surface-positions/flap-pos-norm", 1),
|
flapNorm: props.globals.getNode("surface-positions/flap-pos-norm", 1),
|
||||||
pfdHeadingScale: props.globals.getNode("/instrumentation/pfd/heading-scale", 1),
|
pfdHeadingScale: props.globals.getNode("instrumentation/pfd/heading-scale", 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
# IT-AUTOFLIGHT
|
# IT-AUTOFLIGHT
|
||||||
|
@ -166,12 +166,12 @@ var Sound = {
|
||||||
# A3XX Custom
|
# A3XX Custom
|
||||||
var Custom = {
|
var Custom = {
|
||||||
apFdOn: 0,
|
apFdOn: 0,
|
||||||
hdgTime: props.globals.getNode("/modes/fcu/hdg-time", 1),
|
hdgTime: props.globals.getNode("modes/fcu/hdg-time", 1),
|
||||||
ndTrkSel: [props.globals.getNode("/instrumentation/efis[0]/trk-selected", 1), props.globals.getNode("/instrumentation/efis[1]/trk-selected", 1)],
|
ndTrkSel: [props.globals.getNode("instrumentation/efis[0]/trk-selected", 1), props.globals.getNode("instrumentation/efis[1]/trk-selected", 1)],
|
||||||
showHdg: props.globals.initNode("/it-autoflight/custom/show-hdg", 1, "BOOL"),
|
showHdg: props.globals.initNode("/it-autoflight/custom/show-hdg", 1, "BOOL"),
|
||||||
trkFpa: props.globals.initNode("/it-autoflight/custom/trk-fpa", 0, "BOOL"),
|
trkFpa: props.globals.initNode("/it-autoflight/custom/trk-fpa", 0, "BOOL"),
|
||||||
Input: {
|
Input: {
|
||||||
spdManaged: props.globals.getNode("/it-autoflight/input/spd-managed", 1),
|
spdManaged: props.globals.getNode("it-autoflight/input/spd-managed", 1),
|
||||||
},
|
},
|
||||||
Output: {
|
Output: {
|
||||||
fmaPower: props.globals.initNode("/it-autoflight/output/fma-pwr", 0, "BOOL"),
|
fmaPower: props.globals.initNode("/it-autoflight/output/fma-pwr", 0, "BOOL"),
|
||||||
|
@ -180,7 +180,7 @@ var Custom = {
|
||||||
athrOff: props.globals.initNode("/it-autoflight/sound/athrsound", 0, "BOOL"),
|
athrOff: props.globals.initNode("/it-autoflight/sound/athrsound", 0, "BOOL"),
|
||||||
enableAthrOff: 0,
|
enableAthrOff: 0,
|
||||||
},
|
},
|
||||||
ThrLock: props.globals.getNode("/systems/thrust/thr-locked", 1)
|
ThrLock: props.globals.getNode("systems/thrust/thr-locked", 1)
|
||||||
};
|
};
|
||||||
|
|
||||||
var ITAF = {
|
var ITAF = {
|
||||||
|
@ -358,9 +358,9 @@ var ITAF = {
|
||||||
# Preselect Heading
|
# Preselect Heading
|
||||||
if (Output.latTemp != 0 and Output.latTemp != 9) { # Modes that always show HDG
|
if (Output.latTemp != 0 and Output.latTemp != 9) { # Modes that always show HDG
|
||||||
if (Custom.hdgTime.getValue() + 45 >= Misc.elapsedSec.getValue()) {
|
if (Custom.hdgTime.getValue() + 45 >= Misc.elapsedSec.getValue()) {
|
||||||
setprop("/it-autoflight/custom/show-hdg", 1);
|
setprop("it-autoflight/custom/show-hdg", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/it-autoflight/custom/show-hdg", 0);
|
setprop("it-autoflight/custom/show-hdg", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,12 +404,12 @@ var ITAF = {
|
||||||
if (FPLN.wpFlyFrom < 0) {
|
if (FPLN.wpFlyFrom < 0) {
|
||||||
FPLN.wpFlyFrom = 0;
|
FPLN.wpFlyFrom = 0;
|
||||||
}
|
}
|
||||||
FPLN.currentCourse = getprop("/autopilot/route-manager/route/wp[" ~ FPLN.wpFlyFrom ~ "]/leg-bearing-true-deg"); # Best left at getprop
|
FPLN.currentCourse = getprop("autopilot/route-manager/route/wp[" ~ FPLN.wpFlyFrom ~ "]/leg-bearing-true-deg"); # Best left at getprop
|
||||||
FPLN.wpFlyTo = FPLN.currentWPTemp + 1;
|
FPLN.wpFlyTo = FPLN.currentWPTemp + 1;
|
||||||
if (FPLN.wpFlyTo < 0) {
|
if (FPLN.wpFlyTo < 0) {
|
||||||
FPLN.wpFlyTo = 0;
|
FPLN.wpFlyTo = 0;
|
||||||
}
|
}
|
||||||
FPLN.nextCourse = getprop("/autopilot/route-manager/route/wp[" ~ FPLN.wpFlyTo ~ "]/leg-bearing-true-deg"); # Best left at getprop
|
FPLN.nextCourse = getprop("autopilot/route-manager/route/wp[" ~ FPLN.wpFlyTo ~ "]/leg-bearing-true-deg"); # Best left at getprop
|
||||||
FPLN.maxBankLimit = Internal.bankLimit.getValue();
|
FPLN.maxBankLimit = Internal.bankLimit.getValue();
|
||||||
|
|
||||||
FPLN.deltaAngle = math.abs(geo.normdeg180(FPLN.currentCourse - FPLN.nextCourse));
|
FPLN.deltaAngle = math.abs(geo.normdeg180(FPLN.currentCourse - FPLN.nextCourse));
|
||||||
|
@ -1008,11 +1008,11 @@ setlistener("/sim/signals/fdm-initialized", func {
|
||||||
|
|
||||||
# For Canvas Nav Display.
|
# For Canvas Nav Display.
|
||||||
setlistener("/it-autoflight/input/hdg", func {
|
setlistener("/it-autoflight/input/hdg", func {
|
||||||
setprop("/autopilot/settings/heading-bug-deg", getprop("/it-autoflight/input/hdg"));
|
setprop("autopilot/settings/heading-bug-deg", getprop("it-autoflight/input/hdg"));
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/it-autoflight/internal/alt", func {
|
setlistener("/it-autoflight/internal/alt", func {
|
||||||
setprop("/autopilot/settings/target-altitude-ft", getprop("/it-autoflight/internal/alt"));
|
setprop("autopilot/settings/target-altitude-ft", getprop("it-autoflight/internal/alt"));
|
||||||
});
|
});
|
||||||
|
|
||||||
var loopTimer = maketimer(0.1, ITAF, ITAF.loop);
|
var loopTimer = maketimer(0.1, ITAF, ITAF.loop);
|
||||||
|
|
|
@ -3,37 +3,37 @@
|
||||||
|
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
||||||
|
|
||||||
setprop("/FMGC/internal/cruise-ft", 10000);
|
setprop("FMGC/internal/cruise-ft", 10000);
|
||||||
setprop("/it-autoflight/internal/alt", 10000);
|
setprop("it-autoflight/internal/alt", 10000);
|
||||||
setprop("/modes/pfd/fma/throttle-mode", " ");
|
setprop("modes/pfd/fma/throttle-mode", " ");
|
||||||
setprop("/modes/pfd/fma/pitch-mode", " ");
|
setprop("modes/pfd/fma/pitch-mode", " ");
|
||||||
setprop("/modes/pfd/fma/pitch-mode-armed", " ");
|
setprop("modes/pfd/fma/pitch-mode-armed", " ");
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
|
setprop("modes/pfd/fma/pitch-mode2-armed", " ");
|
||||||
setprop("/modes/pfd/fma/roll-mode", " ");
|
setprop("modes/pfd/fma/roll-mode", " ");
|
||||||
setprop("/modes/pfd/fma/roll-mode-armed", " ");
|
setprop("modes/pfd/fma/roll-mode-armed", " ");
|
||||||
setprop("/modes/pfd/fma/ap-mode", " ");
|
setprop("modes/pfd/fma/ap-mode", " ");
|
||||||
setprop("/modes/pfd/fma/fd-mode", " ");
|
setprop("modes/pfd/fma/fd-mode", " ");
|
||||||
setprop("/modes/pfd/fma/at-mode", " ");
|
setprop("modes/pfd/fma/at-mode", " ");
|
||||||
setprop("/modes/pfd/fma/athr-armed", 0);
|
setprop("modes/pfd/fma/athr-armed", 0);
|
||||||
setprop("/modes/pfd/fma/throttle-mode-box", 0);
|
setprop("modes/pfd/fma/throttle-mode-box", 0);
|
||||||
setprop("/modes/pfd/fma/pitch-mode-box", 0);
|
setprop("modes/pfd/fma/pitch-mode-box", 0);
|
||||||
setprop("/modes/pfd/fma/pitch-mode-armed-box", 0);
|
setprop("modes/pfd/fma/pitch-mode-armed-box", 0);
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed-box", 0);
|
setprop("modes/pfd/fma/pitch-mode2-armed-box", 0);
|
||||||
setprop("/modes/pfd/fma/roll-mode-box", 0);
|
setprop("modes/pfd/fma/roll-mode-box", 0);
|
||||||
setprop("/modes/pfd/fma/roll-mode-armed-box", 0);
|
setprop("modes/pfd/fma/roll-mode-armed-box", 0);
|
||||||
setprop("/modes/pfd/fma/ap-mode-box", 0);
|
setprop("modes/pfd/fma/ap-mode-box", 0);
|
||||||
setprop("/modes/pfd/fma/fd-mode-box", 0);
|
setprop("modes/pfd/fma/fd-mode-box", 0);
|
||||||
setprop("/modes/pfd/fma/athr-mode-box", 0);
|
setprop("modes/pfd/fma/athr-mode-box", 0);
|
||||||
setprop("/modes/pfd/fma/throttle-mode-time", 0);
|
setprop("modes/pfd/fma/throttle-mode-time", 0);
|
||||||
setprop("/modes/pfd/fma/pitch-mode-time", 0);
|
setprop("modes/pfd/fma/pitch-mode-time", 0);
|
||||||
setprop("/modes/pfd/fma/pitch-mode-armed-time", 0);
|
setprop("modes/pfd/fma/pitch-mode-armed-time", 0);
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed-time", 0);
|
setprop("modes/pfd/fma/pitch-mode2-armed-time", 0);
|
||||||
setprop("/modes/pfd/fma/roll-mode-time", 0);
|
setprop("modes/pfd/fma/roll-mode-time", 0);
|
||||||
setprop("/modes/pfd/fma/roll-mode-armed-time", 0);
|
setprop("modes/pfd/fma/roll-mode-armed-time", 0);
|
||||||
setprop("/modes/pfd/fma/ap-mode-time", 0);
|
setprop("modes/pfd/fma/ap-mode-time", 0);
|
||||||
setprop("/modes/pfd/fma/fd-mode-time", 0);
|
setprop("modes/pfd/fma/fd-mode-time", 0);
|
||||||
setprop("/modes/pfd/fma/athr-mode-time", 0);
|
setprop("modes/pfd/fma/athr-mode-time", 0);
|
||||||
setprop("/modes/fcu/hdg-time", -45);
|
setprop("modes/fcu/hdg-time", -45);
|
||||||
|
|
||||||
setlistener("sim/signals/fdm-initialized", func {
|
setlistener("sim/signals/fdm-initialized", func {
|
||||||
loopFMA.start();
|
loopFMA.start();
|
||||||
|
@ -41,51 +41,51 @@ setlistener("sim/signals/fdm-initialized", func {
|
||||||
|
|
||||||
# Master Thrust
|
# Master Thrust
|
||||||
var loopFMA = maketimer(0.05, func {
|
var loopFMA = maketimer(0.05, func {
|
||||||
var state1 = getprop("/systems/thrust/state1");
|
var state1 = getprop("systems/thrust/state1");
|
||||||
var state2 = getprop("/systems/thrust/state2");
|
var state2 = getprop("systems/thrust/state2");
|
||||||
var newthr = getprop("/modes/pfd/fma/throttle-mode");
|
var newthr = getprop("modes/pfd/fma/throttle-mode");
|
||||||
var thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
|
var thr1 = getprop("controls/engines/engine[0]/throttle-pos");
|
||||||
var thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
|
var thr2 = getprop("controls/engines/engine[1]/throttle-pos");
|
||||||
if (state1 == "TOGA" or state2 == "TOGA") {
|
if (state1 == "TOGA" or state2 == "TOGA") {
|
||||||
if (newthr != " ") {
|
if (newthr != " ") {
|
||||||
setprop("/modes/pfd/fma/throttle-mode", " ");
|
setprop("modes/pfd/fma/throttle-mode", " ");
|
||||||
}
|
}
|
||||||
} else if ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)) {
|
} else if ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)) {
|
||||||
if (newthr != " ") {
|
if (newthr != " ") {
|
||||||
setprop("/modes/pfd/fma/throttle-mode", " ");
|
setprop("modes/pfd/fma/throttle-mode", " ");
|
||||||
}
|
}
|
||||||
} else if ((state1 == "MCT" or state2 == "MCT") and getprop("/systems/thrust/eng-out") != 1) {
|
} else if ((state1 == "MCT" or state2 == "MCT") and getprop("systems/thrust/eng-out") != 1) {
|
||||||
if (newthr != " ") {
|
if (newthr != " ") {
|
||||||
setprop("/modes/pfd/fma/throttle-mode", " ");
|
setprop("modes/pfd/fma/throttle-mode", " ");
|
||||||
}
|
}
|
||||||
} else if (((state1 == "MAN THR" and thr1 < 0.83) or (state2 == "MAN THR" and thr2 < 0.83)) and getprop("/systems/thrust/eng-out") != 1) {
|
} else if (((state1 == "MAN THR" and thr1 < 0.83) or (state2 == "MAN THR" and thr2 < 0.83)) and getprop("systems/thrust/eng-out") != 1) {
|
||||||
if (newthr != " ") {
|
if (newthr != " ") {
|
||||||
setprop("/modes/pfd/fma/throttle-mode", " ");
|
setprop("modes/pfd/fma/throttle-mode", " ");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((getprop("/it-autoflight/output/vert") == 4) or (getprop("/it-autoflight/output/vert") == 6) or (getprop("/it-autoflight/output/vert") == 7) or (getprop("/it-autoflight/output/vert") == 8)) {
|
if ((getprop("it-autoflight/output/vert") == 4) or (getprop("it-autoflight/output/vert") == 6) or (getprop("it-autoflight/output/vert") == 7) or (getprop("it-autoflight/output/vert") == 8)) {
|
||||||
if (getprop("/it-autoflight/output/fd1") == 0 and getprop("/it-autoflight/output/fd2") == 0 and getprop("/it-autoflight/output/ap1") == 0 and getprop("/it-autoflight/output/ap2") == 0) {
|
if (getprop("it-autoflight/output/fd1") == 0 and getprop("it-autoflight/output/fd2") == 0 and getprop("it-autoflight/output/ap1") == 0 and getprop("it-autoflight/output/ap2") == 0) {
|
||||||
loopFMA_b();
|
loopFMA_b();
|
||||||
} else {
|
} else {
|
||||||
var thr = getprop("/it-autoflight/output/thr-mode");
|
var thr = getprop("it-autoflight/output/thr-mode");
|
||||||
if (thr == 0) {
|
if (thr == 0) {
|
||||||
loopFMA_b();
|
loopFMA_b();
|
||||||
} else if (thr == 1) {
|
} else if (thr == 1) {
|
||||||
if (newthr != "THR IDLE") {
|
if (newthr != "THR IDLE") {
|
||||||
setprop("/modes/pfd/fma/throttle-mode", "THR IDLE");
|
setprop("modes/pfd/fma/throttle-mode", "THR IDLE");
|
||||||
}
|
}
|
||||||
} else if (thr == 2) {
|
} else if (thr == 2) {
|
||||||
if (state1 == "MCT" or state2 == "MCT" and getprop("/systems/thrust/eng-out") == 1) {
|
if (state1 == "MCT" or state2 == "MCT" and getprop("systems/thrust/eng-out") == 1) {
|
||||||
if (newthr != "THR MCT") {
|
if (newthr != "THR MCT") {
|
||||||
setprop("/modes/pfd/fma/throttle-mode", "THR MCT");
|
setprop("modes/pfd/fma/throttle-mode", "THR MCT");
|
||||||
}
|
}
|
||||||
} else if (state1 == "CL" or state2 == "CL") {
|
} else if (state1 == "CL" or state2 == "CL") {
|
||||||
if (newthr != "THR CLB") {
|
if (newthr != "THR CLB") {
|
||||||
setprop("/modes/pfd/fma/throttle-mode", "THR CLB");
|
setprop("modes/pfd/fma/throttle-mode", "THR CLB");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (newthr != "THR LVR") {
|
if (newthr != "THR LVR") {
|
||||||
setprop("/modes/pfd/fma/throttle-mode", "THR LVR");
|
setprop("modes/pfd/fma/throttle-mode", "THR LVR");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,164 +96,164 @@ var loopFMA = maketimer(0.05, func {
|
||||||
}
|
}
|
||||||
|
|
||||||
# A/THR Armed/Active
|
# A/THR Armed/Active
|
||||||
if (getprop("/it-autoflight/output/athr") == 1 and (state1 == "MAN THR" or state2 == "MAN THR" or state1 == "MCT" or state2 == "MCT" or state1 == "TOGA" or state2 == "TOGA") and getprop("/systems/thrust/eng-out") != 1) {
|
if (getprop("it-autoflight/output/athr") == 1 and (state1 == "MAN THR" or state2 == "MAN THR" or state1 == "MCT" or state2 == "MCT" or state1 == "TOGA" or state2 == "TOGA") and getprop("systems/thrust/eng-out") != 1) {
|
||||||
if (getprop("/modes/pfd/fma/athr-armed") != 1) {
|
if (getprop("modes/pfd/fma/athr-armed") != 1) {
|
||||||
setprop("/modes/pfd/fma/athr-armed", 1);
|
setprop("modes/pfd/fma/athr-armed", 1);
|
||||||
}
|
}
|
||||||
} else if (getprop("/it-autoflight/output/athr") == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83) or (state1 == "MCT" and getprop("/controls/engines/thrust-limit") == "FLX") or
|
} else if (getprop("it-autoflight/output/athr") == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83) or (state1 == "MCT" and getprop("controls/engines/thrust-limit") == "FLX") or
|
||||||
(state2 == "MCT" and getprop("/controls/engines/thrust-limit") == "FLX") or state1 == "TOGA" or state2 == "TOGA") and getprop("/systems/thrust/eng-out") == 1) {
|
(state2 == "MCT" and getprop("controls/engines/thrust-limit") == "FLX") or state1 == "TOGA" or state2 == "TOGA") and getprop("systems/thrust/eng-out") == 1) {
|
||||||
if (getprop("/modes/pfd/fma/athr-armed") != 1) {
|
if (getprop("modes/pfd/fma/athr-armed") != 1) {
|
||||||
setprop("/modes/pfd/fma/athr-armed", 1);
|
setprop("modes/pfd/fma/athr-armed", 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/modes/pfd/fma/athr-armed") != 0) {
|
if (getprop("modes/pfd/fma/athr-armed") != 0) {
|
||||||
setprop("/modes/pfd/fma/athr-armed", 0);
|
setprop("modes/pfd/fma/athr-armed", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# SRS RWY Engagement
|
# SRS RWY Engagement
|
||||||
var flx = getprop("/systems/thrust/lim-flex");
|
var flx = getprop("systems/thrust/lim-flex");
|
||||||
var lat = getprop("/it-autoflight/mode/lat");
|
var lat = getprop("it-autoflight/mode/lat");
|
||||||
var newlat = getprop("/modes/pfd/fma/roll-mode");
|
var newlat = getprop("modes/pfd/fma/roll-mode");
|
||||||
var vert = getprop("/it-autoflight/mode/vert");
|
var vert = getprop("it-autoflight/mode/vert");
|
||||||
var newvert = getprop("/modes/pfd/fma/pitch-mode");
|
var newvert = getprop("modes/pfd/fma/pitch-mode");
|
||||||
var newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
|
var newvertarm = getprop("modes/pfd/fma/pitch-mode2-armed");
|
||||||
var thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
|
var thr1 = getprop("controls/engines/engine[0]/throttle-pos");
|
||||||
var thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
|
var thr2 = getprop("controls/engines/engine[1]/throttle-pos");
|
||||||
var wow = getprop("/gear/gear[0]/wow");
|
var wow = getprop("gear/gear[0]/wow");
|
||||||
var engstate1 = getprop("/engines/engine[0]/state");
|
var engstate1 = getprop("engines/engine[0]/state");
|
||||||
var engstate2 = getprop("/engines/engine[1]/state");
|
var engstate2 = getprop("engines/engine[1]/state");
|
||||||
if (((state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)))) and (engstate1 == 3 or engstate2 == 3)) {
|
if (((state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)))) and (engstate1 == 3 or engstate2 == 3)) {
|
||||||
# RWY Engagement would go here, but automatic ILS selection is not simulated yet.
|
# RWY Engagement would go here, but automatic ILS selection is not simulated yet.
|
||||||
if (wow and getprop("/FMGC/internal/v2-set") == 1 and getprop("/it-autoflight/output/vert") != 7) {
|
if (wow and getprop("FMGC/internal/v2-set") == 1 and getprop("it-autoflight/output/vert") != 7) {
|
||||||
ITAF.setVertMode(7);
|
ITAF.setVertMode(7);
|
||||||
setprop("/it-autoflight/mode/vert", "T/O CLB");
|
setprop("it-autoflight/mode/vert", "T/O CLB");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var gear1 = getprop("/gear/gear[1]/wow");
|
var gear1 = getprop("gear/gear[1]/wow");
|
||||||
var gear2 = getprop("/gear/gear[2]/wow");
|
var gear2 = getprop("gear/gear[2]/wow");
|
||||||
if (getprop("/it-autoflight/input/lat") == 5 and (gear1 or gear2)) {
|
if (getprop("it-autoflight/input/lat") == 5 and (gear1 or gear2)) {
|
||||||
ITAF.setLatMode(9);
|
ITAF.setLatMode(9);
|
||||||
}
|
}
|
||||||
if (getprop("/it-autoflight/output/vert") == 7 and (gear1 or gear2)) {
|
if (getprop("it-autoflight/output/vert") == 7 and (gear1 or gear2)) {
|
||||||
ITAF.setVertMode(9);
|
ITAF.setVertMode(9);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var trk = getprop("/it-autoflight/custom/trk-fpa");
|
var trk = getprop("it-autoflight/custom/trk-fpa");
|
||||||
if (lat == "HDG" and trk == 0) {
|
if (lat == "HDG" and trk == 0) {
|
||||||
if (newlat != "HDG") {
|
if (newlat != "HDG") {
|
||||||
setprop("/modes/pfd/fma/roll-mode", "HDG");
|
setprop("modes/pfd/fma/roll-mode", "HDG");
|
||||||
}
|
}
|
||||||
} else if (lat == "HDG" and trk == 1) {
|
} else if (lat == "HDG" and trk == 1) {
|
||||||
if (newlat != "TRACK") {
|
if (newlat != "TRACK") {
|
||||||
setprop("/modes/pfd/fma/roll-mode", "TRACK");
|
setprop("modes/pfd/fma/roll-mode", "TRACK");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Boxes
|
# Boxes
|
||||||
var elapsedtime = getprop("/sim/time/elapsed-sec");
|
var elapsedtime = getprop("sim/time/elapsed-sec");
|
||||||
if (getprop("/modes/pfd/fma/ap-mode-time") + 10 >= elapsedtime) {
|
if (getprop("modes/pfd/fma/ap-mode-time") + 10 >= elapsedtime) {
|
||||||
setprop("/modes/pfd/fma/ap-mode-box", 1);
|
setprop("modes/pfd/fma/ap-mode-box", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/modes/pfd/fma/ap-mode-box", 0);
|
setprop("modes/pfd/fma/ap-mode-box", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/modes/pfd/fma/fd-mode-time") + 10 >= elapsedtime) {
|
if (getprop("modes/pfd/fma/fd-mode-time") + 10 >= elapsedtime) {
|
||||||
setprop("/modes/pfd/fma/fd-mode-box", 1);
|
setprop("modes/pfd/fma/fd-mode-box", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/modes/pfd/fma/fd-mode-box", 0);
|
setprop("modes/pfd/fma/fd-mode-box", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/modes/pfd/fma/athr-mode-time") + 10 >= elapsedtime) {
|
if (getprop("modes/pfd/fma/athr-mode-time") + 10 >= elapsedtime) {
|
||||||
setprop("/modes/pfd/fma/athr-mode-box", 1);
|
setprop("modes/pfd/fma/athr-mode-box", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/modes/pfd/fma/athr-mode-box", 0);
|
setprop("modes/pfd/fma/athr-mode-box", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/modes/pfd/fma/throttle-mode-time") + 10 >= elapsedtime) {
|
if (getprop("modes/pfd/fma/throttle-mode-time") + 10 >= elapsedtime) {
|
||||||
setprop("/modes/pfd/fma/throttle-mode-box", 1);
|
setprop("modes/pfd/fma/throttle-mode-box", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/modes/pfd/fma/throttle-mode-box", 0);
|
setprop("modes/pfd/fma/throttle-mode-box", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/modes/pfd/fma/roll-mode-time") + 10 >= elapsedtime) {
|
if (getprop("modes/pfd/fma/roll-mode-time") + 10 >= elapsedtime) {
|
||||||
setprop("/modes/pfd/fma/roll-mode-box", 1);
|
setprop("modes/pfd/fma/roll-mode-box", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/modes/pfd/fma/roll-mode-box", 0);
|
setprop("modes/pfd/fma/roll-mode-box", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/modes/pfd/fma/pitch-mode-time") + 10 >= elapsedtime) {
|
if (getprop("modes/pfd/fma/pitch-mode-time") + 10 >= elapsedtime) {
|
||||||
setprop("/modes/pfd/fma/pitch-mode-box", 1);
|
setprop("modes/pfd/fma/pitch-mode-box", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/modes/pfd/fma/pitch-mode-box", 0);
|
setprop("modes/pfd/fma/pitch-mode-box", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/modes/pfd/fma/roll-mode-armed-time") + 10 >= elapsedtime) {
|
if (getprop("modes/pfd/fma/roll-mode-armed-time") + 10 >= elapsedtime) {
|
||||||
setprop("/modes/pfd/fma/roll-mode-armed-box", 1);
|
setprop("modes/pfd/fma/roll-mode-armed-box", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/modes/pfd/fma/roll-mode-armed-box", 0);
|
setprop("modes/pfd/fma/roll-mode-armed-box", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/modes/pfd/fma/pitch-mode-armed-time") + 10 >= elapsedtime) {
|
if (getprop("modes/pfd/fma/pitch-mode-armed-time") + 10 >= elapsedtime) {
|
||||||
setprop("/modes/pfd/fma/pitch-mode-armed-box", 1);
|
setprop("modes/pfd/fma/pitch-mode-armed-box", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/modes/pfd/fma/pitch-mode-armed-box", 0);
|
setprop("modes/pfd/fma/pitch-mode-armed-box", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/modes/pfd/fma/pitch-mode2-armed-time") + 10 >= elapsedtime) {
|
if (getprop("modes/pfd/fma/pitch-mode2-armed-time") + 10 >= elapsedtime) {
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed-box", 1);
|
setprop("modes/pfd/fma/pitch-mode2-armed-box", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed-box", 0);
|
setprop("modes/pfd/fma/pitch-mode2-armed-box", 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var loopFMA_b = func {
|
var loopFMA_b = func {
|
||||||
var newthr = getprop("/modes/pfd/fma/throttle-mode");
|
var newthr = getprop("modes/pfd/fma/throttle-mode");
|
||||||
if (getprop("/it-autoflight/input/kts-mach") == 0) {
|
if (getprop("it-autoflight/input/kts-mach") == 0) {
|
||||||
if (newthr != "SPEED") {
|
if (newthr != "SPEED") {
|
||||||
setprop("/modes/pfd/fma/throttle-mode", "SPEED");
|
setprop("modes/pfd/fma/throttle-mode", "SPEED");
|
||||||
}
|
}
|
||||||
} else if (getprop("/it-autoflight/input/kts-mach") == 1) {
|
} else if (getprop("it-autoflight/input/kts-mach") == 1) {
|
||||||
if (newthr != "MACH") {
|
if (newthr != "MACH") {
|
||||||
setprop("/modes/pfd/fma/throttle-mode", "MACH");
|
setprop("modes/pfd/fma/throttle-mode", "MACH");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Master Lateral
|
# Master Lateral
|
||||||
setlistener("/it-autoflight/mode/lat", func {
|
setlistener("/it-autoflight/mode/lat", func {
|
||||||
var lat = getprop("/it-autoflight/mode/lat");
|
var lat = getprop("it-autoflight/mode/lat");
|
||||||
var newlat = getprop("/modes/pfd/fma/roll-mode");
|
var newlat = getprop("modes/pfd/fma/roll-mode");
|
||||||
if (lat == "LNAV") {
|
if (lat == "LNAV") {
|
||||||
if (newlat != "NAV") {
|
if (newlat != "NAV") {
|
||||||
setprop("/modes/pfd/fma/roll-mode", "NAV");
|
setprop("modes/pfd/fma/roll-mode", "NAV");
|
||||||
}
|
}
|
||||||
} else if (lat == "LOC") {
|
} else if (lat == "LOC") {
|
||||||
if (newlat != "LOC*" and newlat != "LOC") {
|
if (newlat != "LOC*" and newlat != "LOC") {
|
||||||
setprop("/modes/pfd/fma/roll-mode", "LOC*");
|
setprop("modes/pfd/fma/roll-mode", "LOC*");
|
||||||
locupdate.start();
|
locupdate.start();
|
||||||
}
|
}
|
||||||
} else if (lat == "ALGN") {
|
} else if (lat == "ALGN") {
|
||||||
if (newlat != " ") {
|
if (newlat != " ") {
|
||||||
setprop("/modes/pfd/fma/roll-mode", " ");
|
setprop("modes/pfd/fma/roll-mode", " ");
|
||||||
}
|
}
|
||||||
} else if (lat == "RLOU") {
|
} else if (lat == "RLOU") {
|
||||||
if (newlat != " ") {
|
if (newlat != " ") {
|
||||||
setprop("/modes/pfd/fma/roll-mode", " ");
|
setprop("modes/pfd/fma/roll-mode", " ");
|
||||||
}
|
}
|
||||||
} else if (lat == "T/O") {
|
} else if (lat == "T/O") {
|
||||||
if (newlat != "RWY") {
|
if (newlat != "RWY") {
|
||||||
setprop("/modes/pfd/fma/roll-mode", "RWY");
|
setprop("modes/pfd/fma/roll-mode", "RWY");
|
||||||
}
|
}
|
||||||
} else if (lat == " ") {
|
} else if (lat == " ") {
|
||||||
if (newlat != " ") {
|
if (newlat != " ") {
|
||||||
setprop("/modes/pfd/fma/roll-mode", " ");
|
setprop("modes/pfd/fma/roll-mode", " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var locupdate = maketimer(0.5, func {
|
var locupdate = maketimer(0.5, func {
|
||||||
var lat = getprop("/it-autoflight/mode/lat");
|
var lat = getprop("it-autoflight/mode/lat");
|
||||||
var newlat = getprop("/modes/pfd/fma/roll-mode");
|
var newlat = getprop("modes/pfd/fma/roll-mode");
|
||||||
var nav_defl = getprop("/instrumentation/nav[0]/heading-needle-deflection-norm");
|
var nav_defl = getprop("instrumentation/nav[0]/heading-needle-deflection-norm");
|
||||||
if (lat == "LOC") {
|
if (lat == "LOC") {
|
||||||
if (nav_defl > -0.06 and nav_defl < 0.06) {
|
if (nav_defl > -0.06 and nav_defl < 0.06) {
|
||||||
locupdate.stop();
|
locupdate.stop();
|
||||||
if (newlat != "LOC") {
|
if (newlat != "LOC") {
|
||||||
setprop("/modes/pfd/fma/roll-mode", "LOC");
|
setprop("modes/pfd/fma/roll-mode", "LOC");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -261,82 +261,82 @@ var locupdate = maketimer(0.5, func {
|
||||||
|
|
||||||
# Master Vertical
|
# Master Vertical
|
||||||
setlistener("/it-autoflight/mode/vert", func {
|
setlistener("/it-autoflight/mode/vert", func {
|
||||||
var vert = getprop("/it-autoflight/mode/vert");
|
var vert = getprop("it-autoflight/mode/vert");
|
||||||
var newvert = getprop("/modes/pfd/fma/pitch-mode");
|
var newvert = getprop("modes/pfd/fma/pitch-mode");
|
||||||
var newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
|
var newvertarm = getprop("modes/pfd/fma/pitch-mode2-armed");
|
||||||
if (vert == "ALT HLD") {
|
if (vert == "ALT HLD") {
|
||||||
altvert();
|
altvert();
|
||||||
if (newvertarm != " ") {
|
if (newvertarm != " ") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
|
setprop("modes/pfd/fma/pitch-mode2-armed", " ");
|
||||||
}
|
}
|
||||||
} else if (vert == "ALT CAP") {
|
} else if (vert == "ALT CAP") {
|
||||||
altvert();
|
altvert();
|
||||||
if (newvertarm != " ") {
|
if (newvertarm != " ") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
|
setprop("modes/pfd/fma/pitch-mode2-armed", " ");
|
||||||
}
|
}
|
||||||
} else if (vert == "V/S") {
|
} else if (vert == "V/S") {
|
||||||
if (newvert != "V/S") {
|
if (newvert != "V/S") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", "V/S");
|
setprop("modes/pfd/fma/pitch-mode", "V/S");
|
||||||
}
|
}
|
||||||
if (newvertarm != "ALT") {
|
if (newvertarm != "ALT") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
|
setprop("modes/pfd/fma/pitch-mode2-armed", "ALT");
|
||||||
}
|
}
|
||||||
} else if (vert == "G/S") {
|
} else if (vert == "G/S") {
|
||||||
if (newvert != "G/S*" and newvert != "G/S") {
|
if (newvert != "G/S*" and newvert != "G/S") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", "G/S*");
|
setprop("modes/pfd/fma/pitch-mode", "G/S*");
|
||||||
gsupdate.start();
|
gsupdate.start();
|
||||||
}
|
}
|
||||||
if (newvertarm != " ") {
|
if (newvertarm != " ") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
|
setprop("modes/pfd/fma/pitch-mode2-armed", " ");
|
||||||
}
|
}
|
||||||
} else if (vert == "SPD CLB") {
|
} else if (vert == "SPD CLB") {
|
||||||
if (newvert != "OP CLB") {
|
if (newvert != "OP CLB") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", "OP CLB");
|
setprop("modes/pfd/fma/pitch-mode", "OP CLB");
|
||||||
}
|
}
|
||||||
if (newvertarm != "ALT") {
|
if (newvertarm != "ALT") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
|
setprop("modes/pfd/fma/pitch-mode2-armed", "ALT");
|
||||||
}
|
}
|
||||||
} else if (vert == "SPD DES") {
|
} else if (vert == "SPD DES") {
|
||||||
if (newvert != "OP DES") {
|
if (newvert != "OP DES") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", "OP DES");
|
setprop("modes/pfd/fma/pitch-mode", "OP DES");
|
||||||
}
|
}
|
||||||
if (newvertarm != "ALT") {
|
if (newvertarm != "ALT") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
|
setprop("modes/pfd/fma/pitch-mode2-armed", "ALT");
|
||||||
}
|
}
|
||||||
} else if (vert == "FPA") {
|
} else if (vert == "FPA") {
|
||||||
if (newvert != "FPA") {
|
if (newvert != "FPA") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", "FPA");
|
setprop("modes/pfd/fma/pitch-mode", "FPA");
|
||||||
}
|
}
|
||||||
if (newvertarm != "ALT") {
|
if (newvertarm != "ALT") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
|
setprop("modes/pfd/fma/pitch-mode2-armed", "ALT");
|
||||||
}
|
}
|
||||||
} else if (vert == "LAND") {
|
} else if (vert == "LAND") {
|
||||||
if (newvert != "LAND") {
|
if (newvert != "LAND") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", "LAND");
|
setprop("modes/pfd/fma/pitch-mode", "LAND");
|
||||||
}
|
}
|
||||||
} else if (vert == "FLARE") {
|
} else if (vert == "FLARE") {
|
||||||
if (newvert != "FLARE") {
|
if (newvert != "FLARE") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", "FLARE");
|
setprop("modes/pfd/fma/pitch-mode", "FLARE");
|
||||||
}
|
}
|
||||||
} else if (vert == "ROLLOUT") {
|
} else if (vert == "ROLLOUT") {
|
||||||
if (newvert != "ROLL OUT") {
|
if (newvert != "ROLL OUT") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", "ROLL OUT");
|
setprop("modes/pfd/fma/pitch-mode", "ROLL OUT");
|
||||||
}
|
}
|
||||||
} else if (vert == "T/O CLB") {
|
} else if (vert == "T/O CLB") {
|
||||||
if (newvert != "SRS") {
|
if (newvert != "SRS") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", "SRS");
|
setprop("modes/pfd/fma/pitch-mode", "SRS");
|
||||||
}
|
}
|
||||||
updatePitchArm2();
|
updatePitchArm2();
|
||||||
} else if (vert == "G/A CLB") {
|
} else if (vert == "G/A CLB") {
|
||||||
if (newvert != "SRS") {
|
if (newvert != "SRS") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", "SRS");
|
setprop("modes/pfd/fma/pitch-mode", "SRS");
|
||||||
}
|
}
|
||||||
if (newvertarm != "ALT") {
|
if (newvertarm != "ALT") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
|
setprop("modes/pfd/fma/pitch-mode2-armed", "ALT");
|
||||||
}
|
}
|
||||||
} else if (vert == " ") {
|
} else if (vert == " ") {
|
||||||
if (newvert != " ") {
|
if (newvert != " ") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", " ");
|
setprop("modes/pfd/fma/pitch-mode", " ");
|
||||||
}
|
}
|
||||||
updatePitchArm2();
|
updatePitchArm2();
|
||||||
}
|
}
|
||||||
|
@ -348,52 +348,52 @@ setlistener("/FMGC/internal/v2-set", func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var updatePitchArm2 = func {
|
var updatePitchArm2 = func {
|
||||||
var newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
|
var newvertarm = getprop("modes/pfd/fma/pitch-mode2-armed");
|
||||||
if (newvertarm != "CLB" and getprop("/FMGC/internal/v2-set") == 1) {
|
if (newvertarm != "CLB" and getprop("FMGC/internal/v2-set") == 1) {
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed", "CLB");
|
setprop("modes/pfd/fma/pitch-mode2-armed", "CLB");
|
||||||
} else if (newvertarm != " " and getprop("/FMGC/internal/v2-set") != 1) {
|
} else if (newvertarm != " " and getprop("FMGC/internal/v2-set") != 1) {
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
|
setprop("modes/pfd/fma/pitch-mode2-armed", " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var gsupdate = maketimer(0.5, func {
|
var gsupdate = maketimer(0.5, func {
|
||||||
var vert = getprop("/it-autoflight/mode/vert");
|
var vert = getprop("it-autoflight/mode/vert");
|
||||||
var newvert = getprop("/modes/pfd/fma/pitch-mode");
|
var newvert = getprop("modes/pfd/fma/pitch-mode");
|
||||||
var gs_defl = getprop("/instrumentation/nav[0]/gs-needle-deflection-norm");
|
var gs_defl = getprop("instrumentation/nav[0]/gs-needle-deflection-norm");
|
||||||
if (vert == "G/S") {
|
if (vert == "G/S") {
|
||||||
if (gs_defl > -0.06 and gs_defl < 0.06) {
|
if (gs_defl > -0.06 and gs_defl < 0.06) {
|
||||||
gsupdate.stop();
|
gsupdate.stop();
|
||||||
if (newvert != "G/S") {
|
if (newvert != "G/S") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", "G/S");
|
setprop("modes/pfd/fma/pitch-mode", "G/S");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var altvert = func {
|
var altvert = func {
|
||||||
var FMGCalt = getprop("/FMGC/internal/cruise-ft");
|
var FMGCalt = getprop("FMGC/internal/cruise-ft");
|
||||||
var MCPalt = getprop("/it-autoflight/internal/alt");
|
var MCPalt = getprop("it-autoflight/internal/alt");
|
||||||
var ALTdif = abs(FMGCalt - MCPalt);
|
var ALTdif = abs(FMGCalt - MCPalt);
|
||||||
var vert = getprop("/it-autoflight/mode/vert");
|
var vert = getprop("it-autoflight/mode/vert");
|
||||||
var newvert = getprop("/modes/pfd/fma/pitch-mode");
|
var newvert = getprop("modes/pfd/fma/pitch-mode");
|
||||||
if (ALTdif <= 20) {
|
if (ALTdif <= 20) {
|
||||||
if (vert == "ALT HLD") {
|
if (vert == "ALT HLD") {
|
||||||
if (newvert != "ALT CRZ") {
|
if (newvert != "ALT CRZ") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", "ALT CRZ");
|
setprop("modes/pfd/fma/pitch-mode", "ALT CRZ");
|
||||||
}
|
}
|
||||||
} else if (vert == "ALT CAP") {
|
} else if (vert == "ALT CAP") {
|
||||||
if (newvert != "ALT CRZ*") {
|
if (newvert != "ALT CRZ*") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", "ALT CRZ*");
|
setprop("modes/pfd/fma/pitch-mode", "ALT CRZ*");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (vert == "ALT HLD") {
|
if (vert == "ALT HLD") {
|
||||||
if (newvert != "ALT") {
|
if (newvert != "ALT") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", "ALT");
|
setprop("modes/pfd/fma/pitch-mode", "ALT");
|
||||||
}
|
}
|
||||||
} else if (vert == "ALT CAP") {
|
} else if (vert == "ALT CAP") {
|
||||||
if (newvert != "ALT*") {
|
if (newvert != "ALT*") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode", "ALT*");
|
setprop("modes/pfd/fma/pitch-mode", "ALT*");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -403,123 +403,123 @@ setlistener("/FMGC/internal/cruise-ft", altvert);
|
||||||
|
|
||||||
# Arm HDG or NAV
|
# Arm HDG or NAV
|
||||||
setlistener("/it-autoflight/mode/arm", func {
|
setlistener("/it-autoflight/mode/arm", func {
|
||||||
var arm = getprop("/it-autoflight/mode/arm");
|
var arm = getprop("it-autoflight/mode/arm");
|
||||||
var newarm = getprop("/modes/pfd/fma/roll-mode-armed");
|
var newarm = getprop("modes/pfd/fma/roll-mode-armed");
|
||||||
if (arm == "HDG") {
|
if (arm == "HDG") {
|
||||||
if (newarm != "HDG") {
|
if (newarm != "HDG") {
|
||||||
setprop("/modes/pfd/fma/roll-mode-armed", " ");
|
setprop("modes/pfd/fma/roll-mode-armed", " ");
|
||||||
}
|
}
|
||||||
} else if (arm == "LNV") {
|
} else if (arm == "LNV") {
|
||||||
if (newarm != "NAV") {
|
if (newarm != "NAV") {
|
||||||
setprop("/modes/pfd/fma/roll-mode-armed", "NAV");
|
setprop("modes/pfd/fma/roll-mode-armed", "NAV");
|
||||||
}
|
}
|
||||||
} else if (arm == " ") {
|
} else if (arm == " ") {
|
||||||
if (newarm != " ") {
|
if (newarm != " ") {
|
||||||
setprop("/modes/pfd/fma/roll-mode-armed", " ");
|
setprop("modes/pfd/fma/roll-mode-armed", " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
# Arm LOC
|
# Arm LOC
|
||||||
setlistener("/it-autoflight/output/loc-armed", func {
|
setlistener("/it-autoflight/output/loc-armed", func {
|
||||||
var loca = getprop("/it-autoflight/output/loc-armed");
|
var loca = getprop("it-autoflight/output/loc-armed");
|
||||||
var newarm = getprop("/modes/pfd/fma/roll-mode-armed");
|
var newarm = getprop("modes/pfd/fma/roll-mode-armed");
|
||||||
if (loca) {
|
if (loca) {
|
||||||
if (newarm != "LOC") {
|
if (newarm != "LOC") {
|
||||||
setprop("/modes/pfd/fma/roll-mode-armed", "LOC");
|
setprop("modes/pfd/fma/roll-mode-armed", "LOC");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (newarm != " ") {
|
if (newarm != " ") {
|
||||||
setprop("/modes/pfd/fma/roll-mode-armed", " ");
|
setprop("modes/pfd/fma/roll-mode-armed", " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
# Arm G/S
|
# Arm G/S
|
||||||
setlistener("/it-autoflight/output/appr-armed", func {
|
setlistener("/it-autoflight/output/appr-armed", func {
|
||||||
var appa = getprop("/it-autoflight/output/appr-armed");
|
var appa = getprop("it-autoflight/output/appr-armed");
|
||||||
var newvert2arm = getprop("/modes/pfd/fma/pitch-mode-armed");
|
var newvert2arm = getprop("modes/pfd/fma/pitch-mode-armed");
|
||||||
if (appa) {
|
if (appa) {
|
||||||
if (newvert2arm != "G/S") {
|
if (newvert2arm != "G/S") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode-armed", "G/S");
|
setprop("modes/pfd/fma/pitch-mode-armed", "G/S");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (newvert2arm != " ") {
|
if (newvert2arm != " ") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode-armed", " ");
|
setprop("modes/pfd/fma/pitch-mode-armed", " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
# AP
|
# AP
|
||||||
var ap = func {
|
var ap = func {
|
||||||
var ap1 = getprop("/it-autoflight/output/ap1");
|
var ap1 = getprop("it-autoflight/output/ap1");
|
||||||
var ap2 = getprop("/it-autoflight/output/ap2");
|
var ap2 = getprop("it-autoflight/output/ap2");
|
||||||
var newap = getprop("/modes/pfd/fma/ap-mode");
|
var newap = getprop("modes/pfd/fma/ap-mode");
|
||||||
if (ap1 and ap2 and newap != "AP1+2") {
|
if (ap1 and ap2 and newap != "AP1+2") {
|
||||||
setprop("/modes/pfd/fma/ap-mode", "AP 1+2");
|
setprop("modes/pfd/fma/ap-mode", "AP 1+2");
|
||||||
} else if (ap1 and !ap2 and newap != "AP 1") {
|
} else if (ap1 and !ap2 and newap != "AP 1") {
|
||||||
setprop("/modes/pfd/fma/ap-mode", "AP 1");
|
setprop("modes/pfd/fma/ap-mode", "AP 1");
|
||||||
} else if (ap2 and !ap1 and newap != "AP 2") {
|
} else if (ap2 and !ap1 and newap != "AP 2") {
|
||||||
setprop("/modes/pfd/fma/ap-mode", "AP 2");
|
setprop("modes/pfd/fma/ap-mode", "AP 2");
|
||||||
} else if (!ap1 and !ap2) {
|
} else if (!ap1 and !ap2) {
|
||||||
setprop("/modes/pfd/fma/ap-mode", " ");
|
setprop("modes/pfd/fma/ap-mode", " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# FD
|
# FD
|
||||||
var fd = func {
|
var fd = func {
|
||||||
var fd1 = getprop("/it-autoflight/output/fd1");
|
var fd1 = getprop("it-autoflight/output/fd1");
|
||||||
var fd2 = getprop("/it-autoflight/output/fd2");
|
var fd2 = getprop("it-autoflight/output/fd2");
|
||||||
var newfd = getprop("/modes/pfd/fma/fd-mode");
|
var newfd = getprop("modes/pfd/fma/fd-mode");
|
||||||
if (fd1 and fd2 and newfd != "1FD2") {
|
if (fd1 and fd2 and newfd != "1FD2") {
|
||||||
setprop("/modes/pfd/fma/fd-mode", "1 FD 2");
|
setprop("modes/pfd/fma/fd-mode", "1 FD 2");
|
||||||
} else if (fd1 and !fd2 and newfd != "1 FD -") {
|
} else if (fd1 and !fd2 and newfd != "1 FD -") {
|
||||||
setprop("/modes/pfd/fma/fd-mode", "1 FD -");
|
setprop("modes/pfd/fma/fd-mode", "1 FD -");
|
||||||
} else if (fd2 and !fd1 and newfd != "- FD 2") {
|
} else if (fd2 and !fd1 and newfd != "- FD 2") {
|
||||||
setprop("/modes/pfd/fma/fd-mode", "- FD 2");
|
setprop("modes/pfd/fma/fd-mode", "- FD 2");
|
||||||
} else if (!fd1 and !fd2) {
|
} else if (!fd1 and !fd2) {
|
||||||
setprop("/modes/pfd/fma/fd-mode", " ");
|
setprop("modes/pfd/fma/fd-mode", " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# AT
|
# AT
|
||||||
var at = func {
|
var at = func {
|
||||||
var at = getprop("/it-autoflight/output/athr");
|
var at = getprop("it-autoflight/output/athr");
|
||||||
var newat = getprop("/modes/pfd/fma/at-mode");
|
var newat = getprop("modes/pfd/fma/at-mode");
|
||||||
if (at and newat != "A/THR") {
|
if (at and newat != "A/THR") {
|
||||||
setprop("/modes/pfd/fma/at-mode", "A/THR");
|
setprop("modes/pfd/fma/at-mode", "A/THR");
|
||||||
} else if (!at) {
|
} else if (!at) {
|
||||||
setprop("/modes/pfd/fma/at-mode", " ");
|
setprop("modes/pfd/fma/at-mode", " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var boxchk = func {
|
var boxchk = func {
|
||||||
if ((getprop("/it-autoflight/output/ap1") or getprop("/it-autoflight/output/ap2") or getprop("/it-autoflight/output/fd1") or getprop("/it-autoflight/output/fd2")) and getprop("/it-autoflight/output/fma-pwr") == 0) {
|
if ((getprop("it-autoflight/output/ap1") or getprop("it-autoflight/output/ap2") or getprop("it-autoflight/output/fd1") or getprop("it-autoflight/output/fd2")) and getprop("it-autoflight/output/fma-pwr") == 0) {
|
||||||
setprop("/it-autoflight/input/lat", 3);
|
setprop("it-autoflight/input/lat", 3);
|
||||||
boxchk_b();
|
boxchk_b();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var boxchk_b = func {
|
var boxchk_b = func {
|
||||||
var newlat = getprop("/modes/pfd/fma/roll-mode");
|
var newlat = getprop("modes/pfd/fma/roll-mode");
|
||||||
if (newlat != " ") {
|
if (newlat != " ") {
|
||||||
setprop("/modes/pfd/fma/roll-mode-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/roll-mode-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
var newvert = getprop("/modes/pfd/fma/pitch-mode");
|
var newvert = getprop("modes/pfd/fma/pitch-mode");
|
||||||
if (newvert != " ") {
|
if (newvert != " ") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/pitch-mode-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
var newarmr = getprop("/modes/pfd/fma/roll-mode-armed");
|
var newarmr = getprop("modes/pfd/fma/roll-mode-armed");
|
||||||
if (newarmr != " ") {
|
if (newarmr != " ") {
|
||||||
setprop("/modes/pfd/fma/roll-mode-armed-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/roll-mode-armed-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
var newarmp = getprop("/modes/pfd/fma/pitch-mode-armed");
|
var newarmp = getprop("modes/pfd/fma/pitch-mode-armed");
|
||||||
if (newarmp != " ") {
|
if (newarmp != " ") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode-armed-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/pitch-mode-armed-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
var newarmp2 = getprop("/modes/pfd/fma/pitch-mode2-armed");
|
var newarmp2 = getprop("modes/pfd/fma/pitch-mode2-armed");
|
||||||
if (newarmp2 != " ") {
|
if (newarmp2 != " ") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/pitch-mode2-armed-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -546,74 +546,74 @@ setlistener("/it-autoflight/output/athr", func {
|
||||||
|
|
||||||
# Boxes
|
# Boxes
|
||||||
setlistener("/modes/pfd/fma/ap-mode", func {
|
setlistener("/modes/pfd/fma/ap-mode", func {
|
||||||
if (getprop("/modes/pfd/fma/ap-mode") != " ") {
|
if (getprop("modes/pfd/fma/ap-mode") != " ") {
|
||||||
setprop("/modes/pfd/fma/ap-mode-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/ap-mode-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/modes/pfd/fma/fd-mode", func {
|
setlistener("/modes/pfd/fma/fd-mode", func {
|
||||||
if (getprop("/modes/pfd/fma/fd-mode") != " ") {
|
if (getprop("modes/pfd/fma/fd-mode") != " ") {
|
||||||
setprop("/modes/pfd/fma/fd-mode-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/fd-mode-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/modes/pfd/fma/at-mode", func {
|
setlistener("/modes/pfd/fma/at-mode", func {
|
||||||
if (getprop("/modes/pfd/fma/at-mode") != " ") {
|
if (getprop("modes/pfd/fma/at-mode") != " ") {
|
||||||
setprop("/modes/pfd/fma/throttle-mode-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/throttle-mode-time", getprop("sim/time/elapsed-sec"));
|
||||||
setprop("/modes/pfd/fma/athr-mode-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/athr-mode-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/modes/pfd/fma/athr-armed", func {
|
setlistener("/modes/pfd/fma/athr-armed", func {
|
||||||
if (getprop("/modes/pfd/fma/at-mode") != " ") {
|
if (getprop("modes/pfd/fma/at-mode") != " ") {
|
||||||
setprop("/modes/pfd/fma/athr-mode-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/athr-mode-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/modes/pfd/fma/throttle-mode", func {
|
setlistener("/modes/pfd/fma/throttle-mode", func {
|
||||||
var state1 = getprop("/systems/thrust/state1");
|
var state1 = getprop("systems/thrust/state1");
|
||||||
var state2 = getprop("/systems/thrust/state2");
|
var state2 = getprop("systems/thrust/state2");
|
||||||
if (getprop("/it-autoflight/output/athr") == 1 and state1 != "MCT" and state2 != "MCT" and state1 != "MAN THR" and state2 != "MAN THR" and state1 != "TOGA" and state2 != "TOGA" and state1 != "IDLE" and state2 != "IDLE" and
|
if (getprop("it-autoflight/output/athr") == 1 and state1 != "MCT" and state2 != "MCT" and state1 != "MAN THR" and state2 != "MAN THR" and state1 != "TOGA" and state2 != "TOGA" and state1 != "IDLE" and state2 != "IDLE" and
|
||||||
getprop("/systems/thrust/eng-out") != 1) {
|
getprop("systems/thrust/eng-out") != 1) {
|
||||||
setprop("/modes/pfd/fma/throttle-mode-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/throttle-mode-time", getprop("sim/time/elapsed-sec"));
|
||||||
} else if (getprop("/it-autoflight/output/athr") == 1 and state1 != "TOGA" and state2 != "TOGA" and state1 != "IDLE" and state2 != "IDLE" and getprop("/systems/thrust/eng-out") == 1) {
|
} else if (getprop("it-autoflight/output/athr") == 1 and state1 != "TOGA" and state2 != "TOGA" and state1 != "IDLE" and state2 != "IDLE" and getprop("systems/thrust/eng-out") == 1) {
|
||||||
if (getprop("/controls/engines/engine[0]/throttle-pos") < 0.83 and getprop("/controls/engines/engine[1]/throttle-pos") < 0.83) {
|
if (getprop("controls/engines/engine[0]/throttle-pos") < 0.83 and getprop("controls/engines/engine[1]/throttle-pos") < 0.83) {
|
||||||
setprop("/modes/pfd/fma/throttle-mode-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/throttle-mode-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/modes/pfd/fma/roll-mode", func {
|
setlistener("/modes/pfd/fma/roll-mode", func {
|
||||||
var newlat = getprop("/modes/pfd/fma/roll-mode");
|
var newlat = getprop("modes/pfd/fma/roll-mode");
|
||||||
if (newlat != " ") {
|
if (newlat != " ") {
|
||||||
setprop("/modes/pfd/fma/roll-mode-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/roll-mode-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/modes/pfd/fma/pitch-mode", func {
|
setlistener("/modes/pfd/fma/pitch-mode", func {
|
||||||
var newvert = getprop("/modes/pfd/fma/pitch-mode");
|
var newvert = getprop("modes/pfd/fma/pitch-mode");
|
||||||
if (newvert != " ") {
|
if (newvert != " ") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/pitch-mode-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/modes/pfd/fma/roll-mode-armed", func {
|
setlistener("/modes/pfd/fma/roll-mode-armed", func {
|
||||||
var newarm = getprop("/modes/pfd/fma/roll-mode-armed");
|
var newarm = getprop("modes/pfd/fma/roll-mode-armed");
|
||||||
if (newarm != " ") {
|
if (newarm != " ") {
|
||||||
setprop("/modes/pfd/fma/roll-mode-armed-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/roll-mode-armed-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/modes/pfd/fma/pitch-mode-armed", func {
|
setlistener("/modes/pfd/fma/pitch-mode-armed", func {
|
||||||
var newarm = getprop("/modes/pfd/fma/pitch-mode-armed");
|
var newarm = getprop("modes/pfd/fma/pitch-mode-armed");
|
||||||
if (newarm != " ") {
|
if (newarm != " ") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode-armed-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/pitch-mode-armed-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/modes/pfd/fma/pitch-mode2-armed", func {
|
setlistener("/modes/pfd/fma/pitch-mode2-armed", func {
|
||||||
var newarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
|
var newarm = getprop("modes/pfd/fma/pitch-mode2-armed");
|
||||||
if (newarm != " ") {
|
if (newarm != " ") {
|
||||||
setprop("/modes/pfd/fma/pitch-mode2-armed-time", getprop("/sim/time/elapsed-sec"));
|
setprop("modes/pfd/fma/pitch-mode2-armed-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -95,38 +95,38 @@ var newvert = 0;
|
||||||
var newvertarm = 0;
|
var newvertarm = 0;
|
||||||
var thr1 = 0;
|
var thr1 = 0;
|
||||||
var thr2 = 0;
|
var thr2 = 0;
|
||||||
setprop("/FMGC/internal/maxspeed", 0);
|
setprop("FMGC/internal/maxspeed", 0);
|
||||||
setprop("/FMGC/internal/minspeed", 0);
|
setprop("FMGC/internal/minspeed", 0);
|
||||||
setprop("/position/gear-agl-ft", 0);
|
setprop("position/gear-agl-ft", 0);
|
||||||
setprop("/FMGC/internal/mng-spd", 157);
|
setprop("FMGC/internal/mng-spd", 157);
|
||||||
setprop("/FMGC/internal/mng-spd-cmd", 157);
|
setprop("FMGC/internal/mng-spd-cmd", 157);
|
||||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
setprop("FMGC/internal/mng-kts-mach", 0);
|
||||||
setprop("/FMGC/internal/mach-switchover", 0);
|
setprop("FMGC/internal/mach-switchover", 0);
|
||||||
setprop("/it-autoflight/settings/reduc-agl-ft", 3000);
|
setprop("it-autoflight/settings/reduc-agl-ft", 3000);
|
||||||
setprop("/it-autoflight/internal/vert-speed-fpm", 0);
|
setprop("it-autoflight/internal/vert-speed-fpm", 0);
|
||||||
setprop("/it-autoflight/output/fma-pwr", 0);
|
setprop("it-autoflight/output/fma-pwr", 0);
|
||||||
setprop("/instrumentation/nav[0]/nav-id", "XXX");
|
setprop("instrumentation/nav[0]/nav-id", "XXX");
|
||||||
setprop("/instrumentation/nav[1]/nav-id", "XXX");
|
setprop("instrumentation/nav[1]/nav-id", "XXX");
|
||||||
setprop("/FMGC/internal/ils1-mcdu", "XXX/999.99");
|
setprop("FMGC/internal/ils1-mcdu", "XXX/999.99");
|
||||||
setprop("/FMGC/internal/ils2-mcdu", "XXX/999.99");
|
setprop("FMGC/internal/ils2-mcdu", "XXX/999.99");
|
||||||
setprop("/FMGC/internal/vor1-mcdu", "XXX/999.99");
|
setprop("FMGC/internal/vor1-mcdu", "XXX/999.99");
|
||||||
setprop("/FMGC/internal/vor2-mcdu", "999.99/XXX");
|
setprop("FMGC/internal/vor2-mcdu", "999.99/XXX");
|
||||||
setprop("/FMGC/internal/adf1-mcdu", "XXX/999.99");
|
setprop("FMGC/internal/adf1-mcdu", "XXX/999.99");
|
||||||
setprop("/FMGC/internal/adf2-mcdu", "999.99/XXX");
|
setprop("FMGC/internal/adf2-mcdu", "999.99/XXX");
|
||||||
setprop("/gear/gear[0]/wow-fmgc", 1);
|
setprop("gear/gear[0]/wow-fmgc", 1);
|
||||||
|
|
||||||
var FMGCinit = func {
|
var FMGCinit = func {
|
||||||
setprop("/FMGC/status/to-state", 0);
|
setprop("FMGC/status/to-state", 0);
|
||||||
setprop("/FMGC/status/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
|
setprop("FMGC/status/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
|
||||||
setprop("/FMGC/internal/maxspeed", 338);
|
setprop("FMGC/internal/maxspeed", 338);
|
||||||
setprop("/FMGC/internal/mng-spd", 157);
|
setprop("FMGC/internal/mng-spd", 157);
|
||||||
setprop("/FMGC/internal/mng-spd-cmd", 157);
|
setprop("FMGC/internal/mng-spd-cmd", 157);
|
||||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
setprop("FMGC/internal/mng-kts-mach", 0);
|
||||||
setprop("/FMGC/internal/mach-switchover", 0);
|
setprop("FMGC/internal/mach-switchover", 0);
|
||||||
setprop("/it-autoflight/settings/reduc-agl-ft", 3000);
|
setprop("it-autoflight/settings/reduc-agl-ft", 3000);
|
||||||
setprop("/FMGC/internal/decel", 0);
|
setprop("FMGC/internal/decel", 0);
|
||||||
setprop("/FMGC/internal/loc-source", "NAV0");
|
setprop("FMGC/internal/loc-source", "NAV0");
|
||||||
setprop("/FMGC/internal/optalt", 0);
|
setprop("FMGC/internal/optalt", 0);
|
||||||
masterFMGC.start();
|
masterFMGC.start();
|
||||||
various.start();
|
various.start();
|
||||||
various2.start();
|
various2.start();
|
||||||
|
@ -141,9 +141,9 @@ setlistener("/gear/gear[0]/wow-fmgc", func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var trimReset = func {
|
var trimReset = func {
|
||||||
gear0 = getprop("/gear/gear[0]/wow");
|
gear0 = getprop("gear/gear[0]/wow");
|
||||||
flaps = getprop("/controls/flight/flap-pos");
|
flaps = getprop("controls/flight/flap-pos");
|
||||||
if (gear0 == 1 and getprop("/FMGC/status/to-state") == 0 and (flaps >= 5 or (flaps >= 4 and getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap3-override") == 1))) {
|
if (gear0 == 1 and getprop("FMGC/status/to-state") == 0 and (flaps >= 5 or (flaps >= 4 and getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap3-override") == 1))) {
|
||||||
interpolate("/controls/flight/elevator-trim", 0.0, 1.5);
|
interpolate("/controls/flight/elevator-trim", 0.0, 1.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -153,17 +153,17 @@ var trimReset = func {
|
||||||
###############
|
###############
|
||||||
|
|
||||||
var updateARPT = func {
|
var updateARPT = func {
|
||||||
dep = getprop("/FMGC/internal/dep-arpt");
|
dep = getprop("FMGC/internal/dep-arpt");
|
||||||
arr = getprop("/FMGC/internal/arr-arpt");
|
arr = getprop("FMGC/internal/arr-arpt");
|
||||||
setprop("/autopilot/route-manager/departure/airport", dep);
|
setprop("autopilot/route-manager/departure/airport", dep);
|
||||||
setprop("/autopilot/route-manager/destination/airport", arr);
|
setprop("autopilot/route-manager/destination/airport", arr);
|
||||||
if (getprop("/autopilot/route-manager/active") != 1) {
|
if (getprop("autopilot/route-manager/active") != 1) {
|
||||||
fgcommand("activate-flightplan", props.Node.new({"activate": 1}));
|
fgcommand("activate-flightplan", props.Node.new({"activate": 1}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/FMGC/internal/cruise-ft", func {
|
setlistener("/FMGC/internal/cruise-ft", func {
|
||||||
setprop("/autopilot/route-manager/cruise/altitude-ft", getprop("/FMGC/internal/cruise-ft"));
|
setprop("autopilot/route-manager/cruise/altitude-ft", getprop("FMGC/internal/cruise-ft"));
|
||||||
});
|
});
|
||||||
|
|
||||||
############################
|
############################
|
||||||
|
@ -171,181 +171,181 @@ setlistener("/FMGC/internal/cruise-ft", func {
|
||||||
############################
|
############################
|
||||||
|
|
||||||
var masterFMGC = maketimer(0.2, func {
|
var masterFMGC = maketimer(0.2, func {
|
||||||
n1_left = getprop("/engines/engine[0]/n1-actual");
|
n1_left = getprop("engines/engine[0]/n1-actual");
|
||||||
n1_right = getprop("/engines/engine[1]/n1-actual");
|
n1_right = getprop("engines/engine[1]/n1-actual");
|
||||||
flaps = getprop("/controls/flight/flap-pos");
|
flaps = getprop("controls/flight/flap-pos");
|
||||||
modelat = getprop("/modes/pfd/fma/roll-mode");
|
modelat = getprop("modes/pfd/fma/roll-mode");
|
||||||
mode = getprop("/modes/pfd/fma/pitch-mode");
|
mode = getprop("modes/pfd/fma/pitch-mode");
|
||||||
modeI = getprop("/it-autoflight/mode/vert");
|
modeI = getprop("it-autoflight/mode/vert");
|
||||||
gs = getprop("/velocities/groundspeed-kt");
|
gs = getprop("velocities/groundspeed-kt");
|
||||||
alt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
|
alt = getprop("instrumentation/altimeter/indicated-altitude-ft");
|
||||||
aglalt = pts.Position.gearAglFt.getValue();
|
aglalt = pts.Position.gearAglFt.getValue();
|
||||||
cruiseft = getprop("/FMGC/internal/cruise-ft");
|
cruiseft = getprop("FMGC/internal/cruise-ft");
|
||||||
cruiseft_b = getprop("/FMGC/internal/cruise-ft") - 200;
|
cruiseft_b = getprop("FMGC/internal/cruise-ft") - 200;
|
||||||
newcruise = getprop("/it-autoflight/internal/alt");
|
newcruise = getprop("it-autoflight/internal/alt");
|
||||||
phase = getprop("/FMGC/status/phase");
|
phase = getprop("FMGC/status/phase");
|
||||||
state1 = getprop("/systems/thrust/state1");
|
state1 = getprop("systems/thrust/state1");
|
||||||
state2 = getprop("/systems/thrust/state2");
|
state2 = getprop("systems/thrust/state2");
|
||||||
wowl = getprop("/gear/gear[1]/wow");
|
wowl = getprop("gear/gear[1]/wow");
|
||||||
wowr = getprop("/gear/gear[2]/wow");
|
wowr = getprop("gear/gear[2]/wow");
|
||||||
targetalt = getprop("/it-autoflight/internal/alt");
|
targetalt = getprop("it-autoflight/internal/alt");
|
||||||
targetvs = getprop("/it-autoflight/input/vs");
|
targetvs = getprop("it-autoflight/input/vs");
|
||||||
targetfpa = getprop("/it-autoflight/input/fpa");
|
targetfpa = getprop("it-autoflight/input/fpa");
|
||||||
reduc_agl_ft = getprop("/it-autoflight/settings/reduc-agl-ft");
|
reduc_agl_ft = getprop("it-autoflight/settings/reduc-agl-ft");
|
||||||
locarm = getprop("/it-autopilot/output/loc-armed");
|
locarm = getprop("it-autopilot/output/loc-armed");
|
||||||
apprarm = getprop("/it-autopilot/output/appr-armed");
|
apprarm = getprop("it-autopilot/output/appr-armed");
|
||||||
gear0 = getprop("/gear/gear[0]/wow");
|
gear0 = getprop("gear/gear[0]/wow");
|
||||||
ap1 = getprop("/it-autoflight/output/ap1");
|
ap1 = getprop("it-autoflight/output/ap1");
|
||||||
ap2 = getprop("/it-autoflight/output/ap2");
|
ap2 = getprop("it-autoflight/output/ap2");
|
||||||
flx = getprop("/systems/thrust/lim-flex");
|
flx = getprop("systems/thrust/lim-flex");
|
||||||
lat = getprop("/it-autoflight/mode/lat");
|
lat = getprop("it-autoflight/mode/lat");
|
||||||
newlat = getprop("/modes/pfd/fma/roll-mode");
|
newlat = getprop("modes/pfd/fma/roll-mode");
|
||||||
vert = getprop("/it-autoflight/mode/vert");
|
vert = getprop("it-autoflight/mode/vert");
|
||||||
newvert = getprop("/modes/pfd/fma/pitch-mode");
|
newvert = getprop("modes/pfd/fma/pitch-mode");
|
||||||
newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
|
newvertarm = getprop("modes/pfd/fma/pitch-mode2-armed");
|
||||||
thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
|
thr1 = getprop("controls/engines/engine[0]/throttle-pos");
|
||||||
thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
|
thr2 = getprop("controls/engines/engine[1]/throttle-pos");
|
||||||
gear0 = getprop("/gear/gear[0]/wow");
|
gear0 = getprop("gear/gear[0]/wow");
|
||||||
state1 = getprop("/systems/thrust/state1");
|
state1 = getprop("systems/thrust/state1");
|
||||||
state2 = getprop("/systems/thrust/state2");
|
state2 = getprop("systems/thrust/state2");
|
||||||
|
|
||||||
if (getprop("/gear/gear[0]/wow") != getprop("/gear/gear[0]/wow-fmgc")) {
|
if (getprop("gear/gear[0]/wow") != getprop("gear/gear[0]/wow-fmgc")) {
|
||||||
setprop("/gear/gear[0]/wow-fmgc", getprop("/gear/gear[0]/wow"));
|
setprop("gear/gear[0]/wow-fmgc", getprop("gear/gear[0]/wow"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((n1_left < 70 or n1_right < 70) and gs < 90 and mode == " " and gear0 == 1 and phase == 1) {
|
if ((n1_left < 70 or n1_right < 70) and gs < 90 and mode == " " and gear0 == 1 and phase == 1) {
|
||||||
setprop("/FMGC/status/phase", "0");
|
setprop("FMGC/status/phase", "0");
|
||||||
setprop("/systems/pressurization/mode", "GN");
|
setprop("systems/pressurization/mode", "GN");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gear0 == 1 and phase == 0 and ((n1_left >= 70 and n1_right >= 70) or gs >= 90) and (state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or
|
if (gear0 == 1 and phase == 0 and ((n1_left >= 70 and n1_right >= 70) or gs >= 90) and (state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or
|
||||||
(state2 == "MAN THR" and thr2 >= 0.83)))) {
|
(state2 == "MAN THR" and thr2 >= 0.83)))) {
|
||||||
setprop("/FMGC/status/phase", "1");
|
setprop("FMGC/status/phase", "1");
|
||||||
setprop("/systems/pressurization/mode", "TO");
|
setprop("systems/pressurization/mode", "TO");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phase == 1 and mode != "SRS" and mode != " ") {
|
if (phase == 1 and mode != "SRS" and mode != " ") {
|
||||||
setprop("/FMGC/status/phase", "2");
|
setprop("FMGC/status/phase", "2");
|
||||||
setprop("/systems/pressurization/mode", "TO");
|
setprop("systems/pressurization/mode", "TO");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((phase == 3 or phase == 4 or phase == 5 or phase == 6) and (mode == "OP CLB" or mode == "CLB" or (modeI == "V/S" and getprop("/it-autoflight/input/vs") >= 100) or (modeI == "FPA" and getprop("/it-autoflight/input/fpa") >= 0.1))) {
|
if ((phase == 3 or phase == 4 or phase == 5 or phase == 6) and (mode == "OP CLB" or mode == "CLB" or (modeI == "V/S" and getprop("it-autoflight/input/vs") >= 100) or (modeI == "FPA" and getprop("it-autoflight/input/fpa") >= 0.1))) {
|
||||||
setprop("/FMGC/status/phase", "2");
|
setprop("FMGC/status/phase", "2");
|
||||||
setprop("/systems/pressurization/mode", "TO");
|
setprop("systems/pressurization/mode", "TO");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((phase == 2 or phase == 4 or phase == 5) and (mode == "ALT" or mode == "ALT CRZ" or mode == "ALT CST")) {
|
if ((phase == 2 or phase == 4 or phase == 5) and (mode == "ALT" or mode == "ALT CRZ" or mode == "ALT CST")) {
|
||||||
setprop("/FMGC/status/phase", "3");
|
setprop("FMGC/status/phase", "3");
|
||||||
setprop("/systems/pressurization/mode", "CR");
|
setprop("systems/pressurization/mode", "CR");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((phase == 2 or phase == 3) and (mode == "OP DES" or mode == "DES" or (modeI == "V/S" and getprop("/it-autoflight/input/vs") <= -100) or (modeI == "FPA" and getprop("/it-autoflight/input/fpa") <= -0.1))) {
|
if ((phase == 2 or phase == 3) and (mode == "OP DES" or mode == "DES" or (modeI == "V/S" and getprop("it-autoflight/input/vs") <= -100) or (modeI == "FPA" and getprop("it-autoflight/input/fpa") <= -0.1))) {
|
||||||
setprop("/FMGC/status/phase", "4");
|
setprop("FMGC/status/phase", "4");
|
||||||
setprop("/systems/pressurization/mode", "DE");
|
setprop("systems/pressurization/mode", "DE");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/FMGC/status/to-state") == 0 and flaps >= 3 and (phase == "4" or mode == "G/S" or mode == "LAND" or mode == "FLARE")) {
|
if (getprop("FMGC/status/to-state") == 0 and flaps >= 3 and (phase == "4" or mode == "G/S" or mode == "LAND" or mode == "FLARE")) {
|
||||||
setprop("/FMGC/status/phase", "5");
|
setprop("FMGC/status/phase", "5");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/autopilot/route-manager/route/num") > 0 and getprop("/autopilot/route-manager/active") == 1 and getprop("/autopilot/route-manager/distance-remaining-nm") <= 15) {
|
if (getprop("autopilot/route-manager/route/num") > 0 and getprop("autopilot/route-manager/active") == 1 and getprop("autopilot/route-manager/distance-remaining-nm") <= 15) {
|
||||||
setprop("/FMGC/internal/decel", 1);
|
setprop("FMGC/internal/decel", 1);
|
||||||
} else if (getprop("/FMGC/internal/decel") == 1 and (phase == 0 or phase == 6)) {
|
} else if (getprop("FMGC/internal/decel") == 1 and (phase == 0 or phase == 6)) {
|
||||||
setprop("/FMGC/internal/decel", 0);
|
setprop("FMGC/internal/decel", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phase == "5" and state1 == "TOGA" and state2 == "TOGA") {
|
if (phase == "5" and state1 == "TOGA" and state2 == "TOGA") {
|
||||||
setprop("/FMGC/status/phase", "6");
|
setprop("FMGC/status/phase", "6");
|
||||||
setprop("/systems/pressurization/mode", "TO");
|
setprop("systems/pressurization/mode", "TO");
|
||||||
setprop("/it-autoflight/input/toga", 1);
|
setprop("it-autoflight/input/toga", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wowl and wowr and gs <= 40 and (phase == "2" or phase == "3" or phase == "4" or phase == "5" or phase == "6") and ap1 == 0 and ap2 == 0) {
|
if (wowl and wowr and gs <= 40 and (phase == "2" or phase == "3" or phase == "4" or phase == "5" or phase == "6") and ap1 == 0 and ap2 == 0) {
|
||||||
reset_FMGC();
|
reset_FMGC();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/navigation/adr/computation/overspeed-vfe-spd") != 1024) {
|
if (getprop("systems/navigation/adr/computation/overspeed-vfe-spd") != 1024) {
|
||||||
setprop("/FMGC/internal/maxspeed", getprop("/systems/navigation/adr/computation/overspeed-vfe-spd") - 4);
|
setprop("FMGC/internal/maxspeed", getprop("systems/navigation/adr/computation/overspeed-vfe-spd") - 4);
|
||||||
} elsif (pts.Gear.position[0].getValue() != 0 or pts.Gear.position[1].getValue() != 0 or pts.Gear.position[2].getValue() != 0) {
|
} elsif (pts.Gear.position[0].getValue() != 0 or pts.Gear.position[1].getValue() != 0 or pts.Gear.position[2].getValue() != 0) {
|
||||||
setprop("/FMGC/internal/maxspeed", 284);
|
setprop("FMGC/internal/maxspeed", 284);
|
||||||
} else {
|
} else {
|
||||||
setprop("/FMGC/internal/maxspeed", getprop("/it-fbw/speeds/vmo-mmo"));
|
setprop("FMGC/internal/maxspeed", getprop("it-fbw/speeds/vmo-mmo"));
|
||||||
}
|
}
|
||||||
|
|
||||||
flap = getprop("/controls/flight/flap-pos");
|
flap = getprop("controls/flight/flap-pos");
|
||||||
if (flap == 0) { # 0
|
if (flap == 0) { # 0
|
||||||
setprop("/FMGC/internal/minspeed", 202);
|
setprop("FMGC/internal/minspeed", 202);
|
||||||
} else if (flap == 1) { # 1
|
} else if (flap == 1) { # 1
|
||||||
setprop("/FMGC/internal/minspeed", 184);
|
setprop("FMGC/internal/minspeed", 184);
|
||||||
} else if (flap == 2) { # 1+F
|
} else if (flap == 2) { # 1+F
|
||||||
setprop("/FMGC/internal/minspeed", 171);
|
setprop("FMGC/internal/minspeed", 171);
|
||||||
} else if (flap == 3) { # 2
|
} else if (flap == 3) { # 2
|
||||||
setprop("/FMGC/internal/minspeed", 156);
|
setprop("FMGC/internal/minspeed", 156);
|
||||||
} else if (flap == 4) { # 3
|
} else if (flap == 4) { # 3
|
||||||
setprop("/FMGC/internal/minspeed", 147);
|
setprop("FMGC/internal/minspeed", 147);
|
||||||
} else if (flap == 5) { # FULL
|
} else if (flap == 5) { # FULL
|
||||||
setprop("/FMGC/internal/minspeed", 131);
|
setprop("FMGC/internal/minspeed", 131);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gear0 == 1 and (state1 == "MCT" or state1 == "MAN THR" or state1 == "TOGA") and (state2 == "MCT" or state2 == "MAN THR" or state2 == "TOGA") and flaps < 5) {
|
if (gear0 == 1 and (state1 == "MCT" or state1 == "MAN THR" or state1 == "TOGA") and (state2 == "MCT" or state2 == "MAN THR" or state2 == "TOGA") and flaps < 5) {
|
||||||
setprop("/FMGC/status/to-state", 1);
|
setprop("FMGC/status/to-state", 1);
|
||||||
}
|
}
|
||||||
if (pts.Position.gearAglFt.getValue() >= 55) {
|
if (pts.Position.gearAglFt.getValue() >= 55) {
|
||||||
setprop("/FMGC/status/to-state", 0);
|
setprop("FMGC/status/to-state", 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var reset_FMGC = func {
|
var reset_FMGC = func {
|
||||||
setprop("/FMGC/status/phase", "7");
|
setprop("FMGC/status/phase", "7");
|
||||||
fd1 = getprop("/it-autoflight/input/fd1");
|
fd1 = getprop("it-autoflight/input/fd1");
|
||||||
fd2 = getprop("/it-autoflight/input/fd2");
|
fd2 = getprop("it-autoflight/input/fd2");
|
||||||
spd = getprop("/it-autoflight/input/spd-kts");
|
spd = getprop("it-autoflight/input/spd-kts");
|
||||||
hdg = getprop("/it-autoflight/input/hdg");
|
hdg = getprop("it-autoflight/input/hdg");
|
||||||
alt = getprop("/it-autoflight/input/alt");
|
alt = getprop("it-autoflight/input/alt");
|
||||||
ITAF.init();
|
ITAF.init();
|
||||||
FMGCinit();
|
FMGCinit();
|
||||||
mcdu.MCDU_reset(0);
|
mcdu.MCDU_reset(0);
|
||||||
mcdu.MCDU_reset(1);
|
mcdu.MCDU_reset(1);
|
||||||
setprop("/it-autoflight/input/fd1", fd1);
|
setprop("it-autoflight/input/fd1", fd1);
|
||||||
setprop("/it-autoflight/input/fd2", fd2);
|
setprop("it-autoflight/input/fd2", fd2);
|
||||||
setprop("/it-autoflight/input/spd-kts", spd);
|
setprop("it-autoflight/input/spd-kts", spd);
|
||||||
setprop("/it-autoflight/input/hdg", hdg);
|
setprop("it-autoflight/input/hdg", hdg);
|
||||||
setprop("/it-autoflight/input/alt", alt);
|
setprop("it-autoflight/input/alt", alt);
|
||||||
setprop("/systems/pressurization/mode", "GN");
|
setprop("systems/pressurization/mode", "GN");
|
||||||
setprop("/systems/pressurization/vs", "0");
|
setprop("systems/pressurization/vs", "0");
|
||||||
setprop("/systems/pressurization/targetvs", "0");
|
setprop("systems/pressurization/targetvs", "0");
|
||||||
setprop("/systems/pressurization/vs-norm", "0");
|
setprop("systems/pressurization/vs-norm", "0");
|
||||||
setprop("/systems/pressurization/auto", 1);
|
setprop("systems/pressurization/auto", 1);
|
||||||
setprop("/systems/pressurization/deltap", "0");
|
setprop("systems/pressurization/deltap", "0");
|
||||||
setprop("/systems/pressurization/outflowpos", "0");
|
setprop("systems/pressurization/outflowpos", "0");
|
||||||
setprop("/systems/pressurization/deltap-norm", "0");
|
setprop("systems/pressurization/deltap-norm", "0");
|
||||||
setprop("/systems/pressurization/outflowpos-norm", "0");
|
setprop("systems/pressurization/outflowpos-norm", "0");
|
||||||
altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
|
altitude = getprop("instrumentation/altimeter/indicated-altitude-ft");
|
||||||
setprop("/systems/pressurization/cabinalt", altitude);
|
setprop("systems/pressurization/cabinalt", altitude);
|
||||||
setprop("/systems/pressurization/targetalt", altitude);
|
setprop("systems/pressurization/targetalt", altitude);
|
||||||
setprop("/systems/pressurization/diff-to-target", "0");
|
setprop("systems/pressurization/diff-to-target", "0");
|
||||||
setprop("/systems/pressurization/ditchingpb", 0);
|
setprop("systems/pressurization/ditchingpb", 0);
|
||||||
setprop("/systems/pressurization/targetvs", "0");
|
setprop("systems/pressurization/targetvs", "0");
|
||||||
setprop("/systems/ventilation/cabin/fans", 0); # aircon fans
|
setprop("systems/ventilation/cabin/fans", 0); # aircon fans
|
||||||
setprop("/systems/ventilation/avionics/fan", 0);
|
setprop("systems/ventilation/avionics/fan", 0);
|
||||||
setprop("/systems/ventilation/avionics/extractvalve", "0");
|
setprop("systems/ventilation/avionics/extractvalve", "0");
|
||||||
setprop("/systems/ventilation/avionics/inletvalve", "0");
|
setprop("systems/ventilation/avionics/inletvalve", "0");
|
||||||
setprop("/systems/ventilation/lavatory/extractfan", 0);
|
setprop("systems/ventilation/lavatory/extractfan", 0);
|
||||||
setprop("/systems/ventilation/lavatory/extractvalve", "0");
|
setprop("systems/ventilation/lavatory/extractvalve", "0");
|
||||||
setprop("/systems/pressurization/ambientpsi", "0");
|
setprop("systems/pressurization/ambientpsi", "0");
|
||||||
setprop("/systems/pressurization/cabinpsi", "0");
|
setprop("systems/pressurization/cabinpsi", "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
var various = maketimer(1, func {
|
var various = maketimer(1, func {
|
||||||
if (getprop("/engines/engine[0]/state") == 3 and getprop("/engines/engine[1]/state") != 3) {
|
if (getprop("engines/engine[0]/state") == 3 and getprop("engines/engine[1]/state") != 3) {
|
||||||
setprop("/it-autoflight/settings/reduc-agl-ft", getprop("/FMGC/internal/eng-out-reduc"));
|
setprop("it-autoflight/settings/reduc-agl-ft", getprop("FMGC/internal/eng-out-reduc"));
|
||||||
} else if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") == 3) {
|
} else if (getprop("engines/engine[0]/state") != 3 and getprop("engines/engine[1]/state") == 3) {
|
||||||
setprop("/it-autoflight/settings/reduc-agl-ft", getprop("/FMGC/internal/eng-out-reduc"));
|
setprop("it-autoflight/settings/reduc-agl-ft", getprop("FMGC/internal/eng-out-reduc"));
|
||||||
} else {
|
} else {
|
||||||
setprop("/it-autoflight/settings/reduc-agl-ft", getprop("/FMGC/internal/reduc-agl-ft"));
|
setprop("it-autoflight/settings/reduc-agl-ft", getprop("FMGC/internal/reduc-agl-ft"));
|
||||||
}
|
}
|
||||||
|
|
||||||
setprop("/FMGC/internal/gw", math.round(getprop("/fdm/jsbsim/inertia/weight-lbs"), 100));
|
setprop("FMGC/internal/gw", math.round(getprop("fdm/jsbsim/inertia/weight-lbs"), 100));
|
||||||
});
|
});
|
||||||
|
|
||||||
var various2 = maketimer(0.5, func {
|
var various2 = maketimer(0.5, func {
|
||||||
|
@ -358,79 +358,79 @@ var various2 = maketimer(0.5, func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var nav0 = func {
|
var nav0 = func {
|
||||||
var freqnav0uf = getprop("/instrumentation/nav[0]/frequencies/selected-mhz");
|
var freqnav0uf = getprop("instrumentation/nav[0]/frequencies/selected-mhz");
|
||||||
var freqnav0 = sprintf("%.2f", freqnav0uf);
|
var freqnav0 = sprintf("%.2f", freqnav0uf);
|
||||||
var namenav0 = getprop("/instrumentation/nav[0]/nav-id");
|
var namenav0 = getprop("instrumentation/nav[0]/nav-id");
|
||||||
if (freqnav0 >= 108.10 and freqnav0 <= 111.95) {
|
if (freqnav0 >= 108.10 and freqnav0 <= 111.95) {
|
||||||
if (namenav0 != "") {
|
if (namenav0 != "") {
|
||||||
setprop("/FMGC/internal/ils1-mcdu", namenav0 ~ "/" ~ freqnav0);
|
setprop("FMGC/internal/ils1-mcdu", namenav0 ~ "/" ~ freqnav0);
|
||||||
} else {
|
} else {
|
||||||
setprop("/FMGC/internal/ils1-mcdu", freqnav0);
|
setprop("FMGC/internal/ils1-mcdu", freqnav0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var nav1 = func {
|
var nav1 = func {
|
||||||
var freqnav1uf = getprop("/instrumentation/nav[1]/frequencies/selected-mhz");
|
var freqnav1uf = getprop("instrumentation/nav[1]/frequencies/selected-mhz");
|
||||||
var freqnav1 = sprintf("%.2f", freqnav1uf);
|
var freqnav1 = sprintf("%.2f", freqnav1uf);
|
||||||
var namenav1 = getprop("/instrumentation/nav[1]/nav-id");
|
var namenav1 = getprop("instrumentation/nav[1]/nav-id");
|
||||||
if (freqnav1 >= 108.10 and freqnav1 <= 111.95) {
|
if (freqnav1 >= 108.10 and freqnav1 <= 111.95) {
|
||||||
if (namenav1 != "") {
|
if (namenav1 != "") {
|
||||||
setprop("/FMGC/internal/ils2-mcdu", freqnav1 ~ "/" ~ namenav1);
|
setprop("FMGC/internal/ils2-mcdu", freqnav1 ~ "/" ~ namenav1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/FMGC/internal/ils2-mcdu", freqnav1);
|
setprop("FMGC/internal/ils2-mcdu", freqnav1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var nav2 = func {
|
var nav2 = func {
|
||||||
var freqnav2uf = getprop("/instrumentation/nav[2]/frequencies/selected-mhz");
|
var freqnav2uf = getprop("instrumentation/nav[2]/frequencies/selected-mhz");
|
||||||
var freqnav2 = sprintf("%.2f", freqnav2uf);
|
var freqnav2 = sprintf("%.2f", freqnav2uf);
|
||||||
var namenav2 = getprop("/instrumentation/nav[2]/nav-id");
|
var namenav2 = getprop("instrumentation/nav[2]/nav-id");
|
||||||
if (freqnav2 >= 108.00 and freqnav2 <= 117.95) {
|
if (freqnav2 >= 108.00 and freqnav2 <= 117.95) {
|
||||||
if (namenav2 != "") {
|
if (namenav2 != "") {
|
||||||
setprop("/FMGC/internal/vor1-mcdu", namenav2 ~ "/" ~ freqnav2);
|
setprop("FMGC/internal/vor1-mcdu", namenav2 ~ "/" ~ freqnav2);
|
||||||
} else {
|
} else {
|
||||||
setprop("/FMGC/internal/vor1-mcdu", freqnav2);
|
setprop("FMGC/internal/vor1-mcdu", freqnav2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var nav3 = func {
|
var nav3 = func {
|
||||||
var freqnav3uf = getprop("/instrumentation/nav[3]/frequencies/selected-mhz");
|
var freqnav3uf = getprop("instrumentation/nav[3]/frequencies/selected-mhz");
|
||||||
var freqnav3 = sprintf("%.2f", freqnav3uf);
|
var freqnav3 = sprintf("%.2f", freqnav3uf);
|
||||||
var namenav3 = getprop("/instrumentation/nav[3]/nav-id");
|
var namenav3 = getprop("instrumentation/nav[3]/nav-id");
|
||||||
if (freqnav3 >= 108.00 and freqnav3 <= 117.95) {
|
if (freqnav3 >= 108.00 and freqnav3 <= 117.95) {
|
||||||
if (namenav3 != "") {
|
if (namenav3 != "") {
|
||||||
setprop("/FMGC/internal/vor2-mcdu", freqnav3 ~ "/" ~ namenav3);
|
setprop("FMGC/internal/vor2-mcdu", freqnav3 ~ "/" ~ namenav3);
|
||||||
} else {
|
} else {
|
||||||
setprop("/FMGC/internal/vor2-mcdu", freqnav3);
|
setprop("FMGC/internal/vor2-mcdu", freqnav3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var adf0 = func {
|
var adf0 = func {
|
||||||
var freqadf0uf = getprop("/instrumentation/adf[0]/frequencies/selected-khz");
|
var freqadf0uf = getprop("instrumentation/adf[0]/frequencies/selected-khz");
|
||||||
var freqadf0 = sprintf("%.2f", freqadf0uf);
|
var freqadf0 = sprintf("%.2f", freqadf0uf);
|
||||||
var nameadf0 = getprop("/instrumentation/adf[0]/ident");
|
var nameadf0 = getprop("instrumentation/adf[0]/ident");
|
||||||
if (freqadf0 >= 190 and freqadf0 <= 1750) {
|
if (freqadf0 >= 190 and freqadf0 <= 1750) {
|
||||||
if (nameadf0 != "") {
|
if (nameadf0 != "") {
|
||||||
setprop("/FMGC/internal/adf1-mcdu", nameadf0 ~ "/" ~ freqadf0);
|
setprop("FMGC/internal/adf1-mcdu", nameadf0 ~ "/" ~ freqadf0);
|
||||||
} else {
|
} else {
|
||||||
setprop("/FMGC/internal/adf1-mcdu", freqadf0);
|
setprop("FMGC/internal/adf1-mcdu", freqadf0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var adf1 = func {
|
var adf1 = func {
|
||||||
var freqadf1uf = getprop("/instrumentation/adf[1]/frequencies/selected-khz");
|
var freqadf1uf = getprop("instrumentation/adf[1]/frequencies/selected-khz");
|
||||||
var freqadf1 = sprintf("%.2f", freqadf1uf);
|
var freqadf1 = sprintf("%.2f", freqadf1uf);
|
||||||
var nameadf1 = getprop("/instrumentation/adf[1]/ident");
|
var nameadf1 = getprop("instrumentation/adf[1]/ident");
|
||||||
if (freqadf1 >= 190 and freqadf1 <= 1750) {
|
if (freqadf1 >= 190 and freqadf1 <= 1750) {
|
||||||
if (nameadf1 != "") {
|
if (nameadf1 != "") {
|
||||||
setprop("/FMGC/internal/adf2-mcdu", freqadf1 ~ "/" ~ nameadf1);
|
setprop("FMGC/internal/adf2-mcdu", freqadf1 ~ "/" ~ nameadf1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/FMGC/internal/adf2-mcdu", freqadf1);
|
setprop("FMGC/internal/adf2-mcdu", freqadf1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -440,124 +440,124 @@ var adf1 = func {
|
||||||
#################
|
#################
|
||||||
|
|
||||||
var ManagedSPD = maketimer(0.25, func {
|
var ManagedSPD = maketimer(0.25, func {
|
||||||
if (getprop("/FMGC/internal/cruise-lvl-set") == 1 and getprop("/FMGC/internal/cost-index-set") == 1) {
|
if (getprop("FMGC/internal/cruise-lvl-set") == 1 and getprop("FMGC/internal/cost-index-set") == 1) {
|
||||||
if (getprop("/it-autoflight/input/spd-managed") == 1) {
|
if (getprop("it-autoflight/input/spd-managed") == 1) {
|
||||||
altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
|
altitude = getprop("instrumentation/altimeter/indicated-altitude-ft");
|
||||||
mode = getprop("/modes/pfd/fma/pitch-mode");
|
mode = getprop("modes/pfd/fma/pitch-mode");
|
||||||
ias = getprop("/instrumentation/airspeed-indicator/indicated-speed-kt");
|
ias = getprop("instrumentation/airspeed-indicator/indicated-speed-kt");
|
||||||
mach = getprop("/instrumentation/airspeed-indicator/indicated-mach");
|
mach = getprop("instrumentation/airspeed-indicator/indicated-mach");
|
||||||
ktsmach = getprop("/it-autoflight/input/kts-mach");
|
ktsmach = getprop("it-autoflight/input/kts-mach");
|
||||||
mngktsmach = getprop("/FMGC/internal/mng-kts-mach");
|
mngktsmach = getprop("FMGC/internal/mng-kts-mach");
|
||||||
mng_spd = getprop("/FMGC/internal/mng-spd");
|
mng_spd = getprop("FMGC/internal/mng-spd");
|
||||||
mng_spd_cmd = getprop("/FMGC/internal/mng-spd-cmd");
|
mng_spd_cmd = getprop("FMGC/internal/mng-spd-cmd");
|
||||||
kts_sel = getprop("/it-autoflight/input/spd-kts");
|
kts_sel = getprop("it-autoflight/input/spd-kts");
|
||||||
mach_sel = getprop("/it-autoflight/input/spd-mach");
|
mach_sel = getprop("it-autoflight/input/spd-mach");
|
||||||
srsSPD = getprop("/it-autoflight/settings/togaspd");
|
srsSPD = getprop("it-autoflight/settings/togaspd");
|
||||||
phase = getprop("/FMGC/status/phase"); # 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
|
phase = getprop("FMGC/status/phase"); # 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
|
||||||
flap = getprop("/controls/flight/flap-pos");
|
flap = getprop("controls/flight/flap-pos");
|
||||||
maxspeed = getprop("/FMGC/internal/maxspeed");
|
maxspeed = getprop("FMGC/internal/maxspeed");
|
||||||
minspeed = getprop("/FMGC/internal/minspeed");
|
minspeed = getprop("FMGC/internal/minspeed");
|
||||||
mach_switchover = getprop("/FMGC/internal/mach-switchover");
|
mach_switchover = getprop("FMGC/internal/mach-switchover");
|
||||||
decel = getprop("/FMGC/internal/decel");
|
decel = getprop("FMGC/internal/decel");
|
||||||
|
|
||||||
mng_alt_spd_cmd = getprop("/FMGC/internal/mng-alt-spd");
|
mng_alt_spd_cmd = getprop("FMGC/internal/mng-alt-spd");
|
||||||
mng_alt_spd = math.round(mng_alt_spd_cmd, 1);
|
mng_alt_spd = math.round(mng_alt_spd_cmd, 1);
|
||||||
|
|
||||||
mng_alt_mach_cmd = getprop("/FMGC/internal/mng-alt-mach");
|
mng_alt_mach_cmd = getprop("FMGC/internal/mng-alt-mach");
|
||||||
mng_alt_mach = math.round(mng_alt_mach_cmd, 0.001);
|
mng_alt_mach = math.round(mng_alt_mach_cmd, 0.001);
|
||||||
|
|
||||||
if (mach > mng_alt_mach and (phase == 2 or phase == 3)) {
|
if (mach > mng_alt_mach and (phase == 2 or phase == 3)) {
|
||||||
setprop("/FMGC/internal/mach-switchover", 1);
|
setprop("FMGC/internal/mach-switchover", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ias > mng_alt_spd and (phase == 4 or phase == 5)) {
|
if (ias > mng_alt_spd and (phase == 4 or phase == 5)) {
|
||||||
setprop("/FMGC/internal/mach-switchover", 0);
|
setprop("FMGC/internal/mach-switchover", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mode == " " or mode == "SRS") and (phase == 0 or phase == 1)) {
|
if ((mode == " " or mode == "SRS") and (phase == 0 or phase == 1)) {
|
||||||
if (mngktsmach) {
|
if (mngktsmach) {
|
||||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
setprop("FMGC/internal/mng-kts-mach", 0);
|
||||||
}
|
}
|
||||||
if (mng_spd_cmd != srsSPD) {
|
if (mng_spd_cmd != srsSPD) {
|
||||||
setprop("/FMGC/internal/mng-spd-cmd", srsSPD);
|
setprop("FMGC/internal/mng-spd-cmd", srsSPD);
|
||||||
}
|
}
|
||||||
} else if ((phase == 2 or phase == 3) and altitude <= 10050) {
|
} else if ((phase == 2 or phase == 3) and altitude <= 10050) {
|
||||||
if (mngktsmach) {
|
if (mngktsmach) {
|
||||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
setprop("FMGC/internal/mng-kts-mach", 0);
|
||||||
}
|
}
|
||||||
if (mng_spd_cmd != 250 and !decel) {
|
if (mng_spd_cmd != 250 and !decel) {
|
||||||
setprop("/FMGC/internal/mng-spd-cmd", 250);
|
setprop("FMGC/internal/mng-spd-cmd", 250);
|
||||||
} else if (mng_spd_cmd != minspeed and decel) {
|
} else if (mng_spd_cmd != minspeed and decel) {
|
||||||
setprop("/FMGC/internal/mng-spd-cmd", minspeed);
|
setprop("FMGC/internal/mng-spd-cmd", minspeed);
|
||||||
}
|
}
|
||||||
} else if ((phase == 2 or phase == 3) and altitude > 10070 and !mach_switchover) {
|
} else if ((phase == 2 or phase == 3) and altitude > 10070 and !mach_switchover) {
|
||||||
if (mngktsmach) {
|
if (mngktsmach) {
|
||||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
setprop("FMGC/internal/mng-kts-mach", 0);
|
||||||
}
|
}
|
||||||
if (mng_spd_cmd != mng_alt_spd) {
|
if (mng_spd_cmd != mng_alt_spd) {
|
||||||
setprop("/FMGC/internal/mng-spd-cmd", mng_alt_spd);
|
setprop("FMGC/internal/mng-spd-cmd", mng_alt_spd);
|
||||||
}
|
}
|
||||||
} else if ((phase == 2 or phase == 3) and altitude > 10070 and mach_switchover) {
|
} else if ((phase == 2 or phase == 3) and altitude > 10070 and mach_switchover) {
|
||||||
if (!mngktsmach) {
|
if (!mngktsmach) {
|
||||||
setprop("/FMGC/internal/mng-kts-mach", 1);
|
setprop("FMGC/internal/mng-kts-mach", 1);
|
||||||
}
|
}
|
||||||
if (mng_spd_cmd != mng_alt_mach) {
|
if (mng_spd_cmd != mng_alt_mach) {
|
||||||
setprop("/FMGC/internal/mng-spd-cmd", mng_alt_mach);
|
setprop("FMGC/internal/mng-spd-cmd", mng_alt_mach);
|
||||||
}
|
}
|
||||||
} else if (phase == 4 and altitude > 11000 and !mach_switchover) {
|
} else if (phase == 4 and altitude > 11000 and !mach_switchover) {
|
||||||
if (mngktsmach) {
|
if (mngktsmach) {
|
||||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
setprop("FMGC/internal/mng-kts-mach", 0);
|
||||||
}
|
}
|
||||||
if (mng_spd_cmd != mng_alt_spd) {
|
if (mng_spd_cmd != mng_alt_spd) {
|
||||||
setprop("/FMGC/internal/mng-spd-cmd", mng_alt_spd);
|
setprop("FMGC/internal/mng-spd-cmd", mng_alt_spd);
|
||||||
}
|
}
|
||||||
} else if (phase == 4 and altitude > 11000 and mach_switchover) {
|
} else if (phase == 4 and altitude > 11000 and mach_switchover) {
|
||||||
if (!mngktsmach) {
|
if (!mngktsmach) {
|
||||||
setprop("/FMGC/internal/mng-kts-mach", 1);
|
setprop("FMGC/internal/mng-kts-mach", 1);
|
||||||
}
|
}
|
||||||
if (mng_spd_cmd != mng_alt_mach) {
|
if (mng_spd_cmd != mng_alt_mach) {
|
||||||
setprop("/FMGC/internal/mng-spd-cmd", mng_alt_mach);
|
setprop("FMGC/internal/mng-spd-cmd", mng_alt_mach);
|
||||||
}
|
}
|
||||||
} else if ((phase == 4 or phase == 5 or phase == 6) and altitude > 11000 and !mach_switchover) {
|
} else if ((phase == 4 or phase == 5 or phase == 6) and altitude > 11000 and !mach_switchover) {
|
||||||
if (mngktsmach) {
|
if (mngktsmach) {
|
||||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
setprop("FMGC/internal/mng-kts-mach", 0);
|
||||||
}
|
}
|
||||||
if (mng_spd_cmd != mng_alt_spd and !decel) {
|
if (mng_spd_cmd != mng_alt_spd and !decel) {
|
||||||
setprop("/FMGC/internal/mng-spd-cmd", mng_alt_spd);
|
setprop("FMGC/internal/mng-spd-cmd", mng_alt_spd);
|
||||||
} else if (mng_spd_cmd != minspeed and decel) {
|
} else if (mng_spd_cmd != minspeed and decel) {
|
||||||
setprop("/FMGC/internal/mng-spd-cmd", minspeed);
|
setprop("FMGC/internal/mng-spd-cmd", minspeed);
|
||||||
}
|
}
|
||||||
} else if ((phase == 4 or phase == 5 or phase == 6) and altitude <= 10980) {
|
} else if ((phase == 4 or phase == 5 or phase == 6) and altitude <= 10980) {
|
||||||
if (mngktsmach) {
|
if (mngktsmach) {
|
||||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
setprop("FMGC/internal/mng-kts-mach", 0);
|
||||||
}
|
}
|
||||||
if (mng_spd_cmd != 250 and !decel) {
|
if (mng_spd_cmd != 250 and !decel) {
|
||||||
setprop("/FMGC/internal/mng-spd-cmd", 250);
|
setprop("FMGC/internal/mng-spd-cmd", 250);
|
||||||
} else if (mng_spd_cmd != minspeed and decel) {
|
} else if (mng_spd_cmd != minspeed and decel) {
|
||||||
setprop("/FMGC/internal/mng-spd-cmd", minspeed);
|
setprop("FMGC/internal/mng-spd-cmd", minspeed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mng_spd_cmd = getprop("/FMGC/internal/mng-spd-cmd");
|
mng_spd_cmd = getprop("FMGC/internal/mng-spd-cmd");
|
||||||
|
|
||||||
if (mng_spd_cmd > maxspeed -5) {
|
if (mng_spd_cmd > maxspeed -5) {
|
||||||
setprop("/FMGC/internal/mng-spd", maxspeed -5);
|
setprop("FMGC/internal/mng-spd", maxspeed -5);
|
||||||
} else {
|
} else {
|
||||||
setprop("/FMGC/internal/mng-spd", mng_spd_cmd);
|
setprop("FMGC/internal/mng-spd", mng_spd_cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ktsmach and !mngktsmach) {
|
if (ktsmach and !mngktsmach) {
|
||||||
setprop("/it-autoflight/input/kts-mach", 0);
|
setprop("it-autoflight/input/kts-mach", 0);
|
||||||
} else if (!ktsmach and mngktsmach) {
|
} else if (!ktsmach and mngktsmach) {
|
||||||
setprop("/it-autoflight/input/kts-mach", 1);
|
setprop("it-autoflight/input/kts-mach", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
mng_spd = getprop("/FMGC/internal/mng-spd");
|
mng_spd = getprop("FMGC/internal/mng-spd");
|
||||||
|
|
||||||
if (kts_sel != mng_spd and !ktsmach) {
|
if (kts_sel != mng_spd and !ktsmach) {
|
||||||
setprop("/it-autoflight/input/spd-kts", mng_spd);
|
setprop("it-autoflight/input/spd-kts", mng_spd);
|
||||||
} else if (mach_sel != mng_spd and ktsmach) {
|
} else if (mach_sel != mng_spd and ktsmach) {
|
||||||
setprop("/it-autoflight/input/spd-mach", mng_spd);
|
setprop("it-autoflight/input/spd-mach", mng_spd);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ManagedSPD.stop();
|
ManagedSPD.stop();
|
||||||
|
@ -569,12 +569,12 @@ var ManagedSPD = maketimer(0.25, func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var switchDatabase = func {
|
var switchDatabase = func {
|
||||||
database1 = getprop("/FMGC/internal/navdatabase");
|
database1 = getprop("FMGC/internal/navdatabase");
|
||||||
database2 = getprop("/FMGC/internal/navdatabase2");
|
database2 = getprop("FMGC/internal/navdatabase2");
|
||||||
code1 = getprop("/FMGC/internal/navdatabasecode");
|
code1 = getprop("FMGC/internal/navdatabasecode");
|
||||||
code2 = getprop("/FMGC/internal/navdatabasecode2");
|
code2 = getprop("FMGC/internal/navdatabasecode2");
|
||||||
setprop("/FMGC/internal/navdatabase", database2);
|
setprop("FMGC/internal/navdatabase", database2);
|
||||||
setprop("/FMGC/internal/navdatabase2", database1);
|
setprop("FMGC/internal/navdatabase2", database1);
|
||||||
setprop("/FMGC/internal/navdatabasecode", code2);
|
setprop("FMGC/internal/navdatabasecode", code2);
|
||||||
setprop("/FMGC/internal/navdatabasecode2", code1);
|
setprop("FMGC/internal/navdatabasecode2", code1);
|
||||||
}
|
}
|
|
@ -4,66 +4,66 @@
|
||||||
|
|
||||||
var dataInput = func(key, i) {
|
var dataInput = func(key, i) {
|
||||||
if (key == "L1") {
|
if (key == "L1") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "POSMON");
|
setprop("MCDU[" ~ i ~ "]/page", "POSMON");
|
||||||
}
|
}
|
||||||
if (key == "L2") {
|
if (key == "L2") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "IRSMON");
|
setprop("MCDU[" ~ i ~ "]/page", "IRSMON");
|
||||||
}
|
}
|
||||||
if (key == "R5") {
|
if (key == "R5") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "PRINTFUNC");
|
setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var printInput = func(key, i) {
|
var printInput = func(key, i) {
|
||||||
if (key == "L1") {
|
if (key == "L1") {
|
||||||
setprop("/FMGC/print/mcdu/page1/L1auto", 1);
|
setprop("FMGC/print/mcdu/page1/L1auto", 1);
|
||||||
}
|
}
|
||||||
if (key == "L2") {
|
if (key == "L2") {
|
||||||
setprop("/FMGC/print/mcdu/page1/L2auto", 1);
|
setprop("FMGC/print/mcdu/page1/L2auto", 1);
|
||||||
}
|
}
|
||||||
if (key == "L3") {
|
if (key == "L3") {
|
||||||
setprop("/FMGC/print/mcdu/page1/L3auto", 1);
|
setprop("FMGC/print/mcdu/page1/L3auto", 1);
|
||||||
}
|
}
|
||||||
if (key == "L5") {
|
if (key == "L5") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "DATA");
|
setprop("MCDU[" ~ i ~ "]/page", "DATA");
|
||||||
}
|
}
|
||||||
if (key == "R1") {
|
if (key == "R1") {
|
||||||
setprop("/FMGC/print/mcdu/page1/R1req", 1);
|
setprop("FMGC/print/mcdu/page1/R1req", 1);
|
||||||
}
|
}
|
||||||
if (key == "R2") {
|
if (key == "R2") {
|
||||||
setprop("/FMGC/print/mcdu/page1/R2req", 1);
|
setprop("FMGC/print/mcdu/page1/R2req", 1);
|
||||||
}
|
}
|
||||||
if (key == "R3") {
|
if (key == "R3") {
|
||||||
setprop("/FMGC/print/mcdu/page1/R3req", 1);
|
setprop("FMGC/print/mcdu/page1/R3req", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var printInput2 = func(key, i) {
|
var printInput2 = func(key, i) {
|
||||||
if (key == "L1") {
|
if (key == "L1") {
|
||||||
setprop("/FMGC/print/mcdu/page2/L1auto", 1);
|
setprop("FMGC/print/mcdu/page2/L1auto", 1);
|
||||||
}
|
}
|
||||||
if (key == "L2") {
|
if (key == "L2") {
|
||||||
setprop("/FMGC/print/mcdu/page2/L2auto", 1);
|
setprop("FMGC/print/mcdu/page2/L2auto", 1);
|
||||||
}
|
}
|
||||||
if (key == "L3") {
|
if (key == "L3") {
|
||||||
setprop("/FMGC/print/mcdu/page2/L3auto", 1);
|
setprop("FMGC/print/mcdu/page2/L3auto", 1);
|
||||||
}
|
}
|
||||||
if (key == "L4") {
|
if (key == "L4") {
|
||||||
setprop("/FMGC/print/mcdu/page2/L4auto", 1);
|
setprop("FMGC/print/mcdu/page2/L4auto", 1);
|
||||||
}
|
}
|
||||||
if (key == "L6") {
|
if (key == "L6") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "DATA");
|
setprop("MCDU[" ~ i ~ "]/page", "DATA");
|
||||||
}
|
}
|
||||||
if (key == "R1") {
|
if (key == "R1") {
|
||||||
setprop("/FMGC/print/mcdu/page2/R1req", 1);
|
setprop("FMGC/print/mcdu/page2/R1req", 1);
|
||||||
}
|
}
|
||||||
if (key == "R2") {
|
if (key == "R2") {
|
||||||
setprop("/FMGC/print/mcdu/page2/R2req", 1);
|
setprop("FMGC/print/mcdu/page2/R2req", 1);
|
||||||
}
|
}
|
||||||
if (key == "R3") {
|
if (key == "R3") {
|
||||||
setprop("/FMGC/print/mcdu/page2/R3req", 1);
|
setprop("FMGC/print/mcdu/page2/R3req", 1);
|
||||||
}
|
}
|
||||||
if (key == "R4") {
|
if (key == "R4") {
|
||||||
setprop("/FMGC/print/mcdu/page2/R4req", 1);
|
setprop("FMGC/print/mcdu/page2/R4req", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,29 +3,29 @@
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
||||||
|
|
||||||
var initInputA = func(key, i) {
|
var initInputA = func(key, i) {
|
||||||
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
|
var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
|
||||||
if (key == "L3") {
|
if (key == "L3") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/MCDUC/flight-num", "");
|
setprop("MCDUC/flight-num", "");
|
||||||
setprop("/MCDUC/flight-num-set", 0);
|
setprop("MCDUC/flight-num-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var flts = size(scratchpad);
|
var flts = size(scratchpad);
|
||||||
if (flts >= 1 and flts <= 8) {
|
if (flts >= 1 and flts <= 8) {
|
||||||
setprop("/MCDUC/flight-num", scratchpad);
|
setprop("MCDUC/flight-num", scratchpad);
|
||||||
setprop("/MCDUC/flight-num-set", 1);
|
setprop("MCDUC/flight-num-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (key == "L5") {
|
} else if (key == "L5") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/cost-index", 0);
|
setprop("FMGC/internal/cost-index", 0);
|
||||||
setprop("/FMGC/internal/cost-index-set", 0);
|
setprop("FMGC/internal/cost-index-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var ci = int(scratchpad);
|
var ci = int(scratchpad);
|
||||||
var cis = size(scratchpad);
|
var cis = size(scratchpad);
|
||||||
|
@ -33,9 +33,9 @@ var initInputA = func(key, i) {
|
||||||
if (ci == nil) {
|
if (ci == nil) {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
} else if (ci >= 0 and ci <= 999) {
|
} else if (ci >= 0 and ci <= 999) {
|
||||||
setprop("/FMGC/internal/cost-index", ci);
|
setprop("FMGC/internal/cost-index", ci);
|
||||||
setprop("/FMGC/internal/cost-index-set", 1);
|
setprop("FMGC/internal/cost-index-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -45,11 +45,11 @@ var initInputA = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "L6") {
|
} else if (key == "L6") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/cruise-ft", 10000);
|
setprop("FMGC/internal/cruise-ft", 10000);
|
||||||
setprop("/FMGC/internal/cruise-fl", 100);
|
setprop("FMGC/internal/cruise-fl", 100);
|
||||||
setprop("/FMGC/internal/cruise-lvl-set", 0);
|
setprop("FMGC/internal/cruise-lvl-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var crz = int(scratchpad);
|
var crz = int(scratchpad);
|
||||||
var crzs = size(scratchpad);
|
var crzs = size(scratchpad);
|
||||||
|
@ -57,10 +57,10 @@ var initInputA = func(key, i) {
|
||||||
if (crz == nil) {
|
if (crz == nil) {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
} else if (crz > 0 and crz <= 430) {
|
} else if (crz > 0 and crz <= 430) {
|
||||||
setprop("/FMGC/internal/cruise-ft", crz * 100);
|
setprop("FMGC/internal/cruise-ft", crz * 100);
|
||||||
setprop("/FMGC/internal/cruise-fl", crz);
|
setprop("FMGC/internal/cruise-fl", crz);
|
||||||
setprop("/FMGC/internal/cruise-lvl-set", 1);
|
setprop("FMGC/internal/cruise-lvl-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -70,12 +70,12 @@ var initInputA = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "R1") {
|
} else if (key == "R1") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/dep-arpt", "");
|
setprop("FMGC/internal/dep-arpt", "");
|
||||||
setprop("/FMGC/internal/arr-arpt", "");
|
setprop("FMGC/internal/arr-arpt", "");
|
||||||
setprop("/FMGC/internal/tofrom-set", 0);
|
setprop("FMGC/internal/tofrom-set", 0);
|
||||||
fmgc.updateARPT();
|
fmgc.updateARPT();
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs == 9 and find("/", scratchpad) != -1) {
|
if (tfs == 9 and find("/", scratchpad) != -1) {
|
||||||
|
@ -83,10 +83,10 @@ var initInputA = func(key, i) {
|
||||||
var froms = size(fromto[0]);
|
var froms = size(fromto[0]);
|
||||||
var tos = size(fromto[1]);
|
var tos = size(fromto[1]);
|
||||||
if (froms == 4 and tos == 4) {
|
if (froms == 4 and tos == 4) {
|
||||||
setprop("/FMGC/internal/dep-arpt", fromto[0]);
|
setprop("FMGC/internal/dep-arpt", fromto[0]);
|
||||||
setprop("/FMGC/internal/arr-arpt", fromto[1]);
|
setprop("FMGC/internal/arr-arpt", fromto[1]);
|
||||||
setprop("/FMGC/internal/tofrom-set", 1);
|
setprop("FMGC/internal/tofrom-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
fmgc.updateARPT();
|
fmgc.updateARPT();
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
|
@ -96,21 +96,21 @@ var initInputA = func(key, i) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (key == "R3") {
|
} else if (key == "R3") {
|
||||||
#if (getprop("/controls/adirs/mcducbtn") == 0) {
|
#if (getprop("controls/adirs/mcducbtn") == 0) {
|
||||||
# setprop("/controls/adirs/mcducbtn", 1);
|
# setprop("controls/adirs/mcducbtn", 1);
|
||||||
#}
|
#}
|
||||||
} else if (key == "R6") {
|
} else if (key == "R6") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/tropo", 36090);
|
setprop("FMGC/internal/tropo", 36090);
|
||||||
setprop("/FMGC/internal/tropo-set", 0);
|
setprop("FMGC/internal/tropo-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tropo = size(scratchpad);
|
var tropo = size(scratchpad);
|
||||||
if (tropo == 5) {
|
if (tropo == 5) {
|
||||||
setprop("/FMGC/internal/tropo-set", 1);
|
setprop("FMGC/internal/tropo-set", 1);
|
||||||
setprop("/FMGC/internal/tropo", scratchpad);
|
setprop("FMGC/internal/tropo", scratchpad);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,38 +3,38 @@
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
||||||
|
|
||||||
var initInputB = func(key, i) {
|
var initInputB = func(key, i) {
|
||||||
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
|
var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
|
||||||
if (key == "R1") {
|
if (key == "R1") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs == 0) {
|
if (tfs == 0) {
|
||||||
var zfw = getprop("/fdm/jsbsim/inertia/weight-lbs") - getprop("/consumables/fuel/total-fuel-lbs");
|
var zfw = getprop("fdm/jsbsim/inertia/weight-lbs") - getprop("consumables/fuel/total-fuel-lbs");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "/" ~ sprintf("%3.1f", math.round(zfw / 1000, 0.1)));
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "/" ~ sprintf("%3.1f", math.round(zfw / 1000, 0.1)));
|
||||||
} else if (tfs >= 2 and tfs <= 11 and find("/", scratchpad) != -1) {
|
} else if (tfs >= 2 and tfs <= 11 and find("/", scratchpad) != -1) {
|
||||||
var zfwi = split("/", scratchpad);
|
var zfwi = split("/", scratchpad);
|
||||||
var zfwcg = size(zfwi[0]);
|
var zfwcg = size(zfwi[0]);
|
||||||
var zfw = size(zfwi[1]);
|
var zfw = size(zfwi[1]);
|
||||||
if (zfwcg >= 1 and zfwcg <= 5 and zfwi[0] > 0 and zfwi[0] <= 99.9) {
|
if (zfwcg >= 1 and zfwcg <= 5 and zfwi[0] > 0 and zfwi[0] <= 99.9) {
|
||||||
setprop("/FMGC/internal/zfwcg", zfwi[0]);
|
setprop("FMGC/internal/zfwcg", zfwi[0]);
|
||||||
setprop("/FMGC/internal/zfwcg-set", 1);
|
setprop("FMGC/internal/zfwcg-set", 1);
|
||||||
}
|
}
|
||||||
if (zfw >= 1 and zfw <= 5 and zfwi[1] > 0 and zfwi[1] <= 999.9) {
|
if (zfw >= 1 and zfw <= 5 and zfwi[1] > 0 and zfwi[1] <= 999.9) {
|
||||||
setprop("/FMGC/internal/zfw", zfwi[1]);
|
setprop("FMGC/internal/zfw", zfwi[1]);
|
||||||
setprop("/FMGC/internal/zfw-set", 1);
|
setprop("FMGC/internal/zfw-set", 1);
|
||||||
}
|
}
|
||||||
if ((zfwcg >= 1 and zfwcg <= 5 and zfwi[0] > 0 and zfwi[0] <= 99.9) or (zfw >= 1 and zfw <= 5 and zfwi[1] > 0 and zfwi[1] <= 999.9)) {
|
if ((zfwcg >= 1 and zfwcg <= 5 and zfwi[0] > 0 and zfwi[0] <= 99.9) or (zfw >= 1 and zfw <= 5 and zfwi[1] > 0 and zfwi[1] <= 999.9)) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
} else if (tfs >= 1 and tfs <= 5) {
|
} else if (tfs >= 1 and tfs <= 5) {
|
||||||
var zfwcg = size(scratchpad);
|
var zfwcg = size(scratchpad);
|
||||||
if (zfwcg >= 1 and zfwcg <= 5 and scratchpad > 0 and scratchpad <= 99.9) {
|
if (zfwcg >= 1 and zfwcg <= 5 and scratchpad > 0 and scratchpad <= 99.9) {
|
||||||
setprop("/FMGC/internal/zfwcg", scratchpad);
|
setprop("FMGC/internal/zfwcg", scratchpad);
|
||||||
setprop("/FMGC/internal/zfwcg-set", 1);
|
setprop("FMGC/internal/zfwcg-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -44,20 +44,20 @@ var initInputB = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "R2") {
|
} else if (key == "R2") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/block", 0.0);
|
setprop("FMGC/internal/block", 0.0);
|
||||||
setprop("/FMGC/internal/block-set", 0);
|
setprop("FMGC/internal/block-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
var maxblock = getprop("/options/maxblock");
|
var maxblock = getprop("options/maxblock");
|
||||||
if (tfs == 0) {
|
if (tfs == 0) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", sprintf("%3.1f", math.round(getprop("/consumables/fuel/total-fuel-lbs") / 1000, 0.1)));
|
setprop("MCDU[" ~ i ~ "]/scratchpad", sprintf("%3.1f", math.round(getprop("consumables/fuel/total-fuel-lbs") / 1000, 0.1)));
|
||||||
} else if (tfs >= 1 and tfs <= 5) {
|
} else if (tfs >= 1 and tfs <= 5) {
|
||||||
if (scratchpad >= 1.0 and scratchpad <= maxblock) {
|
if (scratchpad >= 1.0 and scratchpad <= maxblock) {
|
||||||
setprop("/FMGC/internal/block", scratchpad);
|
setprop("FMGC/internal/block", scratchpad);
|
||||||
setprop("/FMGC/internal/block-set", 1);
|
setprop("FMGC/internal/block-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,187 +7,187 @@ var MCDU_init = func(i) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var MCDU_reset = func(i) {
|
var MCDU_reset = func(i) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/active", 0);
|
setprop("MCDU[" ~ i ~ "]/active", 0);
|
||||||
setprop("/it-autoflight/settings/togaspd", 157);
|
setprop("it-autoflight/settings/togaspd", 157);
|
||||||
setprop("/MCDU[" ~ i ~ "]/last-scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
|
||||||
setprop("/MCDU[" ~ i ~ "]/last-page", "NONE");
|
setprop("MCDU[" ~ i ~ "]/last-page", "NONE");
|
||||||
setprop("/MCDU[" ~ i ~ "]/last-fmgc-page", "STATUS");
|
setprop("MCDU[" ~ i ~ "]/last-fmgc-page", "STATUS");
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "MCDU");
|
setprop("MCDU[" ~ i ~ "]/page", "MCDU");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDUC/flight-num", "");
|
setprop("MCDUC/flight-num", "");
|
||||||
setprop("/MCDUC/thracc-set", 0);
|
setprop("MCDUC/thracc-set", 0);
|
||||||
setprop("/MCDUC/reducacc-set", 0);
|
setprop("MCDUC/reducacc-set", 0);
|
||||||
setprop("/MCDUC/flight-num-set", 0);
|
setprop("MCDUC/flight-num-set", 0);
|
||||||
setprop("/FMGC/internal/flex", 0);
|
setprop("FMGC/internal/flex", 0);
|
||||||
setprop("/FMGC/internal/dep-arpt", "");
|
setprop("FMGC/internal/dep-arpt", "");
|
||||||
setprop("/FMGC/internal/arr-arpt", "");
|
setprop("FMGC/internal/arr-arpt", "");
|
||||||
setprop("/FMGC/internal/cruise-ft", 10000);
|
setprop("FMGC/internal/cruise-ft", 10000);
|
||||||
setprop("/FMGC/internal/cruise-fl", 100);
|
setprop("FMGC/internal/cruise-fl", 100);
|
||||||
setprop("/FMGC/internal/cost-index", "0");
|
setprop("FMGC/internal/cost-index", "0");
|
||||||
setprop("/FMGC/internal/trans-alt", 18000);
|
setprop("FMGC/internal/trans-alt", 18000);
|
||||||
setprop("/FMGC/internal/reduc-agl-ft", "3000");
|
setprop("FMGC/internal/reduc-agl-ft", "3000");
|
||||||
setprop("/FMGC/internal/eng-out-reduc", "3500");
|
setprop("FMGC/internal/eng-out-reduc", "3500");
|
||||||
setprop("/FMGC/internal/v1", 0);
|
setprop("FMGC/internal/v1", 0);
|
||||||
setprop("/FMGC/internal/vr", 0);
|
setprop("FMGC/internal/vr", 0);
|
||||||
setprop("/FMGC/internal/v2", 0);
|
setprop("FMGC/internal/v2", 0);
|
||||||
setprop("/FMGC/internal/block", 0.0);
|
setprop("FMGC/internal/block", 0.0);
|
||||||
setprop("/FMGC/internal/zfw", 0);
|
setprop("FMGC/internal/zfw", 0);
|
||||||
setprop("/FMGC/internal/zfwcg", 55.1); # 25KG default
|
setprop("FMGC/internal/zfwcg", 55.1); # 25KG default
|
||||||
setprop("/FMGC/internal/v1-set", 0);
|
setprop("FMGC/internal/v1-set", 0);
|
||||||
setprop("/FMGC/internal/vr-set", 0);
|
setprop("FMGC/internal/vr-set", 0);
|
||||||
setprop("/FMGC/internal/v2-set", 0);
|
setprop("FMGC/internal/v2-set", 0);
|
||||||
setprop("/FMGC/internal/block-set", 0);
|
setprop("FMGC/internal/block-set", 0);
|
||||||
setprop("/FMGC/internal/zfw-set", 0);
|
setprop("FMGC/internal/zfw-set", 0);
|
||||||
setprop("/FMGC/internal/zfwcg-set", 0);
|
setprop("FMGC/internal/zfwcg-set", 0);
|
||||||
setprop("/FMGC/internal/to-flap", 0);
|
setprop("FMGC/internal/to-flap", 0);
|
||||||
setprop("/FMGC/internal/to-ths", "0.0");
|
setprop("FMGC/internal/to-ths", "0.0");
|
||||||
setprop("/FMGC/internal/tofrom-set", 0);
|
setprop("FMGC/internal/tofrom-set", 0);
|
||||||
setprop("/FMGC/internal/cost-index-set", 0);
|
setprop("FMGC/internal/cost-index-set", 0);
|
||||||
setprop("/FMGC/internal/cruise-lvl-set", 0);
|
setprop("FMGC/internal/cruise-lvl-set", 0);
|
||||||
setprop("/FMGC/internal/flap-ths-set", 0);
|
setprop("FMGC/internal/flap-ths-set", 0);
|
||||||
setprop("/FMGC/internal/flex-set", 0);
|
setprop("FMGC/internal/flex-set", 0);
|
||||||
setprop("/FMGC/internal/ils1freq-set", 0);
|
setprop("FMGC/internal/ils1freq-set", 0);
|
||||||
setprop("/FMGC/internal/ils1crs-set", 0);
|
setprop("FMGC/internal/ils1crs-set", 0);
|
||||||
setprop("/FMGC/internal/vor1freq-set", 0);
|
setprop("FMGC/internal/vor1freq-set", 0);
|
||||||
setprop("/FMGC/internal/vor1crs-set", 0);
|
setprop("FMGC/internal/vor1crs-set", 0);
|
||||||
setprop("/FMGC/internal/vor2freq-set", 0);
|
setprop("FMGC/internal/vor2freq-set", 0);
|
||||||
setprop("/FMGC/internal/vor2crs-set", 0);
|
setprop("FMGC/internal/vor2crs-set", 0);
|
||||||
setprop("/FMGC/internal/adf1freq-set", 0);
|
setprop("FMGC/internal/adf1freq-set", 0);
|
||||||
setprop("/FMGC/internal/adf2freq-set", 0);
|
setprop("FMGC/internal/adf2freq-set", 0);
|
||||||
setprop("/FMGC/internal/navdatabase", "01JAN-28JAN");
|
setprop("FMGC/internal/navdatabase", "01JAN-28JAN");
|
||||||
setprop("/FMGC/internal/navdatabase2", "29JAN-26FEB");
|
setprop("FMGC/internal/navdatabase2", "29JAN-26FEB");
|
||||||
setprop("/FMGC/internal/navdatabasecode", "AB20170101");
|
setprop("FMGC/internal/navdatabasecode", "AB20170101");
|
||||||
setprop("/FMGC/internal/navdatabasecode2", "AB20170102");
|
setprop("FMGC/internal/navdatabasecode2", "AB20170102");
|
||||||
setprop("/FMGC/print/mcdu/page1/L1auto", 0);
|
setprop("FMGC/print/mcdu/page1/L1auto", 0);
|
||||||
setprop("/FMGC/print/mcdu/page1/L2auto", 0);
|
setprop("FMGC/print/mcdu/page1/L2auto", 0);
|
||||||
setprop("/FMGC/print/mcdu/page1/L3auto", 0);
|
setprop("FMGC/print/mcdu/page1/L3auto", 0);
|
||||||
setprop("/FMGC/print/mcdu/page1/R1req", 0);
|
setprop("FMGC/print/mcdu/page1/R1req", 0);
|
||||||
setprop("/FMGC/print/mcdu/page1/R2req", 0);
|
setprop("FMGC/print/mcdu/page1/R2req", 0);
|
||||||
setprop("/FMGC/print/mcdu/page1/R3req", 0);
|
setprop("FMGC/print/mcdu/page1/R3req", 0);
|
||||||
setprop("/FMGC/print/mcdu/page2/L1auto", 0);
|
setprop("FMGC/print/mcdu/page2/L1auto", 0);
|
||||||
setprop("/FMGC/print/mcdu/page2/L2auto", 0);
|
setprop("FMGC/print/mcdu/page2/L2auto", 0);
|
||||||
setprop("/FMGC/print/mcdu/page2/L3auto", 0);
|
setprop("FMGC/print/mcdu/page2/L3auto", 0);
|
||||||
setprop("/FMGC/print/mcdu/page2/L4auto", 0);
|
setprop("FMGC/print/mcdu/page2/L4auto", 0);
|
||||||
setprop("/FMGC/print/mcdu/page2/R1req", 0);
|
setprop("FMGC/print/mcdu/page2/R1req", 0);
|
||||||
setprop("/FMGC/print/mcdu/page2/R2req", 0);
|
setprop("FMGC/print/mcdu/page2/R2req", 0);
|
||||||
setprop("/FMGC/print/mcdu/page2/R3req", 0);
|
setprop("FMGC/print/mcdu/page2/R3req", 0);
|
||||||
setprop("/FMGC/print/mcdu/page2/R4req", 0);
|
setprop("FMGC/print/mcdu/page2/R4req", 0);
|
||||||
setprop("/FMGC/internal/tropo", 36090);
|
setprop("FMGC/internal/tropo", 36090);
|
||||||
setprop("/FMGC/internal/tropo-set", 0);
|
setprop("FMGC/internal/tropo-set", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
var lskbutton = func(btn, i) {
|
var lskbutton = func(btn, i) {
|
||||||
if (btn == "1") {
|
if (btn == "1") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "MCDU") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "MCDU") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/active") != 2) {
|
if (getprop("MCDU[" ~ i ~ "]/active") != 2) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 1);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "WAIT FOR SYSTEM RESPONSE");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "WAIT FOR SYSTEM RESPONSE");
|
||||||
setprop("/MCDU[" ~ i ~ "]/active", 1);
|
setprop("MCDU[" ~ i ~ "]/active", 1);
|
||||||
settimer(func(){
|
settimer(func(){
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", getprop("/MCDU[" ~ i ~ "]/last-fmgc-page"));
|
setprop("MCDU[" ~ i ~ "]/page", getprop("MCDU[" ~ i ~ "]/last-fmgc-page"));
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/active", 2);
|
setprop("MCDU[" ~ i ~ "]/active", 2);
|
||||||
}, 2);
|
}, 2);
|
||||||
} else {
|
} else {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", getprop("/MCDU[" ~ i ~ "]/last-fmgc-page"));
|
setprop("MCDU[" ~ i ~ "]/page", getprop("MCDU[" ~ i ~ "]/last-fmgc-page"));
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
}
|
}
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||||
perfTOInput("L1",i);
|
perfTOInput("L1",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||||
radnavInput("L1",i);
|
radnavInput("L1",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
|
||||||
dataInput("L1",i);
|
dataInput("L1",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
||||||
printInput("L1",i);
|
printInput("L1",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
||||||
printInput2("L1",i);
|
printInput2("L1",i);
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
} else if (btn == "2") {
|
} else if (btn == "2") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
|
||||||
PerfInput("L2",i);
|
PerfInput("L2",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||||
perfTOInput("L2",i);
|
perfTOInput("L2",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||||
radnavInput("L2",i);
|
radnavInput("L2",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CLB") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
|
||||||
initInputA("L5",i); # Does the same thing as on the INIT page
|
initInputA("L5",i); # Does the same thing as on the INIT page
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CRZ") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
|
||||||
initInputA("L5",i);
|
initInputA("L5",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DES") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
|
||||||
initInputA("L5",i);
|
initInputA("L5",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
|
||||||
dataInput("L2",i);
|
dataInput("L2",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
||||||
printInput("L2",i);
|
printInput("L2",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
||||||
printInput2("L2",i);
|
printInput2("L2",i);
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
} else if (btn == "3") {
|
} else if (btn == "3") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
|
||||||
initInputA("L3",i);
|
initInputA("L3",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||||
perfTOInput("L3",i);
|
perfTOInput("L3",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "STATUS") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "STATUS") {
|
||||||
statusInput("L3",i);
|
statusInput("L3",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||||
radnavInput("L3",i);
|
radnavInput("L3",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
||||||
printInput("L3",i);
|
printInput("L3",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
||||||
printInput2("L3",i);
|
printInput2("L3",i);
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
} else if (btn == "4") {
|
} else if (btn == "4") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "STATUS");
|
setprop("MCDU[" ~ i ~ "]/page", "STATUS");
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||||
perfTOInput("L4",i);
|
perfTOInput("L4",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||||
radnavInput("L4",i);
|
radnavInput("L4",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
||||||
printInput2("L4",i);
|
printInput2("L4",i);
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
} else if (btn == "5") {
|
} else if (btn == "5") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
|
||||||
initInputA("L5",i);
|
initInputA("L5",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||||
perfTOInput("L5",i);
|
perfTOInput("L5",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CLB") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
|
||||||
perfCLBInput("L5",i);
|
perfCLBInput("L5",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CRZ") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
|
||||||
perfCRZInput("L5",i);
|
perfCRZInput("L5",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DES") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
|
||||||
perfDESInput("L5",i);
|
perfDESInput("L5",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||||
radnavInput("L5",i);
|
radnavInput("L5",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
||||||
printInput("L5",i);
|
printInput("L5",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
||||||
printInput2("L5",i);
|
printInput2("L5",i);
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
} else if (btn == "6") {
|
} else if (btn == "6") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
|
||||||
initInputA("L6",i);
|
initInputA("L6",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CLB") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
|
||||||
perfCLBInput("L6",i);
|
perfCLBInput("L6",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CRZ") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
|
||||||
perfCRZInput("L6",i);
|
perfCRZInput("L6",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DES") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "DES") {
|
||||||
perfDESInput("L6",i);
|
perfDESInput("L6",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
||||||
printInput2("L6",i);
|
printInput2("L6",i);
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
|
@ -201,89 +201,89 @@ var lskbutton_b = func(btn, i) {
|
||||||
|
|
||||||
var rskbutton = func(btn, i) {
|
var rskbutton = func(btn, i) {
|
||||||
if (btn == "1") {
|
if (btn == "1") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
|
||||||
initInputA("R1",i);
|
initInputA("R1",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "INITB") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
|
||||||
initInputB("R1",i);
|
initInputB("R1",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||||
radnavInput("R1",i);
|
radnavInput("R1",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
||||||
printInput("R1",i);
|
printInput("R1",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
||||||
printInput2("R1",i);
|
printInput2("R1",i);
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
} else if (btn == "2") {
|
} else if (btn == "2") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITB") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
|
||||||
initInputB("R2",i);
|
initInputB("R2",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||||
radnavInput("R2",i);
|
radnavInput("R2",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
||||||
printInput("R2",i);
|
printInput("R2",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
||||||
printInput2("R2",i);
|
printInput2("R2",i);
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
} else if (btn == "3") {
|
} else if (btn == "3") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
|
||||||
initInputA("R3",i);
|
initInputA("R3",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||||
perfTOInput("R3",i);
|
perfTOInput("R3",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
||||||
printInput("R3",i);
|
printInput("R3",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
||||||
printInput2("R3",i);
|
printInput2("R3",i);
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
} else if (btn == "4") {
|
} else if (btn == "4") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||||
perfTOInput("R4",i);
|
perfTOInput("R4",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||||
radnavInput("R4",i);
|
radnavInput("R4",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
||||||
printInput2("R4",i);
|
printInput2("R4",i);
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
} else if (btn == "5") {
|
} else if (btn == "5") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||||
perfTOInput("R5",i);
|
perfTOInput("R5",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "RADNAV") {
|
||||||
radnavInput("R5",i);
|
radnavInput("R5",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
|
||||||
dataInput("R5",i);
|
dataInput("R5",i);
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
} else if (btn == "6") {
|
} else if (btn == "6") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "MCDU") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "MCDU") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/last-page") != "NONE") {
|
if (getprop("MCDU[" ~ i ~ "]/last-page") != "NONE") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", getprop("/MCDU[" ~ i ~ "]/last-page"));
|
setprop("MCDU[" ~ i ~ "]/page", getprop("MCDU[" ~ i ~ "]/last-page"));
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "TO") {
|
||||||
perfTOInput("R6",i);
|
perfTOInput("R6",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CLB") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CLB") {
|
||||||
perfCLBInput("R6",i);
|
perfCLBInput("R6",i);
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CRZ") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "CRZ") {
|
||||||
perfCRZInput("R6",i);
|
perfCRZInput("R6",i);
|
||||||
} else if ((getprop("/MCDU[" ~ i ~ "]/page") == "DATA") or (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") or (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2")) {
|
} else if ((getprop("MCDU[" ~ i ~ "]/page") == "DATA") or (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") or (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2")) {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/scratchpad") != "AOC DISABLED") {
|
if (getprop("MCDU[" ~ i ~ "]/scratchpad") != "AOC DISABLED") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
|
if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/last-scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
setprop("/MCDU[" ~ i ~ "]/last-scratchpad", getprop("/MCDU[" ~ i ~ "]/scratchpad"));
|
setprop("MCDU[" ~ i ~ "]/last-scratchpad", getprop("MCDU[" ~ i ~ "]/scratchpad"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 1);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "AOC DISABLED");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "AOC DISABLED");
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
|
||||||
initInputA("R6",i);
|
initInputA("R6",i);
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
|
@ -297,40 +297,40 @@ var rskbutton_b = func(btn, i) {
|
||||||
|
|
||||||
var arrowbutton = func(btn, i) {
|
var arrowbutton = func(btn, i) {
|
||||||
if (btn == "left") {
|
if (btn == "left") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "DATA2");
|
setprop("MCDU[" ~ i ~ "]/page", "DATA2");
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA2") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "DATA");
|
setprop("MCDU[" ~ i ~ "]/page", "DATA");
|
||||||
}
|
}
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
|
||||||
if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) {
|
if (getprop("engines/engine[0]/state") != 3 and getprop("engines/engine[1]/state") != 3) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "INITB");
|
setprop("MCDU[" ~ i ~ "]/page", "INITB");
|
||||||
}
|
}
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "INITB") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "INITA");
|
setprop("MCDU[" ~ i ~ "]/page", "INITA");
|
||||||
}
|
}
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "PRINTFUNC2");
|
setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC2");
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "PRINTFUNC");
|
setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC");
|
||||||
}
|
}
|
||||||
} else if (btn == "right") {
|
} else if (btn == "right") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "DATA") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "DATA2");
|
setprop("MCDU[" ~ i ~ "]/page", "DATA2");
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "DATA2") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "DATA");
|
setprop("MCDU[" ~ i ~ "]/page", "DATA");
|
||||||
}
|
}
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "INITA") {
|
||||||
if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) {
|
if (getprop("engines/engine[0]/state") != 3 and getprop("engines/engine[1]/state") != 3) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "INITB");
|
setprop("MCDU[" ~ i ~ "]/page", "INITB");
|
||||||
}
|
}
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "INITB") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "INITB") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "INITA");
|
setprop("MCDU[" ~ i ~ "]/page", "INITA");
|
||||||
}
|
}
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "PRINTFUNC2");
|
setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC2");
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
} else if (getprop("MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "PRINTFUNC");
|
setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC");
|
||||||
}
|
}
|
||||||
} else if (btn == "up") {
|
} else if (btn == "up") {
|
||||||
# Nothing for now
|
# Nothing for now
|
||||||
|
@ -340,204 +340,204 @@ var arrowbutton = func(btn, i) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var pagebutton = func(btn, i) {
|
var pagebutton = func(btn, i) {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/page") != "MCDU") {
|
if (getprop("MCDU[" ~ i ~ "]/page") != "MCDU") {
|
||||||
if (btn == "radnav") {
|
if (btn == "radnav") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "RADNAV");
|
setprop("MCDU[" ~ i ~ "]/page", "RADNAV");
|
||||||
} else if (btn == "perf") {
|
} else if (btn == "perf") {
|
||||||
if (getprop("/FMGC/status/phase") == 0 or getprop("/FMGC/status/phase") == 1) {
|
if (getprop("FMGC/status/phase") == 0 or getprop("FMGC/status/phase") == 1) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "TO");
|
setprop("MCDU[" ~ i ~ "]/page", "TO");
|
||||||
} else if (getprop("/FMGC/status/phase") == 2) {
|
} else if (getprop("FMGC/status/phase") == 2) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "CLB");
|
setprop("MCDU[" ~ i ~ "]/page", "CLB");
|
||||||
} else if (getprop("/FMGC/status/phase") == 3) {
|
} else if (getprop("FMGC/status/phase") == 3) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "CRZ");
|
setprop("MCDU[" ~ i ~ "]/page", "CRZ");
|
||||||
} else if (getprop("/FMGC/status/phase") == 4) {
|
} else if (getprop("FMGC/status/phase") == 4) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "DES");
|
setprop("MCDU[" ~ i ~ "]/page", "DES");
|
||||||
}
|
}
|
||||||
} else if (btn == "init") {
|
} else if (btn == "init") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "INITA");
|
setprop("MCDU[" ~ i ~ "]/page", "INITA");
|
||||||
} else if (btn == "data") {
|
} else if (btn == "data") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "DATA");
|
setprop("MCDU[" ~ i ~ "]/page", "DATA");
|
||||||
} else if (btn == "mcdu") {
|
} else if (btn == "mcdu") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/last-page", getprop("/MCDU[" ~ i ~ "]/page"));
|
setprop("MCDU[" ~ i ~ "]/last-page", getprop("MCDU[" ~ i ~ "]/page"));
|
||||||
setprop("/MCDU[" ~ i ~ "]/last-fmgc-page", getprop("/MCDU[" ~ i ~ "]/page"));
|
setprop("MCDU[" ~ i ~ "]/last-fmgc-page", getprop("MCDU[" ~ i ~ "]/page"));
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "MCDU");
|
setprop("MCDU[" ~ i ~ "]/page", "MCDU");
|
||||||
} else if (btn == "f-pln") {
|
} else if (btn == "f-pln") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "F-PLNA");
|
setprop("MCDU[" ~ i ~ "]/page", "F-PLNA");
|
||||||
} else if (btn == "fuel-pred") {
|
} else if (btn == "fuel-pred") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "FUELPRED");
|
setprop("MCDU[" ~ i ~ "]/page", "FUELPRED");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var button = func(btn, i) {
|
var button = func(btn, i) {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/scratchpad-msg") == 0 and getprop("/MCDU[" ~ i ~ "]/page") != "MCDU") {
|
if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 0 and getprop("MCDU[" ~ i ~ "]/page") != "MCDU") {
|
||||||
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
|
var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
|
||||||
if (btn == "A") {
|
if (btn == "A") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "A");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "A");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "B") {
|
} else if (btn == "B") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "B");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "B");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "C") {
|
} else if (btn == "C") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "C");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "C");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "D") {
|
} else if (btn == "D") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "D");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "D");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "E") {
|
} else if (btn == "E") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "E");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "E");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "F") {
|
} else if (btn == "F") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "F");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "F");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "G") {
|
} else if (btn == "G") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "G");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "G");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "H") {
|
} else if (btn == "H") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "H");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "H");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "I") {
|
} else if (btn == "I") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "I");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "I");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "J") {
|
} else if (btn == "J") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "J");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "J");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "K") {
|
} else if (btn == "K") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "K");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "K");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "L") {
|
} else if (btn == "L") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "L");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "L");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "M") {
|
} else if (btn == "M") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "M");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "M");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "N") {
|
} else if (btn == "N") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "N");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "N");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "O") {
|
} else if (btn == "O") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "O");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "O");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "P") {
|
} else if (btn == "P") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "P");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "P");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "Q") {
|
} else if (btn == "Q") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Q");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Q");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "R") {
|
} else if (btn == "R") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "R");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "R");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "S") {
|
} else if (btn == "S") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "S");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "S");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "T") {
|
} else if (btn == "T") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "T");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "T");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "U") {
|
} else if (btn == "U") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "U");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "U");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "V") {
|
} else if (btn == "V") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "V");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "V");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "W") {
|
} else if (btn == "W") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "W");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "W");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "X") {
|
} else if (btn == "X") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "X");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "X");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "Y") {
|
} else if (btn == "Y") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Y");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Y");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "Z") {
|
} else if (btn == "Z") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Z");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Z");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "SLASH") {
|
} else if (btn == "SLASH") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "/");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "/");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "SP") {
|
} else if (btn == "SP") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ " ");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ " ");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "CLR") {
|
} else if (btn == "CLR") {
|
||||||
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
|
var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
|
||||||
if (size(scratchpad) == 0) {
|
if (size(scratchpad) == 0) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 1);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "CLR");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "CLR");
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
|
} else if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (size(scratchpad) > 0) {
|
} else if (size(scratchpad) > 0) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/last-scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", left(scratchpad, size(scratchpad) - 1));
|
setprop("MCDU[" ~ i ~ "]/scratchpad", left(scratchpad, size(scratchpad) - 1));
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
}
|
}
|
||||||
} else if (btn == "0") {
|
} else if (btn == "0") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "0");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "0");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "1") {
|
} else if (btn == "1") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "1");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "1");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "2") {
|
} else if (btn == "2") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "2");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "2");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "3") {
|
} else if (btn == "3") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "3");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "3");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "4") {
|
} else if (btn == "4") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "4");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "4");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "5") {
|
} else if (btn == "5") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "5");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "5");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "6") {
|
} else if (btn == "6") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "6");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "6");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "7") {
|
} else if (btn == "7") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "7");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "7");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "8") {
|
} else if (btn == "8") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "8");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "8");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "9") {
|
} else if (btn == "9") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "9");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "9");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "DOT") {
|
} else if (btn == "DOT") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ ".");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ ".");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
} else if (btn == "PLUSMINUS") {
|
} else if (btn == "PLUSMINUS") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "-");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "-");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (btn == "CLR") {
|
if (btn == "CLR") {
|
||||||
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
|
var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
|
||||||
if (size(scratchpad) == 0) {
|
if (size(scratchpad) == 0) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 1);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "CLR");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "CLR");
|
||||||
} else if (getprop("/MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
|
} else if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", getprop("/MCDU[" ~ i ~ "]/last-scratchpad"));
|
setprop("MCDU[" ~ i ~ "]/scratchpad", getprop("MCDU[" ~ i ~ "]/last-scratchpad"));
|
||||||
setprop("/MCDU[" ~ i ~ "]/last-scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var notAllowed = func(i) {
|
var notAllowed = func(i) {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/scratchpad") != "NOT ALLOWED") {
|
if (getprop("MCDU[" ~ i ~ "]/scratchpad") != "NOT ALLOWED") {
|
||||||
if (getprop("/MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
|
if (getprop("MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
|
||||||
setprop("/MCDU[" ~ i ~ "]/last-scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/last-scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
setprop("/MCDU[" ~ i ~ "]/last-scratchpad", getprop("/MCDU[" ~ i ~ "]/scratchpad"));
|
setprop("MCDU[" ~ i ~ "]/last-scratchpad", getprop("MCDU[" ~ i ~ "]/scratchpad"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 1);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "NOT ALLOWED");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "NOT ALLOWED");
|
||||||
}
|
}
|
||||||
|
|
||||||
var screenFlash = func(time, i) {
|
var screenFlash = func(time, i) {
|
||||||
var page = getprop("/MCDU[" ~ i ~ "]/page");
|
var page = getprop("MCDU[" ~ i ~ "]/page");
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "NONE");
|
setprop("MCDU[" ~ i ~ "]/page", "NONE");
|
||||||
settimer(func {
|
settimer(func {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", page);
|
setprop("MCDU[" ~ i ~ "]/page", page);
|
||||||
}, time);
|
}, time);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
||||||
|
|
||||||
var perfCLBInput = func(key, i) {
|
var perfCLBInput = func(key, i) {
|
||||||
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
|
var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
|
||||||
if (key == "L5") {
|
if (key == "L5") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/cost-index", 0);
|
setprop("FMGC/internal/cost-index", 0);
|
||||||
setprop("/FMGC/internal/cost-index-set", 0);
|
setprop("FMGC/internal/cost-index-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var ci = int(scratchpad);
|
var ci = int(scratchpad);
|
||||||
var cis = size(scratchpad);
|
var cis = size(scratchpad);
|
||||||
|
@ -17,9 +17,9 @@ var perfCLBInput = func(key, i) {
|
||||||
if (ci == nil) {
|
if (ci == nil) {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
} else if (ci >= 0 and ci <= 999) {
|
} else if (ci >= 0 and ci <= 999) {
|
||||||
setprop("/FMGC/internal/cost-index", ci);
|
setprop("FMGC/internal/cost-index", ci);
|
||||||
setprop("/FMGC/internal/cost-index-set", 1);
|
setprop("FMGC/internal/cost-index-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -28,8 +28,8 @@ var perfCLBInput = func(key, i) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (key == "L6") {
|
} else if (key == "L6") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "TO");
|
setprop("MCDU[" ~ i ~ "]/page", "TO");
|
||||||
} else if (key == "R6") {
|
} else if (key == "R6") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "CRZ");
|
setprop("MCDU[" ~ i ~ "]/page", "CRZ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
var perfCRZInput = func(key, i) {
|
var perfCRZInput = func(key, i) {
|
||||||
if (key == "L6") {
|
if (key == "L6") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "CLB");
|
setprop("MCDU[" ~ i ~ "]/page", "CLB");
|
||||||
}
|
}
|
||||||
if (key == "R6") {
|
if (key == "R6") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "DES");
|
setprop("MCDU[" ~ i ~ "]/page", "DES");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
|
|
||||||
var perfDESInput = func(key, i) {
|
var perfDESInput = func(key, i) {
|
||||||
if (key == "L6") {
|
if (key == "L6") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "CRZ");
|
setprop("MCDU[" ~ i ~ "]/page", "CRZ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,20 +3,20 @@
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
||||||
|
|
||||||
var perfTOInput = func(key, i) {
|
var perfTOInput = func(key, i) {
|
||||||
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
|
var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
|
||||||
if (key == "L1") {
|
if (key == "L1") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/v1", 0);
|
setprop("FMGC/internal/v1", 0);
|
||||||
setprop("/FMGC/internal/v1-set", 0);
|
setprop("FMGC/internal/v1-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs == 3) {
|
if (tfs == 3) {
|
||||||
if (scratchpad >= 100 and scratchpad <= 200) {
|
if (scratchpad >= 100 and scratchpad <= 200) {
|
||||||
setprop("/FMGC/internal/v1", scratchpad);
|
setprop("FMGC/internal/v1", scratchpad);
|
||||||
setprop("/FMGC/internal/v1-set", 1);
|
setprop("FMGC/internal/v1-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -26,17 +26,17 @@ var perfTOInput = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "L2") {
|
} else if (key == "L2") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/vr", 0);
|
setprop("FMGC/internal/vr", 0);
|
||||||
setprop("/FMGC/internal/vr-set", 0);
|
setprop("FMGC/internal/vr-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs == 3) {
|
if (tfs == 3) {
|
||||||
if (scratchpad >= 100 and scratchpad <= 200) {
|
if (scratchpad >= 100 and scratchpad <= 200) {
|
||||||
setprop("/FMGC/internal/vr", scratchpad);
|
setprop("FMGC/internal/vr", scratchpad);
|
||||||
setprop("/FMGC/internal/vr-set", 1);
|
setprop("FMGC/internal/vr-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -46,19 +46,19 @@ var perfTOInput = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "L3") {
|
} else if (key == "L3") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/v2", 0);
|
setprop("FMGC/internal/v2", 0);
|
||||||
setprop("/FMGC/internal/v2-set", 0);
|
setprop("FMGC/internal/v2-set", 0);
|
||||||
setprop("/it-autoflight/settings/togaspd", 157);
|
setprop("it-autoflight/settings/togaspd", 157);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs == 3) {
|
if (tfs == 3) {
|
||||||
if (scratchpad >= 100 and scratchpad <= 200) {
|
if (scratchpad >= 100 and scratchpad <= 200) {
|
||||||
setprop("/FMGC/internal/v2", scratchpad);
|
setprop("FMGC/internal/v2", scratchpad);
|
||||||
setprop("/FMGC/internal/v2-set", 1);
|
setprop("FMGC/internal/v2-set", 1);
|
||||||
setprop("/it-autoflight/settings/togaspd", scratchpad + 10);
|
setprop("it-autoflight/settings/togaspd", scratchpad + 10);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -73,8 +73,8 @@ var perfTOInput = func(key, i) {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs == 4 or tfs == 5) {
|
if (tfs == 4 or tfs == 5) {
|
||||||
if (scratchpad >= 1000 and scratchpad <= 18000) {
|
if (scratchpad >= 1000 and scratchpad <= 18000) {
|
||||||
setprop("/FMGC/internal/trans-alt", scratchpad);
|
setprop("FMGC/internal/trans-alt", scratchpad);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -84,11 +84,11 @@ var perfTOInput = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "L5") {
|
} else if (key == "L5") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/systems/thrust/clbreduc-ft", "1500");
|
setprop("systems/thrust/clbreduc-ft", "1500");
|
||||||
setprop("/FMGC/internal/reduc-agl-ft", "3000");
|
setprop("FMGC/internal/reduc-agl-ft", "3000");
|
||||||
setprop("/MCDUC/thracc-set", 0);
|
setprop("MCDUC/thracc-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs >= 7 and tfs <= 9 and find("/", scratchpad) != -1) {
|
if (tfs >= 7 and tfs <= 9 and find("/", scratchpad) != -1) {
|
||||||
|
@ -96,10 +96,10 @@ var perfTOInput = func(key, i) {
|
||||||
var thrred = size(thracc[0]);
|
var thrred = size(thracc[0]);
|
||||||
var acc = size(thracc[1]);
|
var acc = size(thracc[1]);
|
||||||
if ((thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5)) {
|
if ((thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5)) {
|
||||||
setprop("/systems/thrust/clbreduc-ft", thracc[0]);
|
setprop("systems/thrust/clbreduc-ft", thracc[0]);
|
||||||
setprop("/FMGC/internal/reduc-agl-ft", thracc[1]);
|
setprop("FMGC/internal/reduc-agl-ft", thracc[1]);
|
||||||
setprop("/MCDUC/thracc-set", 1);
|
setprop("MCDUC/thracc-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -109,20 +109,20 @@ var perfTOInput = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "R3") {
|
} else if (key == "R3") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/to-flap", 0);
|
setprop("FMGC/internal/to-flap", 0);
|
||||||
setprop("/FMGC/internal/to-ths", "0.0");
|
setprop("FMGC/internal/to-ths", "0.0");
|
||||||
setprop("/FMGC/internal/flap-ths-set", 0);
|
setprop("FMGC/internal/flap-ths-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs == 7 and find("/", scratchpad) != -1) {
|
if (tfs == 7 and find("/", scratchpad) != -1) {
|
||||||
var flapths = split("/UP", scratchpad);
|
var flapths = split("/UP", scratchpad);
|
||||||
if ((flapths[0] >= 1 and flapths[0] <= 4) and (flapths[1] >= 0.0 and flapths[1] <= 2.5)) {
|
if ((flapths[0] >= 1 and flapths[0] <= 4) and (flapths[1] >= 0.0 and flapths[1] <= 2.5)) {
|
||||||
setprop("/FMGC/internal/to-flap", flapths[0]);
|
setprop("FMGC/internal/to-flap", flapths[0]);
|
||||||
setprop("/FMGC/internal/to-ths", flapths[1]);
|
setprop("FMGC/internal/to-ths", flapths[1]);
|
||||||
setprop("/FMGC/internal/flap-ths-set", 1);
|
setprop("FMGC/internal/flap-ths-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -132,19 +132,19 @@ var perfTOInput = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "R4") {
|
} else if (key == "R4") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/flex", 0);
|
setprop("FMGC/internal/flex", 0);
|
||||||
setprop("/FMGC/internal/flex-set", 0);
|
setprop("FMGC/internal/flex-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs == 1 or tfs == 2) {
|
if (tfs == 1 or tfs == 2) {
|
||||||
if (scratchpad >= 0 and scratchpad <= 70) {
|
if (scratchpad >= 0 and scratchpad <= 70) {
|
||||||
setprop("/FMGC/internal/flex", scratchpad);
|
setprop("FMGC/internal/flex", scratchpad);
|
||||||
setprop("/FMGC/internal/flex-set", 1);
|
setprop("FMGC/internal/flex-set", 1);
|
||||||
var flex_calc = getprop("/FMGC/internal/flex") - getprop("/environment/temperature-degc");
|
var flex_calc = getprop("FMGC/internal/flex") - getprop("environment/temperature-degc");
|
||||||
setprop("/FMGC/internal/flex-cmd", flex_calc);
|
setprop("FMGC/internal/flex-cmd", flex_calc);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -154,21 +154,21 @@ var perfTOInput = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "R5") {
|
} else if (key == "R5") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/eng-out-reduc", "3500");
|
setprop("FMGC/internal/eng-out-reduc", "3500");
|
||||||
setprop("/MCDUC/reducacc-set", 0);
|
setprop("MCDUC/reducacc-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs >= 3 and tfs <= 5) {
|
if (tfs >= 3 and tfs <= 5) {
|
||||||
setprop("/FMGC/internal/eng-out-reduc", scratchpad);
|
setprop("FMGC/internal/eng-out-reduc", scratchpad);
|
||||||
setprop("/MCDUC/reducacc-set", 1);
|
setprop("MCDUC/reducacc-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (key == "R6") {
|
} else if (key == "R6") {
|
||||||
setprop("/MCDU[" ~ i ~ "]/page", "CLB");
|
setprop("MCDU[" ~ i ~ "]/page", "CLB");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
||||||
|
|
||||||
var radnavInput = func(key, i) {
|
var radnavInput = func(key, i) {
|
||||||
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
|
var scratchpad = getprop("MCDU[" ~ i ~ "]/scratchpad");
|
||||||
if (key == "L1") {
|
if (key == "L1") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/vor1freq-set", 0);
|
setprop("FMGC/internal/vor1freq-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs == 3 or tfs == 5 or tfs == 6) {
|
if (tfs == 3 or tfs == 5 or tfs == 6) {
|
||||||
|
@ -19,14 +19,14 @@ var radnavInput = func(key, i) {
|
||||||
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
|
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
} else {
|
} else {
|
||||||
setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
|
setprop("instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
|
||||||
setprop("/FMGC/internal/vor1freq-set", 1);
|
setprop("FMGC/internal/vor1freq-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
}
|
}
|
||||||
} else if (scratchpad >= 112.00 and scratchpad <= 117.95) {
|
} else if (scratchpad >= 112.00 and scratchpad <= 117.95) {
|
||||||
setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
|
setprop("instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
|
||||||
setprop("/FMGC/internal/vor1freq-set", 1);
|
setprop("FMGC/internal/vor1freq-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -36,16 +36,16 @@ var radnavInput = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "L2") {
|
} else if (key == "L2") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/vor1crs-set", 0);
|
setprop("FMGC/internal/vor1crs-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs >= 1 and tfs <= 3) {
|
if (tfs >= 1 and tfs <= 3) {
|
||||||
if (scratchpad >= 0 and scratchpad <= 360) {
|
if (scratchpad >= 0 and scratchpad <= 360) {
|
||||||
setprop("/instrumentation/nav[2]/radials/selected-deg", scratchpad);
|
setprop("instrumentation/nav[2]/radials/selected-deg", scratchpad);
|
||||||
setprop("/FMGC/internal/vor1crs-set", 1);
|
setprop("FMGC/internal/vor1crs-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -55,9 +55,9 @@ var radnavInput = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "L3") {
|
} else if (key == "L3") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/ils1freq-set", 0);
|
setprop("FMGC/internal/ils1freq-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs == 3 or tfs == 5 or tfs == 6) {
|
if (tfs == 3 or tfs == 5 or tfs == 6) {
|
||||||
|
@ -66,9 +66,9 @@ var radnavInput = func(key, i) {
|
||||||
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
|
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
|
||||||
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
|
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
|
||||||
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
|
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
|
||||||
setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad);
|
setprop("instrumentation/nav[0]/frequencies/selected-mhz", scratchpad);
|
||||||
setprop("/FMGC/internal/ils1freq-set", 1);
|
setprop("FMGC/internal/ils1freq-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -81,16 +81,16 @@ var radnavInput = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "L4") {
|
} else if (key == "L4") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/ils1crs-set", 0);
|
setprop("FMGC/internal/ils1crs-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs >= 1 and tfs <= 3) {
|
if (tfs >= 1 and tfs <= 3) {
|
||||||
if (scratchpad >= 0 and scratchpad <= 360) {
|
if (scratchpad >= 0 and scratchpad <= 360) {
|
||||||
setprop("/instrumentation/nav[0]/radials/selected-deg", scratchpad);
|
setprop("instrumentation/nav[0]/radials/selected-deg", scratchpad);
|
||||||
setprop("/FMGC/internal/ils1crs-set", 1);
|
setprop("FMGC/internal/ils1crs-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -100,16 +100,16 @@ var radnavInput = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "L5") {
|
} else if (key == "L5") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/adf1freq-set", 0);
|
setprop("FMGC/internal/adf1freq-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs == 3 or tfs == 4) {
|
if (tfs == 3 or tfs == 4) {
|
||||||
if (scratchpad >= 190 and scratchpad <= 1750) {
|
if (scratchpad >= 190 and scratchpad <= 1750) {
|
||||||
setprop("/instrumentation/adf[0]/frequencies/selected-khz", scratchpad);
|
setprop("instrumentation/adf[0]/frequencies/selected-khz", scratchpad);
|
||||||
setprop("/FMGC/internal/adf1freq-set", 1);
|
setprop("FMGC/internal/adf1freq-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -119,9 +119,9 @@ var radnavInput = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "R1") {
|
} else if (key == "R1") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/vor2freq-set", 0);
|
setprop("FMGC/internal/vor2freq-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs == 3 or tfs == 5 or tfs == 6) {
|
if (tfs == 3 or tfs == 5 or tfs == 6) {
|
||||||
|
@ -132,14 +132,14 @@ var radnavInput = func(key, i) {
|
||||||
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
|
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
} else {
|
} else {
|
||||||
setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
|
setprop("instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
|
||||||
setprop("/FMGC/internal/vor2freq-set", 1);
|
setprop("FMGC/internal/vor2freq-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
}
|
}
|
||||||
} else if (scratchpad >= 112.00 and scratchpad <= 117.95) {
|
} else if (scratchpad >= 112.00 and scratchpad <= 117.95) {
|
||||||
setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
|
setprop("instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
|
||||||
setprop("/FMGC/internal/vor2freq-set", 1);
|
setprop("FMGC/internal/vor2freq-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -149,16 +149,16 @@ var radnavInput = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "R2") {
|
} else if (key == "R2") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/vor2crs-set", 0);
|
setprop("FMGC/internal/vor2crs-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs >= 1 and tfs <= 3) {
|
if (tfs >= 1 and tfs <= 3) {
|
||||||
if (scratchpad >= 0 and scratchpad <= 360) {
|
if (scratchpad >= 0 and scratchpad <= 360) {
|
||||||
setprop("/instrumentation/nav[3]/radials/selected-deg", scratchpad);
|
setprop("instrumentation/nav[3]/radials/selected-deg", scratchpad);
|
||||||
setprop("/FMGC/internal/vor2crs-set", 1);
|
setprop("FMGC/internal/vor2crs-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
@ -168,16 +168,16 @@ var radnavInput = func(key, i) {
|
||||||
}
|
}
|
||||||
} else if (key == "R5") {
|
} else if (key == "R5") {
|
||||||
if (scratchpad == "CLR") {
|
if (scratchpad == "CLR") {
|
||||||
setprop("/FMGC/internal/adf2freq-set", 0);
|
setprop("FMGC/internal/adf2freq-set", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
setprop("MCDU[" ~ i ~ "]/scratchpad-msg", 0);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
var tfs = size(scratchpad);
|
var tfs = size(scratchpad);
|
||||||
if (tfs == 3 or tfs == 4) {
|
if (tfs == 3 or tfs == 4) {
|
||||||
if (scratchpad >= 190 and scratchpad <= 1750) {
|
if (scratchpad >= 190 and scratchpad <= 1750) {
|
||||||
setprop("/instrumentation/adf[1]/frequencies/selected-khz", scratchpad);
|
setprop("instrumentation/adf[1]/frequencies/selected-khz", scratchpad);
|
||||||
setprop("/FMGC/internal/adf2freq-set", 1);
|
setprop("FMGC/internal/adf2freq-set", 1);
|
||||||
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
|
setprop("MCDU[" ~ i ~ "]/scratchpad", "");
|
||||||
} else {
|
} else {
|
||||||
notAllowed(i);
|
notAllowed(i);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,8 +13,8 @@ var vhf2_recive = props.globals.initNode("/controls/audio/acp[0]/vhf2-recive", 1
|
||||||
var vhf1_volume = props.globals.initNode("/controls/audio/acp[0]/vhf1-volume", 1, "DOUBLE");
|
var vhf1_volume = props.globals.initNode("/controls/audio/acp[0]/vhf1-volume", 1, "DOUBLE");
|
||||||
var vhf2_volume = props.globals.initNode("/controls/audio/acp[0]/vhf2-volume", 1, "DOUBLE");
|
var vhf2_volume = props.globals.initNode("/controls/audio/acp[0]/vhf2-volume", 1, "DOUBLE");
|
||||||
|
|
||||||
var com1_volume = props.globals.getNode("/instrumentation/comm[0]/volume");
|
var com1_volume = props.globals.getNode("instrumentation/comm[0]/volume");
|
||||||
var com2_volume = props.globals.getNode("/instrumentation/comm[1]/volume");
|
var com2_volume = props.globals.getNode("instrumentation/comm[1]/volume");
|
||||||
|
|
||||||
var init = func() {
|
var init = func() {
|
||||||
vhf1_recive.setValue(1);
|
vhf1_recive.setValue(1);
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
|
|
||||||
# Copyright (c) 2019 Jonathan Redpath
|
# Copyright (c) 2019 Jonathan Redpath
|
||||||
|
|
||||||
var idCode = props.globals.getNode("/instrumentation/transponder/id-code", 1);
|
var idCode = props.globals.getNode("instrumentation/transponder/id-code", 1);
|
||||||
|
|
||||||
var guiModes = ['OFF', 'STANDBY', 'TEST', 'GROUND', 'ON', 'ALTITUDE'];
|
var guiModes = ['OFF', 'STANDBY', 'TEST', 'GROUND', 'ON', 'ALTITUDE'];
|
||||||
var guiNode = props.globals.getNode("/sim/gui/dialogs/radios/transponder-mode", 1);
|
var guiNode = props.globals.getNode("sim/gui/dialogs/radios/transponder-mode", 1);
|
||||||
var forLoopFlag = 0;
|
var forLoopFlag = 0;
|
||||||
|
|
||||||
var altimeter = props.globals.initNode("/instrumentation/transponder/altimeter-input-src", 0, "INT");
|
var altimeter = props.globals.initNode("/instrumentation/transponder/altimeter-input-src", 0, "INT");
|
||||||
|
@ -20,15 +20,15 @@ var Transponder = {
|
||||||
activeADIRS: 0,
|
activeADIRS: 0,
|
||||||
condition: 0,
|
condition: 0,
|
||||||
failed: 0,
|
failed: 0,
|
||||||
codeDigitsNodes: [props.globals.getNode("/instrumentation/transponder/inputs/digit[0]", 1), props.globals.getNode("/instrumentation/transponder/inputs/digit[1]", 1), props.globals.getNode("/instrumentation/transponder/inputs/digit[2]", 1), props.globals.getNode("/instrumentation/transponder/inputs/digit[3]", 1)],
|
codeDigitsNodes: [props.globals.getNode("instrumentation/transponder/inputs/digit[0]", 1), props.globals.getNode("instrumentation/transponder/inputs/digit[1]", 1), props.globals.getNode("instrumentation/transponder/inputs/digit[2]", 1), props.globals.getNode("instrumentation/transponder/inputs/digit[3]", 1)],
|
||||||
serviceableNode: props.globals.getNode("/instrumentation/transponder/serviceable", 1),
|
serviceableNode: props.globals.getNode("instrumentation/transponder/serviceable", 1),
|
||||||
knobNode: props.globals.getNode("instrumentation/transponder/inputs/knob-mode", 1),
|
knobNode: props.globals.getNode("instrumentation/transponder/inputs/knob-mode", 1),
|
||||||
identNode: props.globals.getNode("/instrumentation/transponder/inputs/ident-btn", 1),
|
identNode: props.globals.getNode("instrumentation/transponder/inputs/ident-btn", 1),
|
||||||
wowNode: props.globals.getNode("/fdm/jsbsim/position/wow"),
|
wowNode: props.globals.getNode("fdm/jsbsim/position/wow"),
|
||||||
ac1Node: props.globals.getNode("/systems/electrical/bus/ac-1", 1),
|
ac1Node: props.globals.getNode("systems/electrical/bus/ac-1", 1),
|
||||||
tcasNode: props.globals.getNode("/instrumentation/tcas/inputs/mode"),
|
tcasNode: props.globals.getNode("instrumentation/tcas/inputs/mode"),
|
||||||
aglNode: props.globals.getNode("/position/gear-agl-ft", 1),
|
aglNode: props.globals.getNode("position/gear-agl-ft", 1),
|
||||||
electricNode: props.globals.getNode("/systems/electrical/outputs/transponder", 1), # communicate to generic systems
|
electricNode: props.globals.getNode("systems/electrical/outputs/transponder", 1), # communicate to generic systems
|
||||||
new: func(elecSrc, ADIRS) {
|
new: func(elecSrc, ADIRS) {
|
||||||
var t = {parents:[Transponder]};
|
var t = {parents:[Transponder]};
|
||||||
t.mode = 1;
|
t.mode = 1;
|
||||||
|
@ -146,7 +146,7 @@ var transponderPanel = {
|
||||||
failLight: 0,
|
failLight: 0,
|
||||||
clearFlag: 0,
|
clearFlag: 0,
|
||||||
keypad: func(keyNum) {
|
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 (props.globals.getNode("controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("systems/electrical/bus/dc-ess", 1).getValue() < 25) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (keyNum < 0 or keyNum > 7) {
|
if (keyNum < 0 or keyNum > 7) {
|
||||||
|
@ -164,7 +164,7 @@ var transponderPanel = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clearKey: func() {
|
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 (props.globals.getNode("controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("systems/electrical/bus/dc-ess", 1).getValue() < 25) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (me.codeDisp != "") {
|
if (me.codeDisp != "") {
|
||||||
|
@ -216,7 +216,7 @@ var transponderPanel = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
me.failLight = newFail;
|
me.failLight = newFail;
|
||||||
props.globals.getNode("/systems/atc/failed").setBoolValue(me.failLight);
|
props.globals.getNode("systems/atc/failed").setBoolValue(me.failLight);
|
||||||
},
|
},
|
||||||
identSwitch: func() {
|
identSwitch: func() {
|
||||||
Transponders.vector[me.atcSel - 1].ident();
|
Transponders.vector[me.atcSel - 1].ident();
|
||||||
|
|
|
@ -11,9 +11,9 @@ var chan_rmp1_v = "vhr1";
|
||||||
var chan_rmp2_v = "vhr2";
|
var chan_rmp2_v = "vhr2";
|
||||||
var chan_rmp3_v = "vhr3";
|
var chan_rmp3_v = "vhr3";
|
||||||
|
|
||||||
var act_vhf1 = props.globals.getNode("/instrumentation/comm[0]/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_vhf2 = props.globals.getNode("instrumentation/comm[1]/frequencies/selected-mhz");
|
||||||
var act_vhf3 = props.globals.getNode("/instrumentation/comm[2]/frequencies/selected-mhz");
|
var act_vhf3 = props.globals.getNode("instrumentation/comm[2]/frequencies/selected-mhz");
|
||||||
|
|
||||||
var act_display_rmp1 = props.globals.initNode("/controls/radio/rmp[0]/active-display", "118.700", "STRING");
|
var act_display_rmp1 = props.globals.initNode("/controls/radio/rmp[0]/active-display", "118.700", "STRING");
|
||||||
var stby_display_rmp1 = props.globals.initNode("/controls/radio/rmp[0]/standby-display", "121.400", "STRING");
|
var stby_display_rmp1 = props.globals.initNode("/controls/radio/rmp[0]/standby-display", "121.400", "STRING");
|
||||||
|
@ -51,8 +51,8 @@ var am_mode_rmp3 = props.globals.initNode("/systems/radio/rmp[2]/am-active", 0,
|
||||||
|
|
||||||
var init = func() {
|
var init = func() {
|
||||||
for(var i = 0; i < 3; i += 1) {
|
for(var i = 0; i < 3; i += 1) {
|
||||||
setprop("/systems/radio/rmp[" ~ i ~ "]/hf1-standby", 510);
|
setprop("systems/radio/rmp[" ~ i ~ "]/hf1-standby", 510);
|
||||||
setprop("/systems/radio/rmp[" ~ i ~ "]/hf2-standby", 891);
|
setprop("systems/radio/rmp[" ~ i ~ "]/hf2-standby", 891);
|
||||||
}
|
}
|
||||||
|
|
||||||
chan_rmp1.setValue("vhf1");
|
chan_rmp1.setValue("vhf1");
|
||||||
|
@ -250,15 +250,15 @@ var update_chan_sel = func(rmp_no) {
|
||||||
|
|
||||||
var transfer = func(rmp_no) {
|
var transfer = func(rmp_no) {
|
||||||
rmp_no = rmp_no - 1;
|
rmp_no = rmp_no - 1;
|
||||||
var sel_chan = getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/sel_chan");
|
var sel_chan = getprop("systems/radio/rmp[" ~ rmp_no ~ "]/sel_chan");
|
||||||
|
|
||||||
if (string.match(sel_chan, "vhf[1-3]")) {
|
if (string.match(sel_chan, "vhf[1-3]")) {
|
||||||
var mod1 = int(string.replace(sel_chan, "vhf", ""));
|
var mod1 = int(string.replace(sel_chan, "vhf", ""));
|
||||||
var mod = mod1 - 1;
|
var mod = mod1 - 1;
|
||||||
|
|
||||||
var mem = getprop("/instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz");
|
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"));
|
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);
|
setprop("systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby", mem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,78 +5,78 @@
|
||||||
|
|
||||||
# Resets buttons to the default values
|
# Resets buttons to the default values
|
||||||
var variousReset = func {
|
var variousReset = func {
|
||||||
setprop("/modes/cpt-du-xfr", 0);
|
setprop("modes/cpt-du-xfr", 0);
|
||||||
setprop("/modes/fo-du-xfr", 0);
|
setprop("modes/fo-du-xfr", 0);
|
||||||
setprop("/controls/fadec/n1mode1", 0);
|
setprop("controls/fadec/n1mode1", 0);
|
||||||
setprop("/controls/fadec/n1mode2", 0);
|
setprop("controls/fadec/n1mode2", 0);
|
||||||
setprop("/instrumentation/mk-viii/serviceable", 1);
|
setprop("instrumentation/mk-viii/serviceable", 1);
|
||||||
setprop("/instrumentation/mk-viii/inputs/discretes/terr-inhibit", 0);
|
setprop("instrumentation/mk-viii/inputs/discretes/terr-inhibit", 0);
|
||||||
setprop("/instrumentation/mk-viii/inputs/discretes/gpws-inhibit", 0);
|
setprop("instrumentation/mk-viii/inputs/discretes/gpws-inhibit", 0);
|
||||||
setprop("/instrumentation/mk-viii/inputs/discretes/glideslope-cancel", 0);
|
setprop("instrumentation/mk-viii/inputs/discretes/glideslope-cancel", 0);
|
||||||
setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override", 0);
|
setprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override", 0);
|
||||||
setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override", 0);
|
setprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override", 0);
|
||||||
setprop("/controls/switches/cabinCall", 0);
|
setprop("controls/switches/cabinCall", 0);
|
||||||
setprop("/controls/switches/mechCall", 0);
|
setprop("controls/switches/mechCall", 0);
|
||||||
setprop("/controls/switches/emer-lights", 0.5);
|
setprop("controls/switches/emer-lights", 0.5);
|
||||||
# cockpit voice recorder stuff
|
# cockpit voice recorder stuff
|
||||||
setprop("/controls/CVR/power", 0);
|
setprop("controls/CVR/power", 0);
|
||||||
setprop("/controls/CVR/test", 0);
|
setprop("controls/CVR/test", 0);
|
||||||
setprop("/controls/CVR/tone", 0);
|
setprop("controls/CVR/tone", 0);
|
||||||
setprop("/controls/CVR/gndctl", 0);
|
setprop("controls/CVR/gndctl", 0);
|
||||||
setprop("/controls/CVR/erase", 0);
|
setprop("controls/CVR/erase", 0);
|
||||||
setprop("/controls/switches/cabinfan", 1);
|
setprop("controls/switches/cabinfan", 1);
|
||||||
setprop("/controls/oxygen/crewOxyPB", 1); # 0 = OFF 1 = AUTO
|
setprop("controls/oxygen/crewOxyPB", 1); # 0 = OFF 1 = AUTO
|
||||||
setprop("/controls/switches/emerCallLtO", 0); # ON light, flashes white for 10s
|
setprop("controls/switches/emerCallLtO", 0); # ON light, flashes white for 10s
|
||||||
setprop("/controls/switches/emerCallLtC", 0); # CALL light, flashes amber for 10s
|
setprop("controls/switches/emerCallLtC", 0); # CALL light, flashes amber for 10s
|
||||||
setprop("/controls/switches/emerCall", 0);
|
setprop("controls/switches/emerCall", 0);
|
||||||
setprop("/controls/switches/LrainRpt", 0);
|
setprop("controls/switches/LrainRpt", 0);
|
||||||
setprop("/controls/switches/RrainRpt", 0);
|
setprop("controls/switches/RrainRpt", 0);
|
||||||
setprop("/controls/switches/wiperLspd", 0); # -1 = INTM 0 = OFF 1 = LO 2 = HI
|
setprop("controls/switches/wiperLspd", 0); # -1 = INTM 0 = OFF 1 = LO 2 = HI
|
||||||
setprop("/controls/switches/wiperRspd", 0); # -1 = INTM 0 = OFF 1 = LO 2 = HI
|
setprop("controls/switches/wiperRspd", 0); # -1 = INTM 0 = OFF 1 = LO 2 = HI
|
||||||
setprop("/controls/lighting/strobe", 0);
|
setprop("controls/lighting/strobe", 0);
|
||||||
setprop("/controls/lighting/beacon", 0);
|
setprop("controls/lighting/beacon", 0);
|
||||||
setprop("/controls/switches/beacon", 0);
|
setprop("controls/switches/beacon", 0);
|
||||||
setprop("/controls/switches/wing-lights", 0);
|
setprop("controls/switches/wing-lights", 0);
|
||||||
setprop("/controls/switches/landing-lights-l", 0);
|
setprop("controls/switches/landing-lights-l", 0);
|
||||||
setprop("/controls/switches/landing-lights-r", 0);
|
setprop("controls/switches/landing-lights-r", 0);
|
||||||
setprop("/controls/lighting/wing-lights", 0);
|
setprop("controls/lighting/wing-lights", 0);
|
||||||
setprop("/controls/lighting/nav-lights-switch", 0);
|
setprop("controls/lighting/nav-lights-switch", 0);
|
||||||
setprop("/controls/lighting/landing-lights[1]", 0);
|
setprop("controls/lighting/landing-lights[1]", 0);
|
||||||
setprop("/controls/lighting/landing-lights[2]", 0);
|
setprop("controls/lighting/landing-lights[2]", 0);
|
||||||
setprop("/controls/lighting/taxi-light-switch", 0);
|
setprop("controls/lighting/taxi-light-switch", 0);
|
||||||
setprop("/controls/lighting/DU/du1", 1);
|
setprop("controls/lighting/DU/du1", 1);
|
||||||
setprop("/controls/lighting/DU/du2", 1);
|
setprop("controls/lighting/DU/du2", 1);
|
||||||
setprop("/controls/lighting/DU/du3", 1);
|
setprop("controls/lighting/DU/du3", 1);
|
||||||
setprop("/controls/lighting/DU/du4", 1);
|
setprop("controls/lighting/DU/du4", 1);
|
||||||
setprop("/controls/lighting/DU/du5", 1);
|
setprop("controls/lighting/DU/du5", 1);
|
||||||
setprop("/controls/lighting/DU/du6", 1);
|
setprop("controls/lighting/DU/du6", 1);
|
||||||
setprop("/controls/lighting/DU/mcdu1", 1);
|
setprop("controls/lighting/DU/mcdu1", 1);
|
||||||
setprop("/controls/lighting/DU/mcdu2", 1);
|
setprop("controls/lighting/DU/mcdu2", 1);
|
||||||
setprop("/modes/fcu/hdg-time", -45);
|
setprop("modes/fcu/hdg-time", -45);
|
||||||
setprop("/controls/switching/ATTHDG", 0);
|
setprop("controls/switching/ATTHDG", 0);
|
||||||
setprop("/controls/switching/AIRDATA", 0);
|
setprop("controls/switching/AIRDATA", 0);
|
||||||
setprop("/controls/switches/no-smoking-sign", 1);
|
setprop("controls/switches/no-smoking-sign", 1);
|
||||||
setprop("/controls/switches/seatbelt-sign", 1);
|
setprop("controls/switches/seatbelt-sign", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
var BUTTONS = {
|
var BUTTONS = {
|
||||||
init: func() {
|
init: func() {
|
||||||
var stateL = getprop("/engines/engine[0]/state");
|
var stateL = getprop("engines/engine[0]/state");
|
||||||
var stateR = getprop("/engines/engine[1]/state");
|
var stateR = getprop("engines/engine[1]/state");
|
||||||
var Lrain = getprop("/controls/switches/LrainRpt");
|
var Lrain = getprop("controls/switches/LrainRpt");
|
||||||
var Rrain = getprop("/controls/switches/RrainRpt");
|
var Rrain = getprop("controls/switches/RrainRpt");
|
||||||
var OnLt = getprop("/controls/switches/emerCallLtO");
|
var OnLt = getprop("controls/switches/emerCallLtO");
|
||||||
var CallLt = getprop("/controls/switches/emerCallLtC");
|
var CallLt = getprop("controls/switches/emerCallLtC");
|
||||||
var EmerCall = getprop("/controls/switches/emerCall");
|
var EmerCall = getprop("controls/switches/emerCall");
|
||||||
var wow = getprop("/gear/gear[1]/wow");
|
var wow = getprop("gear/gear[1]/wow");
|
||||||
var wowr = getprop("/gear/gear[2]/wow");
|
var wowr = getprop("gear/gear[2]/wow");
|
||||||
var gndCtl = getprop("/systems/CVR/gndctl");
|
var gndCtl = getprop("systems/CVR/gndctl");
|
||||||
var acPwr = getprop("/systems/electrical/bus/ac-ess");
|
var acPwr = getprop("systems/electrical/bus/ac-ess");
|
||||||
},
|
},
|
||||||
update: func() {
|
update: func() {
|
||||||
rainRepel();
|
rainRepel();
|
||||||
CVR_master();
|
CVR_master();
|
||||||
if (getprop("/controls/switches/emerCall")) {
|
if (getprop("controls/switches/emerCall")) {
|
||||||
EmerCallOnLight();
|
EmerCallOnLight();
|
||||||
EmerCallLight();
|
EmerCallLight();
|
||||||
}
|
}
|
||||||
|
@ -84,78 +84,78 @@ var BUTTONS = {
|
||||||
};
|
};
|
||||||
|
|
||||||
var rainRepel = func() {
|
var rainRepel = func() {
|
||||||
Lrain = getprop("/controls/switches/LrainRpt");
|
Lrain = getprop("controls/switches/LrainRpt");
|
||||||
Rrain = getprop("/controls/switches/RrainRpt");
|
Rrain = getprop("controls/switches/RrainRpt");
|
||||||
wow = getprop("/gear/gear[1]/wow");
|
wow = getprop("gear/gear[1]/wow");
|
||||||
stateL = getprop("/engines/engine[0]/state");
|
stateL = getprop("engines/engine[0]/state");
|
||||||
stateR = getprop("/engines/engine[1]/state");
|
stateR = getprop("engines/engine[1]/state");
|
||||||
if (Lrain and (stateL != 3 and stateR != 3 and wow)) {
|
if (Lrain and (stateL != 3 and stateR != 3 and wow)) {
|
||||||
setprop("/controls/switches/LrainRpt", 0);
|
setprop("controls/switches/LrainRpt", 0);
|
||||||
}
|
}
|
||||||
if (Rrain and (stateL != 3 and stateR != 3 and wow)) {
|
if (Rrain and (stateL != 3 and stateR != 3 and wow)) {
|
||||||
setprop("/controls/switches/RrainRpt", 0);
|
setprop("controls/switches/RrainRpt", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var EmerCallOnLight = func() {
|
var EmerCallOnLight = func() {
|
||||||
OnLt = getprop("/controls/switches/emerCallLtO");
|
OnLt = getprop("controls/switches/emerCallLtO");
|
||||||
EmerCall = getprop("/controls/switches/emerCall");
|
EmerCall = getprop("controls/switches/emerCall");
|
||||||
if ((OnLt and EmerCall) or !EmerCall) {
|
if ((OnLt and EmerCall) or !EmerCall) {
|
||||||
setprop("/controls/switches/emerCallLtO", 0);
|
setprop("controls/switches/emerCallLtO", 0);
|
||||||
} else if (!OnLt and EmerCall) {
|
} else if (!OnLt and EmerCall) {
|
||||||
setprop("/controls/switches/emerCallLtO", 1);
|
setprop("controls/switches/emerCallLtO", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var EmerCallLight = func() {
|
var EmerCallLight = func() {
|
||||||
CallLt = getprop("/controls/switches/emerCallLtC");
|
CallLt = getprop("controls/switches/emerCallLtC");
|
||||||
EmerCall = getprop("/controls/switches/emerCall");
|
EmerCall = getprop("controls/switches/emerCall");
|
||||||
if ((CallLt and EmerCall) or !EmerCall) {
|
if ((CallLt and EmerCall) or !EmerCall) {
|
||||||
setprop("/controls/switches/emerCallLtC", 0);
|
setprop("controls/switches/emerCallLtC", 0);
|
||||||
} else if (!CallLt and EmerCall) {
|
} else if (!CallLt and EmerCall) {
|
||||||
setprop("/controls/switches/emerCallLtC", 1);
|
setprop("controls/switches/emerCallLtC", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var CVR_master = func() {
|
var CVR_master = func() {
|
||||||
stateL = getprop("/engines/engine[0]/state");
|
stateL = getprop("engines/engine[0]/state");
|
||||||
stateR = getprop("/engines/engine[1]/state");
|
stateR = getprop("engines/engine[1]/state");
|
||||||
wow = getprop("/gear/gear[1]/wow");
|
wow = getprop("gear/gear[1]/wow");
|
||||||
wowr = getprop("/gear/gear[2]/wow");
|
wowr = getprop("gear/gear[2]/wow");
|
||||||
gndCtl = getprop("/systems/CVR/gndctl");
|
gndCtl = getprop("systems/CVR/gndctl");
|
||||||
acPwr = getprop("/systems/electrical/bus/ac-ess");
|
acPwr = getprop("systems/electrical/bus/ac-ess");
|
||||||
if (acPwr > 0 and wow and wowr and (gndCtl or (stateL == 3 or stateR == 3))) {
|
if (acPwr > 0 and wow and wowr and (gndCtl or (stateL == 3 or stateR == 3))) {
|
||||||
setprop("/controls/CVR/power", 1);
|
setprop("controls/CVR/power", 1);
|
||||||
} else if (!wow and !wowr and acPwr > 0) {
|
} else if (!wow and !wowr and acPwr > 0) {
|
||||||
setprop("/controls/CVR/power", 1);
|
setprop("controls/CVR/power", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/controls/CVR/power", 0);
|
setprop("controls/CVR/power", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var EmerCall = func {
|
var EmerCall = func {
|
||||||
setprop("/controls/switches/emerCall", 1);
|
setprop("controls/switches/emerCall", 1);
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
setprop("/controls/switches/emerCall", 0);
|
setprop("controls/switches/emerCall", 0);
|
||||||
}, 10);
|
}, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
var CabinCall = func {
|
var CabinCall = func {
|
||||||
setprop("/controls/switches/cabinCall", 0);
|
setprop("controls/switches/cabinCall", 0);
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
setprop("/controls/switches/cabinCall", 0);
|
setprop("controls/switches/cabinCall", 0);
|
||||||
}, 15);
|
}, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
var MechCall = func {
|
var MechCall = func {
|
||||||
setprop("/controls/switches/mechCall", 1);
|
setprop("controls/switches/mechCall", 1);
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
setprop("/controls/switches/mechCall", 0);
|
setprop("controls/switches/mechCall", 0);
|
||||||
}, 15);
|
}, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
var CVR_test = func {
|
var CVR_test = func {
|
||||||
var parkBrake = getprop("/controls/gear/brake-parking");
|
var parkBrake = getprop("controls/gear/brake-parking");
|
||||||
if (parkBrake) {
|
if (parkBrake) {
|
||||||
setprop("controls/CVR/tone", 1);
|
setprop("controls/CVR/tone", 1);
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
|
@ -165,7 +165,7 @@ var CVR_test = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/controls/APU/master", func() {
|
setlistener("/controls/APU/master", func() {
|
||||||
if (!getprop("/controls/APU/master") and systems.apuEmerShutdown.getBoolValue()) {
|
if (!getprop("controls/APU/master") and systems.apuEmerShutdown.getBoolValue()) {
|
||||||
systems.apuEmerShutdown.setBoolValue(0);
|
systems.apuEmerShutdown.setBoolValue(0);
|
||||||
}
|
}
|
||||||
}, 0, 0);
|
}, 0, 0);
|
|
@ -7,64 +7,64 @@ print("-------------------------------------------------------------------------
|
||||||
print("Copyright (c) 2016-2019 Joshua Davidson (Octal450)");
|
print("Copyright (c) 2016-2019 Joshua Davidson (Octal450)");
|
||||||
print("-----------------------------------------------------------------------------");
|
print("-----------------------------------------------------------------------------");
|
||||||
|
|
||||||
setprop("/sim/replay/was-active", 0);
|
setprop("sim/replay/was-active", 0);
|
||||||
|
|
||||||
setprop("/sim/menubar/default/menu[0]/item[0]/enabled", 0);
|
setprop("sim/menubar/default/menu[0]/item[0]/enabled", 0);
|
||||||
setprop("/sim/menubar/default/menu[2]/item[0]/enabled", 0);
|
setprop("sim/menubar/default/menu[2]/item[0]/enabled", 0);
|
||||||
setprop("/sim/menubar/default/menu[2]/item[2]/enabled", 0);
|
setprop("sim/menubar/default/menu[2]/item[2]/enabled", 0);
|
||||||
setprop("/sim/menubar/default/menu[3]/enabled", 0);
|
setprop("sim/menubar/default/menu[3]/enabled", 0);
|
||||||
setprop("/sim/menubar/default/menu[5]/item[9]/enabled", 0);
|
setprop("sim/menubar/default/menu[5]/item[9]/enabled", 0);
|
||||||
setprop("/sim/menubar/default/menu[5]/item[10]/enabled", 0);
|
setprop("sim/menubar/default/menu[5]/item[10]/enabled", 0);
|
||||||
setprop("/sim/menubar/default/menu[5]/item[11]/enabled", 0);
|
setprop("sim/menubar/default/menu[5]/item[11]/enabled", 0);
|
||||||
|
|
||||||
# Dimmers
|
# Dimmers
|
||||||
setprop("/controls/lighting/ndl-norm", 1);
|
setprop("controls/lighting/ndl-norm", 1);
|
||||||
setprop("/controls/lighting/ndr-norm", 1);
|
setprop("controls/lighting/ndr-norm", 1);
|
||||||
setprop("/controls/lighting/upper-norm", 1);
|
setprop("controls/lighting/upper-norm", 1);
|
||||||
|
|
||||||
# Lights
|
# Lights
|
||||||
setprop("/sim/model/lights/nose-lights", 0);
|
setprop("sim/model/lights/nose-lights", 0);
|
||||||
setprop("/sim/model/lights/turnoffsw", 0);
|
setprop("sim/model/lights/turnoffsw", 0);
|
||||||
setprop("/controls/lighting/turnoff-light-switch", 0);
|
setprop("controls/lighting/turnoff-light-switch", 0);
|
||||||
setprop("/controls/lighting/leftturnoff", 0);
|
setprop("controls/lighting/leftturnoff", 0);
|
||||||
setprop("/controls/lighting/rightturnoff", 0);
|
setprop("controls/lighting/rightturnoff", 0);
|
||||||
|
|
||||||
# Oil Qty
|
# Oil Qty
|
||||||
var qty1 = math.round((rand() * 5 ) + 20, 0.1);
|
var qty1 = math.round((rand() * 5 ) + 20, 0.1);
|
||||||
var qty2 = math.round((rand() * 5 ) + 20, 0.1);
|
var qty2 = math.round((rand() * 5 ) + 20, 0.1);
|
||||||
setprop("/engines/engine[0]/oil-qt-actual", qty1);
|
setprop("engines/engine[0]/oil-qt-actual", qty1);
|
||||||
setprop("/engines/engine[1]/oil-qt-actual", qty2);
|
setprop("engines/engine[1]/oil-qt-actual", qty2);
|
||||||
|
|
||||||
##########
|
##########
|
||||||
# Lights #
|
# Lights #
|
||||||
##########
|
##########
|
||||||
|
|
||||||
var beacon_switch = props.globals.getNode("/controls/switches/beacon", 1);
|
var beacon_switch = props.globals.getNode("controls/switches/beacon", 1);
|
||||||
var beacon_ctl = props.globals.getNode("/controls/lighting/beacon", 1);
|
var beacon_ctl = props.globals.getNode("controls/lighting/beacon", 1);
|
||||||
var beacon = aircraft.light.new("/sim/model/lights/beacon", [0.1, 1], "/controls/lighting/beacon");
|
var beacon = aircraft.light.new("/sim/model/lights/beacon", [0.1, 1], "/controls/lighting/beacon");
|
||||||
var strobe_switch = props.globals.getNode("/controls/switches/strobe", 1);
|
var strobe_switch = props.globals.getNode("controls/switches/strobe", 1);
|
||||||
var strobe_light = props.globals.getNode("/controls/lighting/strobe", 1);
|
var strobe_light = props.globals.getNode("controls/lighting/strobe", 1);
|
||||||
var strobe = aircraft.light.new("/sim/model/lights/strobe", [0.05, 0.06, 0.05, 1], "/controls/lighting/strobe");
|
var strobe = aircraft.light.new("/sim/model/lights/strobe", [0.05, 0.06, 0.05, 1], "/controls/lighting/strobe");
|
||||||
var tail_strobe = aircraft.light.new("/sim/model/lights/tailstrobe", [0.1, 1], "/controls/lighting/strobe");
|
var tail_strobe = aircraft.light.new("/sim/model/lights/tailstrobe", [0.1, 1], "/controls/lighting/strobe");
|
||||||
var logo_lights = getprop("/sim/model/lights/logo-lights");
|
var logo_lights = getprop("sim/model/lights/logo-lights");
|
||||||
var nav_lights = props.globals.getNode("/sim/model/lights/nav-lights");
|
var nav_lights = props.globals.getNode("sim/model/lights/nav-lights");
|
||||||
var wing_switch = props.globals.getNode("/controls/switches/wing-lights", 1);
|
var wing_switch = props.globals.getNode("controls/switches/wing-lights", 1);
|
||||||
var wing_ctl = props.globals.getNode("/controls/lighting/wing-lights", 1);
|
var wing_ctl = props.globals.getNode("controls/lighting/wing-lights", 1);
|
||||||
var dome_light = props.globals.initNode("/sim/model/lights/dome-light", 0.0, "DOUBLE");
|
var dome_light = props.globals.initNode("/sim/model/lights/dome-light", 0.0, "DOUBLE");
|
||||||
var wow = getprop("/gear/gear[2]/wow");
|
var wow = getprop("gear/gear[2]/wow");
|
||||||
var slats = getprop("/controls/flight/slats");
|
var slats = getprop("controls/flight/slats");
|
||||||
var gear = getprop("/gear/gear[0]/position-norm");
|
var gear = getprop("gear/gear[0]/position-norm");
|
||||||
var nose_lights = getprop("/sim/model/lights/nose-lights");
|
var nose_lights = getprop("sim/model/lights/nose-lights");
|
||||||
var left_turnoff_light = props.globals.getNode("/controls/lighting/leftturnoff");
|
var left_turnoff_light = props.globals.getNode("controls/lighting/leftturnoff");
|
||||||
var right_turnoff_light = props.globals.getNode("/controls/lighting/rightturnoff");
|
var right_turnoff_light = props.globals.getNode("controls/lighting/rightturnoff");
|
||||||
var settingT = getprop("/controls/lighting/taxi-light-switch");
|
var settingT = getprop("controls/lighting/taxi-light-switch");
|
||||||
var settingTurnoff = getprop("/controls/lighting/turnoff-light-switch");
|
var settingTurnoff = getprop("controls/lighting/turnoff-light-switch");
|
||||||
var setting = getprop("/controls/lighting/nav-lights-switch");
|
var setting = getprop("controls/lighting/nav-lights-switch");
|
||||||
var domeSetting = getprop("/controls/lighting/dome-norm");
|
var domeSetting = getprop("controls/lighting/dome-norm");
|
||||||
var landL = props.globals.getNode("controls/lighting/landing-lights[1]", 1);
|
var landL = props.globals.getNode("controls/lighting/landing-lights[1]", 1);
|
||||||
var landR = props.globals.getNode("controls/lighting/landing-lights[2]", 1);
|
var landR = props.globals.getNode("controls/lighting/landing-lights[2]", 1);
|
||||||
var landlSw = props.globals.getNode("/controls/switches/landing-lights-l", 1);
|
var landlSw = props.globals.getNode("controls/switches/landing-lights-l", 1);
|
||||||
var landrSw = props.globals.getNode("/controls/switches/landing-lights-r", 1);
|
var landrSw = props.globals.getNode("controls/switches/landing-lights-r", 1);
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# Tire Smoke/Rain #
|
# Tire Smoke/Rain #
|
||||||
|
@ -78,74 +78,74 @@ aircraft.rain.init();
|
||||||
##########
|
##########
|
||||||
|
|
||||||
setlistener("/sim/sounde/btn1", func {
|
setlistener("/sim/sounde/btn1", func {
|
||||||
if (!getprop("/sim/sounde/btn1")) {
|
if (!getprop("sim/sounde/btn1")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
settimer(func {
|
settimer(func {
|
||||||
props.globals.getNode("/sim/sounde/btn1").setBoolValue(0);
|
props.globals.getNode("sim/sounde/btn1").setBoolValue(0);
|
||||||
}, 0.05);
|
}, 0.05);
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/sim/sounde/oh-btn", func {
|
setlistener("/sim/sounde/oh-btn", func {
|
||||||
if (!getprop("/sim/sounde/oh-btn")) {
|
if (!getprop("sim/sounde/oh-btn")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
settimer(func {
|
settimer(func {
|
||||||
props.globals.getNode("/sim/sounde/oh-btn").setBoolValue(0);
|
props.globals.getNode("sim/sounde/oh-btn").setBoolValue(0);
|
||||||
}, 0.05);
|
}, 0.05);
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/sim/sounde/btn3", func {
|
setlistener("/sim/sounde/btn3", func {
|
||||||
if (!getprop("/sim/sounde/btn3")) {
|
if (!getprop("sim/sounde/btn3")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
settimer(func {
|
settimer(func {
|
||||||
props.globals.getNode("/sim/sounde/btn3").setBoolValue(0);
|
props.globals.getNode("sim/sounde/btn3").setBoolValue(0);
|
||||||
}, 0.05);
|
}, 0.05);
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/sim/sounde/knb1", func {
|
setlistener("/sim/sounde/knb1", func {
|
||||||
if (!getprop("/sim/sounde/knb1")) {
|
if (!getprop("sim/sounde/knb1")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
settimer(func {
|
settimer(func {
|
||||||
props.globals.getNode("/sim/sounde/knb1").setBoolValue(0);
|
props.globals.getNode("sim/sounde/knb1").setBoolValue(0);
|
||||||
}, 0.05);
|
}, 0.05);
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/sim/sounde/switch1", func {
|
setlistener("/sim/sounde/switch1", func {
|
||||||
if (!getprop("/sim/sounde/switch1")) {
|
if (!getprop("sim/sounde/switch1")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
settimer(func {
|
settimer(func {
|
||||||
props.globals.getNode("/sim/sounde/switch1").setBoolValue(0);
|
props.globals.getNode("sim/sounde/switch1").setBoolValue(0);
|
||||||
}, 0.05);
|
}, 0.05);
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/controls/lighting/seatbelt-sign", func {
|
setlistener("/controls/lighting/seatbelt-sign", func {
|
||||||
props.globals.getNode("/sim/sounde/seatbelt-sign").setBoolValue(1);
|
props.globals.getNode("sim/sounde/seatbelt-sign").setBoolValue(1);
|
||||||
settimer(func {
|
settimer(func {
|
||||||
props.globals.getNode("/sim/sounde/seatbelt-sign").setBoolValue(0);
|
props.globals.getNode("sim/sounde/seatbelt-sign").setBoolValue(0);
|
||||||
}, 2);
|
}, 2);
|
||||||
}, 0, 0);
|
}, 0, 0);
|
||||||
|
|
||||||
setlistener("/controls/lighting/no-smoking-sign", func {
|
setlistener("/controls/lighting/no-smoking-sign", func {
|
||||||
props.globals.getNode("/sim/sounde/no-smoking-sign").setBoolValue(1);
|
props.globals.getNode("sim/sounde/no-smoking-sign").setBoolValue(1);
|
||||||
settimer(func {
|
settimer(func {
|
||||||
props.globals.getNode("/sim/sounde/no-smoking-sign").setBoolValue(0);
|
props.globals.getNode("sim/sounde/no-smoking-sign").setBoolValue(0);
|
||||||
}, 1);
|
}, 1);
|
||||||
}, 0, 0);
|
}, 0, 0);
|
||||||
|
|
||||||
setlistener("/controls/flight/flap-lever", func {
|
setlistener("/controls/flight/flap-lever", func {
|
||||||
props.globals.getNode("/sim/sounde/flaps-click").setBoolValue(1);
|
props.globals.getNode("sim/sounde/flaps-click").setBoolValue(1);
|
||||||
}, 0, 0);
|
}, 0, 0);
|
||||||
|
|
||||||
setlistener("/sim/sounde/flaps-click", func {
|
setlistener("/sim/sounde/flaps-click", func {
|
||||||
if (!getprop("/sim/sounde/flaps-click")) {
|
if (!getprop("sim/sounde/flaps-click")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
settimer(func {
|
settimer(func {
|
||||||
props.globals.getNode("/sim/sounde/flaps-click").setBoolValue(0);
|
props.globals.getNode("sim/sounde/flaps-click").setBoolValue(0);
|
||||||
}, 0.4);
|
}, 0.4);
|
||||||
});
|
});
|
||||||
#########
|
#########
|
||||||
|
@ -176,11 +176,11 @@ var armrests = aircraft.door.new("/sim/model/door-positions/armrests", 2);
|
||||||
|
|
||||||
# door opener/closer
|
# door opener/closer
|
||||||
var triggerDoor = func(door, doorName, doorDesc) {
|
var triggerDoor = func(door, doorName, doorDesc) {
|
||||||
if (getprop("/sim/model/door-positions/" ~ doorName ~ "/position-norm") > 0) {
|
if (getprop("sim/model/door-positions/" ~ doorName ~ "/position-norm") > 0) {
|
||||||
gui.popupTip("Closing " ~ doorDesc ~ " door");
|
gui.popupTip("Closing " ~ doorDesc ~ " door");
|
||||||
door.toggle();
|
door.toggle();
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/velocities/groundspeed-kt") > 5) {
|
if (getprop("velocities/groundspeed-kt") > 5) {
|
||||||
gui.popupTip("You cannot open the doors while the aircraft is moving!");
|
gui.popupTip("You cannot open the doors while the aircraft is moving!");
|
||||||
} else {
|
} else {
|
||||||
gui.popupTip("Opening " ~ doorDesc ~ " door");
|
gui.popupTip("Opening " ~ doorDesc ~ " door");
|
||||||
|
@ -241,56 +241,56 @@ var systemsLoop = maketimer(0.1, func {
|
||||||
fcu.FCUController.loop();
|
fcu.FCUController.loop();
|
||||||
dmc.DMController.loop();
|
dmc.DMController.loop();
|
||||||
|
|
||||||
if ((getprop("/controls/pneumatic/switches/groundair") or getprop("/controls/electrical/ground-cart")) and ((getprop("/velocities/groundspeed-kt") > 2) or (getprop("/controls/gear/brake-parking") == 0 and getprop("/services/chocks/nose") == 0 and getprop("/services/chocks/left") == 0 and getprop("/services/chocks/right") == 0))) {
|
if ((getprop("controls/pneumatic/switches/groundair") or getprop("controls/electrical/ground-cart")) and ((getprop("velocities/groundspeed-kt") > 2) or (getprop("controls/gear/brake-parking") == 0 and getprop("services/chocks/nose") == 0 and getprop("services/chocks/left") == 0 and getprop("services/chocks/right") == 0))) {
|
||||||
setprop("/controls/electrical/ground-cart", 0);
|
setprop("controls/electrical/ground-cart", 0);
|
||||||
setprop("/controls/pneumatic/switches/groundair", 0);
|
setprop("controls/pneumatic/switches/groundair", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/velocities/groundspeed-kt") > 15) {
|
if (getprop("velocities/groundspeed-kt") > 15) {
|
||||||
setprop("/systems/shake/effect", 1);
|
setprop("systems/shake/effect", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/shake/effect", 0);
|
setprop("systems/shake/effect", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override") == 1 or (getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override") == 1 and getprop("/controls/flight/flap-pos") >= 4)) {
|
if (getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override") == 1 or (getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override") == 1 and getprop("controls/flight/flap-pos") >= 4)) {
|
||||||
setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 1);
|
setprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 0);
|
setprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/instrumentation/mk-viii/inputs/discretes/gpws-inhibit") == 1) {
|
if (getprop("instrumentation/mk-viii/inputs/discretes/gpws-inhibit") == 1) {
|
||||||
setprop("/instrumentation/mk-viii/speaker/volume", 0);
|
setprop("instrumentation/mk-viii/speaker/volume", 0);
|
||||||
} else {
|
} else {
|
||||||
setprop("/instrumentation/mk-viii/speaker/volume", 2);
|
setprop("instrumentation/mk-viii/speaker/volume", 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/engines/engine[0]/state") == 3 and getprop("/engines/engine[1]/state") == 3) {
|
if (getprop("engines/engine[0]/state") == 3 and getprop("engines/engine[1]/state") == 3) {
|
||||||
setprop("/engines/ready", 1);
|
setprop("engines/ready", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/engines/ready", 0);
|
setprop("engines/ready", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((getprop("/engines/engine[0]/state") == 2 or getprop("/engines/engine[0]/state") == 3) and getprop("/fdm/jsbsim/propulsion/tank[5]/contents-lbs") < 1) {
|
if ((getprop("engines/engine[0]/state") == 2 or getprop("engines/engine[0]/state") == 3) and getprop("fdm/jsbsim/propulsion/tank[5]/contents-lbs") < 1) {
|
||||||
systems.cutoff_one();
|
systems.cutoff_one();
|
||||||
}
|
}
|
||||||
if ((getprop("/engines/engine[1]/state") == 2 or getprop("/engines/engine[1]/state") == 3) and getprop("/fdm/jsbsim/propulsion/tank[6]/contents-lbs") < 1) {
|
if ((getprop("engines/engine[1]/state") == 2 or getprop("engines/engine[1]/state") == 3) and getprop("fdm/jsbsim/propulsion/tank[6]/contents-lbs") < 1) {
|
||||||
systems.cutoff_two();
|
systems.cutoff_two();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/sim/replay/replay-state") == 1) {
|
if (getprop("sim/replay/replay-state") == 1) {
|
||||||
setprop("/sim/replay/was-active", 1);
|
setprop("sim/replay/was-active", 1);
|
||||||
} else if (getprop("/sim/replay/replay-state") == 0 and getprop("/sim/replay/was-active") == 1) {
|
} else if (getprop("sim/replay/replay-state") == 0 and getprop("sim/replay/was-active") == 1) {
|
||||||
setprop("/sim/replay/was-active", 0);
|
setprop("sim/replay/was-active", 0);
|
||||||
acconfig.colddark();
|
acconfig.colddark();
|
||||||
gui.popupTip("Replay Ended: Setting Cold and Dark state...");
|
gui.popupTip("Replay Ended: Setting Cold and Dark state...");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/options/steep-ils", func {
|
setlistener("/options/steep-ils", func {
|
||||||
if (getprop("/options/steep-ils") == 1) {
|
if (getprop("options/steep-ils") == 1) {
|
||||||
setprop("/instrumentation/mk-viii/inputs/discretes/steep-approach", 1);
|
setprop("instrumentation/mk-viii/inputs/discretes/steep-approach", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/instrumentation/mk-viii/inputs/discretes/steep-approach", 0);
|
setprop("instrumentation/mk-viii/inputs/discretes/steep-approach", 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -320,96 +320,96 @@ canvas.Element.setVisible = func(vis) {
|
||||||
|
|
||||||
# In air, flaps 1 is slats only. On ground, it is slats and flaps.
|
# In air, flaps 1 is slats only. On ground, it is slats and flaps.
|
||||||
|
|
||||||
setprop("/controls/flight/flap-lever", 0);
|
setprop("controls/flight/flap-lever", 0);
|
||||||
setprop("/controls/flight/flap-pos", 0);
|
setprop("controls/flight/flap-pos", 0);
|
||||||
setprop("/controls/flight/flap-txt", " ");
|
setprop("controls/flight/flap-txt", " ");
|
||||||
|
|
||||||
controls.flapsDown = func(step) {
|
controls.flapsDown = func(step) {
|
||||||
if (step == 1) {
|
if (step == 1) {
|
||||||
if (getprop("/controls/flight/flap-lever") == 0) {
|
if (getprop("controls/flight/flap-lever") == 0) {
|
||||||
if (getprop("/velocities/airspeed-kt") <= 100) {
|
if (getprop("velocities/airspeed-kt") <= 100) {
|
||||||
setprop("/controls/flight/flaps", 0.2857);
|
setprop("controls/flight/flaps", 0.2857);
|
||||||
setprop("/controls/flight/slats", 0.6666);
|
setprop("controls/flight/slats", 0.6666);
|
||||||
setprop("/controls/flight/flap-lever", 1);
|
setprop("controls/flight/flap-lever", 1);
|
||||||
setprop("/controls/flight/flap-pos", 2);
|
setprop("controls/flight/flap-pos", 2);
|
||||||
setprop("/controls/flight/flap-txt", "1+F");
|
setprop("controls/flight/flap-txt", "1+F");
|
||||||
flaptimer.start();
|
flaptimer.start();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
setprop("/controls/flight/flaps", 0.000);
|
setprop("controls/flight/flaps", 0.000);
|
||||||
setprop("/controls/flight/slats", 0.6666);
|
setprop("controls/flight/slats", 0.6666);
|
||||||
setprop("/controls/flight/flap-lever", 1);
|
setprop("controls/flight/flap-lever", 1);
|
||||||
setprop("/controls/flight/flap-pos", 1);
|
setprop("controls/flight/flap-pos", 1);
|
||||||
setprop("/controls/flight/flap-txt", "1");
|
setprop("controls/flight/flap-txt", "1");
|
||||||
flaptimer.stop();
|
flaptimer.stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (getprop("/controls/flight/flap-lever") == 1) {
|
} else if (getprop("controls/flight/flap-lever") == 1) {
|
||||||
setprop("/controls/flight/flaps", 0.4286);
|
setprop("controls/flight/flaps", 0.4286);
|
||||||
setprop("/controls/flight/slats", 0.8148);
|
setprop("controls/flight/slats", 0.8148);
|
||||||
setprop("/controls/flight/flap-lever", 2);
|
setprop("controls/flight/flap-lever", 2);
|
||||||
setprop("/controls/flight/flap-pos", 3);
|
setprop("controls/flight/flap-pos", 3);
|
||||||
setprop("/controls/flight/flap-txt", "2");
|
setprop("controls/flight/flap-txt", "2");
|
||||||
flaptimer.stop();
|
flaptimer.stop();
|
||||||
return;
|
return;
|
||||||
} else if (getprop("/controls/flight/flap-lever") == 2) {
|
} else if (getprop("controls/flight/flap-lever") == 2) {
|
||||||
setprop("/controls/flight/flaps", 0.5714);
|
setprop("controls/flight/flaps", 0.5714);
|
||||||
setprop("/controls/flight/slats", 0.8148);
|
setprop("controls/flight/slats", 0.8148);
|
||||||
setprop("/controls/flight/flap-lever", 3);
|
setprop("controls/flight/flap-lever", 3);
|
||||||
setprop("/controls/flight/flap-pos", 4);
|
setprop("controls/flight/flap-pos", 4);
|
||||||
setprop("/controls/flight/flap-txt", "3");
|
setprop("controls/flight/flap-txt", "3");
|
||||||
flaptimer.stop();
|
flaptimer.stop();
|
||||||
return;
|
return;
|
||||||
} else if (getprop("/controls/flight/flap-lever") == 3) {
|
} else if (getprop("controls/flight/flap-lever") == 3) {
|
||||||
setprop("/controls/flight/flaps", 1.000);
|
setprop("controls/flight/flaps", 1.000);
|
||||||
setprop("/controls/flight/slats", 1.000);
|
setprop("controls/flight/slats", 1.000);
|
||||||
setprop("/controls/flight/flap-lever", 4);
|
setprop("controls/flight/flap-lever", 4);
|
||||||
setprop("/controls/flight/flap-pos", 5);
|
setprop("controls/flight/flap-pos", 5);
|
||||||
setprop("/controls/flight/flap-txt", "FULL");
|
setprop("controls/flight/flap-txt", "FULL");
|
||||||
flaptimer.stop();
|
flaptimer.stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (step == -1) {
|
} else if (step == -1) {
|
||||||
if (getprop("/controls/flight/flap-lever") == 4) {
|
if (getprop("controls/flight/flap-lever") == 4) {
|
||||||
setprop("/controls/flight/flaps", 0.5714);
|
setprop("controls/flight/flaps", 0.5714);
|
||||||
setprop("/controls/flight/slats", 0.8148);
|
setprop("controls/flight/slats", 0.8148);
|
||||||
setprop("/controls/flight/flap-lever", 3);
|
setprop("controls/flight/flap-lever", 3);
|
||||||
setprop("/controls/flight/flap-pos", 4);
|
setprop("controls/flight/flap-pos", 4);
|
||||||
setprop("/controls/flight/flap-txt", "3");
|
setprop("controls/flight/flap-txt", "3");
|
||||||
flaptimer.stop();
|
flaptimer.stop();
|
||||||
return;
|
return;
|
||||||
} else if (getprop("/controls/flight/flap-lever") == 3) {
|
} else if (getprop("controls/flight/flap-lever") == 3) {
|
||||||
setprop("/controls/flight/flaps", 0.4286);
|
setprop("controls/flight/flaps", 0.4286);
|
||||||
setprop("/controls/flight/slats", 0.8148);
|
setprop("controls/flight/slats", 0.8148);
|
||||||
setprop("/controls/flight/flap-lever", 2);
|
setprop("controls/flight/flap-lever", 2);
|
||||||
setprop("/controls/flight/flap-pos", 3);
|
setprop("controls/flight/flap-pos", 3);
|
||||||
setprop("/controls/flight/flap-txt", "2");
|
setprop("controls/flight/flap-txt", "2");
|
||||||
flaptimer.stop();
|
flaptimer.stop();
|
||||||
return;
|
return;
|
||||||
} else if (getprop("/controls/flight/flap-lever") == 2) {
|
} else if (getprop("controls/flight/flap-lever") == 2) {
|
||||||
if (getprop("/velocities/airspeed-kt") <= 100) {
|
if (getprop("velocities/airspeed-kt") <= 100) {
|
||||||
setprop("/controls/flight/flaps", 0.2857);
|
setprop("controls/flight/flaps", 0.2857);
|
||||||
setprop("/controls/flight/slats", 0.6666);
|
setprop("controls/flight/slats", 0.6666);
|
||||||
setprop("/controls/flight/flap-lever", 1);
|
setprop("controls/flight/flap-lever", 1);
|
||||||
setprop("/controls/flight/flap-pos", 2);
|
setprop("controls/flight/flap-pos", 2);
|
||||||
setprop("/controls/flight/flap-txt", "1+F");
|
setprop("controls/flight/flap-txt", "1+F");
|
||||||
flaptimer.start();
|
flaptimer.start();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
setprop("/controls/flight/flaps", 0.000);
|
setprop("controls/flight/flaps", 0.000);
|
||||||
setprop("/controls/flight/slats", 0.6666);
|
setprop("controls/flight/slats", 0.6666);
|
||||||
setprop("/controls/flight/flap-lever", 1);
|
setprop("controls/flight/flap-lever", 1);
|
||||||
setprop("/controls/flight/flap-pos", 1);
|
setprop("controls/flight/flap-pos", 1);
|
||||||
setprop("/controls/flight/flap-txt", "1");
|
setprop("controls/flight/flap-txt", "1");
|
||||||
flaptimer.stop();
|
flaptimer.stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (getprop("/controls/flight/flap-lever") == 1) {
|
} else if (getprop("controls/flight/flap-lever") == 1) {
|
||||||
setprop("/controls/flight/flaps", 0.000);
|
setprop("controls/flight/flaps", 0.000);
|
||||||
setprop("/controls/flight/slats", 0.000);
|
setprop("controls/flight/slats", 0.000);
|
||||||
setprop("/controls/flight/flap-lever", 0);
|
setprop("controls/flight/flap-lever", 0);
|
||||||
setprop("/controls/flight/flap-pos", 0);
|
setprop("controls/flight/flap-pos", 0);
|
||||||
setprop("/controls/flight/flap-txt", " ");
|
setprop("controls/flight/flap-txt", " ");
|
||||||
flaptimer.stop();
|
flaptimer.stop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -419,18 +419,18 @@ controls.flapsDown = func(step) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var flaptimer = maketimer(0.5, func {
|
var flaptimer = maketimer(0.5, func {
|
||||||
if (getprop("/controls/flight/flap-pos") == 2 and getprop("/velocities/airspeed-kt") >= 208) {
|
if (getprop("controls/flight/flap-pos") == 2 and getprop("velocities/airspeed-kt") >= 208) {
|
||||||
setprop("/controls/flight/flaps", 0.000);
|
setprop("controls/flight/flaps", 0.000);
|
||||||
setprop("/controls/flight/slats", 0.666);
|
setprop("controls/flight/slats", 0.666);
|
||||||
setprop("/controls/flight/flap-lever", 1);
|
setprop("controls/flight/flap-lever", 1);
|
||||||
setprop("/controls/flight/flap-pos", 1);
|
setprop("controls/flight/flap-pos", 1);
|
||||||
setprop("/controls/flight/flap-txt", "1");
|
setprop("controls/flight/flap-txt", "1");
|
||||||
flaptimer.stop();
|
flaptimer.stop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
controls.stepSpoilers = func(step) {
|
controls.stepSpoilers = func(step) {
|
||||||
setprop("/controls/flight/speedbrake-arm", 0);
|
setprop("controls/flight/speedbrake-arm", 0);
|
||||||
if (step == 1) {
|
if (step == 1) {
|
||||||
deploySpeedbrake();
|
deploySpeedbrake();
|
||||||
} else if (step == -1) {
|
} else if (step == -1) {
|
||||||
|
@ -439,100 +439,100 @@ controls.stepSpoilers = func(step) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var deploySpeedbrake = func {
|
var deploySpeedbrake = func {
|
||||||
if (getprop("/gear/gear[1]/wow") == 1 or getprop("/gear/gear[2]/wow") == 1) {
|
if (getprop("gear/gear[1]/wow") == 1 or getprop("gear/gear[2]/wow") == 1) {
|
||||||
if (getprop("/controls/flight/speedbrake") < 1.0) {
|
if (getprop("controls/flight/speedbrake") < 1.0) {
|
||||||
setprop("/controls/flight/speedbrake", 1.0);
|
setprop("controls/flight/speedbrake", 1.0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/controls/flight/speedbrake") < 0.5) {
|
if (getprop("controls/flight/speedbrake") < 0.5) {
|
||||||
setprop("/controls/flight/speedbrake", 0.5);
|
setprop("controls/flight/speedbrake", 0.5);
|
||||||
} else if (getprop("/controls/flight/speedbrake") < 1.0) {
|
} else if (getprop("controls/flight/speedbrake") < 1.0) {
|
||||||
setprop("/controls/flight/speedbrake", 1.0);
|
setprop("controls/flight/speedbrake", 1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var retractSpeedbrake = func {
|
var retractSpeedbrake = func {
|
||||||
if (getprop("/gear/gear[1]/wow") == 1 or getprop("/gear/gear[2]/wow") == 1) {
|
if (getprop("gear/gear[1]/wow") == 1 or getprop("gear/gear[2]/wow") == 1) {
|
||||||
if (getprop("/controls/flight/speedbrake") > 0.0) {
|
if (getprop("controls/flight/speedbrake") > 0.0) {
|
||||||
setprop("/controls/flight/speedbrake", 0.0);
|
setprop("controls/flight/speedbrake", 0.0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/controls/flight/speedbrake") > 0.5) {
|
if (getprop("controls/flight/speedbrake") > 0.5) {
|
||||||
setprop("/controls/flight/speedbrake", 0.5);
|
setprop("controls/flight/speedbrake", 0.5);
|
||||||
} else if (getprop("/controls/flight/speedbrake") > 0.0) {
|
} else if (getprop("controls/flight/speedbrake") > 0.0) {
|
||||||
setprop("/controls/flight/speedbrake", 0.0);
|
setprop("controls/flight/speedbrake", 0.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var slewProp = func(prop, delta) {
|
var slewProp = func(prop, delta) {
|
||||||
delta *= getprop("/sim/time/delta-realtime-sec");
|
delta *= getprop("sim/time/delta-realtime-sec");
|
||||||
setprop(prop, getprop(prop) + delta);
|
setprop(prop, getprop(prop) + delta);
|
||||||
return getprop(prop);
|
return getprop(prop);
|
||||||
}
|
}
|
||||||
|
|
||||||
controls.elevatorTrim = func(speed) {
|
controls.elevatorTrim = func(speed) {
|
||||||
if (getprop("/systems/hydraulic/green-psi") >= 1500) {
|
if (getprop("systems/hydraulic/green-psi") >= 1500) {
|
||||||
slewProp("/controls/flight/elevator-trim", speed * 0.045);
|
slewProp("/controls/flight/elevator-trim", speed * 0.045);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/controls/flight/elevator-trim", func {
|
setlistener("/controls/flight/elevator-trim", func {
|
||||||
if (getprop("/controls/flight/elevator-trim") > 0.32) {
|
if (getprop("controls/flight/elevator-trim") > 0.32) {
|
||||||
setprop("/controls/flight/elevator-trim", 0.32);
|
setprop("controls/flight/elevator-trim", 0.32);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var lightsLoop = maketimer(0.2, func {
|
var lightsLoop = maketimer(0.2, func {
|
||||||
gear = getprop("/gear/gear[0]/position-norm");
|
gear = getprop("gear/gear[0]/position-norm");
|
||||||
nose_lights = getprop("/sim/model/lights/nose-lights");
|
nose_lights = getprop("sim/model/lights/nose-lights");
|
||||||
settingT = getprop("/controls/lighting/taxi-light-switch");
|
settingT = getprop("controls/lighting/taxi-light-switch");
|
||||||
domeSetting = getprop("/controls/lighting/dome-norm");
|
domeSetting = getprop("controls/lighting/dome-norm");
|
||||||
|
|
||||||
# nose lights
|
# nose lights
|
||||||
|
|
||||||
if (settingT == 0.5 and gear > 0.9 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0)) {
|
if (settingT == 0.5 and gear > 0.9 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0)) {
|
||||||
setprop("/sim/model/lights/nose-lights", 0.85);
|
setprop("sim/model/lights/nose-lights", 0.85);
|
||||||
} else if (settingT == 1 and gear > 0.9 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0)) {
|
} else if (settingT == 1 and gear > 0.9 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0)) {
|
||||||
setprop("/sim/model/lights/nose-lights", 1);
|
setprop("sim/model/lights/nose-lights", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/sim/model/lights/nose-lights", 0);
|
setprop("sim/model/lights/nose-lights", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
# turnoff lights
|
# turnoff lights
|
||||||
settingTurnoff = getprop("/controls/lighting/turnoff-light-switch");
|
settingTurnoff = getprop("controls/lighting/turnoff-light-switch");
|
||||||
left_turnoff_light = props.globals.getNode("/controls/lighting/leftturnoff");
|
left_turnoff_light = props.globals.getNode("controls/lighting/leftturnoff");
|
||||||
right_turnoff_light = props.globals.getNode("/controls/lighting/rightturnoff");
|
right_turnoff_light = props.globals.getNode("controls/lighting/rightturnoff");
|
||||||
|
|
||||||
if (settingTurnoff == 1 and gear > 0.9 and getprop("/systems/electrical/bus/ac-1") > 0) {
|
if (settingTurnoff == 1 and gear > 0.9 and getprop("systems/electrical/bus/ac-1") > 0) {
|
||||||
left_turnoff_light.setBoolValue(1);
|
left_turnoff_light.setBoolValue(1);
|
||||||
} else {
|
} else {
|
||||||
left_turnoff_light.setBoolValue(0);
|
left_turnoff_light.setBoolValue(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settingTurnoff == 1 and gear > 0.9 and getprop("/systems/electrical/bus/ac-2") > 0) {
|
if (settingTurnoff == 1 and gear > 0.9 and getprop("systems/electrical/bus/ac-2") > 0) {
|
||||||
right_turnoff_light.setBoolValue(1);
|
right_turnoff_light.setBoolValue(1);
|
||||||
} else {
|
} else {
|
||||||
right_turnoff_light.setBoolValue(0);
|
right_turnoff_light.setBoolValue(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
# logo and navigation lights
|
# logo and navigation lights
|
||||||
setting = getprop("/controls/lighting/nav-lights-switch");
|
setting = getprop("controls/lighting/nav-lights-switch");
|
||||||
nav_lights = props.globals.getNode("/sim/model/lights/nav-lights");
|
nav_lights = props.globals.getNode("sim/model/lights/nav-lights");
|
||||||
logo_lights = props.globals.getNode("/sim/model/lights/logo-lights");
|
logo_lights = props.globals.getNode("sim/model/lights/logo-lights");
|
||||||
wow = getprop("/gear/gear[2]/wow");
|
wow = getprop("gear/gear[2]/wow");
|
||||||
slats = getprop("/controls/flight/slats");
|
slats = getprop("controls/flight/slats");
|
||||||
|
|
||||||
if (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0 or getprop("/systems/electrical/bus/dc-1") > 0 or getprop("/systems/electrical/bus/dc-2") > 0) {
|
if (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0 or getprop("systems/electrical/bus/dc-1") > 0 or getprop("systems/electrical/bus/dc-2") > 0) {
|
||||||
setprop("/systems/electrical/nav-lights-power", 1);
|
setprop("systems/electrical/nav-lights-power", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/electrical/nav-lights-power", 0);
|
setprop("systems/electrical/nav-lights-power", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setting == 0 and logo_lights == 1) {
|
if (setting == 0 and logo_lights == 1) {
|
||||||
logo_lights.setBoolValue(0);
|
logo_lights.setBoolValue(0);
|
||||||
} else if (setting == 1 or setting == 2 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0)) {
|
} else if (setting == 1 or setting == 2 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0)) {
|
||||||
if ((wow) or (!wow and slats > 0)) {
|
if ((wow) or (!wow and slats > 0)) {
|
||||||
logo_lights.setBoolValue(1);
|
logo_lights.setBoolValue(1);
|
||||||
} else {
|
} else {
|
||||||
|
@ -542,15 +542,15 @@ var lightsLoop = maketimer(0.2, func {
|
||||||
logo_lights.setBoolValue(0);
|
logo_lights.setBoolValue(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setting == 1 or setting == 2 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0 or getprop("/systems/electrical/bus/dc-1") > 0 or getprop("/systems/electrical/bus/dc-2") > 0)) {
|
if (setting == 1 or setting == 2 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0 or getprop("systems/electrical/bus/dc-1") > 0 or getprop("systems/electrical/bus/dc-2") > 0)) {
|
||||||
nav_lights.setBoolValue(1);
|
nav_lights.setBoolValue(1);
|
||||||
} else {
|
} else {
|
||||||
nav_lights.setBoolValue(0);
|
nav_lights.setBoolValue(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (domeSetting == 0.5 and getprop("/systems/electrical/bus/dc-ess") > 0) {
|
if (domeSetting == 0.5 and getprop("systems/electrical/bus/dc-ess") > 0) {
|
||||||
dome_light.setValue(0.5);
|
dome_light.setValue(0.5);
|
||||||
} elsif (domeSetting == 1 and getprop("/systems/electrical/bus/dc-ess") > 0) {
|
} elsif (domeSetting == 1 and getprop("systems/electrical/bus/dc-ess") > 0) {
|
||||||
dome_light.setValue(1);
|
dome_light.setValue(1);
|
||||||
} else {
|
} else {
|
||||||
dome_light.setValue(0);
|
dome_light.setValue(0);
|
||||||
|
@ -559,9 +559,9 @@ var lightsLoop = maketimer(0.2, func {
|
||||||
# strobe
|
# strobe
|
||||||
strobe_sw = strobe_switch.getValue();
|
strobe_sw = strobe_switch.getValue();
|
||||||
|
|
||||||
if (strobe_sw == 1 and getprop("/systems/electrical/bus/ac-2") > 0) {
|
if (strobe_sw == 1 and getprop("systems/electrical/bus/ac-2") > 0) {
|
||||||
strobe_light.setValue(1);
|
strobe_light.setValue(1);
|
||||||
} elsif (strobe_sw == 0.5 and getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0 and getprop("/systems/electrical/bus/ac-2") > 0) {
|
} elsif (strobe_sw == 0.5 and getprop("gear/gear[1]/wow") == 0 and getprop("gear/gear[2]/wow") == 0 and getprop("systems/electrical/bus/ac-2") > 0) {
|
||||||
# todo: use lgciu output 5
|
# todo: use lgciu output 5
|
||||||
strobe_light.setValue(1);
|
strobe_light.setValue(1);
|
||||||
} else {
|
} else {
|
||||||
|
@ -570,7 +570,7 @@ var lightsLoop = maketimer(0.2, func {
|
||||||
|
|
||||||
# beacon
|
# beacon
|
||||||
|
|
||||||
if (beacon_switch.getValue() == 1 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0)) {
|
if (beacon_switch.getValue() == 1 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0)) {
|
||||||
beacon_ctl.setValue(1);
|
beacon_ctl.setValue(1);
|
||||||
} else {
|
} else {
|
||||||
beacon_ctl.setValue(0);
|
beacon_ctl.setValue(0);
|
||||||
|
@ -578,7 +578,7 @@ var lightsLoop = maketimer(0.2, func {
|
||||||
|
|
||||||
# wing
|
# wing
|
||||||
|
|
||||||
if (wing_switch.getValue() == 1 and (getprop("/systems/electrical/bus/ac-1") > 0 or getprop("/systems/electrical/bus/ac-2") > 0)) {
|
if (wing_switch.getValue() == 1 and (getprop("systems/electrical/bus/ac-1") > 0 or getprop("systems/electrical/bus/ac-2") > 0)) {
|
||||||
wing_ctl.setValue(1);
|
wing_ctl.setValue(1);
|
||||||
} else {
|
} else {
|
||||||
wing_ctl.setValue(0);
|
wing_ctl.setValue(0);
|
||||||
|
@ -586,13 +586,13 @@ var lightsLoop = maketimer(0.2, func {
|
||||||
|
|
||||||
# landL
|
# landL
|
||||||
|
|
||||||
if (landlSw.getValue() == 1 and getprop("/systems/electrical/bus/ac-1") > 0) {
|
if (landlSw.getValue() == 1 and getprop("systems/electrical/bus/ac-1") > 0) {
|
||||||
landL.setValue(1);
|
landL.setValue(1);
|
||||||
} else {
|
} else {
|
||||||
landL.setValue(0);
|
landL.setValue(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (landrSw.getValue() == 1 and getprop("/systems/electrical/bus/ac-2") > 0) {
|
if (landrSw.getValue() == 1 and getprop("systems/electrical/bus/ac-2") > 0) {
|
||||||
landR.setValue(1);
|
landR.setValue(1);
|
||||||
} else {
|
} else {
|
||||||
landR.setValue(0);
|
landR.setValue(0);
|
||||||
|
@ -600,48 +600,48 @@ var lightsLoop = maketimer(0.2, func {
|
||||||
|
|
||||||
# signs
|
# signs
|
||||||
|
|
||||||
if (getprop("/systems/pressurization/cabinalt-norm") > 11300) {
|
if (getprop("systems/pressurization/cabinalt-norm") > 11300) {
|
||||||
setprop("/controls/lighting/seatbelt-sign", 1);
|
setprop("controls/lighting/seatbelt-sign", 1);
|
||||||
setprop("/controls/lighting/no-smoking-sign", 1);
|
setprop("controls/lighting/no-smoking-sign", 1);
|
||||||
} else {
|
} else {
|
||||||
if (getprop("controls/switches/seatbelt-sign") == 1) {
|
if (getprop("controls/switches/seatbelt-sign") == 1) {
|
||||||
if (getprop("/controls/lighting/seatbelt-sign") == 0) {
|
if (getprop("controls/lighting/seatbelt-sign") == 0) {
|
||||||
setprop("/controls/lighting/seatbelt-sign", 1);
|
setprop("controls/lighting/seatbelt-sign", 1);
|
||||||
}
|
}
|
||||||
} elsif (getprop("controls/switches/seatbelt-sign") == 0) {
|
} elsif (getprop("controls/switches/seatbelt-sign") == 0) {
|
||||||
if (getprop("/controls/lighting/seatbelt-sign") == 1) {
|
if (getprop("controls/lighting/seatbelt-sign") == 1) {
|
||||||
setprop("/controls/lighting/seatbelt-sign", 0);
|
setprop("controls/lighting/seatbelt-sign", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("controls/switches/no-smoking-sign") == 1) {
|
if (getprop("controls/switches/no-smoking-sign") == 1) {
|
||||||
if (getprop("/controls/lighting/no-smoking-sign") == 0) {
|
if (getprop("controls/lighting/no-smoking-sign") == 0) {
|
||||||
setprop("/controls/lighting/no-smoking-sign", 1);
|
setprop("controls/lighting/no-smoking-sign", 1);
|
||||||
}
|
}
|
||||||
} elsif (getprop("controls/switches/no-smoking-sign") == 0.5 and getprop("gear/gear[0]/position-norm") != 0) { # todo: should be when uplocks not engaged
|
} elsif (getprop("controls/switches/no-smoking-sign") == 0.5 and getprop("gear/gear[0]/position-norm") != 0) { # todo: should be when uplocks not engaged
|
||||||
if (getprop("/controls/lighting/no-smoking-sign") == 0) {
|
if (getprop("controls/lighting/no-smoking-sign") == 0) {
|
||||||
setprop("/controls/lighting/no-smoking-sign", 1);
|
setprop("controls/lighting/no-smoking-sign", 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setprop("/controls/lighting/no-smoking-sign", 0); # sign stays on in cabin but sound still occurs
|
setprop("controls/lighting/no-smoking-sign", 0); # sign stays on in cabin but sound still occurs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("controls/lighting/landing-lights[1]") >= 0.5) {
|
if (getprop("controls/lighting/landing-lights[1]") >= 0.5) {
|
||||||
setprop("/fdm/jsbsim/rubbish/landL", 1);
|
setprop("fdm/jsbsim/rubbish/landL", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/fdm/jsbsim/rubbish/landL", 0);
|
setprop("fdm/jsbsim/rubbish/landL", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("controls/lighting/landing-lights[2]") >= 0.5) {
|
if (getprop("controls/lighting/landing-lights[2]") >= 0.5) {
|
||||||
setprop("/fdm/jsbsim/rubbish/landR", 1);
|
setprop("fdm/jsbsim/rubbish/landR", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/fdm/jsbsim/rubbish/landR", 0);
|
setprop("fdm/jsbsim/rubbish/landR", 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var lTray = func {
|
var lTray = func {
|
||||||
var lTrayCMD = getprop("/controls/tray/lefttrayext");
|
var lTrayCMD = getprop("controls/tray/lefttrayext");
|
||||||
if (lTrayCMD < 0.5) {
|
if (lTrayCMD < 0.5) {
|
||||||
interpolate("/controls/tray/lefttrayext", 0.5, 0.5);
|
interpolate("/controls/tray/lefttrayext", 0.5, 0.5);
|
||||||
} else if (lTrayCMD == 0.5) {
|
} else if (lTrayCMD == 0.5) {
|
||||||
|
@ -652,7 +652,7 @@ var lTray = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
var rTray = func {
|
var rTray = func {
|
||||||
var rTrayCMD = getprop("/controls/tray/righttrayext");
|
var rTrayCMD = getprop("controls/tray/righttrayext");
|
||||||
if (rTrayCMD < 0.5) {
|
if (rTrayCMD < 0.5) {
|
||||||
interpolate("/controls/tray/righttrayext", 0.5, 0.5);
|
interpolate("/controls/tray/righttrayext", 0.5, 0.5);
|
||||||
} else if (rTrayCMD == 0.5) {
|
} else if (rTrayCMD == 0.5) {
|
||||||
|
@ -663,7 +663,7 @@ var rTray = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
var l1Pedal = func {
|
var l1Pedal = func {
|
||||||
var lPedalCMD = getprop("/controls/footrest-cpt[0]");
|
var lPedalCMD = getprop("controls/footrest-cpt[0]");
|
||||||
if (lPedalCMD < 1.0) {
|
if (lPedalCMD < 1.0) {
|
||||||
interpolate("/controls/footrest-cpt[0]", 1.0, 0.5);
|
interpolate("/controls/footrest-cpt[0]", 1.0, 0.5);
|
||||||
} else {
|
} else {
|
||||||
|
@ -672,7 +672,7 @@ var l1Pedal = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
var l2Pedal = func {
|
var l2Pedal = func {
|
||||||
var l2PedalCMD = getprop("/controls/footrest-cpt[1]");
|
var l2PedalCMD = getprop("controls/footrest-cpt[1]");
|
||||||
if (l2PedalCMD < 1.0) {
|
if (l2PedalCMD < 1.0) {
|
||||||
interpolate("/controls/footrest-cpt[1]", 1.0, 0.5);
|
interpolate("/controls/footrest-cpt[1]", 1.0, 0.5);
|
||||||
} else {
|
} else {
|
||||||
|
@ -681,7 +681,7 @@ var l2Pedal = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
var r1Pedal = func {
|
var r1Pedal = func {
|
||||||
var rPedalCMD = getprop("/controls/footrest-fo[0]");
|
var rPedalCMD = getprop("controls/footrest-fo[0]");
|
||||||
if (rPedalCMD < 1.0) {
|
if (rPedalCMD < 1.0) {
|
||||||
interpolate("/controls/footrest-fo[0]", 1.0, 0.5);
|
interpolate("/controls/footrest-fo[0]", 1.0, 0.5);
|
||||||
} else {
|
} else {
|
||||||
|
@ -690,7 +690,7 @@ var r1Pedal = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
var r2Pedal = func {
|
var r2Pedal = func {
|
||||||
var r2PedalCMD = getprop("/controls/footrest-fo[1]");
|
var r2PedalCMD = getprop("controls/footrest-fo[1]");
|
||||||
if (r2PedalCMD < 1.0) {
|
if (r2PedalCMD < 1.0) {
|
||||||
interpolate("/controls/footrest-fo[1]", 1.0, 0.5);
|
interpolate("/controls/footrest-fo[1]", 1.0, 0.5);
|
||||||
} else {
|
} else {
|
||||||
|
@ -698,13 +698,13 @@ var r2Pedal = func {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/controls/flight/auto-coordination") == 1) {
|
if (getprop("controls/flight/auto-coordination") == 1) {
|
||||||
setprop("/controls/flight/auto-coordination", 0);
|
setprop("controls/flight/auto-coordination", 0);
|
||||||
print("System: Auto Coordination has been turned off as it is not compatible with the fly-by-wire of this aircraft.");
|
print("System: Auto Coordination has been turned off as it is not compatible with the fly-by-wire of this aircraft.");
|
||||||
screen.log.write("Auto Coordination has been disabled as it is not compatible with the fly-by-wire of this aircraft", 1, 0, 0);
|
screen.log.write("Auto Coordination has been disabled as it is not compatible with the fly-by-wire of this aircraft", 1, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
setprop("/controls/flight/aileron-drives-tiller", 0);
|
setprop("controls/flight/aileron-drives-tiller", 0);
|
||||||
|
|
||||||
var APPanel = {
|
var APPanel = {
|
||||||
APDisc: func() {
|
APDisc: func() {
|
||||||
|
@ -717,9 +717,9 @@ var APPanel = {
|
||||||
|
|
||||||
var resetView = func() {
|
var resetView = func() {
|
||||||
if (getprop("sim/current-view/view-number") == 0) {
|
if (getprop("sim/current-view/view-number") == 0) {
|
||||||
if (getprop("/sim/rendering/headshake/enabled")) {
|
if (getprop("sim/rendering/headshake/enabled")) {
|
||||||
var _shakeFlag = 1;
|
var _shakeFlag = 1;
|
||||||
setprop("/sim/rendering/headshake/enabled", 0);
|
setprop("sim/rendering/headshake/enabled", 0);
|
||||||
} else {
|
} else {
|
||||||
var _shakeFlag = 0;
|
var _shakeFlag = 0;
|
||||||
}
|
}
|
||||||
|
@ -739,9 +739,9 @@ var resetView = func() {
|
||||||
interpolate("sim/current-view/z-offset-m", -13.75, 0.66);
|
interpolate("sim/current-view/z-offset-m", -13.75, 0.66);
|
||||||
|
|
||||||
if (_shakeFlag) {
|
if (_shakeFlag) {
|
||||||
setprop("/sim/rendering/headshake/enabled", 1);
|
setprop("sim/rendering/headshake/enabled", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setprop("/systems/acconfig/libraries-loaded", 1);
|
setprop("systems/acconfig/libraries-loaded", 1);
|
||||||
|
|
|
@ -6,35 +6,35 @@
|
||||||
# Usage Example: pts.Class.SubClass.node.getValue()
|
# Usage Example: pts.Class.SubClass.node.getValue()
|
||||||
|
|
||||||
var APU = {
|
var APU = {
|
||||||
masterSw: props.globals.getNode("/controls/APU/master"),
|
masterSw: props.globals.getNode("controls/APU/master"),
|
||||||
rpm: props.globals.getNode("/systems/apu/rpm"),
|
rpm: props.globals.getNode("systems/apu/rpm"),
|
||||||
};
|
};
|
||||||
|
|
||||||
var Consumables = {
|
var Consumables = {
|
||||||
Fuel: {
|
Fuel: {
|
||||||
totalFuelLbs: props.globals.getNode("/consumables/fuel/total-fuel-lbs"),
|
totalFuelLbs: props.globals.getNode("consumables/fuel/total-fuel-lbs"),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var Controls = {
|
var Controls = {
|
||||||
Engines: {
|
Engines: {
|
||||||
startSw: props.globals.getNode("/controls/engines/engine-start-switch"),
|
startSw: props.globals.getNode("controls/engines/engine-start-switch"),
|
||||||
Engine1: {
|
Engine1: {
|
||||||
cutoffSw: props.globals.getNode("/controls/engines/engine[0]/cutoff-switch"),
|
cutoffSw: props.globals.getNode("controls/engines/engine[0]/cutoff-switch"),
|
||||||
firePb: props.globals.getNode("/controls/engines/engine[0]/fire-btn"),
|
firePb: props.globals.getNode("controls/engines/engine[0]/fire-btn"),
|
||||||
throttle: props.globals.getNode("/controls/engines/engine[0]/throttle"),
|
throttle: props.globals.getNode("controls/engines/engine[0]/throttle"),
|
||||||
},
|
},
|
||||||
Engine2: {
|
Engine2: {
|
||||||
cutoffSw: props.globals.getNode("/controls/engines/engine[1]/cutoff-switch"),
|
cutoffSw: props.globals.getNode("controls/engines/engine[1]/cutoff-switch"),
|
||||||
firePb: props.globals.getNode("/controls/engines/engine[1]/fire-btn"),
|
firePb: props.globals.getNode("controls/engines/engine[1]/fire-btn"),
|
||||||
throttle: props.globals.getNode("/controls/engines/engine[1]/throttle"),
|
throttle: props.globals.getNode("controls/engines/engine[1]/throttle"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Flight: {
|
Flight: {
|
||||||
aileron: props.globals.getNode("/controls/flight/aileron"),
|
aileron: props.globals.getNode("controls/flight/aileron"),
|
||||||
},
|
},
|
||||||
Gear: {
|
Gear: {
|
||||||
gearDown: props.globals.getNode("/controls/gear/gear-down"),
|
gearDown: props.globals.getNode("controls/gear/gear-down"),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -44,98 +44,98 @@ var ECAM = {
|
||||||
|
|
||||||
var Engines = {
|
var Engines = {
|
||||||
Engine1: {
|
Engine1: {
|
||||||
epractual: props.globals.getNode("/engines/engine[0]/epr-actual"),
|
epractual: props.globals.getNode("engines/engine[0]/epr-actual"),
|
||||||
n1actual: props.globals.getNode("/engines/engine[0]/n1-actual"),
|
n1actual: props.globals.getNode("engines/engine[0]/n1-actual"),
|
||||||
n2actual: props.globals.getNode("/engines/engine[0]/n2-actual"),
|
n2actual: props.globals.getNode("engines/engine[0]/n2-actual"),
|
||||||
state: props.globals.getNode("/engines/engine[0]/state"),
|
state: props.globals.getNode("engines/engine[0]/state"),
|
||||||
},
|
},
|
||||||
Engine2: {
|
Engine2: {
|
||||||
epractual: props.globals.getNode("/engines/engine[1]/epr-actual"),
|
epractual: props.globals.getNode("engines/engine[1]/epr-actual"),
|
||||||
n1actual: props.globals.getNode("/engines/engine[1]/n1-actual"),
|
n1actual: props.globals.getNode("engines/engine[1]/n1-actual"),
|
||||||
n2actual: props.globals.getNode("/engines/engine[1]/n2-actual"),
|
n2actual: props.globals.getNode("engines/engine[1]/n2-actual"),
|
||||||
state: props.globals.getNode("/engines/engine[1]/state"),
|
state: props.globals.getNode("engines/engine[1]/state"),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var FMGC = {
|
var FMGC = {
|
||||||
CasCompare: {
|
CasCompare: {
|
||||||
rejectAll: props.globals.getNode("/systems/fmgc/cas-compare/cas-reject-all"),
|
rejectAll: props.globals.getNode("systems/fmgc/cas-compare/cas-reject-all"),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var Gear = {
|
var Gear = {
|
||||||
compression: [props.globals.getNode("/gear/gear[0]/compression-norm"),props.globals.getNode("/gear/gear[1]/compression-norm"),props.globals.getNode("/gear/gear[2]/compression-norm")],
|
compression: [props.globals.getNode("gear/gear[0]/compression-norm"),props.globals.getNode("gear/gear[1]/compression-norm"),props.globals.getNode("gear/gear[2]/compression-norm")],
|
||||||
wow: [props.globals.getNode("/gear/gear[0]/wow"),props.globals.getNode("/gear/gear[1]/wow"),props.globals.getNode("/gear/gear[2]/wow")],
|
wow: [props.globals.getNode("gear/gear[0]/wow"),props.globals.getNode("gear/gear[1]/wow"),props.globals.getNode("gear/gear[2]/wow")],
|
||||||
position: [props.globals.getNode("/gear/gear[0]/position-norm"),props.globals.getNode("/gear/gear[1]/position-norm"),props.globals.getNode("/gear/gear[2]/position-norm")],
|
position: [props.globals.getNode("gear/gear[0]/position-norm"),props.globals.getNode("gear/gear[1]/position-norm"),props.globals.getNode("gear/gear[2]/position-norm")],
|
||||||
};
|
};
|
||||||
|
|
||||||
var Instrumentation = {
|
var Instrumentation = {
|
||||||
AirspeedIndicator: {
|
AirspeedIndicator: {
|
||||||
indicatedSpdKt: props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt"),
|
indicatedSpdKt: props.globals.getNode("instrumentation/airspeed-indicator/indicated-speed-kt"),
|
||||||
},
|
},
|
||||||
TCAS: {
|
TCAS: {
|
||||||
Inputs: {
|
Inputs: {
|
||||||
mode: props.globals.getNode("/instrumentation/tcas/inputs/mode"),
|
mode: props.globals.getNode("instrumentation/tcas/inputs/mode"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var JSBSIM = {
|
var JSBSIM = {
|
||||||
FCS: {
|
FCS: {
|
||||||
flapDeg: props.globals.getNode("/fdm/jsbsim/fcs/flap-pos-deg"),
|
flapDeg: props.globals.getNode("fdm/jsbsim/fcs/flap-pos-deg"),
|
||||||
slatDeg: props.globals.getNode("/fdm/jsbsim/fcs/slat-pos-deg"),
|
slatDeg: props.globals.getNode("fdm/jsbsim/fcs/slat-pos-deg"),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var JSBSim = {
|
var JSBSim = {
|
||||||
FBW: {
|
FBW: {
|
||||||
aileron: props.globals.getNode("/fdm/jsbsim/fbw/aileron-sidestick"),
|
aileron: props.globals.getNode("fdm/jsbsim/fbw/aileron-sidestick"),
|
||||||
elevator: props.globals.getNode("/fdm/jsbsim/fbw/elevator-sidestick"),
|
elevator: props.globals.getNode("fdm/jsbsim/fbw/elevator-sidestick"),
|
||||||
},
|
},
|
||||||
Propulsion: {
|
Propulsion: {
|
||||||
Engine1: {
|
Engine1: {
|
||||||
fuelUsed: props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/fuel-used-lbs"),
|
fuelUsed: props.globals.getNode("fdm/jsbsim/propulsion/engine[0]/fuel-used-lbs"),
|
||||||
},
|
},
|
||||||
Engine2: {
|
Engine2: {
|
||||||
fuelUsed: props.globals.getNode("/fdm/jsbsim/propulsion/engine[1]/fuel-used-lbs"),
|
fuelUsed: props.globals.getNode("fdm/jsbsim/propulsion/engine[1]/fuel-used-lbs"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var Options = {
|
var Options = {
|
||||||
eng: props.globals.getNode("/options/eng"),
|
eng: props.globals.getNode("options/eng"),
|
||||||
};
|
};
|
||||||
|
|
||||||
var Orientation = {
|
var Orientation = {
|
||||||
pitch: props.globals.getNode("/orientation/pitch-deg"),
|
pitch: props.globals.getNode("orientation/pitch-deg"),
|
||||||
roll: props.globals.getNode("/orientation/roll-deg"),
|
roll: props.globals.getNode("orientation/roll-deg"),
|
||||||
yaw: props.globals.getNode("/orientation/yaw-deg"),
|
yaw: props.globals.getNode("orientation/yaw-deg"),
|
||||||
};
|
};
|
||||||
|
|
||||||
var Position = {
|
var Position = {
|
||||||
gearAglFt: props.globals.getNode("/position/gear-agl-ft"),
|
gearAglFt: props.globals.getNode("position/gear-agl-ft"),
|
||||||
latitude: props.globals.getNode("/position/latitude-deg"),
|
latitude: props.globals.getNode("position/latitude-deg"),
|
||||||
longitude: props.globals.getNode("/position/longitude-deg"),
|
longitude: props.globals.getNode("position/longitude-deg"),
|
||||||
};
|
};
|
||||||
|
|
||||||
var Sim = {
|
var Sim = {
|
||||||
aero: props.globals.getNode("/sim/aero"),
|
aero: props.globals.getNode("sim/aero"),
|
||||||
Replay: {
|
Replay: {
|
||||||
replayActive: props.globals.getNode("/sim/replay/replay-state"),
|
replayActive: props.globals.getNode("sim/replay/replay-state"),
|
||||||
},
|
},
|
||||||
Time: {
|
Time: {
|
||||||
elapsedSec: props.globals.getNode("/sim/time/elapsed-sec"),
|
elapsedSec: props.globals.getNode("sim/time/elapsed-sec"),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var PTSSystems = {
|
var PTSSystems = {
|
||||||
Thrust: {
|
Thrust: {
|
||||||
flex: props.globals.getNode("/systems/thrust/lim-flex"),
|
flex: props.globals.getNode("systems/thrust/lim-flex"),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
var Velocities = {
|
var Velocities = {
|
||||||
groundspeed: props.globals.getNode("/velocities/groundspeed-kt"),
|
groundspeed: props.globals.getNode("velocities/groundspeed-kt"),
|
||||||
};
|
};
|
||||||
|
|
||||||
setprop("/systems/acconfig/property-tree-setup-loaded", 1);
|
setprop("systems/acconfig/property-tree-setup-loaded", 1);
|
||||||
|
|
|
@ -11,10 +11,10 @@ var n_g_l = 0;
|
||||||
var n_g_r = 0;
|
var n_g_r = 0;
|
||||||
|
|
||||||
var theShakeEffect = func {
|
var theShakeEffect = func {
|
||||||
n_g_c = getprop("/gear/gear[0]/compression-norm") or 0;
|
n_g_c = getprop("gear/gear[0]/compression-norm") or 0;
|
||||||
n_g_l = getprop("/gear/gear[1]/compression-norm") or 0;
|
n_g_l = getprop("gear/gear[1]/compression-norm") or 0;
|
||||||
n_g_r = getprop("/gear/gear[2]/compression-norm") or 0;
|
n_g_r = getprop("gear/gear[2]/compression-norm") or 0;
|
||||||
rSpeed = getprop("/gear/gear[0]/rollspeed-ms") or 0;
|
rSpeed = getprop("gear/gear[0]/rollspeed-ms") or 0;
|
||||||
sf = rSpeed / 94000;
|
sf = rSpeed / 94000;
|
||||||
|
|
||||||
if (shakeEffectA3XX.getBoolValue() and (n_g_c > 0 or n_g_l > 0 or n_g_r > 0)) {
|
if (shakeEffectA3XX.getBoolValue() and (n_g_c > 0 or n_g_l > 0 or n_g_r > 0)) {
|
||||||
|
@ -27,8 +27,8 @@ var theShakeEffect = func {
|
||||||
}, 0.12);
|
}, 0.12);
|
||||||
settimer(theShakeEffect, 0.09);
|
settimer(theShakeEffect, 0.09);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/shake/shaking", 0);
|
setprop("systems/shake/shaking", 0);
|
||||||
setprop("/systems/shake/effect", 0);
|
setprop("systems/shake/effect", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,33 +6,33 @@ var distance = 0;
|
||||||
var min_dist = 0;
|
var min_dist = 0;
|
||||||
var max_dist = 0;
|
var max_dist = 0;
|
||||||
var canChangeZOffset = 0;
|
var canChangeZOffset = 0;
|
||||||
var decStep = -5;
|
var decStep = -0.5;
|
||||||
var incStep = 5;
|
var incStep = 0.5;
|
||||||
var viewName = "XX";
|
var viewName = "XX";
|
||||||
|
|
||||||
var fovZoom = func(d) {
|
var fovZoom = func(d) {
|
||||||
viewName = getprop("/sim/current-view/name");
|
viewName = getprop("sim/current-view/name");
|
||||||
canChangeZOffset = getprop("/sim/current-view/type") == "lookat" and viewName != "Tower View" and viewName != "Fly-By View" and viewName != "Chase View" and viewName != "Chase View Without Yaw" and viewName != "Walk View";
|
canChangeZOffset = getprop("sim/current-view/type") == "lookat" and viewName != "Tower View" and viewName != "Tower View AGL" and viewName != "Fly-By View" and viewName != "Chase View" and viewName != "Chase View Without Yaw" and viewName != "Walk View";
|
||||||
|
|
||||||
if (getprop("/sim/current-view/z-offset-m") <= -50) {
|
if (getprop("sim/current-view/z-offset-m") <= -20) {
|
||||||
decStep = -10;
|
decStep = -2;
|
||||||
} else {
|
} else {
|
||||||
decStep = -5;
|
decStep = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/sim/current-view/z-offset-m") < -50) { # Not a typo, the conditions are different
|
if (getprop("sim/current-view/z-offset-m") < -20) { # Not a typo, the conditions are different
|
||||||
incStep = 10;
|
incStep = 2;
|
||||||
} else {
|
} else {
|
||||||
incStep = 5;
|
incStep = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d == -1) {
|
if (d == -1) {
|
||||||
if (canChangeZOffset) {
|
if (canChangeZOffset) {
|
||||||
distance = getprop("/sim/current-view/z-offset-m");
|
distance = getprop("sim/current-view/z-offset-m");
|
||||||
min_dist = getprop("/sim/current-view/z-offset-min-m");
|
min_dist = getprop("sim/current-view/z-offset-min-m");
|
||||||
|
|
||||||
distance = math.round(std.min(-min_dist, distance + incStep) / incStep, 0.1) * incStep;
|
distance = math.round(std.min(-min_dist, distance + incStep) / incStep, 0.1) * incStep;
|
||||||
setprop("/sim/current-view/z-offset-m", distance);
|
setprop("sim/current-view/z-offset-m", distance);
|
||||||
|
|
||||||
gui.popupTip(sprintf("%d meters", abs(distance)));
|
gui.popupTip(sprintf("%d meters", abs(distance)));
|
||||||
} else {
|
} else {
|
||||||
|
@ -40,11 +40,11 @@ var fovZoom = func(d) {
|
||||||
}
|
}
|
||||||
} else if (d == 1) {
|
} else if (d == 1) {
|
||||||
if (canChangeZOffset) {
|
if (canChangeZOffset) {
|
||||||
distance = getprop("/sim/current-view/z-offset-m");
|
distance = getprop("sim/current-view/z-offset-m");
|
||||||
max_dist = getprop("/sim/current-view/z-offset-max-m");
|
max_dist = getprop("sim/current-view/z-offset-max-m");
|
||||||
|
|
||||||
distance = math.round(std.max(-max_dist, distance + decStep) / decStep, 0.1) * decStep;
|
distance = math.round(std.max(-max_dist, distance + decStep) / decStep, 0.1) * decStep;
|
||||||
setprop("/sim/current-view/z-offset-m", distance);
|
setprop("sim/current-view/z-offset-m", distance);
|
||||||
|
|
||||||
gui.popupTip(sprintf("%d meters", abs(distance)));
|
gui.popupTip(sprintf("%d meters", abs(distance)));
|
||||||
} else {
|
} else {
|
||||||
|
@ -52,11 +52,11 @@ var fovZoom = func(d) {
|
||||||
}
|
}
|
||||||
} else if (d == 0) {
|
} else if (d == 0) {
|
||||||
if (canChangeZOffset) {
|
if (canChangeZOffset) {
|
||||||
setprop("/sim/current-view/z-offset-m", getprop("/sim/current-view/z-offset-default") * -1);
|
setprop("sim/current-view/z-offset-m", getprop("sim/current-view/z-offset-default") * -1);
|
||||||
gui.popupTip(sprintf("%d meters", getprop("/sim/current-view/z-offset-default")));
|
gui.popupTip(sprintf("%d meters", getprop("sim/current-view/z-offset-default")));
|
||||||
} else {
|
} else {
|
||||||
setprop("/sim/current-view/field-of-view", getprop("/sim/view/config/default-field-of-view-deg"));
|
setprop("sim/current-view/field-of-view", getprop("sim/view/config/default-field-of-view-deg"));
|
||||||
gui.popupTip(sprintf("FOV: %.1f", getprop("/sim/current-view/field-of-view")))
|
gui.popupTip(sprintf("FOV: %.1f", getprop("sim/current-view/field-of-view")))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,16 +4,16 @@
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
||||||
var ADIRS = {
|
var ADIRS = {
|
||||||
init: func() {
|
init: func() {
|
||||||
setprop("/controls/adirs/mcdu/mode1", ""); # INVAL ALIGN NAV ATT or off (blank)
|
setprop("controls/adirs/mcdu/mode1", ""); # INVAL ALIGN NAV ATT or off (blank)
|
||||||
setprop("/controls/adirs/mcdu/mode2", "");
|
setprop("controls/adirs/mcdu/mode2", "");
|
||||||
setprop("/controls/adirs/mcdu/mode3", "");
|
setprop("controls/adirs/mcdu/mode3", "");
|
||||||
setprop("/controls/adirs/mcdu/status1", ""); # see smith thales p487
|
setprop("controls/adirs/mcdu/status1", ""); # see smith thales p487
|
||||||
setprop("/controls/adirs/mcdu/status2", "");
|
setprop("controls/adirs/mcdu/status2", "");
|
||||||
setprop("/controls/adirs/mcdu/status3", "");
|
setprop("controls/adirs/mcdu/status3", "");
|
||||||
setprop("/controls/adirs/mcdu/hdg", ""); # only shown if in ATT mode
|
setprop("controls/adirs/mcdu/hdg", ""); # only shown if in ATT mode
|
||||||
setprop("/controls/adirs/mcdu/avgdrift1", "");
|
setprop("controls/adirs/mcdu/avgdrift1", "");
|
||||||
setprop("/controls/adirs/mcdu/avgdrift2", "");
|
setprop("controls/adirs/mcdu/avgdrift2", "");
|
||||||
setprop("/controls/adirs/mcdu/avgdrift3", "");
|
setprop("controls/adirs/mcdu/avgdrift3", "");
|
||||||
setprop("/controls/adirs/mcducbtn", 0);
|
setprop("controls/adirs/mcducbtn", 0);
|
||||||
},
|
},
|
||||||
};
|
};
|
|
@ -240,19 +240,19 @@ var ADIRSnew = {
|
||||||
|
|
||||||
# PTS
|
# PTS
|
||||||
Lights: {
|
Lights: {
|
||||||
adrFault: [props.globals.getNode("/controls/navigation/adirscp/lights/adr-1-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-2-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-3-fault")],
|
adrFault: [props.globals.getNode("controls/navigation/adirscp/lights/adr-1-fault"), props.globals.getNode("controls/navigation/adirscp/lights/adr-2-fault"), props.globals.getNode("controls/navigation/adirscp/lights/adr-3-fault")],
|
||||||
adrOff: [props.globals.getNode("/controls/navigation/adirscp/lights/adr-1-off"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-2-off"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-3-off")],
|
adrOff: [props.globals.getNode("controls/navigation/adirscp/lights/adr-1-off"), props.globals.getNode("controls/navigation/adirscp/lights/adr-2-off"), props.globals.getNode("controls/navigation/adirscp/lights/adr-3-off")],
|
||||||
irFault: [props.globals.getNode("/controls/navigation/adirscp/lights/ir-1-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-2-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-3-fault")],
|
irFault: [props.globals.getNode("controls/navigation/adirscp/lights/ir-1-fault"), props.globals.getNode("controls/navigation/adirscp/lights/ir-2-fault"), props.globals.getNode("controls/navigation/adirscp/lights/ir-3-fault")],
|
||||||
irOff: [props.globals.getNode("/controls/navigation/adirscp/lights/ir-1-off"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-2-off"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-3-off")],
|
irOff: [props.globals.getNode("controls/navigation/adirscp/lights/ir-1-off"), props.globals.getNode("controls/navigation/adirscp/lights/ir-2-off"), props.globals.getNode("controls/navigation/adirscp/lights/ir-3-off")],
|
||||||
onBat: props.globals.getNode("/controls/navigation/adirscp/lights/on-bat"),
|
onBat: props.globals.getNode("controls/navigation/adirscp/lights/on-bat"),
|
||||||
},
|
},
|
||||||
Switches: {
|
Switches: {
|
||||||
adrSw: [props.globals.getNode("/controls/navigation/adirscp/switches/adr-1"), props.globals.getNode("/controls/navigation/adirscp/switches/adr-2"), props.globals.getNode("/controls/navigation/adirscp/switches/adr-3")],
|
adrSw: [props.globals.getNode("controls/navigation/adirscp/switches/adr-1"), props.globals.getNode("controls/navigation/adirscp/switches/adr-2"), props.globals.getNode("controls/navigation/adirscp/switches/adr-3")],
|
||||||
irModeSw: [props.globals.getNode("/controls/navigation/adirscp/switches/ir-1-mode"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-2-mode"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-3-mode")],
|
irModeSw: [props.globals.getNode("controls/navigation/adirscp/switches/ir-1-mode"), props.globals.getNode("controls/navigation/adirscp/switches/ir-2-mode"), props.globals.getNode("controls/navigation/adirscp/switches/ir-3-mode")],
|
||||||
irSw: [props.globals.getNode("/controls/navigation/adirscp/switches/ir-1"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-2"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-3")],
|
irSw: [props.globals.getNode("controls/navigation/adirscp/switches/ir-1"), props.globals.getNode("controls/navigation/adirscp/switches/ir-2"), props.globals.getNode("controls/navigation/adirscp/switches/ir-3")],
|
||||||
},
|
},
|
||||||
Operating: {
|
Operating: {
|
||||||
adr: [props.globals.getNode("/systems/navigation/adr/operating-1"), props.globals.getNode("/systems/navigation/adr/operating-2"), props.globals.getNode("/systems/navigation/adr/operating-3")],
|
adr: [props.globals.getNode("systems/navigation/adr/operating-1"), props.globals.getNode("systems/navigation/adr/operating-2"), props.globals.getNode("systems/navigation/adr/operating-3")],
|
||||||
},
|
},
|
||||||
|
|
||||||
# Nodes
|
# Nodes
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
|
|
||||||
var SwitchingPanel = {
|
var SwitchingPanel = {
|
||||||
Switches: {
|
Switches: {
|
||||||
attHdg: props.globals.getNode("/controls/navigation/switching/att-hdg"),
|
attHdg: props.globals.getNode("controls/navigation/switching/att-hdg"),
|
||||||
airData: props.globals.getNode("/controls/navigation/switching/air-data"),
|
airData: props.globals.getNode("controls/navigation/switching/air-data"),
|
||||||
eisDmc: props.globals.getNode("/controls/navigation/switching/eis-dmc"),
|
eisDmc: props.globals.getNode("controls/navigation/switching/eis-dmc"),
|
||||||
},
|
},
|
||||||
|
|
||||||
doAirData: func(newAirData) {
|
doAirData: func(newAirData) {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# Initializing Vars #
|
# Initializing Vars #
|
||||||
#####################
|
#####################
|
||||||
|
|
||||||
var engines = props.globals.getNode("/engines").getChildren("engine");
|
var engines = props.globals.getNode("engines").getChildren("engine");
|
||||||
var egt_min = 434;
|
var egt_min = 434;
|
||||||
var egt_start = 587;
|
var egt_start = 587;
|
||||||
var egt_max = 712;
|
var egt_max = 712;
|
||||||
|
@ -17,34 +17,34 @@ var egt_lightdn_time = 10;
|
||||||
var shutdown_time = 20;
|
var shutdown_time = 20;
|
||||||
var egt_shutdown_time = 20;
|
var egt_shutdown_time = 20;
|
||||||
|
|
||||||
setprop("/controls/engines/engine[0]/reverser", 0);
|
setprop("controls/engines/engine[0]/reverser", 0);
|
||||||
setprop("/controls/engines/engine[1]/reverser", 0);
|
setprop("controls/engines/engine[1]/reverser", 0);
|
||||||
setprop("/controls/engines/engine[0]/igniter-a", 0);
|
setprop("controls/engines/engine[0]/igniter-a", 0);
|
||||||
setprop("/controls/engines/engine[1]/igniter-a", 0);
|
setprop("controls/engines/engine[1]/igniter-a", 0);
|
||||||
setprop("/controls/engines/engine[0]/igniter-b", 0);
|
setprop("controls/engines/engine[0]/igniter-b", 0);
|
||||||
setprop("/controls/engines/engine[1]/igniter-b", 0);
|
setprop("controls/engines/engine[1]/igniter-b", 0);
|
||||||
setprop("/controls/engines/engine[0]/last-igniter", "B");
|
setprop("controls/engines/engine[0]/last-igniter", "B");
|
||||||
setprop("/controls/engines/engine[1]/last-igniter", "B");
|
setprop("controls/engines/engine[1]/last-igniter", "B");
|
||||||
|
|
||||||
var eng_init = func {
|
var eng_init = func {
|
||||||
setprop("/controls/engines/engine[0]/man-start", 0);
|
setprop("controls/engines/engine[0]/man-start", 0);
|
||||||
setprop("/controls/engines/engine[1]/man-start", 0);
|
setprop("controls/engines/engine[1]/man-start", 0);
|
||||||
eng_common_init();
|
eng_common_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
# Trigger Startups and Stops
|
# Trigger Startups and Stops
|
||||||
setlistener("/controls/engines/engine[0]/cutoff-switch", func {
|
setlistener("/controls/engines/engine[0]/cutoff-switch", func {
|
||||||
if (getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
|
if (getprop("controls/engines/engine[0]/cutoff-switch") == 0) {
|
||||||
if (getprop("/systems/acconfig/autoconfig-running") == 1) {
|
if (getprop("systems/acconfig/autoconfig-running") == 1) {
|
||||||
fast_start_one();
|
fast_start_one();
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/controls/engines/engine[0]/man-start") == 0) {
|
if (getprop("controls/engines/engine[0]/man-start") == 0) {
|
||||||
start_one_check();
|
start_one_check();
|
||||||
} else if (getprop("/controls/engines/engine[0]/man-start") == 1) {
|
} else if (getprop("controls/engines/engine[0]/man-start") == 1) {
|
||||||
eng_one_man_start.start();
|
eng_one_man_start.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (getprop("/controls/engines/engine[0]/cutoff-switch") == 1) {
|
} else if (getprop("controls/engines/engine[0]/cutoff-switch") == 1) {
|
||||||
cutoff_one();
|
cutoff_one();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -53,29 +53,29 @@ var cutoff_one = func {
|
||||||
eng_one_auto_start.stop();
|
eng_one_auto_start.stop();
|
||||||
eng_one_man_start.stop();
|
eng_one_man_start.stop();
|
||||||
eng_one_n2_check.stop();
|
eng_one_n2_check.stop();
|
||||||
setprop("/controls/engines/engine[0]/igniter-a", 0);
|
setprop("controls/engines/engine[0]/igniter-a", 0);
|
||||||
setprop("/controls/engines/engine[0]/igniter-b", 0);
|
setprop("controls/engines/engine[0]/igniter-b", 0);
|
||||||
setprop("/controls/engines/engine[0]/man-start", 0);
|
setprop("controls/engines/engine[0]/man-start", 0);
|
||||||
setprop("/systems/pneumatic/eng1-starter", 0);
|
setprop("systems/pneumatic/eng1-starter", 0);
|
||||||
setprop("/controls/engines/engine[0]/starter", 0);
|
setprop("controls/engines/engine[0]/starter", 0);
|
||||||
setprop("/controls/engines/engine[0]/cutoff", 1);
|
setprop("controls/engines/engine[0]/cutoff", 1);
|
||||||
setprop("/engines/engine[0]/state", 0);
|
setprop("engines/engine[0]/state", 0);
|
||||||
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
|
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
|
||||||
eng_one_n2_check.stop();
|
eng_one_n2_check.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
var fast_start_one = func {
|
var fast_start_one = func {
|
||||||
setprop("/controls/engines/engine[0]/cutoff", 0);
|
setprop("controls/engines/engine[0]/cutoff", 0);
|
||||||
setprop("/engines/engine[0]/out-of-fuel", 0);
|
setprop("engines/engine[0]/out-of-fuel", 0);
|
||||||
setprop("/engines/engine[0]/run", 1);
|
setprop("engines/engine[0]/run", 1);
|
||||||
|
|
||||||
setprop("/engines/engine[0]/cutoff", 0);
|
setprop("engines/engine[0]/cutoff", 0);
|
||||||
setprop("/engines/engine[0]/starter", 0);
|
setprop("engines/engine[0]/starter", 0);
|
||||||
|
|
||||||
setprop("/fdm/jsbsim/propulsion/set-running", 0);
|
setprop("fdm/jsbsim/propulsion/set-running", 0);
|
||||||
|
|
||||||
setprop("/engines/engine[0]/state", 3);
|
setprop("engines/engine[0]/state", 3);
|
||||||
setprop("/systems/pneumatic/eng1-starter", 0);
|
setprop("systems/pneumatic/eng1-starter", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/controls/engines/engine[0]/man-start", func {
|
setlistener("/controls/engines/engine[0]/man-start", func {
|
||||||
|
@ -83,52 +83,52 @@ setlistener("/controls/engines/engine[0]/man-start", func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var start_one_mancheck = func {
|
var start_one_mancheck = func {
|
||||||
if (getprop("/controls/engines/engine[0]/man-start") == 1) {
|
if (getprop("controls/engines/engine[0]/man-start") == 1) {
|
||||||
if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[0]/cutoff-switch") == 1)) {
|
if (getprop("controls/engines/engine-start-switch") == 2 and (getprop("controls/engines/engine[0]/cutoff-switch") == 1)) {
|
||||||
setprop("/systems/pneumatic/eng1-starter", 1);
|
setprop("systems/pneumatic/eng1-starter", 1);
|
||||||
settimer(start_one_mancheck_b, 0.5);
|
settimer(start_one_mancheck_b, 0.5);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
|
if (getprop("engines/engine[0]/state") == 1 or getprop("engines/engine[0]/state") == 2) {
|
||||||
setprop("/systems/pneumatic/eng1-starter", 0);
|
setprop("systems/pneumatic/eng1-starter", 0);
|
||||||
setprop("/engines/engine[0]/state", 0);
|
setprop("engines/engine[0]/state", 0);
|
||||||
setprop("/controls/engines/engine[0]/starter", 0);
|
setprop("controls/engines/engine[0]/starter", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var start_one_mancheck_b = func {
|
var start_one_mancheck_b = func {
|
||||||
if (getprop("/systems/pneumatic/total-psi") >= 28) {
|
if (getprop("systems/pneumatic/total-psi") >= 28) {
|
||||||
setprop("/engines/engine[0]/state", 1);
|
setprop("engines/engine[0]/state", 1);
|
||||||
setprop("/controls/engines/engine[0]/starter", 1);
|
setprop("controls/engines/engine[0]/starter", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var start_one_check = func {
|
var start_one_check = func {
|
||||||
if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
|
if (getprop("controls/engines/engine-start-switch") == 2 and getprop("controls/engines/engine[0]/cutoff-switch") == 0) {
|
||||||
setprop("/systems/pneumatic/eng1-starter", 1);
|
setprop("systems/pneumatic/eng1-starter", 1);
|
||||||
settimer(start_one_check_b, 0.5);
|
settimer(start_one_check_b, 0.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var start_one_check_b = func {
|
var start_one_check_b = func {
|
||||||
if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/systems/pneumatic/total-psi") >= 28) and (getprop("/controls/engines/engine[0]/cutoff-switch") == 0)) {
|
if ((getprop("controls/engines/engine-start-switch") == 2) and (getprop("systems/pneumatic/total-psi") >= 28) and (getprop("controls/engines/engine[0]/cutoff-switch") == 0)) {
|
||||||
auto_start_one();
|
auto_start_one();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/controls/engines/engine[1]/cutoff-switch", func {
|
setlistener("/controls/engines/engine[1]/cutoff-switch", func {
|
||||||
if (getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
|
if (getprop("controls/engines/engine[1]/cutoff-switch") == 0) {
|
||||||
if (getprop("/systems/acconfig/autoconfig-running") == 1) {
|
if (getprop("systems/acconfig/autoconfig-running") == 1) {
|
||||||
fast_start_two();
|
fast_start_two();
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/controls/engines/engine[1]/man-start") == 0) {
|
if (getprop("controls/engines/engine[1]/man-start") == 0) {
|
||||||
start_two_check();
|
start_two_check();
|
||||||
} else if (getprop("/controls/engines/engine[1]/man-start") == 1) {
|
} else if (getprop("controls/engines/engine[1]/man-start") == 1) {
|
||||||
eng_two_man_start.start();
|
eng_two_man_start.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (getprop("/controls/engines/engine[1]/cutoff-switch") == 1) {
|
} else if (getprop("controls/engines/engine[1]/cutoff-switch") == 1) {
|
||||||
cutoff_two();
|
cutoff_two();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -137,28 +137,28 @@ var cutoff_two = func {
|
||||||
eng_two_auto_start.stop();
|
eng_two_auto_start.stop();
|
||||||
eng_two_man_start.stop();
|
eng_two_man_start.stop();
|
||||||
eng_two_n2_check.stop();
|
eng_two_n2_check.stop();
|
||||||
setprop("/controls/engines/engine[1]/igniter-a", 0);
|
setprop("controls/engines/engine[1]/igniter-a", 0);
|
||||||
setprop("/controls/engines/engine[1]/igniter-b", 0);
|
setprop("controls/engines/engine[1]/igniter-b", 0);
|
||||||
setprop("/controls/engines/engine[1]/man-start", 0);
|
setprop("controls/engines/engine[1]/man-start", 0);
|
||||||
setprop("/systems/pneumatic/eng2-starter", 0);
|
setprop("systems/pneumatic/eng2-starter", 0);
|
||||||
setprop("/controls/engines/engine[1]/starter", 0);
|
setprop("controls/engines/engine[1]/starter", 0);
|
||||||
setprop("/controls/engines/engine[1]/cutoff", 1);
|
setprop("controls/engines/engine[1]/cutoff", 1);
|
||||||
setprop("/engines/engine[1]/state", 0);
|
setprop("engines/engine[1]/state", 0);
|
||||||
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
|
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
var fast_start_two = func {
|
var fast_start_two = func {
|
||||||
setprop("/controls/engines/engine[1]/cutoff", 0);
|
setprop("controls/engines/engine[1]/cutoff", 0);
|
||||||
setprop("/engines/engine[1]/out-of-fuel", 0);
|
setprop("engines/engine[1]/out-of-fuel", 0);
|
||||||
setprop("/engines/engine[1]/run", 1);
|
setprop("engines/engine[1]/run", 1);
|
||||||
|
|
||||||
setprop("/engines/engine[1]/cutoff", 0);
|
setprop("engines/engine[1]/cutoff", 0);
|
||||||
setprop("/engines/engine[1]/starter", 0);
|
setprop("engines/engine[1]/starter", 0);
|
||||||
|
|
||||||
setprop("/fdm/jsbsim/propulsion/set-running", 1);
|
setprop("fdm/jsbsim/propulsion/set-running", 1);
|
||||||
|
|
||||||
setprop("/engines/engine[1]/state", 3);
|
setprop("engines/engine[1]/state", 3);
|
||||||
setprop("/systems/pneumatic/eng2-starter", 0);
|
setprop("systems/pneumatic/eng2-starter", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/controls/engines/engine[1]/man-start", func {
|
setlistener("/controls/engines/engine[1]/man-start", func {
|
||||||
|
@ -166,60 +166,60 @@ setlistener("/controls/engines/engine[1]/man-start", func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var start_two_mancheck = func {
|
var start_two_mancheck = func {
|
||||||
if (getprop("/controls/engines/engine[1]/man-start") == 1) {
|
if (getprop("controls/engines/engine[1]/man-start") == 1) {
|
||||||
if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[1]/cutoff-switch") == 1)) {
|
if (getprop("controls/engines/engine-start-switch") == 2 and (getprop("controls/engines/engine[1]/cutoff-switch") == 1)) {
|
||||||
setprop("/systems/pneumatic/eng2-starter", 1);
|
setprop("systems/pneumatic/eng2-starter", 1);
|
||||||
settimer(start_two_mancheck_b, 0.5);
|
settimer(start_two_mancheck_b, 0.5);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
|
if (getprop("engines/engine[1]/state") == 1 or getprop("engines/engine[1]/state") == 2) {
|
||||||
setprop("/systems/pneumatic/eng2-starter", 0);
|
setprop("systems/pneumatic/eng2-starter", 0);
|
||||||
setprop("/engines/engine[1]/state", 0);
|
setprop("engines/engine[1]/state", 0);
|
||||||
setprop("/controls/engines/engine[1]/starter", 0);
|
setprop("controls/engines/engine[1]/starter", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var start_two_mancheck_b = func {
|
var start_two_mancheck_b = func {
|
||||||
if (getprop("/systems/pneumatic/total-psi") >= 28) {
|
if (getprop("systems/pneumatic/total-psi") >= 28) {
|
||||||
setprop("/engines/engine[1]/state", 1);
|
setprop("engines/engine[1]/state", 1);
|
||||||
setprop("/controls/engines/engine[1]/starter", 1);
|
setprop("controls/engines/engine[1]/starter", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var start_two_check = func {
|
var start_two_check = func {
|
||||||
if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
|
if (getprop("controls/engines/engine-start-switch") == 2 and getprop("controls/engines/engine[1]/cutoff-switch") == 0) {
|
||||||
setprop("/systems/pneumatic/eng2-starter", 1);
|
setprop("systems/pneumatic/eng2-starter", 1);
|
||||||
settimer(start_two_check_b, 0.5);
|
settimer(start_two_check_b, 0.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var start_two_check_b = func {
|
var start_two_check_b = func {
|
||||||
if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/systems/pneumatic/total-psi") >= 28) and (getprop("/controls/engines/engine[1]/cutoff-switch") == 0)) {
|
if ((getprop("controls/engines/engine-start-switch") == 2) and (getprop("systems/pneumatic/total-psi") >= 28) and (getprop("controls/engines/engine[1]/cutoff-switch") == 0)) {
|
||||||
auto_start_two();
|
auto_start_two();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start Engine One
|
# Start Engine One
|
||||||
var auto_start_one = func {
|
var auto_start_one = func {
|
||||||
setprop("/engines/engine[0]/state", 1);
|
setprop("engines/engine[0]/state", 1);
|
||||||
setprop("/controls/engines/engine[0]/starter", 1);
|
setprop("controls/engines/engine[0]/starter", 1);
|
||||||
eng_one_auto_start.start();
|
eng_one_auto_start.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
var eng_one_auto_start = maketimer(0.5, func {
|
var eng_one_auto_start = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[0]/n2-actual") >= 22) {
|
if (getprop("engines/engine[0]/n2-actual") >= 22) {
|
||||||
eng_one_auto_start.stop();
|
eng_one_auto_start.stop();
|
||||||
setprop("/engines/engine[0]/state", 2);
|
setprop("engines/engine[0]/state", 2);
|
||||||
setprop("/controls/engines/engine[0]/cutoff", 0);
|
setprop("controls/engines/engine[0]/cutoff", 0);
|
||||||
if (getprop("/controls/engines/engine[0]/last-igniter") == "B") {
|
if (getprop("controls/engines/engine[0]/last-igniter") == "B") {
|
||||||
setprop("/controls/engines/engine[0]/igniter-a", 1);
|
setprop("controls/engines/engine[0]/igniter-a", 1);
|
||||||
setprop("/controls/engines/engine[0]/igniter-b", 0);
|
setprop("controls/engines/engine[0]/igniter-b", 0);
|
||||||
setprop("/controls/engines/engine[0]/last-igniter", "A");
|
setprop("controls/engines/engine[0]/last-igniter", "A");
|
||||||
} else if (getprop("/controls/engines/engine[0]/last-igniter") == "A") {
|
} else if (getprop("controls/engines/engine[0]/last-igniter") == "A") {
|
||||||
setprop("/controls/engines/engine[0]/igniter-a", 0);
|
setprop("controls/engines/engine[0]/igniter-a", 0);
|
||||||
setprop("/controls/engines/engine[0]/igniter-b", 1);
|
setprop("controls/engines/engine[0]/igniter-b", 1);
|
||||||
setprop("/controls/engines/engine[0]/last-igniter", "B");
|
setprop("controls/engines/engine[0]/last-igniter", "B");
|
||||||
}
|
}
|
||||||
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
|
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
|
||||||
eng_one_egt_check.start();
|
eng_one_egt_check.start();
|
||||||
|
@ -228,12 +228,12 @@ var eng_one_auto_start = maketimer(0.5, func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var eng_one_man_start = maketimer(0.5, func {
|
var eng_one_man_start = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[0]/n2-actual") >= 16.7) {
|
if (getprop("engines/engine[0]/n2-actual") >= 16.7) {
|
||||||
eng_one_man_start.stop();
|
eng_one_man_start.stop();
|
||||||
setprop("/engines/engine[0]/state", 2);
|
setprop("engines/engine[0]/state", 2);
|
||||||
setprop("/controls/engines/engine[0]/cutoff", 0);
|
setprop("controls/engines/engine[0]/cutoff", 0);
|
||||||
setprop("/controls/engines/engine[0]/igniter-a", 1);
|
setprop("controls/engines/engine[0]/igniter-a", 1);
|
||||||
setprop("/controls/engines/engine[0]/igniter-b", 1);
|
setprop("controls/engines/engine[0]/igniter-b", 1);
|
||||||
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
|
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
|
||||||
eng_one_egt_check.start();
|
eng_one_egt_check.start();
|
||||||
eng_one_n2_check.start();
|
eng_one_n2_check.start();
|
||||||
|
@ -241,48 +241,48 @@ var eng_one_man_start = maketimer(0.5, func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var eng_one_egt_check = maketimer(0.5, func {
|
var eng_one_egt_check = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[0]/egt-actual") >= egt_start) {
|
if (getprop("engines/engine[0]/egt-actual") >= egt_start) {
|
||||||
eng_one_egt_check.stop();
|
eng_one_egt_check.stop();
|
||||||
interpolate(engines[0].getNode("egt-actual"), egt_min, egt_lightdn_time);
|
interpolate(engines[0].getNode("egt-actual"), egt_min, egt_lightdn_time);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var eng_one_n2_check = maketimer(0.5, func {
|
var eng_one_n2_check = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[0]/n2-actual") >= 43.0) {
|
if (getprop("engines/engine[0]/n2-actual") >= 43.0) {
|
||||||
if (getprop("/controls/engines/engine[0]/igniter-a") != 0) {
|
if (getprop("controls/engines/engine[0]/igniter-a") != 0) {
|
||||||
setprop("/controls/engines/engine[0]/igniter-a", 0);
|
setprop("controls/engines/engine[0]/igniter-a", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/controls/engines/engine[0]/igniter-b") != 0) {
|
if (getprop("controls/engines/engine[0]/igniter-b") != 0) {
|
||||||
setprop("/controls/engines/engine[0]/igniter-b", 0);
|
setprop("controls/engines/engine[0]/igniter-b", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (getprop("/engines/engine[0]/n2-actual") >= 57.0) {
|
if (getprop("engines/engine[0]/n2-actual") >= 57.0) {
|
||||||
eng_one_n2_check.stop();
|
eng_one_n2_check.stop();
|
||||||
setprop("/systems/pneumatic/eng1-starter", 0);
|
setprop("systems/pneumatic/eng1-starter", 0);
|
||||||
setprop("/engines/engine[0]/state", 3);
|
setprop("engines/engine[0]/state", 3);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
# Start Engine Two
|
# Start Engine Two
|
||||||
var auto_start_two = func {
|
var auto_start_two = func {
|
||||||
setprop("/engines/engine[1]/state", 1);
|
setprop("engines/engine[1]/state", 1);
|
||||||
setprop("/controls/engines/engine[1]/starter", 1);
|
setprop("controls/engines/engine[1]/starter", 1);
|
||||||
eng_two_auto_start.start();
|
eng_two_auto_start.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
var eng_two_auto_start = maketimer(0.5, func {
|
var eng_two_auto_start = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[1]/n2-actual") >= 22) {
|
if (getprop("engines/engine[1]/n2-actual") >= 22) {
|
||||||
eng_two_auto_start.stop();
|
eng_two_auto_start.stop();
|
||||||
setprop("/engines/engine[1]/state", 2);
|
setprop("engines/engine[1]/state", 2);
|
||||||
setprop("/controls/engines/engine[1]/cutoff", 0);
|
setprop("controls/engines/engine[1]/cutoff", 0);
|
||||||
if (getprop("/controls/engines/engine[1]/last-igniter") == "B") {
|
if (getprop("controls/engines/engine[1]/last-igniter") == "B") {
|
||||||
setprop("/controls/engines/engine[1]/igniter-a", 1);
|
setprop("controls/engines/engine[1]/igniter-a", 1);
|
||||||
setprop("/controls/engines/engine[1]/igniter-b", 0);
|
setprop("controls/engines/engine[1]/igniter-b", 0);
|
||||||
setprop("/controls/engines/engine[1]/last-igniter", "A");
|
setprop("controls/engines/engine[1]/last-igniter", "A");
|
||||||
} else if (getprop("/controls/engines/engine[1]/last-igniter") == "A") {
|
} else if (getprop("controls/engines/engine[1]/last-igniter") == "A") {
|
||||||
setprop("/controls/engines/engine[1]/igniter-a", 0);
|
setprop("controls/engines/engine[1]/igniter-a", 0);
|
||||||
setprop("/controls/engines/engine[1]/igniter-b", 1);
|
setprop("controls/engines/engine[1]/igniter-b", 1);
|
||||||
setprop("/controls/engines/engine[1]/last-igniter", "B");
|
setprop("controls/engines/engine[1]/last-igniter", "B");
|
||||||
}
|
}
|
||||||
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
|
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
|
||||||
eng_two_egt_check.start();
|
eng_two_egt_check.start();
|
||||||
|
@ -291,12 +291,12 @@ var eng_two_auto_start = maketimer(0.5, func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var eng_two_man_start = maketimer(0.5, func {
|
var eng_two_man_start = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[1]/n2-actual") >= 16.7) {
|
if (getprop("engines/engine[1]/n2-actual") >= 16.7) {
|
||||||
eng_two_man_start.stop();
|
eng_two_man_start.stop();
|
||||||
setprop("/engines/engine[1]/state", 2);
|
setprop("engines/engine[1]/state", 2);
|
||||||
setprop("/controls/engines/engine[1]/cutoff", 0);
|
setprop("controls/engines/engine[1]/cutoff", 0);
|
||||||
setprop("/controls/engines/engine[1]/igniter-a", 1);
|
setprop("controls/engines/engine[1]/igniter-a", 1);
|
||||||
setprop("/controls/engines/engine[1]/igniter-b", 1);
|
setprop("controls/engines/engine[1]/igniter-b", 1);
|
||||||
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
|
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
|
||||||
eng_two_egt_check.start();
|
eng_two_egt_check.start();
|
||||||
eng_two_n2_check.start();
|
eng_two_n2_check.start();
|
||||||
|
@ -304,70 +304,70 @@ var eng_two_man_start = maketimer(0.5, func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var eng_two_egt_check = maketimer(0.5, func {
|
var eng_two_egt_check = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[1]/egt-actual") >= egt_start) {
|
if (getprop("engines/engine[1]/egt-actual") >= egt_start) {
|
||||||
eng_two_egt_check.stop();
|
eng_two_egt_check.stop();
|
||||||
interpolate(engines[1].getNode("egt-actual"), egt_min, egt_lightdn_time);
|
interpolate(engines[1].getNode("egt-actual"), egt_min, egt_lightdn_time);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var eng_two_n2_check = maketimer(0.5, func {
|
var eng_two_n2_check = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[1]/n2-actual") >= 50.0) {
|
if (getprop("engines/engine[1]/n2-actual") >= 50.0) {
|
||||||
if (getprop("/controls/engines/engine[1]/igniter-a") != 0) {
|
if (getprop("controls/engines/engine[1]/igniter-a") != 0) {
|
||||||
setprop("/controls/engines/engine[1]/igniter-a", 0);
|
setprop("controls/engines/engine[1]/igniter-a", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/controls/engines/engine[1]/igniter-b") != 0) {
|
if (getprop("controls/engines/engine[1]/igniter-b") != 0) {
|
||||||
setprop("/controls/engines/engine[1]/igniter-b", 0);
|
setprop("controls/engines/engine[1]/igniter-b", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (getprop("/engines/engine[1]/n2-actual") >= 57.0) {
|
if (getprop("engines/engine[1]/n2-actual") >= 57.0) {
|
||||||
eng_two_n2_check.stop();
|
eng_two_n2_check.stop();
|
||||||
setprop("/systems/pneumatic/eng2-starter", 0);
|
setprop("systems/pneumatic/eng2-starter", 0);
|
||||||
setprop("/engines/engine[1]/state", 3);
|
setprop("engines/engine[1]/state", 3);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
# Various Other Stuff
|
# Various Other Stuff
|
||||||
setlistener("/controls/engines/engine-start-switch", func {
|
setlistener("/controls/engines/engine-start-switch", func {
|
||||||
if (getprop("/engines/engine[0]/state") == 0) {
|
if (getprop("engines/engine[0]/state") == 0) {
|
||||||
start_one_check();
|
start_one_check();
|
||||||
start_one_mancheck();
|
start_one_mancheck();
|
||||||
}
|
}
|
||||||
if (getprop("/engines/engine[1]/state") == 0) {
|
if (getprop("engines/engine[1]/state") == 0) {
|
||||||
start_two_check();
|
start_two_check();
|
||||||
start_two_mancheck();
|
start_two_mancheck();
|
||||||
}
|
}
|
||||||
if ((getprop("/controls/engines/engine-start-switch") == 0) or (getprop("/controls/engines/engine-start-switch") == 1)) {
|
if ((getprop("controls/engines/engine-start-switch") == 0) or (getprop("controls/engines/engine-start-switch") == 1)) {
|
||||||
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
|
if (getprop("engines/engine[0]/state") == 1 or getprop("engines/engine[0]/state") == 2) {
|
||||||
setprop("/controls/engines/engine[0]/starter", 0);
|
setprop("controls/engines/engine[0]/starter", 0);
|
||||||
setprop("/controls/engines/engine[0]/cutoff", 1);
|
setprop("controls/engines/engine[0]/cutoff", 1);
|
||||||
setprop("/systems/pneumatic/eng1-starter", 0);
|
setprop("systems/pneumatic/eng1-starter", 0);
|
||||||
setprop("/engines/engine[0]/state", 0);
|
setprop("engines/engine[0]/state", 0);
|
||||||
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
|
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
|
||||||
}
|
}
|
||||||
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
|
if (getprop("engines/engine[1]/state") == 1 or getprop("engines/engine[1]/state") == 2) {
|
||||||
setprop("/controls/engines/engine[1]/starter", 0);
|
setprop("controls/engines/engine[1]/starter", 0);
|
||||||
setprop("/controls/engines/engine[1]/cutoff", 1);
|
setprop("controls/engines/engine[1]/cutoff", 1);
|
||||||
setprop("/systems/pneumatic/eng2-starter", 0);
|
setprop("systems/pneumatic/eng2-starter", 0);
|
||||||
setprop("/engines/engine[1]/state", 0);
|
setprop("engines/engine[1]/state", 0);
|
||||||
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
|
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/systems/pneumatic/start-psi", func {
|
setlistener("/systems/pneumatic/start-psi", func {
|
||||||
if (getprop("/systems/pneumatic/total-psi") < 12) {
|
if (getprop("systems/pneumatic/total-psi") < 12) {
|
||||||
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
|
if (getprop("engines/engine[0]/state") == 1 or getprop("engines/engine[0]/state") == 2) {
|
||||||
setprop("/controls/engines/engine[0]/starter", 0);
|
setprop("controls/engines/engine[0]/starter", 0);
|
||||||
setprop("/controls/engines/engine[0]/cutoff", 1);
|
setprop("controls/engines/engine[0]/cutoff", 1);
|
||||||
setprop("/systems/pneumatic/eng1-starter", 0);
|
setprop("systems/pneumatic/eng1-starter", 0);
|
||||||
setprop("/engines/engine[0]/state", 0);
|
setprop("engines/engine[0]/state", 0);
|
||||||
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
|
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
|
||||||
}
|
}
|
||||||
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
|
if (getprop("engines/engine[1]/state") == 1 or getprop("engines/engine[1]/state") == 2) {
|
||||||
setprop("/controls/engines/engine[1]/starter", 0);
|
setprop("controls/engines/engine[1]/starter", 0);
|
||||||
setprop("/controls/engines/engine[1]/cutoff", 1);
|
setprop("controls/engines/engine[1]/cutoff", 1);
|
||||||
setprop("/systems/pneumatic/eng2-starter", 0);
|
setprop("systems/pneumatic/eng2-starter", 0);
|
||||||
setprop("/engines/engine[1]/state", 0);
|
setprop("engines/engine[1]/state", 0);
|
||||||
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
|
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
||||||
|
|
||||||
if (getprop("/options/eng") == "IAE") {
|
if (getprop("options/eng") == "IAE") {
|
||||||
io.include("engines-iae.nas");
|
io.include("engines-iae.nas");
|
||||||
} else {
|
} else {
|
||||||
io.include("engines-cfm.nas");
|
io.include("engines-cfm.nas");
|
||||||
|
@ -13,36 +13,36 @@ var spinup_time = 49;
|
||||||
var apu_max = 100;
|
var apu_max = 100;
|
||||||
var apu_egt_min = 352;
|
var apu_egt_min = 352;
|
||||||
var apu_egt_max = 704;
|
var apu_egt_max = 704;
|
||||||
setprop("/systems/apu/rpm", 0);
|
setprop("systems/apu/rpm", 0);
|
||||||
setprop("/systems/apu/egt", 42);
|
setprop("systems/apu/egt", 42);
|
||||||
setprop("/systems/apu/bleed-used", 0);
|
setprop("systems/apu/bleed-used", 0);
|
||||||
setprop("/systems/apu/bleed-counting", 0);
|
setprop("systems/apu/bleed-counting", 0);
|
||||||
setprop("/systems/apu/bleed-time", 0);
|
setprop("systems/apu/bleed-time", 0);
|
||||||
|
|
||||||
var eng_common_init = func {
|
var eng_common_init = func {
|
||||||
setprop("/systems/apu/bleed-used", 0);
|
setprop("systems/apu/bleed-used", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start APU
|
# Start APU
|
||||||
setlistener("/controls/APU/start", func {
|
setlistener("/controls/APU/start", func {
|
||||||
if (getprop("/controls/APU/master") == 1 and getprop("/controls/APU/start") == 1) {
|
if (getprop("controls/APU/master") == 1 and getprop("controls/APU/start") == 1) {
|
||||||
apuBleedChk.stop();
|
apuBleedChk.stop();
|
||||||
setprop("/systems/apu/bleed-counting", 0);
|
setprop("systems/apu/bleed-counting", 0);
|
||||||
if (getprop("/systems/acconfig/autoconfig-running") == 0) {
|
if (getprop("systems/acconfig/autoconfig-running") == 0) {
|
||||||
interpolate("/systems/apu/rpm", apu_max, spinup_time);
|
interpolate("/systems/apu/rpm", apu_max, spinup_time);
|
||||||
apu_egt_check.start();
|
apu_egt_check.start();
|
||||||
} else if (getprop("/systems/acconfig/autoconfig-running") == 1) {
|
} else if (getprop("systems/acconfig/autoconfig-running") == 1) {
|
||||||
interpolate("/systems/apu/rpm", apu_max, 5);
|
interpolate("/systems/apu/rpm", apu_max, 5);
|
||||||
interpolate("/systems/apu/egt", apu_egt_min, 5);
|
interpolate("/systems/apu/egt", apu_egt_min, 5);
|
||||||
}
|
}
|
||||||
} else if (getprop("/controls/APU/master") == 0) {
|
} else if (getprop("controls/APU/master") == 0) {
|
||||||
apu_egt_check.stop();
|
apu_egt_check.stop();
|
||||||
apu_stop();
|
apu_stop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var apu_egt_check = maketimer(0.5, func {
|
var apu_egt_check = maketimer(0.5, func {
|
||||||
if (getprop("/systems/apu/rpm") >= 28) {
|
if (getprop("systems/apu/rpm") >= 28) {
|
||||||
apu_egt_check.stop();
|
apu_egt_check.stop();
|
||||||
interpolate("/systems/apu/egt", apu_egt_max, 5);
|
interpolate("/systems/apu/egt", apu_egt_max, 5);
|
||||||
apu_egt2_check.start();
|
apu_egt2_check.start();
|
||||||
|
@ -50,7 +50,7 @@ var apu_egt_check = maketimer(0.5, func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var apu_egt2_check = maketimer(0.5, func {
|
var apu_egt2_check = maketimer(0.5, func {
|
||||||
if (getprop("/systems/apu/egt") >= 701) {
|
if (getprop("systems/apu/egt") >= 701) {
|
||||||
apu_egt2_check.stop();
|
apu_egt2_check.stop();
|
||||||
interpolate("/systems/apu/egt", apu_egt_min, 30);
|
interpolate("/systems/apu/egt", apu_egt_min, 30);
|
||||||
}
|
}
|
||||||
|
@ -58,128 +58,128 @@ var apu_egt2_check = maketimer(0.5, func {
|
||||||
|
|
||||||
# Stop APU
|
# Stop APU
|
||||||
setlistener("/controls/APU/master", func {
|
setlistener("/controls/APU/master", func {
|
||||||
if (getprop("/controls/APU/master") == 0) {
|
if (getprop("controls/APU/master") == 0) {
|
||||||
setprop("/controls/APU/start", 0);
|
setprop("controls/APU/start", 0);
|
||||||
apu_egt_check.stop();
|
apu_egt_check.stop();
|
||||||
apu_egt2_check.stop();
|
apu_egt2_check.stop();
|
||||||
apu_stop();
|
apu_stop();
|
||||||
} else if (getprop("/controls/APU/master") == 1) {
|
} else if (getprop("controls/APU/master") == 1) {
|
||||||
apuBleedChk.stop();
|
apuBleedChk.stop();
|
||||||
setprop("/systems/apu/bleed-counting", 0);
|
setprop("systems/apu/bleed-counting", 0);
|
||||||
setprop("/systems/apu/bleed-used", 0);
|
setprop("systems/apu/bleed-used", 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var apu_stop = func {
|
var apu_stop = func {
|
||||||
if (getprop("/systems/apu/bleed-used") == 1 and getprop("/systems/apu/bleed-counting") != 1 and getprop("/systems/acconfig/autoconfig-running") != 1) {
|
if (getprop("systems/apu/bleed-used") == 1 and getprop("systems/apu/bleed-counting") != 1 and getprop("systems/acconfig/autoconfig-running") != 1) {
|
||||||
setprop("/systems/apu/bleed-counting", 1);
|
setprop("systems/apu/bleed-counting", 1);
|
||||||
setprop("/systems/apu/bleed-time", getprop("/sim/time/elapsed-sec"));
|
setprop("systems/apu/bleed-time", getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
if (getprop("/systems/apu/bleed-used") == 1 and getprop("/systems/apu/bleed-counting") == 1 and getprop("/systems/acconfig/autoconfig-running") != 1) {
|
if (getprop("systems/apu/bleed-used") == 1 and getprop("systems/apu/bleed-counting") == 1 and getprop("systems/acconfig/autoconfig-running") != 1) {
|
||||||
apuBleedChk.start();
|
apuBleedChk.start();
|
||||||
} else {
|
} else {
|
||||||
apuBleedChk.stop();
|
apuBleedChk.stop();
|
||||||
interpolate("/systems/apu/rpm", 0, 30);
|
interpolate("/systems/apu/rpm", 0, 30);
|
||||||
interpolate("/systems/apu/egt", 42, 40);
|
interpolate("/systems/apu/egt", 42, 40);
|
||||||
setprop("/systems/apu/bleed-counting", 0);
|
setprop("systems/apu/bleed-counting", 0);
|
||||||
setprop("/systems/apu/bleed-used", 0);
|
setprop("systems/apu/bleed-used", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var apuBleedChk = maketimer(0.1, func {
|
var apuBleedChk = maketimer(0.1, func {
|
||||||
if (getprop("/systems/apu/bleed-used") == 1 and getprop("/systems/apu/bleed-counting") == 1) {
|
if (getprop("systems/apu/bleed-used") == 1 and getprop("systems/apu/bleed-counting") == 1) {
|
||||||
if (getprop("/systems/apu/bleed-time") + 60 <= getprop("/sim/time/elapsed-sec")) {
|
if (getprop("systems/apu/bleed-time") + 60 <= getprop("sim/time/elapsed-sec")) {
|
||||||
apuBleedChk.stop();
|
apuBleedChk.stop();
|
||||||
interpolate("/systems/apu/rpm", 0, 30);
|
interpolate("/systems/apu/rpm", 0, 30);
|
||||||
interpolate("/systems/apu/egt", 42, 40);
|
interpolate("/systems/apu/egt", 42, 40);
|
||||||
setprop("/systems/apu/bleed-counting", 0);
|
setprop("systems/apu/bleed-counting", 0);
|
||||||
setprop("/systems/apu/bleed-used", 0);
|
setprop("systems/apu/bleed-used", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
# Various Other Stuff
|
# Various Other Stuff
|
||||||
var doIdleThrust = func {
|
var doIdleThrust = func {
|
||||||
setprop("/controls/engines/engine[0]/throttle", 0.0);
|
setprop("controls/engines/engine[0]/throttle", 0.0);
|
||||||
setprop("/controls/engines/engine[1]/throttle", 0.0);
|
setprop("controls/engines/engine[1]/throttle", 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
var doCLThrust = func {
|
var doCLThrust = func {
|
||||||
setprop("/controls/engines/engine[0]/throttle", 0.63);
|
setprop("controls/engines/engine[0]/throttle", 0.63);
|
||||||
setprop("/controls/engines/engine[1]/throttle", 0.63);
|
setprop("controls/engines/engine[1]/throttle", 0.63);
|
||||||
}
|
}
|
||||||
|
|
||||||
var doMCTThrust = func {
|
var doMCTThrust = func {
|
||||||
setprop("/controls/engines/engine[0]/throttle", 0.8);
|
setprop("controls/engines/engine[0]/throttle", 0.8);
|
||||||
setprop("/controls/engines/engine[1]/throttle", 0.8);
|
setprop("controls/engines/engine[1]/throttle", 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
var doTOGAThrust = func {
|
var doTOGAThrust = func {
|
||||||
setprop("/controls/engines/engine[0]/throttle", 1.0);
|
setprop("controls/engines/engine[0]/throttle", 1.0);
|
||||||
setprop("/controls/engines/engine[1]/throttle", 1.0);
|
setprop("controls/engines/engine[1]/throttle", 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Reverse Thrust System
|
# Reverse Thrust System
|
||||||
var toggleFastRevThrust = func {
|
var toggleFastRevThrust = func {
|
||||||
var state1 = getprop("/systems/thrust/state1");
|
var state1 = getprop("systems/thrust/state1");
|
||||||
var state2 = getprop("/systems/thrust/state2");
|
var state2 = getprop("systems/thrust/state2");
|
||||||
if (state1 == "IDLE" and state2 == "IDLE" and getprop("/controls/engines/engine[0]/reverser") == "0" and getprop("/controls/engines/engine[1]/reverser") == "0" and getprop("/gear/gear[1]/wow") == 1 and getprop("/gear/gear[2]/wow") == 1) {
|
if (state1 == "IDLE" and state2 == "IDLE" and getprop("controls/engines/engine[0]/reverser") == "0" and getprop("controls/engines/engine[1]/reverser") == "0" and getprop("gear/gear[1]/wow") == 1 and getprop("gear/gear[2]/wow") == 1) {
|
||||||
interpolate("/engines/engine[0]/reverser-pos-norm", 1, 1.4);
|
interpolate("/engines/engine[0]/reverser-pos-norm", 1, 1.4);
|
||||||
interpolate("/engines/engine[1]/reverser-pos-norm", 1, 1.4);
|
interpolate("/engines/engine[1]/reverser-pos-norm", 1, 1.4);
|
||||||
setprop("/controls/engines/engine[0]/reverser", 1);
|
setprop("controls/engines/engine[0]/reverser", 1);
|
||||||
setprop("/controls/engines/engine[1]/reverser", 1);
|
setprop("controls/engines/engine[1]/reverser", 1);
|
||||||
setprop("/controls/engines/engine[0]/throttle-rev", 0.65);
|
setprop("controls/engines/engine[0]/throttle-rev", 0.65);
|
||||||
setprop("/controls/engines/engine[1]/throttle-rev", 0.65);
|
setprop("controls/engines/engine[1]/throttle-rev", 0.65);
|
||||||
setprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 3.14);
|
setprop("fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 3.14);
|
||||||
setprop("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 3.14);
|
setprop("fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 3.14);
|
||||||
} else if ((getprop("/controls/engines/engine[0]/reverser") == "1") or (getprop("/controls/engines/engine[1]/reverser") == "1") and (getprop("/gear/gear[1]/wow") == 1) and (getprop("/gear/gear[2]/wow") == 1)) {
|
} else if ((getprop("controls/engines/engine[0]/reverser") == "1") or (getprop("controls/engines/engine[1]/reverser") == "1") and (getprop("gear/gear[1]/wow") == 1) and (getprop("gear/gear[2]/wow") == 1)) {
|
||||||
setprop("/controls/engines/engine[0]/throttle-rev", 0);
|
setprop("controls/engines/engine[0]/throttle-rev", 0);
|
||||||
setprop("/controls/engines/engine[1]/throttle-rev", 0);
|
setprop("controls/engines/engine[1]/throttle-rev", 0);
|
||||||
interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
|
interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
|
||||||
interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
|
interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
|
||||||
setprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 0);
|
setprop("fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 0);
|
||||||
setprop("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 0);
|
setprop("fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 0);
|
||||||
setprop("/controls/engines/engine[0]/reverser", 0);
|
setprop("controls/engines/engine[0]/reverser", 0);
|
||||||
setprop("/controls/engines/engine[1]/reverser", 0);
|
setprop("controls/engines/engine[1]/reverser", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var doRevThrust = func {
|
var doRevThrust = func {
|
||||||
if (getprop("/controls/engines/engine[0]/reverser") == "1" and getprop("/controls/engines/engine[1]/reverser") == "1" and getprop("/gear/gear[1]/wow") == 1 and getprop("/gear/gear[2]/wow") == 1) {
|
if (getprop("controls/engines/engine[0]/reverser") == "1" and getprop("controls/engines/engine[1]/reverser") == "1" and getprop("gear/gear[1]/wow") == 1 and getprop("gear/gear[2]/wow") == 1) {
|
||||||
var pos1 = getprop("/controls/engines/engine[0]/throttle-rev");
|
var pos1 = getprop("controls/engines/engine[0]/throttle-rev");
|
||||||
var pos2 = getprop("/controls/engines/engine[1]/throttle-rev");
|
var pos2 = getprop("controls/engines/engine[1]/throttle-rev");
|
||||||
if (pos1 < 0.649) {
|
if (pos1 < 0.649) {
|
||||||
setprop("/controls/engines/engine[0]/throttle-rev", pos1 + 0.15);
|
setprop("controls/engines/engine[0]/throttle-rev", pos1 + 0.15);
|
||||||
}
|
}
|
||||||
if (pos2 < 0.649) {
|
if (pos2 < 0.649) {
|
||||||
setprop("/controls/engines/engine[1]/throttle-rev", pos2 + 0.15);
|
setprop("controls/engines/engine[1]/throttle-rev", pos2 + 0.15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var state1 = getprop("/systems/thrust/state1");
|
var state1 = getprop("systems/thrust/state1");
|
||||||
var state2 = getprop("/systems/thrust/state2");
|
var state2 = getprop("systems/thrust/state2");
|
||||||
if (state1 == "IDLE" and state2 == "IDLE" and getprop("/controls/engines/engine[0]/reverser") == "0" and getprop("/controls/engines/engine[1]/reverser") == "0" and getprop("/gear/gear[1]/wow") == 1 and getprop("/gear/gear[2]/wow") == 1) {
|
if (state1 == "IDLE" and state2 == "IDLE" and getprop("controls/engines/engine[0]/reverser") == "0" and getprop("controls/engines/engine[1]/reverser") == "0" and getprop("gear/gear[1]/wow") == 1 and getprop("gear/gear[2]/wow") == 1) {
|
||||||
setprop("/controls/engines/engine[0]/throttle-rev", 0.05);
|
setprop("controls/engines/engine[0]/throttle-rev", 0.05);
|
||||||
setprop("/controls/engines/engine[1]/throttle-rev", 0.05);
|
setprop("controls/engines/engine[1]/throttle-rev", 0.05);
|
||||||
interpolate("/engines/engine[0]/reverser-pos-norm", 1, 1.4);
|
interpolate("/engines/engine[0]/reverser-pos-norm", 1, 1.4);
|
||||||
interpolate("/engines/engine[1]/reverser-pos-norm", 1, 1.4);
|
interpolate("/engines/engine[1]/reverser-pos-norm", 1, 1.4);
|
||||||
setprop("/controls/engines/engine[0]/reverser", 1);
|
setprop("controls/engines/engine[0]/reverser", 1);
|
||||||
setprop("/controls/engines/engine[1]/reverser", 1);
|
setprop("controls/engines/engine[1]/reverser", 1);
|
||||||
setprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 3.14);
|
setprop("fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 3.14);
|
||||||
setprop("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 3.14);
|
setprop("fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 3.14);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var unRevThrust = func {
|
var unRevThrust = func {
|
||||||
if (getprop("/controls/engines/engine[0]/reverser") == "1" or getprop("/controls/engines/engine[1]/reverser") == "1") {
|
if (getprop("controls/engines/engine[0]/reverser") == "1" or getprop("controls/engines/engine[1]/reverser") == "1") {
|
||||||
var pos1 = getprop("/controls/engines/engine[0]/throttle-rev");
|
var pos1 = getprop("controls/engines/engine[0]/throttle-rev");
|
||||||
var pos2 = getprop("/controls/engines/engine[1]/throttle-rev");
|
var pos2 = getprop("controls/engines/engine[1]/throttle-rev");
|
||||||
if (pos1 > 0.051) {
|
if (pos1 > 0.051) {
|
||||||
setprop("/controls/engines/engine[0]/throttle-rev", pos1 - 0.15);
|
setprop("controls/engines/engine[0]/throttle-rev", pos1 - 0.15);
|
||||||
} else {
|
} else {
|
||||||
unRevThrust_b();
|
unRevThrust_b();
|
||||||
}
|
}
|
||||||
if (pos2 > 0.051) {
|
if (pos2 > 0.051) {
|
||||||
setprop("/controls/engines/engine[1]/throttle-rev", pos2 - 0.15);
|
setprop("controls/engines/engine[1]/throttle-rev", pos2 - 0.15);
|
||||||
} else {
|
} else {
|
||||||
unRevThrust_b();
|
unRevThrust_b();
|
||||||
}
|
}
|
||||||
|
@ -187,12 +187,12 @@ var unRevThrust = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
var unRevThrust_b = func {
|
var unRevThrust_b = func {
|
||||||
setprop("/controls/engines/engine[0]/throttle-rev", 0);
|
setprop("controls/engines/engine[0]/throttle-rev", 0);
|
||||||
setprop("/controls/engines/engine[1]/throttle-rev", 0);
|
setprop("controls/engines/engine[1]/throttle-rev", 0);
|
||||||
interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
|
interpolate("/engines/engine[0]/reverser-pos-norm", 0, 1.0);
|
||||||
interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
|
interpolate("/engines/engine[1]/reverser-pos-norm", 0, 1.0);
|
||||||
setprop("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 0);
|
setprop("fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad", 0);
|
||||||
setprop("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 0);
|
setprop("fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad", 0);
|
||||||
setprop("/controls/engines/engine[0]/reverser", 0);
|
setprop("controls/engines/engine[0]/reverser", 0);
|
||||||
setprop("/controls/engines/engine[1]/reverser", 0);
|
setprop("controls/engines/engine[1]/reverser", 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# Initializing Vars #
|
# Initializing Vars #
|
||||||
#####################
|
#####################
|
||||||
|
|
||||||
var engines = props.globals.getNode("/engines").getChildren("engine");
|
var engines = props.globals.getNode("engines").getChildren("engine");
|
||||||
var egt_min = 434;
|
var egt_min = 434;
|
||||||
var egt_start = 587;
|
var egt_start = 587;
|
||||||
var egt_max = 712;
|
var egt_max = 712;
|
||||||
|
@ -17,34 +17,34 @@ var egt_lightdn_time = 10;
|
||||||
var shutdown_time = 20;
|
var shutdown_time = 20;
|
||||||
var egt_shutdown_time = 20;
|
var egt_shutdown_time = 20;
|
||||||
|
|
||||||
setprop("/controls/engines/engine[0]/reverser", 0);
|
setprop("controls/engines/engine[0]/reverser", 0);
|
||||||
setprop("/controls/engines/engine[1]/reverser", 0);
|
setprop("controls/engines/engine[1]/reverser", 0);
|
||||||
setprop("/controls/engines/engine[0]/igniter-a", 0);
|
setprop("controls/engines/engine[0]/igniter-a", 0);
|
||||||
setprop("/controls/engines/engine[1]/igniter-a", 0);
|
setprop("controls/engines/engine[1]/igniter-a", 0);
|
||||||
setprop("/controls/engines/engine[0]/igniter-b", 0);
|
setprop("controls/engines/engine[0]/igniter-b", 0);
|
||||||
setprop("/controls/engines/engine[1]/igniter-b", 0);
|
setprop("controls/engines/engine[1]/igniter-b", 0);
|
||||||
setprop("/controls/engines/engine[0]/last-igniter", "B");
|
setprop("controls/engines/engine[0]/last-igniter", "B");
|
||||||
setprop("/controls/engines/engine[1]/last-igniter", "B");
|
setprop("controls/engines/engine[1]/last-igniter", "B");
|
||||||
|
|
||||||
var eng_init = func {
|
var eng_init = func {
|
||||||
setprop("/controls/engines/engine[0]/man-start", 0);
|
setprop("controls/engines/engine[0]/man-start", 0);
|
||||||
setprop("/controls/engines/engine[1]/man-start", 0);
|
setprop("controls/engines/engine[1]/man-start", 0);
|
||||||
eng_common_init();
|
eng_common_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
# Trigger Startups and Stops
|
# Trigger Startups and Stops
|
||||||
setlistener("/controls/engines/engine[0]/cutoff-switch", func {
|
setlistener("/controls/engines/engine[0]/cutoff-switch", func {
|
||||||
if (getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
|
if (getprop("controls/engines/engine[0]/cutoff-switch") == 0) {
|
||||||
if (getprop("/systems/acconfig/autoconfig-running") == 1) {
|
if (getprop("systems/acconfig/autoconfig-running") == 1) {
|
||||||
fast_start_one();
|
fast_start_one();
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/controls/engines/engine[0]/man-start") == 0) {
|
if (getprop("controls/engines/engine[0]/man-start") == 0) {
|
||||||
start_one_check();
|
start_one_check();
|
||||||
} else if (getprop("/controls/engines/engine[0]/man-start") == 1) {
|
} else if (getprop("controls/engines/engine[0]/man-start") == 1) {
|
||||||
eng_one_man_start.start();
|
eng_one_man_start.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (getprop("/controls/engines/engine[0]/cutoff-switch") == 1) {
|
} else if (getprop("controls/engines/engine[0]/cutoff-switch") == 1) {
|
||||||
cutoff_one();
|
cutoff_one();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -53,29 +53,29 @@ var cutoff_one = func {
|
||||||
eng_one_auto_start.stop();
|
eng_one_auto_start.stop();
|
||||||
eng_one_man_start.stop();
|
eng_one_man_start.stop();
|
||||||
eng_one_n2_check.stop();
|
eng_one_n2_check.stop();
|
||||||
setprop("/controls/engines/engine[0]/igniter-a", 0);
|
setprop("controls/engines/engine[0]/igniter-a", 0);
|
||||||
setprop("/controls/engines/engine[0]/igniter-b", 0);
|
setprop("controls/engines/engine[0]/igniter-b", 0);
|
||||||
setprop("/controls/engines/engine[0]/man-start", 0);
|
setprop("controls/engines/engine[0]/man-start", 0);
|
||||||
setprop("/systems/pneumatic/eng1-starter", 0);
|
setprop("systems/pneumatic/eng1-starter", 0);
|
||||||
setprop("/controls/engines/engine[0]/starter", 0);
|
setprop("controls/engines/engine[0]/starter", 0);
|
||||||
setprop("/controls/engines/engine[0]/cutoff", 1);
|
setprop("controls/engines/engine[0]/cutoff", 1);
|
||||||
setprop("/engines/engine[0]/state", 0);
|
setprop("engines/engine[0]/state", 0);
|
||||||
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
|
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
|
||||||
eng_one_n2_check.stop();
|
eng_one_n2_check.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
var fast_start_one = func {
|
var fast_start_one = func {
|
||||||
setprop("/controls/engines/engine[0]/cutoff", 0);
|
setprop("controls/engines/engine[0]/cutoff", 0);
|
||||||
setprop("/engines/engine[0]/out-of-fuel", 0);
|
setprop("engines/engine[0]/out-of-fuel", 0);
|
||||||
setprop("/engines/engine[0]/run", 1);
|
setprop("engines/engine[0]/run", 1);
|
||||||
|
|
||||||
setprop("/engines/engine[0]/cutoff", 0);
|
setprop("engines/engine[0]/cutoff", 0);
|
||||||
setprop("/engines/engine[0]/starter", 0);
|
setprop("engines/engine[0]/starter", 0);
|
||||||
|
|
||||||
setprop("/fdm/jsbsim/propulsion/set-running", 0);
|
setprop("fdm/jsbsim/propulsion/set-running", 0);
|
||||||
|
|
||||||
setprop("/engines/engine[0]/state", 3);
|
setprop("engines/engine[0]/state", 3);
|
||||||
setprop("/systems/pneumatic/eng1-starter", 0);
|
setprop("systems/pneumatic/eng1-starter", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/controls/engines/engine[0]/man-start", func {
|
setlistener("/controls/engines/engine[0]/man-start", func {
|
||||||
|
@ -83,52 +83,52 @@ setlistener("/controls/engines/engine[0]/man-start", func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var start_one_mancheck = func {
|
var start_one_mancheck = func {
|
||||||
if (getprop("/controls/engines/engine[0]/man-start") == 1) {
|
if (getprop("controls/engines/engine[0]/man-start") == 1) {
|
||||||
if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[0]/cutoff-switch") == 1)) {
|
if (getprop("controls/engines/engine-start-switch") == 2 and (getprop("controls/engines/engine[0]/cutoff-switch") == 1)) {
|
||||||
setprop("/systems/pneumatic/eng1-starter", 1);
|
setprop("systems/pneumatic/eng1-starter", 1);
|
||||||
settimer(start_one_mancheck_b, 0.5);
|
settimer(start_one_mancheck_b, 0.5);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
|
if (getprop("engines/engine[0]/state") == 1 or getprop("engines/engine[0]/state") == 2) {
|
||||||
setprop("/systems/pneumatic/eng1-starter", 0);
|
setprop("systems/pneumatic/eng1-starter", 0);
|
||||||
setprop("/engines/engine[0]/state", 0);
|
setprop("engines/engine[0]/state", 0);
|
||||||
setprop("/controls/engines/engine[0]/starter", 0);
|
setprop("controls/engines/engine[0]/starter", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var start_one_mancheck_b = func {
|
var start_one_mancheck_b = func {
|
||||||
if (getprop("/systems/pneumatic/total-psi") >= 28) {
|
if (getprop("systems/pneumatic/total-psi") >= 28) {
|
||||||
setprop("/engines/engine[0]/state", 1);
|
setprop("engines/engine[0]/state", 1);
|
||||||
setprop("/controls/engines/engine[0]/starter", 1);
|
setprop("controls/engines/engine[0]/starter", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var start_one_check = func {
|
var start_one_check = func {
|
||||||
if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[0]/cutoff-switch") == 0) {
|
if (getprop("controls/engines/engine-start-switch") == 2 and getprop("controls/engines/engine[0]/cutoff-switch") == 0) {
|
||||||
setprop("/systems/pneumatic/eng1-starter", 1);
|
setprop("systems/pneumatic/eng1-starter", 1);
|
||||||
settimer(start_one_check_b, 0.5);
|
settimer(start_one_check_b, 0.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var start_one_check_b = func {
|
var start_one_check_b = func {
|
||||||
if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/systems/pneumatic/total-psi") >= 28) and (getprop("/controls/engines/engine[0]/cutoff-switch") == 0)) {
|
if ((getprop("controls/engines/engine-start-switch") == 2) and (getprop("systems/pneumatic/total-psi") >= 28) and (getprop("controls/engines/engine[0]/cutoff-switch") == 0)) {
|
||||||
auto_start_one();
|
auto_start_one();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/controls/engines/engine[1]/cutoff-switch", func {
|
setlistener("/controls/engines/engine[1]/cutoff-switch", func {
|
||||||
if (getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
|
if (getprop("controls/engines/engine[1]/cutoff-switch") == 0) {
|
||||||
if (getprop("/systems/acconfig/autoconfig-running") == 1) {
|
if (getprop("systems/acconfig/autoconfig-running") == 1) {
|
||||||
fast_start_two();
|
fast_start_two();
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/controls/engines/engine[1]/man-start") == 0) {
|
if (getprop("controls/engines/engine[1]/man-start") == 0) {
|
||||||
start_two_check();
|
start_two_check();
|
||||||
} else if (getprop("/controls/engines/engine[1]/man-start") == 1) {
|
} else if (getprop("controls/engines/engine[1]/man-start") == 1) {
|
||||||
eng_two_man_start.start();
|
eng_two_man_start.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (getprop("/controls/engines/engine[1]/cutoff-switch") == 1) {
|
} else if (getprop("controls/engines/engine[1]/cutoff-switch") == 1) {
|
||||||
cutoff_two();
|
cutoff_two();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -137,28 +137,28 @@ var cutoff_two = func {
|
||||||
eng_two_auto_start.stop();
|
eng_two_auto_start.stop();
|
||||||
eng_two_man_start.stop();
|
eng_two_man_start.stop();
|
||||||
eng_two_n2_check.stop();
|
eng_two_n2_check.stop();
|
||||||
setprop("/controls/engines/engine[1]/igniter-a", 0);
|
setprop("controls/engines/engine[1]/igniter-a", 0);
|
||||||
setprop("/controls/engines/engine[1]/igniter-b", 0);
|
setprop("controls/engines/engine[1]/igniter-b", 0);
|
||||||
setprop("/controls/engines/engine[1]/man-start", 0);
|
setprop("controls/engines/engine[1]/man-start", 0);
|
||||||
setprop("/systems/pneumatic/eng2-starter", 0);
|
setprop("systems/pneumatic/eng2-starter", 0);
|
||||||
setprop("/controls/engines/engine[1]/starter", 0);
|
setprop("controls/engines/engine[1]/starter", 0);
|
||||||
setprop("/controls/engines/engine[1]/cutoff", 1);
|
setprop("controls/engines/engine[1]/cutoff", 1);
|
||||||
setprop("/engines/engine[1]/state", 0);
|
setprop("engines/engine[1]/state", 0);
|
||||||
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
|
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
var fast_start_two = func {
|
var fast_start_two = func {
|
||||||
setprop("/controls/engines/engine[1]/cutoff", 0);
|
setprop("controls/engines/engine[1]/cutoff", 0);
|
||||||
setprop("/engines/engine[1]/out-of-fuel", 0);
|
setprop("engines/engine[1]/out-of-fuel", 0);
|
||||||
setprop("/engines/engine[1]/run", 1);
|
setprop("engines/engine[1]/run", 1);
|
||||||
|
|
||||||
setprop("/engines/engine[1]/cutoff", 0);
|
setprop("engines/engine[1]/cutoff", 0);
|
||||||
setprop("/engines/engine[1]/starter", 0);
|
setprop("engines/engine[1]/starter", 0);
|
||||||
|
|
||||||
setprop("/fdm/jsbsim/propulsion/set-running", 1);
|
setprop("fdm/jsbsim/propulsion/set-running", 1);
|
||||||
|
|
||||||
setprop("/engines/engine[1]/state", 3);
|
setprop("engines/engine[1]/state", 3);
|
||||||
setprop("/systems/pneumatic/eng2-starter", 0);
|
setprop("systems/pneumatic/eng2-starter", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/controls/engines/engine[1]/man-start", func {
|
setlistener("/controls/engines/engine[1]/man-start", func {
|
||||||
|
@ -166,60 +166,60 @@ setlistener("/controls/engines/engine[1]/man-start", func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var start_two_mancheck = func {
|
var start_two_mancheck = func {
|
||||||
if (getprop("/controls/engines/engine[1]/man-start") == 1) {
|
if (getprop("controls/engines/engine[1]/man-start") == 1) {
|
||||||
if (getprop("/controls/engines/engine-start-switch") == 2 and (getprop("/controls/engines/engine[1]/cutoff-switch") == 1)) {
|
if (getprop("controls/engines/engine-start-switch") == 2 and (getprop("controls/engines/engine[1]/cutoff-switch") == 1)) {
|
||||||
setprop("/systems/pneumatic/eng2-starter", 1);
|
setprop("systems/pneumatic/eng2-starter", 1);
|
||||||
settimer(start_two_mancheck_b, 0.5);
|
settimer(start_two_mancheck_b, 0.5);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
|
if (getprop("engines/engine[1]/state") == 1 or getprop("engines/engine[1]/state") == 2) {
|
||||||
setprop("/systems/pneumatic/eng2-starter", 0);
|
setprop("systems/pneumatic/eng2-starter", 0);
|
||||||
setprop("/engines/engine[1]/state", 0);
|
setprop("engines/engine[1]/state", 0);
|
||||||
setprop("/controls/engines/engine[1]/starter", 0);
|
setprop("controls/engines/engine[1]/starter", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var start_two_mancheck_b = func {
|
var start_two_mancheck_b = func {
|
||||||
if (getprop("/systems/pneumatic/total-psi") >= 28) {
|
if (getprop("systems/pneumatic/total-psi") >= 28) {
|
||||||
setprop("/engines/engine[1]/state", 1);
|
setprop("engines/engine[1]/state", 1);
|
||||||
setprop("/controls/engines/engine[1]/starter", 1);
|
setprop("controls/engines/engine[1]/starter", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var start_two_check = func {
|
var start_two_check = func {
|
||||||
if (getprop("/controls/engines/engine-start-switch") == 2 and getprop("/controls/engines/engine[1]/cutoff-switch") == 0) {
|
if (getprop("controls/engines/engine-start-switch") == 2 and getprop("controls/engines/engine[1]/cutoff-switch") == 0) {
|
||||||
setprop("/systems/pneumatic/eng2-starter", 1);
|
setprop("systems/pneumatic/eng2-starter", 1);
|
||||||
settimer(start_two_check_b, 0.5);
|
settimer(start_two_check_b, 0.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var start_two_check_b = func {
|
var start_two_check_b = func {
|
||||||
if ((getprop("/controls/engines/engine-start-switch") == 2) and (getprop("/systems/pneumatic/total-psi") >= 28) and (getprop("/controls/engines/engine[1]/cutoff-switch") == 0)) {
|
if ((getprop("controls/engines/engine-start-switch") == 2) and (getprop("systems/pneumatic/total-psi") >= 28) and (getprop("controls/engines/engine[1]/cutoff-switch") == 0)) {
|
||||||
auto_start_two();
|
auto_start_two();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start Engine One
|
# Start Engine One
|
||||||
var auto_start_one = func {
|
var auto_start_one = func {
|
||||||
setprop("/engines/engine[0]/state", 1);
|
setprop("engines/engine[0]/state", 1);
|
||||||
setprop("/controls/engines/engine[0]/starter", 1);
|
setprop("controls/engines/engine[0]/starter", 1);
|
||||||
eng_one_auto_start.start();
|
eng_one_auto_start.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
var eng_one_auto_start = maketimer(0.5, func {
|
var eng_one_auto_start = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[0]/n1-actual") >= 4.7) {
|
if (getprop("engines/engine[0]/n1-actual") >= 4.7) {
|
||||||
eng_one_auto_start.stop();
|
eng_one_auto_start.stop();
|
||||||
setprop("/engines/engine[0]/state", 2);
|
setprop("engines/engine[0]/state", 2);
|
||||||
setprop("/controls/engines/engine[0]/cutoff", 0);
|
setprop("controls/engines/engine[0]/cutoff", 0);
|
||||||
if (getprop("/controls/engines/engine[0]/last-igniter") == "B") {
|
if (getprop("controls/engines/engine[0]/last-igniter") == "B") {
|
||||||
setprop("/controls/engines/engine[0]/igniter-a", 1);
|
setprop("controls/engines/engine[0]/igniter-a", 1);
|
||||||
setprop("/controls/engines/engine[0]/igniter-b", 0);
|
setprop("controls/engines/engine[0]/igniter-b", 0);
|
||||||
setprop("/controls/engines/engine[0]/last-igniter", "A");
|
setprop("controls/engines/engine[0]/last-igniter", "A");
|
||||||
} else if (getprop("/controls/engines/engine[0]/last-igniter") == "A") {
|
} else if (getprop("controls/engines/engine[0]/last-igniter") == "A") {
|
||||||
setprop("/controls/engines/engine[0]/igniter-a", 0);
|
setprop("controls/engines/engine[0]/igniter-a", 0);
|
||||||
setprop("/controls/engines/engine[0]/igniter-b", 1);
|
setprop("controls/engines/engine[0]/igniter-b", 1);
|
||||||
setprop("/controls/engines/engine[0]/last-igniter", "B");
|
setprop("controls/engines/engine[0]/last-igniter", "B");
|
||||||
}
|
}
|
||||||
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
|
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
|
||||||
eng_one_egt_check.start();
|
eng_one_egt_check.start();
|
||||||
|
@ -228,12 +228,12 @@ var eng_one_auto_start = maketimer(0.5, func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var eng_one_man_start = maketimer(0.5, func {
|
var eng_one_man_start = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[0]/n2-actual") >= 16.7) {
|
if (getprop("engines/engine[0]/n2-actual") >= 16.7) {
|
||||||
eng_one_man_start.stop();
|
eng_one_man_start.stop();
|
||||||
setprop("/engines/engine[0]/state", 2);
|
setprop("engines/engine[0]/state", 2);
|
||||||
setprop("/controls/engines/engine[0]/cutoff", 0);
|
setprop("controls/engines/engine[0]/cutoff", 0);
|
||||||
setprop("/controls/engines/engine[0]/igniter-a", 1);
|
setprop("controls/engines/engine[0]/igniter-a", 1);
|
||||||
setprop("/controls/engines/engine[0]/igniter-b", 1);
|
setprop("controls/engines/engine[0]/igniter-b", 1);
|
||||||
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
|
interpolate(engines[0].getNode("egt-actual"), egt_start, egt_lightup_time);
|
||||||
eng_one_egt_check.start();
|
eng_one_egt_check.start();
|
||||||
eng_one_n2_check.start();
|
eng_one_n2_check.start();
|
||||||
|
@ -241,48 +241,48 @@ var eng_one_man_start = maketimer(0.5, func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var eng_one_egt_check = maketimer(0.5, func {
|
var eng_one_egt_check = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[0]/egt-actual") >= egt_start) {
|
if (getprop("engines/engine[0]/egt-actual") >= egt_start) {
|
||||||
eng_one_egt_check.stop();
|
eng_one_egt_check.stop();
|
||||||
interpolate(engines[0].getNode("egt-actual"), egt_min, egt_lightdn_time);
|
interpolate(engines[0].getNode("egt-actual"), egt_min, egt_lightdn_time);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var eng_one_n2_check = maketimer(0.5, func {
|
var eng_one_n2_check = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[0]/n2-actual") >= 43.0) {
|
if (getprop("engines/engine[0]/n2-actual") >= 43.0) {
|
||||||
if (getprop("/controls/engines/engine[0]/igniter-a") != 0) {
|
if (getprop("controls/engines/engine[0]/igniter-a") != 0) {
|
||||||
setprop("/controls/engines/engine[0]/igniter-a", 0);
|
setprop("controls/engines/engine[0]/igniter-a", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/controls/engines/engine[0]/igniter-b") != 0) {
|
if (getprop("controls/engines/engine[0]/igniter-b") != 0) {
|
||||||
setprop("/controls/engines/engine[0]/igniter-b", 0);
|
setprop("controls/engines/engine[0]/igniter-b", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (getprop("/engines/engine[0]/n2-actual") >= 57.0) {
|
if (getprop("engines/engine[0]/n2-actual") >= 57.0) {
|
||||||
eng_one_n2_check.stop();
|
eng_one_n2_check.stop();
|
||||||
setprop("/systems/pneumatic/eng1-starter", 0);
|
setprop("systems/pneumatic/eng1-starter", 0);
|
||||||
setprop("/engines/engine[0]/state", 3);
|
setprop("engines/engine[0]/state", 3);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
# Start Engine Two
|
# Start Engine Two
|
||||||
var auto_start_two = func {
|
var auto_start_two = func {
|
||||||
setprop("/engines/engine[1]/state", 1);
|
setprop("engines/engine[1]/state", 1);
|
||||||
setprop("/controls/engines/engine[1]/starter", 1);
|
setprop("controls/engines/engine[1]/starter", 1);
|
||||||
eng_two_auto_start.start();
|
eng_two_auto_start.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
var eng_two_auto_start = maketimer(0.5, func {
|
var eng_two_auto_start = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[1]/n1-actual") >= 4.7) {
|
if (getprop("engines/engine[1]/n1-actual") >= 4.7) {
|
||||||
eng_two_auto_start.stop();
|
eng_two_auto_start.stop();
|
||||||
setprop("/engines/engine[1]/state", 2);
|
setprop("engines/engine[1]/state", 2);
|
||||||
setprop("/controls/engines/engine[1]/cutoff", 0);
|
setprop("controls/engines/engine[1]/cutoff", 0);
|
||||||
if (getprop("/controls/engines/engine[1]/last-igniter") == "B") {
|
if (getprop("controls/engines/engine[1]/last-igniter") == "B") {
|
||||||
setprop("/controls/engines/engine[1]/igniter-a", 1);
|
setprop("controls/engines/engine[1]/igniter-a", 1);
|
||||||
setprop("/controls/engines/engine[1]/igniter-b", 0);
|
setprop("controls/engines/engine[1]/igniter-b", 0);
|
||||||
setprop("/controls/engines/engine[1]/last-igniter", "A");
|
setprop("controls/engines/engine[1]/last-igniter", "A");
|
||||||
} else if (getprop("/controls/engines/engine[1]/last-igniter") == "A") {
|
} else if (getprop("controls/engines/engine[1]/last-igniter") == "A") {
|
||||||
setprop("/controls/engines/engine[1]/igniter-a", 0);
|
setprop("controls/engines/engine[1]/igniter-a", 0);
|
||||||
setprop("/controls/engines/engine[1]/igniter-b", 1);
|
setprop("controls/engines/engine[1]/igniter-b", 1);
|
||||||
setprop("/controls/engines/engine[1]/last-igniter", "B");
|
setprop("controls/engines/engine[1]/last-igniter", "B");
|
||||||
}
|
}
|
||||||
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
|
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
|
||||||
eng_two_egt_check.start();
|
eng_two_egt_check.start();
|
||||||
|
@ -291,12 +291,12 @@ var eng_two_auto_start = maketimer(0.5, func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var eng_two_man_start = maketimer(0.5, func {
|
var eng_two_man_start = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[1]/n2-actual") >= 16.7) {
|
if (getprop("engines/engine[1]/n2-actual") >= 16.7) {
|
||||||
eng_two_man_start.stop();
|
eng_two_man_start.stop();
|
||||||
setprop("/engines/engine[1]/state", 2);
|
setprop("engines/engine[1]/state", 2);
|
||||||
setprop("/controls/engines/engine[1]/cutoff", 0);
|
setprop("controls/engines/engine[1]/cutoff", 0);
|
||||||
setprop("/controls/engines/engine[1]/igniter-a", 1);
|
setprop("controls/engines/engine[1]/igniter-a", 1);
|
||||||
setprop("/controls/engines/engine[1]/igniter-b", 1);
|
setprop("controls/engines/engine[1]/igniter-b", 1);
|
||||||
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
|
interpolate(engines[1].getNode("egt-actual"), egt_start, egt_lightup_time);
|
||||||
eng_two_egt_check.start();
|
eng_two_egt_check.start();
|
||||||
eng_two_n2_check.start();
|
eng_two_n2_check.start();
|
||||||
|
@ -304,70 +304,70 @@ var eng_two_man_start = maketimer(0.5, func {
|
||||||
});
|
});
|
||||||
|
|
||||||
var eng_two_egt_check = maketimer(0.5, func {
|
var eng_two_egt_check = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[1]/egt-actual") >= egt_start) {
|
if (getprop("engines/engine[1]/egt-actual") >= egt_start) {
|
||||||
eng_two_egt_check.stop();
|
eng_two_egt_check.stop();
|
||||||
interpolate(engines[1].getNode("egt-actual"), egt_min, egt_lightdn_time);
|
interpolate(engines[1].getNode("egt-actual"), egt_min, egt_lightdn_time);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var eng_two_n2_check = maketimer(0.5, func {
|
var eng_two_n2_check = maketimer(0.5, func {
|
||||||
if (getprop("/engines/engine[1]/n2-actual") >= 43.0) {
|
if (getprop("engines/engine[1]/n2-actual") >= 43.0) {
|
||||||
if (getprop("/controls/engines/engine[1]/igniter-a") != 0) {
|
if (getprop("controls/engines/engine[1]/igniter-a") != 0) {
|
||||||
setprop("/controls/engines/engine[1]/igniter-a", 0);
|
setprop("controls/engines/engine[1]/igniter-a", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/controls/engines/engine[1]/igniter-b") != 0) {
|
if (getprop("controls/engines/engine[1]/igniter-b") != 0) {
|
||||||
setprop("/controls/engines/engine[1]/igniter-b", 0);
|
setprop("controls/engines/engine[1]/igniter-b", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (getprop("/engines/engine[1]/n2-actual") >= 57.0) {
|
if (getprop("engines/engine[1]/n2-actual") >= 57.0) {
|
||||||
eng_two_n2_check.stop();
|
eng_two_n2_check.stop();
|
||||||
setprop("/systems/pneumatic/eng2-starter", 0);
|
setprop("systems/pneumatic/eng2-starter", 0);
|
||||||
setprop("/engines/engine[1]/state", 3);
|
setprop("engines/engine[1]/state", 3);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
# Various Other Stuff
|
# Various Other Stuff
|
||||||
setlistener("/controls/engines/engine-start-switch", func {
|
setlistener("/controls/engines/engine-start-switch", func {
|
||||||
if (getprop("/engines/engine[0]/state") == 0) {
|
if (getprop("engines/engine[0]/state") == 0) {
|
||||||
start_one_check();
|
start_one_check();
|
||||||
start_one_mancheck();
|
start_one_mancheck();
|
||||||
}
|
}
|
||||||
if (getprop("/engines/engine[1]/state") == 0) {
|
if (getprop("engines/engine[1]/state") == 0) {
|
||||||
start_two_check();
|
start_two_check();
|
||||||
start_two_mancheck();
|
start_two_mancheck();
|
||||||
}
|
}
|
||||||
if ((getprop("/controls/engines/engine-start-switch") == 0) or (getprop("/controls/engines/engine-start-switch") == 1)) {
|
if ((getprop("controls/engines/engine-start-switch") == 0) or (getprop("controls/engines/engine-start-switch") == 1)) {
|
||||||
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
|
if (getprop("engines/engine[0]/state") == 1 or getprop("engines/engine[0]/state") == 2) {
|
||||||
setprop("/controls/engines/engine[0]/starter", 0);
|
setprop("controls/engines/engine[0]/starter", 0);
|
||||||
setprop("/controls/engines/engine[0]/cutoff", 1);
|
setprop("controls/engines/engine[0]/cutoff", 1);
|
||||||
setprop("/systems/pneumatic/eng1-starter", 0);
|
setprop("systems/pneumatic/eng1-starter", 0);
|
||||||
setprop("/engines/engine[0]/state", 0);
|
setprop("engines/engine[0]/state", 0);
|
||||||
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
|
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
|
||||||
}
|
}
|
||||||
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
|
if (getprop("engines/engine[1]/state") == 1 or getprop("engines/engine[1]/state") == 2) {
|
||||||
setprop("/controls/engines/engine[1]/starter", 0);
|
setprop("controls/engines/engine[1]/starter", 0);
|
||||||
setprop("/controls/engines/engine[1]/cutoff", 1);
|
setprop("controls/engines/engine[1]/cutoff", 1);
|
||||||
setprop("/systems/pneumatic/eng2-starter", 0);
|
setprop("systems/pneumatic/eng2-starter", 0);
|
||||||
setprop("/engines/engine[1]/state", 0);
|
setprop("engines/engine[1]/state", 0);
|
||||||
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
|
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/systems/pneumatic/start-psi", func {
|
setlistener("/systems/pneumatic/start-psi", func {
|
||||||
if (getprop("/systems/pneumatic/total-psi") < 12) {
|
if (getprop("systems/pneumatic/total-psi") < 12) {
|
||||||
if (getprop("/engines/engine[0]/state") == 1 or getprop("/engines/engine[0]/state") == 2) {
|
if (getprop("engines/engine[0]/state") == 1 or getprop("engines/engine[0]/state") == 2) {
|
||||||
setprop("/controls/engines/engine[0]/starter", 0);
|
setprop("controls/engines/engine[0]/starter", 0);
|
||||||
setprop("/controls/engines/engine[0]/cutoff", 1);
|
setprop("controls/engines/engine[0]/cutoff", 1);
|
||||||
setprop("/systems/pneumatic/eng1-starter", 0);
|
setprop("systems/pneumatic/eng1-starter", 0);
|
||||||
setprop("/engines/engine[0]/state", 0);
|
setprop("engines/engine[0]/state", 0);
|
||||||
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
|
interpolate(engines[0].getNode("egt-actual"), 0, egt_shutdown_time);
|
||||||
}
|
}
|
||||||
if (getprop("/engines/engine[1]/state") == 1 or getprop("/engines/engine[1]/state") == 2) {
|
if (getprop("engines/engine[1]/state") == 1 or getprop("engines/engine[1]/state") == 2) {
|
||||||
setprop("/controls/engines/engine[1]/starter", 0);
|
setprop("controls/engines/engine[1]/starter", 0);
|
||||||
setprop("/controls/engines/engine[1]/cutoff", 1);
|
setprop("controls/engines/engine[1]/cutoff", 1);
|
||||||
setprop("/systems/pneumatic/eng2-starter", 0);
|
setprop("systems/pneumatic/eng2-starter", 0);
|
||||||
setprop("/engines/engine[1]/state", 0);
|
setprop("engines/engine[1]/state", 0);
|
||||||
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
|
interpolate(engines[1].getNode("egt-actual"), 0, egt_shutdown_time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,139 +2,139 @@
|
||||||
|
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
||||||
|
|
||||||
setprop("/systems/fadec/n1mode1", 0); # Doesn't do anything, just here for other logic #
|
setprop("systems/fadec/n1mode1", 0); # Doesn't do anything, just here for other logic #
|
||||||
setprop("/systems/fadec/n1mode2", 0); # Doesn't do anything, just here for other logic #
|
setprop("systems/fadec/n1mode2", 0); # Doesn't do anything, just here for other logic #
|
||||||
setprop("/systems/fadec/eng1/egt", 1);
|
setprop("systems/fadec/eng1/egt", 1);
|
||||||
setprop("/systems/fadec/eng1/n1", 1);
|
setprop("systems/fadec/eng1/n1", 1);
|
||||||
setprop("/systems/fadec/eng1/n2", 1);
|
setprop("systems/fadec/eng1/n2", 1);
|
||||||
setprop("/systems/fadec/eng1/ff", 1);
|
setprop("systems/fadec/eng1/ff", 1);
|
||||||
setprop("/systems/fadec/eng2/egt", 1);
|
setprop("systems/fadec/eng2/egt", 1);
|
||||||
setprop("/systems/fadec/eng2/n1", 1);
|
setprop("systems/fadec/eng2/n1", 1);
|
||||||
setprop("/systems/fadec/eng2/n2", 1);
|
setprop("systems/fadec/eng2/n2", 1);
|
||||||
setprop("/systems/fadec/eng2/ff", 1);
|
setprop("systems/fadec/eng2/ff", 1);
|
||||||
setprop("/systems/fadec/power-avail", 0);
|
setprop("systems/fadec/power-avail", 0);
|
||||||
setprop("/systems/fadec/powered1", 0);
|
setprop("systems/fadec/powered1", 0);
|
||||||
setprop("/systems/fadec/powered2", 0);
|
setprop("systems/fadec/powered2", 0);
|
||||||
setprop("/systems/fadec/powered-time", -300);
|
setprop("systems/fadec/powered-time", -300);
|
||||||
setprop("/systems/fadec/powerup", 0);
|
setprop("systems/fadec/powerup", 0);
|
||||||
setprop("/systems/fadec/eng1-master-count", 0);
|
setprop("systems/fadec/eng1-master-count", 0);
|
||||||
setprop("/systems/fadec/eng1-master-time", -300);
|
setprop("systems/fadec/eng1-master-time", -300);
|
||||||
setprop("/systems/fadec/eng1-off-power", 0);
|
setprop("systems/fadec/eng1-off-power", 0);
|
||||||
setprop("/systems/fadec/eng2-master-count", 0);
|
setprop("systems/fadec/eng2-master-count", 0);
|
||||||
setprop("/systems/fadec/eng2-master-time", -300);
|
setprop("systems/fadec/eng2-master-time", -300);
|
||||||
setprop("/systems/fadec/eng2-off-power", 0);
|
setprop("systems/fadec/eng2-off-power", 0);
|
||||||
|
|
||||||
var FADEC = {
|
var FADEC = {
|
||||||
init: func() {
|
init: func() {
|
||||||
setprop("/systems/fadec/powered-time", 0);
|
setprop("systems/fadec/powered-time", 0);
|
||||||
setprop("/systems/fadec/eng1-master-time", -300);
|
setprop("systems/fadec/eng1-master-time", -300);
|
||||||
setprop("/systems/fadec/eng2-master-time", -300);
|
setprop("systems/fadec/eng2-master-time", -300);
|
||||||
},
|
},
|
||||||
loop: func() {
|
loop: func() {
|
||||||
var ac1 = getprop("/systems/electrical/bus/ac-1");
|
var ac1 = getprop("systems/electrical/bus/ac-1");
|
||||||
var ac2 = getprop("/systems/electrical/bus/ac-2");
|
var ac2 = getprop("systems/electrical/bus/ac-2");
|
||||||
var acess = getprop("/systems/electrical/bus/ac-ess");
|
var acess = getprop("systems/electrical/bus/ac-ess");
|
||||||
var state1 = getprop("/engines/engine[0]/state");
|
var state1 = getprop("engines/engine[0]/state");
|
||||||
var state2 = getprop("/engines/engine[1]/state");
|
var state2 = getprop("engines/engine[1]/state");
|
||||||
var master1 = getprop("/controls/engines/engine[0]/cutoff-switch");
|
var master1 = getprop("controls/engines/engine[0]/cutoff-switch");
|
||||||
var master2 = getprop("/controls/engines/engine[1]/cutoff-switch");
|
var master2 = getprop("controls/engines/engine[1]/cutoff-switch");
|
||||||
var modeSel = getprop("/controls/engines/engine-start-switch");
|
var modeSel = getprop("controls/engines/engine-start-switch");
|
||||||
var elapsedSec = getprop("/sim/time/elapsed-sec");
|
var elapsedSec = getprop("sim/time/elapsed-sec");
|
||||||
|
|
||||||
if (ac1 >= 110 or ac2 >= 110 or acess >= 110) {
|
if (ac1 >= 110 or ac2 >= 110 or acess >= 110) {
|
||||||
if (getprop("/systems/fadec/power-avail") != 1) {
|
if (getprop("systems/fadec/power-avail") != 1) {
|
||||||
setprop("/systems/fadec/powered-time", elapsedSec);
|
setprop("systems/fadec/powered-time", elapsedSec);
|
||||||
setprop("/systems/fadec/power-avail", 1);
|
setprop("systems/fadec/power-avail", 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/systems/fadec/power-avail") != 0) {
|
if (getprop("systems/fadec/power-avail") != 0) {
|
||||||
setprop("/systems/fadec/power-avail", 0);
|
setprop("systems/fadec/power-avail", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var powerAvail = getprop("/systems/fadec/power-avail");
|
var powerAvail = getprop("systems/fadec/power-avail");
|
||||||
|
|
||||||
if (getprop("/systems/fadec/powered-time") + 300 >= elapsedSec) {
|
if (getprop("systems/fadec/powered-time") + 300 >= elapsedSec) {
|
||||||
setprop("/systems/fadec/powerup", 1);
|
setprop("systems/fadec/powerup", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/powerup", 0);
|
setprop("systems/fadec/powerup", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (master1 == 1) {
|
if (master1 == 1) {
|
||||||
if (getprop("/systems/fadec/eng1-master-count") != 1) {
|
if (getprop("systems/fadec/eng1-master-count") != 1) {
|
||||||
setprop("/systems/fadec/eng1-master-time", elapsedSec);
|
setprop("systems/fadec/eng1-master-time", elapsedSec);
|
||||||
setprop("/systems/fadec/eng1-master-count", 1);
|
setprop("systems/fadec/eng1-master-count", 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/systems/fadec/eng1-master-count") != 0) {
|
if (getprop("systems/fadec/eng1-master-count") != 0) {
|
||||||
setprop("/systems/fadec/eng1-master-count", 0);
|
setprop("systems/fadec/eng1-master-count", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/fadec/eng1-master-time") + 300 >= elapsedSec) {
|
if (getprop("systems/fadec/eng1-master-time") + 300 >= elapsedSec) {
|
||||||
setprop("/systems/fadec/eng1-off-power", 1);
|
setprop("systems/fadec/eng1-off-power", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/eng1-off-power", 0);
|
setprop("systems/fadec/eng1-off-power", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (master2 == 1) {
|
if (master2 == 1) {
|
||||||
if (getprop("/systems/fadec/eng2-master-count") != 1) {
|
if (getprop("systems/fadec/eng2-master-count") != 1) {
|
||||||
setprop("/systems/fadec/eng2-master-time", elapsedSec);
|
setprop("systems/fadec/eng2-master-time", elapsedSec);
|
||||||
setprop("/systems/fadec/eng2-master-count", 1);
|
setprop("systems/fadec/eng2-master-count", 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/systems/fadec/eng2-master-count") != 0) {
|
if (getprop("systems/fadec/eng2-master-count") != 0) {
|
||||||
setprop("/systems/fadec/eng2-master-count", 0);
|
setprop("systems/fadec/eng2-master-count", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/fadec/eng2-master-time") + 300 >= elapsedSec) {
|
if (getprop("systems/fadec/eng2-master-time") + 300 >= elapsedSec) {
|
||||||
setprop("/systems/fadec/eng2-off-power", 1);
|
setprop("systems/fadec/eng2-off-power", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/eng2-off-power", 0);
|
setprop("systems/fadec/eng2-off-power", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state1 == 3) {
|
if (state1 == 3) {
|
||||||
setprop("/systems/fadec/powered1", 1);
|
setprop("systems/fadec/powered1", 1);
|
||||||
} else if (powerAvail and modeSel == 2) {
|
} else if (powerAvail and modeSel == 2) {
|
||||||
setprop("/systems/fadec/powered1", 1);
|
setprop("systems/fadec/powered1", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/powered1", 0);
|
setprop("systems/fadec/powered1", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state2 == 3) {
|
if (state2 == 3) {
|
||||||
setprop("/systems/fadec/powered2", 1);
|
setprop("systems/fadec/powered2", 1);
|
||||||
} else if (powerAvail and modeSel == 2) {
|
} else if (powerAvail and modeSel == 2) {
|
||||||
setprop("/systems/fadec/powered2", 1);
|
setprop("systems/fadec/powered2", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/powered2", 0);
|
setprop("systems/fadec/powered2", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
var powered1 = getprop("/systems/fadec/powered1");
|
var powered1 = getprop("systems/fadec/powered1");
|
||||||
var powered2 = getprop("/systems/fadec/powered2");
|
var powered2 = getprop("systems/fadec/powered2");
|
||||||
|
|
||||||
if (powered1 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng1-off-power")) {
|
if (powered1 or getprop("systems/fadec/powerup") or getprop("systems/fadec/eng1-off-power")) {
|
||||||
setprop("/systems/fadec/eng1/n1", 1);
|
setprop("systems/fadec/eng1/n1", 1);
|
||||||
setprop("/systems/fadec/eng1/egt", 1);
|
setprop("systems/fadec/eng1/egt", 1);
|
||||||
setprop("/systems/fadec/eng1/n2", 1);
|
setprop("systems/fadec/eng1/n2", 1);
|
||||||
setprop("/systems/fadec/eng1/ff", 1);
|
setprop("systems/fadec/eng1/ff", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/eng1/n1", 0);
|
setprop("systems/fadec/eng1/n1", 0);
|
||||||
setprop("/systems/fadec/eng1/egt", 0);
|
setprop("systems/fadec/eng1/egt", 0);
|
||||||
setprop("/systems/fadec/eng1/n2", 0);
|
setprop("systems/fadec/eng1/n2", 0);
|
||||||
setprop("/systems/fadec/eng1/ff", 0);
|
setprop("systems/fadec/eng1/ff", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (powered2 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng2-off-power")) {
|
if (powered2 or getprop("systems/fadec/powerup") or getprop("systems/fadec/eng2-off-power")) {
|
||||||
setprop("/systems/fadec/eng2/n1", 1);
|
setprop("systems/fadec/eng2/n1", 1);
|
||||||
setprop("/systems/fadec/eng2/egt", 1);
|
setprop("systems/fadec/eng2/egt", 1);
|
||||||
setprop("/systems/fadec/eng2/n2", 1);
|
setprop("systems/fadec/eng2/n2", 1);
|
||||||
setprop("/systems/fadec/eng2/ff", 1);
|
setprop("systems/fadec/eng2/ff", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/eng2/n1", 0);
|
setprop("systems/fadec/eng2/n1", 0);
|
||||||
setprop("/systems/fadec/eng2/egt", 0);
|
setprop("systems/fadec/eng2/egt", 0);
|
||||||
setprop("/systems/fadec/eng2/n2", 0);
|
setprop("systems/fadec/eng2/n2", 0);
|
||||||
setprop("/systems/fadec/eng2/ff", 0);
|
setprop("systems/fadec/eng2/ff", 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
||||||
|
|
||||||
if (getprop("/options/eng") == "IAE") {
|
if (getprop("options/eng") == "IAE") {
|
||||||
io.include("fadec-iae.nas");
|
io.include("fadec-iae.nas");
|
||||||
} else {
|
} else {
|
||||||
io.include("fadec-cfm.nas");
|
io.include("fadec-cfm.nas");
|
||||||
|
@ -27,36 +27,36 @@ var flaps = 0;
|
||||||
var alphaProt = 0;
|
var alphaProt = 0;
|
||||||
var togaLock = 0;
|
var togaLock = 0;
|
||||||
var gs = 0;
|
var gs = 0;
|
||||||
setprop("/systems/thrust/alpha-floor", 0);
|
setprop("systems/thrust/alpha-floor", 0);
|
||||||
setprop("/systems/thrust/toga-lk", 0);
|
setprop("systems/thrust/toga-lk", 0);
|
||||||
setprop("/systems/thrust/epr/toga-lim", 0.0);
|
setprop("systems/thrust/epr/toga-lim", 0.0);
|
||||||
setprop("/systems/thrust/epr/mct-lim", 0.0);
|
setprop("systems/thrust/epr/mct-lim", 0.0);
|
||||||
setprop("/systems/thrust/epr/flx-lim", 0.0);
|
setprop("systems/thrust/epr/flx-lim", 0.0);
|
||||||
setprop("/systems/thrust/epr/clb-lim", 0.0);
|
setprop("systems/thrust/epr/clb-lim", 0.0);
|
||||||
setprop("/systems/thrust/n1/toga-lim", 0.0);
|
setprop("systems/thrust/n1/toga-lim", 0.0);
|
||||||
setprop("/systems/thrust/n1/mct-lim", 0.0);
|
setprop("systems/thrust/n1/mct-lim", 0.0);
|
||||||
setprop("/systems/thrust/n1/flx-lim", 0.0);
|
setprop("systems/thrust/n1/flx-lim", 0.0);
|
||||||
setprop("/systems/thrust/n1/clb-lim", 0.0);
|
setprop("systems/thrust/n1/clb-lim", 0.0);
|
||||||
setprop("/engines/flx-thr", 0.0);
|
setprop("engines/flx-thr", 0.0);
|
||||||
setprop("/controls/engines/thrust-limit", "TOGA");
|
setprop("controls/engines/thrust-limit", "TOGA");
|
||||||
setprop("/controls/engines/epr-limit", 0.0);
|
setprop("controls/engines/epr-limit", 0.0);
|
||||||
setprop("/controls/engines/n1-limit", 0.0);
|
setprop("controls/engines/n1-limit", 0.0);
|
||||||
setprop("/systems/thrust/state1", "IDLE");
|
setprop("systems/thrust/state1", "IDLE");
|
||||||
setprop("/systems/thrust/state2", "IDLE");
|
setprop("systems/thrust/state2", "IDLE");
|
||||||
setprop("/systems/thrust/lvrclb", 0);
|
setprop("systems/thrust/lvrclb", 0);
|
||||||
setprop("/systems/thrust/clbreduc-ft", "1500");
|
setprop("systems/thrust/clbreduc-ft", "1500");
|
||||||
setprop("/systems/thrust/toga-lim", 0.0);
|
setprop("systems/thrust/toga-lim", 0.0);
|
||||||
setprop("/systems/thrust/mct-lim", 0.0);
|
setprop("systems/thrust/mct-lim", 0.0);
|
||||||
setprop("/systems/thrust/clb-lim", 0.0);
|
setprop("systems/thrust/clb-lim", 0.0);
|
||||||
setprop("/systems/thrust/lim-flex", 0);
|
setprop("systems/thrust/lim-flex", 0);
|
||||||
setprop("/engines/flex-derate", 0);
|
setprop("engines/flex-derate", 0);
|
||||||
setprop("/systems/thrust/eng-out", 0);
|
setprop("systems/thrust/eng-out", 0);
|
||||||
setprop("/systems/thrust/thr-locked", 0);
|
setprop("systems/thrust/thr-locked", 0);
|
||||||
setprop("/systems/thrust/thr-locked-alert", 0);
|
setprop("systems/thrust/thr-locked-alert", 0);
|
||||||
setprop("/systems/thrust/thr-locked-flash", 0);
|
setprop("systems/thrust/thr-locked-flash", 0);
|
||||||
setprop("/systems/thrust/thr-lock-time", 0);
|
setprop("systems/thrust/thr-lock-time", 0);
|
||||||
setprop("/systems/thrust/thr-lock-cmd[0]", 0);
|
setprop("systems/thrust/thr-lock-cmd[0]", 0);
|
||||||
setprop("/systems/thrust/thr-lock-cmd[1]", 0);
|
setprop("systems/thrust/thr-lock-cmd[1]", 0);
|
||||||
|
|
||||||
setlistener("/sim/signals/fdm-initialized", func {
|
setlistener("/sim/signals/fdm-initialized", func {
|
||||||
thrust_loop.start();
|
thrust_loop.start();
|
||||||
|
@ -64,142 +64,142 @@ setlistener("/sim/signals/fdm-initialized", func {
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/controls/engines/engine[0]/throttle-pos", func {
|
setlistener("/controls/engines/engine[0]/throttle-pos", func {
|
||||||
engstate1 = getprop("/engines/engine[0]/state");
|
engstate1 = getprop("engines/engine[0]/state");
|
||||||
engstate2 = getprop("/engines/engine[1]/state");
|
engstate2 = getprop("engines/engine[1]/state");
|
||||||
thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
|
thr1 = getprop("controls/engines/engine[0]/throttle-pos");
|
||||||
if (getprop("/systems/thrust/alpha-floor") == 0 and getprop("/systems/thrust/toga-lk") == 0) {
|
if (getprop("systems/thrust/alpha-floor") == 0 and getprop("systems/thrust/toga-lk") == 0) {
|
||||||
if (thr1 < 0.01) {
|
if (thr1 < 0.01) {
|
||||||
setprop("/systems/thrust/state1", "IDLE");
|
setprop("systems/thrust/state1", "IDLE");
|
||||||
unflex();
|
unflex();
|
||||||
atoff_request();
|
atoff_request();
|
||||||
} else if (thr1 >= 0.01 and thr1 < 0.60) {
|
} else if (thr1 >= 0.01 and thr1 < 0.60) {
|
||||||
setprop("/systems/thrust/state1", "MAN");
|
setprop("systems/thrust/state1", "MAN");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thr1 >= 0.60 and thr1 < 0.65) {
|
} else if (thr1 >= 0.60 and thr1 < 0.65) {
|
||||||
setprop("/systems/thrust/state1", "CL");
|
setprop("systems/thrust/state1", "CL");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thr1 >= 0.65 and thr1 < 0.78) {
|
} else if (thr1 >= 0.65 and thr1 < 0.78) {
|
||||||
setprop("/systems/thrust/state1", "MAN THR");
|
setprop("systems/thrust/state1", "MAN THR");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thr1 >= 0.78 and thr1 < 0.83) {
|
} else if (thr1 >= 0.78 and thr1 < 0.83) {
|
||||||
if (getprop("/systems/thrust/eng-out") != 1) {
|
if (getprop("systems/thrust/eng-out") != 1) {
|
||||||
if (getprop("/controls/engines/thrust-limit") == "FLX") {
|
if (getprop("controls/engines/thrust-limit") == "FLX") {
|
||||||
if (getprop("/gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
|
if (getprop("gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
setprop("it-autoflight/input/athr", 1);
|
||||||
}
|
}
|
||||||
setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
|
setprop("controls/engines/engine[0]/throttle-fdm", 0.99);
|
||||||
} else {
|
} else {
|
||||||
setprop("/controls/engines/engine[0]/throttle-fdm", 0.95);
|
setprop("controls/engines/engine[0]/throttle-fdm", 0.95);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setprop("/systems/thrust/state1", "MCT");
|
setprop("systems/thrust/state1", "MCT");
|
||||||
} else if (thr1 >= 0.83 and thr1 < 0.95) {
|
} else if (thr1 >= 0.83 and thr1 < 0.95) {
|
||||||
setprop("/systems/thrust/state1", "MAN THR");
|
setprop("systems/thrust/state1", "MAN THR");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thr1 >= 0.95) {
|
} else if (thr1 >= 0.95) {
|
||||||
if (getprop("/gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
|
if (getprop("gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
setprop("it-autoflight/input/athr", 1);
|
||||||
}
|
}
|
||||||
setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
|
setprop("controls/engines/engine[0]/throttle-fdm", 0.99);
|
||||||
setprop("/systems/thrust/state1", "TOGA");
|
setprop("systems/thrust/state1", "TOGA");
|
||||||
unflex();
|
unflex();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (thr1 < 0.01) {
|
if (thr1 < 0.01) {
|
||||||
setprop("/systems/thrust/state1", "IDLE");
|
setprop("systems/thrust/state1", "IDLE");
|
||||||
} else if (thr1 >= 0.01 and thr1 < 0.60) {
|
} else if (thr1 >= 0.01 and thr1 < 0.60) {
|
||||||
setprop("/systems/thrust/state1", "MAN");
|
setprop("systems/thrust/state1", "MAN");
|
||||||
} else if (thr1 >= 0.60 and thr1 < 0.65) {
|
} else if (thr1 >= 0.60 and thr1 < 0.65) {
|
||||||
setprop("/systems/thrust/state1", "CL");
|
setprop("systems/thrust/state1", "CL");
|
||||||
} else if (thr1 >= 0.65 and thr1 < 0.78) {
|
} else if (thr1 >= 0.65 and thr1 < 0.78) {
|
||||||
setprop("/systems/thrust/state1", "MAN THR");
|
setprop("systems/thrust/state1", "MAN THR");
|
||||||
} else if (thr1 >= 0.78 and thr1 < 0.83) {
|
} else if (thr1 >= 0.78 and thr1 < 0.83) {
|
||||||
setprop("/systems/thrust/state1", "MCT");
|
setprop("systems/thrust/state1", "MCT");
|
||||||
} else if (thr1 >= 0.83 and thr1 < 0.95) {
|
} else if (thr1 >= 0.83 and thr1 < 0.95) {
|
||||||
setprop("/systems/thrust/state1", "MAN THR");
|
setprop("systems/thrust/state1", "MAN THR");
|
||||||
} else if (thr1 >= 0.95) {
|
} else if (thr1 >= 0.95) {
|
||||||
setprop("/systems/thrust/state1", "TOGA");
|
setprop("systems/thrust/state1", "TOGA");
|
||||||
}
|
}
|
||||||
setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
|
setprop("controls/engines/engine[0]/throttle-fdm", 0.99);
|
||||||
}
|
}
|
||||||
}, 0, 0);
|
}, 0, 0);
|
||||||
|
|
||||||
setlistener("/controls/engines/engine[1]/throttle-pos", func {
|
setlistener("/controls/engines/engine[1]/throttle-pos", func {
|
||||||
engstate1 = getprop("/engines/engine[0]/state");
|
engstate1 = getprop("engines/engine[0]/state");
|
||||||
engstate2 = getprop("/engines/engine[1]/state");
|
engstate2 = getprop("engines/engine[1]/state");
|
||||||
thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
|
thr2 = getprop("controls/engines/engine[1]/throttle-pos");
|
||||||
if (getprop("/systems/thrust/alpha-floor") == 0 and getprop("/systems/thrust/toga-lk") == 0) {
|
if (getprop("systems/thrust/alpha-floor") == 0 and getprop("systems/thrust/toga-lk") == 0) {
|
||||||
if (thr2 < 0.01) {
|
if (thr2 < 0.01) {
|
||||||
setprop("/systems/thrust/state2", "IDLE");
|
setprop("systems/thrust/state2", "IDLE");
|
||||||
unflex();
|
unflex();
|
||||||
atoff_request();
|
atoff_request();
|
||||||
} else if (thr2 >= 0.01 and thr2 < 0.60) {
|
} else if (thr2 >= 0.01 and thr2 < 0.60) {
|
||||||
setprop("/systems/thrust/state2", "MAN");
|
setprop("systems/thrust/state2", "MAN");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thr2 >= 0.60 and thr2 < 0.65) {
|
} else if (thr2 >= 0.60 and thr2 < 0.65) {
|
||||||
setprop("/systems/thrust/state2", "CL");
|
setprop("systems/thrust/state2", "CL");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thr2 >= 0.65 and thr2 < 0.78) {
|
} else if (thr2 >= 0.65 and thr2 < 0.78) {
|
||||||
setprop("/systems/thrust/state2", "MAN THR");
|
setprop("systems/thrust/state2", "MAN THR");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thr2 >= 0.78 and thr2 < 0.83) {
|
} else if (thr2 >= 0.78 and thr2 < 0.83) {
|
||||||
if (getprop("/systems/thrust/eng-out") != 1) {
|
if (getprop("systems/thrust/eng-out") != 1) {
|
||||||
if (getprop("/controls/engines/thrust-limit") == "FLX") {
|
if (getprop("controls/engines/thrust-limit") == "FLX") {
|
||||||
if (getprop("/gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
|
if (getprop("gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
setprop("it-autoflight/input/athr", 1);
|
||||||
}
|
}
|
||||||
setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
|
setprop("controls/engines/engine[1]/throttle-fdm", 0.99);
|
||||||
} else {
|
} else {
|
||||||
setprop("/controls/engines/engine[1]/throttle-fdm", 0.95);
|
setprop("controls/engines/engine[1]/throttle-fdm", 0.95);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setprop("/systems/thrust/state2", "MCT");
|
setprop("systems/thrust/state2", "MCT");
|
||||||
} else if (thr2 >= 0.83 and thr2 < 0.95) {
|
} else if (thr2 >= 0.83 and thr2 < 0.95) {
|
||||||
setprop("/systems/thrust/state2", "MAN THR");
|
setprop("systems/thrust/state2", "MAN THR");
|
||||||
unflex();
|
unflex();
|
||||||
} else if (thr2 >= 0.95) {
|
} else if (thr2 >= 0.95) {
|
||||||
if (getprop("/gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
|
if (getprop("gear/gear[0]/wow") == 1 and (engstate1 == 3 or engstate2 == 3)) {
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
setprop("it-autoflight/input/athr", 1);
|
||||||
}
|
}
|
||||||
setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
|
setprop("controls/engines/engine[1]/throttle-fdm", 0.99);
|
||||||
setprop("/systems/thrust/state2", "TOGA");
|
setprop("systems/thrust/state2", "TOGA");
|
||||||
unflex();
|
unflex();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (thr2 < 0.01) {
|
if (thr2 < 0.01) {
|
||||||
setprop("/systems/thrust/state2", "IDLE");
|
setprop("systems/thrust/state2", "IDLE");
|
||||||
} else if (thr2 >= 0.01 and thr2 < 0.60) {
|
} else if (thr2 >= 0.01 and thr2 < 0.60) {
|
||||||
setprop("/systems/thrust/state2", "MAN");
|
setprop("systems/thrust/state2", "MAN");
|
||||||
} else if (thr2 >= 0.60 and thr2 < 0.65) {
|
} else if (thr2 >= 0.60 and thr2 < 0.65) {
|
||||||
setprop("/systems/thrust/state2", "CL");
|
setprop("systems/thrust/state2", "CL");
|
||||||
} else if (thr2 >= 0.65 and thr2 < 0.78) {
|
} else if (thr2 >= 0.65 and thr2 < 0.78) {
|
||||||
setprop("/systems/thrust/state2", "MAN THR");
|
setprop("systems/thrust/state2", "MAN THR");
|
||||||
} else if (thr2 >= 0.78 and thr2 < 0.83) {
|
} else if (thr2 >= 0.78 and thr2 < 0.83) {
|
||||||
setprop("/systems/thrust/state2", "MCT");
|
setprop("systems/thrust/state2", "MCT");
|
||||||
} else if (thr2 >= 0.83 and thr2 < 0.95) {
|
} else if (thr2 >= 0.83 and thr2 < 0.95) {
|
||||||
setprop("/systems/thrust/state2", "MAN THR");
|
setprop("systems/thrust/state2", "MAN THR");
|
||||||
} else if (thr2 >= 0.95) {
|
} else if (thr2 >= 0.95) {
|
||||||
setprop("/systems/thrust/state2", "TOGA");
|
setprop("systems/thrust/state2", "TOGA");
|
||||||
}
|
}
|
||||||
setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
|
setprop("controls/engines/engine[1]/throttle-fdm", 0.99);
|
||||||
}
|
}
|
||||||
}, 0, 0);
|
}, 0, 0);
|
||||||
|
|
||||||
# Alpha Floor and Toga Lock
|
# Alpha Floor and Toga Lock
|
||||||
setlistener("/it-autoflight/input/athr", func {
|
setlistener("/it-autoflight/input/athr", func {
|
||||||
if (getprop("/systems/thrust/alpha-floor") == 1) {
|
if (getprop("systems/thrust/alpha-floor") == 1) {
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
setprop("it-autoflight/input/athr", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/thrust/toga-lk", 0);
|
setprop("systems/thrust/toga-lk", 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
# Checks if all throttles are in the IDLE position, before tuning off the A/THR.
|
# Checks if all throttles are in the IDLE position, before tuning off the A/THR.
|
||||||
var atoff_request = func {
|
var atoff_request = func {
|
||||||
state1 = getprop("/systems/thrust/state1");
|
state1 = getprop("systems/thrust/state1");
|
||||||
state2 = getprop("/systems/thrust/state2");
|
state2 = getprop("systems/thrust/state2");
|
||||||
if ((state1 == "IDLE") and (state2 == "IDLE") and (getprop("/systems/thrust/alpha-floor") == 0) and (getprop("/systems/thrust/toga-lk") == 0)) {
|
if ((state1 == "IDLE") and (state2 == "IDLE") and (getprop("systems/thrust/alpha-floor") == 0) and (getprop("systems/thrust/toga-lk") == 0)) {
|
||||||
if (getprop("/it-autoflight/input/athr") == 1 and pts.Position.gearAglFt.getValue() > 50) {
|
if (getprop("it-autoflight/input/athr") == 1 and pts.Position.gearAglFt.getValue() > 50) {
|
||||||
fcu.athrOff("soft");
|
fcu.athrOff("soft");
|
||||||
} elsif (pts.Position.gearAglFt.getValue() < 50) {
|
} elsif (pts.Position.gearAglFt.getValue() < 50) {
|
||||||
fcu.athrOff("none");
|
fcu.athrOff("none");
|
||||||
|
@ -208,66 +208,66 @@ var atoff_request = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
var thrust_loop = maketimer(0.04, func {
|
var thrust_loop = maketimer(0.04, func {
|
||||||
state1 = getprop("/systems/thrust/state1");
|
state1 = getprop("systems/thrust/state1");
|
||||||
state2 = getprop("/systems/thrust/state2");
|
state2 = getprop("systems/thrust/state2");
|
||||||
engstate1 = getprop("/engines/engine[0]/state");
|
engstate1 = getprop("engines/engine[0]/state");
|
||||||
engstate2 = getprop("/engines/engine[1]/state");
|
engstate2 = getprop("engines/engine[1]/state");
|
||||||
thr1 = getprop("/controls/engines/engine[0]/throttle-pos");
|
thr1 = getprop("controls/engines/engine[0]/throttle-pos");
|
||||||
thr2 = getprop("/controls/engines/engine[1]/throttle-pos");
|
thr2 = getprop("controls/engines/engine[1]/throttle-pos");
|
||||||
eprtoga = getprop("/systems/thrust/epr/toga-lim");
|
eprtoga = getprop("systems/thrust/epr/toga-lim");
|
||||||
eprmct = getprop("/systems/thrust/epr/mct-lim");
|
eprmct = getprop("systems/thrust/epr/mct-lim");
|
||||||
eprflx = getprop("/systems/thrust/epr/flx-lim");
|
eprflx = getprop("systems/thrust/epr/flx-lim");
|
||||||
eprclb = getprop("/systems/thrust/epr/clb-lim");
|
eprclb = getprop("systems/thrust/epr/clb-lim");
|
||||||
n1toga = getprop("/systems/thrust/n1/toga-lim");
|
n1toga = getprop("systems/thrust/n1/toga-lim");
|
||||||
n1mct = getprop("/systems/thrust/n1/mct-lim");
|
n1mct = getprop("systems/thrust/n1/mct-lim");
|
||||||
n1flx = getprop("/systems/thrust/n1/flx-lim");
|
n1flx = getprop("systems/thrust/n1/flx-lim");
|
||||||
n1clb = getprop("/systems/thrust/n1/clb-lim");
|
n1clb = getprop("systems/thrust/n1/clb-lim");
|
||||||
gs = getprop("/velocities/groundspeed-kt");
|
gs = getprop("velocities/groundspeed-kt");
|
||||||
if (getprop("/FMGC/internal/flex-set") == 1 and getprop("/systems/fadec/n1mode1") == 0 and getprop("/systems/fadec/n1mode2") == 0 and getprop("/gear/gear[1]/wow") == 1 and getprop("/gear/gear[2]/wow") == 1 and gs < 40) {
|
if (getprop("FMGC/internal/flex-set") == 1 and getprop("systems/fadec/n1mode1") == 0 and getprop("systems/fadec/n1mode2") == 0 and getprop("gear/gear[1]/wow") == 1 and getprop("gear/gear[2]/wow") == 1 and gs < 40) {
|
||||||
setprop("/systems/thrust/lim-flex", 1);
|
setprop("systems/thrust/lim-flex", 1);
|
||||||
} else if (getprop("/FMGC/internal/flex-set") == 0 or engstate1 != 3 or engstate2 != 3) {
|
} else if (getprop("FMGC/internal/flex-set") == 0 or engstate1 != 3 or engstate2 != 3) {
|
||||||
setprop("/systems/thrust/lim-flex", 0);
|
setprop("systems/thrust/lim-flex", 0);
|
||||||
}
|
}
|
||||||
if (getprop("/controls/engines/engine[0]/reverser") == "1" or getprop("/controls/engines/engine[1]/reverser") == "1") {
|
if (getprop("controls/engines/engine[0]/reverser") == "1" or getprop("controls/engines/engine[1]/reverser") == "1") {
|
||||||
setprop("/controls/engines/thrust-limit", "MREV");
|
setprop("controls/engines/thrust-limit", "MREV");
|
||||||
setprop("/controls/engines/epr-limit", 1.000);
|
setprop("controls/engines/epr-limit", 1.000);
|
||||||
setprop("/controls/engines/n1-limit", 0.0);
|
setprop("controls/engines/n1-limit", 0.0);
|
||||||
} else if (getprop("/gear/gear[1]/wow") == 0 or getprop("/gear/gear[2]/wow") == 0 or (engstate1 != 3 and engstate2 != 3)) {
|
} else if (getprop("gear/gear[1]/wow") == 0 or getprop("gear/gear[2]/wow") == 0 or (engstate1 != 3 and engstate2 != 3)) {
|
||||||
if ((state1 == "TOGA" or state2 == "TOGA" or (state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)) or getprop("/systems/thrust/alpha-floor") == 1 or getprop("/systems/thrust/toga-lk") == 1) {
|
if ((state1 == "TOGA" or state2 == "TOGA" or (state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)) or getprop("systems/thrust/alpha-floor") == 1 or getprop("systems/thrust/toga-lk") == 1) {
|
||||||
setprop("/controls/engines/thrust-limit", "TOGA");
|
setprop("controls/engines/thrust-limit", "TOGA");
|
||||||
setprop("/controls/engines/epr-limit", eprtoga);
|
setprop("controls/engines/epr-limit", eprtoga);
|
||||||
setprop("/controls/engines/n1-limit", n1toga);
|
setprop("controls/engines/n1-limit", n1toga);
|
||||||
} else if ((state1 == "MCT" or state2 == "MCT" or (state1 == "MAN THR" and thr1 < 0.83) or (state2 == "MAN THR" and thr2 < 0.83)) and getprop("/systems/thrust/lim-flex") == 0) {
|
} else if ((state1 == "MCT" or state2 == "MCT" or (state1 == "MAN THR" and thr1 < 0.83) or (state2 == "MAN THR" and thr2 < 0.83)) and getprop("systems/thrust/lim-flex") == 0) {
|
||||||
setprop("/controls/engines/thrust-limit", "MCT");
|
setprop("controls/engines/thrust-limit", "MCT");
|
||||||
setprop("/controls/engines/epr-limit", eprmct);
|
setprop("controls/engines/epr-limit", eprmct);
|
||||||
setprop("/controls/engines/n1-limit", n1mct);
|
setprop("controls/engines/n1-limit", n1mct);
|
||||||
} else if ((state1 == "MCT" or state2 == "MCT" or (state1 == "MAN THR" and thr1 < 0.83) or (state2 == "MAN THR" and thr2 < 0.83)) and getprop("/systems/thrust/lim-flex") == 1) {
|
} else if ((state1 == "MCT" or state2 == "MCT" or (state1 == "MAN THR" and thr1 < 0.83) or (state2 == "MAN THR" and thr2 < 0.83)) and getprop("systems/thrust/lim-flex") == 1) {
|
||||||
setprop("/controls/engines/thrust-limit", "FLX");
|
setprop("controls/engines/thrust-limit", "FLX");
|
||||||
setprop("/controls/engines/epr-limit", eprflx);
|
setprop("controls/engines/epr-limit", eprflx);
|
||||||
setprop("/controls/engines/n1-limit", n1flx);
|
setprop("controls/engines/n1-limit", n1flx);
|
||||||
} else if (state1 == "CL" or state2 == "CL" or state1 == "MAN" or state2 == "MAN" or state1 == "IDLE" or state2 == "IDLE") {
|
} else if (state1 == "CL" or state2 == "CL" or state1 == "MAN" or state2 == "MAN" or state1 == "IDLE" or state2 == "IDLE") {
|
||||||
setprop("/controls/engines/thrust-limit", "CLB");
|
setprop("controls/engines/thrust-limit", "CLB");
|
||||||
setprop("/controls/engines/epr-limit", eprclb);
|
setprop("controls/engines/epr-limit", eprclb);
|
||||||
setprop("/controls/engines/n1-limit", n1clb);
|
setprop("controls/engines/n1-limit", n1clb);
|
||||||
}
|
}
|
||||||
} else if (getprop("/FMGC/internal/flex-set") == 1 and getprop("/systems/fadec/n1mode1") == 0 and getprop("/systems/fadec/n1mode2") == 0) {
|
} else if (getprop("FMGC/internal/flex-set") == 1 and getprop("systems/fadec/n1mode1") == 0 and getprop("systems/fadec/n1mode2") == 0) {
|
||||||
if ((state1 == "TOGA" or state2 == "TOGA" or (state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)) or getprop("/systems/thrust/alpha-floor") == 1 or getprop("/systems/thrust/toga-lk") == 1) {
|
if ((state1 == "TOGA" or state2 == "TOGA" or (state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)) or getprop("systems/thrust/alpha-floor") == 1 or getprop("systems/thrust/toga-lk") == 1) {
|
||||||
setprop("/controls/engines/thrust-limit", "TOGA");
|
setprop("controls/engines/thrust-limit", "TOGA");
|
||||||
setprop("/controls/engines/epr-limit", eprtoga);
|
setprop("controls/engines/epr-limit", eprtoga);
|
||||||
setprop("/controls/engines/n1-limit", n1toga);
|
setprop("controls/engines/n1-limit", n1toga);
|
||||||
} else {
|
} else {
|
||||||
setprop("/controls/engines/thrust-limit", "FLX");
|
setprop("controls/engines/thrust-limit", "FLX");
|
||||||
setprop("/controls/engines/epr-limit", eprflx);
|
setprop("controls/engines/epr-limit", eprflx);
|
||||||
setprop("/controls/engines/n1-limit", n1flx);
|
setprop("controls/engines/n1-limit", n1flx);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setprop("/controls/engines/thrust-limit", "TOGA");
|
setprop("controls/engines/thrust-limit", "TOGA");
|
||||||
setprop("/controls/engines/epr-limit", eprtoga);
|
setprop("controls/engines/epr-limit", eprtoga);
|
||||||
setprop("/controls/engines/n1-limit", n1toga);
|
setprop("controls/engines/n1-limit", n1toga);
|
||||||
}
|
}
|
||||||
|
|
||||||
alpha = getprop("/fdm/jsbsim/aero/alpha-deg");
|
alpha = getprop("fdm/jsbsim/aero/alpha-deg");
|
||||||
flaps = getprop("/controls/flight/flap-pos");
|
flaps = getprop("controls/flight/flap-pos");
|
||||||
if (flaps == 0) {
|
if (flaps == 0) {
|
||||||
alphaProt = 9.5;
|
alphaProt = 9.5;
|
||||||
} else if (flaps == 1 or flaps == 2 or flaps == 3) {
|
} else if (flaps == 1 or flaps == 2 or flaps == 3) {
|
||||||
|
@ -278,115 +278,115 @@ var thrust_loop = maketimer(0.04, func {
|
||||||
alphaProt = 13.0;
|
alphaProt = 13.0;
|
||||||
}
|
}
|
||||||
togaLock = alphaProt - 1;
|
togaLock = alphaProt - 1;
|
||||||
if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0 and getprop("/it-fbw/law") == 0 and (getprop("/systems/thrust/eng-out") == 0 or (getprop("/systems/thrust/eng-out") == 1 and flaps == 0)) and getprop("/systems/fadec/n1mode1") == 0
|
if (getprop("gear/gear[1]/wow") == 0 and getprop("gear/gear[2]/wow") == 0 and getprop("it-fbw/law") == 0 and (getprop("systems/thrust/eng-out") == 0 or (getprop("systems/thrust/eng-out") == 1 and flaps == 0)) and getprop("systems/fadec/n1mode1") == 0
|
||||||
and getprop("/systems/fadec/n1mode2") == 0) {
|
and getprop("systems/fadec/n1mode2") == 0) {
|
||||||
if (alpha > alphaProt and pts.Position.gearAglFt.getValue() >= 100) {
|
if (alpha > alphaProt and pts.Position.gearAglFt.getValue() >= 100) {
|
||||||
setprop("/systems/thrust/alpha-floor", 1);
|
setprop("systems/thrust/alpha-floor", 1);
|
||||||
setprop("/systems/thrust/toga-lk", 0);
|
setprop("systems/thrust/toga-lk", 0);
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
setprop("it-autoflight/input/athr", 1);
|
||||||
setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
|
setprop("controls/engines/engine[0]/throttle-fdm", 0.99);
|
||||||
setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
|
setprop("controls/engines/engine[1]/throttle-fdm", 0.99);
|
||||||
} else if (getprop("/systems/thrust/alpha-floor") == 1 and alpha < togaLock) {
|
} else if (getprop("systems/thrust/alpha-floor") == 1 and alpha < togaLock) {
|
||||||
setprop("/systems/thrust/alpha-floor", 0);
|
setprop("systems/thrust/alpha-floor", 0);
|
||||||
setprop("/it-autoflight/input/athr", 1);
|
setprop("it-autoflight/input/athr", 1);
|
||||||
setprop("/systems/thrust/toga-lk", 1);
|
setprop("systems/thrust/toga-lk", 1);
|
||||||
setprop("/controls/engines/engine[0]/throttle-fdm", 0.99);
|
setprop("controls/engines/engine[0]/throttle-fdm", 0.99);
|
||||||
setprop("/controls/engines/engine[1]/throttle-fdm", 0.99);
|
setprop("controls/engines/engine[1]/throttle-fdm", 0.99);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/thrust/alpha-floor", 0);
|
setprop("systems/thrust/alpha-floor", 0);
|
||||||
setprop("/systems/thrust/toga-lk", 0);
|
setprop("systems/thrust/toga-lk", 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var unflex = func {
|
var unflex = func {
|
||||||
state1 = getprop("/systems/thrust/state1");
|
state1 = getprop("systems/thrust/state1");
|
||||||
state2 = getprop("/systems/thrust/state2");
|
state2 = getprop("systems/thrust/state2");
|
||||||
if (state1 != "MCT" and state2 != "MCT" and getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0) {
|
if (state1 != "MCT" and state2 != "MCT" and getprop("gear/gear[1]/wow") == 0 and getprop("gear/gear[2]/wow") == 0) {
|
||||||
setprop("/systems/thrust/lim-flex", 0);
|
setprop("systems/thrust/lim-flex", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var thrust_flash = maketimer(0.5, func {
|
var thrust_flash = maketimer(0.5, func {
|
||||||
state1 = getprop("/systems/thrust/state1");
|
state1 = getprop("systems/thrust/state1");
|
||||||
state2 = getprop("/systems/thrust/state2");
|
state2 = getprop("systems/thrust/state2");
|
||||||
|
|
||||||
if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0 and (getprop("/engines/engine[0]/state") != 3 or getprop("/engines/engine[1]/state") != 3)) {
|
if (getprop("gear/gear[1]/wow") == 0 and getprop("gear/gear[2]/wow") == 0 and (getprop("engines/engine[0]/state") != 3 or getprop("engines/engine[1]/state") != 3)) {
|
||||||
setprop("/systems/thrust/eng-out", 1);
|
setprop("systems/thrust/eng-out", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/thrust/eng-out", 0);
|
setprop("systems/thrust/eng-out", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state1 == "CL" and state2 == "CL" and getprop("/systems/thrust/eng-out") != 1) {
|
if (state1 == "CL" and state2 == "CL" and getprop("systems/thrust/eng-out") != 1) {
|
||||||
setprop("/systems/thrust/lvrclb", 0);
|
setprop("systems/thrust/lvrclb", 0);
|
||||||
} else if (state1 == "MCT" and state2 == "MCT" and getprop("/systems/thrust/lim-flex") != 1 and getprop("/systems/thrust/eng-out") == 1) {
|
} else if (state1 == "MCT" and state2 == "MCT" and getprop("systems/thrust/lim-flex") != 1 and getprop("systems/thrust/eng-out") == 1) {
|
||||||
setprop("/systems/thrust/lvrclb", 0);
|
setprop("systems/thrust/lvrclb", 0);
|
||||||
} else {
|
} else {
|
||||||
var status = getprop("/systems/thrust/lvrclb");
|
var status = getprop("systems/thrust/lvrclb");
|
||||||
if (status == 0) {
|
if (status == 0) {
|
||||||
if (getprop("/gear/gear[0]/wow") == 0) {
|
if (getprop("gear/gear[0]/wow") == 0) {
|
||||||
if (getprop("/systems/thrust/state1") == "MAN" or getprop("/systems/thrust/state2") == "MAN") {
|
if (getprop("systems/thrust/state1") == "MAN" or getprop("systems/thrust/state2") == "MAN") {
|
||||||
setprop("/systems/thrust/lvrclb", 1);
|
setprop("systems/thrust/lvrclb", 1);
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/instrumentation/altimeter/indicated-altitude-ft") >= getprop("/systems/thrust/clbreduc-ft") and getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0) {
|
if (getprop("instrumentation/altimeter/indicated-altitude-ft") >= getprop("systems/thrust/clbreduc-ft") and getprop("gear/gear[1]/wow") == 0 and getprop("gear/gear[2]/wow") == 0) {
|
||||||
setprop("/systems/thrust/lvrclb", 1);
|
setprop("systems/thrust/lvrclb", 1);
|
||||||
} else if ((state1 == "CL" and state2 != "CL") or (state1 != "CL" and state2 == "CL") and getprop("/systems/thrust/eng-out") != 1) {
|
} else if ((state1 == "CL" and state2 != "CL") or (state1 != "CL" and state2 == "CL") and getprop("systems/thrust/eng-out") != 1) {
|
||||||
setprop("/systems/thrust/lvrclb", 1);
|
setprop("systems/thrust/lvrclb", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/thrust/lvrclb", 0);
|
setprop("systems/thrust/lvrclb", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (status == 1) {
|
} else if (status == 1) {
|
||||||
setprop("/systems/thrust/lvrclb", 0);
|
setprop("systems/thrust/lvrclb", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var lockThr = func() {
|
var lockThr = func() {
|
||||||
state1 = getprop("/systems/thrust/state1");
|
state1 = getprop("systems/thrust/state1");
|
||||||
state2 = getprop("/systems/thrust/state2");
|
state2 = getprop("systems/thrust/state2");
|
||||||
if ((state1 == "CL" and state2 == "CL" and getprop("/systems/thrust/eng-out") == 0) or (state1 == "MCT" and state2 == "MCT" and getprop("/systems/thrust/eng-out") == 1)) {
|
if ((state1 == "CL" and state2 == "CL" and getprop("systems/thrust/eng-out") == 0) or (state1 == "MCT" and state2 == "MCT" and getprop("systems/thrust/eng-out") == 1)) {
|
||||||
setprop("/systems/thrust/thr-lock-time", getprop("/sim/time/elapsed-sec"));
|
setprop("systems/thrust/thr-lock-time", getprop("sim/time/elapsed-sec"));
|
||||||
setprop("/systems/thrust/thr-locked", 1);
|
setprop("systems/thrust/thr-locked", 1);
|
||||||
lockTimer.start();
|
lockTimer.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var checkLockThr = func() {
|
var checkLockThr = func() {
|
||||||
if (getprop("/systems/thrust/thr-lock-time") + 5 > getprop("/sim/time/elapsed-sec")) { return; }
|
if (getprop("systems/thrust/thr-lock-time") + 5 > getprop("sim/time/elapsed-sec")) { return; }
|
||||||
|
|
||||||
if (fmgc.Output.athr.getBoolValue()) {
|
if (fmgc.Output.athr.getBoolValue()) {
|
||||||
lockTimer.stop();
|
lockTimer.stop();
|
||||||
setprop("/systems/thrust/thr-locked", 0);
|
setprop("systems/thrust/thr-locked", 0);
|
||||||
setprop("/systems/thrust/thr-locked-alert", 0);
|
setprop("systems/thrust/thr-locked-alert", 0);
|
||||||
setprop("/systems/thrust/thr-lock-time", 0);
|
setprop("systems/thrust/thr-lock-time", 0);
|
||||||
setprop("/systems/thrust/thr-locked-flash", 0);
|
setprop("systems/thrust/thr-locked-flash", 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/thrust/thr-locked") == 0) {
|
if (getprop("systems/thrust/thr-locked") == 0) {
|
||||||
lockTimer.stop();
|
lockTimer.stop();
|
||||||
setprop("/systems/thrust/thr-locked", 0);
|
setprop("systems/thrust/thr-locked", 0);
|
||||||
setprop("/systems/thrust/thr-locked-alert", 0);
|
setprop("systems/thrust/thr-locked-alert", 0);
|
||||||
setprop("/systems/thrust/thr-lock-time", 0);
|
setprop("systems/thrust/thr-lock-time", 0);
|
||||||
setprop("/systems/thrust/thr-locked-flash", 0);
|
setprop("systems/thrust/thr-locked-flash", 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
state1 = getprop("/systems/thrust/state1");
|
state1 = getprop("systems/thrust/state1");
|
||||||
state2 = getprop("/systems/thrust/state2");
|
state2 = getprop("systems/thrust/state2");
|
||||||
|
|
||||||
if ((state1 != "CL" and state2 != "CL" and getprop("/systems/thrust/eng-out") == 0) or (state1 != "MCT" and state2 != "MCT" and getprop("/systems/thrust/eng-out") == 1)) {
|
if ((state1 != "CL" and state2 != "CL" and getprop("systems/thrust/eng-out") == 0) or (state1 != "MCT" and state2 != "MCT" and getprop("systems/thrust/eng-out") == 1)) {
|
||||||
lockTimer.stop();
|
lockTimer.stop();
|
||||||
setprop("/systems/thrust/thr-locked", 0);
|
setprop("systems/thrust/thr-locked", 0);
|
||||||
setprop("/systems/thrust/thr-locked-alert", 0);
|
setprop("systems/thrust/thr-locked-alert", 0);
|
||||||
setprop("/systems/thrust/thr-lock-time", 0);
|
setprop("systems/thrust/thr-lock-time", 0);
|
||||||
setprop("/systems/thrust/thr-locked-flash", 0);
|
setprop("systems/thrust/thr-locked-flash", 0);
|
||||||
} elsif ((state1 == "CL" and state2 == "CL" and getprop("/systems/thrust/eng-out") == 0) or (state1 == "MCT" and state2 == "MCT" and getprop("/systems/thrust/eng-out") == 1)) {
|
} elsif ((state1 == "CL" and state2 == "CL" and getprop("systems/thrust/eng-out") == 0) or (state1 == "MCT" and state2 == "MCT" and getprop("systems/thrust/eng-out") == 1)) {
|
||||||
setprop("/systems/thrust/thr-locked-alert", 1);
|
setprop("systems/thrust/thr-locked-alert", 1);
|
||||||
setprop("/systems/thrust/thr-lock-time", getprop("/sim/time/elapsed-sec"));
|
setprop("systems/thrust/thr-lock-time", getprop("sim/time/elapsed-sec"));
|
||||||
setprop("/systems/thrust/thr-locked-flash", 1);
|
setprop("systems/thrust/thr-locked-flash", 1);
|
||||||
lockTimer.stop();
|
lockTimer.stop();
|
||||||
lockTimer2.start();
|
lockTimer2.start();
|
||||||
}
|
}
|
||||||
|
@ -395,49 +395,49 @@ var checkLockThr = func() {
|
||||||
var checkLockThr2 = func() {
|
var checkLockThr2 = func() {
|
||||||
if (fmgc.Output.athr.getBoolValue()) {
|
if (fmgc.Output.athr.getBoolValue()) {
|
||||||
lockTimer2.stop();
|
lockTimer2.stop();
|
||||||
setprop("/systems/thrust/thr-locked", 0);
|
setprop("systems/thrust/thr-locked", 0);
|
||||||
setprop("/systems/thrust/thr-locked-alert", 0);
|
setprop("systems/thrust/thr-locked-alert", 0);
|
||||||
setprop("/systems/thrust/thr-lock-time", 0);
|
setprop("systems/thrust/thr-lock-time", 0);
|
||||||
setprop("/systems/thrust/thr-locked-flash", 0);
|
setprop("systems/thrust/thr-locked-flash", 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/thrust/thr-locked") == 0) {
|
if (getprop("systems/thrust/thr-locked") == 0) {
|
||||||
lockTimer2.stop();
|
lockTimer2.stop();
|
||||||
setprop("/systems/thrust/thr-locked", 0);
|
setprop("systems/thrust/thr-locked", 0);
|
||||||
setprop("/systems/thrust/thr-locked-alert", 0);
|
setprop("systems/thrust/thr-locked-alert", 0);
|
||||||
setprop("/systems/thrust/thr-lock-time", 0);
|
setprop("systems/thrust/thr-lock-time", 0);
|
||||||
setprop("/systems/thrust/thr-locked-flash", 0);
|
setprop("systems/thrust/thr-locked-flash", 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/thrust/thr-lock-time") + 5 < getprop("/sim/time/elapsed-sec")) {
|
if (getprop("systems/thrust/thr-lock-time") + 5 < getprop("sim/time/elapsed-sec")) {
|
||||||
setprop("/systems/thrust/thr-locked-flash", 0);
|
setprop("systems/thrust/thr-locked-flash", 0);
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
setprop("/systems/thrust/thr-locked-flash", 1);
|
setprop("systems/thrust/thr-locked-flash", 1);
|
||||||
setprop("/systems/thrust/thr-lock-time", getprop("/sim/time/elapsed-sec"));
|
setprop("systems/thrust/thr-lock-time", getprop("sim/time/elapsed-sec"));
|
||||||
ecam.athr_lock.noRepeat = 0;
|
ecam.athr_lock.noRepeat = 0;
|
||||||
ecam.athr_lock.noRepeat2 = 0;
|
ecam.athr_lock.noRepeat2 = 0;
|
||||||
}, 0.2);
|
}, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
state1 = getprop("/systems/thrust/state1");
|
state1 = getprop("systems/thrust/state1");
|
||||||
state2 = getprop("/systems/thrust/state2");
|
state2 = getprop("systems/thrust/state2");
|
||||||
|
|
||||||
|
|
||||||
if ((state1 != "CL" and state2 != "CL" and getprop("/systems/thrust/eng-out") == 0) or (state1 != "MCT" and state2 != "MCT" and getprop("/systems/thrust/eng-out") == 1)) {
|
if ((state1 != "CL" and state2 != "CL" and getprop("systems/thrust/eng-out") == 0) or (state1 != "MCT" and state2 != "MCT" and getprop("systems/thrust/eng-out") == 1)) {
|
||||||
lockTimer2.stop();
|
lockTimer2.stop();
|
||||||
setprop("/systems/thrust/thr-locked", 0);
|
setprop("systems/thrust/thr-locked", 0);
|
||||||
setprop("/systems/thrust/thr-locked-alert", 0);
|
setprop("systems/thrust/thr-locked-alert", 0);
|
||||||
setprop("/systems/thrust/thr-lock-time", 0);
|
setprop("systems/thrust/thr-lock-time", 0);
|
||||||
setprop("/systems/thrust/thr-locked-flash", 0);
|
setprop("systems/thrust/thr-locked-flash", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/systems/thrust/thr-locked", func {
|
setlistener("/systems/thrust/thr-locked", func {
|
||||||
if (getprop("/systems/thrust/thr-locked") == 1) {
|
if (getprop("systems/thrust/thr-locked") == 1) {
|
||||||
setprop("/systems/thrust/thr-lock-cmd[0]", getprop("/controls/engines/engine[0]/throttle-output"));
|
setprop("systems/thrust/thr-lock-cmd[0]", getprop("controls/engines/engine[0]/throttle-output"));
|
||||||
setprop("/systems/thrust/thr-lock-cmd[1]", getprop("/controls/engines/engine[1]/throttle-output"));
|
setprop("systems/thrust/thr-lock-cmd[1]", getprop("controls/engines/engine[1]/throttle-output"));
|
||||||
}
|
}
|
||||||
}, 0, 0);
|
}, 0, 0);
|
||||||
|
|
||||||
|
|
|
@ -2,191 +2,191 @@
|
||||||
|
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
||||||
|
|
||||||
setprop("/controls/fadec/n1mode1", 0);
|
setprop("controls/fadec/n1mode1", 0);
|
||||||
setprop("/controls/fadec/n1mode2", 0);
|
setprop("controls/fadec/n1mode2", 0);
|
||||||
setprop("/systems/fadec/n1mode1", 0); # 0 == EPR, 1 == N1 Rated, 2 == N1 Unrated #
|
setprop("systems/fadec/n1mode1", 0); # 0 == EPR, 1 == N1 Rated, 2 == N1 Unrated #
|
||||||
setprop("/systems/fadec/n1mode2", 0); # 0 == EPR, 1 == N1 Rated, 2 == N1 Unrated #
|
setprop("systems/fadec/n1mode2", 0); # 0 == EPR, 1 == N1 Rated, 2 == N1 Unrated #
|
||||||
setprop("/systems/fadec/eng1/epr", 1);
|
setprop("systems/fadec/eng1/epr", 1);
|
||||||
setprop("/systems/fadec/eng1/egt", 1);
|
setprop("systems/fadec/eng1/egt", 1);
|
||||||
setprop("/systems/fadec/eng1/n1", 1);
|
setprop("systems/fadec/eng1/n1", 1);
|
||||||
setprop("/systems/fadec/eng1/n2", 1);
|
setprop("systems/fadec/eng1/n2", 1);
|
||||||
setprop("/systems/fadec/eng1/ff", 1);
|
setprop("systems/fadec/eng1/ff", 1);
|
||||||
setprop("/systems/fadec/eng2/epr", 1);
|
setprop("systems/fadec/eng2/epr", 1);
|
||||||
setprop("/systems/fadec/eng2/egt", 1);
|
setprop("systems/fadec/eng2/egt", 1);
|
||||||
setprop("/systems/fadec/eng2/n1", 1);
|
setprop("systems/fadec/eng2/n1", 1);
|
||||||
setprop("/systems/fadec/eng2/n2", 1);
|
setprop("systems/fadec/eng2/n2", 1);
|
||||||
setprop("/systems/fadec/eng2/ff", 1);
|
setprop("systems/fadec/eng2/ff", 1);
|
||||||
setprop("/systems/fadec/power-avail", 0);
|
setprop("systems/fadec/power-avail", 0);
|
||||||
setprop("/systems/fadec/powered1", 0);
|
setprop("systems/fadec/powered1", 0);
|
||||||
setprop("/systems/fadec/powered2", 0);
|
setprop("systems/fadec/powered2", 0);
|
||||||
setprop("/systems/fadec/powered-time", -300);
|
setprop("systems/fadec/powered-time", -300);
|
||||||
setprop("/systems/fadec/powerup", 0);
|
setprop("systems/fadec/powerup", 0);
|
||||||
setprop("/systems/fadec/eng1-master-count", 0);
|
setprop("systems/fadec/eng1-master-count", 0);
|
||||||
setprop("/systems/fadec/eng1-master-time", -300);
|
setprop("systems/fadec/eng1-master-time", -300);
|
||||||
setprop("/systems/fadec/eng1-off-power", 0);
|
setprop("systems/fadec/eng1-off-power", 0);
|
||||||
setprop("/systems/fadec/eng2-master-count", 0);
|
setprop("systems/fadec/eng2-master-count", 0);
|
||||||
setprop("/systems/fadec/eng2-master-time", -300);
|
setprop("systems/fadec/eng2-master-time", -300);
|
||||||
setprop("/systems/fadec/eng2-off-power", 0);
|
setprop("systems/fadec/eng2-off-power", 0);
|
||||||
|
|
||||||
var FADEC = {
|
var FADEC = {
|
||||||
init: func() {
|
init: func() {
|
||||||
setprop("/systems/fadec/powered-time", 0);
|
setprop("systems/fadec/powered-time", 0);
|
||||||
setprop("/systems/fadec/eng1-master-time", -300);
|
setprop("systems/fadec/eng1-master-time", -300);
|
||||||
setprop("/systems/fadec/eng2-master-time", -300);
|
setprop("systems/fadec/eng2-master-time", -300);
|
||||||
},
|
},
|
||||||
loop: func() {
|
loop: func() {
|
||||||
var ac1 = getprop("/systems/electrical/bus/ac-1");
|
var ac1 = getprop("systems/electrical/bus/ac-1");
|
||||||
var ac2 = getprop("/systems/electrical/bus/ac-2");
|
var ac2 = getprop("systems/electrical/bus/ac-2");
|
||||||
var acess = getprop("/systems/electrical/bus/ac-ess");
|
var acess = getprop("systems/electrical/bus/ac-ess");
|
||||||
var state1 = getprop("/engines/engine[0]/state");
|
var state1 = getprop("engines/engine[0]/state");
|
||||||
var state2 = getprop("/engines/engine[1]/state");
|
var state2 = getprop("engines/engine[1]/state");
|
||||||
var master1 = getprop("/controls/engines/engine[0]/cutoff-switch");
|
var master1 = getprop("controls/engines/engine[0]/cutoff-switch");
|
||||||
var master2 = getprop("/controls/engines/engine[1]/cutoff-switch");
|
var master2 = getprop("controls/engines/engine[1]/cutoff-switch");
|
||||||
var modeSel = getprop("/controls/engines/engine-start-switch");
|
var modeSel = getprop("controls/engines/engine-start-switch");
|
||||||
var N1Mode1_sw = getprop("/controls/fadec/n1mode1");
|
var N1Mode1_sw = getprop("controls/fadec/n1mode1");
|
||||||
var N1Mode2_sw = getprop("/controls/fadec/n1mode2");
|
var N1Mode2_sw = getprop("controls/fadec/n1mode2");
|
||||||
var elapsedSec = getprop("/sim/time/elapsed-sec");
|
var elapsedSec = getprop("sim/time/elapsed-sec");
|
||||||
|
|
||||||
if (ac1 >= 110 or ac2 >= 110 or acess >= 110) {
|
if (ac1 >= 110 or ac2 >= 110 or acess >= 110) {
|
||||||
if (getprop("/systems/fadec/power-avail") != 1) {
|
if (getprop("systems/fadec/power-avail") != 1) {
|
||||||
setprop("/systems/fadec/powered-time", elapsedSec);
|
setprop("systems/fadec/powered-time", elapsedSec);
|
||||||
setprop("/systems/fadec/power-avail", 1);
|
setprop("systems/fadec/power-avail", 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/systems/fadec/power-avail") != 0) {
|
if (getprop("systems/fadec/power-avail") != 0) {
|
||||||
setprop("/systems/fadec/power-avail", 0);
|
setprop("systems/fadec/power-avail", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var powerAvail = getprop("/systems/fadec/power-avail");
|
var powerAvail = getprop("systems/fadec/power-avail");
|
||||||
|
|
||||||
if (getprop("/systems/fadec/powered-time") + 300 >= elapsedSec) {
|
if (getprop("systems/fadec/powered-time") + 300 >= elapsedSec) {
|
||||||
setprop("/systems/fadec/powerup", 1);
|
setprop("systems/fadec/powerup", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/powerup", 0);
|
setprop("systems/fadec/powerup", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (master1 == 1) {
|
if (master1 == 1) {
|
||||||
if (getprop("/systems/fadec/eng1-master-count") != 1) {
|
if (getprop("systems/fadec/eng1-master-count") != 1) {
|
||||||
setprop("/systems/fadec/eng1-master-time", elapsedSec);
|
setprop("systems/fadec/eng1-master-time", elapsedSec);
|
||||||
setprop("/systems/fadec/eng1-master-count", 1);
|
setprop("systems/fadec/eng1-master-count", 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/systems/fadec/eng1-master-count") != 0) {
|
if (getprop("systems/fadec/eng1-master-count") != 0) {
|
||||||
setprop("/systems/fadec/eng1-master-count", 0);
|
setprop("systems/fadec/eng1-master-count", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/fadec/eng1-master-time") + 300 >= elapsedSec) {
|
if (getprop("systems/fadec/eng1-master-time") + 300 >= elapsedSec) {
|
||||||
setprop("/systems/fadec/eng1-off-power", 1);
|
setprop("systems/fadec/eng1-off-power", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/eng1-off-power", 0);
|
setprop("systems/fadec/eng1-off-power", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (master2 == 1) {
|
if (master2 == 1) {
|
||||||
if (getprop("/systems/fadec/eng2-master-count") != 1) {
|
if (getprop("systems/fadec/eng2-master-count") != 1) {
|
||||||
setprop("/systems/fadec/eng2-master-time", elapsedSec);
|
setprop("systems/fadec/eng2-master-time", elapsedSec);
|
||||||
setprop("/systems/fadec/eng2-master-count", 1);
|
setprop("systems/fadec/eng2-master-count", 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (getprop("/systems/fadec/eng2-master-count") != 0) {
|
if (getprop("systems/fadec/eng2-master-count") != 0) {
|
||||||
setprop("/systems/fadec/eng2-master-count", 0);
|
setprop("systems/fadec/eng2-master-count", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/systems/fadec/eng2-master-time") + 300 >= elapsedSec) {
|
if (getprop("systems/fadec/eng2-master-time") + 300 >= elapsedSec) {
|
||||||
setprop("/systems/fadec/eng2-off-power", 1);
|
setprop("systems/fadec/eng2-off-power", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/eng2-off-power", 0);
|
setprop("systems/fadec/eng2-off-power", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state1 == 3) {
|
if (state1 == 3) {
|
||||||
setprop("/systems/fadec/powered1", 1);
|
setprop("systems/fadec/powered1", 1);
|
||||||
} else if (powerAvail and modeSel == 2) {
|
} else if (powerAvail and modeSel == 2) {
|
||||||
setprop("/systems/fadec/powered1", 1);
|
setprop("systems/fadec/powered1", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/powered1", 0);
|
setprop("systems/fadec/powered1", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state2 == 3) {
|
if (state2 == 3) {
|
||||||
setprop("/systems/fadec/powered2", 1);
|
setprop("systems/fadec/powered2", 1);
|
||||||
} else if (powerAvail and modeSel == 2) {
|
} else if (powerAvail and modeSel == 2) {
|
||||||
setprop("/systems/fadec/powered2", 1);
|
setprop("systems/fadec/powered2", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/powered2", 0);
|
setprop("systems/fadec/powered2", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (N1Mode1_sw == 1) {
|
if (N1Mode1_sw == 1) {
|
||||||
setprop("/systems/fadec/n1mode1", 1);
|
setprop("systems/fadec/n1mode1", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/n1mode1", 0);
|
setprop("systems/fadec/n1mode1", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (N1Mode2_sw == 1) {
|
if (N1Mode2_sw == 1) {
|
||||||
setprop("/systems/fadec/n1mode2", 1);
|
setprop("systems/fadec/n1mode2", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/n1mode2", 0);
|
setprop("systems/fadec/n1mode2", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
var powered1 = getprop("/systems/fadec/powered1");
|
var powered1 = getprop("systems/fadec/powered1");
|
||||||
var powered2 = getprop("/systems/fadec/powered2");
|
var powered2 = getprop("systems/fadec/powered2");
|
||||||
var N1Mode1 = getprop("/systems/fadec/n1mode1");
|
var N1Mode1 = getprop("systems/fadec/n1mode1");
|
||||||
var N1Mode2 = getprop("/systems/fadec/n1mode2");
|
var N1Mode2 = getprop("systems/fadec/n1mode2");
|
||||||
var N11 = getprop("/engines/engine[0]/n1-actual");
|
var N11 = getprop("engines/engine[0]/n1-actual");
|
||||||
var N12 = getprop("/engines/engine[1]/n1-actual");
|
var N12 = getprop("engines/engine[1]/n1-actual");
|
||||||
var N21 = getprop("/engines/engine[0]/n2-actual");
|
var N21 = getprop("engines/engine[0]/n2-actual");
|
||||||
var N22 = getprop("/engines/engine[1]/n2-actual");
|
var N22 = getprop("engines/engine[1]/n2-actual");
|
||||||
|
|
||||||
if ((powered1 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng1-off-power")) and N1Mode1 == 0) {
|
if ((powered1 or getprop("systems/fadec/powerup") or getprop("systems/fadec/eng1-off-power")) and N1Mode1 == 0) {
|
||||||
setprop("/systems/fadec/eng1/epr", 1);
|
setprop("systems/fadec/eng1/epr", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/eng1/epr", 0);
|
setprop("systems/fadec/eng1/epr", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((powered2 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng2-off-power")) and N1Mode2 == 0) {
|
if ((powered2 or getprop("systems/fadec/powerup") or getprop("systems/fadec/eng2-off-power")) and N1Mode2 == 0) {
|
||||||
setprop("/systems/fadec/eng2/epr", 1);
|
setprop("systems/fadec/eng2/epr", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/eng2/epr", 0);
|
setprop("systems/fadec/eng2/epr", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (powered1 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng1-off-power")) {
|
if (powered1 or getprop("systems/fadec/powerup") or getprop("systems/fadec/eng1-off-power")) {
|
||||||
setprop("/systems/fadec/eng1/egt", 1);
|
setprop("systems/fadec/eng1/egt", 1);
|
||||||
setprop("/systems/fadec/eng1/ff", 1);
|
setprop("systems/fadec/eng1/ff", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/eng1/egt", 0);
|
setprop("systems/fadec/eng1/egt", 0);
|
||||||
setprop("/systems/fadec/eng1/ff", 0);
|
setprop("systems/fadec/eng1/ff", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (powered2 or getprop("/systems/fadec/powerup") or getprop("/systems/fadec/eng2-off-power")) {
|
if (powered2 or getprop("systems/fadec/powerup") or getprop("systems/fadec/eng2-off-power")) {
|
||||||
setprop("/systems/fadec/eng2/egt", 1);
|
setprop("systems/fadec/eng2/egt", 1);
|
||||||
setprop("/systems/fadec/eng2/ff", 1);
|
setprop("systems/fadec/eng2/ff", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/eng2/egt", 0);
|
setprop("systems/fadec/eng2/egt", 0);
|
||||||
setprop("/systems/fadec/eng2/ff", 0);
|
setprop("systems/fadec/eng2/ff", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (powered1 and N11 >= 3.5) {
|
if (powered1 and N11 >= 3.5) {
|
||||||
setprop("/systems/fadec/eng1/n1", 1);
|
setprop("systems/fadec/eng1/n1", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/eng1/n1", 0);
|
setprop("systems/fadec/eng1/n1", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (powered2 and N12 >= 3.5) {
|
if (powered2 and N12 >= 3.5) {
|
||||||
setprop("/systems/fadec/eng2/n1", 1);
|
setprop("systems/fadec/eng2/n1", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/eng2/n1", 0);
|
setprop("systems/fadec/eng2/n1", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (powered1 and N21 >= 3.5) {
|
if (powered1 and N21 >= 3.5) {
|
||||||
setprop("/systems/fadec/eng1/n2", 1);
|
setprop("systems/fadec/eng1/n2", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/eng1/n2", 0);
|
setprop("systems/fadec/eng1/n2", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (powered2 and N22 >= 3.5) {
|
if (powered2 and N22 >= 3.5) {
|
||||||
setprop("/systems/fadec/eng2/n2", 1);
|
setprop("systems/fadec/eng2/n2", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fadec/eng2/n2", 0);
|
setprop("systems/fadec/eng2/n2", 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,18 +7,18 @@ var thr1 = 0;
|
||||||
var thr2 = 0;
|
var thr2 = 0;
|
||||||
var wow0 = 0;
|
var wow0 = 0;
|
||||||
var gnd_speed = 0;
|
var gnd_speed = 0;
|
||||||
setprop("/controls/autobrake/active", 0);
|
setprop("controls/autobrake/active", 0);
|
||||||
setprop("/controls/autobrake/mode", 0);
|
setprop("controls/autobrake/mode", 0);
|
||||||
setprop("/controls/autobrake/decel-rate", 0);
|
setprop("controls/autobrake/decel-rate", 0);
|
||||||
|
|
||||||
var autobrake_init = func {
|
var autobrake_init = func {
|
||||||
setprop("/controls/autobrake/active", 0);
|
setprop("controls/autobrake/active", 0);
|
||||||
setprop("/controls/autobrake/mode", 0);
|
setprop("controls/autobrake/mode", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Override FG's generic brake
|
# Override FG's generic brake
|
||||||
controls.applyBrakes = func(v, which = 0) {
|
controls.applyBrakes = func(v, which = 0) {
|
||||||
if (getprop("/systems/acconfig/autoconfig-running") != 1) {
|
if (getprop("systems/acconfig/autoconfig-running") != 1) {
|
||||||
if (which <= 0) {
|
if (which <= 0) {
|
||||||
interpolate("/controls/gear/brake-left", v, 0.5);
|
interpolate("/controls/gear/brake-left", v, 0.5);
|
||||||
}
|
}
|
||||||
|
@ -30,51 +30,51 @@ controls.applyBrakes = func(v, which = 0) {
|
||||||
|
|
||||||
# Set autobrake mode
|
# Set autobrake mode
|
||||||
var arm_autobrake = func(mode) {
|
var arm_autobrake = func(mode) {
|
||||||
wow0 = getprop("/gear/gear[0]/wow");
|
wow0 = getprop("gear/gear[0]/wow");
|
||||||
gnd_speed = getprop("/velocities/groundspeed-kt");
|
gnd_speed = getprop("velocities/groundspeed-kt");
|
||||||
if (mode == 0) { # OFF
|
if (mode == 0) { # OFF
|
||||||
absChk.stop();
|
absChk.stop();
|
||||||
if (getprop("/controls/autobrake/active") == 1) {
|
if (getprop("controls/autobrake/active") == 1) {
|
||||||
setprop("/controls/autobrake/active", 0);
|
setprop("controls/autobrake/active", 0);
|
||||||
setprop("/controls/gear/brake-left", 0);
|
setprop("controls/gear/brake-left", 0);
|
||||||
setprop("/controls/gear/brake-right", 0);
|
setprop("controls/gear/brake-right", 0);
|
||||||
}
|
}
|
||||||
setprop("/controls/autobrake/decel-rate", 0);
|
setprop("controls/autobrake/decel-rate", 0);
|
||||||
setprop("/controls/autobrake/mode", 0);
|
setprop("controls/autobrake/mode", 0);
|
||||||
} else if (mode == 1 and wow0 != 1) { # LO
|
} else if (mode == 1 and wow0 != 1) { # LO
|
||||||
setprop("/controls/autobrake/decel-rate", 1.7);
|
setprop("controls/autobrake/decel-rate", 1.7);
|
||||||
setprop("/controls/autobrake/mode", 1);
|
setprop("controls/autobrake/mode", 1);
|
||||||
absChk.start();
|
absChk.start();
|
||||||
} else if (mode == 2 and wow0 != 1) { # MED
|
} else if (mode == 2 and wow0 != 1) { # MED
|
||||||
setprop("/controls/autobrake/decel-rate", 3);
|
setprop("controls/autobrake/decel-rate", 3);
|
||||||
setprop("/controls/autobrake/mode", 2);
|
setprop("controls/autobrake/mode", 2);
|
||||||
absChk.start();
|
absChk.start();
|
||||||
} else if (mode == 3 and wow0 == 1 and gnd_speed < 40) { # MAX
|
} else if (mode == 3 and wow0 == 1 and gnd_speed < 40) { # MAX
|
||||||
setprop("/controls/autobrake/decel-rate", 6);
|
setprop("controls/autobrake/decel-rate", 6);
|
||||||
setprop("/controls/autobrake/mode", 3);
|
setprop("controls/autobrake/mode", 3);
|
||||||
absChk.start();
|
absChk.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Autobrake loop
|
# Autobrake loop
|
||||||
var absChk = maketimer(0.2, func {
|
var absChk = maketimer(0.2, func {
|
||||||
thr1 = getprop("/controls/engines/engine[0]/throttle");
|
thr1 = getprop("controls/engines/engine[0]/throttle");
|
||||||
thr2 = getprop("/controls/engines/engine[1]/throttle");
|
thr2 = getprop("controls/engines/engine[1]/throttle");
|
||||||
wow0 = getprop("/gear/gear[0]/wow");
|
wow0 = getprop("gear/gear[0]/wow");
|
||||||
gnd_speed = getprop("/velocities/groundspeed-kt");
|
gnd_speed = getprop("velocities/groundspeed-kt");
|
||||||
if (gnd_speed > 72) {
|
if (gnd_speed > 72) {
|
||||||
if (getprop("/controls/autobrake/mode") != 0 and thr1 < 0.15 and thr2 < 0.15 and wow0 == 1) {
|
if (getprop("controls/autobrake/mode") != 0 and thr1 < 0.15 and thr2 < 0.15 and wow0 == 1) {
|
||||||
setprop("/controls/autobrake/active", 1);
|
setprop("controls/autobrake/active", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/controls/autobrake/active", 0);
|
setprop("controls/autobrake/active", 0);
|
||||||
setprop("/controls/gear/brake-left", 0);
|
setprop("controls/gear/brake-left", 0);
|
||||||
setprop("/controls/gear/brake-right", 0);
|
setprop("controls/gear/brake-right", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (getprop("/controls/autobrake/mode") == 3 and getprop("/controls/gear/gear-down") == 0) {
|
if (getprop("controls/autobrake/mode") == 3 and getprop("controls/gear/gear-down") == 0) {
|
||||||
arm_autobrake(0);
|
arm_autobrake(0);
|
||||||
}
|
}
|
||||||
if (getprop("/controls/autobrake/mode") != 0 and wow0 == 1 and getprop("/controls/autobrake/active") == 1 and (getprop("/controls/gear/brake-left") > 0.05 or getprop("/controls/gear/brake-right") > 0.05)) {
|
if (getprop("controls/autobrake/mode") != 0 and wow0 == 1 and getprop("controls/autobrake/active") == 1 and (getprop("controls/gear/brake-left") > 0.05 or getprop("controls/gear/brake-right") > 0.05)) {
|
||||||
arm_autobrake(0);
|
arm_autobrake(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -75,9 +75,15 @@ var BrakeSystem =
|
||||||
setprop("gear/gear[2]/R3error-temp-degc", math.round(rand()*(5)) - 2.5);
|
setprop("gear/gear[2]/R3error-temp-degc", math.round(rand()*(5)) - 2.5);
|
||||||
setprop("gear/gear[2]/R4error-temp-degc", math.round(rand()*(5)) - 2.5);
|
setprop("gear/gear[2]/R4error-temp-degc", math.round(rand()*(5)) - 2.5);
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
#var atemp = getprop("environment/temperature-degc") or 0;
|
#var atemp = getprop("environment/temperature-degc") or 0;
|
||||||
#var vmach = getprop("velocities/mach") or 0;
|
#var vmach = getprop("velocities/mach") or 0;
|
||||||
var tatdegc = getprop("/systems/navigation/probes/tat-1/compute-tat") or 0;
|
var tatdegc = getprop("/systems/navigation/probes/tat-1/compute-tat") or 0;
|
||||||
|
=======
|
||||||
|
var atemp = getprop("environment/temperature-degc") or 0;
|
||||||
|
var vmach = getprop("velocities/mach") or 0;
|
||||||
|
var tatdegc = getprop("systems/navigation/probes/tat-1/compute-tat");
|
||||||
|
>>>>>>> d47b3431d233eb890aa9e256c21f148e6dce5a21
|
||||||
|
|
||||||
setprop("gear/gear[1]/L1brake-temp-degc",tatdegc+getprop("gear/gear[1]/L1error-temp-degc"));
|
setprop("gear/gear[1]/L1brake-temp-degc",tatdegc+getprop("gear/gear[1]/L1error-temp-degc"));
|
||||||
setprop("gear/gear[1]/L2brake-temp-degc",tatdegc+getprop("gear/gear[1]/L2error-temp-degc"));
|
setprop("gear/gear[1]/L2brake-temp-degc",tatdegc+getprop("gear/gear[1]/L2error-temp-degc"));
|
||||||
|
|
|
@ -3,98 +3,98 @@
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
||||||
|
|
||||||
setlistener("sim/signals/fdm-initialized", func {
|
setlistener("sim/signals/fdm-initialized", func {
|
||||||
setprop("/instrumentation/efis[0]/nd/display-mode", "NAV");
|
setprop("instrumentation/efis[0]/nd/display-mode", "NAV");
|
||||||
setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 2);
|
setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 2);
|
||||||
setprop("/instrumentation/efis[0]/inputs/range-nm", 20);
|
setprop("instrumentation/efis[0]/inputs/range-nm", 20);
|
||||||
setprop("/instrumentation/efis[0]/inputs/tfc", 0);
|
setprop("instrumentation/efis[0]/inputs/tfc", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/CSTR", 0);
|
setprop("instrumentation/efis[0]/inputs/CSTR", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/wpt", 0);
|
setprop("instrumentation/efis[0]/inputs/wpt", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/VORD", 0);
|
setprop("instrumentation/efis[0]/inputs/VORD", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/DME", 0);
|
setprop("instrumentation/efis[0]/inputs/DME", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/NDB", 0);
|
setprop("instrumentation/efis[0]/inputs/NDB", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/arpt", 0);
|
setprop("instrumentation/efis[0]/inputs/arpt", 0);
|
||||||
setprop("/instrumentation/efis[1]/nd/display-mode", "NAV");
|
setprop("instrumentation/efis[1]/nd/display-mode", "NAV");
|
||||||
setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 2);
|
setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 2);
|
||||||
setprop("/instrumentation/efis[1]/inputs/range-nm", 20);
|
setprop("instrumentation/efis[1]/inputs/range-nm", 20);
|
||||||
setprop("/instrumentation/efis[1]/inputs/tfc", 0);
|
setprop("instrumentation/efis[1]/inputs/tfc", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/CSTR", 0);
|
setprop("instrumentation/efis[1]/inputs/CSTR", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/wpt", 0);
|
setprop("instrumentation/efis[1]/inputs/wpt", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/VORD", 0);
|
setprop("instrumentation/efis[1]/inputs/VORD", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/DME", 0);
|
setprop("instrumentation/efis[1]/inputs/DME", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/NDB", 0);
|
setprop("instrumentation/efis[1]/inputs/NDB", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/arpt", 0);
|
setprop("instrumentation/efis[1]/inputs/arpt", 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
var setCptND = func(d) {
|
var setCptND = func(d) {
|
||||||
var mode = getprop("/instrumentation/efis[0]/nd/display-mode");
|
var mode = getprop("instrumentation/efis[0]/nd/display-mode");
|
||||||
|
|
||||||
if (d == 1) {
|
if (d == 1) {
|
||||||
if (mode == "ILS") {
|
if (mode == "ILS") {
|
||||||
setprop("/instrumentation/efis[0]/nd/display-mode", "VOR");
|
setprop("instrumentation/efis[0]/nd/display-mode", "VOR");
|
||||||
setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 1);
|
setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 1);
|
||||||
} else if (mode == "VOR") {
|
} else if (mode == "VOR") {
|
||||||
setprop("/instrumentation/efis[0]/nd/display-mode", "NAV");
|
setprop("instrumentation/efis[0]/nd/display-mode", "NAV");
|
||||||
setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 2);
|
setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 2);
|
||||||
} else if (mode == "NAV") {
|
} else if (mode == "NAV") {
|
||||||
setprop("/instrumentation/efis[0]/nd/display-mode", "ARC");
|
setprop("instrumentation/efis[0]/nd/display-mode", "ARC");
|
||||||
setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 3);
|
setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 3);
|
||||||
} else if (mode == "ARC") {
|
} else if (mode == "ARC") {
|
||||||
setprop("/instrumentation/efis[0]/nd/display-mode", "PLAN");
|
setprop("instrumentation/efis[0]/nd/display-mode", "PLAN");
|
||||||
setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 4);
|
setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 4);
|
||||||
}
|
}
|
||||||
} else if (d == -1) {
|
} else if (d == -1) {
|
||||||
if (mode == "PLAN") {
|
if (mode == "PLAN") {
|
||||||
setprop("/instrumentation/efis[0]/nd/display-mode", "ARC");
|
setprop("instrumentation/efis[0]/nd/display-mode", "ARC");
|
||||||
setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 3);
|
setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 3);
|
||||||
} else if (mode == "ARC") {
|
} else if (mode == "ARC") {
|
||||||
setprop("/instrumentation/efis[0]/nd/display-mode", "NAV");
|
setprop("instrumentation/efis[0]/nd/display-mode", "NAV");
|
||||||
setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 2);
|
setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 2);
|
||||||
} else if (mode == "NAV") {
|
} else if (mode == "NAV") {
|
||||||
setprop("/instrumentation/efis[0]/nd/display-mode", "VOR");
|
setprop("instrumentation/efis[0]/nd/display-mode", "VOR");
|
||||||
setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 1);
|
setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 1);
|
||||||
} else if (mode == "VOR") {
|
} else if (mode == "VOR") {
|
||||||
setprop("/instrumentation/efis[0]/nd/display-mode", "ILS");
|
setprop("instrumentation/efis[0]/nd/display-mode", "ILS");
|
||||||
setprop("/instrumentation/efis[0]/mfd/pnl_mode-num", 0);
|
setprop("instrumentation/efis[0]/mfd/pnl_mode-num", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var setFoND = func(d) {
|
var setFoND = func(d) {
|
||||||
var mode = getprop("/instrumentation/efis[1]/nd/display-mode");
|
var mode = getprop("instrumentation/efis[1]/nd/display-mode");
|
||||||
|
|
||||||
if (d == 1) {
|
if (d == 1) {
|
||||||
if (mode == "ILS") {
|
if (mode == "ILS") {
|
||||||
setprop("/instrumentation/efis[1]/nd/display-mode", "VOR");
|
setprop("instrumentation/efis[1]/nd/display-mode", "VOR");
|
||||||
setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 1);
|
setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 1);
|
||||||
} else if (mode == "VOR") {
|
} else if (mode == "VOR") {
|
||||||
setprop("/instrumentation/efis[1]/nd/display-mode", "NAV");
|
setprop("instrumentation/efis[1]/nd/display-mode", "NAV");
|
||||||
setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 2);
|
setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 2);
|
||||||
} else if (mode == "NAV") {
|
} else if (mode == "NAV") {
|
||||||
setprop("/instrumentation/efis[1]/nd/display-mode", "ARC");
|
setprop("instrumentation/efis[1]/nd/display-mode", "ARC");
|
||||||
setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 3);
|
setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 3);
|
||||||
} else if (mode == "ARC") {
|
} else if (mode == "ARC") {
|
||||||
setprop("/instrumentation/efis[1]/nd/display-mode", "PLAN");
|
setprop("instrumentation/efis[1]/nd/display-mode", "PLAN");
|
||||||
setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 4);
|
setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 4);
|
||||||
}
|
}
|
||||||
} else if (d == -1) {
|
} else if (d == -1) {
|
||||||
if (mode == "PLAN") {
|
if (mode == "PLAN") {
|
||||||
setprop("/instrumentation/efis[1]/nd/display-mode", "ARC");
|
setprop("instrumentation/efis[1]/nd/display-mode", "ARC");
|
||||||
setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 3);
|
setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 3);
|
||||||
} else if (mode == "ARC") {
|
} else if (mode == "ARC") {
|
||||||
setprop("/instrumentation/efis[1]/nd/display-mode", "NAV");
|
setprop("instrumentation/efis[1]/nd/display-mode", "NAV");
|
||||||
setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 2);
|
setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 2);
|
||||||
} else if (mode == "NAV") {
|
} else if (mode == "NAV") {
|
||||||
setprop("/instrumentation/efis[1]/nd/display-mode", "VOR");
|
setprop("instrumentation/efis[1]/nd/display-mode", "VOR");
|
||||||
setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 1);
|
setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 1);
|
||||||
} else if (mode == "VOR") {
|
} else if (mode == "VOR") {
|
||||||
setprop("/instrumentation/efis[1]/nd/display-mode", "ILS");
|
setprop("instrumentation/efis[1]/nd/display-mode", "ILS");
|
||||||
setprop("/instrumentation/efis[1]/mfd/pnl_mode-num", 0);
|
setprop("instrumentation/efis[1]/mfd/pnl_mode-num", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var setNDRange = func(n, d) {
|
var setNDRange = func(n, d) {
|
||||||
var rng = getprop("/instrumentation/efis[" ~ n ~ "]/inputs/range-nm");
|
var rng = getprop("instrumentation/efis[" ~ n ~ "]/inputs/range-nm");
|
||||||
if (d == 1) {
|
if (d == 1) {
|
||||||
rng = rng * 2;
|
rng = rng * 2;
|
||||||
if (rng > 320) {
|
if (rng > 320) {
|
||||||
|
@ -106,111 +106,111 @@ var setNDRange = func(n, d) {
|
||||||
rng = 10;
|
rng = 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setprop("/instrumentation/efis[" ~ n ~ "]/inputs/range-nm", rng);
|
setprop("instrumentation/efis[" ~ n ~ "]/inputs/range-nm", rng);
|
||||||
}
|
}
|
||||||
|
|
||||||
var cpt_efis_btns = func(i) {
|
var cpt_efis_btns = func(i) {
|
||||||
if (i == "cstr") {
|
if (i == "cstr") {
|
||||||
setprop("/instrumentation/efis[0]/inputs/CSTR", 1);
|
setprop("instrumentation/efis[0]/inputs/CSTR", 1);
|
||||||
setprop("/instrumentation/efis[0]/inputs/wpt", 0);
|
setprop("instrumentation/efis[0]/inputs/wpt", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/VORD", 0);
|
setprop("instrumentation/efis[0]/inputs/VORD", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/DME", 0);
|
setprop("instrumentation/efis[0]/inputs/DME", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/NDB", 0);
|
setprop("instrumentation/efis[0]/inputs/NDB", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/arpt", 0);
|
setprop("instrumentation/efis[0]/inputs/arpt", 0);
|
||||||
} else if (i == "wpt") {
|
} else if (i == "wpt") {
|
||||||
setprop("/instrumentation/efis[0]/inputs/CSTR", 0);
|
setprop("instrumentation/efis[0]/inputs/CSTR", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/wpt", 1);
|
setprop("instrumentation/efis[0]/inputs/wpt", 1);
|
||||||
setprop("/instrumentation/efis[0]/inputs/VORD", 0);
|
setprop("instrumentation/efis[0]/inputs/VORD", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/DME", 0);
|
setprop("instrumentation/efis[0]/inputs/DME", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/NDB", 0);
|
setprop("instrumentation/efis[0]/inputs/NDB", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/arpt", 0);
|
setprop("instrumentation/efis[0]/inputs/arpt", 0);
|
||||||
} else if (i == "vord") {
|
} else if (i == "vord") {
|
||||||
setprop("/instrumentation/efis[0]/inputs/CSTR", 0);
|
setprop("instrumentation/efis[0]/inputs/CSTR", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/wpt", 0);
|
setprop("instrumentation/efis[0]/inputs/wpt", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/VORD", 1);
|
setprop("instrumentation/efis[0]/inputs/VORD", 1);
|
||||||
setprop("/instrumentation/efis[0]/inputs/DME", 1);
|
setprop("instrumentation/efis[0]/inputs/DME", 1);
|
||||||
setprop("/instrumentation/efis[0]/inputs/NDB", 0);
|
setprop("instrumentation/efis[0]/inputs/NDB", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/arpt", 0);
|
setprop("instrumentation/efis[0]/inputs/arpt", 0);
|
||||||
} else if (i == "ndb") {
|
} else if (i == "ndb") {
|
||||||
setprop("/instrumentation/efis[0]/inputs/CSTR", 0);
|
setprop("instrumentation/efis[0]/inputs/CSTR", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/wpt", 0);
|
setprop("instrumentation/efis[0]/inputs/wpt", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/VORD", 0);
|
setprop("instrumentation/efis[0]/inputs/VORD", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/DME", 0);
|
setprop("instrumentation/efis[0]/inputs/DME", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/NDB", 1);
|
setprop("instrumentation/efis[0]/inputs/NDB", 1);
|
||||||
setprop("/instrumentation/efis[0]/inputs/arpt", 0);
|
setprop("instrumentation/efis[0]/inputs/arpt", 0);
|
||||||
} else if (i == "arpt") {
|
} else if (i == "arpt") {
|
||||||
setprop("/instrumentation/efis[0]/inputs/CSTR", 0);
|
setprop("instrumentation/efis[0]/inputs/CSTR", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/wpt", 0);
|
setprop("instrumentation/efis[0]/inputs/wpt", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/VORD", 0);
|
setprop("instrumentation/efis[0]/inputs/VORD", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/DME", 0);
|
setprop("instrumentation/efis[0]/inputs/DME", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/NDB", 0);
|
setprop("instrumentation/efis[0]/inputs/NDB", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/arpt", 1);
|
setprop("instrumentation/efis[0]/inputs/arpt", 1);
|
||||||
} else if (i == "off") {
|
} else if (i == "off") {
|
||||||
setprop("/instrumentation/efis[0]/inputs/CSTR", 0);
|
setprop("instrumentation/efis[0]/inputs/CSTR", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/wpt", 0);
|
setprop("instrumentation/efis[0]/inputs/wpt", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/VORD", 0);
|
setprop("instrumentation/efis[0]/inputs/VORD", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/DME", 0);
|
setprop("instrumentation/efis[0]/inputs/DME", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/NDB", 0);
|
setprop("instrumentation/efis[0]/inputs/NDB", 0);
|
||||||
setprop("/instrumentation/efis[0]/inputs/arpt", 0);
|
setprop("instrumentation/efis[0]/inputs/arpt", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var fo_efis_btns = func(i) {
|
var fo_efis_btns = func(i) {
|
||||||
if (i == "cstr") {
|
if (i == "cstr") {
|
||||||
setprop("/instrumentation/efis[1]/inputs/CSTR", 1);
|
setprop("instrumentation/efis[1]/inputs/CSTR", 1);
|
||||||
setprop("/instrumentation/efis[1]/inputs/wpt", 0);
|
setprop("instrumentation/efis[1]/inputs/wpt", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/VORD", 0);
|
setprop("instrumentation/efis[1]/inputs/VORD", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/DME", 0);
|
setprop("instrumentation/efis[1]/inputs/DME", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/NDB", 0);
|
setprop("instrumentation/efis[1]/inputs/NDB", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/arpt", 0);
|
setprop("instrumentation/efis[1]/inputs/arpt", 0);
|
||||||
} else if (i == "wpt") {
|
} else if (i == "wpt") {
|
||||||
setprop("/instrumentation/efis[1]/inputs/CSTR", 0);
|
setprop("instrumentation/efis[1]/inputs/CSTR", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/wpt", 1);
|
setprop("instrumentation/efis[1]/inputs/wpt", 1);
|
||||||
setprop("/instrumentation/efis[1]/inputs/VORD", 0);
|
setprop("instrumentation/efis[1]/inputs/VORD", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/DME", 0);
|
setprop("instrumentation/efis[1]/inputs/DME", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/NDB", 0);
|
setprop("instrumentation/efis[1]/inputs/NDB", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/arpt", 0);
|
setprop("instrumentation/efis[1]/inputs/arpt", 0);
|
||||||
} else if (i == "vord") {
|
} else if (i == "vord") {
|
||||||
setprop("/instrumentation/efis[1]/inputs/CSTR", 0);
|
setprop("instrumentation/efis[1]/inputs/CSTR", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/wpt", 0);
|
setprop("instrumentation/efis[1]/inputs/wpt", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/VORD", 1);
|
setprop("instrumentation/efis[1]/inputs/VORD", 1);
|
||||||
setprop("/instrumentation/efis[1]/inputs/DME", 1);
|
setprop("instrumentation/efis[1]/inputs/DME", 1);
|
||||||
setprop("/instrumentation/efis[1]/inputs/NDB", 0);
|
setprop("instrumentation/efis[1]/inputs/NDB", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/arpt", 0);
|
setprop("instrumentation/efis[1]/inputs/arpt", 0);
|
||||||
} else if (i == "ndb") {
|
} else if (i == "ndb") {
|
||||||
setprop("/instrumentation/efis[1]/inputs/CSTR", 0);
|
setprop("instrumentation/efis[1]/inputs/CSTR", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/wpt", 0);
|
setprop("instrumentation/efis[1]/inputs/wpt", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/VORD", 0);
|
setprop("instrumentation/efis[1]/inputs/VORD", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/DME", 0);
|
setprop("instrumentation/efis[1]/inputs/DME", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/NDB", 1);
|
setprop("instrumentation/efis[1]/inputs/NDB", 1);
|
||||||
setprop("/instrumentation/efis[1]/inputs/arpt", 0);
|
setprop("instrumentation/efis[1]/inputs/arpt", 0);
|
||||||
} else if (i == "arpt") {
|
} else if (i == "arpt") {
|
||||||
setprop("/instrumentation/efis[1]/inputs/CSTR", 0);
|
setprop("instrumentation/efis[1]/inputs/CSTR", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/wpt", 0);
|
setprop("instrumentation/efis[1]/inputs/wpt", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/VORD", 0);
|
setprop("instrumentation/efis[1]/inputs/VORD", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/DME", 0);
|
setprop("instrumentation/efis[1]/inputs/DME", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/NDB", 0);
|
setprop("instrumentation/efis[1]/inputs/NDB", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/arpt", 1);
|
setprop("instrumentation/efis[1]/inputs/arpt", 1);
|
||||||
} else if (i == "off") {
|
} else if (i == "off") {
|
||||||
setprop("/instrumentation/efis[1]/inputs/CSTR", 0);
|
setprop("instrumentation/efis[1]/inputs/CSTR", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/wpt", 0);
|
setprop("instrumentation/efis[1]/inputs/wpt", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/VORD", 0);
|
setprop("instrumentation/efis[1]/inputs/VORD", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/DME", 0);
|
setprop("instrumentation/efis[1]/inputs/DME", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/NDB", 0);
|
setprop("instrumentation/efis[1]/inputs/NDB", 0);
|
||||||
setprop("/instrumentation/efis[1]/inputs/arpt", 0);
|
setprop("instrumentation/efis[1]/inputs/arpt", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var toggleSTD = func {
|
var toggleSTD = func {
|
||||||
var Std = getprop("/modes/altimeter/std");
|
var Std = getprop("modes/altimeter/std");
|
||||||
if (Std == 1) {
|
if (Std == 1) {
|
||||||
var oldqnh = getprop("/modes/altimeter/oldqnh");
|
var oldqnh = getprop("modes/altimeter/oldqnh");
|
||||||
setprop("/instrumentation/altimeter/setting-inhg", oldqnh);
|
setprop("instrumentation/altimeter/setting-inhg", oldqnh);
|
||||||
setprop("/modes/altimeter/std", 0);
|
setprop("modes/altimeter/std", 0);
|
||||||
} else if (Std == 0) {
|
} else if (Std == 0) {
|
||||||
var qnh = getprop("/instrumentation/altimeter/setting-inhg");
|
var qnh = getprop("instrumentation/altimeter/setting-inhg");
|
||||||
setprop("/modes/altimeter/oldqnh", qnh);
|
setprop("modes/altimeter/oldqnh", qnh);
|
||||||
setprop("/instrumentation/altimeter/setting-inhg", 29.92);
|
setprop("instrumentation/altimeter/setting-inhg", 29.92);
|
||||||
setprop("/modes/altimeter/std", 1);
|
setprop("modes/altimeter/std", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -16,38 +16,38 @@ var ELEC = {
|
||||||
_timer1On: 0,
|
_timer1On: 0,
|
||||||
_timer2On: 0,
|
_timer2On: 0,
|
||||||
Bus: {
|
Bus: {
|
||||||
acEss: props.globals.getNode("/systems/electrical/bus/ac-ess"),
|
acEss: props.globals.getNode("systems/electrical/bus/ac-ess"),
|
||||||
acEssShed: props.globals.getNode("/systems/electrical/bus/ac-ess-shed"),
|
acEssShed: props.globals.getNode("systems/electrical/bus/ac-ess-shed"),
|
||||||
ac1: props.globals.getNode("/systems/electrical/bus/ac-1"),
|
ac1: props.globals.getNode("systems/electrical/bus/ac-1"),
|
||||||
ac2: props.globals.getNode("/systems/electrical/bus/ac-2"),
|
ac2: props.globals.getNode("systems/electrical/bus/ac-2"),
|
||||||
dcBat: props.globals.getNode("/systems/electrical/bus/dc-bat"),
|
dcBat: props.globals.getNode("systems/electrical/bus/dc-bat"),
|
||||||
dcEss: props.globals.getNode("/systems/electrical/bus/dc-ess"),
|
dcEss: props.globals.getNode("systems/electrical/bus/dc-ess"),
|
||||||
dcEssShed: props.globals.getNode("/systems/electrical/bus/dc-ess-shed"),
|
dcEssShed: props.globals.getNode("systems/electrical/bus/dc-ess-shed"),
|
||||||
dc1: props.globals.getNode("/systems/electrical/bus/dc-1"),
|
dc1: props.globals.getNode("systems/electrical/bus/dc-1"),
|
||||||
dc2: props.globals.getNode("/systems/electrical/bus/dc-2"),
|
dc2: props.globals.getNode("systems/electrical/bus/dc-2"),
|
||||||
dcHot1: props.globals.getNode("/systems/electrical/bus/dc-hot-1"),
|
dcHot1: props.globals.getNode("systems/electrical/bus/dc-hot-1"),
|
||||||
dcHot2: props.globals.getNode("/systems/electrical/bus/dc-hot-2"),
|
dcHot2: props.globals.getNode("systems/electrical/bus/dc-hot-2"),
|
||||||
},
|
},
|
||||||
Fail: {
|
Fail: {
|
||||||
acEssBusFault: props.globals.getNode("/systems/failures/electrical/ac-ess-bus"),
|
acEssBusFault: props.globals.getNode("systems/failures/electrical/ac-ess-bus"),
|
||||||
ac1BusFault: props.globals.getNode("/systems/failures/electrical/ac-1-bus"),
|
ac1BusFault: props.globals.getNode("systems/failures/electrical/ac-1-bus"),
|
||||||
ac2BusFault: props.globals.getNode("/systems/failures/electrical/ac-2-bus"),
|
ac2BusFault: props.globals.getNode("systems/failures/electrical/ac-2-bus"),
|
||||||
bat1Fault: props.globals.getNode("/systems/failures/electrical/bat-1"),
|
bat1Fault: props.globals.getNode("systems/failures/electrical/bat-1"),
|
||||||
bat2Fault: props.globals.getNode("/systems/failures/electrical/bat-2"),
|
bat2Fault: props.globals.getNode("systems/failures/electrical/bat-2"),
|
||||||
dcBatBusFault: props.globals.getNode("/systems/failures/electrical/dc-bat-bus"),
|
dcBatBusFault: props.globals.getNode("systems/failures/electrical/dc-bat-bus"),
|
||||||
dcEssBusFault: props.globals.getNode("/systems/failures/electrical/dc-ess-bus"),
|
dcEssBusFault: props.globals.getNode("systems/failures/electrical/dc-ess-bus"),
|
||||||
dc1BusFault: props.globals.getNode("/systems/failures/electrical/dc-1-bus"),
|
dc1BusFault: props.globals.getNode("systems/failures/electrical/dc-1-bus"),
|
||||||
dc2BusFault: props.globals.getNode("/systems/failures/electrical/dc-2-bus"),
|
dc2BusFault: props.globals.getNode("systems/failures/electrical/dc-2-bus"),
|
||||||
emerGenFault: props.globals.getNode("/systems/failures/electrical/emer-gen"),
|
emerGenFault: props.globals.getNode("systems/failures/electrical/emer-gen"),
|
||||||
essTrFault: props.globals.getNode("/systems/failures/electrical/ess-tr"),
|
essTrFault: props.globals.getNode("systems/failures/electrical/ess-tr"),
|
||||||
gen1Fault: props.globals.getNode("/systems/failures/electrical/gen-1"),
|
gen1Fault: props.globals.getNode("systems/failures/electrical/gen-1"),
|
||||||
gen2Fault: props.globals.getNode("/systems/failures/electrical/gen-2"),
|
gen2Fault: props.globals.getNode("systems/failures/electrical/gen-2"),
|
||||||
genApuFault: props.globals.getNode("/systems/failures/electrical/apu"),
|
genApuFault: props.globals.getNode("systems/failures/electrical/apu"),
|
||||||
idg1Fault: props.globals.getNode("/systems/failures/electrical/idg-1"), # oil leak or low press
|
idg1Fault: props.globals.getNode("systems/failures/electrical/idg-1"), # oil leak or low press
|
||||||
idg2Fault: props.globals.getNode("/systems/failures/electrical/idg-2"),
|
idg2Fault: props.globals.getNode("systems/failures/electrical/idg-2"),
|
||||||
statInvFault: props.globals.getNode("/systems/failures/electrical/stat-inv"),
|
statInvFault: props.globals.getNode("systems/failures/electrical/stat-inv"),
|
||||||
tr1Fault: props.globals.getNode("/systems/failures/electrical/tr-1"),
|
tr1Fault: props.globals.getNode("systems/failures/electrical/tr-1"),
|
||||||
tr2Fault: props.globals.getNode("/systems/failures/electrical/tr-2"),
|
tr2Fault: props.globals.getNode("systems/failures/electrical/tr-2"),
|
||||||
},
|
},
|
||||||
Generic: {
|
Generic: {
|
||||||
adf: props.globals.initNode("/systems/electrical/outputs/adf", 0, "DOUBLE"),
|
adf: props.globals.initNode("/systems/electrical/outputs/adf", 0, "DOUBLE"),
|
||||||
|
@ -72,50 +72,50 @@ var ELEC = {
|
||||||
Misc: {
|
Misc: {
|
||||||
},
|
},
|
||||||
Relay: {
|
Relay: {
|
||||||
essTrContactor: props.globals.getNode("/systems/electrical/relay/dc-ess-feed-tr/contact-pos"),
|
essTrContactor: props.globals.getNode("systems/electrical/relay/dc-ess-feed-tr/contact-pos"),
|
||||||
},
|
},
|
||||||
SomeThing: {
|
SomeThing: {
|
||||||
emerGenSignal: props.globals.getNode("/systems/electrical/some-electric-thingie/emer-gen-operate"),
|
emerGenSignal: props.globals.getNode("systems/electrical/some-electric-thingie/emer-gen-operate"),
|
||||||
},
|
},
|
||||||
Source: {
|
Source: {
|
||||||
Bat1: {
|
Bat1: {
|
||||||
amps: props.globals.getNode("/systems/electrical/sources/bat-1/amp"),
|
amps: props.globals.getNode("systems/electrical/sources/bat-1/amp"),
|
||||||
limiter: props.globals.getNode("/systems/electrical/sources/bat-1/limiter"),
|
limiter: props.globals.getNode("systems/electrical/sources/bat-1/limiter"),
|
||||||
percent: props.globals.getNode("/systems/electrical/sources/bat-1/percent"),
|
percent: props.globals.getNode("systems/electrical/sources/bat-1/percent"),
|
||||||
time: props.globals.getNode("/systems/electrical/sources/bat-1/time"),
|
time: props.globals.getNode("systems/electrical/sources/bat-1/time"),
|
||||||
},
|
},
|
||||||
Bat2: {
|
Bat2: {
|
||||||
amps: props.globals.getNode("/systems/electrical/sources/bat-2/amp"),
|
amps: props.globals.getNode("systems/electrical/sources/bat-2/amp"),
|
||||||
limiter: props.globals.getNode("/systems/electrical/sources/bat-2/limiter"),
|
limiter: props.globals.getNode("systems/electrical/sources/bat-2/limiter"),
|
||||||
percent: props.globals.getNode("/systems/electrical/sources/bat-2/percent"),
|
percent: props.globals.getNode("systems/electrical/sources/bat-2/percent"),
|
||||||
time: props.globals.getNode("/systems/electrical/sources/bat-2/time"),
|
time: props.globals.getNode("systems/electrical/sources/bat-2/time"),
|
||||||
},
|
},
|
||||||
trEss: {
|
trEss: {
|
||||||
outputVolt: props.globals.getNode("/systems/electrical/sources/tr-ess/output-volt"),
|
outputVolt: props.globals.getNode("systems/electrical/sources/tr-ess/output-volt"),
|
||||||
outputAmp: props.globals.getNode("/systems/electrical/sources/tr-ess/output-amp"),
|
outputAmp: props.globals.getNode("systems/electrical/sources/tr-ess/output-amp"),
|
||||||
},
|
},
|
||||||
IDG1: {
|
IDG1: {
|
||||||
gcrRelay: props.globals.getNode("/systems/electrical/sources/idg-1/gcr-relay"),
|
gcrRelay: props.globals.getNode("systems/electrical/sources/idg-1/gcr-relay"),
|
||||||
},
|
},
|
||||||
IDG2: {
|
IDG2: {
|
||||||
gcrRelay: props.globals.getNode("/systems/electrical/sources/idg-1/gcr-relay"),
|
gcrRelay: props.globals.getNode("systems/electrical/sources/idg-1/gcr-relay"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Switch: {
|
Switch: {
|
||||||
acEssFeed: props.globals.getNode("/controls/electrical/switches/ac-ess-feed"),
|
acEssFeed: props.globals.getNode("controls/electrical/switches/ac-ess-feed"),
|
||||||
busTie: props.globals.getNode("/controls/electrical/switches/bus-tie"),
|
busTie: props.globals.getNode("controls/electrical/switches/bus-tie"),
|
||||||
bat1: props.globals.getNode("/controls/electrical/switches/bat-1"),
|
bat1: props.globals.getNode("controls/electrical/switches/bat-1"),
|
||||||
bat2: props.globals.getNode("/controls/electrical/switches/bat-2"),
|
bat2: props.globals.getNode("controls/electrical/switches/bat-2"),
|
||||||
emerGenTest: props.globals.getNode("/controls/electrical/switches/emer-gen-test"),
|
emerGenTest: props.globals.getNode("controls/electrical/switches/emer-gen-test"),
|
||||||
extPwr: props.globals.getNode("/controls/electrical/switches/ext-pwr"),
|
extPwr: props.globals.getNode("controls/electrical/switches/ext-pwr"),
|
||||||
galley: props.globals.getNode("/controls/electrical/switches/galley"),
|
galley: props.globals.getNode("controls/electrical/switches/galley"),
|
||||||
gen1: props.globals.getNode("/controls/electrical/switches/gen-1"),
|
gen1: props.globals.getNode("controls/electrical/switches/gen-1"),
|
||||||
gen2: props.globals.getNode("/controls/electrical/switches/gen-2"),
|
gen2: props.globals.getNode("controls/electrical/switches/gen-2"),
|
||||||
genApu: props.globals.getNode("/controls/electrical/switches/apu"),
|
genApu: props.globals.getNode("controls/electrical/switches/apu"),
|
||||||
gen1Line: props.globals.getNode("/controls/electrical/switches/gen-1-line-contactor"),
|
gen1Line: props.globals.getNode("controls/electrical/switches/gen-1-line-contactor"),
|
||||||
idg1Disc: props.globals.getNode("/controls/electrical/switches/idg-1-disc"),
|
idg1Disc: props.globals.getNode("controls/electrical/switches/idg-1-disc"),
|
||||||
idg2Disc: props.globals.getNode("/controls/electrical/switches/idg-2-disc"),
|
idg2Disc: props.globals.getNode("controls/electrical/switches/idg-2-disc"),
|
||||||
emerElecManOn: props.globals.getNode("/controls/electrical/switches/emer-elec-man-on"), # non-reset
|
emerElecManOn: props.globals.getNode("controls/electrical/switches/emer-elec-man-on"), # non-reset
|
||||||
},
|
},
|
||||||
init: func() {
|
init: func() {
|
||||||
me.resetFail();
|
me.resetFail();
|
||||||
|
@ -172,64 +172,64 @@ var ELEC = {
|
||||||
dcbat = me.Bus.dcBat.getValue();
|
dcbat = me.Bus.dcBat.getValue();
|
||||||
|
|
||||||
if (battery1_percent < 100 and dcbat > 25 and battery1_sw and !batt1_fail) {
|
if (battery1_percent < 100 and dcbat > 25 and battery1_sw and !batt1_fail) {
|
||||||
if (battery1_time + 5 < getprop("/sim/time/elapsed-sec")) {
|
if (battery1_time + 5 < getprop("sim/time/elapsed-sec")) {
|
||||||
battery1_percent_calc = battery1_percent + 0.75; # Roughly 90 percent every 10 mins
|
battery1_percent_calc = battery1_percent + 0.75; # Roughly 90 percent every 10 mins
|
||||||
if (battery1_percent_calc > 100) {
|
if (battery1_percent_calc > 100) {
|
||||||
battery1_percent_calc = 100;
|
battery1_percent_calc = 100;
|
||||||
}
|
}
|
||||||
me.Source.Bat1.limiter.setBoolValue(1);
|
me.Source.Bat1.limiter.setBoolValue(1);
|
||||||
me.Source.Bat1.percent.setValue(battery1_percent_calc);
|
me.Source.Bat1.percent.setValue(battery1_percent_calc);
|
||||||
me.Source.Bat1.time.setValue(getprop("/sim/time/elapsed-sec"));
|
me.Source.Bat1.time.setValue(getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
} else if (battery1_percent == 100 and dcbat > 25 and battery1_sw and !batt1_fail) {
|
} else if (battery1_percent == 100 and dcbat > 25 and battery1_sw and !batt1_fail) {
|
||||||
me.Source.Bat1.time.setValue(getprop("/sim/time/elapsed-sec"));
|
me.Source.Bat1.time.setValue(getprop("sim/time/elapsed-sec"));
|
||||||
me.Source.Bat1.limiter.setBoolValue(0);
|
me.Source.Bat1.limiter.setBoolValue(0);
|
||||||
} else if (battery1_amps > 0 and battery1_sw and !batt1_fail) {
|
} else if (battery1_amps > 0 and battery1_sw and !batt1_fail) {
|
||||||
if (battery1_time + 5 < getprop("/sim/time/elapsed-sec")) {
|
if (battery1_time + 5 < getprop("sim/time/elapsed-sec")) {
|
||||||
battery1_percent_calc = battery1_percent - 0.25; # Roughly 90 percent every 30 mins
|
battery1_percent_calc = battery1_percent - 0.25; # Roughly 90 percent every 30 mins
|
||||||
if (battery1_percent_calc < 5) {
|
if (battery1_percent_calc < 5) {
|
||||||
battery1_percent_calc = 5;
|
battery1_percent_calc = 5;
|
||||||
}
|
}
|
||||||
me.Source.Bat1.limiter.setBoolValue(1);
|
me.Source.Bat1.limiter.setBoolValue(1);
|
||||||
me.Source.Bat1.percent.setValue(battery1_percent_calc);
|
me.Source.Bat1.percent.setValue(battery1_percent_calc);
|
||||||
me.Source.Bat1.time.setValue(getprop("/sim/time/elapsed-sec"));
|
me.Source.Bat1.time.setValue(getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
me.Source.Bat1.time.setValue(getprop("/sim/time/elapsed-sec"));
|
me.Source.Bat1.time.setValue(getprop("sim/time/elapsed-sec"));
|
||||||
me.Source.Bat1.limiter.setBoolValue(0);
|
me.Source.Bat1.limiter.setBoolValue(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (battery2_percent < 100 and dcbat > 25 and battery2_sw and !batt2_fail) {
|
if (battery2_percent < 100 and dcbat > 25 and battery2_sw and !batt2_fail) {
|
||||||
if (battery2_time + 5 < getprop("/sim/time/elapsed-sec")) {
|
if (battery2_time + 5 < getprop("sim/time/elapsed-sec")) {
|
||||||
battery2_percent_calc = battery2_percent + 0.75; # Roughly 90 percent every 10 mins
|
battery2_percent_calc = battery2_percent + 0.75; # Roughly 90 percent every 10 mins
|
||||||
if (battery2_percent_calc > 100) {
|
if (battery2_percent_calc > 100) {
|
||||||
battery2_percent_calc = 100;
|
battery2_percent_calc = 100;
|
||||||
}
|
}
|
||||||
me.Source.Bat2.limiter.setBoolValue(1);
|
me.Source.Bat2.limiter.setBoolValue(1);
|
||||||
me.Source.Bat2.percent.setValue(battery2_percent_calc);
|
me.Source.Bat2.percent.setValue(battery2_percent_calc);
|
||||||
me.Source.Bat2.time.setValue(getprop("/sim/time/elapsed-sec"));
|
me.Source.Bat2.time.setValue(getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
} else if (battery2_percent == 100 and dcbat > 25 and battery2_sw and !batt2_fail) {
|
} else if (battery2_percent == 100 and dcbat > 25 and battery2_sw and !batt2_fail) {
|
||||||
me.Source.Bat2.time.setValue(getprop("/sim/time/elapsed-sec"));
|
me.Source.Bat2.time.setValue(getprop("sim/time/elapsed-sec"));
|
||||||
me.Source.Bat2.limiter.setBoolValue(0);
|
me.Source.Bat2.limiter.setBoolValue(0);
|
||||||
} else if (battery2_amps > 0 and battery2_sw and !batt1_fail) {
|
} else if (battery2_amps > 0 and battery2_sw and !batt1_fail) {
|
||||||
if (battery2_time + 5 < getprop("/sim/time/elapsed-sec")) {
|
if (battery2_time + 5 < getprop("sim/time/elapsed-sec")) {
|
||||||
battery2_percent_calc = battery2_percent - 0.25; # Roughly 90 percent every 30 mins
|
battery2_percent_calc = battery2_percent - 0.25; # Roughly 90 percent every 30 mins
|
||||||
if (battery2_percent_calc < 5) {
|
if (battery2_percent_calc < 5) {
|
||||||
battery2_percent_calc = 5;
|
battery2_percent_calc = 5;
|
||||||
}
|
}
|
||||||
me.Source.Bat2.limiter.setBoolValue(1);
|
me.Source.Bat2.limiter.setBoolValue(1);
|
||||||
me.Source.Bat2.percent.setValue(battery2_percent_calc);
|
me.Source.Bat2.percent.setValue(battery2_percent_calc);
|
||||||
me.Source.Bat2.time.setValue(getprop("/sim/time/elapsed-sec"));
|
me.Source.Bat2.time.setValue(getprop("sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
me.Source.Bat2.time.setValue(getprop("/sim/time/elapsed-sec"));
|
me.Source.Bat2.time.setValue(getprop("sim/time/elapsed-sec"));
|
||||||
me.Source.Bat2.limiter.setBoolValue(0);
|
me.Source.Bat2.limiter.setBoolValue(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Autopilot Disconnection routines
|
# Autopilot Disconnection routines
|
||||||
if (me.Bus.dcEssShed.getValue() < 25) {
|
if (me.Bus.dcEssShed.getValue() < 25) {
|
||||||
if (getprop("/it-autoflight/output/ap1") == 1 and !me._timer1On) {
|
if (getprop("it-autoflight/output/ap1") == 1 and !me._timer1On) {
|
||||||
me._timer1On = 1;
|
me._timer1On = 1;
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
if (me.Bus.dcEssShed.getValue() < 25) {
|
if (me.Bus.dcEssShed.getValue() < 25) {
|
||||||
|
@ -244,7 +244,7 @@ var ELEC = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (me.Bus.dc2.getValue() < 25) {
|
if (me.Bus.dc2.getValue() < 25) {
|
||||||
if (getprop("/it-autoflight/output/ap2") == 1 and !me._timer2On) {
|
if (getprop("it-autoflight/output/ap2") == 1 and !me._timer2On) {
|
||||||
me._timer2On = 1;
|
me._timer2On = 1;
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
if (me.Bus.dc2.getValue() < 25) {
|
if (me.Bus.dc2.getValue() < 25) {
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
|
|
||||||
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
# Copyright (c) 2019 Joshua Davidson (Octal450)
|
||||||
|
|
||||||
var elapsedTime = props.globals.getNode("/sim/time/elapsed-sec");
|
var elapsedTime = props.globals.getNode("sim/time/elapsed-sec");
|
||||||
var apuTestBtn = props.globals.getNode("/controls/fire/apu-test-btn", 1);
|
var apuTestBtn = props.globals.getNode("controls/fire/apu-test-btn", 1);
|
||||||
var testBtn = props.globals.getNode("/controls/fire/test-btn-1", 1);
|
var testBtn = props.globals.getNode("controls/fire/test-btn-1", 1);
|
||||||
var testBtn2 = props.globals.getNode("/controls/fire/test-btn-2", 1);
|
var testBtn2 = props.globals.getNode("controls/fire/test-btn-2", 1);
|
||||||
var dischTest = props.globals.initNode("/systems/fire/cargo/disch-test", 0, "BOOL");
|
var dischTest = props.globals.initNode("/systems/fire/cargo/disch-test", 0, "BOOL");
|
||||||
var cargoTestBtn = props.globals.initNode("/controls/fire/cargo/test", 0, "BOOL");
|
var cargoTestBtn = props.globals.initNode("/controls/fire/cargo/test", 0, "BOOL");
|
||||||
var cargoTestTime = props.globals.initNode("/controls/fire/cargo/test-time", 0, "DOUBLE");
|
var cargoTestTime = props.globals.initNode("/controls/fire/cargo/test-time", 0, "DOUBLE");
|
||||||
|
@ -22,7 +22,7 @@ var eng2Inop = props.globals.initNode("/systems/fire/engine2/det-inop", 0, "BOOL
|
||||||
var apuInop = props.globals.initNode("/systems/fire/apu/det-inop", 0, "BOOL");
|
var apuInop = props.globals.initNode("/systems/fire/apu/det-inop", 0, "BOOL");
|
||||||
var aftCargoFireWarn = props.globals.initNode("/systems/fire/cargo/aft/warning-active", 0, "BOOL");
|
var aftCargoFireWarn = props.globals.initNode("/systems/fire/cargo/aft/warning-active", 0, "BOOL");
|
||||||
var fwdCargoFireWarn = props.globals.initNode("/systems/fire/cargo/fwd/warning-active", 0, "BOOL");
|
var fwdCargoFireWarn = props.globals.initNode("/systems/fire/cargo/fwd/warning-active", 0, "BOOL");
|
||||||
var apuEmerShutdown = props.globals.getNode("/systems/apu/emer-shutdown", 1);
|
var apuEmerShutdown = props.globals.getNode("systems/apu/emer-shutdown", 1);
|
||||||
var eng1AgentTimer = props.globals.initNode("/systems/fire/engine1/agent1-timer", 99, "INT");
|
var eng1AgentTimer = props.globals.initNode("/systems/fire/engine1/agent1-timer", 99, "INT");
|
||||||
var eng2AgentTimer = props.globals.initNode("/systems/fire/engine2/agent1-timer", 99, "INT");
|
var eng2AgentTimer = props.globals.initNode("/systems/fire/engine2/agent1-timer", 99, "INT");
|
||||||
var eng1Agent2Timer = props.globals.initNode("/systems/fire/engine1/agent2-timer", 99, "INT");
|
var eng1Agent2Timer = props.globals.initNode("/systems/fire/engine1/agent2-timer", 99, "INT");
|
||||||
|
@ -33,20 +33,20 @@ var eng2AgentTimerTime = props.globals.initNode("/systems/fire/engine2/agent1-ti
|
||||||
var eng1Agent2TimerTime = props.globals.initNode("/systems/fire/engine1/agent2-timer-time", 0, "INT");
|
var eng1Agent2TimerTime = props.globals.initNode("/systems/fire/engine1/agent2-timer-time", 0, "INT");
|
||||||
var eng2Agent2TimerTime = props.globals.initNode("/systems/fire/engine2/agent2-timer-time", 0, "INT");
|
var eng2Agent2TimerTime = props.globals.initNode("/systems/fire/engine2/agent2-timer-time", 0, "INT");
|
||||||
var apuAgentTimerTime = props.globals.initNode("/systems/fire/apu/agent-timer-time", 0, "INT");
|
var apuAgentTimerTime = props.globals.initNode("/systems/fire/apu/agent-timer-time", 0, "INT");
|
||||||
var wow = props.globals.getNode("/fdm/jsbsim/position/wow", 1);
|
var wow = props.globals.getNode("fdm/jsbsim/position/wow", 1);
|
||||||
var dcbatNode = props.globals.getNode("systems/electrical/bus/dc-bat", 1);
|
var dcbatNode = props.globals.getNode("systems/electrical/bus/dc-bat", 1);
|
||||||
var dcessNode = props.globals.getNode("systems/electrical/bus/dc-ess", 1);
|
var dcessNode = props.globals.getNode("systems/electrical/bus/dc-ess", 1);
|
||||||
var apuBleedNode = props.globals.getNode("/systems/apu/bleed-used", 1);
|
var apuBleedNode = props.globals.getNode("systems/apu/bleed-used", 1);
|
||||||
var apuMaster = props.globals.getNode("/controls/APU/master", 1);
|
var apuMaster = props.globals.getNode("controls/APU/master", 1);
|
||||||
|
|
||||||
var fire_init = func {
|
var fire_init = func {
|
||||||
setprop("/controls/OH/protectors/fwddisch", 0);
|
setprop("controls/OH/protectors/fwddisch", 0);
|
||||||
setprop("/controls/OH/protectors/aftdisch", 0);
|
setprop("controls/OH/protectors/aftdisch", 0);
|
||||||
setprop("/controls/fire/cargo/fwddisch", 0);
|
setprop("controls/fire/cargo/fwddisch", 0);
|
||||||
setprop("/controls/fire/cargo/aftdisch", 0);
|
setprop("controls/fire/cargo/aftdisch", 0);
|
||||||
setprop("/systems/failures/cargo-fwd-fire", 0);
|
setprop("systems/failures/cargo-fwd-fire", 0);
|
||||||
setprop("/systems/failures/cargo-aft-fire", 0);
|
setprop("systems/failures/cargo-aft-fire", 0);
|
||||||
setprop("/controls/fire/cargo/test", 0);
|
setprop("controls/fire/cargo/test", 0);
|
||||||
fire_timer.start();
|
fire_timer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ var engFireDetectorUnit = {
|
||||||
eF.loopTwo = 0;
|
eF.loopTwo = 0;
|
||||||
eF.fireProp = props.globals.getNode(fireProp, 1);
|
eF.fireProp = props.globals.getNode(fireProp, 1);
|
||||||
eF.testProp = props.globals.getNode(testProp, 1);
|
eF.testProp = props.globals.getNode(testProp, 1);
|
||||||
eF.wow = props.globals.getNode("/fdm/jsbsim/position/wow", 1);
|
eF.wow = props.globals.getNode("fdm/jsbsim/position/wow", 1);
|
||||||
eF.condition = 100;
|
eF.condition = 100;
|
||||||
return eF;
|
return eF;
|
||||||
},
|
},
|
||||||
|
@ -292,9 +292,9 @@ var detectorLoop = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sendSignal: func(system, typeLoop) {
|
sendSignal: func(system, typeLoop) {
|
||||||
if (system == 0 and !getprop("/systems/failures/engine-left-fire")) { return; }
|
if (system == 0 and !getprop("systems/failures/engine-left-fire")) { return; }
|
||||||
elsif (system == 1 and !getprop("/systems/failures/engine-right-fire")) { return; }
|
elsif (system == 1 and !getprop("systems/failures/engine-right-fire")) { return; }
|
||||||
elsif (system == 2 and !getprop("/systems/failures/apu-fire")) { return; }
|
elsif (system == 2 and !getprop("systems/failures/apu-fire")) { return; }
|
||||||
engFireDetectorUnits.vector[system].receiveSignal(typeLoop);
|
engFireDetectorUnits.vector[system].receiveSignal(typeLoop);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -319,8 +319,8 @@ var cargoDetectorLoop = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sendSignal: func(system, typeLoop) {
|
sendSignal: func(system, typeLoop) {
|
||||||
if ((system == 0 or system == 1) and !getprop("/systems/failures/cargo-aft-fire")) { return; }
|
if ((system == 0 or system == 1) and !getprop("systems/failures/cargo-aft-fire")) { return; }
|
||||||
elsif (system == 2 and !getprop("/systems/failures/cargo-fwd-fire")) { return; }
|
elsif (system == 2 and !getprop("systems/failures/cargo-fwd-fire")) { return; }
|
||||||
|
|
||||||
cargoSmokeDetectorUnits.vector[system].receiveSignal(typeLoop);
|
cargoSmokeDetectorUnits.vector[system].receiveSignal(typeLoop);
|
||||||
}
|
}
|
||||||
|
@ -560,7 +560,7 @@ var createCargoFireBottleListener = func(prop, index) {
|
||||||
|
|
||||||
# Listeners
|
# Listeners
|
||||||
setlistener("/controls/engines/engine[0]/fire-btn", func() {
|
setlistener("/controls/engines/engine[0]/fire-btn", func() {
|
||||||
if (getprop("/controls/engines/engine[0]/fire-btn") == 1) {
|
if (getprop("controls/engines/engine[0]/fire-btn") == 1) {
|
||||||
ecam.shutUpYou();
|
ecam.shutUpYou();
|
||||||
eng1AgentTimerMakeTimer.stop();
|
eng1AgentTimerMakeTimer.stop();
|
||||||
eng1AgentTimer.setValue(10);
|
eng1AgentTimer.setValue(10);
|
||||||
|
@ -570,7 +570,7 @@ setlistener("/controls/engines/engine[0]/fire-btn", func() {
|
||||||
}, 0, 0);
|
}, 0, 0);
|
||||||
|
|
||||||
setlistener("/systems/fire/engine1/disch1", func() {
|
setlistener("/systems/fire/engine1/disch1", func() {
|
||||||
if (getprop("/systems/fire/engine1/disch1") == 1) {
|
if (getprop("systems/fire/engine1/disch1") == 1) {
|
||||||
eng1Agent2TimerMakeTimer.stop();
|
eng1Agent2TimerMakeTimer.stop();
|
||||||
eng1Agent2Timer.setValue(30);
|
eng1Agent2Timer.setValue(30);
|
||||||
eng1Agent2TimerTime.setValue(elapsedTime.getValue() + 31);
|
eng1Agent2TimerTime.setValue(elapsedTime.getValue() + 31);
|
||||||
|
@ -603,7 +603,7 @@ eng1Agent2TimerMakeTimerFunc = func() {
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/controls/engines/engine[1]/fire-btn", func() {
|
setlistener("/controls/engines/engine[1]/fire-btn", func() {
|
||||||
if (getprop("/controls/engines/engine[1]/fire-btn") == 1) {
|
if (getprop("controls/engines/engine[1]/fire-btn") == 1) {
|
||||||
ecam.shutUpYou();
|
ecam.shutUpYou();
|
||||||
eng2AgentTimerMakeTimer.stop();
|
eng2AgentTimerMakeTimer.stop();
|
||||||
eng2AgentTimer.setValue(10);
|
eng2AgentTimer.setValue(10);
|
||||||
|
@ -613,7 +613,7 @@ setlistener("/controls/engines/engine[1]/fire-btn", func() {
|
||||||
}, 0, 0);
|
}, 0, 0);
|
||||||
|
|
||||||
setlistener("/systems/fire/engine2/disch1", func() {
|
setlistener("/systems/fire/engine2/disch1", func() {
|
||||||
if (getprop("/systems/fire/engine2/disch1") == 1) {
|
if (getprop("systems/fire/engine2/disch1") == 1) {
|
||||||
eng2Agent2TimerMakeTimer.stop();
|
eng2Agent2TimerMakeTimer.stop();
|
||||||
eng2Agent2Timer.setValue(30);
|
eng2Agent2Timer.setValue(30);
|
||||||
eng2Agent2TimerTime.setValue(elapsedTime.getValue() + 31);
|
eng2Agent2TimerTime.setValue(elapsedTime.getValue() + 31);
|
||||||
|
@ -646,7 +646,7 @@ eng2Agent2TimerMakeTimerFunc = func() {
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/controls/APU/fire-btn", func() {
|
setlistener("/controls/APU/fire-btn", func() {
|
||||||
if (getprop("/controls/APU/fire-btn") == 1) {
|
if (getprop("controls/APU/fire-btn") == 1) {
|
||||||
ecam.shutUpYou();
|
ecam.shutUpYou();
|
||||||
apuAgentTimerMakeTimer.stop();
|
apuAgentTimerMakeTimer.stop();
|
||||||
apuAgentTimer.setValue(10);
|
apuAgentTimer.setValue(10);
|
||||||
|
@ -667,7 +667,7 @@ apuAgentTimerMakeTimerFunc = func() {
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/controls/fire/test-btn-1", func() {
|
setlistener("/controls/fire/test-btn-1", func() {
|
||||||
if (getprop("/systems/failures/engine-left-fire")) { return; }
|
if (getprop("systems/failures/engine-left-fire")) { return; }
|
||||||
|
|
||||||
if (testBtn.getValue() == 1) {
|
if (testBtn.getValue() == 1) {
|
||||||
if (dcbatNode.getValue() > 25 or dcessNode.getValue() > 25) {
|
if (dcbatNode.getValue() > 25 or dcessNode.getValue() > 25) {
|
||||||
|
@ -680,7 +680,7 @@ setlistener("/controls/fire/test-btn-1", func() {
|
||||||
}, 0, 0);
|
}, 0, 0);
|
||||||
|
|
||||||
setlistener("/controls/fire/test-btn-2", func() {
|
setlistener("/controls/fire/test-btn-2", func() {
|
||||||
if (getprop("/systems/failures/engine-right-fire")) { return; }
|
if (getprop("systems/failures/engine-right-fire")) { return; }
|
||||||
if (testBtn2.getValue() == 1) {
|
if (testBtn2.getValue() == 1) {
|
||||||
if (dcbatNode.getValue() > 25 or dcessNode.getValue() > 25) {
|
if (dcbatNode.getValue() > 25 or dcessNode.getValue() > 25) {
|
||||||
eng2FireWarn.setBoolValue(1);
|
eng2FireWarn.setBoolValue(1);
|
||||||
|
@ -692,7 +692,7 @@ setlistener("/controls/fire/test-btn-2", func() {
|
||||||
}, 0, 0);
|
}, 0, 0);
|
||||||
|
|
||||||
setlistener("/controls/fire/apu-test-btn", func() {
|
setlistener("/controls/fire/apu-test-btn", func() {
|
||||||
if (getprop("/systems/failures/apu-fire")) { return; }
|
if (getprop("systems/failures/apu-fire")) { return; }
|
||||||
if (apuTestBtn.getValue() == 1) {
|
if (apuTestBtn.getValue() == 1) {
|
||||||
if (dcbatNode.getValue() > 25 or dcessNode.getValue() > 25) {
|
if (dcbatNode.getValue() > 25 or dcessNode.getValue() > 25) {
|
||||||
apuFireWarn.setBoolValue(1);
|
apuFireWarn.setBoolValue(1);
|
||||||
|
@ -704,7 +704,7 @@ setlistener("/controls/fire/apu-test-btn", func() {
|
||||||
}, 0, 0);
|
}, 0, 0);
|
||||||
|
|
||||||
setlistener("/controls/fire/cargo/test", func() {
|
setlistener("/controls/fire/cargo/test", func() {
|
||||||
if (getprop("/systems/failures/aft-cargo-fire") or getprop("/systems/failures/fwd-cargo-fire") or dcbatNode.getValue() < 25 or dcessNode.getValue() < 25) { return; }
|
if (getprop("systems/failures/aft-cargo-fire") or getprop("systems/failures/fwd-cargo-fire") or dcbatNode.getValue() < 25 or dcessNode.getValue() < 25) { return; }
|
||||||
if (cargoTestBtn.getBoolValue()) {
|
if (cargoTestBtn.getBoolValue()) {
|
||||||
cargoTestTime.setValue(elapsedTime.getValue());
|
cargoTestTime.setValue(elapsedTime.getValue());
|
||||||
cargoTestChecker.start();
|
cargoTestChecker.start();
|
||||||
|
|
|
@ -7,48 +7,48 @@ var FUEL = {
|
||||||
offset1: 0,
|
offset1: 0,
|
||||||
offset2: 0,
|
offset2: 0,
|
||||||
timeEngStart: 0,
|
timeEngStart: 0,
|
||||||
cmdCtrOn: props.globals.getNode("/systems/fuel/ctr-pump-cmd-on-eng-start"),
|
cmdCtrOn: props.globals.getNode("systems/fuel/ctr-pump-cmd-on-eng-start"),
|
||||||
refuelling: props.globals.getNode("/systems/fuel/refuel/refuelling"),
|
refuelling: props.globals.getNode("systems/fuel/refuel/refuelling"),
|
||||||
|
|
||||||
Fail: {
|
Fail: {
|
||||||
},
|
},
|
||||||
Switches: {
|
Switches: {
|
||||||
centerTkMode: props.globals.getNode("/controls/fuel/switches/center-mode"),
|
centerTkMode: props.globals.getNode("controls/fuel/switches/center-mode"),
|
||||||
crossfeed: props.globals.getNode("/controls/fuel/switches/crossfeed"),
|
crossfeed: props.globals.getNode("controls/fuel/switches/crossfeed"),
|
||||||
pumpLeft1: props.globals.getNode("/controls/fuel/switches/pump-left-1"),
|
pumpLeft1: props.globals.getNode("controls/fuel/switches/pump-left-1"),
|
||||||
pumpLeft2: props.globals.getNode("/controls/fuel/switches/pump-left-2"),
|
pumpLeft2: props.globals.getNode("controls/fuel/switches/pump-left-2"),
|
||||||
pumpCenter1: props.globals.getNode("/controls/fuel/switches/pump-center-1"),
|
pumpCenter1: props.globals.getNode("controls/fuel/switches/pump-center-1"),
|
||||||
pumpCenter2: props.globals.getNode("/controls/fuel/switches/pump-center-2"),
|
pumpCenter2: props.globals.getNode("controls/fuel/switches/pump-center-2"),
|
||||||
pumpRight1: props.globals.getNode("/controls/fuel/switches/pump-right-1"),
|
pumpRight1: props.globals.getNode("controls/fuel/switches/pump-right-1"),
|
||||||
pumpRight2: props.globals.getNode("/controls/fuel/switches/pump-right-2"),
|
pumpRight2: props.globals.getNode("controls/fuel/switches/pump-right-2"),
|
||||||
},
|
},
|
||||||
Pumps: {
|
Pumps: {
|
||||||
apu: props.globals.getNode("/systems/fuel/pumps/apu-operate"),
|
apu: props.globals.getNode("systems/fuel/pumps/apu-operate"),
|
||||||
allOff: props.globals.getNode("/systems/fuel/pumps/all-eng-pump-off"),
|
allOff: props.globals.getNode("systems/fuel/pumps/all-eng-pump-off"),
|
||||||
},
|
},
|
||||||
Valves: {
|
Valves: {
|
||||||
crossfeed: props.globals.getNode("/systems/fuel/valves/crossfeed-valve"),
|
crossfeed: props.globals.getNode("systems/fuel/valves/crossfeed-valve"),
|
||||||
lpValve1: props.globals.getNode("/systems/fuel/valves/engine-1-lp-valve"),
|
lpValve1: props.globals.getNode("systems/fuel/valves/engine-1-lp-valve"),
|
||||||
lpValve2: props.globals.getNode("/systems/fuel/valves/engine-2-lp-valve"),
|
lpValve2: props.globals.getNode("systems/fuel/valves/engine-2-lp-valve"),
|
||||||
transfer1: props.globals.getNode("/systems/fuel/valves/outer-inner-transfer-valve-1"),
|
transfer1: props.globals.getNode("systems/fuel/valves/outer-inner-transfer-valve-1"),
|
||||||
transfer2: props.globals.getNode("/systems/fuel/valves/outer-inner-transfer-valve-2"),
|
transfer2: props.globals.getNode("systems/fuel/valves/outer-inner-transfer-valve-2"),
|
||||||
refuelLeft: props.globals.getNode("/systems/fuel/refuel/left-valve"),
|
refuelLeft: props.globals.getNode("systems/fuel/refuel/left-valve"),
|
||||||
refuelCenter: props.globals.getNode("/systems/fuel/refuel/center-valve"),
|
refuelCenter: props.globals.getNode("systems/fuel/refuel/center-valve"),
|
||||||
refuelRight: props.globals.getNode("/systems/fuel/refuel/right-valve"),
|
refuelRight: props.globals.getNode("systems/fuel/refuel/right-valve"),
|
||||||
},
|
},
|
||||||
Quantity: {
|
Quantity: {
|
||||||
leftOuter: props.globals.getNode("/consumables/fuel/tank[0]/level-lbs"),
|
leftOuter: props.globals.getNode("consumables/fuel/tank[0]/level-lbs"),
|
||||||
leftOuterPct: props.globals.getNode("/consumables/fuel/tank[0]/level-norm"),
|
leftOuterPct: props.globals.getNode("consumables/fuel/tank[0]/level-norm"),
|
||||||
leftInner: props.globals.getNode("/consumables/fuel/tank[1]/level-lbs"),
|
leftInner: props.globals.getNode("consumables/fuel/tank[1]/level-lbs"),
|
||||||
leftInnerPct: props.globals.getNode("/consumables/fuel/tank[1]/level-norm"),
|
leftInnerPct: props.globals.getNode("consumables/fuel/tank[1]/level-norm"),
|
||||||
center: props.globals.getNode("/consumables/fuel/tank[2]/level-lbs"),
|
center: props.globals.getNode("consumables/fuel/tank[2]/level-lbs"),
|
||||||
centerPct: props.globals.getNode("/consumables/fuel/tank[2]/level-norm"),
|
centerPct: props.globals.getNode("consumables/fuel/tank[2]/level-norm"),
|
||||||
rightInner: props.globals.getNode("/consumables/fuel/tank[3]/level-lbs"),
|
rightInner: props.globals.getNode("consumables/fuel/tank[3]/level-lbs"),
|
||||||
rightInnerPct: props.globals.getNode("/consumables/fuel/tank[3]/level-norm"),
|
rightInnerPct: props.globals.getNode("consumables/fuel/tank[3]/level-norm"),
|
||||||
rightOuter: props.globals.getNode("/consumables/fuel/tank[4]/level-lbs"),
|
rightOuter: props.globals.getNode("consumables/fuel/tank[4]/level-lbs"),
|
||||||
rightOuterPct: props.globals.getNode("/consumables/fuel/tank[4]/level-norm"),
|
rightOuterPct: props.globals.getNode("consumables/fuel/tank[4]/level-norm"),
|
||||||
usedLeft: props.globals.getNode("/systems/fuel/fuel-used-1"),
|
usedLeft: props.globals.getNode("systems/fuel/fuel-used-1"),
|
||||||
usedRight: props.globals.getNode("/systems/fuel/fuel-used-2"),
|
usedRight: props.globals.getNode("systems/fuel/fuel-used-2"),
|
||||||
},
|
},
|
||||||
resetFail: func() {
|
resetFail: func() {
|
||||||
|
|
||||||
|
@ -84,162 +84,162 @@ setlistener("/engines/engine[1]/state", func() {
|
||||||
|
|
||||||
var FUELx = {
|
var FUELx = {
|
||||||
init: func() {
|
init: func() {
|
||||||
setprop("/systems/fuel/gravityfeedL", 0);
|
setprop("systems/fuel/gravityfeedL", 0);
|
||||||
setprop("/systems/fuel/gravityfeedR", 0);
|
setprop("systems/fuel/gravityfeedR", 0);
|
||||||
setprop("/systems/fuel/gravityfeedL-output", 0);
|
setprop("systems/fuel/gravityfeedL-output", 0);
|
||||||
setprop("/systems/fuel/gravityfeedR-output", 0);
|
setprop("systems/fuel/gravityfeedR-output", 0);
|
||||||
setprop("/controls/fuel/x-feed", 0);
|
setprop("controls/fuel/x-feed", 0);
|
||||||
setprop("/controls/fuel/tank0pump1", 0);
|
setprop("controls/fuel/tank0pump1", 0);
|
||||||
setprop("/controls/fuel/tank0pump2", 0);
|
setprop("controls/fuel/tank0pump2", 0);
|
||||||
setprop("/controls/fuel/tank1pump1", 0);
|
setprop("controls/fuel/tank1pump1", 0);
|
||||||
setprop("/controls/fuel/tank1pump2", 0);
|
setprop("controls/fuel/tank1pump2", 0);
|
||||||
setprop("/controls/fuel/tank2pump1", 0);
|
setprop("controls/fuel/tank2pump1", 0);
|
||||||
setprop("/controls/fuel/tank2pump2", 0);
|
setprop("controls/fuel/tank2pump2", 0);
|
||||||
setprop("/controls/fuel/mode", 1);
|
setprop("controls/fuel/mode", 1);
|
||||||
setprop("/systems/fuel/valves/crossfeed-valve", 0);
|
setprop("systems/fuel/valves/crossfeed-valve", 0);
|
||||||
setprop("/systems/fuel/tank[0]/feed", 0);
|
setprop("systems/fuel/tank[0]/feed", 0);
|
||||||
setprop("/systems/fuel/tank[1]/feed", 0);
|
setprop("systems/fuel/tank[1]/feed", 0);
|
||||||
setprop("/systems/fuel/tank[2]/feed", 0);
|
setprop("systems/fuel/tank[2]/feed", 0);
|
||||||
setprop("/systems/fuel/only-use-ctr-tank", 0);
|
setprop("systems/fuel/only-use-ctr-tank", 0);
|
||||||
setprop("/systems/fuel/tank0pump1-fault", 0);
|
setprop("systems/fuel/tank0pump1-fault", 0);
|
||||||
setprop("/systems/fuel/tank0pump2-fault", 0);
|
setprop("systems/fuel/tank0pump2-fault", 0);
|
||||||
setprop("/systems/fuel/tank1pump1-fault", 0);
|
setprop("systems/fuel/tank1pump1-fault", 0);
|
||||||
setprop("/systems/fuel/tank1pump2-fault", 0);
|
setprop("systems/fuel/tank1pump2-fault", 0);
|
||||||
setprop("/systems/fuel/tank2pump1-fault", 0);
|
setprop("systems/fuel/tank2pump1-fault", 0);
|
||||||
setprop("/systems/fuel/tank2pump2-fault", 0);
|
setprop("systems/fuel/tank2pump2-fault", 0);
|
||||||
setprop("/systems/fuel/mode-fault", 0);
|
setprop("systems/fuel/mode-fault", 0);
|
||||||
},
|
},
|
||||||
loop: func() {
|
loop: func() {
|
||||||
xfeed_sw = getprop("/controls/fuel/x-feed");
|
xfeed_sw = getprop("controls/fuel/x-feed");
|
||||||
tank0pump1_sw = getprop("/controls/fuel/tank0pump1");
|
tank0pump1_sw = getprop("controls/fuel/tank0pump1");
|
||||||
tank0pump2_sw = getprop("/controls/fuel/tank0pump2");
|
tank0pump2_sw = getprop("controls/fuel/tank0pump2");
|
||||||
tank1pump1_sw = getprop("/controls/fuel/tank1pump1");
|
tank1pump1_sw = getprop("controls/fuel/tank1pump1");
|
||||||
tank1pump2_sw = getprop("/controls/fuel/tank1pump2");
|
tank1pump2_sw = getprop("controls/fuel/tank1pump2");
|
||||||
tank2pump1_sw = getprop("/controls/fuel/tank2pump1");
|
tank2pump1_sw = getprop("controls/fuel/tank2pump1");
|
||||||
tank2pump2_sw = getprop("/controls/fuel/tank2pump2");
|
tank2pump2_sw = getprop("controls/fuel/tank2pump2");
|
||||||
mode_sw = getprop("/controls/fuel/mode");
|
mode_sw = getprop("controls/fuel/mode");
|
||||||
xfeed = getprop("/systems/fuel/valves/crossfeed-valve");
|
xfeed = getprop("systems/fuel/valves/crossfeed-valve");
|
||||||
ac1 = getprop("/systems/electrical/bus/ac-1");
|
ac1 = getprop("systems/electrical/bus/ac-1");
|
||||||
ac2 = getprop("/systems/electrical/bus/ac-2");
|
ac2 = getprop("systems/electrical/bus/ac-2");
|
||||||
gravityfeedL = getprop("/systems/fuel/gravityfeedL");
|
gravityfeedL = getprop("systems/fuel/gravityfeedL");
|
||||||
gravityfeedR = getprop("/systems/fuel/gravityfeedR");
|
gravityfeedR = getprop("systems/fuel/gravityfeedR");
|
||||||
gload = getprop("/accelerations/pilot-gdamped");
|
gload = getprop("accelerations/pilot-gdamped");
|
||||||
tank0pump1_fail = getprop("/systems/failures/tank0pump1");
|
tank0pump1_fail = getprop("systems/failures/tank0pump1");
|
||||||
tank0pump2_fail = getprop("/systems/failures/tank0pump2");
|
tank0pump2_fail = getprop("systems/failures/tank0pump2");
|
||||||
tank1pump1_fail = getprop("/systems/failures/tank1pump1");
|
tank1pump1_fail = getprop("systems/failures/tank1pump1");
|
||||||
tank1pump2_fail = getprop("/systems/failures/tank1pump2");
|
tank1pump2_fail = getprop("systems/failures/tank1pump2");
|
||||||
tank2pump1_fail = getprop("/systems/failures/tank2pump1");
|
tank2pump1_fail = getprop("systems/failures/tank2pump1");
|
||||||
tank2pump2_fail = getprop("/systems/failures/tank2pump2");
|
tank2pump2_fail = getprop("systems/failures/tank2pump2");
|
||||||
|
|
||||||
if (gload >= 0.7 and gravityfeedL) {
|
if (gload >= 0.7 and gravityfeedL) {
|
||||||
setprop("/systems/fuel/gravityfeedL-output", 1);
|
setprop("systems/fuel/gravityfeedL-output", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/gravityfeedL-output", 0);
|
setprop("systems/fuel/gravityfeedL-output", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gload >= 0.7 and gravityfeedR) {
|
if (gload >= 0.7 and gravityfeedR) {
|
||||||
setprop("/systems/fuel/gravityfeedR-output", 1);
|
setprop("systems/fuel/gravityfeedR-output", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/gravityfeedR-output", 0);
|
setprop("systems/fuel/gravityfeedR-output", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
gravityfeedL_output = getprop("/systems/fuel/gravityfeedL-output");
|
gravityfeedL_output = getprop("systems/fuel/gravityfeedL-output");
|
||||||
gravityfeedR_output = getprop("/systems/fuel/gravityfeedR-output");
|
gravityfeedR_output = getprop("systems/fuel/gravityfeedR-output");
|
||||||
|
|
||||||
if ((ac1 >= 110 or ac2 >= 110) and tank0pump1_sw and !tank0pump1_fail) {
|
if ((ac1 >= 110 or ac2 >= 110) and tank0pump1_sw and !tank0pump1_fail) {
|
||||||
setprop("/systems/fuel/tank[0]/feed", 1);
|
setprop("systems/fuel/tank[0]/feed", 1);
|
||||||
} else if ((ac1 >= 110 or ac2 >= 110) and tank0pump2_sw and !tank0pump2_fail) {
|
} else if ((ac1 >= 110 or ac2 >= 110) and tank0pump2_sw and !tank0pump2_fail) {
|
||||||
setprop("/systems/fuel/tank[0]/feed", 1);
|
setprop("systems/fuel/tank[0]/feed", 1);
|
||||||
} else if (gravityfeedL_output) {
|
} else if (gravityfeedL_output) {
|
||||||
setprop("/systems/fuel/tank[0]/feed", 1);
|
setprop("systems/fuel/tank[0]/feed", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/tank[0]/feed", 0);
|
setprop("systems/fuel/tank[0]/feed", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ac1 >= 110 or ac2 >= 110) and tank1pump1_sw and !tank1pump1_fail) {
|
if ((ac1 >= 110 or ac2 >= 110) and tank1pump1_sw and !tank1pump1_fail) {
|
||||||
setprop("/systems/fuel/tank[1]/feed", 1);
|
setprop("systems/fuel/tank[1]/feed", 1);
|
||||||
} else if ((ac1 >= 110 or ac2 >= 110) and tank1pump2_sw and !tank1pump2_fail) {
|
} else if ((ac1 >= 110 or ac2 >= 110) and tank1pump2_sw and !tank1pump2_fail) {
|
||||||
setprop("/systems/fuel/tank[1]/feed", 1);
|
setprop("systems/fuel/tank[1]/feed", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/tank[1]/feed", 0);
|
setprop("systems/fuel/tank[1]/feed", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ac1 >= 110 or ac2 >= 110) and tank2pump1_sw and !tank2pump1_fail) {
|
if ((ac1 >= 110 or ac2 >= 110) and tank2pump1_sw and !tank2pump1_fail) {
|
||||||
setprop("/systems/fuel/tank[2]/feed", 1);
|
setprop("systems/fuel/tank[2]/feed", 1);
|
||||||
} else if ((ac1 >= 110 or ac2 >= 110) and tank2pump2_sw and !tank2pump2_fail) {
|
} else if ((ac1 >= 110 or ac2 >= 110) and tank2pump2_sw and !tank2pump2_fail) {
|
||||||
setprop("/systems/fuel/tank[2]/feed", 1);
|
setprop("systems/fuel/tank[2]/feed", 1);
|
||||||
} else if (gravityfeedR_output) {
|
} else if (gravityfeedR_output) {
|
||||||
setprop("/systems/fuel/tank[2]/feed", 1);
|
setprop("systems/fuel/tank[2]/feed", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/tank[2]/feed", 0);
|
setprop("systems/fuel/tank[2]/feed", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ac1 >= 110 or ac2 >= 110) and xfeed_sw) {
|
if ((ac1 >= 110 or ac2 >= 110) and xfeed_sw) {
|
||||||
setprop("/systems/fuel/valves/crossfeed-valve", 1);
|
setprop("systems/fuel/valves/crossfeed-valve", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/valves/crossfeed-valve", 0);
|
setprop("systems/fuel/valves/crossfeed-valve", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
tank0 = getprop("/systems/fuel/tank[0]/feed");
|
tank0 = getprop("systems/fuel/tank[0]/feed");
|
||||||
tank1 = getprop("/systems/fuel/tank[1]/feed");
|
tank1 = getprop("systems/fuel/tank[1]/feed");
|
||||||
tank2 = getprop("/systems/fuel/tank[2]/feed");
|
tank2 = getprop("systems/fuel/tank[2]/feed");
|
||||||
|
|
||||||
if ((ac1 >= 110 or ac2 >= 110) and (tank0pump1_sw or tank0pump2_sw)) {
|
if ((ac1 >= 110 or ac2 >= 110) and (tank0pump1_sw or tank0pump2_sw)) {
|
||||||
setprop("/systems/fuel/gravityfeedL", 0);
|
setprop("systems/fuel/gravityfeedL", 0);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/gravityfeedL", 1);
|
setprop("systems/fuel/gravityfeedL", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ac1 >= 110 or ac2 >= 110) and (tank2pump1_sw or tank2pump2_sw)) {
|
if ((ac1 >= 110 or ac2 >= 110) and (tank2pump1_sw or tank2pump2_sw)) {
|
||||||
setprop("/systems/fuel/gravityfeedR", 0);
|
setprop("systems/fuel/gravityfeedR", 0);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/gravityfeedR", 1);
|
setprop("systems/fuel/gravityfeedR", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
gravityfeedL = getprop("/systems/fuel/gravityfeedL");
|
gravityfeedL = getprop("systems/fuel/gravityfeedL");
|
||||||
gravityfeedR = getprop("/systems/fuel/gravityfeedR");
|
gravityfeedR = getprop("systems/fuel/gravityfeedR");
|
||||||
|
|
||||||
if ((getprop("/fdm/jsbsim/propulsion/tank[1]/contents-lbs") >= 50) and (tank1pump1_sw or tank1pump2_sw) and !gravityfeedL and !gravityfeedR) {
|
if ((getprop("fdm/jsbsim/propulsion/tank[1]/contents-lbs") >= 50) and (tank1pump1_sw or tank1pump2_sw) and !gravityfeedL and !gravityfeedR) {
|
||||||
setprop("/systems/fuel/only-use-ctr-tank", 1);
|
setprop("systems/fuel/only-use-ctr-tank", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/only-use-ctr-tank", 0);
|
setprop("systems/fuel/only-use-ctr-tank", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Fault lights
|
# Fault lights
|
||||||
if (tank0pump1_sw and tank0pump1_fail) {
|
if (tank0pump1_sw and tank0pump1_fail) {
|
||||||
setprop("/systems/fuel/tank0pump1-fault", 1);
|
setprop("systems/fuel/tank0pump1-fault", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/tank0pump1-fault", 0);
|
setprop("systems/fuel/tank0pump1-fault", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tank0pump2_sw and tank0pump2_fail) {
|
if (tank0pump2_sw and tank0pump2_fail) {
|
||||||
setprop("/systems/fuel/tank0pump2-fault", 1);
|
setprop("systems/fuel/tank0pump2-fault", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/tank0pump2-fault", 0);
|
setprop("systems/fuel/tank0pump2-fault", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tank1pump1_sw and tank1pump1_fail) {
|
if (tank1pump1_sw and tank1pump1_fail) {
|
||||||
setprop("/systems/fuel/tank1pump1-fault", 1);
|
setprop("systems/fuel/tank1pump1-fault", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/tank1pump1-fault", 0);
|
setprop("systems/fuel/tank1pump1-fault", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tank1pump2_sw and tank1pump2_fail) {
|
if (tank1pump2_sw and tank1pump2_fail) {
|
||||||
setprop("/systems/fuel/tank1pump2-fault", 1);
|
setprop("systems/fuel/tank1pump2-fault", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/tank1pump2-fault", 0);
|
setprop("systems/fuel/tank1pump2-fault", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tank2pump1_sw and tank2pump1_fail) {
|
if (tank2pump1_sw and tank2pump1_fail) {
|
||||||
setprop("/systems/fuel/tank2pump1-fault", 1);
|
setprop("systems/fuel/tank2pump1-fault", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/tank2pump1-fault", 0);
|
setprop("systems/fuel/tank2pump1-fault", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tank2pump2_sw and tank2pump2_fail) {
|
if (tank2pump2_sw and tank2pump2_fail) {
|
||||||
setprop("/systems/fuel/tank2pump2-fault", 1);
|
setprop("systems/fuel/tank2pump2-fault", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/fuel/tank2pump2-fault", 0);
|
setprop("systems/fuel/tank2pump2-fault", 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,33 +11,33 @@ var ground_services = {
|
||||||
me.ice_time = 0;
|
me.ice_time = 0;
|
||||||
|
|
||||||
# Catering Truck
|
# Catering Truck
|
||||||
setprop("/services/catering/scissor-deg", 0);
|
setprop("services/catering/scissor-deg", 0);
|
||||||
setprop("/services/catering/position-norm", 0);
|
setprop("services/catering/position-norm", 0);
|
||||||
|
|
||||||
# De-icing Truck
|
# De-icing Truck
|
||||||
setprop("/services/deicing_truck/enable", 0);
|
setprop("services/deicing_truck/enable", 0);
|
||||||
setprop("/services/deicing_truck/de-ice", 0);
|
setprop("services/deicing_truck/de-ice", 0);
|
||||||
|
|
||||||
# Set them all to 0 if the aircraft is not stationary
|
# Set them all to 0 if the aircraft is not stationary
|
||||||
if (getprop("/velocities/groundspeed-kt") >= 2) {
|
if (getprop("velocities/groundspeed-kt") >= 2) {
|
||||||
setprop("/services/chocks/nose", 0);
|
setprop("services/chocks/nose", 0);
|
||||||
setprop("/services/chocks/left", 0);
|
setprop("services/chocks/left", 0);
|
||||||
setprop("/services/chocks/right", 0);
|
setprop("services/chocks/right", 0);
|
||||||
setprop("/services/fuel-truck/enable", 0);
|
setprop("services/fuel-truck/enable", 0);
|
||||||
setprop("/services/deicing_truck/enable", 0);
|
setprop("services/deicing_truck/enable", 0);
|
||||||
setprop("/services/catering/enable", 0);
|
setprop("services/catering/enable", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
me.reset();
|
me.reset();
|
||||||
},
|
},
|
||||||
update : func {
|
update : func {
|
||||||
# Catering Truck Controls
|
# Catering Truck Controls
|
||||||
var cater_pos = getprop("/services/catering/position-norm");
|
var cater_pos = getprop("services/catering/position-norm");
|
||||||
var scissor_deg = 3.325 * (1/D2R) * math.asin(cater_pos / (2 * 3.6612));
|
var scissor_deg = 3.325 * (1/D2R) * math.asin(cater_pos / (2 * 3.6612));
|
||||||
setprop("/services/catering/scissor-deg", scissor_deg);
|
setprop("services/catering/scissor-deg", scissor_deg);
|
||||||
|
|
||||||
# De-icing Truck
|
# De-icing Truck
|
||||||
if (getprop("/services/deicing_truck/enable") and getprop("/services/deicing_truck/de-ice")) {
|
if (getprop("services/deicing_truck/enable") and getprop("services/deicing_truck/de-ice")) {
|
||||||
if (me.ice_time == 2) {
|
if (me.ice_time == 2) {
|
||||||
door.move(1);
|
door.move(1);
|
||||||
ground_message ("Lifting De-icing Crane...");
|
ground_message ("Lifting De-icing Crane...");
|
||||||
|
@ -60,7 +60,7 @@ var ground_services = {
|
||||||
|
|
||||||
if (me.ice_time == 900) {
|
if (me.ice_time == 900) {
|
||||||
ground_message("De-icing Completed!", 1, 1, 1);
|
ground_message("De-icing Completed!", 1, 1, 1);
|
||||||
setprop("/services/deicing_truck/de-ice", 0);
|
setprop("services/deicing_truck/de-ice", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -81,7 +81,7 @@ var ground_services = {
|
||||||
};
|
};
|
||||||
|
|
||||||
var ground_message = func (string) {
|
var ground_message = func (string) {
|
||||||
setprop("/sim/messages/ground", string);
|
setprop("sim/messages/ground", string);
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("sim/signals/fdm-initialized", func {
|
setlistener("sim/signals/fdm-initialized", func {
|
||||||
|
|
|
@ -22,23 +22,23 @@ var HYD = {
|
||||||
counter: props.globals.initNode("/systems/hydraulic/brakes/counter", 0, "INT"),
|
counter: props.globals.initNode("/systems/hydraulic/brakes/counter", 0, "INT"),
|
||||||
},
|
},
|
||||||
Fail: {
|
Fail: {
|
||||||
blueElec: props.globals.getNode("/systems/failures/hydraulic/blue-elec"),
|
blueElec: props.globals.getNode("systems/failures/hydraulic/blue-elec"),
|
||||||
blueLeak: props.globals.getNode("/systems/failures/hydraulic/blue-leak"),
|
blueLeak: props.globals.getNode("systems/failures/hydraulic/blue-leak"),
|
||||||
greenEng: props.globals.getNode("/systems/failures/hydraulic/green-edp"),
|
greenEng: props.globals.getNode("systems/failures/hydraulic/green-edp"),
|
||||||
greenLeak: props.globals.getNode("/systems/failures/hydraulic/green-leak"),
|
greenLeak: props.globals.getNode("systems/failures/hydraulic/green-leak"),
|
||||||
ptuFault: props.globals.getNode("/systems/failures/hydraulic/ptu"),
|
ptuFault: props.globals.getNode("systems/failures/hydraulic/ptu"),
|
||||||
yellowEng: props.globals.getNode("/systems/failures/hydraulic/yellow-edp"),
|
yellowEng: props.globals.getNode("systems/failures/hydraulic/yellow-edp"),
|
||||||
yellowElec: props.globals.getNode("/systems/failures/hydraulic/yellow-elec"),
|
yellowElec: props.globals.getNode("systems/failures/hydraulic/yellow-elec"),
|
||||||
yellowLeak: props.globals.getNode("/systems/failures/hydraulic/yellow-leak"),
|
yellowLeak: props.globals.getNode("systems/failures/hydraulic/yellow-leak"),
|
||||||
},
|
},
|
||||||
Psi: {
|
Psi: {
|
||||||
blue: props.globals.getNode("/systems/hydraulic/blue-psi"),
|
blue: props.globals.getNode("systems/hydraulic/blue-psi"),
|
||||||
green: props.globals.getNode("/systems/hydraulic/green-psi"),
|
green: props.globals.getNode("systems/hydraulic/green-psi"),
|
||||||
yellow: props.globals.getNode("/systems/hydraulic/yellow-psi"),
|
yellow: props.globals.getNode("systems/hydraulic/yellow-psi"),
|
||||||
},
|
},
|
||||||
Ptu: {
|
Ptu: {
|
||||||
active: props.globals.getNode("/systems/hydraulic/sources/ptu/ptu-active"),
|
active: props.globals.getNode("systems/hydraulic/sources/ptu/ptu-active"),
|
||||||
diff: props.globals.getNode("/systems/hydraulic/yellow-psi-diff"),
|
diff: props.globals.getNode("systems/hydraulic/yellow-psi-diff"),
|
||||||
},
|
},
|
||||||
Qty: {
|
Qty: {
|
||||||
blueInput: props.globals.initNode("/systems/hydraulic/blue-qty-input", 0, "INT"),
|
blueInput: props.globals.initNode("/systems/hydraulic/blue-qty-input", 0, "INT"),
|
||||||
|
@ -46,20 +46,20 @@ var HYD = {
|
||||||
yellowInput: props.globals.initNode("/systems/hydraulic/yellow-qty-input", 0, "INT"),
|
yellowInput: props.globals.initNode("/systems/hydraulic/yellow-qty-input", 0, "INT"),
|
||||||
},
|
},
|
||||||
Rat: {
|
Rat: {
|
||||||
position: props.globals.getNode("/systems/hydraulic/sources/rat/position"),
|
position: props.globals.getNode("systems/hydraulic/sources/rat/position"),
|
||||||
},
|
},
|
||||||
Switch: {
|
Switch: {
|
||||||
blueElec: props.globals.getNode("/controls/hydraulic/switches/blue-elec"),
|
blueElec: props.globals.getNode("controls/hydraulic/switches/blue-elec"),
|
||||||
blueElecOvrd: props.globals.getNode("/controls/hydraulic/switches/blue-elec-ovrd"),
|
blueElecOvrd: props.globals.getNode("controls/hydraulic/switches/blue-elec-ovrd"),
|
||||||
greenEDP: props.globals.getNode("/controls/hydraulic/switches/green-edp"),
|
greenEDP: props.globals.getNode("controls/hydraulic/switches/green-edp"),
|
||||||
ptu: props.globals.getNode("/controls/hydraulic/switches/ptu"),
|
ptu: props.globals.getNode("controls/hydraulic/switches/ptu"),
|
||||||
rat: props.globals.getNode("/controls/hydraulic/switches/rat-man"),
|
rat: props.globals.getNode("controls/hydraulic/switches/rat-man"),
|
||||||
yellowEDP: props.globals.getNode("/controls/hydraulic/switches/yellow-edp"),
|
yellowEDP: props.globals.getNode("controls/hydraulic/switches/yellow-edp"),
|
||||||
yellowElec: props.globals.getNode("/controls/hydraulic/switches/yellow-elec"),
|
yellowElec: props.globals.getNode("controls/hydraulic/switches/yellow-elec"),
|
||||||
},
|
},
|
||||||
Valve: {
|
Valve: {
|
||||||
yellowFire: props.globals.getNode("/systems/hydraulic/sources/yellow-edp/fire-valve"),
|
yellowFire: props.globals.getNode("systems/hydraulic/sources/yellow-edp/fire-valve"),
|
||||||
greenFire: props.globals.getNode("/systems/hydraulic/sources/green-edp/fire-valve"),
|
greenFire: props.globals.getNode("systems/hydraulic/sources/green-edp/fire-valve"),
|
||||||
},
|
},
|
||||||
init: func() {
|
init: func() {
|
||||||
me.resetFail();
|
me.resetFail();
|
||||||
|
@ -86,7 +86,7 @@ var HYD = {
|
||||||
},
|
},
|
||||||
loop: func() {
|
loop: func() {
|
||||||
accum = me.Brakes.accumPressPsi.getValue();
|
accum = me.Brakes.accumPressPsi.getValue();
|
||||||
parking = getprop("/controls/gear/brake-parking");
|
parking = getprop("controls/gear/brake-parking");
|
||||||
askidnws_sw = me.Brakes.askidSw.getBoolValue();
|
askidnws_sw = me.Brakes.askidSw.getBoolValue();
|
||||||
|
|
||||||
if (!parking and askidnws_sw and me.Psi.green.getValue() > 2500) {
|
if (!parking and askidnws_sw and me.Psi.green.getValue() > 2500) {
|
||||||
|
@ -107,8 +107,8 @@ var HYD = {
|
||||||
};
|
};
|
||||||
|
|
||||||
setlistener("/controls/gear/gear-down", func {
|
setlistener("/controls/gear/gear-down", func {
|
||||||
down = getprop("/controls/gear/gear-down");
|
down = getprop("controls/gear/gear-down");
|
||||||
if (!down and (getprop("/gear/gear[0]/wow") or getprop("/gear/gear[1]/wow") or getprop("/gear/gear[2]/wow"))) {
|
if (!down and (getprop("gear/gear[0]/wow") or getprop("gear/gear[1]/wow") or getprop("gear/gear[2]/wow"))) {
|
||||||
setprop("/controls/gear/gear-down", 1);
|
setprop("controls/gear/gear-down", 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -60,186 +60,186 @@ var stateL = 0;
|
||||||
var stateR = 0;
|
var stateR = 0;
|
||||||
|
|
||||||
var icingInit = func {
|
var icingInit = func {
|
||||||
setprop("/systems/icing/severity", "0"); # maximum severity: we will make it random
|
setprop("systems/icing/severity", "0"); # maximum severity: we will make it random
|
||||||
setprop("/systems/icing/factor", 0.0); # the factor is how many inches we add per second
|
setprop("systems/icing/factor", 0.0); # the factor is how many inches we add per second
|
||||||
setprop("/systems/icing/max-spread-degc", 0.0);
|
setprop("systems/icing/max-spread-degc", 0.0);
|
||||||
setprop("/systems/icing/melt-w-heat-factor", -0.00005000);
|
setprop("systems/icing/melt-w-heat-factor", -0.00005000);
|
||||||
setprop("/systems/icing/icingcond", 0);
|
setprop("systems/icing/icingcond", 0);
|
||||||
setprop("/controls/switches/windowprobeheat", 0);
|
setprop("controls/switches/windowprobeheat", 0);
|
||||||
setprop("/controls/switches/wing", 0);
|
setprop("controls/switches/wing", 0);
|
||||||
setprop("/controls/switches/wingfault", 0);
|
setprop("controls/switches/wingfault", 0);
|
||||||
setprop("/controls/switches/leng", 0);
|
setprop("controls/switches/leng", 0);
|
||||||
setprop("/controls/switches/lengfault", 0);
|
setprop("controls/switches/lengfault", 0);
|
||||||
setprop("/controls/switches/reng", 0);
|
setprop("controls/switches/reng", 0);
|
||||||
setprop("/controls/switches/rengfault", 0);
|
setprop("controls/switches/rengfault", 0);
|
||||||
setprop("/controls/deice/wing", 0);
|
setprop("controls/deice/wing", 0);
|
||||||
setprop("/controls/deice/lengine", 0);
|
setprop("controls/deice/lengine", 0);
|
||||||
setprop("/controls/deice/rengine", 0);
|
setprop("controls/deice/rengine", 0);
|
||||||
setprop("/controls/deice/windowprobeheat", 0);
|
setprop("controls/deice/windowprobeheat", 0);
|
||||||
setprop("/systems/pitot/icing", 0.0);
|
setprop("systems/pitot/icing", 0.0);
|
||||||
setprop("/systems/pitot/failed", 1);
|
setprop("systems/pitot/failed", 1);
|
||||||
setprop("/controls/deice/WingHasBeenTurnedOff", 0);
|
setprop("controls/deice/WingHasBeenTurnedOff", 0);
|
||||||
setprop("/controls/deice/GroundModeFinished", 0);
|
setprop("controls/deice/GroundModeFinished", 0);
|
||||||
icing_timer.start();
|
icing_timer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
var icingModel = func {
|
var icingModel = func {
|
||||||
dewpoint = getprop("/environment/dewpoint-degc");
|
dewpoint = getprop("environment/dewpoint-degc");
|
||||||
temperature = getprop("/environment/temperature-degc");
|
temperature = getprop("environment/temperature-degc");
|
||||||
speed = getprop("/velocities/airspeed-kt");
|
speed = getprop("velocities/airspeed-kt");
|
||||||
visibility = getprop("/environment/effective-visibility-m");
|
visibility = getprop("environment/effective-visibility-m");
|
||||||
visibLclWx = getprop("/environment/visibility-m");
|
visibLclWx = getprop("environment/visibility-m");
|
||||||
severity = getprop("/systems/icing/severity");
|
severity = getprop("systems/icing/severity");
|
||||||
factor = getprop("/systems/icing/factor");
|
factor = getprop("systems/icing/factor");
|
||||||
maxSpread = getprop("/systems/icing/max-spread-degc");
|
maxSpread = getprop("systems/icing/max-spread-degc");
|
||||||
icingCond = getprop("/systems/icing/icingcond");
|
icingCond = getprop("systems/icing/icingcond");
|
||||||
pause = getprop("/sim/freeze/master");
|
pause = getprop("sim/freeze/master");
|
||||||
melt = getprop("/systems/icing/melt-w-heat-factor");
|
melt = getprop("systems/icing/melt-w-heat-factor");
|
||||||
windowprobe = getprop("/controls/deice/windowprobeheat");
|
windowprobe = getprop("controls/deice/windowprobeheat");
|
||||||
wingBtn = getprop("/controls/switches/wing");
|
wingBtn = getprop("controls/switches/wing");
|
||||||
wingFault = getprop("/controls/switches/wingfault");
|
wingFault = getprop("controls/switches/wingfault");
|
||||||
wingAnti = getprop("/controls/deice/wing");
|
wingAnti = getprop("controls/deice/wing");
|
||||||
PSI = getprop("/systems/pneumatic/total-psi");
|
PSI = getprop("systems/pneumatic/total-psi");
|
||||||
wowl = getprop("/gear/gear[1]/wow");
|
wowl = getprop("gear/gear[1]/wow");
|
||||||
wowr = getprop("/gear/gear[2]/wow");
|
wowr = getprop("gear/gear[2]/wow");
|
||||||
PitotIcing = getprop("/systems/pitot/icing");
|
PitotIcing = getprop("systems/pitot/icing");
|
||||||
PitotFailed = getprop("/systems/pitot/failed");
|
PitotFailed = getprop("systems/pitot/failed");
|
||||||
lengBtn = getprop("/controls/switches/leng");
|
lengBtn = getprop("controls/switches/leng");
|
||||||
lengFault = getprop("/controls/switches/lengfault");
|
lengFault = getprop("controls/switches/lengfault");
|
||||||
rengBtn = getprop("/controls/switches/reng");
|
rengBtn = getprop("controls/switches/reng");
|
||||||
rengFault = getprop("/controls/switches/rengfault");
|
rengFault = getprop("controls/switches/rengfault");
|
||||||
lengAnti = getprop("/controls/deice/lengine");
|
lengAnti = getprop("controls/deice/lengine");
|
||||||
rengAnti = getprop("/controls/deice/rengine");
|
rengAnti = getprop("controls/deice/rengine");
|
||||||
WingHasBeenTurnedOff = getprop("/controls/deice/WingHasBeenTurnedOff");
|
WingHasBeenTurnedOff = getprop("controls/deice/WingHasBeenTurnedOff");
|
||||||
GroundModeFinished = getprop("/controls/deice/GroundModeFinished");
|
GroundModeFinished = getprop("controls/deice/GroundModeFinished");
|
||||||
|
|
||||||
if (temperature >= 0 or !icingCond) {
|
if (temperature >= 0 or !icingCond) {
|
||||||
setprop("/systems/icing/severity", "0");
|
setprop("systems/icing/severity", "0");
|
||||||
} else if (temperature < 0 and temperature >= -2 and icingCond) {
|
} else if (temperature < 0 and temperature >= -2 and icingCond) {
|
||||||
setprop("/systems/icing/severity", "1");
|
setprop("systems/icing/severity", "1");
|
||||||
} else if (temperature < -2 and temperature >= -12 and icingCond) {
|
} else if (temperature < -2 and temperature >= -12 and icingCond) {
|
||||||
setprop("/systems/icing/severity", "3");
|
setprop("systems/icing/severity", "3");
|
||||||
} else if (temperature < -12 and temperature >= -30 and icingCond) {
|
} else if (temperature < -12 and temperature >= -30 and icingCond) {
|
||||||
setprop("/systems/icing/severity", "5");
|
setprop("systems/icing/severity", "5");
|
||||||
} else if (temperature < -30 and temperature >= -40 and icingCond) {
|
} else if (temperature < -30 and temperature >= -40 and icingCond) {
|
||||||
setprop("/systems/icing/severity", "3");
|
setprop("systems/icing/severity", "3");
|
||||||
} else if (temperature < -40 and temperature >= -99 and icingCond) {
|
} else if (temperature < -40 and temperature >= -99 and icingCond) {
|
||||||
setprop("/systems/icing/severity", "1");
|
setprop("systems/icing/severity", "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
icing1 = getprop("/sim/model/icing/iceable[0]/ice-inches");
|
icing1 = getprop("sim/model/icing/iceable[0]/ice-inches");
|
||||||
sensitive1 = getprop("/sim/model/icing/iceable[0]/sensitivity");
|
sensitive1 = getprop("sim/model/icing/iceable[0]/sensitivity");
|
||||||
v = icing1 + (factor * sensitive1);
|
v = icing1 + (factor * sensitive1);
|
||||||
a = icing1 + melt;
|
a = icing1 + melt;
|
||||||
if (icing1 < 0.0 and !pause) {
|
if (icing1 < 0.0 and !pause) {
|
||||||
setprop("/sim/model/icing/iceable[0]/ice-inches", 0.0);
|
setprop("sim/model/icing/iceable[0]/ice-inches", 0.0);
|
||||||
} else if (wingAnti) {
|
} else if (wingAnti) {
|
||||||
setprop("/sim/model/icing/iceable[0]/ice-inches", a);
|
setprop("sim/model/icing/iceable[0]/ice-inches", a);
|
||||||
} else if (!pause and !wingAnti) {
|
} else if (!pause and !wingAnti) {
|
||||||
setprop("/sim/model/icing/iceable[0]/ice-inches", v);
|
setprop("sim/model/icing/iceable[0]/ice-inches", v);
|
||||||
}
|
}
|
||||||
|
|
||||||
icing2 = getprop("/sim/model/icing/iceable[1]/ice-inches");
|
icing2 = getprop("sim/model/icing/iceable[1]/ice-inches");
|
||||||
sensitive2 = getprop("/sim/model/icing/iceable[1]/sensitivity");
|
sensitive2 = getprop("sim/model/icing/iceable[1]/sensitivity");
|
||||||
u = icing2 + (factor * sensitive2);
|
u = icing2 + (factor * sensitive2);
|
||||||
b = icing2 + melt;
|
b = icing2 + melt;
|
||||||
if (icing2 < 0.0 and !pause) {
|
if (icing2 < 0.0 and !pause) {
|
||||||
setprop("/sim/model/icing/iceable[1]/ice-inches", 0.0);
|
setprop("sim/model/icing/iceable[1]/ice-inches", 0.0);
|
||||||
} else if (lengAnti) {
|
} else if (lengAnti) {
|
||||||
setprop("/sim/model/icing/iceable[1]/ice-inches", b);
|
setprop("sim/model/icing/iceable[1]/ice-inches", b);
|
||||||
} else if (!pause and !lengAnti) {
|
} else if (!pause and !lengAnti) {
|
||||||
setprop("/sim/model/icing/iceable[1]/ice-inches", u);
|
setprop("sim/model/icing/iceable[1]/ice-inches", u);
|
||||||
}
|
}
|
||||||
|
|
||||||
icing3 = getprop("/sim/model/icing/iceable[2]/ice-inches");
|
icing3 = getprop("sim/model/icing/iceable[2]/ice-inches");
|
||||||
sensitive3 = getprop("/sim/model/icing/iceable[2]/sensitivity");
|
sensitive3 = getprop("sim/model/icing/iceable[2]/sensitivity");
|
||||||
t = icing3 + (factor * sensitive3);
|
t = icing3 + (factor * sensitive3);
|
||||||
c = icing3 + melt;
|
c = icing3 + melt;
|
||||||
if (icing3 < 0.0 and !pause) {
|
if (icing3 < 0.0 and !pause) {
|
||||||
setprop("/sim/model/icing/iceable[2]/ice-inches", 0.0);
|
setprop("sim/model/icing/iceable[2]/ice-inches", 0.0);
|
||||||
} else if (rengAnti) {
|
} else if (rengAnti) {
|
||||||
setprop("/sim/model/icing/iceable[2]/ice-inches", c);
|
setprop("sim/model/icing/iceable[2]/ice-inches", c);
|
||||||
} else if (!pause and !rengAnti) {
|
} else if (!pause and !rengAnti) {
|
||||||
setprop("/sim/model/icing/iceable[2]/ice-inches", t);
|
setprop("sim/model/icing/iceable[2]/ice-inches", t);
|
||||||
}
|
}
|
||||||
|
|
||||||
icing4 = getprop("/sim/model/icing/iceable[3]/ice-inches");
|
icing4 = getprop("sim/model/icing/iceable[3]/ice-inches");
|
||||||
sensitive4 = getprop("/sim/model/icing/iceable[3]/sensitivity");
|
sensitive4 = getprop("sim/model/icing/iceable[3]/sensitivity");
|
||||||
s = icing4 + (factor * sensitive4);
|
s = icing4 + (factor * sensitive4);
|
||||||
d = icing4 + melt;
|
d = icing4 + melt;
|
||||||
if (icing4 < 0.0 and !pause) {
|
if (icing4 < 0.0 and !pause) {
|
||||||
setprop("/sim/model/icing/iceable[3]/ice-inches", 0.0);
|
setprop("sim/model/icing/iceable[3]/ice-inches", 0.0);
|
||||||
} else if (windowprobe) {
|
} else if (windowprobe) {
|
||||||
setprop("/sim/model/icing/iceable[3]/ice-inches", d);
|
setprop("sim/model/icing/iceable[3]/ice-inches", d);
|
||||||
} else if (!pause and !windowprobe) {
|
} else if (!pause and !windowprobe) {
|
||||||
setprop("/sim/model/icing/iceable[3]/ice-inches", s);
|
setprop("sim/model/icing/iceable[3]/ice-inches", s);
|
||||||
}
|
}
|
||||||
|
|
||||||
icing5 = getprop("/sim/model/icing/iceable[4]/ice-inches");
|
icing5 = getprop("sim/model/icing/iceable[4]/ice-inches");
|
||||||
sensitive5 = getprop("/sim/model/icing/iceable[4]/sensitivity");
|
sensitive5 = getprop("sim/model/icing/iceable[4]/sensitivity");
|
||||||
r = icing5 + (factor * sensitive5);
|
r = icing5 + (factor * sensitive5);
|
||||||
if (icing5 < 0.0 and !pause) {
|
if (icing5 < 0.0 and !pause) {
|
||||||
setprop("/sim/model/icing/iceable[4]/ice-inches", 0.0);
|
setprop("sim/model/icing/iceable[4]/ice-inches", 0.0);
|
||||||
} else if (!pause) {
|
} else if (!pause) {
|
||||||
setprop("/sim/model/icing/iceable[4]/ice-inches", r);
|
setprop("sim/model/icing/iceable[4]/ice-inches", r);
|
||||||
}
|
}
|
||||||
|
|
||||||
icing6 = getprop("/sim/model/icing/iceable[5]/ice-inches");
|
icing6 = getprop("sim/model/icing/iceable[5]/ice-inches");
|
||||||
sensitive6 = getprop("/sim/model/icing/iceable[5]/sensitivity");
|
sensitive6 = getprop("sim/model/icing/iceable[5]/sensitivity");
|
||||||
q = icing6 + (factor * sensitive6);
|
q = icing6 + (factor * sensitive6);
|
||||||
e = icing6 + melt;
|
e = icing6 + melt;
|
||||||
if (icing6 < 0.0 and !pause) {
|
if (icing6 < 0.0 and !pause) {
|
||||||
setprop("/sim/model/icing/iceable[5]/ice-inches", 0.0);
|
setprop("sim/model/icing/iceable[5]/ice-inches", 0.0);
|
||||||
} else if (windowprobe) {
|
} else if (windowprobe) {
|
||||||
setprop("/sim/model/icing/iceable[5]/ice-inches", e);
|
setprop("sim/model/icing/iceable[5]/ice-inches", e);
|
||||||
} else if (!pause and !windowprobe) {
|
} else if (!pause and !windowprobe) {
|
||||||
setprop("/sim/model/icing/iceable[5]/ice-inches", q);
|
setprop("sim/model/icing/iceable[5]/ice-inches", q);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Do we create ice?
|
# Do we create ice?
|
||||||
spread = temperature - dewpoint;
|
spread = temperature - dewpoint;
|
||||||
# freezing fog or low temp and below dp or in advanced wx cloud
|
# freezing fog or low temp and below dp or in advanced wx cloud
|
||||||
if ((spread < maxSpread and temperature < 0) or (temperature < 0 and visibility < 1000) or (visibLclWx < 5000 and temperature < 0)) {
|
if ((spread < maxSpread and temperature < 0) or (temperature < 0 and visibility < 1000) or (visibLclWx < 5000 and temperature < 0)) {
|
||||||
setprop("/systems/icing/icingcond", 1);
|
setprop("systems/icing/icingcond", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/icing/icingcond", 0);
|
setprop("systems/icing/icingcond", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WingHasBeenTurnedOff and !wowl and !wowr and GroundModeFinished) {
|
if (WingHasBeenTurnedOff and !wowl and !wowr and GroundModeFinished) {
|
||||||
setprop("/controls/deice/wing", 1);
|
setprop("controls/deice/wing", 1);
|
||||||
setprop("/controls/switches/WingHasBeenTurnedOff", 0);
|
setprop("controls/switches/WingHasBeenTurnedOff", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
# If we have low pressure we have a fault
|
# If we have low pressure we have a fault
|
||||||
if (PSI < 10) {
|
if (PSI < 10) {
|
||||||
setprop("/controls/switches/wingfault", 1);
|
setprop("controls/switches/wingfault", 1);
|
||||||
setprop("/controls/deice/wing", 0);
|
setprop("controls/deice/wing", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PSI > 10 and wingFault) {
|
if (PSI > 10 and wingFault) {
|
||||||
setprop("/controls/switches/wingfault", 0);
|
setprop("controls/switches/wingfault", 0);
|
||||||
if (wingBtn) {
|
if (wingBtn) {
|
||||||
setprop("/controls/deice/wing", 1);
|
setprop("controls/deice/wing", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PitotIcing > 0.03) {
|
if (PitotIcing > 0.03) {
|
||||||
if (!PitotFailed) {
|
if (!PitotFailed) {
|
||||||
setprop("/systems/pitot/failed", 1);
|
setprop("systems/pitot/failed", 1);
|
||||||
}
|
}
|
||||||
} else if (PitotIcing < 0.03) {
|
} else if (PitotIcing < 0.03) {
|
||||||
if (PitotFailed) {
|
if (PitotFailed) {
|
||||||
setprop("/systems/pitot/failed", 0);
|
setprop("systems/pitot/failed", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# if ((getprop("/systems/electrical/bus/dc-1") == 0 or getprop("/systems/electrical/bus/dc-2") == 0) and getprop("/fdm/jsbsim/position/wow") == 0) {
|
# if ((getprop("systems/electrical/bus/dc-1") == 0 or getprop("systems/electrical/bus/dc-2") == 0) and getprop("fdm/jsbsim/position/wow") == 0) {
|
||||||
# setprop("/controls/switches/leng", 1);
|
# setprop("controls/switches/leng", 1);
|
||||||
# setprop("/controls/switches/reng", 1);
|
# setprop("controls/switches/reng", 1);
|
||||||
# }
|
# }
|
||||||
|
|
||||||
#if (getprop("/systems/electrical/bus/dc-ess-shed") == 0) {
|
#if (getprop("systems/electrical/bus/dc-ess-shed") == 0) {
|
||||||
# setprop("/controls/switches/wing", 0);
|
# setprop("controls/switches/wing", 0);
|
||||||
#}
|
#}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,24 +248,24 @@ var icingModel = func {
|
||||||
#################
|
#################
|
||||||
|
|
||||||
setlistener("/controls/switches/leng", func {
|
setlistener("/controls/switches/leng", func {
|
||||||
if (getprop("/controls/switches/leng") == 1 and getprop("/engines/engine[0]/state") == 3) {
|
if (getprop("controls/switches/leng") == 1 and getprop("engines/engine[0]/state") == 3) {
|
||||||
setprop("/controls/switches/lengfault", 1);
|
setprop("controls/switches/lengfault", 1);
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
setprop("/controls/switches/lengfault", 0);
|
setprop("controls/switches/lengfault", 0);
|
||||||
setprop("/controls/deice/lengine", 1);
|
setprop("controls/deice/lengine", 1);
|
||||||
}, 0.5);
|
}, 0.5);
|
||||||
} else if (getprop("/controls/switches/leng") == 0) {
|
} else if (getprop("controls/switches/leng") == 0) {
|
||||||
setprop("/controls/switches/lengfault", 1);
|
setprop("controls/switches/lengfault", 1);
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
setprop("/controls/switches/lengfault", 0);
|
setprop("controls/switches/lengfault", 0);
|
||||||
setprop("/controls/deice/lengine", 0);
|
setprop("controls/deice/lengine", 0);
|
||||||
}, 0.5);
|
}, 0.5);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/engines/engine[0]/state", func {
|
setlistener("/engines/engine[0]/state", func {
|
||||||
if (getprop("/engines/engine[0]/state") != 3) {
|
if (getprop("engines/engine[0]/state") != 3) {
|
||||||
setprop("/controls/switches/leng", 0);
|
setprop("controls/switches/leng", 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -274,24 +274,24 @@ setlistener("/engines/engine[0]/state", func {
|
||||||
#################
|
#################
|
||||||
|
|
||||||
setlistener("/controls/switches/reng", func {
|
setlistener("/controls/switches/reng", func {
|
||||||
if (getprop("/controls/switches/reng") == 1 and getprop("/engines/engine[1]/state") == 3) {
|
if (getprop("controls/switches/reng") == 1 and getprop("engines/engine[1]/state") == 3) {
|
||||||
setprop("/controls/switches/rengfault", 1);
|
setprop("controls/switches/rengfault", 1);
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
setprop("/controls/switches/rengfault", 0);
|
setprop("controls/switches/rengfault", 0);
|
||||||
setprop("/controls/deice/rengine", 1);
|
setprop("controls/deice/rengine", 1);
|
||||||
}, 0.5);
|
}, 0.5);
|
||||||
} else if (getprop("/controls/switches/reng") == 0) {
|
} else if (getprop("controls/switches/reng") == 0) {
|
||||||
setprop("/controls/switches/rengfault", 1);
|
setprop("controls/switches/rengfault", 1);
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
setprop("/controls/switches/rengfault", 0);
|
setprop("controls/switches/rengfault", 0);
|
||||||
setprop("/controls/deice/rengine", 0);
|
setprop("controls/deice/rengine", 0);
|
||||||
}, 0.5);
|
}, 0.5);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setlistener("/engines/engine[1]/state", func {
|
setlistener("/engines/engine[1]/state", func {
|
||||||
if (getprop("/engines/engine[1]/state") != 3) {
|
if (getprop("engines/engine[1]/state") != 3) {
|
||||||
setprop("/controls/switches/reng", 0);
|
setprop("controls/switches/reng", 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -300,21 +300,21 @@ setlistener("/engines/engine[1]/state", func {
|
||||||
##################
|
##################
|
||||||
|
|
||||||
setlistener("/controls/switches/windowprobeheat", func {
|
setlistener("/controls/switches/windowprobeheat", func {
|
||||||
windowprb = getprop("/controls/switches/windowprobeheat");
|
windowprb = getprop("controls/switches/windowprobeheat");
|
||||||
if (windowprb == 0.5) { # if in auto
|
if (windowprb == 0.5) { # if in auto
|
||||||
wowl = getprop("/gear/gear[1]/wow");
|
wowl = getprop("gear/gear[1]/wow");
|
||||||
wowr = getprop("/gear/gear[2]/wow");
|
wowr = getprop("gear/gear[2]/wow");
|
||||||
stateL = getprop("/engines/engine[0]/state");
|
stateL = getprop("engines/engine[0]/state");
|
||||||
stateR = getprop("/engines/engine[1]/state");
|
stateR = getprop("engines/engine[1]/state");
|
||||||
if (!wowl or !wowr) {
|
if (!wowl or !wowr) {
|
||||||
setprop("/controls/deice/windowprobeheat", 1);
|
setprop("controls/deice/windowprobeheat", 1);
|
||||||
} else if (stateL == 3 or stateR == 3) {
|
} else if (stateL == 3 or stateR == 3) {
|
||||||
setprop("/controls/deice/windowprobeheat", 1);
|
setprop("controls/deice/windowprobeheat", 1);
|
||||||
}
|
}
|
||||||
} else if (windowprb == 1) { # if in ON
|
} else if (windowprb == 1) { # if in ON
|
||||||
setprop("/controls/deice/windowprobeheat", 1);
|
setprop("controls/deice/windowprobeheat", 1);
|
||||||
} else {
|
} else {
|
||||||
setprop("/controls/deice/windowprobeheat", 0);
|
setprop("controls/deice/windowprobeheat", 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -324,33 +324,33 @@ setlistener("/controls/switches/windowprobeheat", func {
|
||||||
|
|
||||||
# Switching on the wing anti-ice
|
# Switching on the wing anti-ice
|
||||||
setlistener("/controls/switches/wing", func {
|
setlistener("/controls/switches/wing", func {
|
||||||
wowl = getprop("/gear/gear[1]/wow");
|
wowl = getprop("gear/gear[1]/wow");
|
||||||
wowr = getprop("/gear/gear[2]/wow");
|
wowr = getprop("gear/gear[2]/wow");
|
||||||
wingBtn = getprop("/controls/switches/wing");
|
wingBtn = getprop("controls/switches/wing");
|
||||||
if (wowl and wowr and wingBtn) {
|
if (wowl and wowr and wingBtn) {
|
||||||
setprop("/controls/switches/wingfault", 1);
|
setprop("controls/switches/wingfault", 1);
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
setprop("/controls/switches/wingfault", 0);
|
setprop("controls/switches/wingfault", 0);
|
||||||
setprop("/controls/deice/wing", 1);
|
setprop("controls/deice/wing", 1);
|
||||||
}, 0.5);
|
}, 0.5);
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
setprop("/controls/deice/WingHasBeenTurnedOff", 1);
|
setprop("controls/deice/WingHasBeenTurnedOff", 1);
|
||||||
setprop("/controls/deice/wing", 0);
|
setprop("controls/deice/wing", 0);
|
||||||
}, 30.5);
|
}, 30.5);
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
setprop("/controls/deice/GroundModeFinished", 1);
|
setprop("controls/deice/GroundModeFinished", 1);
|
||||||
}, 31);
|
}, 31);
|
||||||
} else if (wingBtn and !wowl and !wowr) { # In the air
|
} else if (wingBtn and !wowl and !wowr) { # In the air
|
||||||
setprop("/controls/switches/wingfault", 1);
|
setprop("controls/switches/wingfault", 1);
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
setprop("/controls/switches/wingfault", 0);
|
setprop("controls/switches/wingfault", 0);
|
||||||
setprop("/controls/deice/wing", 1);
|
setprop("controls/deice/wing", 1);
|
||||||
}, 0.5);
|
}, 0.5);
|
||||||
} else if (!wingBtn) {
|
} else if (!wingBtn) {
|
||||||
setprop("/controls/switches/wingfault", 1);
|
setprop("controls/switches/wingfault", 1);
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
setprop("/controls/switches/wingfault", 0);
|
setprop("controls/switches/wingfault", 0);
|
||||||
setprop("/controls/deice/wing", 0);
|
setprop("controls/deice/wing", 0);
|
||||||
}, 0.5);
|
}, 0.5);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue