1
0
Fork 0

Merge branch 'dev' into 3D

This commit is contained in:
legoboyvdlp R 2020-10-04 15:30:00 +01:00
commit 162c36a3e6
54 changed files with 2180 additions and 2923 deletions

View file

@ -243,7 +243,7 @@
</checkbox>
<!-- TODO Comment back in, when fully implemented -->
<!-- checkbox>
<checkbox>
<label>Weight in KG</label>
<halign>left</halign>
<property>/options/system/weight-kgs</property>
@ -261,7 +261,7 @@
</script>
</binding>
<live>true</live>
</checkbox -->
</checkbox>
<checkbox>
<label>ADIRS Aligns Instantly</label>

View file

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

View file

@ -72787,7 +72787,7 @@ name "ecam_glare_down"
data 15
CU1_curve_.1252
crease 40.0
texture "ECAM_glare.png"
texture "ecam_glare_tex.png"
texrep 1 1
numvert 8
-0.40392 -0.06108 -0.10745
@ -72819,7 +72819,7 @@ name "ecam_glare_up"
data 15
CU1_curve_.1253
crease 40.0
texture "ECAM_glare.png"
texture "ecam_glare_tex.png"
texrep 1 1
numvert 4
-0.40892 -0.06801 0.10755

View file

@ -94,8 +94,6 @@ var bmc1working = props.globals.getNode("/systems/pneumatics/indicating/bmc1-wor
var bmc2working = props.globals.getNode("/systems/pneumatics/indicating/bmc2-working", 1);
var gs_kt = props.globals.getNode("/velocities/groundspeed-kt", 1);
var switch_wing_aice = props.globals.getNode("/controls/ice-protection/wing", 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 pack1_bypass = props.globals.getNode("/systems/pneumatics/pack-1-bypass", 1);
var pack2_bypass = props.globals.getNode("/systems/pneumatics/pack-2-bypass", 1);
var oil_qt1_actual = props.globals.getNode("/engines/engine[0]/oil-qt-actual", 1);
@ -846,14 +844,14 @@ var canvas_lowerECAM_bleed = {
}
# ENG 1 label
if (eng1_n2_actual.getValue() >= 59) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 59) {
me["BLEED-ENG-1-label"].setColor(0.8078,0.8039,0.8078);
} else {
me["BLEED-ENG-1-label"].setColor(0.7333,0.3803,0);
}
# ENG 2 label
if (eng2_n2_actual.getValue() >= 59) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 59) {
me["BLEED-ENG-2-label"].setColor(0.8078,0.8039,0.8078);
} else {
me["BLEED-ENG-2-label"].setColor(0.7333,0.3803,0);
@ -2732,13 +2730,13 @@ var canvas_lowerECAM_hyd = {
me["PTU-Auto-or-off"].show();
}
if (eng1_n2.getValue() >= 59) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 59) {
me["Pump-Green-label"].setColor(0.8078,0.8039,0.8078);
} else {
me["Pump-Green-label"].setColor(0.7333,0.3803,0);
}
if (eng2_n2.getValue() >= 59) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 59) {
me["Pump-Yellow-label"].setColor(0.8078,0.8039,0.8078);
} else {
me["Pump-Yellow-label"].setColor(0.7333,0.3803,0);

View file

@ -72,6 +72,7 @@ var MAGENTA = [0.6902,0.3333,0.7541];
# Fetch nodes:
var mcdu_keyboard_left = props.globals.getNode("/FMGC/keyboard-left", 0);
var mcdu_keyboard_right = props.globals.getNode("/FMGC/keyboard-right", 0);
var acconfig_weight_kgs = props.globals.getNode("/systems/acconfig/options/weight-kgs", 1);
#ACCONFIG
var mcdu1_lgt = props.globals.getNode("/controls/lighting/DU/mcdu1", 1);
@ -144,13 +145,9 @@ var activate_twice = props.globals.getNode("/FMGC/internal/activate-twice", 1);
# APPR PERF
var dest_qnh = props.globals.getNode("/FMGC/internal/dest-qnh", 1);
var dest_temp = props.globals.getNode("/FMGC/internal/dest-temp", 1);
var vapp_speed_set = props.globals.getNode("/FMGC/internal/vapp-speed-set", 1);
var final = props.globals.getNode("/FMGC/internal/final", 1);
var radio = props.globals.getNode("/FMGC/internal/radio", 1);
var baro = props.globals.getNode("/FMGC/internal/baro", 1);
var radio_no = props.globals.getNode("/FMGC/internal/radio-no", 1);
var ldg_config_3_set = props.globals.getNode("/FMGC/internal/ldg-config-3-set", 1);
var ldg_config_f_set = props.globals.getNode("/FMGC/internal/ldg-config-f-set", 1);
# GA PERF
@ -159,6 +156,10 @@ var pageProp = [props.globals.getNode("/MCDU[0]/page", 1), props.globals.getNode
var active = [props.globals.getNode("/MCDU[0]/active", 1), props.globals.getNode("/MCDU[1]/active", 1)];
var activeAtsu = [props.globals.getNode("/MCDU[0]/atsu-active", 1), props.globals.getNode("/MCDU[1]/atsu-active", 1)];
# Conversion factor pounds to kilogram
var LBS2KGS = 0.4535924;
# Create Nodes:
var pageSwitch = [props.globals.initNode("/MCDU[0]/internal/switch", 0, "BOOL"), props.globals.initNode("/MCDU[1]/internal/switch", 0, "BOOL")];
@ -2254,7 +2255,11 @@ var canvas_MCDU_base = {
}
me["Simple_L1S"].setText("TAXI");
me["Simple_L1"].setText(sprintf("%2.1f", fmgc.FMGCInternal.taxiFuel));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L1"].setText(sprintf("%2.1f", fmgc.FMGCInternal.taxiFuel * LBS2KGS));
} else {
me["Simple_L1"].setText(sprintf("%2.1f", fmgc.FMGCInternal.taxiFuel));
}
me["Simple_L2S"].setText("TRIP/TIME");
me["Simple_L3S"].setText("RTE RSV/PCT");
me["Simple_L4S"].setText("ALTN/TIME");
@ -2268,7 +2273,7 @@ var canvas_MCDU_base = {
me["Simple_Title"].setColor(1, 1, 1);
if (!getprop("/FMGC/internal/fuel-request-set")) {
if (!fmgc.FMGCInternal.fuelRequest) {
me["Simple_L2"].setText("---.-/----");
me["Simple_L3"].setText("---.-");
me["Simple_C3"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));
@ -2280,7 +2285,11 @@ var canvas_MCDU_base = {
if (fmgc.FMGCInternal.blockSet) {
me["Simple_R2"].show();
me["INITB_Block"].hide();
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block * LBS2KGS));
} else {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block));
}
} else {
me["Simple_R2"].hide();
me["INITB_Block"].show();
@ -2311,7 +2320,7 @@ var canvas_MCDU_base = {
me["Simple_Title"].setText("INIT FUEL PREDICTION ");
if (getprop("/FMGC/internal/block-calculating")) {
if (fmgc.FMGCInternal.blockCalculating) {
me["Simple_L2"].setText("---.-/----");
me["Simple_L3"].setText("---.-");
me["Simple_C3"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));
@ -2337,7 +2346,7 @@ var canvas_MCDU_base = {
me.colorRight("ack", "wht", "grn", "wht", "ack", "wht");
me["Simple_R3S"].setColor(GREEN);
} else {
if (!getprop("/FMGC/internal/block-confirmed")) {
if (!fmgc.FMGCInternal.blockConfirmed) {
me["Simple_L2"].setText("---.-/----");
me["Simple_L3"].setText("---.-");
me["Simple_C3"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));
@ -2348,7 +2357,11 @@ var canvas_MCDU_base = {
me["Simple_L6"].setText("---.-");
me["Simple_R2"].show();
me["INITB_Block"].hide();
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block * LBS2KGS));
} else {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block));
}
me["Simple_R3S"].show();
me["Simple_R3"].show();
me["Simple_R3S"].setText("BLOCK");
@ -2357,9 +2370,17 @@ var canvas_MCDU_base = {
me["Simple_R3_Arrow"].setColor(AMBER);
me["Simple_C4B"].show();
if (num(fmgc.FMGCInternal.tow) >= 100.0) {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow * LBS2KGS));
} else {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow));
}
} else {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow * LBS2KGS));
} else {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow));
}
}
me["Simple_R4"].setText("---.-");
me["Simple_R6"].setText("---.-/----");
@ -2368,7 +2389,7 @@ var canvas_MCDU_base = {
me.colorRight("ack", "blu", "amb", "wht", "ack", "wht");
me["Simple_R3S"].setColor(AMBER);
} else {
if (getprop("/FMGC/internal/fuel-calculating")) {
if (fmgc.FMGCInternal.fuelCalculating) {
me["Simple_L2"].setText("---.-/----");
me["Simple_L3"].setText("---.-");
if (fmgc.FMGCInternal.rteRsvSet) {
@ -2393,15 +2414,27 @@ var canvas_MCDU_base = {
me["Simple_L6"].setText("---.-");
me["Simple_R2"].show();
me["INITB_Block"].hide();
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block * LBS2KGS));
} else {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block));
}
me["Simple_R3S"].hide();
me["Simple_R3"].hide();
me["Simple_R3_Arrow"].hide();
me["Simple_C4B"].show();
if (num(fmgc.FMGCInternal.tow) >= 100.0) {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow * LBS2KGS));
} else {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow));
}
} else {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow * LBS2KGS));
} else {
me["Simple_C4B"].setText(sprintf(" %4.1f/", fmgc.FMGCInternal.tow));
}
}
me["Simple_R4"].setText("---.-");
me["Simple_R6"].setText("---.-/----");
@ -2409,8 +2442,16 @@ var canvas_MCDU_base = {
me.colorLeft("ack", "wht", "wht", "wht", "wht", "wht");
me.colorRight("ack", "blu", "ack", "wht", "ack", "wht");
} else {
me["Simple_L2"].setText(sprintf("%.1f/" ~ fmgc.FMGCInternal.tripTime, fmgc.FMGCInternal.tripFuel));
me["Simple_L3"].setText(sprintf("%.1f", fmgc.FMGCInternal.rteRsv));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L2"].setText(sprintf("%.1f/" ~ fmgc.FMGCInternal.tripTime, fmgc.FMGCInternal.tripFuel * LBS2KGS));
} else {
me["Simple_L2"].setText(sprintf("%.1f/" ~ fmgc.FMGCInternal.tripTime, fmgc.FMGCInternal.tripFuel));
}
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L3"].setText(sprintf("%.1f", fmgc.FMGCInternal.rteRsv * LBS2KGS));
} else {
me["Simple_L3"].setText(sprintf("%.1f", fmgc.FMGCInternal.rteRsv));
}
if (fmgc.FMGCInternal.rteRsvSet) {
if (num(fmgc.FMGCInternal.rteRsv) > 9.9 and num(fmgc.FMGCInternal.rtePercent) > 9.9) {
me["Simple_C3"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));
@ -2443,7 +2484,11 @@ var canvas_MCDU_base = {
}
}
if (fmgc.FMGCInternal.altAirportSet) {
me["Simple_L4"].setText(sprintf("%.1f", fmgc.FMGCInternal.altFuel));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L4"].setText(sprintf("%.1f", fmgc.FMGCInternal.altFuel * LBS2KGS));
} else {
me["Simple_L4"].setText(sprintf("%.1f", fmgc.FMGCInternal.altFuel));
}
me["Simple_L4"].setColor(BLUE);
me["Simple_C4"].show();
if (fmgc.FMGCInternal.altFuelSet) {
@ -2464,7 +2509,11 @@ var canvas_MCDU_base = {
me["Simple_L4"].setColor(WHITE);
me["Simple_C4"].hide();
}
me["Simple_L5"].setText(sprintf("%.1f", fmgc.FMGCInternal.finalFuel));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L5"].setText(sprintf("%.1f", fmgc.FMGCInternal.finalFuel * LBS2KGS));
} else {
me["Simple_L5"].setText(sprintf("%.1f", fmgc.FMGCInternal.finalFuel));
}
if (fmgc.FMGCInternal.finalTimeSet and fmgc.FMGCInternal.finalFuelSet) {
if (num(fmgc.FMGCInternal.finalFuel) > 9.9) {
me["Simple_C5"].setText(sprintf("/%s ", fmgc.FMGCInternal.finalTime));
@ -2490,16 +2539,30 @@ var canvas_MCDU_base = {
me["Simple_C5"].setText(sprintf("/%s ", fmgc.FMGCInternal.finalTime));
}
}
me["Simple_L6"].setText(sprintf("%.1f", fmgc.FMGCInternal.minDestFob));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L6"].setText(sprintf("%.1f", fmgc.FMGCInternal.minDestFob * LBS2KGS));
} else {
me["Simple_L6"].setText(sprintf("%.1f", fmgc.FMGCInternal.minDestFob));
}
me["Simple_R2"].show();
me["INITB_Block"].hide();
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block * LBS2KGS));
} else {
me["Simple_R2"].setText(sprintf("%3.1f", fmgc.FMGCInternal.block));
}
me["Simple_R3S"].hide();
me["Simple_R3"].hide();
me["Simple_R3_Arrow"].hide();
me["Simple_C4B"].hide();
me["Simple_R4"].setText(sprintf("%4.1f/", fmgc.FMGCInternal.tow) ~ sprintf("%4.1f", fmgc.FMGCInternal.lw));
me["Simple_R6"].setText(sprintf("%.1f/" ~ fmgc.FMGCInternal.extraTime, fmgc.FMGCInternal.extraFuel));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_R4"].setText(sprintf("%4.1f/", fmgc.FMGCInternal.tow * LBS2KGS) ~ sprintf("%4.1f", fmgc.FMGCInternal.lw * LBS2KGS));
me["Simple_R6"].setText(sprintf("%.1f/" ~ fmgc.FMGCInternal.extraTime, fmgc.FMGCInternal.extraFuel * LBS2KGS));
} else {
me["Simple_R4"].setText(sprintf("%4.1f/", fmgc.FMGCInternal.tow) ~ sprintf("%4.1f", fmgc.FMGCInternal.lw));
me["Simple_R6"].setText(sprintf("%.1f/" ~ fmgc.FMGCInternal.extraTime, fmgc.FMGCInternal.extraFuel));
}
me.colorLeft("ack", "grn", "blu", "ack", "blu", "blu");
me.colorRight("ack", "blu", "ack", "grn", "ack", "grn");
@ -2521,9 +2584,17 @@ var canvas_MCDU_base = {
if (fmgc.FMGCInternal.zfwSet) {
if (fmgc.FMGCInternal.zfw < 100) {
me["Simple_C1"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C1"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw * LBS2KGS));
} else {
me["Simple_C1"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw));
}
} else {
me["Simple_C1"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C1"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw * LBS2KGS));
} else {
me["Simple_C1"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw));
}
}
me["Simple_C1"].show();
me["INITB_ZFW"].hide();
@ -2664,7 +2735,7 @@ var canvas_MCDU_base = {
me["Simple_R5S"].setText(" GW/ CG");
me["Simple_R6S"].setText("EXTRA/TIME");
if (!getprop("/FMGC/internal/fuel-request-set") or !getprop("/FMGC/internal/block-confirmed") or getprop("/FMGC/internal/fuel-calculating")) {
if (!fmgc.FMGCInternal.fuelRequest or !fmgc.FMGCInternal.blockConfirmed or fmgc.FMGCInternal.fuelCalculating) {
me["Simple_L3"].setText("---.-");
if (fmgc.FMGCInternal.rteRsvSet) {
me["Simple_C3B"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));
@ -2690,7 +2761,11 @@ var canvas_MCDU_base = {
me.colorLeft("ack", "ack", "wht", "wht", "wht", "wht");
me.colorRight("ack", "ack", "ack", "wht", "wht", "wht");
} else {
me["Simple_L3"].setText(sprintf("%.1f", fmgc.FMGCInternal.rteRsv));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L3"].setText(sprintf("%.1f", fmgc.FMGCInternal.rteRsv * LBS2KGS));
} else {
me["Simple_L3"].setText(sprintf("%.1f", fmgc.FMGCInternal.rteRsv));
}
if (fmgc.FMGCInternal.rteRsvSet) {
if (num(fmgc.FMGCInternal.rteRsv) > 9.9 and num(fmgc.FMGCInternal.rtePercent) > 9.9) {
me["Simple_C3B"].setText(sprintf("/%.1f ", fmgc.FMGCInternal.rtePercent));
@ -2723,7 +2798,11 @@ var canvas_MCDU_base = {
}
}
if (fmgc.FMGCInternal.altAirportSet) {
me["Simple_L4"].setText(sprintf("%.1f", fmgc.FMGCInternal.altFuel));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L4"].setText(sprintf("%.1f", fmgc.FMGCInternal.altFuel * LBS2KGS));
} else {
me["Simple_L4"].setText(sprintf("%.1f", fmgc.FMGCInternal.altFuel));
}
me["Simple_L4"].setColor(BLUE);
me["Simple_C4"].show();
if (fmgc.FMGCInternal.altFuelSet) {
@ -2744,7 +2823,11 @@ var canvas_MCDU_base = {
me["Simple_L4"].setColor(WHITE);
me["Simple_C4"].hide();
}
me["Simple_L5"].setText(sprintf("%.1f", fmgc.FMGCInternal.finalFuel));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L5"].setText(sprintf("%.1f", fmgc.FMGCInternal.finalFuel * LBS2KGS));
} else {
me["Simple_L5"].setText(sprintf("%.1f", fmgc.FMGCInternal.finalFuel));
}
if (fmgc.FMGCInternal.finalTimeSet and fmgc.FMGCInternal.finalFuelSet) {
if (num(fmgc.FMGCInternal.finalFuel) > 9.9) {
me["Simple_C5"].setText(sprintf("/%s ", fmgc.FMGCInternal.finalTime));
@ -2770,10 +2853,17 @@ var canvas_MCDU_base = {
me["Simple_C5"].setText(sprintf("/%s ", fmgc.FMGCInternal.finalTime));
}
}
me["Simple_L6"].setText(sprintf("%.1f", fmgc.FMGCInternal.minDestFob));
me["Simple_R4"].setText(sprintf("%4.1f/" ~ fmgc.FMGCInternal.fffqSensor, fmgc.FMGCInternal.fob));
me["Simple_R5"].setText(sprintf("%4.1f/", fmgc.FMGCInternal.fuelPredGw) ~ sprintf("%4.1f", fmgc.FMGCInternal.cg));
me["Simple_R6"].setText(sprintf("%4.1f/" ~ fmgc.FMGCInternal.extraTime, fmgc.FMGCInternal.extraFuel));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_L6"].setText(sprintf("%.1f", fmgc.FMGCInternal.minDestFob * LBS2KGS));
me["Simple_R4"].setText(sprintf("%4.1f/" ~ fmgc.FMGCInternal.fffqSensor, fmgc.FMGCInternal.fob * LBS2KGS));
me["Simple_R5"].setText(sprintf("%4.1f/", fmgc.FMGCInternal.fuelPredGw * LBS2KGS) ~ sprintf("%4.1f", fmgc.FMGCInternal.cg));
me["Simple_R6"].setText(sprintf("%4.1f/" ~ fmgc.FMGCInternal.extraTime, fmgc.FMGCInternal.extraFuel * LBS2KGS));
} else {
me["Simple_L6"].setText(sprintf("%.1f", fmgc.FMGCInternal.minDestFob));
me["Simple_R4"].setText(sprintf("%4.1f/" ~ fmgc.FMGCInternal.fffqSensor, fmgc.FMGCInternal.fob));
me["Simple_R5"].setText(sprintf("%4.1f/", fmgc.FMGCInternal.fuelPredGw) ~ sprintf("%4.1f", fmgc.FMGCInternal.cg));
me["Simple_R6"].setText(sprintf("%4.1f/" ~ fmgc.FMGCInternal.extraTime, fmgc.FMGCInternal.extraFuel));
}
me.colorLeft("ack", "ack", "blu", "ack", "blu", "blu");
me.colorRight("ack", "ack", "blu", "grn", "grn", "grn");
@ -2792,9 +2882,17 @@ var canvas_MCDU_base = {
if (fmgc.FMGCInternal.zfwSet) {
if (fmgc.FMGCInternal.zfw < 100) {
me["Simple_C3"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C3"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw * LBS2KGS));
} else {
me["Simple_C3"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw));
}
} else {
me["Simple_C3"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw));
if (acconfig_weight_kgs.getValue() == 1) {
me["Simple_C3"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw * LBS2KGS));
} else {
me["Simple_C3"].setText(" " ~ sprintf("%3.1f", fmgc.FMGCInternal.zfw));
}
}
me["Simple_C3"].show();
me["FUELPRED_ZFW"].hide();
@ -3732,7 +3830,7 @@ var canvas_MCDU_base = {
me["Simple_R3"].setText(sprintf("%.0f", getprop("/FMGC/internal/radio")));
me.fontRight(0, 0, default, 0, 0, 0);
me.fontSizeRight(0, 0, normal, 0, 0, 0);
} else if (getprop("/FMGC/internal/radio-no")) {
} else if (fmgc.FMGCInternal.radioNo) {
me["Simple_R3"].setText("NO");
me.fontRight(0, 0, default, 0, 0, 0);
me.fontSizeRight(0, 0, normal, 0, 0, 0);
@ -3745,7 +3843,7 @@ var canvas_MCDU_base = {
me["Simple_R4S"].setText("LDG CONF ");
me["Simple_R4"].setText("CONF3 ");
me["Simple_R5"].setText("FULL ");
if (ldg_config_3_set.getValue() == 1 and ldg_config_f_set.getValue() == 0) {
if (fmgc.FMGCInternal.ldgConfig3 == 1 and fmgc.FMGCInternal.ldgConfigFull == 0) {
me["PERFAPPR_LDG_3"].hide();
me["PERFAPPR_LDG_F"].show();
me.fontSizeRight(0, 0, 0, normal, small, 0);
@ -3769,7 +3867,7 @@ var canvas_MCDU_base = {
me["Simple_C5"].setText(sprintf("%3.0f", fmgc.FMGCInternal.vls_appr));
me["Simple_L5"].setText(sprintf("%3.0f", fmgc.FMGCInternal.vapp_appr));
me.fontLeft(0, 0, 0, 0, default, 0);
if (vapp_speed_set.getValue()) {
if (fmgc.FMGCInternal.vappSpeedSet) {
me.fontSizeLeft(0, 0, 0, 0, normal, 0);
} else {
me.fontSizeLeft(0, 0, 0, 0, small, 0);
@ -3779,7 +3877,7 @@ var canvas_MCDU_base = {
me["Simple_C2"].setText(" ---");
me["Simple_C3"].setText(" ---");
me["Simple_C5"].setText(" ---");
if (vapp_speed_set.getValue()) {
if (fmgc.FMGCInternal.vappSpeedSet) {
me["Simple_L5"].setText(sprintf("%3.0f", fmgc.FMGCInternal.vapp_appr));
me.fontLeft(0, 0, 0, 0, default, 0);
me.fontSizeLeft(0, 0, 0, 0, normal, 0);

View file

@ -794,7 +794,7 @@ var canvas_PFD_base = {
} else {
me["AI_agl"].setColor(0.0509,0.7529,0.2941);
}
} else if (getprop("/FMGC/internal/radio-no")) {
} else if (fmgc.FMGCInternal.radioNo) {
me["FMA_dh"].setText("BARO");
me["FMA_dh"].show();
me["FMA_dhn"].setText("100");
@ -835,7 +835,7 @@ var canvas_PFD_base = {
me["FMA_dhn"].setText(sprintf("%.0f", getprop("/FMGC/internal/baro")));
me["FMA_dhn"].show();
me["FMA_nodh"].hide();
} else if (getprop("/FMGC/internal/radio-no")) {
} else if (fmgc.FMGCInternal.radioNo) {
me["FMA_dh"].setText("BARO");
me["FMA_dh"].show();
me["FMA_dhn"].setText("100");
@ -1259,7 +1259,7 @@ var canvas_PFD_1 = {
if (managed_spd.getValue() == 1) {
if (getprop("/FMGC/internal/decel") == 1) {
if (getprop("/FMGC/internal/vapp-speed-set")) {
if (fmgc.FMGCInternal.vappSpeedSet) {
vapp = fmgc.FMGCInternal.vapp_appr;
} else {
vapp = fmgc.FMGCInternal.vapp;
@ -1690,13 +1690,13 @@ var canvas_PFD_1 = {
me["ground"].hide();
}
if (!getprop("/ECAM/alt-alert-flash") and !getprop("/ECAM/alt-alert-steady")) {
if (!ecam.altAlertFlash and !ecam.altAlertSteady) {
alt_going1 = 0;
amber_going1 = 0;
me["ALT_box_flash"].hide();
me["ALT_box_amber"].hide();
} else {
if (getprop("/ECAM/alt-alert-flash")) {
if (ecam.altAlertFlash) {
if (alt_going1 == 1) {
me["ALT_box_flash"].hide();
altTimer1.stop();
@ -1714,7 +1714,7 @@ var canvas_PFD_1 = {
} else {
me["ALT_box_amber"].show();
}
} elsif (getprop("/ECAM/alt-alert-steady")) {
} elsif (ecam.altAlertSteady) {
if (amber_going1 == 1) {
me["ALT_box"].show();
me["ALT_box_amber"].hide();
@ -1997,7 +1997,7 @@ var canvas_PFD_2 = {
if (managed_spd.getValue() == 1) {
if (getprop("/FMGC/internal/decel") == 1) {
if (getprop("/FMGC/internal/vapp-speed-set")) {
if (fmgc.FMGCInternal.vappSpeedSet) {
vapp = fmgc.FMGCInternal.vapp_appr;
} else {
vapp = fmgc.FMGCInternal.vapp;
@ -2428,13 +2428,13 @@ var canvas_PFD_2 = {
me["ground"].hide();
}
if (!getprop("/ECAM/alt-alert-flash") and !getprop("/ECAM/alt-alert-steady")) {
if (!ecam.altAlertFlash and !ecam.altAlertSteady) {
alt_going2 = 0;
amber_going2 = 0;
me["ALT_box_flash"].hide();
me["ALT_box_amber"].hide();
} else {
if (getprop("/ECAM/alt-alert-flash")) {
if (ecam.altAlertFlash) {
if (alt_going2 == 1) {
me["ALT_box_flash"].hide();
altTimer2.stop();
@ -2452,7 +2452,7 @@ var canvas_PFD_2 = {
} else {
me["ALT_box_amber"].hide();
}
} elsif (getprop("/ECAM/alt-alert-steady")) {
} elsif (ecam.altAlertSteady) {
if (amber_going2 == 1) {
me["ALT_box"].show();
me["ALT_box_amber"].hide();

View file

@ -6,18 +6,11 @@ var upperECAM_cfm_eis2 = nil;
var upperECAM_iae_eis2 = nil;
var upperECAM_test = nil;
var upperECAM_display = nil;
var elapsedtime = 0;
var leftmsg = "XX";
var rightmsg = "XX";
# Conversion factor pounds to kilogram
LBS2KGS = 0.4535924;
var flapsPos = 0;
# Create Nodes:
var fuel_1 = props.globals.initNode("/engines/engine[0]/fuel-flow_actual", 0);
var fuel_2 = props.globals.initNode("/engines/engine[1]/fuel-flow_actual", 0);
var EPR_1 = props.globals.initNode("/ECAM/Upper/EPR[0]", 0, "DOUBLE");
var EPR_2 = props.globals.initNode("/ECAM/Upper/EPR[1]", 0, "DOUBLE");
var EPR_thr_1 = props.globals.initNode("/ECAM/Upper/EPRthr[0]", 0);
@ -38,29 +31,10 @@ var slatLockFlash = props.globals.initNode("/instrumentation/du/slat-lock-flash"
# Fetch nodes:
var acconfig_weight_kgs = props.globals.getNode("/systems/acconfig/options/weight-kgs", 1);
var et = props.globals.getNode("/sim/time/elapsed-sec", 1);
var acconfig = props.globals.getNode("/systems/acconfig/autoconfig-running", 1);
var eng_option = props.globals.getNode("/options/eng", 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_2 = props.globals.getNode("/engines/engine[1]/reverser-pos-norm", 1);
var fuel = props.globals.getNode("/consumables/fuel/total-fuel-lbs", 1);
var modeautobrake = props.globals.getNode("/controls/autobrake/mode", 1);
var speedbrakearm = props.globals.getNode("/controls/flight/speedbrake-arm", 1);
var ECAMtoconfig = props.globals.getNode("/ECAM/to-config", 1);
var gear = props.globals.getNode("/gear/gear[1]/position-norm", 1);
var smoke = props.globals.getNode("/controls/lighting/no-smoking-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 wow0 = props.globals.getNode("/gear/gear[0]/wow");
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 eng1_n2 = props.globals.getNode("/engines/engine[0]/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 eng2_epr = props.globals.getNode("/engines/engine[1]/epr-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 fadecpower_1 = props.globals.getNode("/systems/fadec/powered1", 1);
var fadecpower_2 = props.globals.getNode("/systems/fadec/powered2", 1);
var fadecpowerup = props.globals.getNode("/systems/fadec/powerup", 1);
@ -83,11 +57,57 @@ var ECAM_line5c = props.globals.getNode("/ECAM/msg/linec5", 1);
var ECAM_line6c = props.globals.getNode("/ECAM/msg/linec6", 1);
var ECAM_line7c = props.globals.getNode("/ECAM/msg/linec7", 1);
var ECAM_line8c = props.globals.getNode("/ECAM/msg/linec8", 1);
var ECAMleft = props.globals.getNode("/ECAM/left-msg", 1);
var ECAMright = props.globals.getNode("/ECAM/right-msg", 1);
var slatsLocked = props.globals.getNode("/fdm/jsbsim/fcs/slat-locked", 1);
var ECAM_line1r = props.globals.getNode("/ECAM/rightmsg/line1", 1);
var ECAM_line2r = props.globals.getNode("/ECAM/rightmsg/line2", 1);
var ECAM_line3r = props.globals.getNode("/ECAM/rightmsg/line3", 1);
var ECAM_line4r = props.globals.getNode("/ECAM/rightmsg/line4", 1);
var ECAM_line5r = props.globals.getNode("/ECAM/rightmsg/line5", 1);
var ECAM_line6r = props.globals.getNode("/ECAM/rightmsg/line6", 1);
var ECAM_line7r = props.globals.getNode("/ECAM/rightmsg/line7", 1);
var ECAM_line8r = props.globals.getNode("/ECAM/rightmsg/line8", 1);
var ECAM_line1rc = props.globals.getNode("/ECAM/rightmsg/linec1", 1);
var ECAM_line2rc = props.globals.getNode("/ECAM/rightmsg/linec2", 1);
var ECAM_line3rc = props.globals.getNode("/ECAM/rightmsg/linec3", 1);
var ECAM_line4rc = props.globals.getNode("/ECAM/rightmsg/linec4", 1);
var ECAM_line5rc = props.globals.getNode("/ECAM/rightmsg/linec5", 1);
var ECAM_line6rc = props.globals.getNode("/ECAM/rightmsg/linec6", 1);
var ECAM_line7rc = props.globals.getNode("/ECAM/rightmsg/linec7", 1);
var ECAM_line8rc = props.globals.getNode("/ECAM/rightmsg/linec8", 1);
var rate = props.globals.getNode("/systems/acconfig/options/uecam-rate", 1);
# Temporary variables
var cur_eng_option = 0;
var elapsedtime = 0;
var EGT_1_cur = 0;
var EGT_2_cur = 0;
var eprLimit = 0;
var EPR_1_cur = 0;
var EPR_2_cur = 0;
var EPR_1_act = 0;
var EPR_2_act = 0;
var EPR_lim_cur = 0;
var EPR_thr_1_act = 0;
var EPR_thr_2_act = 0;
var flapsPos = 0;
var fuel1 = 0;
var fuel2 = 0;
var fadecPower1 = 0;
var fadecPower2 = 0;
var fadecPowerStart = 0;
var n1Limit = 0;
var N1_1_cur = 0;
var N1_2_cur = 0;
var N1_1_act = 0;
var N1_2_act = 0;
var N1_lim_cur = 0;
var n2cur_1 = 0;
var n2cur_2 = 0;
var rev_1_act = 0;
var rev_2_act = 0;
var rev_1_cur = 0;
var rev_2_cur = 0;
var thrLimit = 0;
var canvas_upperECAM_base = {
init: func(canvas_group, file) {
var font_mapper = func(family, weight) {
@ -128,16 +148,16 @@ var canvas_upperECAM_base = {
return [];
},
updateDu3: func() {
var elapsedtime = et.getValue();
elapsedtime = pts.Sim.Time.elapsedSec.getValue();
if (systems.ELEC.Bus.acEss.getValue() >= 110) {
if (du3_offtime.getValue() + 3 < elapsedtime) {
if (wow0.getValue() == 1) {
if (pts.Gear.wow[0].getValue()) {
if (acconfig.getValue() != 1 and du3_test.getValue() != 1) {
du3_test.setValue(1);
du3_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
du3_test_time.setValue(elapsedtime);
} else if (acconfig.getValue() == 1 and du3_test.getValue() != 1) {
} else if (acconfig.getValue() and du3_test.getValue() != 1) {
du3_test.setValue(1);
du3_test_amount.setValue(math.round((rand() * 5 ) + 35, 0.1));
du3_test_time.setValue(elapsedtime - 30);
@ -154,9 +174,9 @@ var canvas_upperECAM_base = {
}
},
update: func() {
var elapsedtime = et.getValue();
elapsedtime = pts.Sim.Time.elapsedSec.getValue();
cur_eng_option = eng_option.getValue();
if (systems.ELEC.Bus.acEss.getValue() >= 110 and du3_lgt.getValue() > 0.01) {
if (du3_test_time.getValue() + du3_test_amount.getValue() >= elapsedtime) {
upperECAM_cfm_eis2.page.hide();
@ -181,10 +201,27 @@ var canvas_upperECAM_base = {
upperECAM_iae_eis2.page.hide();
}
},
getColorString: func(color) {
if (color == "w") {
return [0.8078,0.8039,0.8078];
} else if (color == "m") {
return [0.6901,0.3333,0.7450];
} else if (color == "c") {
return [0.0901,0.6039,0.7176];
} else if (color == "g") {
return [0.0509,0.7529,0.2941];
} else if (color == "a") {
return [0.7333,0.3803,0];
} else if (color == "r") {
return [1,0,0];
} else {
return [1,1,1];
}
},
updateBase: func() {
# Reversers
rev_1_cur = rev_1.getValue();
rev_2_cur = rev_2.getValue();
rev_1_cur = pts.Engines.Engine.reverser[0].getValue();
rev_2_cur = pts.Engines.Engine.reverser[1].getValue();
cur_eng_option = eng_option.getValue();
if (rev_1_cur >= 0.01 and fadec.FADEC.Eng1.n1 == 1 and cur_eng_option == "CFM") {
me["REV1"].show();
@ -242,13 +279,13 @@ var canvas_upperECAM_base = {
me["FlapDots"].hide();
}
if (slatsLocked.getValue() == 1) {
if (pts.Fdm.JSBsim.Fcs.slatLocked.getValue()) {
if (slatLockGoing == 0) {
slatLockGoing = 1;
}
if (slatLockGoing == 1) {
slatLockTimer.start();
if (slatLockFlash.getValue() == 1) {
if (slatLockFlash.getValue()) {
me["SlatAlphaLock"].show();
} else {
me["SlatAlphaLock"].hide();
@ -261,362 +298,38 @@ var canvas_upperECAM_base = {
}
# FOB
if (acconfig_weight_kgs.getValue() == 1)
if (acconfig_weight_kgs.getValue())
{
me["FOB-LBS"].setText(sprintf("%s", math.round(fuel.getValue() * LBS2KGS, 10)));
me["FOB-LBS"].setText(sprintf("%s", math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() * LBS2KGS, 10)));
me["FOB-weight-unit"].setText("KG");
} else {
me["FOB-LBS"].setText(sprintf("%s", math.round(fuel.getValue(), 10)));
me["FOB-LBS"].setText(sprintf("%s", math.round(pts.Consumables.Fuel.totalFuelLbs.getValue(), 10)));
me["FOB-weight-unit"].setText("LBS");
}
# Left ECAM Messages
line1c = ECAM_line1c.getValue();
line2c = ECAM_line2c.getValue();
line3c = ECAM_line3c.getValue();
line4c = ECAM_line4c.getValue();
line5c = ECAM_line5c.getValue();
line6c = ECAM_line6c.getValue();
line7c = ECAM_line7c.getValue();
line8c = ECAM_line8c.getValue();
leftmsg = ECAMleft.getValue();
rightmsg = ECAMright.getValue();
# ECAM Messages
if (leftmsg == "MSG") {
me["ECAML1"].setText(sprintf("%s", ECAM_line1.getValue()));
me["ECAML2"].setText(sprintf("%s", ECAM_line2.getValue()));
me["ECAML3"].setText(sprintf("%s", ECAM_line3.getValue()));
me["ECAML4"].setText(sprintf("%s", ECAM_line4.getValue()));
me["ECAML5"].setText(sprintf("%s", ECAM_line5.getValue()));
me["ECAML6"].setText(sprintf("%s", ECAM_line6.getValue()));
me["ECAML7"].setText(sprintf("%s", ECAM_line7.getValue()));
me["ECAML8"].setText(sprintf("%s", ECAM_line8.getValue()));
me["ECAML1"].setText(sprintf("%s", ECAM_line1.getValue()));
me["ECAML2"].setText(sprintf("%s", ECAM_line2.getValue()));
me["ECAML3"].setText(sprintf("%s", ECAM_line3.getValue()));
me["ECAML4"].setText(sprintf("%s", ECAM_line4.getValue()));
me["ECAML5"].setText(sprintf("%s", ECAM_line5.getValue()));
me["ECAML6"].setText(sprintf("%s", ECAM_line6.getValue()));
me["ECAML7"].setText(sprintf("%s", ECAM_line7.getValue()));
me["ECAML8"].setText(sprintf("%s", ECAM_line8.getValue()));
if (line1c == "w") {
me["ECAML1"].setColor(0.8078,0.8039,0.8078);
} else if (line1c == "c") {
me["ECAML1"].setColor(0.0901,0.6039,0.7176);
} else if (line1c == "g") {
me["ECAML1"].setColor(0.0509,0.7529,0.2941);
} else if (line1c == "a") {
me["ECAML1"].setColor(0.7333,0.3803,0);
} else if (line1c == "r") {
me["ECAML1"].setColor(1,0,0);
}
if (line2c == "w") {
me["ECAML2"].setColor(0.8078,0.8039,0.8078);
} else if (line2c == "c") {
me["ECAML2"].setColor(0.0901,0.6039,0.7176);
} else if (line2c == "g") {
me["ECAML2"].setColor(0.0509,0.7529,0.2941);
} else if (line2c == "a") {
me["ECAML2"].setColor(0.7333,0.3803,0);
} else if (line2c == "r") {
me["ECAML2"].setColor(1,0,0);
}
if (line3c == "w") {
me["ECAML3"].setColor(0.8078,0.8039,0.8078);
} else if (line3c == "c") {
me["ECAML3"].setColor(0.0901,0.6039,0.7176);
} else if (line3c == "g") {
me["ECAML3"].setColor(0.0509,0.7529,0.2941);
} else if (line3c == "a") {
me["ECAML3"].setColor(0.7333,0.3803,0);
} else if (line3c == "r") {
me["ECAML3"].setColor(1,0,0);
}
if (line4c == "w") {
me["ECAML4"].setColor(0.8078,0.8039,0.8078);
} else if (line4c == "c") {
me["ECAML4"].setColor(0.0901,0.6039,0.7176);
} else if (line4c == "g") {
me["ECAML4"].setColor(0.0509,0.7529,0.2941);
} else if (line4c == "a") {
me["ECAML4"].setColor(0.7333,0.3803,0);
} else if (line4c == "r") {
me["ECAML4"].setColor(1,0,0);
}
if (line5c == "w") {
me["ECAML5"].setColor(0.8078,0.8039,0.8078);
} else if (line5c == "c") {
me["ECAML5"].setColor(0.0901,0.6039,0.7176);
} else if (line5c == "g") {
me["ECAML5"].setColor(0.0509,0.7529,0.2941);
} else if (line5c == "a") {
me["ECAML5"].setColor(0.7333,0.3803,0);
} else if (line5c == "r") {
me["ECAML5"].setColor(1,0,0);
}
if (line6c == "w") {
me["ECAML6"].setColor(0.8078,0.8039,0.8078);
} else if (line6c == "c") {
me["ECAML6"].setColor(0.0901,0.6039,0.7176);
} else if (line6c == "g") {
me["ECAML6"].setColor(0.0509,0.7529,0.2941);
} else if (line6c == "a") {
me["ECAML6"].setColor(0.7333,0.3803,0);
} else if (line6c == "r") {
me["ECAML6"].setColor(1,0,0);
}
if (line7c == "w") {
me["ECAML7"].setColor(0.8078,0.8039,0.8078);
} else if (line7c == "c") {
me["ECAML7"].setColor(0.0901,0.6039,0.7176);
} else if (line7c == "g") {
me["ECAML7"].setColor(0.0509,0.7529,0.2941);
} else if (line7c == "a") {
me["ECAML7"].setColor(0.7333,0.3803,0);
} else if (line7c == "r") {
me["ECAML7"].setColor(1,0,0);
}
if (line8c == "w") {
me["ECAML8"].setColor(0.8078,0.8039,0.8078);
} else if (line8c == "c") {
me["ECAML8"].setColor(0.0901,0.6039,0.7176);
} else if (line8c == "g") {
me["ECAML8"].setColor(0.0509,0.7529,0.2941);
} else if (line8c == "a") {
me["ECAML8"].setColor(0.7333,0.3803,0);
} else if (line8c == "r") {
me["ECAML8"].setColor(1,0,0);
}
me["TO_Memo"].hide();
me["LDG_Memo"].hide();
me["ECAM_Left"].show();
} else if (leftmsg == "TO-MEMO") {
modebrk = modeautobrake.getValue();
if (modebrk == 3) {
me["TO_Autobrake"].setText("AUTO BRK MAX");
me["TO_Autobrake_B"].hide();
} else {
me["TO_Autobrake"].setText("AUTO BRK");
me["TO_Autobrake_B"].show();
}
if (smoke.getValue() == 1 and seatbelt.getValue() == 1) {
me["TO_Signs"].setText("SIGNS ON");
me["TO_Signs_B"].hide();
} else {
me["TO_Signs"].setText("SIGNS");
me["TO_Signs_B"].show();
}
if (speedbrakearm.getValue() == 1) {
me["TO_Spoilers"].setText("SPLRS ARM");
me["TO_Spoilers_B"].hide();
} else {
me["TO_Spoilers"].setText("SPLRS");
me["TO_Spoilers_B"].show();
}
if (flapsPos > 0 and flapsPos < 5) {
me["TO_Flaps"].setText("FLAPS T.O");
me["TO_Flaps_B"].hide();
} else {
me["TO_Flaps"].setText("FLAPS");
me["TO_Flaps_B"].show();
}
if (ECAMtoconfig.getValue() == 1) {
me["TO_Config"].setText("T.O CONFIG NORMAL");
me["TO_Config_B"].hide();
} else {
me["TO_Config"].setText("T.O CONFIG");
me["TO_Config_B"].show();
}
me["ECAM_Left"].hide();
me["LDG_Memo"].hide();
me["TO_Memo"].show();
} else if (leftmsg == "LDG-MEMO") {
if (gear.getValue() == 1) {
me["LDG_Gear"].setText("LDG GEAR DN");
me["LDG_Gear_B"].hide();
} else {
me["LDG_Gear"].setText("LDG GEAR");
me["LDG_Gear_B"].show();
}
if (smoke.getValue() == 1 and seatbelt.getValue() == 1) {
me["LDG_Signs"].setText("SIGNS ON");
me["LDG_Signs_B"].hide();
} else {
me["LDG_Signs"].setText("SIGNS");
me["LDG_Signs_B"].show();
}
if (speedbrakearm.getValue() == 1) {
me["LDG_Spoilers"].setText("SPLRS ARM");
me["LDG_Spoilers_B"].hide();
} else {
me["LDG_Spoilers"].setText("SPLRS");
me["LDG_Spoilers_B"].show();
}
flaps3 = flaps3_ovr.getValue();
if (flaps3 != 1 and flapsPos == 5) {
me["LDG_Flaps"].setText("FLAPS FULL");
me["LDG_Flaps_B"].hide();
me["LDG_Flaps_B3"].hide();
} else if (flaps3 == 1 and flapsPos >= 4) {
me["LDG_Flaps"].setText("FLAPS 3");
me["LDG_Flaps_B"].hide();
me["LDG_Flaps_B3"].hide();
} else {
me["LDG_Flaps"].setText("FLAPS");
if (flaps3 == 1) {
me["LDG_Flaps_B"].hide();
me["LDG_Flaps_B3"].show();
} else {
me["LDG_Flaps_B3"].hide();
me["LDG_Flaps_B"].show();
}
}
me["ECAM_Left"].hide();
me["TO_Memo"].hide();
me["LDG_Memo"].show();
} else {
me["ECAM_Left"].hide();
me["TO_Memo"].hide();
me["LDG_Memo"].hide();
}
me["ECAM_Left"].show();
# Right ECAM Messages
if (rightmsg == "MSG") {
me["ECAMR1"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line1")));
me["ECAMR2"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line2")));
me["ECAMR3"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line3")));
me["ECAMR4"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line4")));
me["ECAMR5"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line5")));
me["ECAMR6"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line6")));
me["ECAMR7"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line7")));
me["ECAMR8"].setText(sprintf("%s", getprop("/ECAM/rightmsg/line8")));
me["ECAMR1"].setText(sprintf("%s", ECAM_line1r.getValue()));
me["ECAMR2"].setText(sprintf("%s", ECAM_line2r.getValue()));
me["ECAMR3"].setText(sprintf("%s", ECAM_line3r.getValue()));
me["ECAMR4"].setText(sprintf("%s", ECAM_line4r.getValue()));
me["ECAMR5"].setText(sprintf("%s", ECAM_line5r.getValue()));
me["ECAMR6"].setText(sprintf("%s", ECAM_line6r.getValue()));
me["ECAMR7"].setText(sprintf("%s", ECAM_line7r.getValue()));
me["ECAMR8"].setText(sprintf("%s", ECAM_line8r.getValue()));
if (getprop("/ECAM/rightmsg/linec1") == "w") {
me["ECAMR1"].setColor(0.8078,0.8039,0.8078);
} else if (getprop("/ECAM/rightmsg/linec1") == "c") {
me["ECAMR1"].setColor(0.0901,0.6039,0.7176);
} else if (getprop("/ECAM/rightmsg/linec1") == "g") {
me["ECAMR1"].setColor(0.0509,0.7529,0.2941);
} else if (getprop("/ECAM/rightmsg/linec1") == "a") {
me["ECAMR1"].setColor(0.7333,0.3803,0);
} else if (getprop("/ECAM/rightmsg/linec1") == "r") {
me["ECAMR1"].setColor(1,0,0);
} else if (getprop("/ECAM/rightmsg/linec1") == "m") {
me["ECAMR1"].setColor(0.6901,0.3333,0.7450);
}
if (getprop("/ECAM/rightmsg/linec2") == "w") {
me["ECAMR2"].setColor(0.8078,0.8039,0.8078);
} else if (getprop("/ECAM/rightmsg/linec2") == "c") {
me["ECAMR2"].setColor(0.0901,0.6039,0.7176);
} else if (getprop("/ECAM/rightmsg/linec2") == "g") {
me["ECAMR2"].setColor(0.0509,0.7529,0.2941);
} else if (getprop("/ECAM/rightmsg/linec2") == "a") {
me["ECAMR2"].setColor(0.7333,0.3803,0);
} else if (getprop("/ECAM/rightmsg/linec2") == "r") {
me["ECAMR2"].setColor(1,0,0);
} else if (getprop("/ECAM/rightmsg/linec2") == "m") {
me["ECAMR2"].setColor(0.6901,0.3333,0.7450);
}
if (getprop("/ECAM/rightmsg/linec3") == "w") {
me["ECAMR3"].setColor(0.8078,0.8039,0.8078);
} else if (getprop("/ECAM/rightmsg/linec3") == "c") {
me["ECAMR3"].setColor(0.0901,0.6039,0.7176);
} else if (getprop("/ECAM/rightmsg/linec3") == "g") {
me["ECAMR3"].setColor(0.0509,0.7529,0.2941);
} else if (getprop("/ECAM/rightmsg/linec3") == "a") {
me["ECAMR3"].setColor(0.7333,0.3803,0);
} else if (getprop("/ECAM/rightmsg/linec3") == "r") {
me["ECAMR3"].setColor(1,0,0);
} else if (getprop("/ECAM/rightmsg/linec3") == "m") {
me["ECAMR3"].setColor(0.6901,0.3333,0.7450);
}
if (getprop("/ECAM/rightmsg/linec4") == "w") {
me["ECAMR4"].setColor(0.8078,0.8039,0.8078);
} else if (getprop("/ECAM/rightmsg/linec4") == "c") {
me["ECAMR4"].setColor(0.0901,0.6039,0.7176);
} else if (getprop("/ECAM/rightmsg/linec4") == "g") {
me["ECAMR4"].setColor(0.0509,0.7529,0.2941);
} else if (getprop("/ECAM/rightmsg/linec4") == "a") {
me["ECAMR4"].setColor(0.7333,0.3803,0);
} else if (getprop("/ECAM/rightmsg/linec4") == "r") {
me["ECAMR4"].setColor(1,0,0);
} else if (getprop("/ECAM/rightmsg/linec4") == "m") {
me["ECAMR4"].setColor(0.6901,0.3333,0.7450);
}
if (getprop("/ECAM/rightmsg/linec5") == "w") {
me["ECAMR5"].setColor(0.8078,0.8039,0.8078);
} else if (getprop("/ECAM/rightmsg/linec5") == "c") {
me["ECAMR5"].setColor(0.0901,0.6039,0.7176);
} else if (getprop("/ECAM/rightmsg/linec5") == "g") {
me["ECAMR5"].setColor(0.0509,0.7529,0.2941);
} else if (getprop("/ECAM/rightmsg/linec5") == "a") {
me["ECAMR5"].setColor(0.7333,0.3803,0);
} else if (getprop("/ECAM/rightmsg/linec5") == "r") {
me["ECAMR5"].setColor(1,0,0);
} else if (getprop("/ECAM/rightmsg/linec5") == "m") {
me["ECAMR5"].setColor(0.6901,0.3333,0.7450);
}
if (getprop("/ECAM/rightmsg/linec6") == "w") {
me["ECAMR6"].setColor(0.8078,0.8039,0.8078);
} else if (getprop("/ECAM/rightmsg/linec6") == "c") {
me["ECAMR6"].setColor(0.0901,0.6039,0.7176);
} else if (getprop("/ECAM/rightmsg/linec6") == "g") {
me["ECAMR6"].setColor(0.0509,0.7529,0.2941);
} else if (getprop("/ECAM/rightmsg/linec6") == "a") {
me["ECAMR6"].setColor(0.7333,0.3803,0);
} else if (getprop("/ECAM/rightmsg/linec6") == "r") {
me["ECAMR6"].setColor(1,0,0);
} else if (getprop("/ECAM/rightmsg/linec6") == "m") {
me["ECAMR6"].setColor(0.6901,0.3333,0.7450);
}
if (getprop("/ECAM/rightmsg/linec7") == "w") {
me["ECAMR7"].setColor(0.8078,0.8039,0.8078);
} else if (getprop("/ECAM/rightmsg/linec7") == "c") {
me["ECAMR7"].setColor(0.0901,0.6039,0.7176);
} else if (getprop("/ECAM/rightmsg/linec7") == "g") {
me["ECAMR7"].setColor(0.0509,0.7529,0.2941);
} else if (getprop("/ECAM/rightmsg/linec7") == "a") {
me["ECAMR7"].setColor(0.7333,0.3803,0);
} else if (getprop("/ECAM/rightmsg/linec7") == "r") {
me["ECAMR7"].setColor(1,0,0);
} else if (getprop("/ECAM/rightmsg/linec7") == "m") {
me["ECAMR7"].setColor(0.6901,0.3333,0.7450);
}
if (getprop("/ECAM/rightmsg/linec8") == "w") {
me["ECAMR8"].setColor(0.8078,0.8039,0.8078);
} else if (getprop("/ECAM/rightmsg/linec8") == "c") {
me["ECAMR8"].setColor(0.0901,0.6039,0.7176);
} else if (getprop("/ECAM/rightmsg/linec8") == "g") {
me["ECAMR8"].setColor(0.0509,0.7529,0.2941);
} else if (getprop("/ECAM/rightmsg/linec8") == "a") {
me["ECAMR8"].setColor(0.7333,0.3803,0);
} else if (getprop("/ECAM/rightmsg/linec8") == "r") {
me["ECAMR8"].setColor(1,0,0);
} else if (getprop("/ECAM/rightmsg/linec8") == "m") {
me["ECAMR8"].setColor(0.6901,0.3333,0.7450);
}
me["ECAM_Right"].show();
} else {
me["ECAM_Right"].hide();
}
me["ECAM_Right"].show();
},
};
@ -631,25 +344,24 @@ var canvas_upperECAM_cfm_eis2 = {
return ["N11-needle","N11-thr","N11-ylim","N11","N11-decpnt","N11-decimal","N11-box","N11-scale","N11-scale2","N11-scaletick","N11-scalenum","N11-XX","N11-XX2","N11-XX-box","EGT1-needle","EGT1","EGT1-scale","EGT1-box","EGT1-scale2","EGT1-scaletick",
"EGT1-XX","N21","N21-decpnt","N21-decimal","N21-XX","FF1","FF1-XX","N12-needle","N12-thr","N12-ylim","N12","N12-decpnt","N12-decimal","N12-box","N12-scale","N12-scale2","N12-scaletick","N12-scalenum","N12-XX","N12-XX2","N12-XX-box","EGT2-needle","EGT2",
"EGT2-scale","EGT2-box","EGT2-scale2","EGT2-scaletick","EGT2-XX","N22","N22-decpnt","N22-decimal","N22-XX","FF2","FF2-XX","FOB-LBS","FlapTxt","FlapDots","N1Lim-mode","N1Lim","N1Lim-decpnt","N1Lim-decimal","N1Lim-percent","N1Lim-XX","N1Lim-XX2","REV1",
"REV1-box","REV2","REV2-box","ECAM_Left","ECAML1","ECAML2","ECAML3","ECAML4","ECAML5","ECAML6","ECAML7","ECAML8","ECAMR1", "ECAMR2", "ECAMR3", "ECAMR4", "ECAMR5", "ECAMR6", "ECAMR7", "ECAMR8", "ECAM_Right", "TO_Memo","TO_Autobrake","TO_Signs","TO_Spoilers","TO_Flaps","TO_Config","TO_Autobrake_B","TO_Signs_B","TO_Spoilers_B","TO_Flaps_B",
"TO_Config_B","LDG_Memo","LDG_Gear","LDG_Signs","LDG_Spoilers","LDG_Flaps","LDG_Gear_B","LDG_Signs_B","LDG_Spoilers_B","LDG_Flaps_B","LDG_Flaps_B3",
"REV1-box","REV2","REV2-box","ECAM_Left","ECAML1","ECAML2","ECAML3","ECAML4","ECAML5","ECAML6","ECAML7","ECAML8","ECAMR1", "ECAMR2", "ECAMR3", "ECAMR4", "ECAMR5", "ECAMR6", "ECAMR7", "ECAMR8", "ECAM_Right",
"FOB-weight-unit","FFlow-weight-unit","SlatAlphaLock"];
},
update: func() {
# N1
N1_1_cur = N1_1.getValue();
N1_2_cur = N1_2.getValue();
N1_1_act = eng1_n1.getValue();
N1_2_act = eng2_n1.getValue();
N1_1_act = pts.Engines.Engine.n1Actual[0].getValue();
N1_2_act = pts.Engines.Engine.n1Actual[1].getValue();
N1_lim_cur = N1_lim.getValue();
N1_thr_1_act = N1_thr_1.getValue();
N1_thr_2_act = N1_thr_2.getValue();
rev_1_act = rev_1.getValue();
rev_2_act = rev_2.getValue();
rev_1_act = pts.Engines.Engine.reverser[0].getValue();
rev_2_act = pts.Engines.Engine.reverser[1].getValue();
EGT_1_cur = EGT_1.getValue();
EGT_2_cur = EGT_2.getValue();
n2cur_1 = eng1_n2.getValue();
n2cur_2 = eng2_n2.getValue();
n2cur_1 = pts.Engines.Engine.n2Actual[0].getValue();
n2cur_2 = pts.Engines.Engine.n2Actual[1].getValue();
me["N11"].setText(sprintf("%s", math.floor(N1_1_act + 0.05)));
me["N11-decimal"].setText(sprintf("%s", int(10 * math.mod(N1_1_act + 0.05, 1))));
@ -738,8 +450,8 @@ var canvas_upperECAM_cfm_eis2 = {
}
# EGT
me["EGT1"].setText(sprintf("%s", math.round(eng1_egt.getValue())));
me["EGT2"].setText(sprintf("%s", math.round(eng2_egt.getValue())));
me["EGT1"].setText(sprintf("%s", math.round(pts.Engines.Engine.egtActual[0].getValue())));
me["EGT2"].setText(sprintf("%s", math.round(pts.Engines.Engine.egtActual[1].getValue())));
me["EGT1-needle"].setRotation((EGT_1_cur + 90) * D2R);
me["EGT2-needle"].setRotation((EGT_2_cur + 90) * D2R);
@ -812,13 +524,16 @@ var canvas_upperECAM_cfm_eis2 = {
}
# FF
if (acconfig_weight_kgs.getValue() == 1) {
me["FF1"].setText(sprintf("%s", math.round(fuel_1.getValue() * LBS2KGS, 10)));
me["FF2"].setText(sprintf("%s", math.round(fuel_2.getValue() * LBS2KGS, 10)));
fuel1 = pts.Engines.Engine.fuelFlow[0].getValue();
fuel2 = pts.Engines.Engine.fuelFlow[1].getValue();
if (acconfig_weight_kgs.getValue()) {
me["FF1"].setText(sprintf("%s", math.round(fuel1 * LBS2KGS, 10)));
me["FF2"].setText(sprintf("%s", math.round(fuel2 * LBS2KGS, 10)));
me["FFlow-weight-unit"].setText("KG/H");
} else {
me["FF1"].setText(sprintf("%s", math.round(fuel_1.getValue(), 10)));
me["FF2"].setText(sprintf("%s", math.round(fuel_2.getValue(), 10)));
me["FF1"].setText(sprintf("%s", math.round(fuel1, 10)));
me["FF2"].setText(sprintf("%s", math.round(fuel2, 10)));
me["FFlow-weight-unit"].setText("LBS/H");
}
@ -839,11 +554,18 @@ var canvas_upperECAM_cfm_eis2 = {
}
# N1 Limit
me["N1Lim-mode"].setText(sprintf("%s", thr_limit.getValue()));
me["N1Lim"].setText(sprintf("%s", math.floor(n1_limit.getValue() + 0.05)));
me["N1Lim-decimal"].setText(sprintf("%s", int(10 * math.mod(n1_limit.getValue() + 0.05, 1))));
thrLimit = thr_limit.getValue();
n1Limit = n1_limit.getValue();
if (fadecpower_1.getValue() == 1 or fadecpower_2.getValue() == 1 or fadecpowerup.getValue()) {
me["N1Lim-mode"].setText(sprintf("%s", thrLimit));
me["N1Lim"].setText(sprintf("%s", math.floor(n1Limit + 0.05)));
me["N1Lim-decimal"].setText(sprintf("%s", int(10 * math.mod(n1Limit + 0.05, 1))));
fadecPower1 = fadecpower_1.getValue();
fadecPower2 = fadecpower_2.getValue();
fadecPowerStart = fadecpowerup.getValue();
if (fadecPower1 or fadecPower2 or fadecPowerStart) {
me["N1Lim-mode"].show();
me["N1Lim-XX"].hide();
me["N1Lim-XX2"].hide();
@ -853,7 +575,7 @@ var canvas_upperECAM_cfm_eis2 = {
me["N1Lim-XX2"].show();
}
if ((fadecpower_1.getValue() == 1 or fadecpower_2.getValue() == 1 or fadecpowerup.getValue()) and thr_limit.getValue() != "MREV") {
if ((fadecPower1 or fadecPower2 or fadecPowerStart) and thrLimit != "MREV") {
me["N1Lim"].show();
me["N1Lim-decpnt"].show();
me["N1Lim-decimal"].show();
@ -881,28 +603,28 @@ var canvas_upperECAM_iae_eis2 = {
"N11-needle","N11-thr","N11-ylim","N11","N11-decpnt","N11-decimal","N11-scale","N11-scale2","N11-scaletick","N11-scalenum","N11-XX","N21","N21-decpnt","N21-decimal","N21-XX","FF1","FF1-XX","EPR2-needle","EPR2-thr","EPR2-ylim","EPR2","EPR2-decpnt",
"EPR2-decimal","EPR2-box","EPR2-scale","EPR2-scaletick","EPR2-scalenum","EPR2-XX","EPR2-XX2","EGT2-needle","EGT2","EGT2-scale","EGT2-scale2","EGT2-box","EGT2-scaletick","EGT2-XX","N12-needle","N12-thr","N12-ylim","N12","N12-decpnt","N12-decimal",
"N12-scale","N12-scale2","N12-scaletick","N12-scalenum","N12-XX","N22","N22-decpnt","N22-decimal","N22-XX","FF2","FF2-XX","FOB-LBS","FlapTxt","FlapDots","EPRLim-mode","EPRLim","EPRLim-decpnt","EPRLim-decimal","EPRLim-XX","EPRLim-XX2","REV1","REV1-box",
"REV2","REV2-box","ECAM_Left","ECAML1","ECAML2","ECAML3","ECAML4","ECAML5","ECAML6","ECAML7","ECAML8", "ECAMR1", "ECAMR2", "ECAMR3", "ECAMR4", "ECAMR5", "ECAMR6", "ECAMR7", "ECAMR8", "ECAM_Right", "TO_Memo","TO_Autobrake","TO_Signs","TO_Spoilers","TO_Flaps","TO_Config","TO_Autobrake_B","TO_Signs_B","TO_Spoilers_B","TO_Flaps_B","TO_Config_B",
"LDG_Memo","LDG_Gear","LDG_Signs","LDG_Spoilers","LDG_Flaps","LDG_Gear_B","LDG_Signs_B","LDG_Spoilers_B","LDG_Flaps_B","LDG_Flaps_B3", "FFlow1-weight-unit", "FFlow2-weight-unit", "FOB-weight-unit","SlatAlphaLock"];
"REV2","REV2-box","ECAM_Left","ECAML1","ECAML2","ECAML3","ECAML4","ECAML5","ECAML6","ECAML7","ECAML8", "ECAMR1", "ECAMR2", "ECAMR3", "ECAMR4", "ECAMR5", "ECAMR6", "ECAMR7", "ECAMR8", "ECAM_Right",
"FFlow1-weight-unit", "FFlow2-weight-unit", "FOB-weight-unit","SlatAlphaLock"];
},
update: func() {
N1_1_cur = N1_1.getValue();
N1_2_cur = N1_2.getValue();
N1_1_act = eng1_n1.getValue();
N1_2_act = eng2_n1.getValue();
N1_1_act = pts.Engines.Engine.n1Actual[0].getValue();
N1_2_act = pts.Engines.Engine.n1Actual[1].getValue();
N1_lim_cur = N1_lim.getValue();
EPR_1_cur = EPR_1.getValue();
EPR_2_cur = EPR_2.getValue();
EPR_1_act = eng1_epr.getValue();
EPR_2_act = eng2_epr.getValue();
EPR_1_act = pts.Engines.Engine.eprActual[0].getValue();
EPR_2_act = pts.Engines.Engine.eprActual[1].getValue();
EPR_lim_cur = EPR_lim.getValue();
EPR_thr_1_act = EPR_thr_1.getValue();
EPR_thr_2_act = EPR_thr_2.getValue();
rev_1_act = rev_1.getValue();
rev_2_act = rev_2.getValue();
rev_1_act = pts.Engines.Engine.reverser[0].getValue();
rev_2_act = pts.Engines.Engine.reverser[1].getValue();
EGT_1_cur = EGT_1.getValue();
EGT_2_cur = EGT_2.getValue();
n2cur_1 = eng1_n2.getValue();
n2cur_2 = eng2_n2.getValue();
n2cur_1 = pts.Engines.Engine.n2Actual[0].getValue();
n2cur_2 = pts.Engines.Engine.n2Actual[1].getValue();
# EPR
me["EPR1"].setText(sprintf("%1.0f", math.floor(EPR_1_act)));
@ -982,8 +704,8 @@ var canvas_upperECAM_iae_eis2 = {
}
# EGT
me["EGT1"].setText(sprintf("%s", math.round(eng1_egt.getValue())));
me["EGT2"].setText(sprintf("%s", math.round(eng2_egt.getValue())));
me["EGT1"].setText(sprintf("%s", math.round(pts.Engines.Engine.egtActual[0].getValue())));
me["EGT2"].setText(sprintf("%s", math.round(pts.Engines.Engine.egtActual[1].getValue())));
me["EGT1-needle"].setRotation((EGT_1_cur + 90) * D2R);
me["EGT2-needle"].setRotation((EGT_2_cur + 90) * D2R);
@ -1025,11 +747,11 @@ var canvas_upperECAM_iae_eis2 = {
}
# N1
me["N11"].setText(sprintf("%s", math.floor(eng1_n1.getValue() + 0.05)));
me["N11-decimal"].setText(sprintf("%s", int(10 * math.mod(eng1_n1.getValue() + 0.05, 1))));
me["N11"].setText(sprintf("%s", math.floor(pts.Engines.Engine.n1Actual[0].getValue() + 0.05)));
me["N11-decimal"].setText(sprintf("%s", int(10 * math.mod(pts.Engines.Engine.n1Actual[0].getValue() + 0.05, 1))));
me["N12"].setText(sprintf("%s", math.floor(eng2_n1.getValue() + 0.05)));
me["N12-decimal"].setText(sprintf("%s", int(10 * math.mod(eng2_n1.getValue() + 0.05, 1))));
me["N12"].setText(sprintf("%s", math.floor(pts.Engines.Engine.n1Actual[1].getValue() + 0.05)));
me["N12-decimal"].setText(sprintf("%s", int(10 * math.mod(pts.Engines.Engine.n1Actual[1].getValue() + 0.05, 1))));
me["N11-needle"].setRotation((N1_1_cur + 90) * D2R);
me["N11-thr"].setRotation((N1_thr_1.getValue() + 90) * D2R);
@ -1083,7 +805,7 @@ var canvas_upperECAM_iae_eis2 = {
me["N12-XX"].show();
}
if (fadec.FADEC.Eng1.n1 == 1 and fadec.Fadec.n1Mode[0].getValue() == 1) {
if (fadec.FADEC.Eng1.n1 == 1 and fadec.Fadec.n1Mode[0].getValue()) {
me["N11-thr"].show();
me["N11-ylim"].hide(); # Keep it hidden, since N1 mode limit calculation is not done yet
} else {
@ -1091,7 +813,7 @@ var canvas_upperECAM_iae_eis2 = {
me["N11-ylim"].hide();
}
if (fadec.FADEC.Eng2.n1 == 1 and fadec.Fadec.n1Mode[1].getValue() == 1) {
if (fadec.FADEC.Eng2.n1 == 1 and fadec.Fadec.n1Mode[1].getValue()) {
me["N12-thr"].show();
me["N12-ylim"].hide(); # Keep it hidden, since N1 mode limit calculation is not done yet
} else {
@ -1100,10 +822,10 @@ var canvas_upperECAM_iae_eis2 = {
}
# N2
me["N21"].setText(sprintf("%s", math.floor(eng1_n2.getValue() + 0.05)));
me["N21-decimal"].setText(sprintf("%s", int(10 * math.mod(eng1_n2.getValue() + 0.05, 1))));
me["N22"].setText(sprintf("%s", math.floor(eng2_n2.getValue() + 0.05)));
me["N22-decimal"].setText(sprintf("%s", int(10 * math.mod(eng2_n2.getValue() + 0.05, 1))));
me["N21"].setText(sprintf("%s", math.floor(pts.Engines.Engine.n2Actual[0].getValue() + 0.05)));
me["N21-decimal"].setText(sprintf("%s", int(10 * math.mod(pts.Engines.Engine.n2Actual[0].getValue() + 0.05, 1))));
me["N22"].setText(sprintf("%s", math.floor(pts.Engines.Engine.n2Actual[1].getValue() + 0.05)));
me["N22-decimal"].setText(sprintf("%s", int(10 * math.mod(pts.Engines.Engine.n2Actual[1].getValue() + 0.05, 1))));
if (fadec.FADEC.Eng1.n2 == 1) {
me["N21"].show();
@ -1130,14 +852,14 @@ var canvas_upperECAM_iae_eis2 = {
}
# FF
if (acconfig_weight_kgs.getValue() == 1) {
me["FF1"].setText(sprintf("%s", math.round(fuel_1.getValue() * LBS2KGS, 10)));
me["FF2"].setText(sprintf("%s", math.round(fuel_2.getValue() * LBS2KGS, 10)));
if (acconfig_weight_kgs.getValue()) {
me["FF1"].setText(sprintf("%s", math.round(fuel1 * LBS2KGS, 10)));
me["FF2"].setText(sprintf("%s", math.round(fuel2 * LBS2KGS, 10)));
me["FFlow1-weight-unit"].setText("KG/H");
me["FFlow2-weight-unit"].setText("KG/H");
} else {
me["FF1"].setText(sprintf("%s", math.round(fuel_1.getValue(), 10)));
me["FF2"].setText(sprintf("%s", math.round(fuel_2.getValue(), 10)));
me["FF1"].setText(sprintf("%s", math.round(fuel1, 10)));
me["FF2"].setText(sprintf("%s", math.round(fuel2, 10)));
me["FFlow1-weight-unit"].setText("LBS/H");
me["FFlow2-weight-unit"].setText("LBS/H");
}
@ -1159,11 +881,18 @@ var canvas_upperECAM_iae_eis2 = {
}
# EPR Limit
me["EPRLim-mode"].setText(sprintf("%s", thr_limit.getValue()));
me["EPRLim"].setText(sprintf("%1.0f", math.floor(epr_limit.getValue())));
me["EPRLim-decimal"].setText(sprintf("%03d", (epr_limit.getValue() - int(epr_limit.getValue())) * 1000));
thrLimit = thr_limit.getValue();
eprLimit = epr_limit.getValue();
if (fadecpower_1.getValue() == 1 or fadecpower_2.getValue() == 1 or fadecpowerup.getValue()) {
me["EPRLim-mode"].setText(sprintf("%s", thrLimit));
me["EPRLim"].setText(sprintf("%1.0f", math.floor(eprLimit)));
me["EPRLim-decimal"].setText(sprintf("%03d", (eprLimit - int(eprLimit)) * 1000));
fadecPower1 = fadecpower_1.getValue();
fadecPower2 = fadecpower_2.getValue();
fadecPowerStart = fadecpowerup.getValue();
if (fadecPower1 or fadecPower2 or fadecPowerStart) {
me["EPRLim-mode"].show();
me["EPRLim-XX"].hide();
me["EPRLim-XX2"].hide();
@ -1173,7 +902,7 @@ var canvas_upperECAM_iae_eis2 = {
me["EPRLim-XX2"].show();
}
if ((fadecpower_1.getValue() == 1 or fadecpower_2.getValue() == 1 or fadecpowerup.getValue()) and thr_limit.getValue() != "MREV") {
if ((fadecPower1 or fadecPower2 or fadecPowerStart) and thrLimit != "MREV") {
me["EPRLim"].show();
me["EPRLim-decpnt"].show();
me["EPRLim-decimal"].show();
@ -1214,7 +943,7 @@ var canvas_upperECAM_test = {
return ["Test_white","Test_text"];
},
update: func() {
var elapsedtime = et.getValue();
elapsedtime = pts.Sim.Time.elapsedSec.getValue();
if (du3_test_time.getValue() + 1 >= elapsedtime) {
me["Test_white"].show();
me["Test_text"].hide();
@ -1225,6 +954,17 @@ var canvas_upperECAM_test = {
},
};
var createListenerForLine = func(prop, node, key) {
setlistener(prop, func() {
if (eng_option.getValue() == "IAE") {
upperECAM_iae_eis2[key].setColor(upperECAM_iae_eis2.getColorString(node.getValue()));
} else {
upperECAM_cfm_eis2[key].setColor(upperECAM_cfm_eis2.getColorString(node.getValue()));
}
}, 0, 0);
};
setlistener("sim/signals/fdm-initialized", func {
upperECAM_display = canvas.new({
"name": "upperECAM",
@ -1241,6 +981,24 @@ setlistener("sim/signals/fdm-initialized", func {
upperECAM_iae_eis2 = canvas_upperECAM_iae_eis2.new(group_iae_eis2, "Aircraft/A320-family/Models/Instruments/Upper-ECAM/res/iae-eis2.svg");
upperECAM_test = canvas_upperECAM_test.new(group_test, "Aircraft/A320-family/Models/Instruments/Common/res/du-test.svg");
createListenerForLine("/ECAM/msg/linec1", ECAM_line1c, "ECAML1");
createListenerForLine("/ECAM/msg/linec2", ECAM_line2c, "ECAML2");
createListenerForLine("/ECAM/msg/linec3", ECAM_line3c, "ECAML3");
createListenerForLine("/ECAM/msg/linec4", ECAM_line4c, "ECAML4");
createListenerForLine("/ECAM/msg/linec5", ECAM_line5c, "ECAML5");
createListenerForLine("/ECAM/msg/linec6", ECAM_line6c, "ECAML6");
createListenerForLine("/ECAM/msg/linec7", ECAM_line7c, "ECAML7");
createListenerForLine("/ECAM/msg/linec8", ECAM_line8c, "ECAML8");
createListenerForLine("/ECAM/rightmsg/linec1", ECAM_line1rc, "ECAMR1");
createListenerForLine("/ECAM/rightmsg/linec2", ECAM_line2rc, "ECAMR2");
createListenerForLine("/ECAM/rightmsg/linec3", ECAM_line3rc, "ECAMR3");
createListenerForLine("/ECAM/rightmsg/linec4", ECAM_line4rc, "ECAMR4");
createListenerForLine("/ECAM/rightmsg/linec5", ECAM_line5rc, "ECAMR5");
createListenerForLine("/ECAM/rightmsg/linec6", ECAM_line6rc, "ECAMR6");
createListenerForLine("/ECAM/rightmsg/linec7", ECAM_line7rc, "ECAMR7");
createListenerForLine("/ECAM/rightmsg/linec8", ECAM_line8rc, "ECAMR8");
upperECAM_update.start();
if (rate.getValue() > 1) {
u_rateApply();

View file

@ -41,9 +41,9 @@
inkscape:window-height="705"
id="namedview371"
showgrid="true"
inkscape:zoom="1.4142136"
inkscape:cx="832.32702"
inkscape:cy="561.61738"
inkscape:zoom="0.50000001"
inkscape:cx="419.64115"
inkscape:cy="1000.4352"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
@ -1264,485 +1264,6 @@
y="943.73566"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#cecdce">LINE 8</tspan></text>
</g>
<g
id="TO_Memo"
inkscape:label="#g4517">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4412"
y="686.0564"
x="14.033532"
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="686.0564"
x="14.033532"
id="tspan4414"
sodipodi:role="line">T.O</tspan></text>
<path
style="fill:none;stroke:#0dc04b;stroke-width:2.4000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 13.8216,741.99564 77.932201,0"
id="path4556"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="686.0564"
id="TO_Autobrake"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4421"
x="104.6523"
y="686.0564"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">AUTO BRK</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="TO_Signs"
y="722.50458"
x="104.6523"
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="722.50458"
x="104.6523"
id="tspan4425"
sodipodi:role="line">SIGNS</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="759.67883"
id="TO_Spoilers"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4429"
x="104.6523"
y="759.67883"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">SPLRS</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="TO_Flaps"
y="796.12726"
x="104.6523"
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="796.12726"
x="104.6523"
id="tspan4436"
sodipodi:role="line">FLAPS </tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="833.30151"
id="TO_Config"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4440"
x="104.6523"
y="833.30151"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">T.O CONFIG</tspan></text>
<g
inkscape:label="#g4487"
id="TO_Autobrake_B">
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="686.41925"
id="text4442"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4444"
x="489.9281"
y="686.41925"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">MAX</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4462"
y="686.41925"
x="403.6488"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="686.41925"
x="403.6488"
id="tspan4465"
sodipodi:role="line">. . . . .</tspan></text>
</g>
<g
inkscape:label="#g4493"
id="TO_Signs_B">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4446"
y="722.50458"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="722.50458"
x="489.9281"
id="tspan4448"
sodipodi:role="line"> ON</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="424.27417"
y="722.86768"
id="text4471"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"
inkscape:transform-center-y="-46.367479"><tspan
sodipodi:role="line"
id="tspan4473"
x="424.27417"
y="722.86768"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4499"
id="TO_Spoilers_B">
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="760.04193"
id="text4450"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4452"
x="489.9281"
y="760.04193"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">ARM</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="403.6488"
y="760.04193"
id="text4475"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4477"
x="403.6488"
y="760.04193"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4505"
id="TO_Flaps_B">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4454"
y="796.12726"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.12726"
x="489.9281"
id="tspan4456"
sodipodi:role="line">T.O</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="424.27417"
y="796.49036"
id="text4479"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4481"
x="424.27417"
y="796.49036"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4511"
id="TO_Config_B">
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="833.30151"
id="text4458"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4460"
x="489.9281"
y="833.30151"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">TEST</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4483"
y="833.66461"
x="383.02429"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="833.66461"
x="383.02429"
id="tspan4485"
sodipodi:role="line">. . .</tspan></text>
</g>
</g>
<g
inkscape:label="#g4517"
id="LDG_Memo">
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="14.033532"
y="686.0564"
id="text4418"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan233"
x="14.033532"
y="686.0564"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">LDG</tspan></text>
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4424"
d="M 13.8216,741.99564 H 91.753801"
style="fill:none;stroke:#0dc04b;stroke-width:2.4000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="LDG_Gear"
y="686.0564"
x="104.6523"
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="686.0564"
x="104.6523"
id="tspan4428"
sodipodi:role="line">LDG GEAR</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="722.50458"
id="LDG_Signs"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4432"
x="104.6523"
y="722.50458"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">SIGNS</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="759.37872"
id="LDG_Cabin"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan241"
x="104.6523"
y="759.37872"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">CABIN READY</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="LDG_Spoilers"
y="796.12726"
x="104.6523"
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="796.12726"
x="104.6523"
id="tspan4438"
sodipodi:role="line">SPLRS</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="833.30151"
id="LDG_Flaps"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4442"
x="104.6523"
y="833.30151"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">FLAPS </tspan></text>
<g
id="LDG_Gear_B"
inkscape:label="#g4487">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4451"
y="686.41925"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="686.41925"
x="489.9281"
id="tspan4453"
sodipodi:role="line">DN</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="424.27417"
y="686.41925"
id="text4455"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4457"
x="424.27417"
y="686.41925"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . .</tspan></text>
</g>
<g
id="LDG_Signs_B"
inkscape:label="#g4493">
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="722.50458"
id="text4461"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4463"
x="489.9281"
y="722.50458"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"> ON</tspan></text>
<text
inkscape:transform-center-y="-46.367479"
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4465"
y="722.86768"
x="424.27417"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="722.86768"
x="424.27417"
id="tspan4467"
sodipodi:role="line">. . . . . . . . . .</tspan></text>
</g>
<g
id="LDG_Spoilers_B"
inkscape:label="#g4499">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4472"
y="796.49036"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.49036"
x="489.9281"
id="tspan4474"
sodipodi:role="line">ARM</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4476"
y="796.49036"
x="403.6488"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.49036"
x="403.6488"
id="tspan4478"
sodipodi:role="line">. . . . . . . . .</tspan></text>
</g>
<g
id="LDG_Flaps_B"
inkscape:label="#g4505"
transform="translate(0,39.990378)">
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="796.12726"
id="text4482"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4484"
x="489.9281"
y="796.12726"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">FULL</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4486"
y="796.49036"
x="383.02411"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.49036"
x="383.02411"
id="tspan4488"
sodipodi:role="line">. . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4505"
id="LDG_Flaps_B3">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text5125"
y="833.30151"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="833.30151"
x="489.9281"
id="tspan5127"
sodipodi:role="line">3</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="465.52426"
y="833.66461"
id="text5129"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan5131"
x="465.52426"
y="833.66461"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . . . . .</tspan></text>
</g>
</g>
<g
inkscape:label="#g4376"
id="ECAM_Right"

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View file

@ -12,7 +12,7 @@
viewBox="0 0 1024 1024"
version="1.1"
id="svg2"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="iae-eis2.svg">
<metadata
id="metadata375">
@ -42,7 +42,7 @@
id="namedview371"
showgrid="false"
inkscape:zoom="0.43942712"
inkscape:cx="568.82143"
inkscape:cx="180.81625"
inkscape:cy="433.53356"
inkscape:window-x="-8"
inkscape:window-y="-8"
@ -1632,485 +1632,6 @@
y="943.73566"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#cecdce">LINE 8</tspan></text>
</g>
<g
id="TO_Memo"
inkscape:label="#g4517">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4412"
y="686.0564"
x="14.033532"
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="686.0564"
x="14.033532"
id="tspan4414"
sodipodi:role="line">T.O</tspan></text>
<path
style="fill:none;stroke:#0dc04b;stroke-width:2.4000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 13.8216,741.99564 77.932201,0"
id="path4556"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="686.0564"
id="TO_Autobrake"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4421"
x="104.6523"
y="686.0564"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">AUTO BRK</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="TO_Signs"
y="722.50458"
x="104.6523"
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="722.50458"
x="104.6523"
id="tspan4425"
sodipodi:role="line">SIGNS</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="759.67883"
id="TO_Spoilers"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4429"
x="104.6523"
y="759.67883"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">SPLRS</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="TO_Flaps"
y="796.12726"
x="104.6523"
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="796.12726"
x="104.6523"
id="tspan4436"
sodipodi:role="line">FLAPS </tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="833.30151"
id="TO_Config"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4440"
x="104.6523"
y="833.30151"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">T.O CONFIG</tspan></text>
<g
inkscape:label="#g4487"
id="TO_Autobrake_B">
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="686.41925"
id="text4442"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4444"
x="489.9281"
y="686.41925"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">MAX</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4462"
y="686.41925"
x="403.6488"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="686.41925"
x="403.6488"
id="tspan4465"
sodipodi:role="line">. . . . .</tspan></text>
</g>
<g
inkscape:label="#g4493"
id="TO_Signs_B">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4446"
y="722.50458"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="722.50458"
x="489.9281"
id="tspan4448"
sodipodi:role="line"> ON</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="424.27417"
y="722.86768"
id="text4471"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"
inkscape:transform-center-y="-46.367479"><tspan
sodipodi:role="line"
id="tspan4473"
x="424.27417"
y="722.86768"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4499"
id="TO_Spoilers_B">
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="760.04193"
id="text4450"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4452"
x="489.9281"
y="760.04193"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">ARM</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="403.6488"
y="760.04193"
id="text4475"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4477"
x="403.6488"
y="760.04193"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4505"
id="TO_Flaps_B">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4454"
y="796.12726"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.12726"
x="489.9281"
id="tspan4456"
sodipodi:role="line">T.O</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="424.27417"
y="796.49036"
id="text4479"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4481"
x="424.27417"
y="796.49036"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4511"
id="TO_Config_B">
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="833.30151"
id="text4458"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4460"
x="489.9281"
y="833.30151"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">TEST</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4483"
y="833.66461"
x="383.02429"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="833.66461"
x="383.02429"
id="tspan4485"
sodipodi:role="line">. . .</tspan></text>
</g>
</g>
<g
inkscape:label="#g4517"
id="LDG_Memo">
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="14.033532"
y="686.0564"
id="text4418"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4422"
x="14.033532"
y="686.0564"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">LDG</tspan></text>
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4424"
d="m 13.8216,741.99564 77.932201,0"
style="fill:none;stroke:#0dc04b;stroke-width:2.4000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="LDG_Gear"
y="686.0564"
x="104.6523"
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="686.0564"
x="104.6523"
id="tspan4428"
sodipodi:role="line">LDG GEAR</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="722.50458"
id="LDG_Signs"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4432"
x="104.6523"
y="722.50458"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">SIGNS</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="759.37872"
id="LDG_Cabin"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4455"
x="104.6523"
y="759.37872"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">CABIN READY</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="LDG_Spoilers"
y="796.12726"
x="104.6523"
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1"
y="796.12726"
x="104.6523"
id="tspan4438"
sodipodi:role="line">SPLRS</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="104.6523"
y="833.30151"
id="LDG_Flaps"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4442"
x="104.6523"
y="833.30151"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1">FLAPS </tspan></text>
<g
id="LDG_Gear_B"
inkscape:label="#g4487">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4451"
y="686.41925"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="686.41925"
x="489.9281"
id="tspan4453"
sodipodi:role="line">DN</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="424.27417"
y="686.41925"
id="text4455"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4457"
x="424.27417"
y="686.41925"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . .</tspan></text>
</g>
<g
id="LDG_Signs_B"
inkscape:label="#g4493">
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="722.50458"
id="text4461"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4463"
x="489.9281"
y="722.50458"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"> ON</tspan></text>
<text
inkscape:transform-center-y="-46.367479"
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4465"
y="722.86768"
x="424.27417"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="722.86768"
x="424.27417"
id="tspan4467"
sodipodi:role="line">. . . . . . . . . .</tspan></text>
</g>
<g
id="LDG_Spoilers_B"
inkscape:label="#g4499">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4472"
y="796.49036"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.49036"
x="489.9281"
id="tspan4474"
sodipodi:role="line">ARM</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4476"
y="796.49036"
x="403.6488"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.49036"
x="403.6488"
id="tspan4478"
sodipodi:role="line">. . . . . . . . .</tspan></text>
</g>
<g
id="LDG_Flaps_B"
inkscape:label="#g4505"
transform="translate(0,39.990378)">
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="489.9281"
y="796.12726"
id="text4482"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan4484"
x="489.9281"
y="796.12726"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">FULL</tspan></text>
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text4486"
y="796.49036"
x="383.02411"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="796.49036"
x="383.02411"
id="tspan4488"
sodipodi:role="line">. . . . . . . .</tspan></text>
</g>
<g
inkscape:label="#g4505"
id="LDG_Flaps_B3">
<text
transform="scale(0.92957935,1.0757554)"
inkscape:label="#text4314"
id="text5125"
y="833.30151"
x="489.9281"
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1"
y="833.30151"
x="489.9281"
id="tspan5127"
sodipodi:role="line">3</tspan></text>
<text
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:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="465.52426"
y="833.66461"
id="text5129"
inkscape:label="#text4314"
transform="scale(0.92957935,1.0757554)"><tspan
sodipodi:role="line"
id="tspan5131"
x="465.52426"
y="833.66461"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:37.1831665px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1">. . . . . . . . . . . .</tspan></text>
</g>
</g>
<g
inkscape:label="#g4376"
id="ECAM_Right"

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 106 KiB

View file

@ -26,7 +26,7 @@ var _unitconv = M2FT / 3.6;
var _debug = nil;
var _loop = func() {
if (!getprop("sim/model/autopush/available")) {
if (!getprop("/sim/model/autopush/available")) {
_stop();
return;
}
@ -37,9 +37,9 @@ var _loop = func() {
# Rollspeed is only adequate if the wheel is touching the ground.
if (getprop("gear/gear[0]/wow")) {
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 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 dt = time - _time;
var deriv = 0.0;
@ -63,24 +63,24 @@ var _loop = func() {
} else {
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);
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;
y = math.sin(yaw) * pz;
setprop("sim/model/autopush/force-x", x);
setprop("sim/model/autopush/force-y", y);
setprop("/sim/model/autopush/force-x", x);
setprop("/sim/model/autopush/force-y", y);
# 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) {
# 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.
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-y-yasim", -y * 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() {
# Else overwritten by dialog.
settimer(func() {
setprop("sim/model/autopush/target-speed-km_h", 0.0)
setprop("/sim/model/autopush/target-speed-km_h", 0.0)
}, 0.1);
_K_p = getprop("sim/model/autopush/K_p");
_F_p = getprop("sim/model/autopush/F_p");
_K_i = getprop("sim/model/autopush/K_i");
_F_i = getprop("sim/model/autopush/F_i");
_K_d = getprop("sim/model/autopush/K_d");
_F_d = getprop("sim/model/autopush/F_d");
_F = getprop("sim/model/autopush/F");
_T_f = getprop("sim/model/autopush/T_f");
_K_yaw = getprop("sim/model/autopush/yaw-mult") * D2R;
_yasim = (getprop("sim/flight-model") == "yasim");
_debug = getprop("sim/model/autopush/debug") or 0;
_K_p = getprop("/sim/model/autopush/K_p");
_F_p = getprop("/sim/model/autopush/F_p");
_K_i = getprop("/sim/model/autopush/K_i");
_F_i = getprop("/sim/model/autopush/F_i");
_K_d = getprop("/sim/model/autopush/K_d");
_F_d = getprop("/sim/model/autopush/F_d");
_F = getprop("/sim/model/autopush/F");
_T_f = getprop("/sim/model/autopush/T_f");
_K_yaw = getprop("/sim/model/autopush/yaw-mult") * D2R;
_yasim = (getprop("/sim/flight-model") == "yasim");
_debug = getprop("/sim/model/autopush/debug") or 0;
_int = 0.0;
_V = 0.0;
_time = getprop("sim/time/elapsed-sec");
setprop("sim/model/autopush/connected", 1);
_time = getprop("/sim/time/elapsed-sec");
setprop("/sim/model/autopush/connected", 1);
if (!_timer.isRunning) {
if (getprop("sim/model/autopush/chocks")) {
setprop("sim/model/autopush/chocks", 0);
if (getprop("/sim/model/autopush/chocks")) {
setprop("/sim/model/autopush/chocks", 0);
screen.log.write("(pushback): Pushback connected, chocks removed. Please release brakes.");
} else {
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.");
}
_timer.stop();
setprop("sim/model/autopush/force-lbf", 0.0);
setprop("/sim/model/autopush/force-lbf", 0.0);
if (_yasim) {
setprop("sim/model/autopush/force-x-yasim", 0.0);
setprop("sim/model/autopush/force-y-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/connected", 0);
setprop("sim/model/autopush/enabled", 0);
setprop("/sim/model/autopush/connected", 0);
setprop("/sim/model/autopush/enabled", 0);
}
setlistener("/sim/model/autopush/enabled", func(p) {
var enabled = p.getValue();
if ((enabled) and getprop("sim/model/autopush/available")) {
if ((enabled) and getprop("/sim/model/autopush/available")) {
_start();
} else {
_stop();

View file

@ -46,7 +46,7 @@ var _advance_wp = func(flip_sign = 0) {
}
var _loop = func() {
if (!getprop("sim/model/autopush/connected")) {
if (!getprop("/sim/model/autopush/connected")) {
stop();
return;
}
@ -56,7 +56,7 @@ var _loop = func() {
var deltapsi = geo.normdeg180(A - psi_leg);
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 time = getprop("sim/time/elapsed-sec");
var time = getprop("/sim/time/elapsed-sec");
var dt = time - _time;
var minus_psidot = (dt > 0.002) * math.min(math.max(_K_psidot * (_psi - psi) / dt, -_F_psidot), _F_psidot);
_psi = psi;
@ -83,8 +83,8 @@ var _loop = func() {
if (_debug > 1) {
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/steer-cmd-norm", steering);
setprop("/sim/model/autopush/target-speed-km_h", _sign * V);
setprop("/sim/model/autopush/steer-cmd-norm", steering);
}
var _timer = maketimer(0.051, func{_loop()});
@ -100,7 +100,7 @@ var start = func() {
gui.popupTip("Already moving");
return;
}
if (!getprop("sim/model/autopush/connected")) {
if (!getprop("/sim/model/autopush/connected")) {
gui.popupTip("Pushback not connected");
return;
}
@ -112,15 +112,15 @@ var start = func() {
} else {
autopush_route.done();
}
_K_V = getprop("sim/model/autopush/driver/K_V");
_F_V = getprop("sim/model/autopush/driver/F_V");
_R_turn_min = getprop("sim/model/autopush/min-turn-radius-m");
_D_stop = getprop("sim/model/autopush/stopping-distance-m");
_K_psi = getprop("sim/model/autopush/driver/K_psi");
_F_psi = getprop("sim/model/autopush/driver/F_psi");
_K_psidot = getprop("sim/model/autopush/driver/K_psidot");
_F_psidot = getprop("sim/model/autopush/driver/F_psidot");
_debug = getprop("sim/model/autopush/debug") or 0;
_K_V = getprop("/sim/model/autopush/driver/K_V");
_F_V = getprop("/sim/model/autopush/driver/F_V");
_R_turn_min = getprop("/sim/model/autopush/min-turn-radius-m");
_D_stop = getprop("/sim/model/autopush/stopping-distance-m");
_K_psi = getprop("/sim/model/autopush/driver/K_psi");
_F_psi = getprop("/sim/model/autopush/driver/F_psi");
_K_psidot = getprop("/sim/model/autopush/driver/K_psidot");
_F_psidot = getprop("/sim/model/autopush/driver/F_psidot");
_debug = getprop("/sim/model/autopush/debug") or 0;
if (!_to_wp) {
var (psi_park, D_park) = courseAndDistance(_route[0], _route[1]);
_push = (abs(geo.normdeg180(getprop("orientation/heading-deg") - psi_park)) > 90.0);
@ -128,7 +128,7 @@ var start = func() {
_advance_wp();
_psi = 0.0;
}
_time = getprop("sim/time/elapsed-sec");
_time = getprop("/sim/time/elapsed-sec");
_timer.start();
var endsign = _sign;
for (ii = _to_wp; ii < size(_route_reverse); ii += 1) {
@ -146,7 +146,7 @@ var start = func() {
var pause = func() {
_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() {

View file

@ -29,7 +29,7 @@ var _R_turn_min = 0;
var _invalid = 0;
# 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) {
_top_view_heading_offset_deg = 94.5;
}
@ -144,14 +144,14 @@ var top_view = func() {
return;
}
_top_view_index = view.indexof("Chase View Without Yaw");
_reset_view_index = getprop("sim/current-view/view-number");
setprop("sim/current-view/view-number", _top_view_index);
_view_pitch_offset_deg = getprop("sim/current-view/pitch-offset-deg");
_view_heading_offset_deg = getprop("sim/current-view/heading-offset-deg");
_view_z_offset = getprop("sim/current-view/z-offset-m");
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/pitch-offset-deg", 90.0);
_reset_view_index = getprop("/sim/current-view/view-number");
setprop("/sim/current-view/view-number", _top_view_index);
_view_pitch_offset_deg = getprop("/sim/current-view/pitch-offset-deg");
_view_heading_offset_deg = getprop("/sim/current-view/heading-offset-deg");
_view_z_offset = getprop("/sim/current-view/z-offset-m");
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/pitch-offset-deg", 90.0);
_view_listener = setlistener("/sim/current-view/name", func {
_finalize_top_view();
}, 0, 0);
@ -164,11 +164,11 @@ var _finalize_top_view = func() {
removelistener(_view_listener);
_view_listener = nil;
# 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/z-offset-m", _view_z_offset);
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/view-number", _reset_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/heading-offset-deg", _view_heading_offset_deg);
setprop("/sim/current-view/pitch-offset-deg", _view_pitch_offset_deg);
setprop("/sim/current-view/view-number", _reset_view_index);
if (!_show) {
_clear_user_point_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) {
@ -351,7 +351,7 @@ setlistener("/sim/model/autopush/route/show", func(p) {
var enter = func() {
clear();
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 H = geo.elevation(wp.lat(), wp.lon());
if (H != nil) {
@ -362,7 +362,7 @@ var enter = func() {
_add(geo.click_position());
});
# 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)) {
# JSBSim
wingspan = getprop("fdm/jsbsim/metrics/bw-ft");
@ -372,7 +372,7 @@ var enter = func() {
# YAsim
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);
}
}

View file

@ -10,12 +10,12 @@ var DMC = {
new: func(num) {
var d = { parents:[DMC] };
d.activeADIRS = num;
d.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)];
d.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)];
d.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)];
d.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)];
d.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)];
d.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)];
d.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)];
d.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)];
d.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)];
d.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)];
d.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)];
d.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)];
d.outputs = [nil, nil, nil, nil, nil, nil, nil]; # airspeed, altitude, mach, pfd altitude, sat, tat, speed trend
return d;
@ -70,7 +70,7 @@ var DMController = {
me.DMCs = [DMC.new(0), DMC.new(1), DMC.new(2)];
# 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._init = 1;

View file

@ -12,7 +12,7 @@ var leftOverflow = props.globals.initNode("/ECAM/warnings/overflow-left", 0, "B
var rightOverflow = props.globals.initNode("/ECAM/warnings/overflow-right", 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 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")];

File diff suppressed because it is too large Load diff

View file

@ -20,8 +20,6 @@ var apOffTime = 0;
var athrOffTime = 0;
var apWarnNode = 0;
var athrWarnNode = 0;
var leftMsg = 0;
var rightMsg = 0;
var engStrtTimeSw = 0;
var engStrtTime = 0;
var page = 0;
@ -42,7 +40,7 @@ var clrLight = 0;
var ECAM = {
_cachePage: "",
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");
apuLight = props.globals.initNode("/ECAM/Lower/light/apu", 0, "BOOL");
bleedLight = props.globals.initNode("/ECAM/Lower/light/bleed", 0, "BOOL");
@ -61,8 +59,6 @@ var ECAM = {
phase = props.globals.initNode("/ECAM/warning-phase", 0, "INT");
apOffTime = props.globals.initNode("/ECAM/ap-off-time", 0, "INT");
athrOffTime = props.globals.initNode("/ECAM/athr-off-time", 0, "INT");
leftMsg = props.globals.initNode("/ECAM/left-msg", "MSG", "STRING");
rightMsg = props.globals.initNode("/ECAM/right-msg", "MSG", "STRING");
engStrtTimeSw = props.globals.initNode("/ECAM/engine-start-time-switch", 0, "BOOL");
engStrtTime = props.globals.initNode("/ECAM/engine-start-time", 0.0, "DOUBLE");
apWarnNode = props.globals.initNode("/it-autoflight/output/ap-warning", 0, "INT");

View file

@ -115,14 +115,14 @@ var phaseLoop = func() {
}
if (eng == "IAE") {
eprlim = getprop("controls/engines/epr-limit");
eprlim = getprop("/controls/engines/epr-limit");
if ((!pts.Controls.Engines.Engine.reverser[0].getBoolValue() and !pts.Controls.Engines.Engine.reverser[1].getBoolValue()) and (((pts.Controls.Engines.Engine.throttle[0].getValue() >= 0.78 or pts.Controls.Engines.Engine.throttle[1].getValue() >= 0.779) and fadec.Thrust.limFlex.getBoolValue()) or (pts.Controls.Engines.Engine.throttle[0].getValue() >= 0.99 or pts.Controls.Engines.Engine.throttle[1].getValue() >= 0.99))) {
FWC.toPower.setBoolValue(1);
} else {
FWC.toPower.setBoolValue(0);
}
} else {
n1lim = getprop("controls/engines/n1-limit");
n1lim = getprop("/controls/engines/n1-limit");
if ((!pts.Controls.Engines.Engine.reverser[0].getBoolValue() and !pts.Controls.Engines.Engine.reverser[1].getBoolValue()) and (((pts.Controls.Engines.Engine.throttle[0].getValue() >= 0.78 or pts.Controls.Engines.Engine.throttle[1].getValue() >= 0.779) and fadec.Thrust.limFlex.getBoolValue()) or (pts.Controls.Engines.Engine.throttle[0].getValue() >= 0.99 or pts.Controls.Engines.Engine.throttle[1].getValue() >= 0.99))) {
FWC.toPower.setBoolValue(1);
} else {

View file

@ -120,7 +120,7 @@ var PitotIcing = [props.globals.getNode("/systems/pitot[0]/icing"),props.globals
var PitotServicable = [props.globals.getNode("/systems/pitot[0]/serviceable", 1),props.globals.getNode("/systems/pitot[1]/serviceable", 1),props.globals.getNode("/systems/pitot[2]/serviceable"), 1];
var icingInit = func {
iceables = props.globals.getNode("sim/model/icing", 1).getChildren("iceable");
iceables = props.globals.getNode("/sim/model/icing", 1).getChildren("iceable");
forindex(var i; iceables) {
iceables[i] = Iceable.new(iceables[i]);
}

View file

@ -3,7 +3,7 @@
# 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 cur_alt = 0;
@ -67,30 +67,30 @@ var light_manager = {
flcpt: 0,
prev_view : 1,
nd_ref_light1_x: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-x-m", 1),
nd_ref_light1_y: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-y-m", 1),
nd_ref_light1_z: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-z-m", 1),
nd_ref_light1_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir", 1),
nd_ref_light1_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m", 1),
nd_ref_light1_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m", 1),
nd_ref_light1_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m", 1),
nd_ref_light1_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir", 1),
nd_ref_light2_x: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[1]", 1),
nd_ref_light2_y: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[1]", 1),
nd_ref_light2_z: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[1]", 1),
nd_ref_light2_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir[1]", 1),
nd_ref_light2_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[1]", 1),
nd_ref_light2_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[1]", 1),
nd_ref_light2_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[1]", 1),
nd_ref_light2_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[1]", 1),
nd_ref_light3_x: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[2]", 1),
nd_ref_light3_y: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[2]", 1),
nd_ref_light3_z: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[2]", 1),
nd_ref_light3_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir[2]", 1),
nd_ref_light3_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[2]", 1),
nd_ref_light3_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[2]", 1),
nd_ref_light3_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[2]", 1),
nd_ref_light3_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[2]", 1),
nd_ref_light4_x: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[3]", 1),
nd_ref_light4_y: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[3]", 1),
nd_ref_light4_z: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[3]", 1),
nd_ref_light4_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir[3]", 1),
nd_ref_light4_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[3]", 1),
nd_ref_light4_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[3]", 1),
nd_ref_light4_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[3]", 1),
nd_ref_light4_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[3]", 1),
nd_ref_light5_x: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[4]", 1),
nd_ref_light5_y: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[4]", 1),
nd_ref_light5_z: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[4]", 1),
nd_ref_light5_dir: props.globals.getNode("sim/rendering/als-secondary-lights/lightspot/dir[4]", 1),
nd_ref_light5_x: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-x-m[4]", 1),
nd_ref_light5_y: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-y-m[4]", 1),
nd_ref_light5_z: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/eyerel-z-m[4]", 1),
nd_ref_light5_dir: props.globals.getNode("/sim/rendering/als-secondary-lights/lightspot/dir[4]", 1),
init: func {
# define your lights here
@ -146,22 +146,22 @@ var light_manager = {
me.light5_size = 6;
setprop("sim/rendering/als-secondary-lights/flash-radius", 13);
setprop("/sim/rendering/als-secondary-lights/flash-radius", 13);
me.start();
},
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[1]", me.light2_size);
setprop("sim/rendering/als-secondary-lights/lightspot/size[2]", me.light3_size);
setprop("sim/rendering/als-secondary-lights/lightspot/size[3]", me.light4_size);
setprop("sim/rendering/als-secondary-lights/lightspot/size[4]", me.light5_size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size", me.light1_size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[1]", me.light2_size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[2]", me.light3_size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[3]", me.light4_size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[4]", me.light5_size);
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", me.light1_stretch);
setprop("/sim/rendering/als-secondary-lights/lightspot/stretch[1]", me.light2_stretch);
me.run = 1;
me.update();
@ -178,10 +178,10 @@ var light_manager = {
cur_alt = alt_agl.getValue();
if (als_on.getValue() == 1 and alt_agl.getValue() < 100.0) {
ll1 = getprop("controls/lighting/landing-lights[1]");
ll2 = getprop("controls/lighting/landing-lights[2]");
ll3 = getprop("sim/model/lights/nose-lights");
nav = getprop("sim/model/lights/nav-lights");
ll1 = getprop("/controls/lighting/landing-lights[1]");
ll2 = getprop("/controls/lighting/landing-lights[2]");
ll3 = getprop("/sim/model/lights/nose-lights");
nav = getprop("/sim/model/lights/nav-lights");
var apos = geo.aircraft_position();
var vpos = geo.viewer_position();
@ -320,89 +320,89 @@ var light_manager = {
light1_on : func {
if (me.light1_is_on == 1) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r", me.light1_r);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g", me.light1_g);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b", me.light1_b);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r", me.light1_r);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g", me.light1_g);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b", me.light1_b);
me.light1_is_on = 1;
},
light1_off : func {
if (me.light1_is_on == 0) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b", 0.0);
me.light1_is_on = 0;
},
light1_setSize : func(size) {
setprop("sim/rendering/als-secondary-lights/lightspot/size[0]", size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[0]", size);
},
light2_on : func {
if (me.light2_is_on == 1) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[1]", me.light2_r);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[1]", me.light2_g);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", me.light2_b);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[1]", me.light2_r);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[1]", me.light2_g);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", me.light2_b);
me.light2_is_on = 1;
},
light2_off : func {
if (me.light2_is_on == 0) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[1]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[1]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[1]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[1]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[1]", 0.0);
me.light2_is_on = 0;
},
light2_setSize : func(size) {
setprop("sim/rendering/als-secondary-lights/lightspot/size[1]", size);
setprop("/sim/rendering/als-secondary-lights/lightspot/size[1]", size);
},
light3_on : func {
if (me.light3_is_on == 1) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[2]", me.light3_r);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[2]", me.light3_g);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", me.light3_b);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[2]", me.light3_r);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[2]", me.light3_g);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", me.light3_b);
me.light3_is_on = 1;
},
light3_off : func {
if (me.light3_is_on == 0) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[2]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[2]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[2]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[2]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[2]", 0.0);
me.light3_is_on = 0;
},
light4_on : func {
if (me.light4_is_on == 1) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[3]", me.light4_r);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[3]", me.light4_g);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", me.light4_b);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[3]", me.light4_r);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[3]", me.light4_g);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", me.light4_b);
me.light4_is_on = 1;
},
light4_off : func {
if (me.light4_is_on == 0) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[3]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[3]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[3]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[3]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[3]", 0.0);
me.light4_is_on = 0;
},
light5_on : func {
if (me.light5_is_on == 1) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[4]", me.light5_r);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[4]", me.light5_g);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", me.light5_b);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[4]", me.light5_r);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[4]", me.light5_g);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", me.light5_b);
me.light5_is_on = 1;
},
light5_off : func {
if (me.light5_is_on == 0) {return;}
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-r[4]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-g[4]", 0.0);
setprop("sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-r[4]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-g[4]", 0.0);
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", 0.0);
me.light5_is_on = 0;
},
};

View file

@ -38,26 +38,26 @@ var thunder_listener = func {
var lightning_distance_norm = std.min(1.0, 1 / math.pow(lightning_distance / 5000.0, 2));
settimer(func {
var thunder1 = getprop("sim/sound/thunder1");
var thunder2 = getprop("sim/sound/thunder2");
var thunder3 = getprop("sim/sound/thunder3");
var thunder4 = getprop("sim/sound/thunder4");
var vol = getprop("sim/current-view/internal");
var thunder1 = getprop("/sim/sound/thunder1");
var thunder2 = getprop("/sim/sound/thunder2");
var thunder3 = getprop("/sim/sound/thunder3");
var thunder4 = getprop("/sim/sound/thunder4");
var vol = getprop("/sim/current-view/internal");
if (!thunder1) {
thunderCalls = 1;
setprop("sim/sound/dist-thunder1", lightning_distance_norm * vol * 1.75);
setprop("/sim/sound/dist-thunder1", lightning_distance_norm * vol * 1.75);
}
else if (!thunder2) {
thunderCalls = 2;
setprop("sim/sound/dist-thunder2", lightning_distance_norm * vol * 1.75);
setprop("/sim/sound/dist-thunder2", lightning_distance_norm * vol * 1.75);
}
else if (!thunder3) {
thunderCalls = 3;
setprop("sim/sound/dist-thunder3", lightning_distance_norm * vol * 1.75);
setprop("/sim/sound/dist-thunder3", lightning_distance_norm * vol * 1.75);
}
else if (!thunder4) {
thunderCalls = 4;
setprop("sim/sound/dist-thunder4", lightning_distance_norm * vol * 1.75);
setprop("/sim/sound/dist-thunder4", lightning_distance_norm * vol * 1.75);
}
else
return;

View file

@ -523,7 +523,7 @@ var athrOff = func(type) {
var hdgInput = func {
if (latMode.getValue() != 0) {
showHDG.setBoolValue(1);
var hdgnow = getprop("/it-autoflight/input/hdg");
setprop("/modes/fcu/hdg-time", pts.Sim.Time.elapsedSec.getValue());
var hdgnow = fmgc.Input.hdg.getValue();
fmgc.Custom.hdgTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
}

View file

@ -1027,12 +1027,12 @@ setlistener("/sim/signals/fdm-initialized", func {
# For Canvas Nav Display.
setlistener("/it-autoflight/input/hdg", func {
setprop("autopilot/settings/heading-bug-deg", getprop("it-autoflight/input/hdg"));
});
setprop("/autopilot/settings/heading-bug-deg", Input.hdg.getValue());
}, 0, 0);
setlistener("/it-autoflight/internal/alt", func {
setprop("autopilot/settings/target-altitude-ft", getprop("it-autoflight/internal/alt"));
});
setprop("/autopilot/settings/target-altitude-ft", Internal.alt.getValue());
}, 0, 0);
var loopTimer = maketimer(0.1, ITAF, ITAF.loop);
var slowLoopTimer = maketimer(1, ITAF, ITAF.slowLoop);

View file

@ -3,91 +3,166 @@
# Copyright (c) 2020 Josh Davidson (Octal450)
setprop("/it-autoflight/internal/alt", 10000);
setprop("/modes/pfd/fma/throttle-mode", " ");
setprop("/modes/pfd/fma/pitch-mode", " ");
setprop("/modes/pfd/fma/pitch-mode-armed", " ");
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
setprop("/modes/pfd/fma/roll-mode", " ");
setprop("/modes/pfd/fma/roll-mode-armed", " ");
setprop("/modes/pfd/fma/ap-mode", " ");
setprop("/modes/pfd/fma/fd-mode", " ");
setprop("/modes/pfd/fma/at-mode", " ");
setprop("/modes/pfd/fma/athr-armed", 0);
setprop("/modes/pfd/fma/throttle-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-mode2-armed-box", 0);
setprop("/modes/pfd/fma/roll-mode-box", 0);
setprop("/modes/pfd/fma/roll-mode-armed-box", 0);
setprop("/modes/pfd/fma/ap-mode-box", 0);
setprop("/modes/pfd/fma/fd-mode-box", 0);
setprop("/modes/pfd/fma/athr-mode-box", 0);
setprop("/modes/pfd/fma/throttle-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-mode2-armed-time", 0);
setprop("/modes/pfd/fma/roll-mode-time", 0);
setprop("/modes/pfd/fma/roll-mode-armed-time", 0);
setprop("/modes/pfd/fma/ap-mode-time", 0);
setprop("/modes/pfd/fma/fd-mode-time", 0);
setprop("/modes/pfd/fma/athr-mode-time", 0);
setprop("/modes/fcu/hdg-time", -45);
var at = nil;
var athr = nil;
var ap1 = nil;
var ap2 = nil;
var elapsedtime = nil;
var engout = nil;
var engstate1 = nil;
var engstate2 = nil;
var fd1 = nil;
var fd2 = nil;
var flx = nil;
var gear1 = nil;
var gear2 = nil;
var gs_defl = nil;
var latText = nil;
var MCPalt = nil;
var nav_defl = nil;
var newfd = nil;
var newarm = nil;
var newap = nil;
var newlat = nil;
var newvert = nil;
var newvert2arm = nil;
var newvertarm = nil;
var newthr = nil;
var state1 = nil;
var state2 = nil;
var thr = nil;
var thr1 = nil;
var thr2 = nil;
var trk = nil;
var vert = nil;
var vertText = nil;
setlistener("sim/signals/fdm-initialized", func {
var Modes = {
FCU: {
hdgTime: props.globals.initNode("/modes/fcu/hdg-time", -45, "DOUBLE")
},
PFD: {
FMA: {
athr: props.globals.initNode("/modes/pfd/fma/athr-armed", 0, "BOOL"),
athrBox: props.globals.initNode("/modes/pfd/fma/athr-armed-box", 0, "BOOL"),
athrMode: props.globals.initNode("/modes/pfd/fma/at-mode", " ", "STRING"),
athrModeBox: props.globals.initNode("/modes/pfd/fma/athr-mode-box", 0, "BOOL"),
apMode: props.globals.initNode("/modes/pfd/fma/ap-mode", " ", "STRING"),
apModeBox: props.globals.initNode("/modes/pfd/fma/ap-mode-box", 0, "BOOL"),
apModeTime: props.globals.initNode("/modes/pfd/fma/ap-mode-time", 0, "DOUBLE"),
athrModeTime: props.globals.initNode("/modes/pfd/fma/athr-mode-time", 0, "DOUBLE"),
fdMode: props.globals.initNode("/modes/pfd/fma/fd-mode", " ", "STRING"),
fdModeBox: props.globals.initNode("/modes/pfd/fma/fd-mode-box", 0, "BOOL"),
fdModeTime: props.globals.initNode("/modes/pfd/fma/fd-mode-time", 0, "DOUBLE"),
rollMode: props.globals.initNode("/modes/pfd/fma/roll-mode", " ", "STRING"),
rollModeBox: props.globals.initNode("/modes/pfd/fma/roll-mode-box", 0, "BOOL"),
rollModeArmed: props.globals.initNode("/modes/pfd/fma/roll-mode-armed", " ", "STRING"),
rollModeArmedBox: props.globals.initNode("/modes/pfd/fma/roll-mode-armed-box", 0, "BOOL"),
rollModeTime: props.globals.initNode("/modes/pfd/fma/roll-mode-time", 0, "DOUBLE"),
rollModeArmedTime: props.globals.initNode("/modes/pfd/fma/roll-mode-armed-time", 0, "DOUBLE"),
pitchMode: props.globals.initNode("/modes/pfd/fma/pitch-mode", " ", "STRING"),
pitchModeBox: props.globals.initNode("/modes/pfd/fma/pitch-mode-box", 0, "BOOL"),
pitchModeArmed: props.globals.initNode("/modes/pfd/fma/pitch-mode-armed", " ", "STRING"),
pitchModeArmedBox: props.globals.initNode("/modes/pfd/fma/pitch-mode-armed-box", 0, "BOOL"),
pitchMode2Armed: props.globals.initNode("/modes/pfd/fma/pitch-mode2-armed", " ", "STRING"),
pitchModeTime: props.globals.initNode("/modes/pfd/fma/pitch-mode-time", 0, "DOUBLE"),
pitchModeArmedTime: props.globals.initNode("/modes/pfd/fma/pitch-mode-armed-time", 0, "DOUBLE"),
pitchMode2ArmedTime: props.globals.initNode("/modes/pfd/fma/pitch-mode2-armed-time", 0, "DOUBLE"),
pitchMode2ArmedBox: props.globals.initNode("/modes/pfd/fma/pitch-mode2-armed-box", 0, "BOOL"),
throttle: props.globals.initNode("/modes/pfd/fma/throttle-mode", " ", "STRING"),
throttleModeBox: props.globals.initNode("/modes/pfd/fma/throttle-mode-box", 0, "BOOL"),
throttleModeTime: props.globals.initNode("/modes/pfd/fma/throttle-mode-time", 0, "DOUBLE"),
},
},
};
var init = func() {
Internal.alt.setValue(10000);
Modes.PFD.FMA.throttle.setValue(" ");
Modes.PFD.FMA.pitchMode.setValue(" ");
Modes.PFD.FMA.pitchModeArmed.setValue(" ");
Modes.PFD.FMA.pitchMode2Armed.setValue(" ");
Modes.PFD.FMA.rollMode.setValue(" ");
Modes.PFD.FMA.rollModeArmed.setValue(" ");
Modes.PFD.FMA.apMode.setValue(" ");
Modes.PFD.FMA.fdMode.setValue(" ");
Modes.PFD.FMA.athrMode.setValue(" ");
Modes.PFD.FMA.athr.setValue(0);
Modes.PFD.FMA.throttleModeBox.setValue(0);
Modes.PFD.FMA.pitchModeBox.setValue(0);
Modes.PFD.FMA.pitchModeArmedBox.setValue(0);
Modes.PFD.FMA.pitchMode2ArmedBox.setValue(0);
Modes.PFD.FMA.rollModeBox.setValue(0);
Modes.PFD.FMA.rollModeArmedBox.setValue(0);
Modes.PFD.FMA.apModeBox.setValue(0);
Modes.PFD.FMA.fdModeBox.setValue(0);
Modes.PFD.FMA.athrModeBox.setValue(0);
Modes.PFD.FMA.throttleModeTime.setValue(0);
Modes.PFD.FMA.pitchModeTime.setValue(0);
Modes.PFD.FMA.pitchModeArmedTime.setValue(0);
Modes.PFD.FMA.pitchMode2ArmedTime.setValue(0);
Modes.PFD.FMA.rollModeTime.setValue(0);
Modes.PFD.FMA.rollModeArmedTime.setValue(0);
Modes.PFD.FMA.apModeTime.setValue(0);
Modes.PFD.FMA.fdModeTime.setValue(0);
Modes.PFD.FMA.athrModeTime.setValue(0);
loopFMA.start();
});
};
# Master Thrust
var loopFMA = maketimer(0.05, func {
var state1 = getprop("systems/thrust/state1");
var state2 = getprop("systems/thrust/state2");
var newthr = getprop("/modes/pfd/fma/throttle-mode");
var thr1 = getprop("controls/engines/engine[0]/throttle-pos");
var thr2 = getprop("controls/engines/engine[1]/throttle-pos");
state1 = pts.Systems.Thrust.state[0].getValue();
state2 = pts.Systems.Thrust.state[1].getValue();
thr1 = pts.Controls.Engines.Engine.throttlePos[0].getValue();
thr2 = pts.Controls.Engines.Engine.throttlePos[1].getValue();
newthr = Modes.PFD.FMA.throttle.getValue();
engout = pts.Systems.Thrust.engOut.getValue();
if (state1 == "TOGA" or state2 == "TOGA") {
if (newthr != " ") {
setprop("/modes/pfd/fma/throttle-mode", " ");
Modes.PFD.FMA.throttle.setValue(" ");
}
} else if ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)) {
if (newthr != " ") {
setprop("/modes/pfd/fma/throttle-mode", " ");
Modes.PFD.FMA.throttle.setValue(" ");
}
} else if ((state1 == "MCT" or state2 == "MCT") and getprop("systems/thrust/eng-out") != 1) {
} else if ((state1 == "MCT" or state2 == "MCT") and !engout) {
if (newthr != " ") {
setprop("/modes/pfd/fma/throttle-mode", " ");
Modes.PFD.FMA.throttle.setValue(" ");
}
} 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 !engout) {
if (newthr != " ") {
setprop("/modes/pfd/fma/throttle-mode", " ");
Modes.PFD.FMA.throttle.setValue(" ");
}
} 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/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();
} else {
var thr = getprop("/it-autoflight/output/thr-mode");
vert = Output.vert.getValue();
if (vert == 4 or vert >= 6 or vert <= 8) {
if (Output.ap1.getBoolValue() or Output.ap2.getBoolValue() or Output.fd1.getBoolValue() or Output.fd2.getBoolValue()) {
thr = Output.thrMode.getValue();
if (thr == 0) {
loopFMA_b();
} else if (thr == 1) {
if (newthr != "THR IDLE") {
setprop("/modes/pfd/fma/throttle-mode", "THR IDLE");
Modes.PFD.FMA.throttle.setValue("THR IDLE");
}
} else if (thr == 2) {
if (state1 == "MCT" or state2 == "MCT" and getprop("systems/thrust/eng-out") == 1) {
if (state1 == "MCT" or state2 == "MCT" and engout) {
if (newthr != "THR MCT") {
setprop("/modes/pfd/fma/throttle-mode", "THR MCT");
Modes.PFD.FMA.throttle.setValue("THR MCT");
}
} else if (state1 == "CL" or state2 == "CL") {
if (newthr != "THR CLB") {
setprop("/modes/pfd/fma/throttle-mode", "THR CLB");
Modes.PFD.FMA.throttle.setValue("THR CLB");
}
} else {
if (newthr != "THR LVR") {
setprop("/modes/pfd/fma/throttle-mode", "THR LVR");
Modes.PFD.FMA.throttle.setValue("THR LVR");
}
}
}
} else {
loopFMA_b();
}
} else {
loopFMA_b();
@ -95,164 +170,161 @@ var loopFMA = maketimer(0.05, func {
}
# 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("/modes/pfd/fma/athr-armed") != 1) {
setprop("/modes/pfd/fma/athr-armed", 1);
athr = Output.athr.getValue();
if (athr and (state1 == "MAN THR" or state2 == "MAN THR" or state1 == "MCT" or state2 == "MCT" or state1 == "TOGA" or state2 == "TOGA") and engout != 1) {
if (!Modes.PFD.FMA.athr.getValue()) {
Modes.PFD.FMA.athr.setValue(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
(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) {
setprop("/modes/pfd/fma/athr-armed", 1);
} else if (athr and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83) or (fadec.Thrust.thrustLimit.getValue() == "FLX" and (state1 == "MCT" or state2 == "MCT"))
or state1 == "TOGA" or state2 == "TOGA") and engout) {
if (!Modes.PFD.FMA.athr.getValue()) {
Modes.PFD.FMA.athr.setValue(1);
}
} else {
if (getprop("/modes/pfd/fma/athr-armed") != 0) {
setprop("/modes/pfd/fma/athr-armed", 0);
if (Modes.PFD.FMA.athr.getValue()) {
Modes.PFD.FMA.athr.setValue(0);
}
}
# SRS RWY Engagement
var flx = getprop("systems/thrust/lim-flex");
var lat = getprop("/it-autoflight/mode/lat");
var newlat = getprop("/modes/pfd/fma/roll-mode");
var vert = getprop("/it-autoflight/mode/vert");
var newvert = getprop("/modes/pfd/fma/pitch-mode");
var newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
var thr1 = getprop("controls/engines/engine[0]/throttle-pos");
var thr2 = getprop("controls/engines/engine[1]/throttle-pos");
var wow = getprop("gear/gear[0]/wow");
var engstate1 = getprop("engines/engine[0]/state");
var engstate2 = getprop("engines/engine[1]/state");
flx = fadec.Thrust.limFlex.getValue();
newlat = Modes.PFD.FMA.rollMode.getValue();
engstate1 = pts.Engines.Engine.state[0].getValue();
engstate2 = pts.Engines.Engine.state[1].getValue();
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.
if (wow and FMGCInternal.v2set and getprop("/it-autoflight/output/vert") != 7) {
gear1 = pts.Gear.wow[0].getValue();
if (gear1 and FMGCInternal.v2set and Output.vert.getValue() != 7) {
ITAF.setVertMode(7);
setprop("/it-autoflight/mode/vert", "T/O CLB");
Text.vert.setValue("T/O CLB");
}
} else {
var gear1 = getprop("gear/gear[1]/wow");
var gear2 = getprop("gear/gear[2]/wow");
if (getprop("/it-autoflight/input/lat") == 5 and (gear1 or gear2)) {
gear1 = pts.Gear.wow[0].getValue();
gear2 = pts.Gear.wow[2].getValue();
if (Input.lat.getValue() == 5 and (gear1 or gear2)) {
ITAF.setLatMode(9);
}
if (getprop("/it-autoflight/output/vert") == 7 and (gear1 or gear2)) {
if (Input.vert.getValue() == 7 and (gear1 or gear2)) {
ITAF.setVertMode(9);
}
}
var trk = getprop("/it-autoflight/custom/trk-fpa");
if (lat == "HDG" and trk == 0) {
trk = Custom.trkFpa.getValue();
latText = Text.lat.getValue();
if (latText == "HDG" and trk == 0) {
if (newlat != "HDG") {
setprop("/modes/pfd/fma/roll-mode", "HDG");
Modes.PFD.FMA.rollMode.setValue("HDG");
}
} else if (lat == "HDG" and trk == 1) {
} else if (latText == "HDG" and trk == 1) {
if (newlat != "TRACK") {
setprop("/modes/pfd/fma/roll-mode", "TRACK");
Modes.PFD.FMA.rollMode.setValue("TRACK");
}
}
# Boxes
var elapsedtime = getprop("sim/time/elapsed-sec");
if (getprop("/modes/pfd/fma/ap-mode-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/ap-mode-box", 1);
elapsedtime = pts.Sim.Time.elapsedSec.getValue();
if (Modes.PFD.FMA.apModeTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.apModeBox.setValue(1);
} else {
setprop("/modes/pfd/fma/ap-mode-box", 0);
Modes.PFD.FMA.apModeBox.setValue(0);
}
if (getprop("/modes/pfd/fma/fd-mode-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/fd-mode-box", 1);
if (Modes.PFD.FMA.fdModeTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.fdModeBox.setValue(1);
} else {
setprop("/modes/pfd/fma/fd-mode-box", 0);
Modes.PFD.FMA.fdModeBox.setValue(0);
}
if (getprop("/modes/pfd/fma/athr-mode-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/athr-mode-box", 1);
if (Modes.PFD.FMA.athrModeTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.athrModeBox.setValue(1);
} else {
setprop("/modes/pfd/fma/athr-mode-box", 0);
Modes.PFD.FMA.athrModeBox.setValue(0);
}
if (getprop("/modes/pfd/fma/throttle-mode-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/throttle-mode-box", 1);
if (Modes.PFD.FMA.throttleModeTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.throttleModeBox.setValue(1);
} else {
setprop("/modes/pfd/fma/throttle-mode-box", 0);
Modes.PFD.FMA.throttleModeBox.setValue(0);
}
if (getprop("/modes/pfd/fma/roll-mode-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/roll-mode-box", 1);
if (Modes.PFD.FMA.rollModeTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.rollModeBox.setValue(1);
} else {
setprop("/modes/pfd/fma/roll-mode-box", 0);
Modes.PFD.FMA.rollModeBox.setValue(0);
}
if (getprop("/modes/pfd/fma/pitch-mode-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/pitch-mode-box", 1);
if (Modes.PFD.FMA.pitchModeTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.pitchModeBox.setValue(1);
} else {
setprop("/modes/pfd/fma/pitch-mode-box", 0);
Modes.PFD.FMA.pitchModeBox.setValue(0);
}
if (getprop("/modes/pfd/fma/roll-mode-armed-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/roll-mode-armed-box", 1);
if (Modes.PFD.FMA.rollModeArmedTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.rollModeArmedBox.setValue(1);
} else {
setprop("/modes/pfd/fma/roll-mode-armed-box", 0);
Modes.PFD.FMA.rollModeArmedBox.setValue(0);
}
if (getprop("/modes/pfd/fma/pitch-mode-armed-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/pitch-mode-armed-box", 1);
if (Modes.PFD.FMA.pitchModeArmedTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.pitchModeArmedBox.setValue(1);
} else {
setprop("/modes/pfd/fma/pitch-mode-armed-box", 0);
Modes.PFD.FMA.pitchModeArmedBox.setValue(0);
}
if (getprop("/modes/pfd/fma/pitch-mode2-armed-time") + 10 >= elapsedtime) {
setprop("/modes/pfd/fma/pitch-mode2-armed-box", 1);
if (Modes.PFD.FMA.pitchMode2ArmedTime.getValue() + 10 >= elapsedtime) {
Modes.PFD.FMA.pitchMode2ArmedBox.setValue(1);
} else {
setprop("/modes/pfd/fma/pitch-mode2-armed-box", 0);
Modes.PFD.FMA.pitchMode2ArmedBox.setValue(0);
}
});
var loopFMA_b = func {
var newthr = getprop("/modes/pfd/fma/throttle-mode");
if (getprop("/it-autoflight/input/kts-mach") == 0) {
newthr = Modes.PFD.FMA.throttle.getValue();
if (!Input.ktsMach.getValue()) {
if (newthr != "SPEED") {
setprop("/modes/pfd/fma/throttle-mode", "SPEED");
Modes.PFD.FMA.throttle.setValue("SPEED");
}
} else if (getprop("/it-autoflight/input/kts-mach") == 1) {
} else {
if (newthr != "MACH") {
setprop("/modes/pfd/fma/throttle-mode", "MACH");
Modes.PFD.FMA.throttle.setValue("MACH");
}
}
}
# Master Lateral
setlistener("/it-autoflight/mode/lat", func {
var lat = getprop("/it-autoflight/mode/lat");
var newlat = getprop("/modes/pfd/fma/roll-mode");
if (lat == "LNAV") {
latText = Text.lat.getValue();
newlat = Modes.PFD.FMA.rollMode.getValue();
if (latText == "LNAV") {
if (newlat != "NAV") {
setprop("/modes/pfd/fma/roll-mode", "NAV");
Modes.PFD.FMA.rollMode.setValue("NAV");
}
} else if (lat == "LOC") {
} else if (latText == "LOC") {
if (newlat != "LOC*" and newlat != "LOC") {
setprop("/modes/pfd/fma/roll-mode", "LOC*");
Modes.PFD.FMA.rollMode.setValue("LOC*");
locupdate.start();
}
} else if (lat == "ALGN") {
} else if (latText == "ALGN") {
if (newlat != " ") {
setprop("/modes/pfd/fma/roll-mode", " ");
Modes.PFD.FMA.rollMode.setValue(" ");
}
} else if (lat == "RLOU") {
} else if (latText == "RLOU") {
if (newlat != " ") {
setprop("/modes/pfd/fma/roll-mode", " ");
Modes.PFD.FMA.rollMode.setValue(" ");
}
} else if (lat == "T/O") {
} else if (latText == "T/O") {
if (newlat != "RWY") {
setprop("/modes/pfd/fma/roll-mode", "RWY");
Modes.PFD.FMA.rollMode.setValue("RWY");
}
} else if (lat == " ") {
} else if (latText == " ") {
if (newlat != " ") {
setprop("/modes/pfd/fma/roll-mode", " ");
Modes.PFD.FMA.rollMode.setValue(" ");
}
}
});
var locupdate = maketimer(0.5, func {
var lat = getprop("/it-autoflight/mode/lat");
var newlat = getprop("/modes/pfd/fma/roll-mode");
var nav_defl = getprop("/instrumentation/nav[0]/heading-needle-deflection-norm");
if (lat == "LOC") {
latText = Text.lat.getValue();
newlat = Modes.PFD.FMA.rollMode.getValue();
nav_defl = pts.Instrumentation.Nav.locDeflection.getValue();
if (latText == "LOC") {
if (nav_defl > -0.06 and nav_defl < 0.06) {
locupdate.stop();
if (newlat != "LOC") {
setprop("/modes/pfd/fma/roll-mode", "LOC");
Modes.PFD.FMA.rollMode.setValue("LOC");
}
}
}
@ -260,82 +332,82 @@ var locupdate = maketimer(0.5, func {
# Master Vertical
setlistener("/it-autoflight/mode/vert", func {
var vert = getprop("/it-autoflight/mode/vert");
var newvert = getprop("/modes/pfd/fma/pitch-mode");
var newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
if (vert == "ALT HLD") {
vertText = Text.vert.getValue();
newvert = Modes.PFD.FMA.pitchMode.getValue();
newvertarm = Modes.PFD.FMA.pitchMode2Armed.getValue();
if (vertText == "ALT HLD") {
altvert();
if (newvertarm != " ") {
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
Modes.PFD.FMA.pitchMode2Armed.setValue(" ");
}
} else if (vert == "ALT CAP") {
} else if (vertText == "ALT CAP") {
altvert();
if (newvertarm != " ") {
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
Modes.PFD.FMA.pitchMode2Armed.setValue(" ");
}
} else if (vert == "V/S") {
} else if (vertText == "V/S") {
if (newvert != "V/S") {
setprop("/modes/pfd/fma/pitch-mode", "V/S");
Modes.PFD.FMA.pitchMode.setValue("V/S");
}
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
Modes.PFD.FMA.pitchMode2Armed.setValue("ALT");
}
} else if (vert == "G/S") {
} else if (vertText == "G/S") {
if (newvert != "G/S*" and newvert != "G/S") {
setprop("/modes/pfd/fma/pitch-mode", "G/S*");
Modes.PFD.FMA.pitchMode.setValue("G/S*");
gsupdate.start();
}
if (newvertarm != " ") {
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
Modes.PFD.FMA.pitchMode2Armed.setValue(" ");
}
} else if (vert == "SPD CLB") {
} else if (vertText == "SPD CLB") {
if (newvert != "OP CLB") {
setprop("/modes/pfd/fma/pitch-mode", "OP CLB");
Modes.PFD.FMA.pitchMode.setValue("OP CLB");
}
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
Modes.PFD.FMA.pitchMode2Armed.setValue("ALT");
}
} else if (vert == "SPD DES") {
} else if (vertText == "SPD DES") {
if (newvert != "OP DES") {
setprop("/modes/pfd/fma/pitch-mode", "OP DES");
Modes.PFD.FMA.pitchMode.setValue("OP DES");
}
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
Modes.PFD.FMA.pitchMode2Armed.setValue("ALT");
}
} else if (vert == "FPA") {
} else if (vertText == "FPA") {
if (newvert != "FPA") {
setprop("/modes/pfd/fma/pitch-mode", "FPA");
Modes.PFD.FMA.pitchMode.setValue("FPA");
}
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
Modes.PFD.FMA.pitchMode2Armed.setValue("ALT");
}
} else if (vert == "LAND") {
} else if (vertText == "LAND") {
if (newvert != "LAND") {
setprop("/modes/pfd/fma/pitch-mode", "LAND");
Modes.PFD.FMA.pitchMode.setValue("LAND");
}
} else if (vert == "FLARE") {
} else if (vertText == "FLARE") {
if (newvert != "FLARE") {
setprop("/modes/pfd/fma/pitch-mode", "FLARE");
Modes.PFD.FMA.pitchMode.setValue("FLARE");
}
} else if (vert == "ROLLOUT") {
} else if (vertText == "ROLLOUT") {
if (newvert != "ROLL OUT") {
setprop("/modes/pfd/fma/pitch-mode", "ROLL OUT");
Modes.PFD.FMA.pitchMode.setValue("ROLL OUT");
}
} else if (vert == "T/O CLB") {
} else if (vertText == "T/O CLB") {
if (newvert != "SRS") {
setprop("/modes/pfd/fma/pitch-mode", "SRS");
Modes.PFD.FMA.pitchMode.setValue("SRS");
}
updatePitchArm2();
} else if (vert == "G/A CLB") {
} else if (vertText == "G/A CLB") {
if (newvert != "SRS") {
setprop("/modes/pfd/fma/pitch-mode", "SRS");
Modes.PFD.FMA.pitchMode.setValue("SRS");
}
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
Modes.PFD.FMA.pitchMode2Armed.setValue("ALT");
}
} else if (vert == " ") {
} else if (vertText == " ") {
if (newvert != " ") {
setprop("/modes/pfd/fma/pitch-mode", " ");
Modes.PFD.FMA.pitchMode.setValue(" ");
}
updatePitchArm2();
}
@ -343,51 +415,51 @@ setlistener("/it-autoflight/mode/vert", func {
});
var updatePitchArm2 = func {
var newvertarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
newvertarm = Modes.PFD.FMA.pitchMode2Armed.getValue();
if (newvertarm != "CLB" and FMGCInternal.v2set) {
setprop("/modes/pfd/fma/pitch-mode2-armed", "CLB");
} else if (newvertarm != " " and FMGCInternal.v2set != 1) {
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
Modes.PFD.FMA.pitchMode2Armed.setValue("CLB");
} else if (newvertarm != " " and !FMGCInternal.v2set) {
Modes.PFD.FMA.pitchMode2Armed.setValue(" ");
}
}
var gsupdate = maketimer(0.5, func {
var vert = getprop("/it-autoflight/mode/vert");
var newvert = getprop("/modes/pfd/fma/pitch-mode");
var gs_defl = getprop("/instrumentation/nav[0]/gs-needle-deflection-norm");
if (vert == "G/S") {
vertText = Text.vert.getValue();
newvert = Modes.PFD.FMA.pitchMode.getValue();
gs_defl = pts.Instrumentation.Nav.gsDeflection.getValue();
if (vertText == "G/S") {
if (gs_defl > -0.06 and gs_defl < 0.06) {
gsupdate.stop();
if (newvert != "G/S") {
setprop("/modes/pfd/fma/pitch-mode", "G/S");
Modes.PFD.FMA.pitchMode.setValue("G/S");
}
}
}
});
var altvert = func {
var MCPalt = getprop("/it-autoflight/internal/alt");
var ALTdif = abs(fmgc.FMGCInternal.crzFt - MCPalt);
var vert = getprop("/it-autoflight/mode/vert");
var newvert = getprop("/modes/pfd/fma/pitch-mode");
if (ALTdif <= 20) {
if (vert == "ALT HLD") {
MCPalt = Internal.alt.getValue();
vertText = Text.vert.getValue();
newvert = Modes.PFD.FMA.pitchMode.getValue();
if (abs(fmgc.FMGCInternal.crzFt - MCPalt) <= 20) {
if (vertText == "ALT HLD") {
if (newvert != "ALT CRZ") {
setprop("/modes/pfd/fma/pitch-mode", "ALT CRZ");
Modes.PFD.FMA.pitchMode.setValue("ALT CRZ");
}
} else if (vert == "ALT CAP") {
} else if (vertText == "ALT CAP") {
if (newvert != "ALT CRZ*") {
setprop("/modes/pfd/fma/pitch-mode", "ALT CRZ*");
Modes.PFD.FMA.pitchMode.setValue("ALT CRZ*");
}
}
} else {
if (vert == "ALT HLD") {
if (vertText == "ALT HLD") {
if (newvert != "ALT") {
setprop("/modes/pfd/fma/pitch-mode", "ALT");
Modes.PFD.FMA.pitchMode.setValue("ALT");
}
} else if (vert == "ALT CAP") {
} else if (vertText == "ALT CAP") {
if (newvert != "ALT*") {
setprop("/modes/pfd/fma/pitch-mode", "ALT*");
Modes.PFD.FMA.pitchMode.setValue("ALT*");
}
}
}
@ -395,123 +467,115 @@ var altvert = func {
# Arm HDG or NAV
setlistener("/it-autoflight/mode/arm", func {
var arm = getprop("/it-autoflight/mode/arm");
var newarm = getprop("/modes/pfd/fma/roll-mode-armed");
arm = Text.arm.getValue();
newarm = Modes.PFD.FMA.rollModeArmed.getValue();
if (arm == "HDG") {
if (newarm != "HDG") {
setprop("/modes/pfd/fma/roll-mode-armed", " ");
Modes.PFD.FMA.rollModeArmed.setValue(" ");
}
} else if (arm == "LNV") {
if (newarm != "NAV") {
setprop("/modes/pfd/fma/roll-mode-armed", "NAV");
Modes.PFD.FMA.rollModeArmed.setValue("NAV");
}
} else if (arm == " ") {
if (newarm != " ") {
setprop("/modes/pfd/fma/roll-mode-armed", " ");
Modes.PFD.FMA.rollModeArmed.setValue(" ");
}
}
});
# Arm LOC
setlistener("/it-autoflight/output/loc-armed", func {
var loca = getprop("/it-autoflight/output/loc-armed");
var newarm = getprop("/modes/pfd/fma/roll-mode-armed");
if (loca) {
newarm = Modes.PFD.FMA.rollModeArmed.getValue();
if (Output.locArm.getValue()) {
if (newarm != "LOC") {
setprop("/modes/pfd/fma/roll-mode-armed", "LOC");
Modes.PFD.FMA.rollModeArmed.setValue("LOC");
}
} else {
if (newarm != " ") {
setprop("/modes/pfd/fma/roll-mode-armed", " ");
Modes.PFD.FMA.rollModeArmed.setValue(" ");
}
}
});
# Arm G/S
setlistener("/it-autoflight/output/appr-armed", func {
var appa = getprop("/it-autoflight/output/appr-armed");
var newvert2arm = getprop("/modes/pfd/fma/pitch-mode-armed");
if (appa) {
newvert2arm = Modes.PFD.FMA.pitchModeArmed.getValue();
if (Output.apprArm.getValue()) {
if (newvert2arm != "G/S") {
setprop("/modes/pfd/fma/pitch-mode-armed", "G/S");
Modes.PFD.FMA.pitchModeArmed.setValue("G/S");
}
} else {
if (newvert2arm != " ") {
setprop("/modes/pfd/fma/pitch-mode-armed", " ");
Modes.PFD.FMA.pitchModeArmed.setValue(" ");
}
}
});
# AP
var ap = func {
var ap1 = getprop("/it-autoflight/output/ap1");
var ap2 = getprop("/it-autoflight/output/ap2");
var newap = getprop("/modes/pfd/fma/ap-mode");
ap1 = Output.ap1.getValue();
ap2 = Output.ap2.getValue();
newap = Modes.PFD.FMA.apMode.getValue();
if (ap1 and ap2 and newap != "AP1+2") {
setprop("/modes/pfd/fma/ap-mode", "AP 1+2");
Modes.PFD.FMA.apMode.setValue("AP 1+2");
} else if (ap1 and !ap2 and newap != "AP 1") {
setprop("/modes/pfd/fma/ap-mode", "AP 1");
Modes.PFD.FMA.apMode.setValue("AP 1");
} else if (ap2 and !ap1 and newap != "AP 2") {
setprop("/modes/pfd/fma/ap-mode", "AP 2");
Modes.PFD.FMA.apMode.setValue("AP 2");
} else if (!ap1 and !ap2) {
setprop("/modes/pfd/fma/ap-mode", " ");
Modes.PFD.FMA.apMode.setValue(" ");
}
}
# FD
var fd = func {
var fd1 = getprop("/it-autoflight/output/fd1");
var fd2 = getprop("/it-autoflight/output/fd2");
var newfd = getprop("/modes/pfd/fma/fd-mode");
fd1 = Output.fd1.getValue();
fd2 = Output.fd2.getValue();
newfd = Modes.PFD.FMA.fdMode.getValue();
if (fd1 and fd2 and newfd != "1FD2") {
setprop("/modes/pfd/fma/fd-mode", "1 FD 2");
Modes.PFD.FMA.fdMode.setValue("1 FD 2");
} else if (fd1 and !fd2 and newfd != "1 FD -") {
setprop("/modes/pfd/fma/fd-mode", "1 FD -");
Modes.PFD.FMA.fdMode.setValue("1 FD -");
} else if (fd2 and !fd1 and newfd != "- FD 2") {
setprop("/modes/pfd/fma/fd-mode", "- FD 2");
Modes.PFD.FMA.fdMode.setValue("- FD 2");
} else if (!fd1 and !fd2) {
setprop("/modes/pfd/fma/fd-mode", " ");
Modes.PFD.FMA.fdMode.setValue(" ");
}
}
# AT
var at = func {
var at = getprop("/it-autoflight/output/athr");
var newat = getprop("/modes/pfd/fma/at-mode");
if (at and newat != "A/THR") {
setprop("/modes/pfd/fma/at-mode", "A/THR");
var atMode = func {
at = Output.athr.getValue();
if (at and Modes.PFD.FMA.athrMode.getValue() != "A/THR") {
Modes.PFD.FMA.athrMode.setValue("A/THR");
} else if (!at) {
setprop("/modes/pfd/fma/at-mode", " ");
Modes.PFD.FMA.athrMode.setValue(" ");
}
}
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) {
setprop("/it-autoflight/input/lat", 3);
if ((Output.ap1.getValue() or Output.ap2.getValue() or Output.fd1.getValue() or Output.fd2.getValue()) and !Custom.Output.fmaPower.getValue()) {
Input.lat.setValue(3);
boxchk_b();
}
}
var boxchk_b = func {
var newlat = getprop("/modes/pfd/fma/roll-mode");
if (newlat != " ") {
setprop("/modes/pfd/fma/roll-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.rollMode.getValue() != " ") {
Modes.PFD.FMA.rollModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
var newvert = getprop("/modes/pfd/fma/pitch-mode");
if (newvert != " ") {
setprop("/modes/pfd/fma/pitch-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.pitchMode.getValue() != " ") {
Modes.PFD.FMA.pitchModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
var newarmr = getprop("/modes/pfd/fma/roll-mode-armed");
if (newarmr != " ") {
setprop("/modes/pfd/fma/roll-mode-armed-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.rollModeArmed.getValue() != " ") {
Modes.PFD.FMA.rollModeArmedTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
var newarmp = getprop("/modes/pfd/fma/pitch-mode-armed");
if (newarmp != " ") {
setprop("/modes/pfd/fma/pitch-mode-armed-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.pitchModeArmed.getValue() != " ") {
Modes.PFD.FMA.pitchModeArmedTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
var newarmp2 = getprop("/modes/pfd/fma/pitch-mode2-armed");
if (newarmp2 != " ") {
setprop("/modes/pfd/fma/pitch-mode2-armed-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.pitchMode2Armed.getValue() != " ") {
Modes.PFD.FMA.pitchMode2ArmedTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
}
@ -533,79 +597,79 @@ setlistener("/it-autoflight/output/fd2", func {
boxchk();
});
setlistener("/it-autoflight/output/athr", func {
at();
atMode();
});
# Boxes
setlistener("/modes/pfd/fma/ap-mode", func {
if (getprop("/modes/pfd/fma/ap-mode") != " ") {
setprop("/modes/pfd/fma/ap-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.apMode.getValue() != " ") {
Modes.PFD.FMA.apModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/fd-mode", func {
if (getprop("/modes/pfd/fma/fd-mode") != " ") {
setprop("/modes/pfd/fma/fd-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.fdMode.getValue() != " ") {
Modes.PFD.FMA.fdModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/at-mode", func {
if (getprop("/modes/pfd/fma/at-mode") != " ") {
setprop("/modes/pfd/fma/throttle-mode-time", getprop("sim/time/elapsed-sec"));
setprop("/modes/pfd/fma/athr-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.athrMode.getValue() != " ") {
Modes.PFD.FMA.throttleModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
Modes.PFD.FMA.athrModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/athr-armed", func {
if (getprop("/modes/pfd/fma/at-mode") != " ") {
setprop("/modes/pfd/fma/athr-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.athrMode.getValue() != " ") {
Modes.PFD.FMA.athrModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/throttle-mode", func {
var state1 = getprop("systems/thrust/state1");
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
getprop("systems/thrust/eng-out") != 1) {
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) {
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"));
state1 = pts.Systems.Thrust.state[0].getValue();
state2 = pts.Systems.Thrust.state[1].getValue();
athr = Output.athr.getValue();
if (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
!pts.Systems.Thrust.engOut.getValue()) {
Modes.PFD.FMA.throttleModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
} else if (athr == 1 and state1 != "TOGA" and state2 != "TOGA" and state1 != "IDLE" and state2 != "IDLE" and pts.Systems.Thrust.engOut.getValue()) {
if (pts.Controls.Engines.Engine.throttlePos[0].getValue() < 0.83 and pts.Controls.Engines.Engine.throttlePos[1].getValue() < 0.83) {
Modes.PFD.FMA.throttleModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
}
});
setlistener("/modes/pfd/fma/roll-mode", func {
var newlat = getprop("/modes/pfd/fma/roll-mode");
if (newlat != " ") {
setprop("/modes/pfd/fma/roll-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.rollMode.getValue() != " ") {
Modes.PFD.FMA.rollModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/pitch-mode", func {
var newvert = getprop("/modes/pfd/fma/pitch-mode");
if (newvert != " ") {
setprop("/modes/pfd/fma/pitch-mode-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.pitchMode.getValue() != " ") {
Modes.PFD.FMA.pitchModeTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/roll-mode-armed", func {
var newarm = getprop("/modes/pfd/fma/roll-mode-armed");
if (newarm != " ") {
setprop("/modes/pfd/fma/roll-mode-armed-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.rollModeArmed.getValue() != " ") {
Modes.PFD.FMA.rollModeArmedTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/pitch-mode-armed", func {
var newarm = getprop("/modes/pfd/fma/pitch-mode-armed");
if (newarm != " ") {
setprop("/modes/pfd/fma/pitch-mode-armed-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.pitchModeArmed.getValue() != " ") {
Modes.PFD.FMA.pitchModeArmedTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("/modes/pfd/fma/pitch-mode2-armed", func {
var newarm = getprop("/modes/pfd/fma/pitch-mode2-armed");
if (newarm != " ") {
setprop("/modes/pfd/fma/pitch-mode2-armed-time", getprop("sim/time/elapsed-sec"));
if (Modes.PFD.FMA.pitchMode2Armed != " ") {
Modes.PFD.FMA.pitchMode2ArmedTime.setValue(pts.Sim.Time.elapsedSec.getValue());
}
});
setlistener("sim/signals/fdm-initialized", func {
init();
});

View file

@ -108,6 +108,9 @@ setprop("/FMGC/internal/vor2-mcdu", "999.99/XXX");
setprop("/FMGC/internal/adf1-mcdu", "XXX/999.99");
setprop("/FMGC/internal/adf2-mcdu", "999.99/XXX");
var blockCalculating = props.globals.initNode("/FMGC/internal/block-calculating", 0, "BOOL");
var fuelCalculating = props.globals.initNode("/FMGC/internal/fuel-calculating", 0, "BOOL");
var FMGCinit = func {
FMGCInternal.takeoffState = 0;
FMGCInternal.minspeed = 0;
@ -168,6 +171,7 @@ var FMGCInternal = {
flap2_appr: 0,
vls_appr: 0,
vapp_appr: 0,
vappSpeedSet: 0,
# PERF
transAlt: 18000,
@ -186,6 +190,9 @@ var FMGCInternal = {
destMagSet: 0,
destWind: 0,
destWindSet: 0,
radioNo: 0,
ldgConfig3: 0,
ldgConfigFull: 0,
# INIT A
altAirport: "",
@ -215,6 +222,10 @@ var FMGCInternal = {
zfwcgSet: 0,
block: 0.0,
blockSet: 0,
blockCalculating: 0,
blockConfirmed: 0,
fuelCalculating: 0,
fuelRequest: 0,
taxiFuel: 0.4,
taxiFuelSet: 0,
tripFuel: 0,
@ -275,8 +286,8 @@ setlistener("/gear/gear[0]/wow", func {
}, 0, 0);
var trimReset = func {
flaps = getprop("/controls/flight/flaps-pos");
if (pts.Gear.wow[0].getBoolValue() and !FMGCInternal.takeoffState and (flaps >= 5 or (flaps >= 4 and getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap3-override") == 1))) {
flaps = pts.Controls.Flight.flapsPos.getValue();
if (pts.Gear.wow[0].getBoolValue() and !FMGCInternal.takeoffState and (flaps >= 5 or (flaps >= 4 and pts.Instrumentation.MKVII.Inputs.Discretes.flap3Override.getValue() == 1))) {
interpolate("/controls/flight/elevator-trim", 0.0, 1.5);
}
}
@ -480,16 +491,16 @@ var updateFuel = func {
}
# Misc fuel claclulations
if (getprop("/FMGC/internal/block-calculating")) {
if (fmgc.FMGCInternal.blockCalculating) {
FMGCInternal.block = num(FMGCInternal.altFuel + FMGCInternal.finalFuel + FMGCInternal.tripFuel + FMGCInternal.rteRsv + FMGCInternal.taxiFuel);
FMGCInternal.blockSet = 1;
}
fmgc.FMGCInternal.fob = num(getprop("/consumables/fuel/total-fuel-lbs") / 1000);
fmgc.FMGCInternal.fuelPredGw = num(getprop("/fdm/jsbsim/inertia/weight-lbs") / 1000);
fmgc.FMGCInternal.fob = num(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000);
fmgc.FMGCInternal.fuelPredGw = num(pts.Fdm.JSBsim.Inertia.weightLbs.getValue() / 1000);
fmgc.FMGCInternal.cg = fmgc.FMGCInternal.zfwcg;
# Calcualte extra fuel
if (num(getprop("/engines/engine[0]/n1-actual")) > 0 or num(getprop("/engines/engine[1]/n1-actual")) > 0) {
if (num(pts.Engines.Engine.n1Actual[0].getValue()) > 0 or num(pts.Engines.Engine.n1Actual[1].getValue()) > 0) {
extra_fuel = 1000 * num(FMGCInternal.fob - FMGCInternal.tripFuel - FMGCInternal.minDestFob - FMGCInternal.taxiFuel - FMGCInternal.rteRsv);
} else {
extra_fuel = 1000 * num(FMGCInternal.block - FMGCInternal.tripFuel - FMGCInternal.minDestFob - FMGCInternal.taxiFuel - FMGCInternal.rteRsv);
@ -608,8 +619,8 @@ var radios = maketimer(1, func() {
});
var masterFMGC = maketimer(0.2, func {
n1_left = getprop("/engines/engine[0]/n1-actual");
n1_right = getprop("/engines/engine[1]/n1-actual");
n1_left = pts.Engines.Engine.n1Actual[0].getValue();
n1_right = pts.Engines.Engine.n1Actual[1].getValue();
flaps = getprop("/controls/flight/flaps-pos");
modelat = getprop("/modes/pfd/fma/roll-mode");
mode = getprop("/modes/pfd/fma/pitch-mode");
@ -646,33 +657,33 @@ var masterFMGC = maketimer(0.2, func {
if ((n1_left < 85 or n1_right < 85) and gs < 90 and mode == " " and gear0 and FMGCInternal.phase == 1) { # rejected takeoff
FMGCInternal.phase = 0;
setprop("systems/pressurization/mode", "GN");
setprop("/systems/pressurization/mode", "GN");
}
if (gear0 and FMGCInternal.phase == 0 and ((n1_left >= 85 and n1_right >= 85 and mode == "SRS") or gs >= 90)) {
FMGCInternal.phase = 1;
setprop("systems/pressurization/mode", "TO");
setprop("/systems/pressurization/mode", "TO");
}
if (FMGCInternal.phase == 1 and ((mode != "SRS" and mode != " ") or alt >= accel_agl_ft)) {
FMGCInternal.phase = 2;
setprop("systems/pressurization/mode", "TO");
setprop("/systems/pressurization/mode", "TO");
}
if (FMGCInternal.phase == 2 and (mode == "ALT CRZ" or mode == "ALT CRZ*")) {
FMGCInternal.phase = 3;
setprop("systems/pressurization/mode", "CR");
setprop("/systems/pressurization/mode", "CR");
}
if (FMGCInternal.crzFl >= 200) {
if (FMGCInternal.phase == 3 and (flightPlanController.arrivalDist <= 200 or altSel < 20000)) {
FMGCInternal.phase = 4;
setprop("systems/pressurization/mode", "DE");
setprop("/systems/pressurization/mode", "DE");
}
} else {
if (FMGCInternal.phase == 3 and (flightPlanController.arrivalDist <= 200 or altSel < (FMGCInternal.crzFl * 100))) { # todo - not sure about crzFl condition, investigate what happens!
FMGCInternal.phase = 4;
setprop("systems/pressurization/mode", "DE");
setprop("/systems/pressurization/mode", "DE");
}
}
@ -688,7 +699,7 @@ var masterFMGC = maketimer(0.2, func {
if ((FMGCInternal.phase == 5) and state1 == "TOGA" and state2 == "TOGA") {
FMGCInternal.phase = 6;
setprop("systems/pressurization/mode", "TO");
setprop("/systems/pressurization/mode", "TO");
setprop("/it-autoflight/input/toga", 1);
}
@ -755,7 +766,7 @@ var masterFMGC = maketimer(0.2, func {
# calculate speeds
############################
flap = getprop("/controls/flight/flaps-pos");
weight_lbs = getprop("/fdm/jsbsim/inertia/weight-lbs") / 1000;
weight_lbs = pts.Fdm.JSBsim.Inertia.weightLbs.getValue() / 1000;
altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
# current speeds
@ -772,7 +783,7 @@ var masterFMGC = maketimer(0.2, func {
FMGCInternal.slat = FMGCInternal.vs1g_clean * 1.23;
FMGCInternal.flap2 = FMGCInternal.vs1g_conf_2 * 1.47;
FMGCInternal.flap3 = FMGCInternal.vs1g_conf_3 * 1.36;
if (getprop("/FMGC/internal/ldg-config-3-set")) {
if (FMGCInternal.ldgConfig3) {
FMGCInternal.vls = FMGCInternal.vs1g_conf_3 * 1.23;
} else {
FMGCInternal.vls = FMGCInternal.vs1g_conf_full * 1.23
@ -780,7 +791,7 @@ var masterFMGC = maketimer(0.2, func {
if (FMGCInternal.vls < 113) {
FMGCInternal.vls = 113;
}
if (!getprop("/FMGC/internal/vapp-speed-set")) {
if (!fmgc.FMGCInternal.vappSpeedSet) {
if (FMGCInternal.destWind < 5) {
FMGCInternal.vapp = FMGCInternal.vls + 5;
} else if (FMGCInternal.destWind > 15) {
@ -822,7 +833,7 @@ var masterFMGC = maketimer(0.2, func {
FMGCInternal.slat_appr = FMGCInternal.slat;
FMGCInternal.flap2_appr = FMGCInternal.flap2;
FMGCInternal.vls_appr = FMGCInternal.vls;
if (!getprop("/FMGC/internal/vapp-speed-set")) {
if (!fmgc.FMGCInternal.vappSpeedSet) {
FMGCInternal.vapp_appr = FMGCInternal.vapp;
}
} else {
@ -836,7 +847,7 @@ var masterFMGC = maketimer(0.2, func {
FMGCInternal.vs1g_conf_full_appr = -0.0007 * FMGCInternal.lw * FMGCInternal.lw + 0.6002 * FMGCInternal.lw + 38.479;
FMGCInternal.slat_appr = FMGCInternal.vs1g_clean_appr * 1.23;
FMGCInternal.flap2_appr = FMGCInternal.vs1g_conf_2_appr * 1.47;
if (getprop("/FMGC/internal/ldg-config-3-set")) {
if (FMGCInternal.ldgConfig3) {
FMGCInternal.vls_appr = FMGCInternal.vs1g_conf_3_appr * 1.23;
} else {
FMGCInternal.vls_appr = FMGCInternal.vs1g_conf_full_appr * 1.23
@ -844,7 +855,7 @@ var masterFMGC = maketimer(0.2, func {
if (FMGCInternal.vls_appr < 113) {
FMGCInternal.vls_appr = 113;
}
if (!getprop("/FMGC/internal/vapp-speed-set")) {
if (!fmgc.FMGCInternal.vappSpeedSet) {
if (FMGCInternal.destWind < 5) {
FMGCInternal.vapp_appr = FMGCInternal.vls_appr + 5;
} else if (FMGCInternal.destWind > 15) {
@ -999,23 +1010,23 @@ var reset_FMGC = func {
setprop("it-autoflight/input/kts", spd);
setprop("it-autoflight/input/hdg", hdg);
setprop("it-autoflight/input/alt", alt);
setprop("systems/pressurization/mode", "GN");
setprop("systems/pressurization/vs", "0");
setprop("systems/pressurization/targetvs", "0");
setprop("systems/pressurization/vs-norm", "0");
setprop("systems/pressurization/auto", 1);
setprop("systems/pressurization/deltap", "0");
setprop("systems/pressurization/outflowpos", "0");
setprop("systems/pressurization/deltap-norm", "0");
setprop("systems/pressurization/outflowpos-norm", "0");
setprop("/systems/pressurization/mode", "GN");
setprop("/systems/pressurization/vs", "0");
setprop("/systems/pressurization/targetvs", "0");
setprop("/systems/pressurization/vs-norm", "0");
setprop("/systems/pressurization/auto", 1);
setprop("/systems/pressurization/deltap", "0");
setprop("/systems/pressurization/outflowpos", "0");
setprop("/systems/pressurization/deltap-norm", "0");
setprop("/systems/pressurization/outflowpos-norm", "0");
altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
setprop("systems/pressurization/cabinalt", altitude);
setprop("systems/pressurization/targetalt", altitude);
setprop("systems/pressurization/diff-to-target", "0");
setprop("systems/pressurization/ditchingpb", 0);
setprop("systems/pressurization/targetvs", "0");
setprop("systems/pressurization/ambientpsi", "0");
setprop("systems/pressurization/cabinpsi", "0");
setprop("/systems/pressurization/cabinalt", altitude);
setprop("/systems/pressurization/targetalt", altitude);
setprop("/systems/pressurization/diff-to-target", "0");
setprop("/systems/pressurization/ditchingpb", 0);
setprop("/systems/pressurization/targetvs", "0");
setprop("/systems/pressurization/ambientpsi", "0");
setprop("/systems/pressurization/cabinpsi", "0");
mcdu.ReceivedMessagesDatabase.clearDatabase();
}
@ -1169,7 +1180,7 @@ setlistener("/gear/gear[1]/wow", func() {
setprop("/FMGC/internal/landing-time", -99);
}
if (getprop("/gear/gear[1]/wow") == 1 and getprop("/FMGC/internal/landing-time") == -99) {
if (pts.Gear.wow[1].getValue() and getprop("/FMGC/internal/landing-time") == -99) {
timer30secLanding.start();
setprop("/FMGC/internal/landing-time", pts.Sim.Time.elapsedSec.getValue());
}
@ -1280,7 +1291,8 @@ var timer48gpsAlign3 = maketimer(1, func() {
var timer3blockFuel = maketimer(1, func() {
if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/block-fuel-time") + 3) {
#updateFuel();
setprop("/FMGC/internal/block-calculating", 0);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
setprop("/FMGC/internal/block-fuel-time", -99);
timer3blockFuel.stop();
}
@ -1289,7 +1301,8 @@ var timer3blockFuel = maketimer(1, func() {
var timer5fuelPred = maketimer(1, func() {
if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/fuel-pred-time") + 5) {
#updateFuel();
setprop("/FMGC/internal/fuel-calculating", 0);
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
setprop("/FMGC/internal/fuel-pred-time", -99);
timer5fuelPred.stop();
}

View file

@ -1,6 +1,8 @@
# A3XX Simbrief Parser
# Copyright (c) 2020 Jonathan Redpath (legoboyvdlp)
var LBS2KGS = 0.4535924;
var SimbriefParser = {
node: nil,
OFP: nil,
@ -37,6 +39,9 @@ var SimbriefParser = {
me.store1 = nil;
me.store2 = nil;
me.store1 = me.OFP.getChild("params");
var units = me.store1.getChild("units").getValue();
me.store1 = me.OFP.getChild("general");
me.store2 = me.OFP.getChild("alternate");
fmgc.FMGCInternal.flightNum = (me.store1.getChild("icao_airline").getValue() or "") ~ (me.store1.getChild("flight_number").getValue() or "");
@ -54,12 +59,12 @@ var SimbriefParser = {
fmgc.FMGCInternal.crzTemp = (((me.store1.getChild("initial_altitude").getValue() / 1000) * -2) + 15) + me.store1.getChild("avg_temp_dev").getValue();
fmgc.FMGCInternal.crzTempSet = 1;
fmgc.FMGCInternal.crzProg = me.store1.getChild("initial_altitude").getValue() / 100;
if (me.store1.getChild("avg_wind_comp").getValue() >= 0) {
fmgc.FMGCInternal.tripWind = "TL" ~ me.store1.getChild("avg_wind_comp").getValue();
if (num(me.store1.getChild("avg_wind_comp").getValue()) >= 0) {
fmgc.FMGCInternal.tripWind = "TL" ~ abs(me.store1.getChild("avg_wind_comp").getValue());
} else {
fmgc.FMGCInternal.tripWind = "HD" ~ me.store1.getChild("avg_wind_comp").getValue();
fmgc.FMGCInternal.tripWind = "HD" ~ abs(me.store1.getChild("avg_wind_comp").getValue());
}
fmgc.FMGCInternal.tripWindValue = me.store1.getChild("avg_wind_comp").getValue();
fmgc.FMGCInternal.tripWindValue = abs(me.store1.getChild("avg_wind_comp").getValue());
fmgc.FMGCInternal.altAirport = me.store2.getChild("icao_code").getValue();
fmgc.FMGCInternal.altAirportSet = 1;
@ -154,29 +159,52 @@ var SimbriefParser = {
# INITB
me.store1 = me.OFP.getChild("fuel");
me.store2 = me.OFP.getChild("weights");
fmgc.FMGCInternal.taxiFuel = me.store1.getChild("taxi").getValue() / 1000;
fmgc.FMGCInternal.taxiFuelSet = 1;
fmgc.FMGCInternal.altFuel = me.store1.getChild("alternate_burn").getValue() / 1000;
fmgc.FMGCInternal.altFuelSet = 1;
fmgc.FMGCInternal.finalFuel = me.store1.getChild("reserve").getValue() / 1000;
fmgc.FMGCInternal.finalFuelSet = 1;
fmgc.FMGCInternal.rteRsv = me.store1.getChild("contingency").getValue() / 1000;
fmgc.FMGCInternal.rteRsvSet = 1;
if ((me.store1.getChild("contingency").getValue() / 1000) / num(fmgc.FMGCInternal.tripFuel) * 100 <= 15.0) {
fmgc.FMGCInternal.rtePercent = (me.store1.getChild("contingency").getValue() / 1000) / num(fmgc.FMGCInternal.tripFuel) * 100;
if (units == "lbs") {
fmgc.FMGCInternal.taxiFuel = me.store1.getChild("taxi").getValue() / 1000;
fmgc.FMGCInternal.taxiFuelSet = 1;
fmgc.FMGCInternal.altFuel = me.store1.getChild("alternate_burn").getValue() / 1000;
fmgc.FMGCInternal.altFuelSet = 1;
fmgc.FMGCInternal.finalFuel = me.store1.getChild("reserve").getValue() / 1000;
fmgc.FMGCInternal.finalFuelSet = 1;
fmgc.FMGCInternal.rteRsv = me.store1.getChild("contingency").getValue() / 1000;
fmgc.FMGCInternal.rteRsvSet = 1;
if ((me.store1.getChild("contingency").getValue() / 1000) / num(fmgc.FMGCInternal.tripFuel) * 100 <= 15.0) {
fmgc.FMGCInternal.rtePercent = (me.store1.getChild("contingency").getValue() / 1000) / num(fmgc.FMGCInternal.tripFuel) * 100;
} else {
fmgc.FMGCInternal.rtePercent = 15.0
}
fmgc.FMGCInternal.rtePercentSet = 0;
fmgc.FMGCInternal.block = me.store1.getChild("plan_ramp").getValue() / 1000;
fmgc.FMGCInternal.blockSet = 1;
fmgc.FMGCInternal.zfw = me.store2.getChild("est_zfw").getValue() / 1000;
fmgc.FMGCInternal.zfwSet = 1;
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
} else {
fmgc.FMGCInternal.rtePercent = 15.0
fmgc.FMGCInternal.taxiFuel = (me.store1.getChild("taxi").getValue() / LBS2KGS) / 1000;
fmgc.FMGCInternal.taxiFuelSet = 1;
fmgc.FMGCInternal.altFuel = (me.store1.getChild("alternate_burn").getValue() / LBS2KGS) / 1000;
fmgc.FMGCInternal.altFuelSet = 1;
fmgc.FMGCInternal.finalFuel = (me.store1.getChild("reserve").getValue() / LBS2KGS) / 1000;
fmgc.FMGCInternal.finalFuelSet = 1;
fmgc.FMGCInternal.rteRsv = (me.store1.getChild("contingency").getValue() / LBS2KGS) / 1000;
fmgc.FMGCInternal.rteRsvSet = 1;
if (((me.store1.getChild("contingency").getValue() / LBS2KGS) / 1000) / num(fmgc.FMGCInternal.tripFuel) * 100 <= 15.0) {
fmgc.FMGCInternal.rtePercent = ((me.store1.getChild("contingency").getValue() / LBS2KGS) / 1000) / num(fmgc.FMGCInternal.tripFuel) * 100;
} else {
fmgc.FMGCInternal.rtePercent = 15.0
}
fmgc.FMGCInternal.rtePercentSet = 0;
fmgc.FMGCInternal.block = (me.store1.getChild("plan_ramp").getValue() / LBS2KGS) / 1000;
fmgc.FMGCInternal.blockSet = 1;
fmgc.FMGCInternal.zfw = (me.store2.getChild("est_zfw").getValue() / LBS2KGS) / 1000;
fmgc.FMGCInternal.zfwSet = 1;
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
}
fmgc.FMGCInternal.rtePercentSet = 0;
fmgc.FMGCInternal.block = me.store1.getChild("plan_ramp").getValue() / 1000;
fmgc.FMGCInternal.blockSet = 1;
fmgc.FMGCInternal.zfw = me.store2.getChild("est_zfw").getValue() / 1000;
fmgc.FMGCInternal.zfwSet = 1;
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
},
};

View file

@ -758,9 +758,11 @@ var flightPlanController = {
fmgc.windController.updatePlans();
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
canvas_nd.A3XXRouteDriver.triggerSignal("fp-added");
},

View file

@ -50,6 +50,9 @@ var Controls = {
parkingBrake: props.globals.getNode("/controls/gear/brake-parking"),
chocks: props.globals.getNode("/services/chocks/enable"),
},
Switches: {
annunTest: props.globals.getNode("/controls/switches/annun-test"),
},
};
var ECAM = {
@ -58,11 +61,14 @@ var ECAM = {
var Engines = {
Engine: {
egtActual: [props.globals.getNode("/engines/engine[0]/egt-actual"), props.globals.getNode("/engines/engine[1]/egt-actual")],
eprActual: [props.globals.getNode("/engines/engine[0]/epr-actual"), props.globals.getNode("/engines/engine[1]/epr-actual")],
fuelFlow: [props.globals.getNode("/engines/engine[0]/fuel-flow_actual"), props.globals.getNode("/engines/engine[1]/fuel-flow_actual")],
n1Actual: [props.globals.getNode("/engines/engine[0]/n1-actual"), props.globals.getNode("/engines/engine[1]/n1-actual")],
n2Actual: [props.globals.getNode("/engines/engine[0]/n2-actual"), props.globals.getNode("/engines/engine[1]/n2-actual")],
oilPsi: [props.globals.getNode("/engines/engine[0]/oil-psi-actual"), props.globals.getNode("/engines/engine[1]/oil-psi-actual")],
thrust: [props.globals.getNode("/engines/engine[0]/thrust-lb"), props.globals.getNode("/engines/engine[1]/thrust-lb")],
reverser: [props.globals.getNode("/engines/engine[0]/reverser-pos-norm"), props.globals.getNode("/engines/engine[1]/reverser-pos-norm")],
state: [props.globals.getNode("/engines/engine[0]/state"), props.globals.getNode("/engines/engine[1]/state")],
},
};
@ -82,11 +88,17 @@ var Fdm = {
brake: [props.globals.getNode("/fdm/jsbsim/fcs/left-brake-cmd-norm"),props.globals.getNode("/fdm/jsbsim/fcs/right-brake-cmd-norm")],
flapDeg: props.globals.getNode("/fdm/jsbsim/fcs/flap-pos-deg"),
slatDeg: props.globals.getNode("/fdm/jsbsim/fcs/slat-pos-deg"),
slatLocked: props.globals.getNode("/fdm/jsbsim/fcs/slat-locked"),
},
Fbw: {
aileron: props.globals.getNode("/fdm/jsbsim/fbw/aileron-sidestick"),
elevator: props.globals.getNode("/fdm/jsbsim/fbw/elevator-sidestick"),
},
Hydraulics: {
Rudder: {
trimDeg: props.globals.getNode("fdm/jsbsim/hydraulics/rudder/trim-deg"),
},
},
Inertia: {
weightLbs: props.globals.getNode("/fdm/jsbsim/inertia/weight-lbs"),
},
@ -127,6 +139,10 @@ var Instrumentation = {
settingInhg: props.globals.getNode("/instrumentation/altimeter[0]/setting-inhg"),
std: props.globals.getNode("/instrumentation/altimeter[0]/std"),
},
Clock: {
indicatedString: props.globals.getNode("/instrumentation/clock/indicated-string"),
indicatedStringShort: props.globals.getNode("/instrumentation/clock/indicated-short-string"),
},
Efis: {
Inputs: {
arpt: [props.globals.initNode("/instrumentation/efis[0]/inputs/arpt", 0, "BOOL"), props.globals.initNode("/instrumentation/efis[1]/inputs/arpt", 0, "BOOL")],
@ -145,6 +161,17 @@ var Instrumentation = {
pnlModeNum: [props.globals.initNode("/instrumentation/efis[0]/mfd/pnl_mode-num", 2, "INT"), props.globals.initNode("/instrumentation/efis[1]/mfd/pnl_mode-num", 2, "INT")],
},
},
MKVII: {
Inputs: {
Discretes: {
flap3Override: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap3-override"),
},
},
},
Nav: {
gsDeflection: props.globals.getNode("/instrumentation/nav[0]/gs-needle-deflection-norm"),
locDeflection: props.globals.getNode("/instrumentation/nav[0]/heading-needle-deflection-norm"),
},
TCAS: {
Inputs: {
mode: props.globals.getNode("/instrumentation/tcas/inputs/mode"),
@ -186,7 +213,13 @@ var Sim = {
Time: {
deltaRealtimeSec: props.globals.getNode("/sim/time/delta-realtime-sec"),
elapsedSec: props.globals.getNode("/sim/time/elapsed-sec"),
UTC: {
day: props.globals.getNode("/sim/time/utc/day"),
month: props.globals.getNode("/sim/time/utc/month"),
year: props.globals.getNode("/sim/time/utc/year"),
},
},
Version: props.globals.getNode("/sim/version/flightgear"),
};
var Systems = {

View file

@ -11,16 +11,16 @@ var incStep = 1;
var viewName = "XX";
var fovZoom = func(d) {
viewName = getprop("sim/current-view/name");
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" and viewName != "Walker Orbit View";
viewName = getprop("/sim/current-view/name");
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" and viewName != "Walker Orbit View";
if (getprop("sim/current-view/z-offset-m") <= -20) {
if (getprop("/sim/current-view/z-offset-m") <= -20) {
decStep = -2;
} else {
decStep = -1;
}
if (getprop("sim/current-view/z-offset-m") < -20) { # Not a typo, the conditions are different
if (getprop("/sim/current-view/z-offset-m") < -20) { # Not a typo, the conditions are different
incStep = 2;
} else {
incStep = 1;
@ -28,11 +28,11 @@ var fovZoom = func(d) {
if (d == -1) {
if (canChangeZOffset) {
distance = getprop("sim/current-view/z-offset-m");
min_dist = getprop("sim/current-view/z-offset-min-m");
distance = getprop("/sim/current-view/z-offset-m");
min_dist = getprop("/sim/current-view/z-offset-min-m");
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)));
} else {
@ -40,11 +40,11 @@ var fovZoom = func(d) {
}
} else if (d == 1) {
if (canChangeZOffset) {
distance = getprop("sim/current-view/z-offset-m");
max_dist = getprop("sim/current-view/z-offset-max-m");
distance = getprop("/sim/current-view/z-offset-m");
max_dist = getprop("/sim/current-view/z-offset-max-m");
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)));
} else {
@ -52,11 +52,11 @@ var fovZoom = func(d) {
}
} else if (d == 0) {
if (canChangeZOffset) {
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")));
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")));
} else {
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")))
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")))
}
}
}

View file

@ -2,6 +2,8 @@ var isNoStar = [0, 0, 0];
var isNoTransArr = [0, 0, 0];
var isNoVia = [0, 0, 0];
var version = nil;
var arrivalPage = {
title: [nil, nil, nil],
subtitle: [nil, nil],
@ -74,7 +76,8 @@ var arrivalPage = {
if (fmgc.flightPlanController.flightplans[2].approach != nil) {
me.selectedApproach = fmgc.flightPlanController.flightplans[2].approach;
if (getprop("/sim/version/flightgear") == "2020.2.0" or getprop("/sim/version/flightgear") == "2020.2.1" or getprop("/sim/version/flightgear") == "2020.3.0") {
version = pts.Sim.Version.getValue();
if (version == "2020.2.0" or version == "2020.2.1" or version == "2020.3.0") {
if (fmgc.flightPlanController.flightplans[2].approach_trans != nil) {
me.selectedVIA = fmgc.flightPlanController.flightplans[2].approach_trans;
} elsif (isNoVia[2] == 1) {
@ -98,7 +101,8 @@ var arrivalPage = {
} else {
if (fmgc.flightPlanController.flightplans[me.computer].approach != nil) {
me.selectedApproach = fmgc.flightPlanController.flightplans[me.computer].approach;
if (getprop("/sim/version/flightgear") == "2020.2.0" or getprop("/sim/version/flightgear") == "2020.2.1" or getprop("/sim/version/flightgear") == "2020.3.0") {
version = pts.Sim.Version.getValue();
if (version == "2020.2.0" or version == "2020.2.1" or version == "2020.3.0") {
if (fmgc.flightPlanController.flightplans[me.computer].approach_trans != nil) {
me.selectedVIA = fmgc.flightPlanController.flightplans[me.computer].approach_trans;
} elsif (isNoVia[me.computer] == 1) {
@ -107,7 +111,8 @@ var arrivalPage = {
}
} elsif (fmgc.flightPlanController.flightplans[2].approach != nil) {
me.selectedApproach = fmgc.flightPlanController.flightplans[2].approach;
if (getprop("/sim/version/flightgear") == "2020.2.0" or getprop("/sim/version/flightgear") == "2020.2.1" or getprop("/sim/version/flightgear") == "2020.3.0") {
version = pts.Sim.Version.getValue();
if (version == "2020.2.0" or version == "2020.2.1" or version == "2020.3.0") {
if (fmgc.flightPlanController.flightplans[2].approach_trans != nil) {
me.selectedVIA = fmgc.flightPlanController.flightplans[2].approach_trans;
}
@ -232,7 +237,8 @@ var arrivalPage = {
},
updateActiveVIAs: func() {
if (getprop("/sim/version/flightgear") != "2020.2.0" and getprop("/sim/version/flightgear") != "2020.2.1" and getprop("/sim/version/flightgear") != "2020.3.0") { return; }
version = pts.Sim.Version.getValue();
if (version != "2020.2.0" and version != "2020.2.1" and version != "2020.3.0") { return; }
if (me.selectedVIA == "NO VIA") {
if (!fmgc.flightPlanController.temporaryFlag[me.computer]) {
@ -503,7 +509,8 @@ var arrivalPage = {
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
},
updateVIAs: func() {
if (getprop("/sim/version/flightgear") != "2020.2.0" and getprop("/sim/version/flightgear") != "2020.2.1" and getprop("/sim/version/flightgear") != "2020.3.0") { return; }
version = pts.Sim.Version.getValue();
if (version != "2020.2.0" and version != "2020.2.1" and version != "2020.3.0") { return; }
if (me.selectedApproach == nil or me.activePage != 2) {
me.clearVias();
return;
@ -746,7 +753,8 @@ var arrivalPage = {
},
arrPushbuttonLeft: func(index) {
if (index == 2 and me.activePage == 1 and me.selectedApproach != nil) {
if (getprop("/sim/version/flightgear") != "2020.2.0" and getprop("/sim/version/flightgear") != "2020.2.1" and getprop("/sim/version/flightgear") != "2020.3.0") { return; }
version = pts.Sim.Version.getValue();
if (version != "2020.2.0" and version != "2020.2.1" and version != "2020.3.0") { return; }
me.oldPage = me.activePage;
me.activePage = 2;
me.updatePage();
@ -778,7 +786,7 @@ var arrivalPage = {
}
setprop("FMGC/internal/baro", 99999);
setprop("FMGC/internal/radio", 99999);
setprop("FMGC/internal/radio-no", 0);
fmgc.FMGCInternal.radioNo = 0;
me.updateApproaches();
me.updatePage();
fmgc.flightPlanController.flightPlanChanged(me.computer);

View file

@ -436,9 +436,11 @@ var fplnPage = { # this one is only created once, and then updated - remember th
if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
} else {
if (canvas_mcdu.myLatRev[me.computer] != nil) {
@ -477,9 +479,11 @@ var fplnPage = { # this one is only created once, and then updated - remember th
if (dirToFlag) { dirToFlag = 0; }
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
} else {
mcdu_message(me.computer, "NOT ALLOWED");

View file

@ -5,16 +5,20 @@
# From INIT-B
var fuelPredInput = func(key, i) {
var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad;
if (key == "L3" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
if (key == "L3" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.rteRsv = 0.05 * fmgc.FMGCInternal.tripFuel;
fmgc.FMGCInternal.rteRsvSet = 0;
fmgc.FMGCInternal.rtePercent = 5.0;
fmgc.FMGCInternal.rtePercentSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (fmgc.FMGCInternal.tripFuel != 0) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 2 and tfs <= 5 and find("/", scratchpad) == 0) {
var perc = num(split("/", scratchpad)[1]);
@ -23,7 +27,8 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.rteRsvSet = 0;
fmgc.FMGCInternal.rtePercent = perc;
fmgc.FMGCInternal.rtePercentSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
}
} else if (tfs >= 1 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 21.7) {
@ -35,7 +40,8 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.rtePercent = 15.0; # need reasearch on this value
}
fmgc.FMGCInternal.rtePercentSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -43,21 +49,26 @@ var fuelPredInput = func(key, i) {
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "L4" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating") and fmgc.FMGCInternal.altAirportSet) {
} else if (key == "L4" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and fmgc.FMGCInternal.altAirportSet) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.altFuel = 0.0;
fmgc.FMGCInternal.altTime = "0000";
fmgc.FMGCInternal.altFuelSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 10.0) {
fmgc.FMGCInternal.altFuel = tf;
fmgc.FMGCInternal.altTime = "0000";
fmgc.FMGCInternal.altFuelSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -65,50 +76,64 @@ var fuelPredInput = func(key, i) {
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "L5" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "L5" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.finalFuel = 0.0;
fmgc.FMGCInternal.finalTime = "0030";
fmgc.FMGCInternal.finalFuelSet = 0;
fmgc.FMGCInternal.finalTimeSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 10.0) {
fmgc.FMGCInternal.finalFuel = tf;
fmgc.FMGCInternal.finalFuelSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs == 4 and tf != nil and ((tf >= 0 and tf <= 59) or (tf >= 100 and tf <= 130))) {
fmgc.FMGCInternal.finalTime = scratchpad;
fmgc.FMGCInternal.finalTimeSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
}
}
} else if (key == "L6" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "L6" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.minDestFob = 0;
fmgc.FMGCInternal.minDestFobSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 5 and tf != nil and tf >= 0 and tf <= 80.0) {
fmgc.FMGCInternal.minDestFob = tf;
fmgc.FMGCInternal.minDestFobSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
if (fmgc.FMGCInternal.minDestFob < fmgc.FMGCInternal.finalFuel + fmgc.FMGCInternal.altFuel) {
mcdu_message(i, "CHECK MIN DEST FOB");
@ -119,29 +144,35 @@ var fuelPredInput = func(key, i) {
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "R3" and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "R3" and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
mcdu_message(i, "NOT ALLOWED");
} else {
var zfw_min = 80.6; #make based on performance
var zfw_max = 134.5; #61,000 kg, make based on performance
if (size(scratchpad) == 0) {
var zfw = getprop("/fdm/jsbsim/inertia/weight-lbs") - getprop("/consumables/fuel/total-fuel-lbs");
var zfw = pts.Fdm.JSBsim.Inertia.weightLbs.getValue() - pts.Consumables.Fuel.totalFuelLbs.getValue();
fmgc.FMGCInternal.zfw = sprintf("%3.1f", math.round(zfw / 1000, 0.1));
fmgc.FMGCInternal.zfwSet = 1;
if (fmgc.FMGCInternal.blockSet != 1) {
fmgc.FMGCInternal.block = getprop("consumables/fuel/total-fuel-lbs") / 1000;
fmgc.FMGCInternal.block = pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000;
fmgc.FMGCInternal.blockSet = 1;
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
} else if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else if (find("/", scratchpad) != -1) {
if (acconfig_weight_kgs.getValue() == 1) {
scratchpad = scratchpad / LBS2KGS;
}
var zfwi = split("/", scratchpad);
var zfw = num(zfwi[0]);
var zfwcg = num(zfwi[1]);
@ -154,15 +185,18 @@ var fuelPredInput = func(key, i) {
fmgc.FMGCInternal.zfwcg = zfwcg;
fmgc.FMGCInternal.zfwcgSet = 1;
if (fmgc.FMGCInternal.blockSet != 1) {
fmgc.FMGCInternal.block = getprop("consumables/fuel/total-fuel-lbs") / 1000;
fmgc.FMGCInternal.block = pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000;
fmgc.FMGCInternal.blockSet = 1;
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
} else if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -180,19 +214,25 @@ var fuelPredInput = func(key, i) {
mcdu_message(i, "NOT ALLOWED");
}
} else if (num(scratchpad) != nil and size(scratchpad) > 0 and size(scratchpad) <= 5 and (find(".", scratchpad) == -1 or size(split(".", scratchpad)[1]) <= 1)) {
if (acconfig_weight_kgs.getValue() == 1) {
scratchpad = scratchpad / LBS2KGS;
}
if (scratchpad >= zfw_min and scratchpad <= zfw_max) {
fmgc.FMGCInternal.zfw = scratchpad;
fmgc.FMGCInternal.zfwSet = 1;
if (fmgc.FMGCInternal.blockSet != 1) {
fmgc.FMGCInternal.block = getprop("consumables/fuel/total-fuel-lbs") / 1000;
fmgc.FMGCInternal.block = pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000;
fmgc.FMGCInternal.blockSet = 1;
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
} else if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {

View file

@ -10,9 +10,11 @@ var initInputA = func(key, i) {
fmgc.FMGCInternal.altAirport = "";
fmgc.FMGCInternal.altAirportSet = 0;
fmgc.windController.updatePlans();
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
fmgc.updateARPT();
@ -26,9 +28,11 @@ var initInputA = func(key, i) {
fmgc.FMGCInternal.altAirport = scratchpad;
fmgc.FMGCInternal.altAirportSet = 1;
fmgc.windController.updatePlans();
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
fmgc.updateARPT();
@ -90,9 +94,11 @@ var initInputA = func(key, i) {
updateCrzLvlCallback();
fmgc.FMGCInternal.crzTemp = 15;
fmgc.FMGCInternal.crzTempSet = 0;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else if (find("/", scratchpad) != -1) {
@ -110,9 +116,11 @@ var initInputA = func(key, i) {
if (temp >= -99 and temp <= 99) {
fmgc.FMGCInternal.crzTemp = temp;
fmgc.FMGCInternal.crzTempSet = 1;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -129,9 +137,11 @@ var initInputA = func(key, i) {
fmgc.FMGCInternal.crzTemp = temp;
fmgc.FMGCInternal.crzTempSet = 1;
fmgc.FMGCInternal.crzProg = crz;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -157,9 +167,11 @@ var initInputA = func(key, i) {
fmgc.FMGCInternal.crzSet = 1;
updateCrzLvlCallback();
fmgc.FMGCInternal.crzProg = crz;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -180,9 +192,11 @@ var initInputA = func(key, i) {
setprop("/FMGC/internal/align-ref-long", 0);
setprop("/FMGC/internal/align-ref-lat-edit", 0);
setprop("/FMGC/internal/align-ref-long-edit", 0);
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
fmgc.flightPlanController.reset(2);
fmgc.flightPlanController.init();
@ -224,7 +238,7 @@ var initInputA = func(key, i) {
}
}
} else if (key == "R2") {
if (getprop("engines/engine[0]/state") != 3 and getprop("engines/engine[1]/state") != 3) {
if (pts.Engines.Engine.state[0].getValue() != 3 and pts.Engines.Engine.state[1].getValue() != 3) {
if (!ecam.vhf3_voice.active) {
if (atsu.ATSU.working) {
if (getprop("/FMGC/simbrief-username") == "") {

View file

@ -2,28 +2,39 @@
# Copyright (c) 2020 Matthew Maring (mattmaring)
var acconfig_weight_kgs = props.globals.getNode("/systems/acconfig/options/weight-kgs", 1);
# Conversion factor pounds to kilogram
var LBS2KGS = 0.4535924;
var initInputB = func(key, i) {
var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad;
if (key == "L1" and !getprop("/FMGC/internal/fuel-calculating")) {
if (key == "L1" and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.taxiFuel = 0.4;
fmgc.FMGCInternal.taxiFuelSet = 0;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
} else if (getprop("/FMGC/internal/fuel-request-set")) {
setprop("/FMGC/internal/block-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else if (fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
} else {
var tfs = size(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
scratchpad = scratchpad / LBS2KGS;
}
if (tfs >= 1 and tfs <= 4) {
if (num(scratchpad) != nil and scratchpad >= 0.0 and scratchpad <= 9.9) {
fmgc.FMGCInternal.taxiFuel = scratchpad;
fmgc.FMGCInternal.taxiFuelSet = 1;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
} else if (getprop("/FMGC/internal/fuel-request-set")) {
setprop("/FMGC/internal/block-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else if (fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -33,16 +44,20 @@ var initInputB = func(key, i) {
mcdu_message(i, "NOT ALLOWED");
}
}
} else if (key == "L3" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "L3" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.rteRsv = 0.05 * fmgc.FMGCInternal.tripFuel;
fmgc.FMGCInternal.rteRsvSet = 0;
fmgc.FMGCInternal.rtePercent = 5.0;
fmgc.FMGCInternal.rtePercentSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (fmgc.FMGCInternal.tripFuel != 0) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 2 and tfs <= 5 and find("/", scratchpad) == 0) {
var perc = num(split("/", scratchpad)[1]);
@ -51,7 +66,8 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.rteRsvSet = 0;
fmgc.FMGCInternal.rtePercent = perc;
fmgc.FMGCInternal.rtePercentSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
}
} else if (tfs >= 1 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 21.7) {
@ -63,7 +79,8 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.rtePercent = 15.0; # need reasearch on this value
}
fmgc.FMGCInternal.rtePercentSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -71,21 +88,26 @@ var initInputB = func(key, i) {
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "L4" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating") and fmgc.FMGCInternal.altAirportSet) {
} else if (key == "L4" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating and fmgc.FMGCInternal.altAirportSet) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.altFuel = 0.0;
fmgc.FMGCInternal.altTime = "0000";
fmgc.FMGCInternal.altFuelSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 10.0) {
fmgc.FMGCInternal.altFuel = tf;
fmgc.FMGCInternal.altTime = "0000";
fmgc.FMGCInternal.altFuelSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -93,21 +115,26 @@ var initInputB = func(key, i) {
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "L5" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "L5" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.finalFuel = 0.0;
fmgc.FMGCInternal.finalTime = "0030";
fmgc.FMGCInternal.finalFuelSet = 0;
fmgc.FMGCInternal.finalTimeSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 4 and tf != nil and tf >= 0 and tf <= 10.0) {
fmgc.FMGCInternal.finalFuel = tf;
fmgc.FMGCInternal.finalFuelSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
@ -118,25 +145,31 @@ var initInputB = func(key, i) {
if (tfs == 4 and tf != nil and ((tf >= 0 and tf <= 59) or (tf >= 100 and tf <= 130))) {
fmgc.FMGCInternal.finalTime = scratchpad;
fmgc.FMGCInternal.finalTimeSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
}
}
} else if (key == "L6" and getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "L6" and fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.minDestFob = 0;
fmgc.FMGCInternal.minDestFobSet = 0;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
} else if (find(".", scratchpad) != -1) {
var tf = num(scratchpad);
if (acconfig_weight_kgs.getValue() == 1) {
tf = tf / LBS2KGS;
}
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 5 and tf != nil and tf >= 0 and tf <= 80.0) {
fmgc.FMGCInternal.minDestFob = tf;
fmgc.FMGCInternal.minDestFobSet = 1;
setprop("/FMGC/internal/fuel-calculating", 1);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
mcdu_scratchpad.scratchpads[i].empty();
if (fmgc.FMGCInternal.minDestFob < fmgc.FMGCInternal.finalFuel + fmgc.FMGCInternal.altFuel) {
mcdu_message(i, "CHECK MIN DEST FOB");
@ -147,29 +180,37 @@ var initInputB = func(key, i) {
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "R1" and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "R1" and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
mcdu_message(i, "NOT ALLOWED");
} else {
var zfw_min = 80.6; #make based on performance
var zfw_max = 134.5; #61,000 kg, make based on performance
if (size(scratchpad) == 0) {
var zfw = getprop("/fdm/jsbsim/inertia/weight-lbs") - getprop("/consumables/fuel/total-fuel-lbs");
var zfw = pts.Fdm.JSBsim.Inertia.weightLbs.getValue() - pts.Consumables.Fuel.totalFuelLbs.getValue();
fmgc.FMGCInternal.zfw = sprintf("%3.1f", math.round(zfw / 1000, 0.1));
fmgc.FMGCInternal.zfwSet = 1;
if (!getprop("/FMGC/internal/block-confirmed") and fmgc.FMGCInternal.blockSet) {
if (!fmgc.FMGCInternal.blockConfirmed and fmgc.FMGCInternal.blockSet) {
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
} else if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
} else if (getprop("/FMGC/internal/fuel-request-set")) {
setprop("/FMGC/internal/block-calculating", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else if (fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else if (find("/", scratchpad) != -1) {
if (acconfig_weight_kgs.getValue() == 1) {
scratchpad = scratchpad / LBS2KGS;
}
var zfwi = split("/", scratchpad);
var zfw = num(zfwi[0]);
var zfwcg = num(zfwi[1]);
@ -181,16 +222,20 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.zfwSet = 1;
fmgc.FMGCInternal.zfwcg = zfwcg;
fmgc.FMGCInternal.zfwcgSet = 1;
if (!getprop("/FMGC/internal/block-confirmed") and fmgc.FMGCInternal.blockSet) {
if (!fmgc.FMGCInternal.blockConfirmed and fmgc.FMGCInternal.blockSet) {
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
} else if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
} else if (getprop("/FMGC/internal/fuel-request-set")) {
setprop("/FMGC/internal/block-calculating", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else if (fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -208,19 +253,26 @@ var initInputB = func(key, i) {
mcdu_message(i, "NOT ALLOWED");
}
} else if (num(scratchpad) != nil and size(scratchpad) > 0 and size(scratchpad) <= 5 and (find(".", scratchpad) == -1 or size(split(".", scratchpad)[1]) <= 1)) {
if (acconfig_weight_kgs.getValue() == 1) {
scratchpad = scratchpad / LBS2KGS;
}
if (scratchpad >= zfw_min and scratchpad <= zfw_max) {
fmgc.FMGCInternal.zfw = scratchpad;
fmgc.FMGCInternal.zfwSet = 1;
if (!getprop("/FMGC/internal/block-confirmed") and fmgc.FMGCInternal.blockSet) {
if (!fmgc.FMGCInternal.blockConfirmed and fmgc.FMGCInternal.blockSet) {
fmgc.FMGCInternal.tow = fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel;
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
} else if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
} else if (getprop("/FMGC/internal/fuel-request-set")) {
setprop("/FMGC/internal/block-calculating", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
} else if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else if (fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -237,7 +289,7 @@ var initInputB = func(key, i) {
fmgc.FMGCNodes.costIndex.setValue(fmgc.FMGCInternal.costIndex);
}
}
} else if (key == "R2" and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "R2" and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.block = 0.0;
fmgc.FMGCInternal.blockSet = 0;
@ -265,34 +317,44 @@ var initInputB = func(key, i) {
fmgc.FMGCInternal.fffqSensor = "FF+FQ";
fmgc.FMGCInternal.extraFuel = 0;
fmgc.FMGCInternal.extraTime = "0000";
setprop("/FMGC/internal/fuel-request-set", 0);
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 0);
fmgc.FMGCInternal.fuelRequest = 0;
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 0;
mcdu_scratchpad.scratchpads[i].empty();
} else {
var tfs = size(scratchpad);
var maxblock = getprop("/options/maxblock");
if (tfs == 0) {
fmgc.FMGCInternal.block = sprintf("%3.1f", math.round(getprop("/consumables/fuel/total-fuel-lbs") / 1000, 0.1));
fmgc.FMGCInternal.block = sprintf("%3.1f", math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1));
fmgc.FMGCInternal.blockSet = 1;
if (fmgc.FMGCInternal.zfwSet) {
fmgc.FMGCInternal.tow = num(fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel);
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
}
} else if (tfs >= 1 and tfs <= 5) {
if (acconfig_weight_kgs.getValue() == 1) {
scratchpad = scratchpad / LBS2KGS;
}
if (num(scratchpad) != nil and scratchpad >= 1.0 and scratchpad <= maxblock) {
fmgc.FMGCInternal.block = scratchpad;
fmgc.FMGCInternal.blockSet = 1;
if (fmgc.FMGCInternal.zfwSet) {
fmgc.FMGCInternal.tow = num(fmgc.FMGCInternal.zfw + fmgc.FMGCInternal.block - fmgc.FMGCInternal.taxiFuel);
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
setprop("/FMGC/internal/block-calculating", 0);
setprop("/FMGC/internal/block-confirmed", 1);
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
fmgc.FMGCInternal.blockCalculating = 0;
fmgc.blockCalculating.setValue(0);
fmgc.FMGCInternal.blockConfirmed = 1;
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -303,21 +365,24 @@ var initInputB = func(key, i) {
}
}
} else if (key == "R3") {
if (scratchpad == "" and fmgc.FMGCInternal.zfwSet and !getprop("/FMGC/internal/fuel-request-set")) {
setprop("/FMGC/internal/fuel-request-set", 1);
setprop("/FMGC/internal/block-calculating", 1);
} else if (scratchpad == "" and fmgc.FMGCInternal.zfwSet and getprop("/FMGC/internal/fuel-request-set") and !getprop("/FMGC/internal/block-confirmed") and !getprop("/FMGC/internal/block-calculating")) {
setprop("/FMGC/internal/block-confirmed", 1);
setprop("/FMGC/internal/fuel-calculating", 1);
if (scratchpad == "" and fmgc.FMGCInternal.zfwSet and !fmgc.FMGCInternal.fuelRequest) {
fmgc.FMGCInternal.fuelRequest = 1;
fmgc.FMGCInternal.blockCalculating = 1;
fmgc.blockCalculating.setValue(1);
} else if (scratchpad == "" and fmgc.FMGCInternal.zfwSet and fmgc.FMGCInternal.fuelRequest and !fmgc.FMGCInternal.blockConfirmed and !fmgc.FMGCInternal.blockCalculating) {
fmgc.FMGCInternal.blockConfirmed = 1;
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "R5" and !getprop("/FMGC/internal/fuel-calculating")) {
} else if (key == "R5" and !fmgc.FMGCInternal.fuelCalculating) {
if (scratchpad == "CLR") {
fmgc.FMGCInternal.tripWind = "HD000";
fmgc.FMGCInternal.tripWindValue = 0;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -326,8 +391,9 @@ var initInputB = func(key, i) {
if (int(effwind) != nil and effwind >= 0 and effwind <= 500) {
fmgc.FMGCInternal.tripWind = scratchpad;
fmgc.FMGCInternal.tripWindValue = effwind;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -338,8 +404,9 @@ var initInputB = func(key, i) {
if (int(effwind) != nil and effwind >= 0 and effwind <= 500) {
fmgc.FMGCInternal.tripWind = scratchpad;
fmgc.FMGCInternal.tripWindValue = effwind;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -349,8 +416,9 @@ var initInputB = func(key, i) {
if (num(scratchpad) != nil and scratchpad >= 0 and scratchpad <= 500) {
fmgc.FMGCInternal.tripWind = scratchpad;
fmgc.FMGCInternal.tripWindValue = scratchpad;
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
mcdu_scratchpad.scratchpads[i].empty();
} else {

View file

@ -82,17 +82,17 @@ var initInputIRS = func(key, i) {
} else if (key == "R6") {
setprop("FMGC/internal/align-ref-lat-edit", 0);
setprop("FMGC/internal/align-ref-long-edit", 0);
if (fmgc.FMGCInternal.toFromSet and getprop("systems/navigation/adr/any-adr-on") == 1) {
if (fmgc.FMGCInternal.toFromSet and getprop("/systems/navigation/adr/any-adr-on") == 1) {
if (getprop("FMGC/internal/align-set") == 0) {
setprop("FMGC/internal/align-set", 1);
} else {
setprop("controls/adirs/mcducbtn", 1);
setprop("/controls/adirs/mcducbtn", 1);
setprop("FMGC/internal/align-set", 0);
setprop("MCDU[" ~ i ~ "]/page", "INITA");
}
} else if (!fmgc.FMGCInternal.toFromSet) {
# setprop("MCDU[" ~ i ~ "]/scratchpad", "SELECT REFERENCE");
} else if (getprop("systems/navigation/adr/any-adr-on") == 0) {
} else if (getprop("/systems/navigation/adr/any-adr-on") == 0) {
# setprop("MCDU[" ~ i ~ "]/scratchpad", "IRS NOT ALIGNED");
} else {
mcdu_message(i, "NOT ALLOWED");

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,6 @@
# Copyright (c) 2020 Matthew Maring (mattmaring)
# APPR PERF
var ldg_config_3_set = props.globals.getNode("/FMGC/internal/ldg-config-3-set", 1);
var ldg_config_f_set = props.globals.getNode("/FMGC/internal/ldg-config-f-set", 1);
var perfAPPRInput = func(key, i) {
var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad;
@ -77,10 +75,10 @@ var perfAPPRInput = func(key, i) {
}
} else if (key == "L5") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vapp-speed-set", 0);
fmgc.FMGCInternal.vappSpeedSet = 0;
mcdu_scratchpad.scratchpads[i].empty();
} else if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 350) {
setprop("/FMGC/internal/vapp-speed-set", 1);
fmgc.FMGCInternal.vappSpeedSet = 1;
fmgc.FMGCInternal.vapp_appr = scratchpad;
mcdu_scratchpad.scratchpads[i].empty();
} else {
@ -93,7 +91,7 @@ var perfAPPRInput = func(key, i) {
setprop("/FMGC/internal/baro", 99999);
mcdu_scratchpad.scratchpads[i].empty();
} else if (int(scratchpad) != nil and scratchpad >= getprop("/FMGC/internal/ldg-elev") and scratchpad <= 5000 + getprop("/FMGC/internal/ldg-elev")) {
if (getprop("/FMGC/internal/radio-no") == 0) {
if (!fmgc.FMGCInternal.radioNo) {
setprop("/FMGC/internal/radio", 99999);
}
setprop("/FMGC/internal/baro", scratchpad);
@ -104,31 +102,31 @@ var perfAPPRInput = func(key, i) {
} else if (key == "R3") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/radio", 99999);
setprop("/FMGC/internal/radio-no", 0);
fmgc.FMGCInternal.radioNo = 0;
mcdu_scratchpad.scratchpads[i].empty();
} else if (scratchpad == "NO") {
setprop("/FMGC/internal/radio", 99999);
setprop("/FMGC/internal/radio-no", 1);
fmgc.FMGCInternal.radioNo = 1;
mcdu_scratchpad.scratchpads[i].empty();
} else if (int(scratchpad) != nil and scratchpad >= 0 and scratchpad <= 700) {
setprop("/FMGC/internal/baro", 99999);
setprop("/FMGC/internal/radio-no", 0);
fmgc.FMGCInternal.radioNo = 0;
setprop("/FMGC/internal/radio", scratchpad);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "R4") {
if (scratchpad == "" and ldg_config_f_set.getValue() == 1 and ldg_config_3_set.getValue() == 0) {
setprop("/FMGC/internal/ldg-config-3-set", 1);
setprop("/FMGC/internal/ldg-config-f-set", 0);
if (scratchpad == "" and fmgc.FMGCInternal.ldgConfigFull == 1 and fmgc.FMGCInternal.ldgConfig3 == 0) {
fmgc.FMGCInternal.ldgConfig3 = 1;
fmgc.FMGCInternal.ldgConfigFull = 0;
} else {
mcdu_message(i, "NOT ALLOWED");
}
} else if (key == "R5") {
if (scratchpad == "" and ldg_config_3_set.getValue() == 1 and ldg_config_f_set.getValue() == 0) {
setprop("/FMGC/internal/ldg-config-3-set", 0);
setprop("/FMGC/internal/ldg-config-f-set", 1);
if (scratchpad == "" and fmgc.FMGCInternal.ldgConfig3 == 1 and fmgc.FMGCInternal.ldgConfigFull == 0) {
fmgc.FMGCInternal.ldgConfig3 = 0;
fmgc.FMGCInternal.ldgConfigFull = 1;
} else {
mcdu_message(i, "NOT ALLOWED");
}

View file

@ -6,7 +6,7 @@ var perfGAInput = func(key, i) {
var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad;
if (key == "L5") {
if (scratchpad == "CLR") {
setprop("systems/thrust/clbreduc-ft", 1500);
setprop("/systems/thrust/clbreduc-ft", 1500);
setprop("/FMGC/internal/accel-agl-ft", 1500);
setprop("MCDUC/thracc-set", 0);
mcdu_scratchpad.scratchpads[i].empty();
@ -17,7 +17,7 @@ var perfGAInput = func(key, i) {
var thrred = size(thracc[0]);
var acc = size(thracc[1]);
if (int(thrred) != nil and int(acc) != nil and (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/accel-agl-ft", thracc[1]);
setprop("MCDUC/thracc-set", 1);
mcdu_scratchpad.scratchpads[i].empty();

View file

@ -100,7 +100,7 @@ var perfTOInput = func(key, i) {
}
} else if (key == "L5") {
if (scratchpad == "CLR") {
setprop("systems/thrust/clbreduc-ft", 1500);
setprop("/systems/thrust/clbreduc-ft", 1500);
setprop("/FMGC/internal/accel-agl-ft", 1500);
setprop("MCDUC/thracc-set", 0);
mcdu_scratchpad.scratchpads[i].empty();
@ -113,7 +113,7 @@ var perfTOInput = func(key, i) {
var acc = thracc[1];
var accs = size(acc);
if (int(thrred) != nil and (thrreds >= 3 and thrreds <= 5) and thrred >= 400 and thrred <= 39000 and int(acc) != nil and (accs == 3 or accs == 4 or accs == 5) and acc >= 400 and acc <= 39000) {
setprop("systems/thrust/clbreduc-ft", int(thrred / 10) * 10);
setprop("/systems/thrust/clbreduc-ft", int(thrred / 10) * 10);
setprop("/FMGC/internal/accel-agl-ft", int(acc / 10) * 10);
setprop("MCDUC/thracc-set", 1);
mcdu_scratchpad.scratchpads[i].empty();
@ -124,7 +124,7 @@ var perfTOInput = func(key, i) {
mcdu_message(i, "NOT ALLOWED");
}
} else if (num(scratchpad) != nil and (tfs >= 3 and tfs <= 5) and scratchpad >= 400 and scratchpad <= 39000) {
setprop("systems/thrust/clbreduc-ft", int(scratchpad / 10) * 10);
setprop("/systems/thrust/clbreduc-ft", int(scratchpad / 10) * 10);
mcdu_scratchpad.scratchpads[i].empty();
} else {
mcdu_message(i, "NOT ALLOWED");

View file

@ -4,7 +4,7 @@
var radnavInput = func(key, i) {
var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad;
if (!getprop("systems/radio/rmp[0]/nav") and !getprop("systems/radio/rmp[1]/nav")) {
if (!getprop("/systems/radio/rmp[0]/nav") and !getprop("/systems/radio/rmp[1]/nav")) {
if (key == "L1") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vor1freq-set", 0);

View file

@ -178,9 +178,11 @@ var windCLBPage = {
} else {
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();
@ -316,9 +318,11 @@ var windCLBPage = {
} else {
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();

View file

@ -269,9 +269,11 @@ var windCRZPage = {
} else {
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();
@ -504,9 +506,11 @@ var windCRZPage = {
} else {
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();

View file

@ -2,6 +2,9 @@
# Copyright (c) 2020 Matthew Maring (mattmaring)
var wind = nil;
var magVar = nil;
var windDESPage = {
title: nil,
titleColour: "wht",
@ -188,17 +191,18 @@ var windDESPage = {
me.updateTmpy();
},
returnGRND: func() {
var wind = fmgc.windController.des_winds[2];
wind = fmgc.windController.des_winds[2];
magVar = pts.Environment.magVar.getValue();
if (wind.wind5.altitude == "GRND") {
return [geo.normdeg(wind.wind5.heading - getprop("/environment/magnetic-variation-deg")), wind.wind5.magnitude];
return [geo.normdeg(wind.wind5.heading - magVar), wind.wind5.magnitude];
} else if (wind.wind4.altitude == "GRND") {
return [geo.normdeg(wind.wind4.heading - getprop("/environment/magnetic-variation-deg")), wind.wind4.magnitude];
return [geo.normdeg(wind.wind4.heading - magVar), wind.wind4.magnitude];
} else if (wind.wind3.altitude == "GRND") {
return [geo.normdeg(wind.wind3.heading - getprop("/environment/magnetic-variation-deg")), wind.wind3.magnitude];
return [geo.normdeg(wind.wind3.heading - magVar), wind.wind3.magnitude];
} else if (wind.wind2.altitude == "GRND") {
return [geo.normdeg(wind.wind2.heading - getprop("/environment/magnetic-variation-deg")), wind.wind2.magnitude];
return [geo.normdeg(wind.wind2.heading - magVar), wind.wind2.magnitude];
} else if (wind.wind1.altitude == "GRND") {
return [geo.normdeg(wind.wind1.heading - getprop("/environment/magnetic-variation-deg")), wind.wind1.magnitude];
return [geo.normdeg(wind.wind1.heading - magVar), wind.wind1.magnitude];
} else {
return nil;
}
@ -210,9 +214,11 @@ var windDESPage = {
} else {
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();
@ -382,9 +388,11 @@ var windDESPage = {
} else {
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1);
# push update to fuel
if (getprop("/FMGC/internal/block-confirmed")) {
setprop("/FMGC/internal/fuel-calculating", 0);
setprop("/FMGC/internal/fuel-calculating", 1);
if (fmgc.FMGCInternal.blockConfirmed) {
fmgc.FMGCInternal.fuelCalculating = 0;
fmgc.fuelCalculating.setValue(0);
fmgc.FMGCInternal.fuelCalculating = 1;
fmgc.fuelCalculating.setValue(1);
}
}
me.reload();

View file

@ -5,9 +5,9 @@
var SwitchingPanel = {
Switches: {
attHdg: props.globals.getNode("controls/navigation/switching/att-hdg"),
airData: props.globals.getNode("controls/navigation/switching/air-data"),
eisDmc: props.globals.getNode("controls/navigation/switching/eis-dmc"),
attHdg: props.globals.getNode("/controls/navigation/switching/att-hdg"),
airData: props.globals.getNode("/controls/navigation/switching/air-data"),
eisDmc: props.globals.getNode("/controls/navigation/switching/eis-dmc"),
},
doAirData: func(newAirData) {

View file

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

View file

@ -6,7 +6,7 @@
var idCode = props.globals.getNode("instrumentation/transponder/id-code", 1);
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 altimeter = props.globals.initNode("/instrumentation/transponder/altimeter-input-src", 0, "INT");
@ -24,10 +24,10 @@ var Transponder = {
serviceableNode: props.globals.getNode("instrumentation/transponder/serviceable", 1),
knobNode: props.globals.getNode("instrumentation/transponder/inputs/knob-mode", 1),
identNode: props.globals.getNode("instrumentation/transponder/inputs/ident-btn", 1),
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"),
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) {
var t = {parents:[Transponder]};
t.mode = 1;
@ -145,7 +145,7 @@ var transponderPanel = {
failLight: 0,
clearFlag: 0,
keypad: func(keyNum) {
if (props.globals.getNode("controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("systems/electrical/bus/dc-ess", 1).getValue() < 25) {
if (props.globals.getNode("/controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("/systems/electrical/bus/dc-ess", 1).getValue() < 25) {
return;
}
if (keyNum < 0 or keyNum > 7) {
@ -163,7 +163,7 @@ var transponderPanel = {
}
},
clearKey: func() {
if (props.globals.getNode("controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("systems/electrical/bus/dc-ess", 1).getValue() < 25) {
if (props.globals.getNode("/controls/switches/annun-test", 1).getBoolValue() or props.globals.getNode("/systems/electrical/bus/dc-ess", 1).getValue() < 25) {
return;
}
if (me.codeDisp != "") {
@ -215,7 +215,7 @@ var transponderPanel = {
return;
}
me.failLight = newFail;
props.globals.getNode("systems/atc/failed").setBoolValue(me.failLight);
props.globals.getNode("/systems/atc/failed").setBoolValue(me.failLight);
},
identSwitch: func() {
Transponders.vector[me.atcSel - 1].ident();

View file

@ -4,200 +4,244 @@
var chr = aircraft.timer.new("instrumentation/chrono[0]/elapsetime-sec",1);
var clk = aircraft.timer.new("instrumentation/clock/elapsetime-sec",1);
var chr_min = nil;
var chr_sec = nil;
var chr_tmp = nil;
var clock2_1 = nil;
var clock2_2 = nil;
var day = nil;
var et_hr = nil;
var et_min = nil;
var et_tmp = nil;
var month = nil;
var rudder_val = nil;
var tmp = nil;
var tmp1 = nil;
var UTC_date = nil;
var UTC_date1 = nil;
var UTC_date2 = nil;
var UTC_date3 = nil;
var year = nil;
var et_selector = props.globals.initNode("/instrumentation/clock/et-selector", 1, "INT");
var utc_selector = props.globals.initNode("/instrumentation/clock/utc-selector",0,"INT");
var set_knob = props.globals.initNode("/instrumentation/clock/set-knob",0,"INT");
var clock = {
elapsedHour: props.globals.initNode("/instrumentation/clock/et-hr", 0, "INT"),
elapsedMin: props.globals.initNode("/instrumentation/clock/et-min", 0, "INT"),
elapsedString: props.globals.initNode("/instrumentation/clock/elapsed-string", 0, "STRING"),
elapsedSec: props.globals.initNode("/instrumentation/clock/elapsetime-sec", 0, "INT"),
indicatedSec: props.globals.getNode("/instrumentation/clock/indicated-seconds"),
hhMM: props.globals.initNode("/instrumentation/clock/clock_hh_mm", 0, "STRING"),
utcDate: [props.globals.initNode("/instrumentation/clock/utc-date", "", "STRING"), props.globals.initNode("/instrumentation/clock/utc-date1", "", "STRING"),
props.globals.initNode("/instrumentation/clock/utc-date2", "", "STRING"),props.globals.initNode("/instrumentation/clock/utc-date3", "", "STRING")],
};
var chrono = {
chronoReset: props.globals.initNode("/instrumentation/chrono[0]/chrono-reset", 1, "INT"),
elapseTime: props.globals.initNode("/instrumentation/chrono[0]/elapsetime-sec", 0, "INT"),
etMin: props.globals.initNode("/instrumentation/chrono[0]/chr-et-min", 0, "INT"),
etSec: props.globals.initNode("/instrumentation/chrono[0]/chr-et-sec", 0, "INT"),
etString: props.globals.initNode("/instrumentation/chrono[0]/chr-et-string", 0, "STRING"),
paused: props.globals.getNode("/instrumentation/chrono[0]/paused"),
started: props.globals.getNode("/instrumentation/chrono[0]/started"),
};
var rudderTrim = {
rudderTrimDisplay: props.globals.initNode("/controls/flight/rudder-trim-display", 0, "STRING"),
rudderTrimDisplayLetter: props.globals.initNode("/controls/flight/rudder-trim-letter-display", "", "STRING"),
};
setlistener("sim/signals/fdm-initialized", func {
chr.stop();
chr.reset();
clk.stop();
clk.reset();
props.globals.initNode("instrumentation/clock/clock_hh_mm", 0,"STRING");
props.globals.initNode("instrumentation/clock/indicated-string",0,"STRING");
props.globals.initNode("instrumentation/clock/elapsed-string",0,"STRING");
props.globals.initNode("instrumentation/clock/elapsetime-sec",0,"INT");
props.globals.initNode("instrumentation/clock/et-selector",1,"INT");
props.globals.initNode("instrumentation/clock/utc-selector",0,"INT");
props.globals.initNode("instrumentation/clock/set-knob",0,"INT");
props.globals.initNode("instrumentation/clock/et-hr",0,"INT");
props.globals.initNode("instrumentation/clock/et-min",0,"INT");
props.globals.initNode("instrumentation/chrono[0]/chr-et-string",0,"STRING");
props.globals.initNode("instrumentation/chrono[0]/elapsetime-sec",0,"INT");
props.globals.initNode("instrumentation/chrono[0]/chrono-reset",1,"INT");
props.globals.initNode("instrumentation/chrono[0]/chr-et-min",0,"INT");
props.globals.initNode("instrumentation/chrono[0]/chr-et-sec",0,"INT");
props.globals.initNode("controls/flight/rudder-trim-display",0,"STRING");
setprop("/controls/flight/rudder-trim-display", sprintf("%2.1f", getprop("fdm/jsbsim/hydraulics/rudder/trim-deg")));
rudderTrim.rudderTrimDisplay.setValue(sprintf("%2.1f", pts.Fdm.JSBsim.Hydraulics.Rudder.trimDeg.getValue()));
start_loop.start();
});
setlistener("instrumentation/chrono[0]/chrono-reset", func(et){
var tmp = et.getValue();
setlistener("/instrumentation/chrono[0]/chrono-reset", func(et){
tmp = et.getValue();
if (tmp == 2) {
if (getprop("instrumentation/chrono[0]/started") == 1) {
if (getprop("instrumentation/chrono[0]/paused") == 0) {
setprop("/instrumentation/chrono[0]/elapsetime-sec", 0);
setprop("/instrumentation/chrono[0]/chrono-reset", 0);
if (chrono.started.getBoolValue()) {
if (!chrono.paused.getBoolValue()) {
chrono.elapseTime.setValue(0);
chrono.chronoReset.setBoolValue(0);
} else {
chr.stop();
chr.reset();
setprop("/instrumentation/chrono[0]/chrono-reset", 1);
setprop("/instrumentation/chrono[0]/started", 0);
setprop("/instrumentation/chrono[0]/paused", 0);
chrono.chronoReset.setBoolValue(1);
chrono.started.setBoolValue(0);
chrono.paused.setBoolValue(0);
};
} else {
if (getprop("instrumentation/chrono[0]/paused") == 0) {
if (!chrono.paused.getBoolValue()) {
# No action required
} else {
setprop("/instrumentation/chrono[0]/paused", 0);
chrono.paused.setBoolValue(0);
};
};
} elsif (tmp == 1) {
if (getprop("instrumentation/chrono[0]/started") == 1) {
if (getprop("instrumentation/chrono[0]/paused") == 0) {
if (chrono.started.getBoolValue()) {
if (!chrono.paused.getBoolValue()) {
chr.stop();
setprop("/instrumentation/chrono[0]/paused", 1);
chrono.paused.setBoolValue(1);
} else {
chr.stop();
};
} else {
if (getprop("instrumentation/chrono[0]/paused") == 0) {
if (!chrono.paused.getBoolValue()) {
chr.stop();
} else {
chr.stop();
setprop("/instrumentation/chrono[0]/paused", 0);
chrono.paused.setBoolValue(0);
};
};
} elsif (tmp == 0) {
if (getprop("instrumentation/chrono[0]/started") == 0) {
if (getprop("instrumentation/chrono[0]/paused") == 0) {
if (!chrono.started.getBoolValue()) {
if (!chrono.paused.getBoolValue()) {
chr.start();
setprop("/instrumentation/chrono[0]/started", 1);
chrono.started.setBoolValue(1);
} else {
chr.start();
setprop("/instrumentation/chrono[0]/paused", 0);
chrono.paused.setBoolValue(0);
};
} else {
if (getprop("instrumentation/chrono[0]/paused") == 0) {
if (!chrono.paused.getBoolValue()) {
# No action required
} else {
chr.start();
setprop("/instrumentation/chrono[0]/paused", 0);
chrono.paused.setBoolValue(0);
};
};
};
},0,0);
}, 0, 0);
setlistener("instrumentation/clock/et-selector", func(et){
var tmp1 = et.getValue();
if(tmp1 == 2){
tmp1 = et.getValue();
if (tmp1 == 2){
clk.reset();
}elsif(tmp1==1){
} elsif (tmp1 == 1){
clk.stop();
}elsif(tmp1==0){
} elsif (tmp1 == 0){
clk.start();
}
},0,0);
}, 0, 0);
var start_loop = maketimer(0.1, func {
if (systems.ELEC.Bus.dcEss.getValue() < 25) { return; }
# Annun-test
if (getprop("controls/switches/annun-test") == 1) {
var UTC_date = sprintf("%02d %02d %02d", "88", "88", "88");
var UTC_date1 = sprintf("%02d", "88");
var UTC_date2 = sprintf("%02d", "88");
var UTC_date3 = sprintf("%02d", "88");
var clock2_1 = "88:88";
var clock2_2 = sprintf("%02d", 88);
setprop("/instrumentation/clock/clock_hh_mm", clock2_1);
setprop("/instrumentation/clock/indicated-seconds", clock2_2);
setprop("/instrumentation/clock/utc-date", UTC_date);
setprop("/instrumentation/clock/utc-date1", UTC_date1);
setprop("/instrumentation/clock/utc-date2", UTC_date2);
setprop("/instrumentation/clock/utc-date3", UTC_date3);
setprop("/instrumentation/chrono[0]/chr-et-string", "88 88");
setprop("/instrumentation/clock/elapsed-string", "88:88");
if (pts.Controls.Switches.annunTest.getBoolValue()) {
UTC_date = sprintf("%02d %02d %02d", "88", "88", "88");
UTC_date1 = sprintf("%02d", "88");
UTC_date2 = sprintf("%02d", "88");
UTC_date3 = sprintf("%02d", "88");
clock2_1 = "88:88";
clock2_2 = sprintf("%02d", 88);
clock.hhMM.setValue(clock2_1);
clock.indicatedSec.setValue(clock2_2);
clock.utcDate[0].setValue(UTC_date);
clock.utcDate[1].setValue(UTC_date1);
clock.utcDate[2].setValue(UTC_date2);
clock.utcDate[3].setValue(UTC_date3);
chrono.etString.setValue("88 88");
clock.elapsedString.setValue("88:88");
} else {
day = pts.Sim.Time.UTC.day.getValue();
month = pts.Sim.Time.UTC.month.getValue();
year = pts.Sim.Time.UTC.year.getValue();
# Clock
var UTC_date = sprintf("%02d %02d %02d", getprop("sim/time/utc/month"), getprop("sim/time/utc/day"), substr(sprintf("%2d", getprop("sim/time/utc/year")),1,2));
setprop("/instrumentation/clock/utc-date", UTC_date);
var UTC_date1 = sprintf("%02d", getprop("sim/time/utc/month"));
var UTC_date2 = sprintf("%02d", getprop("sim/time/utc/day"));
var UTC_date3 = substr(sprintf("%2d", getprop("sim/time/utc/year")),2,2);
var clock2_1 = getprop("instrumentation/clock/indicated-short-string");
var clock2_2 = sprintf("%02d", substr(getprop("instrumentation/clock/indicated-string"),6,2));
setprop("/instrumentation/clock/clock_hh_mm", clock2_1);
setprop("/instrumentation/clock/indicated-seconds", clock2_2);
setprop("/instrumentation/clock/utc-date", UTC_date);
setprop("/instrumentation/clock/utc-date1", UTC_date1);
setprop("/instrumentation/clock/utc-date2", UTC_date2);
setprop("/instrumentation/clock/utc-date3", UTC_date3);
if (getprop("instrumentation/clock/set-knob") == "") {
setprop("/instrumentation/clock/set-knob", 0);
};
if (getprop("instrumentation/clock/utc-selector") == "") {
setprop("/instrumentation/clock/utc-selector", 0);
};
# if (getprop("instrumentation/clock/utc-selector") == 0) {
UTC_date = sprintf("%02d %02d %02d", month, day, substr(sprintf("%2d", year),1,2));
UTC_date1 = sprintf("%02d", month);
UTC_date2 = sprintf("%02d", day);
UTC_date3 = substr(sprintf("%2d", year),2,2);
clock2_1 = pts.Instrumentation.Clock.indicatedStringShort.getValue();
clock2_2 = sprintf("%02d", substr(pts.Instrumentation.Clock.indicatedString.getValue(),6,2));
clock.hhMM.setValue(clock2_1);
clock.indicatedSec.setValue(clock2_2);
clock.utcDate[0].setValue(UTC_date);
clock.utcDate[1].setValue(UTC_date1);
clock.utcDate[2].setValue(UTC_date2);
clock.utcDate[3].setValue(UTC_date3);
if (set_knob.getValue() == "") {
set_knob.setValue(0);
}
if (utc_selector.getValue() == "") {
utc_selector.setValue(0);
}
# if (getprop("/instrumentation/clock/utc-selector") == 0) {
# # To do - GPS mode
# };
# if (getprop("instrumentation/clock/utc-selector") == 1) {
# if (getprop("/instrumentation/clock/utc-selector") == 1) {
# # To do - INT mode
# };
# if (getprop("instrumentation/clock/utc-selector") == 2) {
# if (getprop("/instrumentation/clock/utc-selector") == 2) {
# # To do - SET mode
# };
# Chrono
var chr_tmp = getprop("instrumentation/chrono[0]/elapsetime-sec");
chr_tmp = chrono.elapseTime.getValue();
if (chr_tmp >= 6000) {
setprop("/instrumentation/chrono[0]/elapsetime-sec", chr_tmp-6000);
};
var chr_min = int(chr_tmp * 0.0166666666667);
chrono.elapseTime.setValue(chr_tmp - 6000);
}
chr_min = int(chr_tmp * 0.0166666666667);
if (chr_tmp >= 60) {
var chr_sec = int(chr_tmp - (chr_min * 60));
chr_sec = int(chr_tmp - (chr_min * 60));
} else {
var chr_sec = int(chr_tmp);
};
setprop("/instrumentation/chrono[0]/chr-et-min",chr_min);
setprop("/instrumentation/chrono[0]/chr-et-sec",chr_sec);
chr_tmp = sprintf("%02d:%02d", chr_min, chr_sec);
setprop("/instrumentation/chrono[0]/chr-et-string", chr_tmp);
chr_sec = int(chr_tmp);
}
chrono.etMin.setValue(chr_min);
chrono.etSec.setValue(chr_sec);
chrono.etString.setValue(sprintf("%02d:%02d", chr_min, chr_sec));
# ET clock
var et_tmp = getprop("instrumentation/clock/elapsetime-sec");
et_tmp = clock.elapsedSec.getValue();
if (et_tmp >= 360000) {
setprop("/instrumentation/clock/elapsetime-sec", et_tmp-360000);
};
var et_min = int(et_tmp * 0.0166666666667);
var et_hr = int(et_min * 0.0166666666667);
clock.elapsedSec.setValue(et_tmp - 360000);
}
et_min = int(et_tmp * 0.0166666666667);
et_hr = int(et_min * 0.0166666666667);
et_min = et_min - (et_hr * 60);
setprop("/instrumentation/clock/et-hr",et_hr);
setprop("/instrumentation/clock/et-min",et_min);
et_tmp = sprintf("%02d:%02d", et_hr, et_min);
setprop("/instrumentation/clock/elapsed-string", et_tmp);
clock.elapsedHour.setValue(et_hr);
clock.elapsedMin.setValue(et_min);
clock.elapsedString.setValue(sprintf("%02d:%02d", et_hr, et_min));
foreach (item; update_items) {
item.update(nil);
}
};
}
});
var updateRudderTrim = func() {
var rudder_val = getprop("fdm/jsbsim/hydraulics/rudder/trim-deg");
if (getprop("/controls/switches/annun-test") == 1) {
setprop("/controls/flight/rudder-trim-display", sprintf("%3.1f", "88.8"));
setprop("/controls/flight/rudder-trim-letter-display", sprintf("%1.0f", "8"));
if (pts.Controls.Switches.annunTest.getBoolValue()) {
rudderTrim.rudderTrimDisplay.setValue(sprintf("%3.1f", "88.8"));
rudderTrim.rudderTrimDisplayLetter.setValue(sprintf("%1.0f", "8"));
} else {
rudder_val = pts.Fdm.JSBsim.Hydraulics.Rudder.trimDeg.getValue();
if (rudder_val > -0.05 and rudder_val < 0.05) {
setprop("/controls/flight/rudder-trim-display", sprintf("%2.1f", abs(rudder_val)));
setprop("/controls/flight/rudder-trim-letter-display", "");
rudderTrim.rudderTrimDisplay.setValue(sprintf("%2.1f", abs(rudder_val)));
rudderTrim.rudderTrimDisplayLetter.setValue("");
} else {
rudderTrim.rudderTrimDisplay.setValue(sprintf("%2.1f", abs(rudder_val)));
if (rudder_val >= 0.05) {
setprop("/controls/flight/rudder-trim-display", sprintf("%2.1f", abs(rudder_val)));
setprop("/controls/flight/rudder-trim-letter-display", "R");
} else {
if (rudder_val <= -0.05) {
setprop("/controls/flight/rudder-trim-display", sprintf("%2.1f", abs(rudder_val)));
setprop("/controls/flight/rudder-trim-letter-display", "L");
}
rudderTrim.rudderTrimDisplayLetter.setValue("R");
} elsif (rudder_val <= -0.05) {
rudderTrim.rudderTrimDisplayLetter.setValue("L");
}
}
}

View file

@ -395,23 +395,23 @@ var update_chan_sel = func(rmp_no) {
var transfer = func(rmp_no) {
rmp_no = rmp_no - 1;
var sel_chan = getprop("systems/radio/rmp[" ~ rmp_no ~ "]/sel_chan");
var sel_crs = getprop("systems/radio/rmp[" ~ rmp_no ~ "]/select-crs");
var sel_chan = getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/sel_chan");
var sel_crs = getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs");
if (string.match(sel_chan, "vhf[1-3]")) {
var mod1 = int(string.replace(sel_chan, "vhf", ""));
var mod = mod1 - 1;
var mem = getprop("instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz");
setprop("instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz", getprop("systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby"));
setprop("systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby", mem);
setprop("instrumentation/comm[" ~ mod ~ "]/frequencies/selected-mhz", getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby"));
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/vhf" ~ mod1 ~ "-standby", mem);
} elsif (string.match(sel_chan, "hf[1-2]")) {
var mod1 = int(string.replace(sel_chan, "hf", ""));
var mod = mod1 - 1;
var mem = systems.HFS[mod].selectedChannelKhz;
systems.HFS[mod].selectChannel(getprop("systems/radio/rmp[" ~ rmp_no ~ "]/hf" ~ mod1 ~ "-standby"));
setprop("systems/radio/rmp[" ~ rmp_no ~ "]/hf" ~ mod1 ~ "-standby", mem);
systems.HFS[mod].selectChannel(getprop("/systems/radio/rmp[" ~ rmp_no ~ "]/hf" ~ mod1 ~ "-standby"));
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/hf" ~ mod1 ~ "-standby", mem);
} elsif (sel_chan == "adf") {
var mem = getprop("instrumentation/adf[" ~ rmp_no ~ "]/frequencies/selected-khz");
setprop("instrumentation/adf[" ~ rmp_no ~ "]/frequencies/selected-khz", getprop("instrumentation/adf[" ~ rmp_no ~ "]/frequencies/standby-khz"));
@ -420,21 +420,21 @@ var transfer = func(rmp_no) {
} elsif (sel_chan == "vor") {
if (sel_crs) {
setprop("instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/standby-mhz", getprop("instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/selected-mhz"));
setprop("systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 0);
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 0);
update_displays_nav(rmp_no + 3);
} else {
setprop("instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/selected-mhz", getprop("instrumentation/nav[" ~ (rmp_no + 2) ~ "]/frequencies/standby-mhz"));
setprop("systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 1);
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 1);
update_displays_nav(rmp_no + 3);
}
} elsif (sel_chan == "ls") {
if (sel_crs) {
setprop("instrumentation/nav[0]/frequencies/standby-mhz", getprop("instrumentation/nav[0]/frequencies/selected-mhz"));
setprop("systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 0);
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 0);
update_displays_nav(1);
} else {
setprop("instrumentation/nav[0]/frequencies/selected-mhz", getprop("instrumentation/nav[0]/frequencies/standby-mhz"));
setprop("systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 1);
setprop("/systems/radio/rmp[" ~ rmp_no ~ "]/select-crs", 1);
update_displays_nav(1);
}
}

View file

@ -199,7 +199,7 @@ var auto_start_one = func {
}
var eng_one_auto_start = maketimer(0.5, func {
if (getprop("/engines/engine[0]/n2-actual") >= 22) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 22) {
eng_one_auto_start.stop();
setprop("/engines/engine[0]/state", 2);
setprop("/controls/engines/engine[0]/cutoff", 0);
@ -219,7 +219,7 @@ var eng_one_auto_start = maketimer(0.5, func {
});
var eng_one_man_start = maketimer(0.5, func {
if (getprop("/engines/engine[0]/n2-actual") >= 16.7) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 16.7) {
eng_one_man_start.stop();
setprop("/engines/engine[0]/state", 2);
setprop("/controls/engines/engine[0]/cutoff", 0);
@ -239,7 +239,7 @@ var eng_one_egt_check = maketimer(0.5, func {
});
var eng_one_n2_check = maketimer(0.5, func {
if (getprop("/engines/engine[0]/n2-actual") >= 43.0) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 43.0) {
if (getprop("/controls/engines/engine[0]/igniter-a") != 0) {
setprop("/controls/engines/engine[0]/igniter-a", 0);
}
@ -247,7 +247,7 @@ var eng_one_n2_check = maketimer(0.5, func {
setprop("/controls/engines/engine[0]/igniter-b", 0);
}
}
if (getprop("/engines/engine[0]/n2-actual") >= 57.0) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 57.0) {
eng_one_n2_check.stop();
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
setprop("/engines/engine[0]/state", 3);
@ -262,7 +262,7 @@ var auto_start_two = func {
}
var eng_two_auto_start = maketimer(0.5, func {
if (getprop("/engines/engine[1]/n2-actual") >= 22) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 22) {
eng_two_auto_start.stop();
setprop("/engines/engine[1]/state", 2);
setprop("/controls/engines/engine[1]/cutoff", 0);
@ -282,7 +282,7 @@ var eng_two_auto_start = maketimer(0.5, func {
});
var eng_two_man_start = maketimer(0.5, func {
if (getprop("/engines/engine[1]/n2-actual") >= 16.7) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 16.7) {
eng_two_man_start.stop();
setprop("/engines/engine[1]/state", 2);
setprop("/controls/engines/engine[1]/cutoff", 0);
@ -302,7 +302,7 @@ var eng_two_egt_check = maketimer(0.5, func {
});
var eng_two_n2_check = maketimer(0.5, func {
if (getprop("/engines/engine[1]/n2-actual") >= 50.0) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 50.0) {
if (getprop("/controls/engines/engine[1]/igniter-a") != 0) {
setprop("/controls/engines/engine[1]/igniter-a", 0);
}
@ -310,7 +310,7 @@ var eng_two_n2_check = maketimer(0.5, func {
setprop("/controls/engines/engine[1]/igniter-b", 0);
}
}
if (getprop("/engines/engine[1]/n2-actual") >= 57.0) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 57.0) {
eng_two_n2_check.stop();
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
setprop("/engines/engine[1]/state", 3);

View file

@ -199,7 +199,7 @@ var auto_start_one = func {
}
var eng_one_auto_start = maketimer(0.5, func {
if (getprop("/engines/engine[0]/n1-actual") >= 4.7) {
if (pts.Engines.Engine.n1Actual[0].getValue() >= 4.7) {
eng_one_auto_start.stop();
setprop("/engines/engine[0]/state", 2);
setprop("/controls/engines/engine[0]/cutoff", 0);
@ -219,7 +219,7 @@ var eng_one_auto_start = maketimer(0.5, func {
});
var eng_one_man_start = maketimer(0.5, func {
if (getprop("/engines/engine[0]/n2-actual") >= 16.7) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 16.7) {
eng_one_man_start.stop();
setprop("/engines/engine[0]/state", 2);
setprop("/controls/engines/engine[0]/cutoff", 0);
@ -239,7 +239,7 @@ var eng_one_egt_check = maketimer(0.5, func {
});
var eng_one_n2_check = maketimer(0.5, func {
if (getprop("/engines/engine[0]/n2-actual") >= 43.0) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 43.0) {
if (getprop("/controls/engines/engine[0]/igniter-a") != 0) {
setprop("/controls/engines/engine[0]/igniter-a", 0);
}
@ -247,7 +247,7 @@ var eng_one_n2_check = maketimer(0.5, func {
setprop("/controls/engines/engine[0]/igniter-b", 0);
}
}
if (getprop("/engines/engine[0]/n2-actual") >= 57.0) {
if (pts.Engines.Engine.n2Actual[0].getValue() >= 57.0) {
eng_one_n2_check.stop();
setprop("/systems/pneumatics/valves/starter-valve-1", 0);
setprop("/engines/engine[0]/state", 3);
@ -262,7 +262,7 @@ var auto_start_two = func {
}
var eng_two_auto_start = maketimer(0.5, func {
if (getprop("/engines/engine[1]/n1-actual") >= 4.7) {
if (pts.Engines.Engine.n1Actual[1].getValue() >= 4.7) {
eng_two_auto_start.stop();
setprop("/engines/engine[1]/state", 2);
setprop("/controls/engines/engine[1]/cutoff", 0);
@ -282,7 +282,7 @@ var eng_two_auto_start = maketimer(0.5, func {
});
var eng_two_man_start = maketimer(0.5, func {
if (getprop("/engines/engine[1]/n2-actual") >= 16.7) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 16.7) {
eng_two_man_start.stop();
setprop("/engines/engine[1]/state", 2);
setprop("/controls/engines/engine[1]/cutoff", 0);
@ -302,7 +302,7 @@ var eng_two_egt_check = maketimer(0.5, func {
});
var eng_two_n2_check = maketimer(0.5, func {
if (getprop("/engines/engine[1]/n2-actual") >= 43.0) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 43.0) {
if (getprop("/controls/engines/engine[1]/igniter-a") != 0) {
setprop("/controls/engines/engine[1]/igniter-a", 0);
}
@ -310,7 +310,7 @@ var eng_two_n2_check = maketimer(0.5, func {
setprop("/controls/engines/engine[1]/igniter-b", 0);
}
}
if (getprop("/engines/engine[1]/n2-actual") >= 57.0) {
if (pts.Engines.Engine.n2Actual[1].getValue() >= 57.0) {
eng_two_n2_check.stop();
setprop("/systems/pneumatics/valves/starter-valve-2", 0);
setprop("/engines/engine[1]/state", 3);

View file

@ -152,20 +152,20 @@ var ELEC = {
},
},
Switch: {
acEssFeed: props.globals.getNode("controls/electrical/switches/ac-ess-feed"),
busTie: props.globals.getNode("controls/electrical/switches/bus-tie"),
bat1: props.globals.getNode("controls/electrical/switches/bat-1"),
bat2: props.globals.getNode("controls/electrical/switches/bat-2"),
emerGenTest: props.globals.getNode("controls/electrical/switches/emer-gen-test"),
extPwr: props.globals.getNode("controls/electrical/switches/ext-pwr"),
galley: props.globals.getNode("controls/electrical/switches/galley"),
gen1: props.globals.getNode("controls/electrical/switches/gen-1"),
gen2: props.globals.getNode("controls/electrical/switches/gen-2"),
genApu: props.globals.getNode("controls/electrical/switches/apu"),
gen1Line: props.globals.getNode("controls/electrical/switches/gen-1-line-contactor"),
idg1Disc: props.globals.getNode("controls/electrical/switches/idg-1-disc"),
idg2Disc: props.globals.getNode("controls/electrical/switches/idg-2-disc"),
emerElecManOn: props.globals.getNode("controls/electrical/switches/emer-elec-man-on"), # non-reset
acEssFeed: props.globals.getNode("/controls/electrical/switches/ac-ess-feed"),
busTie: props.globals.getNode("/controls/electrical/switches/bus-tie"),
bat1: props.globals.getNode("/controls/electrical/switches/bat-1"),
bat2: props.globals.getNode("/controls/electrical/switches/bat-2"),
emerGenTest: props.globals.getNode("/controls/electrical/switches/emer-gen-test"),
extPwr: props.globals.getNode("/controls/electrical/switches/ext-pwr"),
galley: props.globals.getNode("/controls/electrical/switches/galley"),
gen1: props.globals.getNode("/controls/electrical/switches/gen-1"),
gen2: props.globals.getNode("/controls/electrical/switches/gen-2"),
genApu: props.globals.getNode("/controls/electrical/switches/apu"),
gen1Line: props.globals.getNode("/controls/electrical/switches/gen-1-line-contactor"),
idg1Disc: props.globals.getNode("/controls/electrical/switches/idg-1-disc"),
idg2Disc: props.globals.getNode("/controls/electrical/switches/idg-2-disc"),
emerElecManOn: props.globals.getNode("/controls/electrical/switches/emer-elec-man-on"), # non-reset
},
init: func() {
me.resetFail();

View file

@ -11,31 +11,31 @@ var ground_services = {
me.ice_time = 0;
# Catering Truck
setprop("services/catering/scissor-deg", 0);
setprop("services/catering/position-norm", 0);
setprop("/services/catering/scissor-deg", 0);
setprop("/services/catering/position-norm", 0);
# De-icing Truck
setprop("services/deicing_truck/enable", 0);
setprop("services/deicing_truck/de-ice", 0);
setprop("/services/deicing_truck/enable", 0);
setprop("/services/deicing_truck/de-ice", 0);
# Set them all to 0 if the aircraft is not stationary
if (getprop("velocities/groundspeed-kt") >= 2) {
setprop("services/chocks/enable", 0);
setprop("services/fuel-truck/enable", 0);
setprop("services/deicing_truck/enable", 0);
setprop("services/catering/enable", 0);
setprop("/services/chocks/enable", 0);
setprop("/services/fuel-truck/enable", 0);
setprop("/services/deicing_truck/enable", 0);
setprop("/services/catering/enable", 0);
}
me.reset();
},
update : func {
# 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));
setprop("services/catering/scissor-deg", scissor_deg);
setprop("/services/catering/scissor-deg", scissor_deg);
# 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) {
door.move(1);
ground_message ("Lifting De-icing Crane...");
@ -58,7 +58,7 @@ var ground_services = {
if (me.ice_time == 900) {
ground_message("De-icing Completed!", 1, 1, 1);
setprop("services/deicing_truck/de-ice", 0);
setprop("/services/deicing_truck/de-ice", 0);
}
} else {
@ -79,7 +79,7 @@ var ground_services = {
};
var ground_message = func (string) {
setprop("sim/messages/ground", string);
setprop("/sim/messages/ground", string);
}
setlistener("sim/signals/fdm-initialized", func {

View file

@ -3,13 +3,13 @@
var fuelSvc = {
_needCenter: 0,
enable: props.globals.getNode("services/fuel-truck/enable"),
connect: props.globals.getNode("services/fuel-truck/connect"),
operate: props.globals.getNode("services/fuel-truck/operate"),
enable: props.globals.getNode("/services/fuel-truck/enable"),
connect: props.globals.getNode("/services/fuel-truck/connect"),
operate: props.globals.getNode("/services/fuel-truck/operate"),
Nodes: {
requestLbs: props.globals.getNode("services/fuel-truck/request-lbs"),
requestTotalLbs: props.globals.getNode("services/fuel-truck/request-total-lbs"),
requestFuelLbs: props.globals.initNode("services/fuel-truck/fuel-on-board-at-request", pts.Consumables.Fuel.totalFuelLbs.getValue(), "DOUBLE"),
requestLbs: props.globals.getNode("/services/fuel-truck/request-lbs"),
requestTotalLbs: props.globals.getNode("/services/fuel-truck/request-total-lbs"),
requestFuelLbs: props.globals.initNode("/services/fuel-truck/fuel-on-board-at-request", pts.Consumables.Fuel.totalFuelLbs.getValue(), "DOUBLE"),
},
newRequest: func() {

View file

@ -6,7 +6,7 @@
# Distribute under the terms of GPLv2.
# Conversion factor pounds to kilogram
LBS2KGS = 0.4535924;
var LBS2KGS = 0.4535924;
if (pts.Sim.aero.getValue() == "A320-200-CFM") {
max_fuel = 42.8;
@ -590,25 +590,45 @@ var refuelClass = {
_fuelAdjustDn: func() {
target = amount.getValue();
if (target > 0) {
amount.setValue(target - 0.1);
if (target - 0.1 >= 10.0) {
me._FQI_pre.setText(sprintf("%2.1f", target - 0.1));
if (acconfig_weight_kgs.getValue() == 1) {
amount.setValue(target - 0.1 * LBS2KGS);
if ((target - 0.1) * LBS2KGS >= 10.0) {
me._FQI_pre.setText(sprintf("%2.1f", (target - 0.1) * LBS2KGS));
} else {
me._FQI_pre.setText(sprintf("%2.2f", (target - 0.1) * LBS2KGS));
}
systems.fuelSvc.Nodes.requestLbs.setValue((((target - 0.1) * LBS2KGS) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
} else {
me._FQI_pre.setText(sprintf("%2.2f", target - 0.1));
amount.setValue(target - 0.1);
if (target - 0.1 >= 10.0) {
me._FQI_pre.setText(sprintf("%2.1f", target - 0.1));
} else {
me._FQI_pre.setText(sprintf("%2.2f", target - 0.1));
}
systems.fuelSvc.Nodes.requestLbs.setValue(((target - 0.1) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
}
systems.fuelSvc.Nodes.requestLbs.setValue(((target - 0.1) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
}
},
_fuelAdjustUp: func() {
target = amount.getValue();
if (target < max_fuel) {
amount.setValue(target + 0.1);
if (target + 0.1 >= 10.0) {
me._FQI_pre.setText(sprintf("%2.1f", target + 0.1));
if (acconfig_weight_kgs.getValue() == 1) {
amount.setValue(target + 0.1);
if ((target + 0.1) * LBS2KGS >= 10.0) {
me._FQI_pre.setText(sprintf("%2.1f", (target + 0.1) * LBS2KGS));
} else {
me._FQI_pre.setText(sprintf("%2.2f", (target + 0.1) * LBS2KGS));
}
systems.fuelSvc.Nodes.requestLbs.setValue((((target + 0.1) * LBS2KGS) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
} else {
me._FQI_pre.setText(sprintf("%2.2f", target + 0.1));
amount.setValue(target + 0.1);
if (target + 0.1 >= 10.0) {
me._FQI_pre.setText(sprintf("%2.1f", target + 0.1));
} else {
me._FQI_pre.setText(sprintf("%2.2f", target + 0.1));
}
systems.fuelSvc.Nodes.requestLbs.setValue(((target + 0.1) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
}
systems.fuelSvc.Nodes.requestLbs.setValue(((target + 0.1) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
}
},
_onClose: func() {

View file

@ -1 +1 @@
38
39