Merge branch 'dev' into 3D
This commit is contained in:
commit
a62cc291de
17 changed files with 758 additions and 852 deletions
|
@ -4323,7 +4323,7 @@
|
|||
<axis-alignment>xy-plane</axis-alignment>
|
||||
<type type="string">number-value</type>
|
||||
<format type="string">%3.0f</format>
|
||||
<property>it-autoflight/input/spd-kts</property>
|
||||
<property>it-autoflight/input/kts</property>
|
||||
<truncate>false</truncate>
|
||||
<font type="string">led.txf</font>
|
||||
<draw-text>true</draw-text>
|
||||
|
@ -4349,7 +4349,7 @@
|
|||
<axis-alignment>xy-plane</axis-alignment>
|
||||
<type type="string">number-value</type>
|
||||
<format type="string">%0.3f</format>
|
||||
<property>it-autoflight/input/spd-mach</property>
|
||||
<property>it-autoflight/input/mach</property>
|
||||
<truncate>false</truncate>
|
||||
<font type="string">led.txf</font>
|
||||
<draw-text>true</draw-text>
|
||||
|
|
|
@ -178,13 +178,6 @@ var cruiseFL_prog = props.globals.getNode("/FMGC/internal/cruise-fl-prog", 1);
|
|||
var altitude = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft", 1);
|
||||
|
||||
# TO PERF
|
||||
var v1 = props.globals.getNode("/FMGC/internal/v1", 1);
|
||||
var v1Set = props.globals.getNode("/FMGC/internal/v1-set", 1);
|
||||
var vr = props.globals.getNode("/FMGC/internal/vr", 1);
|
||||
var vrSet = props.globals.getNode("/FMGC/internal/vr-set", 1);
|
||||
var v2 = props.globals.getNode("/FMGC/internal/v2", 1);
|
||||
var v2Set = props.globals.getNode("/FMGC/internal/v2-set", 1);
|
||||
|
||||
var clbReducFt = props.globals.getNode("/systems/thrust/clbreduc-ft", 1);
|
||||
var reducFt = props.globals.getNode("/FMGC/internal/accel-agl-ft", 1); # It's not AGL anymore
|
||||
var thrAccSet = props.globals.getNode("/MCDUC/thracc-set", 1);
|
||||
|
@ -2288,9 +2281,6 @@ var canvas_MCDU_base = {
|
|||
pageSwitch[i].setBoolValue(1);
|
||||
}
|
||||
|
||||
me["Simple_L1"].setText(sprintf("%3.0f", v1.getValue()));
|
||||
me["Simple_L2"].setText(sprintf("%3.0f", vr.getValue()));
|
||||
me["Simple_L3"].setText(sprintf("%3.0f", v2.getValue()));
|
||||
me["Simple_L4"].setText(sprintf("%3.0f", fmgc.FMGCInternal.transAlt));
|
||||
me["Simple_L5"].setText(sprintf("%3.0f", clbReducFt.getValue()) ~ sprintf("/%3.0f", reducFt.getValue()));
|
||||
me["Simple_L6"].setText(" TO DATA");
|
||||
|
@ -2338,27 +2328,33 @@ var canvas_MCDU_base = {
|
|||
me["Simple_Title"].setText("TAKE OFF");
|
||||
}
|
||||
|
||||
if (v1Set.getValue() == 1) {
|
||||
if (fmgc.FMGCInternal.v1set) {
|
||||
me["PERFTO_V1"].hide();
|
||||
me["Simple_L1"].setText(sprintf("%3.0f", fmgc.FMGCInternal.v1));
|
||||
me["Simple_L1"].show();
|
||||
} else {
|
||||
me["PERFTO_V1"].show();
|
||||
me["Simple_L1"].hide();
|
||||
}
|
||||
if (vrSet.getValue() == 1) {
|
||||
|
||||
if (fmgc.FMGCInternal.vrset) {
|
||||
me["PERFTO_VR"].hide();
|
||||
me["Simple_L2"].setText(sprintf("%3.0f", fmgc.FMGCInternal.vr));
|
||||
me["Simple_L2"].show();
|
||||
} else {
|
||||
me["PERFTO_VR"].show();
|
||||
me["Simple_L2"].hide();
|
||||
}
|
||||
if (v2Set.getValue() == 1) {
|
||||
|
||||
if (fmgc.FMGCInternal.v2set) {
|
||||
me["PERFTO_V2"].hide();
|
||||
me["Simple_L3"].setText(sprintf("%3.0f", fmgc.FMGCInternal.v2));
|
||||
me["Simple_L3"].show();
|
||||
} else {
|
||||
me["PERFTO_V2"].show();
|
||||
me["Simple_L3"].hide();
|
||||
}
|
||||
|
||||
if (thrAccSet.getValue() == 1) {
|
||||
me["Simple_L5"].setFontSize(normal);
|
||||
} else {
|
||||
|
@ -2531,9 +2527,9 @@ var canvas_MCDU_base = {
|
|||
} else {
|
||||
me["Simple_L1"].setText("SELECTED");
|
||||
if (getprop("/it-autoflight/input/kts-mach")) {
|
||||
me["Simple_L4"].setText(sprintf(" %3.3f", getprop("/it-autoflight/input/spd-mach")));
|
||||
me["Simple_L4"].setText(sprintf(" %3.3f", getprop("/it-autoflight/input/mach")));
|
||||
} else {
|
||||
me["Simple_L4"].setText(sprintf(" %s", int(getprop("/it-autoflight/input/spd-kts"))));
|
||||
me["Simple_L4"].setText(sprintf(" %s", int(getprop("/it-autoflight/input/kts"))));
|
||||
}
|
||||
me.fontLeft(0, 0, 0, default, 0, 0);
|
||||
}
|
||||
|
@ -2685,9 +2681,9 @@ var canvas_MCDU_base = {
|
|||
} else {
|
||||
me["Simple_L1"].setText("SELECTED");
|
||||
if (getprop("/it-autoflight/input/kts-mach")) {
|
||||
me["Simple_L4"].setText(sprintf(" %3.3f", getprop("/it-autoflight/input/spd-mach")));
|
||||
me["Simple_L4"].setText(sprintf(" %3.3f", getprop("/it-autoflight/input/mach")));
|
||||
} else {
|
||||
me["Simple_L4"].setText(sprintf(" %s", int(getprop("/it-autoflight/input/spd-kts"))));
|
||||
me["Simple_L4"].setText(sprintf(" %s", int(getprop("/it-autoflight/input/kts"))));
|
||||
}
|
||||
me.fontLeft(0, 0, 0, default, 0, 0);
|
||||
}
|
||||
|
@ -2846,9 +2842,9 @@ var canvas_MCDU_base = {
|
|||
} else {
|
||||
me["Simple_L1"].setText("SELECTED");
|
||||
if (getprop("/it-autoflight/input/kts-mach")) {
|
||||
me["Simple_L4"].setText(sprintf(" %3.3f", getprop("/it-autoflight/input/spd-mach")));
|
||||
me["Simple_L4"].setText(sprintf(" %3.3f", getprop("/it-autoflight/input/mach")));
|
||||
} else {
|
||||
me["Simple_L4"].setText(sprintf(" %3.0f", getprop("/it-autoflight/input/spd-kts")));
|
||||
me["Simple_L4"].setText(sprintf(" %3.0f", getprop("/it-autoflight/input/kts")));
|
||||
}
|
||||
me.fontLeft(0, 0, 0, default, 0, 0);
|
||||
}
|
||||
|
|
|
@ -82,8 +82,8 @@ var FMGC_max_spd = props.globals.getNode("/FMGC/internal/maxspeed", 1);
|
|||
var ind_spd_kt = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt", 1);
|
||||
var ind_spd_mach = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach", 1);
|
||||
var at_mach_mode = props.globals.getNode("/it-autoflight/input/kts-mach", 1);
|
||||
var at_input_spd_mach = props.globals.getNode("/it-autoflight/input/spd-mach", 1);
|
||||
var at_input_spd_kts = props.globals.getNode("/it-autoflight/input/spd-kts", 1);
|
||||
var at_input_spd_mach = props.globals.getNode("/it-autoflight/input/mach", 1);
|
||||
var at_input_spd_kts = props.globals.getNode("/it-autoflight/input/kts", 1);
|
||||
var fd_roll = props.globals.getNode("/it-autoflight/fd/roll-bar", 1);
|
||||
var fd_pitch = props.globals.getNode("/it-autoflight/fd/pitch-bar", 1);
|
||||
var decision = props.globals.getNode("/instrumentation/mk-viii/inputs/arinc429/decision-height", 1);
|
||||
|
@ -128,12 +128,6 @@ var ils1_crs_set = props.globals.getNode("/FMGC/internal/ils1crs-set/", 1);
|
|||
var outer_marker = props.globals.getNode("/instrumentation/marker-beacon/outer", 1);
|
||||
var middle_marker = props.globals.getNode("/instrumentation/marker-beacon/middle", 1);
|
||||
var inner_marker = props.globals.getNode("/instrumentation/marker-beacon/inner", 1);
|
||||
var v1 = props.globals.getNode("/FMGC/internal/v1", 1);
|
||||
var v1_set = props.globals.getNode("/FMGC/internal/v1-set", 1);
|
||||
var vr = props.globals.getNode("/FMGC/internal/vr", 1);
|
||||
var vr_set = props.globals.getNode("/FMGC/internal/vr-set", 1);
|
||||
var v2 = props.globals.getNode("/FMGC/internal/v2", 1);
|
||||
var v2_set = props.globals.getNode("/FMGC/internal/v2-set", 1);
|
||||
var flap_config = props.globals.getNode("/controls/flight/flaps-input", 1);
|
||||
var hundredAbove = props.globals.getNode("/instrumentation/pfd/hundred-above", 1);
|
||||
var minimum = props.globals.getNode("/instrumentation/pfd/minimums", 1);
|
||||
|
@ -1331,8 +1325,8 @@ var canvas_PFD_1 = {
|
|||
me["ASI_target"].hide();
|
||||
}
|
||||
|
||||
if (v1_set.getValue() == '1') {
|
||||
tgt_v1 = v1.getValue();
|
||||
if (fmgc.FMGCInternal.v1set) {
|
||||
tgt_v1 = fmgc.FMGCInternal.v1;
|
||||
if (tgt_v1 <= 30) {
|
||||
me.V1trgt = 0 - me.ASI;
|
||||
} else if (tgt_v1 >= 420) {
|
||||
|
@ -1350,7 +1344,7 @@ var canvas_PFD_1 = {
|
|||
} else if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2) {
|
||||
me["v1_group"].hide();
|
||||
me["v1_text"].show();
|
||||
me["v1_text"].setText(sprintf("%3.0f", v1.getValue()));
|
||||
me["v1_text"].setText(sprintf("%3.0f", fmgc.FMGCInternal.v1));
|
||||
} else {
|
||||
me["v1_group"].hide();
|
||||
me["v1_text"].hide();
|
||||
|
@ -1360,8 +1354,8 @@ var canvas_PFD_1 = {
|
|||
me["v1_text"].hide();
|
||||
}
|
||||
|
||||
if (vr_set.getValue() == '1') {
|
||||
tgt_vr = vr.getValue();
|
||||
if (fmgc.FMGCInternal.vrset) {
|
||||
tgt_vr = fmgc.FMGCInternal.vr;
|
||||
if (tgt_vr <= 30) {
|
||||
me.VRtrgt = 0 - me.ASI;
|
||||
} else if (tgt_vr >= 420) {
|
||||
|
@ -1382,8 +1376,8 @@ var canvas_PFD_1 = {
|
|||
me["vr_speed"].hide();
|
||||
}
|
||||
|
||||
if (v2_set.getValue() == '1') {
|
||||
tgt_v2 = v2.getValue();
|
||||
if (fmgc.FMGCInternal.v2set) {
|
||||
tgt_v2 = fmgc.FMGCInternal.v2;
|
||||
if (tgt_v2 <= 30) {
|
||||
me.V2trgt = 0 - me.ASI;
|
||||
} else if (tgt_v2 >= 420) {
|
||||
|
@ -1397,10 +1391,10 @@ var canvas_PFD_1 = {
|
|||
if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2 and me.SPDv2trgtdiff >= -42 and me.SPDv2trgtdiff <= 42) {
|
||||
me["ASI_target"].show();
|
||||
me["ASI_target"].setTranslation(0, me.V2trgt * -6.6);
|
||||
me["ASI_digit_UP"].setText(sprintf("%3.0f", v2.getValue()));
|
||||
me["ASI_digit_UP"].setText(sprintf("%3.0f", fmgc.FMGCInternal.v2));
|
||||
} else if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2) {
|
||||
me["ASI_target"].hide();
|
||||
me["ASI_digit_UP"].setText(sprintf("%3.0f", v2.getValue()));
|
||||
me["ASI_digit_UP"].setText(sprintf("%3.0f", fmgc.FMGCInternal.v2));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2070,8 +2064,8 @@ var canvas_PFD_2 = {
|
|||
me["ASI_target"].hide();
|
||||
}
|
||||
|
||||
if (v1_set.getValue() == '1') {
|
||||
tgt_v1 = v1.getValue();
|
||||
if (fmgc.FMGCInternal.v1set) {
|
||||
tgt_v1 = fmgc.FMGCInternal.v1;
|
||||
if (tgt_v1 <= 30) {
|
||||
me.V1trgt = 0 - me.ASI;
|
||||
} else if (tgt_v1 >= 420) {
|
||||
|
@ -2089,7 +2083,7 @@ var canvas_PFD_2 = {
|
|||
} else if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2) {
|
||||
me["v1_group"].hide();
|
||||
me["v1_text"].show();
|
||||
me["v1_text"].setText(sprintf("%3.0f", v1.getValue()));
|
||||
me["v1_text"].setText(sprintf("%3.0f", fmgc.FMGCInternal.v1));
|
||||
} else {
|
||||
me["v1_group"].hide();
|
||||
me["v1_text"].hide();
|
||||
|
@ -2099,8 +2093,8 @@ var canvas_PFD_2 = {
|
|||
me["v1_text"].hide();
|
||||
}
|
||||
|
||||
if (vr_set.getValue() == '1') {
|
||||
tgt_vr = vr.getValue();
|
||||
if (fmgc.FMGCInternal.vrset) {
|
||||
tgt_vr = fmgc.FMGCInternal.vr;
|
||||
if (tgt_vr <= 30) {
|
||||
me.VRtrgt = 0 - me.ASI;
|
||||
} else if (tgt_vr >= 420) {
|
||||
|
@ -2121,8 +2115,8 @@ var canvas_PFD_2 = {
|
|||
me["vr_speed"].hide();
|
||||
}
|
||||
|
||||
if (v2_set.getValue() == '1') {
|
||||
tgt_v2 = v2.getValue();
|
||||
if (fmgc.FMGCInternal.v2set) {
|
||||
tgt_v2 = fmgc.FMGCInternal.v2;
|
||||
if (tgt_v2 <= 30) {
|
||||
me.V2trgt = 0 - me.ASI;
|
||||
} else if (tgt_v2 >= 420) {
|
||||
|
@ -2136,10 +2130,10 @@ var canvas_PFD_2 = {
|
|||
if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2 and me.SPDv2trgtdiff >= -42 and me.SPDv2trgtdiff <= 42) {
|
||||
me["ASI_target"].show();
|
||||
me["ASI_target"].setTranslation(0, me.V2trgt * -6.6);
|
||||
me["ASI_digit_UP"].setText(sprintf("%3.0f", v2.getValue()));
|
||||
me["ASI_digit_UP"].setText(sprintf("%3.0f", fmgc.FMGCInternal.v2));
|
||||
} else if (pts.Position.gearAglFt.getValue() < 55 and FMGCphase.getValue() <= 2) {
|
||||
me["ASI_target"].hide();
|
||||
me["ASI_digit_UP"].setText(sprintf("%3.0f", v2.getValue()));
|
||||
me["ASI_digit_UP"].setText(sprintf("%3.0f", fmgc.FMGCInternal.v2));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,37 +2,37 @@
|
|||
# Copyright (c) 2020 Josh Davidson (Octal450), Jonathan Redpath (legoboyvdlp)
|
||||
|
||||
# Nodes
|
||||
var fd1 = props.globals.getNode("it-autoflight/output/fd1", 1);
|
||||
var fd2 = props.globals.getNode("it-autoflight/output/fd2", 1);
|
||||
var ap1 = props.globals.getNode("it-autoflight/output/ap1", 1);
|
||||
var ap2 = props.globals.getNode("it-autoflight/output/ap2", 1);
|
||||
var athr = props.globals.getNode("it-autoflight/output/athr", 1);
|
||||
var fd1Input = props.globals.getNode("it-autoflight/input/fd1", 1);
|
||||
var fd2Input = props.globals.getNode("it-autoflight/input/fd2", 1);
|
||||
var ap1Input = props.globals.getNode("it-autoflight/input/ap1", 1);
|
||||
var ap2Input = props.globals.getNode("it-autoflight/input/ap2", 1);
|
||||
var athrInput = props.globals.getNode("it-autoflight/input/athr", 1);
|
||||
var ktsMach = props.globals.getNode("it-autoflight/input/kts-mach", 1);
|
||||
var iasSet = props.globals.getNode("it-autoflight/input/spd-kts", 1);
|
||||
var machSet = props.globals.getNode("it-autoflight/input/spd-mach", 1);
|
||||
var hdgSet = props.globals.getNode("it-autoflight/input/hdg", 1);
|
||||
var altSet = props.globals.getNode("it-autoflight/input/alt", 1);
|
||||
var altSetMode = props.globals.getNode("it-autoflight/config/altitude-dial-mode", 1);
|
||||
var vsSet = props.globals.getNode("it-autoflight/input/vs", 1);
|
||||
var fpaSet = props.globals.getNode("it-autoflight/input/fpa", 1);
|
||||
var iasNow = props.globals.getNode("instrumentation/airspeed-indicator/indicated-speed-kt", 1);
|
||||
var machNow = props.globals.getNode("instrumentation/airspeed-indicator/indicated-mach", 1);
|
||||
var spdManaged = props.globals.getNode("it-autoflight/input/spd-managed", 1);
|
||||
var showHDG = props.globals.getNode("it-autoflight/custom/show-hdg", 1);
|
||||
var trkFpaSW = props.globals.getNode("it-autoflight/custom/trk-fpa", 1);
|
||||
var latMode = props.globals.getNode("it-autoflight/output/lat", 1);
|
||||
var vertMode = props.globals.getNode("it-autoflight/output/vert", 1);
|
||||
var fpaModeInput = props.globals.getNode("it-autoflight/input/fpa", 1);
|
||||
var latModeInput = props.globals.getNode("it-autoflight/input/lat", 1);
|
||||
var vertModeInput = props.globals.getNode("it-autoflight/input/vert", 1);
|
||||
var vsModeInput = props.globals.getNode("it-autoflight/input/vs", 1);
|
||||
var locArm = props.globals.getNode("it-autoflight/output/loc-armed", 1);
|
||||
var apprArm = props.globals.getNode("it-autoflight/output/appr-armed", 1);
|
||||
var fd1 = props.globals.getNode("/it-autoflight/output/fd1", 1);
|
||||
var fd2 = props.globals.getNode("/it-autoflight/output/fd2", 1);
|
||||
var ap1 = props.globals.getNode("/it-autoflight/output/ap1", 1);
|
||||
var ap2 = props.globals.getNode("/it-autoflight/output/ap2", 1);
|
||||
var athr = props.globals.getNode("/it-autoflight/output/athr", 1);
|
||||
var fd1Input = props.globals.getNode("/it-autoflight/input/fd1", 1);
|
||||
var fd2Input = props.globals.getNode("/it-autoflight/input/fd2", 1);
|
||||
var ap1Input = props.globals.getNode("/it-autoflight/input/ap1", 1);
|
||||
var ap2Input = props.globals.getNode("/it-autoflight/input/ap2", 1);
|
||||
var athrInput = props.globals.getNode("/it-autoflight/input/athr", 1);
|
||||
var ktsMach = props.globals.getNode("/it-autoflight/input/kts-mach", 1);
|
||||
var iasSet = props.globals.getNode("/it-autoflight/input/kts", 1);
|
||||
var machSet = props.globals.getNode("/it-autoflight/input/mach", 1);
|
||||
var hdgSet = props.globals.getNode("/it-autoflight/input/hdg", 1);
|
||||
var altSet = props.globals.getNode("/it-autoflight/input/alt", 1);
|
||||
var altSetMode = props.globals.getNode("/it-autoflight/config/altitude-dial-mode", 1);
|
||||
var vsSet = props.globals.getNode("/it-autoflight/input/vs", 1);
|
||||
var fpaSet = props.globals.getNode("/it-autoflight/input/fpa", 1);
|
||||
var iasNow = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt", 1);
|
||||
var machNow = props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach", 1);
|
||||
var spdManaged = props.globals.getNode("/it-autoflight/input/spd-managed", 1);
|
||||
var showHDG = props.globals.getNode("/it-autoflight/custom/show-hdg", 1);
|
||||
var trkFpaSW = props.globals.getNode("/it-autoflight/custom/trk-fpa", 1);
|
||||
var latMode = props.globals.getNode("/it-autoflight/output/lat", 1);
|
||||
var vertMode = props.globals.getNode("/it-autoflight/output/vert", 1);
|
||||
var fpaModeInput = props.globals.getNode("/it-autoflight/input/fpa", 1);
|
||||
var latModeInput = props.globals.getNode("/it-autoflight/input/lat", 1);
|
||||
var vertModeInput = props.globals.getNode("/it-autoflight/input/vert", 1);
|
||||
var vsModeInput = props.globals.getNode("/it-autoflight/input/vs", 1);
|
||||
var locArm = props.globals.getNode("/it-autoflight/output/loc-armed", 1);
|
||||
var apprArm = props.globals.getNode("/it-autoflight/output/appr-armed", 1);
|
||||
var FCUworkingNode = props.globals.initNode("/FMGC/FCU-working", 0, "BOOL");
|
||||
|
||||
var FCU = {
|
||||
|
|
|
@ -4,55 +4,18 @@
|
|||
|
||||
# Initialize all used variables and property nodes
|
||||
# Sim
|
||||
var Velocities = {
|
||||
airspeedKt: props.globals.getNode("velocities/airspeed-kt", 1), # Only used for gain scheduling
|
||||
groundspeedKt: props.globals.getNode("velocities/groundspeed-kt", 1),
|
||||
groundspeedMps: 0,
|
||||
indicatedAirspeedKt: props.globals.getNode("instrumentation/airspeed-indicator/indicated-speed-kt", 1),
|
||||
indicatedMach: props.globals.getNode("instrumentation/airspeed-indicator/indicated-mach", 1),
|
||||
trueAirspeedKt: props.globals.getNode("instrumentation/airspeed-indicator/true-speed-kt", 1),
|
||||
trueAirspeedKtTemp: 0,
|
||||
};
|
||||
|
||||
var Position = {
|
||||
gearAglFtTemp: 0,
|
||||
gearAglFt: props.globals.getNode("position/gear-agl-ft", 1),
|
||||
indicatedAltitudeFt: props.globals.getNode("instrumentation/altimeter/indicated-altitude-ft", 1),
|
||||
indicatedAltitudeFtTemp: 0,
|
||||
};
|
||||
|
||||
var Gear = {
|
||||
wow0: props.globals.getNode("gear/gear[0]/wow", 1),
|
||||
wow1: props.globals.getNode("gear/gear[1]/wow", 1),
|
||||
wow1Temp: 1,
|
||||
wow2: props.globals.getNode("gear/gear[2]/wow", 1),
|
||||
wow2Temp: 1,
|
||||
};
|
||||
|
||||
var Control = {
|
||||
aileron: props.globals.getNode("controls/flight/aileron", 1),
|
||||
elevator: props.globals.getNode("controls/flight/elevator", 1),
|
||||
rudder: props.globals.getNode("controls/flight/rudder", 1),
|
||||
};
|
||||
|
||||
var Radio = {
|
||||
gsDefl: [props.globals.getNode("instrumentation/nav[0]/gs-needle-deflection-norm", 1), props.globals.getNode("instrumentation/nav[1]/gs-needle-deflection-norm", 1)],
|
||||
gsDeflTemp: 0,
|
||||
inRange: [props.globals.getNode("instrumentation/nav[0]/in-range", 1), props.globals.getNode("instrumentation/nav[1]/in-range", 1)],
|
||||
inRangeTemp: 0,
|
||||
locDefl: [props.globals.getNode("instrumentation/nav[0]/heading-needle-deflection-norm", 1), props.globals.getNode("instrumentation/nav[1]/heading-needle-deflection-norm", 1)],
|
||||
locDeflTemp: 0,
|
||||
radioSel: 0,
|
||||
signalQuality: [props.globals.getNode("instrumentation/nav[0]/signal-quality-norm", 1), props.globals.getNode("instrumentation/nav[1]/signal-quality-norm", 1)],
|
||||
signalQualityTemp: 0,
|
||||
var Controls = {
|
||||
aileron: props.globals.getNode("/controls/flight/aileron", 1),
|
||||
elevator: props.globals.getNode("/controls/flight/elevator", 1),
|
||||
rudder: props.globals.getNode("/controls/flight/rudder", 1),
|
||||
};
|
||||
|
||||
var FPLN = {
|
||||
active: props.globals.getNode("/FMGC/flightplan[2]/active", 1),
|
||||
activeTemp: 0,
|
||||
currentCourse: 0,
|
||||
currentWP: props.globals.getNode("/FMGC/flightplan[2]/current-wp", 1),
|
||||
currentWPTemp: 0,
|
||||
currentWp: props.globals.getNode("/FMGC/flightplan[2]/current-wp", 1),
|
||||
currentWpTemp: 0,
|
||||
deltaAngle: 0,
|
||||
deltaAngleRad: 0,
|
||||
distCoeff: 0,
|
||||
|
@ -67,12 +30,49 @@ var FPLN = {
|
|||
wpFlyTo: 0,
|
||||
};
|
||||
|
||||
var Gear = {
|
||||
wow0: props.globals.getNode("/gear/gear[0]/wow", 1),
|
||||
wow1: props.globals.getNode("/gear/gear[1]/wow", 1),
|
||||
wow1Temp: 1,
|
||||
wow2: props.globals.getNode("/gear/gear[2]/wow", 1),
|
||||
wow2Temp: 1,
|
||||
};
|
||||
|
||||
var Misc = {
|
||||
acEss: props.globals.getNode("systems/electrical/bus/ac-ess", 1),
|
||||
elapsedSec: props.globals.getNode("sim/time/elapsed-sec", 1),
|
||||
fbwLaw: props.globals.getNode("it-fbw/law", 1),
|
||||
flapNorm: props.globals.getNode("surface-positions/flap-pos-norm", 1),
|
||||
pfdHeadingScale: props.globals.getNode("instrumentation/pfd/heading-scale", 1),
|
||||
acEss: props.globals.getNode("/systems/electrical/bus/ac-ess", 1),
|
||||
elapsedSec: props.globals.getNode("/sim/time/elapsed-sec", 1),
|
||||
fbwLaw: props.globals.getNode("/it-fbw/law", 1),
|
||||
flapNorm: props.globals.getNode("/surface-positions/flap-pos-norm", 1),
|
||||
pfdHeadingScale: props.globals.getNode("/instrumentation/pfd/heading-scale", 1),
|
||||
};
|
||||
|
||||
var Position = {
|
||||
gearAglFtTemp: 0,
|
||||
gearAglFt: props.globals.getNode("/position/gear-agl-ft", 1),
|
||||
indicatedAltitudeFt: props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft", 1),
|
||||
indicatedAltitudeFtTemp: 0,
|
||||
};
|
||||
|
||||
var Radio = {
|
||||
gsDefl: [props.globals.getNode("/instrumentation/nav[0]/gs-needle-deflection-norm", 1), props.globals.getNode("instrumentation/nav[1]/gs-needle-deflection-norm", 1)],
|
||||
gsDeflTemp: 0,
|
||||
inRange: [props.globals.getNode("/instrumentation/nav[0]/in-range", 1), props.globals.getNode("instrumentation/nav[1]/in-range", 1)],
|
||||
inRangeTemp: 0,
|
||||
locDefl: [props.globals.getNode("/instrumentation/nav[0]/heading-needle-deflection-norm", 1), props.globals.getNode("instrumentation/nav[1]/heading-needle-deflection-norm", 1)],
|
||||
locDeflTemp: 0,
|
||||
radioSel: 0,
|
||||
signalQuality: [props.globals.getNode("/instrumentation/nav[0]/signal-quality-norm", 1), props.globals.getNode("instrumentation/nav[1]/signal-quality-norm", 1)],
|
||||
signalQualityTemp: 0,
|
||||
};
|
||||
|
||||
var Velocities = {
|
||||
airspeedKt: props.globals.getNode("/velocities/airspeed-kt", 1), # Only used for gain scheduling
|
||||
groundspeedKt: props.globals.getNode("/velocities/groundspeed-kt", 1),
|
||||
groundspeedMps: 0,
|
||||
indicatedAirspeedKt: props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt", 1),
|
||||
indicatedMach: props.globals.getNode("/instrumentation/airspeed-indicator/indicated-mach", 1),
|
||||
trueAirspeedKt: props.globals.getNode("/instrumentation/airspeed-indicator/true-speed-kt", 1),
|
||||
trueAirspeedKtTemp: 0,
|
||||
};
|
||||
|
||||
# IT-AUTOFLIGHT
|
||||
|
@ -87,17 +87,19 @@ var Input = {
|
|||
fd1: props.globals.initNode("/it-autoflight/input/fd1", 1, "BOOL"),
|
||||
fd2: props.globals.initNode("/it-autoflight/input/fd2", 1, "BOOL"),
|
||||
fpa: props.globals.initNode("/it-autoflight/input/fpa", 0, "DOUBLE"),
|
||||
fpaAbs: props.globals.initNode("/it-autoflight/input/fpa-abs", 0, "DOUBLE"), # Set by property rule
|
||||
hdg: props.globals.initNode("/it-autoflight/input/hdg", 0, "INT"),
|
||||
hdgCalc: 0,
|
||||
ias: props.globals.initNode("/it-autoflight/input/spd-kts", 250, "INT"),
|
||||
kts: props.globals.initNode("/it-autoflight/input/kts", 100, "INT"),
|
||||
ktsMach: props.globals.initNode("/it-autoflight/input/kts-mach", 0, "BOOL"),
|
||||
lat: props.globals.initNode("/it-autoflight/input/lat", 5, "INT"),
|
||||
latTemp: 5,
|
||||
mach: props.globals.initNode("/it-autoflight/input/spd-mach", 0.5, "DOUBLE"),
|
||||
mach: props.globals.initNode("/it-autoflight/input/mach", 0.5, "DOUBLE"),
|
||||
toga: props.globals.initNode("/it-autoflight/input/toga", 0, "BOOL"),
|
||||
trk: props.globals.initNode("/it-autoflight/input/trk", 0, "BOOL"),
|
||||
trueCourse: props.globals.initNode("/it-autoflight/input/true-course", 0, "BOOL"),
|
||||
vs: props.globals.initNode("/it-autoflight/input/vs", 0, "INT"),
|
||||
vsAbs: props.globals.initNode("/it-autoflight/input/vs-abs", 0, "INT"), # Set by property rule
|
||||
vert: props.globals.initNode("/it-autoflight/input/vert", 7, "INT"),
|
||||
vertTemp: 7,
|
||||
};
|
||||
|
@ -110,17 +112,15 @@ var Internal = {
|
|||
altPredicted: props.globals.initNode("/it-autoflight/internal/altitude-predicted", 0, "DOUBLE"),
|
||||
bankLimit: props.globals.initNode("/it-autoflight/internal/bank-limit", 30, "INT"),
|
||||
bankLimitAuto: 30,
|
||||
captVS: 0,
|
||||
captVs: 0,
|
||||
driftAngle: props.globals.initNode("/it-autoflight/internal/drift-angle-deg", 0, "DOUBLE"),
|
||||
flchActive: 0,
|
||||
fpa: props.globals.initNode("/it-autoflight/internal/fpa", 0, "DOUBLE"),
|
||||
hdg: props.globals.initNode("/it-autoflight/internal/heading-deg", 0, "DOUBLE"),
|
||||
hdgErrorDeg: props.globals.initNode("/it-autoflight/internal/heading-error-deg", 0, "DOUBLE"),
|
||||
hdgPredicted: props.globals.initNode("/it-autoflight/internal/heading-predicted", 0, "DOUBLE"),
|
||||
lnavAdvanceNm: props.globals.initNode("/it-autoflight/internal/lnav-advance-nm", 0, "DOUBLE"),
|
||||
minVS: props.globals.initNode("/it-autoflight/internal/min-vs", -500, "INT"),
|
||||
maxVS: props.globals.initNode("/it-autoflight/internal/max-vs", 500, "INT"),
|
||||
trk: props.globals.initNode("/it-autoflight/internal/track-deg", 0, "DOUBLE"),
|
||||
minVs: props.globals.initNode("/it-autoflight/internal/min-vs", -500, "INT"),
|
||||
maxVs: props.globals.initNode("/it-autoflight/internal/max-vs", 500, "INT"),
|
||||
vs: props.globals.initNode("/it-autoflight/internal/vert-speed-fpm", 0, "DOUBLE"),
|
||||
vsTemp: 0,
|
||||
};
|
||||
|
@ -155,7 +155,7 @@ var Text = {
|
|||
};
|
||||
|
||||
var Setting = {
|
||||
reducAglFt: props.globals.initNode("/it-autoflight/settings/accel-agl-ft", 1500, "INT"), # Changable from MCDU #eventually set to 1500 above runway
|
||||
reducAglFt: props.globals.initNode("/it-autoflight/settings/accel-agl-ft", 1500, "INT"), # Changable from MCDU, eventually set to 1500 above runway
|
||||
};
|
||||
|
||||
var Sound = {
|
||||
|
@ -166,12 +166,12 @@ var Sound = {
|
|||
# A3XX Custom
|
||||
var Custom = {
|
||||
apFdOn: 0,
|
||||
hdgTime: props.globals.getNode("modes/fcu/hdg-time", 1),
|
||||
ndTrkSel: [props.globals.getNode("instrumentation/efis[0]/trk-selected", 1), props.globals.getNode("instrumentation/efis[1]/trk-selected", 1)],
|
||||
hdgTime: props.globals.getNode("/modes/fcu/hdg-time", 1),
|
||||
ndTrkSel: [props.globals.getNode("/instrumentation/efis[0]/trk-selected", 1), props.globals.getNode("/instrumentation/efis[1]/trk-selected", 1)],
|
||||
showHdg: props.globals.initNode("/it-autoflight/custom/show-hdg", 1, "BOOL"),
|
||||
trkFpa: props.globals.initNode("/it-autoflight/custom/trk-fpa", 0, "BOOL"),
|
||||
Input: {
|
||||
spdManaged: props.globals.getNode("it-autoflight/input/spd-managed", 1),
|
||||
spdManaged: props.globals.getNode("/it-autoflight/input/spd-managed", 1),
|
||||
},
|
||||
Output: {
|
||||
fmaPower: props.globals.initNode("/it-autoflight/output/fma-pwr", 0, "BOOL"),
|
||||
|
@ -180,7 +180,7 @@ var Custom = {
|
|||
athrOff: props.globals.initNode("/it-autoflight/sound/athrsound", 0, "BOOL"),
|
||||
enableAthrOff: 0,
|
||||
},
|
||||
ThrLock: props.globals.getNode("systems/thrust/thr-locked", 1)
|
||||
ThrLock: props.globals.getNode("/systems/thrust/thr-locked", 1)
|
||||
};
|
||||
|
||||
var ITAF = {
|
||||
|
@ -215,13 +215,13 @@ var ITAF = {
|
|||
Output.thrMode.setValue(0);
|
||||
Output.lat.setValue(9);
|
||||
Output.vert.setValue(9);
|
||||
Internal.minVS.setValue(-500);
|
||||
Internal.maxVS.setValue(500);
|
||||
Internal.minVs.setValue(-500);
|
||||
Internal.maxVs.setValue(500);
|
||||
Internal.bankLimit.setValue(30);
|
||||
Internal.bankLimitAuto = 30;
|
||||
Internal.alt.setValue(10000);
|
||||
Internal.altCaptureActive = 0;
|
||||
Input.ias.setValue(100);
|
||||
Input.kts.setValue(100);
|
||||
Input.mach.setValue(0.5);
|
||||
Text.thr.setValue("THRUST");
|
||||
Text.arm.setValue(" ");
|
||||
|
@ -304,9 +304,9 @@ var ITAF = {
|
|||
Internal.altDiff = Internal.altTemp - Position.indicatedAltitudeFtTemp;
|
||||
|
||||
if (Output.vertTemp != 0 and Output.vertTemp != 2 and Output.vertTemp != 6 and Output.vertTemp != 9) {
|
||||
Internal.captVS = math.clamp(math.round(abs(Internal.vs.getValue()) / 5, 100), 50, 2500); # Capture limits
|
||||
Internal.captVs = math.clamp(math.round(abs(Internal.vs.getValue()) / 5, 100), 50, 2500); # Capture limits
|
||||
Custom.apFdOn = Output.ap1Temp or Output.ap2Temp or Output.fd1.getBoolValue() or Output.fd2.getBoolValue();
|
||||
if (abs(Internal.altDiff) <= Internal.captVS and !Gear.wow1Temp and !Gear.wow2Temp and Custom.apFdOn) {
|
||||
if (abs(Internal.altDiff) <= Internal.captVs and !Gear.wow1Temp and !Gear.wow2Temp and Custom.apFdOn) {
|
||||
if (Internal.altTemp >= Position.indicatedAltitudeFtTemp and Internal.vsTemp >= -25) { # Don't capture if we are going the wrong way
|
||||
me.setVertMode(3);
|
||||
} else if (Internal.altTemp < Position.indicatedAltitudeFtTemp and Internal.vsTemp <= 25) { # Don't capture if we are going the wrong way
|
||||
|
@ -366,7 +366,7 @@ var ITAF = {
|
|||
|
||||
# Misc
|
||||
if (Output.ap1Temp == 1 or Output.ap2Temp == 1) { # Trip AP off
|
||||
if (abs(Control.aileron.getValue()) >= 0.2 or abs(Control.elevator.getValue()) >= 0.2 or abs(Control.rudder.getValue()) >= 0.2) {
|
||||
if (abs(Controls.aileron.getValue()) >= 0.2 or abs(Controls.elevator.getValue()) >= 0.2 or abs(Controls.rudder.getValue()) >= 0.2) {
|
||||
fcu.apOff("hard", 0);
|
||||
}
|
||||
}
|
||||
|
@ -375,7 +375,7 @@ var ITAF = {
|
|||
Input.bankLimitSWTemp = Input.bankLimitSW.getValue();
|
||||
Velocities.trueAirspeedKtTemp = Velocities.trueAirspeedKt.getValue();
|
||||
FPLN.activeTemp = FPLN.active.getValue();
|
||||
FPLN.currentWPTemp = FPLN.currentWP.getValue();
|
||||
FPLN.currentWpTemp = FPLN.currentWp.getValue();
|
||||
|
||||
# Bank Limit
|
||||
if (Velocities.trueAirspeedKtTemp >= 420) {
|
||||
|
@ -397,14 +397,14 @@ var ITAF = {
|
|||
|
||||
# Waypoint Advance Logic
|
||||
if (flightPlanController.num[2].getValue() > 0 and FPLN.activeTemp == 1) {
|
||||
if ((FPLN.currentWPTemp + 1) < flightPlanController.num[2].getValue()) {
|
||||
if ((FPLN.currentWpTemp + 1) < flightPlanController.num[2].getValue()) {
|
||||
Velocities.groundspeedMps = Velocities.groundspeedKt.getValue() * 0.5144444444444;
|
||||
FPLN.wpFlyFrom = FPLN.currentWPTemp;
|
||||
FPLN.wpFlyFrom = FPLN.currentWpTemp;
|
||||
if (FPLN.wpFlyFrom < 0) {
|
||||
FPLN.wpFlyFrom = 0;
|
||||
}
|
||||
FPLN.currentCourse = fmgc.wpCourse[2][FPLN.wpFlyFrom].getValue();
|
||||
FPLN.wpFlyTo = FPLN.currentWPTemp + 1;
|
||||
FPLN.wpFlyTo = FPLN.currentWpTemp + 1;
|
||||
FPLN.nextCourse = fmgc.wpCourse[2][FPLN.wpFlyTo].getValue();
|
||||
FPLN.maxBankLimit = Internal.bankLimit.getValue();
|
||||
|
||||
|
@ -431,7 +431,7 @@ var ITAF = {
|
|||
flightPlanController.autoSequencing();
|
||||
}
|
||||
|
||||
#if (FPLN.wp0Dist.getValue() <= FPLN.turnDist and !Gear.wow1.getBoolValue() and fmgc.flightPlanController.flightplans[2].getWP(FPLN.currentWPTemp).fly_type == "flyBy") {
|
||||
#if (FPLN.wp0Dist.getValue() <= FPLN.turnDist and !Gear.wow1.getBoolValue() and fmgc.flightPlanController.flightplans[2].getWP(FPLN.currentWpTemp).fly_type == "flyBy") {
|
||||
# flightPlanController.autoSequencing();
|
||||
#} elsif (FPLN.wp0Dist.getValue() <= 0.1) {
|
||||
# flightPlanController.autoSequencing();
|
||||
|
@ -564,7 +564,7 @@ var ITAF = {
|
|||
Output.lnavArm.setBoolValue(0);
|
||||
Output.locArm.setBoolValue(0);
|
||||
Output.apprArm.setBoolValue(0);
|
||||
me.syncHDG();
|
||||
me.syncHdg();
|
||||
Output.lat.setValue(0);
|
||||
Custom.showHdg.setBoolValue(1);
|
||||
Text.lat.setValue("HDG");
|
||||
|
@ -609,7 +609,7 @@ var ITAF = {
|
|||
me.armTextCheck();
|
||||
}
|
||||
} else if (n == 3) {
|
||||
me.syncHDG();
|
||||
me.syncHdg();
|
||||
Output.lnavArm.setBoolValue(0);
|
||||
Custom.showHdg.setBoolValue(1);
|
||||
me.armTextCheck();
|
||||
|
@ -624,7 +624,7 @@ var ITAF = {
|
|||
Output.vert.setValue(0);
|
||||
me.resetClimbRateLim();
|
||||
Text.vert.setValue("ALT HLD");
|
||||
me.syncALT();
|
||||
me.syncAlt();
|
||||
me.armTextCheck();
|
||||
} else if (n == 1) { # V/S
|
||||
if (abs(Input.altDiff) >= 25) {
|
||||
|
@ -633,7 +633,7 @@ var ITAF = {
|
|||
Output.apprArm.setBoolValue(0);
|
||||
Output.vert.setValue(1);
|
||||
Text.vert.setValue("V/S");
|
||||
me.syncVS();
|
||||
me.syncVs();
|
||||
me.armTextCheck();
|
||||
} else {
|
||||
Output.apprArm.setBoolValue(0);
|
||||
|
@ -677,7 +677,7 @@ var ITAF = {
|
|||
Output.apprArm.setBoolValue(0);
|
||||
Output.vert.setValue(5);
|
||||
Text.vert.setValue("FPA");
|
||||
me.syncFPA();
|
||||
me.syncFpa();
|
||||
me.armTextCheck();
|
||||
} else {
|
||||
Output.apprArm.setBoolValue(0);
|
||||
|
@ -802,29 +802,29 @@ var ITAF = {
|
|||
setClimbRateLim: func() {
|
||||
Internal.vsTemp = Internal.vs.getValue();
|
||||
if (Internal.alt.getValue() >= Position.indicatedAltitudeFt.getValue()) {
|
||||
Internal.maxVS.setValue(math.round(Internal.vsTemp));
|
||||
Internal.minVS.setValue(-500);
|
||||
Internal.maxVs.setValue(math.round(Internal.vsTemp));
|
||||
Internal.minVs.setValue(-500);
|
||||
} else {
|
||||
Internal.maxVS.setValue(500);
|
||||
Internal.minVS.setValue(math.round(Internal.vsTemp));
|
||||
Internal.maxVs.setValue(500);
|
||||
Internal.minVs.setValue(math.round(Internal.vsTemp));
|
||||
}
|
||||
},
|
||||
resetClimbRateLim: func() {
|
||||
Internal.minVS.setValue(-500);
|
||||
Internal.maxVS.setValue(500);
|
||||
Internal.minVs.setValue(-500);
|
||||
Internal.maxVs.setValue(500);
|
||||
},
|
||||
takeoffGoAround: func() {
|
||||
Output.vertTemp = Output.vert.getValue();
|
||||
if ((Output.vertTemp == 2 or Output.vertTemp == 6) and Velocities.indicatedAirspeedKt.getValue() >= 80) {
|
||||
me.setLatMode(3);
|
||||
me.setVertMode(7); # Must be before kicking AP off
|
||||
Text.vert.setValue("G/A CLB");
|
||||
Input.ktsMach.setBoolValue(0);
|
||||
me.syncKtsGa();
|
||||
if (Gear.wow1.getBoolValue() or Gear.wow2.getBoolValue()) {
|
||||
me.ap1Master(0);
|
||||
me.ap2Master(0);
|
||||
}
|
||||
me.setLatMode(3);
|
||||
me.setVertMode(7);
|
||||
Text.vert.setValue("G/A CLB");
|
||||
Input.ktsMach.setBoolValue(0);
|
||||
me.syncIAS();
|
||||
} else if (Gear.wow1Temp or Gear.wow2Temp) {
|
||||
me.athrMaster(1);
|
||||
if (Output.lat.getValue() != 5) { # Don't accidently disarm LNAV
|
||||
|
@ -845,23 +845,26 @@ var ITAF = {
|
|||
Text.arm.setValue(" ");
|
||||
}
|
||||
},
|
||||
syncIAS: func() {
|
||||
Input.ias.setValue(math.clamp(math.round(Velocities.indicatedAirspeedKt.getValue()), 100, 350));
|
||||
syncKts: func() {
|
||||
Input.kts.setValue(math.clamp(math.round(Velocities.indicatedAirspeedKt.getValue()), 100, 350));
|
||||
},
|
||||
syncKtsGa: func() { # Same as syncKts, except doesn't go below V2
|
||||
Input.kts.setValue(math.clamp(math.round(Velocities.indicatedAirspeedKt.getValue()), FMGCInternal.v2, 350));
|
||||
},
|
||||
syncMach: func() {
|
||||
Input.mach.setValue(math.clamp(math.round(Velocities.indicatedMach.getValue(), 0.001), 0.5, 0.82));
|
||||
},
|
||||
syncHDG: func() {
|
||||
syncHdg: func() {
|
||||
Input.hdg.setValue(math.round(Internal.hdgPredicted.getValue())); # Switches to track automatically
|
||||
},
|
||||
syncALT: func() {
|
||||
syncAlt: func() {
|
||||
Input.alt.setValue(math.clamp(math.round(Internal.altPredicted.getValue(), 100), 0, 50000));
|
||||
Internal.alt.setValue(math.clamp(math.round(Internal.altPredicted.getValue(), 100), 0, 50000));
|
||||
},
|
||||
syncVS: func() {
|
||||
syncVs: func() {
|
||||
Input.vs.setValue(math.clamp(math.round(Internal.vs.getValue(), 100), -6000, 6000));
|
||||
},
|
||||
syncFPA: func() {
|
||||
syncFpa: func() {
|
||||
Input.fpa.setValue(math.clamp(math.round(Internal.fpa.getValue(), 0.1), -9.9, 9.9));
|
||||
},
|
||||
# Custom Stuff Below
|
||||
|
@ -978,7 +981,7 @@ setlistener("/it-autoflight/input/kts-mach", func {
|
|||
if (Input.ktsMach.getBoolValue()) {
|
||||
ITAF.syncMach();
|
||||
} else {
|
||||
ITAF.syncIAS();
|
||||
ITAF.syncKts();
|
||||
}
|
||||
}, 0, 0);
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ var loopFMA = maketimer(0.05, func {
|
|||
var engstate2 = getprop("engines/engine[1]/state");
|
||||
if (((state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)))) and (engstate1 == 3 or engstate2 == 3)) {
|
||||
# RWY Engagement would go here, but automatic ILS selection is not simulated yet.
|
||||
if (wow and getprop("FMGC/internal/v2-set") == 1 and getprop("it-autoflight/output/vert") != 7) {
|
||||
if (wow and FMGCInternal.v2set and getprop("it-autoflight/output/vert") != 7) {
|
||||
ITAF.setVertMode(7);
|
||||
setprop("it-autoflight/mode/vert", "T/O CLB");
|
||||
}
|
||||
|
@ -343,15 +343,11 @@ setlistener("/it-autoflight/mode/vert", func {
|
|||
altvert();
|
||||
});
|
||||
|
||||
setlistener("/FMGC/internal/v2-set", func {
|
||||
updatePitchArm2();
|
||||
});
|
||||
|
||||
var updatePitchArm2 = func {
|
||||
var newvertarm = getprop("modes/pfd/fma/pitch-mode2-armed");
|
||||
if (newvertarm != "CLB" and getprop("FMGC/internal/v2-set") == 1) {
|
||||
if (newvertarm != "CLB" and FMGCInternal.v2set) {
|
||||
setprop("modes/pfd/fma/pitch-mode2-armed", "CLB");
|
||||
} else if (newvertarm != " " and getprop("FMGC/internal/v2-set") != 1) {
|
||||
} else if (newvertarm != " " and FMGCInternal.v2set != 1) {
|
||||
setprop("modes/pfd/fma/pitch-mode2-armed", " ");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
# A3XX FMGC/Autoflight
|
||||
# Joshua Davidson (Octal450) and Jonathan Redpath (legoboyvdlp)
|
||||
|
||||
# Copyright (c) 2020 Josh Davidson (Octal450) and Matthew Maring (mattmaring)
|
||||
# Copyright (c) 2020 Josh Davidson (Octal450), Jonathan Redpath (legoboyvdlp), and Matthew Maring (mattmaring)
|
||||
|
||||
##################
|
||||
# Init Functions #
|
||||
|
@ -104,9 +102,9 @@ setprop("/FMGC/internal/mng-spd", 157);
|
|||
setprop("/FMGC/internal/mng-spd-cmd", 157);
|
||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
||||
setprop("/FMGC/internal/mach-switchover", 0);
|
||||
setprop("it-autoflight/settings/accel-agl-ft", 1500); #eventually set to 1500 above runway
|
||||
setprop("it-autoflight/internal/vert-speed-fpm", 0);
|
||||
setprop("it-autoflight/output/fma-pwr", 0);
|
||||
setprop("/it-autoflight/settings/accel-agl-ft", 1500); #eventually set to 1500 above runway
|
||||
setprop("/it-autoflight/internal/vert-speed-fpm", 0);
|
||||
setprop("/it-autoflight/output/fma-pwr", 0);
|
||||
setprop("instrumentation/nav[0]/nav-id", "XXX");
|
||||
setprop("instrumentation/nav[1]/nav-id", "XXX");
|
||||
setprop("/FMGC/internal/ils1-mcdu", "XXX/999.99");
|
||||
|
@ -125,8 +123,7 @@ var FMGCinit = func {
|
|||
setprop("/FMGC/internal/mng-spd-cmd", 157);
|
||||
setprop("/FMGC/internal/mng-kts-mach", 0);
|
||||
setprop("/FMGC/internal/mach-switchover", 0);
|
||||
setprop("it-autoflight/settings/accel-agl-ft", 1500); #eventually set to 1500 above runway
|
||||
setprop("/FMGC/internal/decel", 0);
|
||||
setprop("/it-autoflight/settings/accel-agl-ft", 1500); #eventually set to 1500 above runway
|
||||
setprop("/FMGC/internal/loc-source", "NAV0");
|
||||
setprop("/FMGC/internal/optalt", 0);
|
||||
setprop("/FMGC/internal/landing-time", -99);
|
||||
|
@ -141,10 +138,21 @@ var FMGCinit = func {
|
|||
}
|
||||
|
||||
var FMGCInternal = {
|
||||
v1: 0,
|
||||
v1set: 0,
|
||||
vr: 0,
|
||||
vrset: 0,
|
||||
v2: 0,
|
||||
v2set: 0,
|
||||
transAlt: 18000,
|
||||
transAltSet: 0,
|
||||
};
|
||||
|
||||
var FMGCNodes = {
|
||||
v1: props.globals.initNode("/FMGC/internal/v1", 0, "DOUBLE"),
|
||||
v1set: props.globals.initNode("/FMGC/internal/v1-set", 0, "BOOL"),
|
||||
};
|
||||
|
||||
############
|
||||
# FBW Trim #
|
||||
############
|
||||
|
@ -456,7 +464,7 @@ var masterFMGC = maketimer(0.2, func {
|
|||
if (phase == 4 and getprop("/FMGC/internal/decel")) {
|
||||
setprop("/FMGC/status/phase", 5);
|
||||
}
|
||||
|
||||
|
||||
if (flightPlanController.num[2].getValue() > 0 and getprop("/FMGC/flightplan[2]/active") == 1 and flightPlanController.arrivalDist <= 15 and (modelat == "NAV" or modelat == "LOC" or modelat == "LOC*") and aglalt < 9500) { #todo decel pseudo waypoint
|
||||
setprop("/FMGC/internal/decel", 1);
|
||||
} else if (getprop("/FMGC/internal/decel") == 1 and (phase == 0 or phase == 6)) {
|
||||
|
@ -466,7 +474,7 @@ var masterFMGC = maketimer(0.2, func {
|
|||
if ((phase == "5") and state1 == "TOGA" and state2 == "TOGA") {
|
||||
setprop("/FMGC/status/phase", 6);
|
||||
setprop("systems/pressurization/mode", "TO");
|
||||
setprop("it-autoflight/input/toga", 1);
|
||||
setprop("/it-autoflight/input/toga", 1);
|
||||
}
|
||||
|
||||
if (phase == "6" and alt >= accel_agl_ft) { # todo when insert altn or new dest
|
||||
|
@ -716,7 +724,7 @@ var reset_FMGC = func {
|
|||
setprop("/FMGC/status/phase", 0);
|
||||
fd1 = getprop("/it-autoflight/input/fd1");
|
||||
fd2 = getprop("/it-autoflight/input/fd2");
|
||||
spd = getprop("/it-autoflight/input/spd-kts");
|
||||
spd = getprop("/it-autoflight/input/kts");
|
||||
hdg = getprop("/it-autoflight/input/hdg");
|
||||
alt = getprop("/it-autoflight/input/alt");
|
||||
ITAF.init();
|
||||
|
@ -728,7 +736,7 @@ var reset_FMGC = func {
|
|||
mcdu.MCDU_reset(1);
|
||||
setprop("it-autoflight/input/fd1", fd1);
|
||||
setprop("it-autoflight/input/fd2", fd2);
|
||||
setprop("it-autoflight/input/spd-kts", spd);
|
||||
setprop("it-autoflight/input/kts", spd);
|
||||
setprop("it-autoflight/input/hdg", hdg);
|
||||
setprop("it-autoflight/input/alt", alt);
|
||||
setprop("systems/pressurization/mode", "GN");
|
||||
|
@ -758,11 +766,11 @@ var reset_FMGC = func {
|
|||
|
||||
var various = maketimer(1, func {
|
||||
if (getprop("/engines/engine[0]/state") == 3 and getprop("/engines/engine[1]/state") != 3) {
|
||||
setprop("it-autoflight/settings/accel-agl-ft", getprop("/FMGC/internal/eng-out-reduc"));
|
||||
setprop("/it-autoflight/settings/accel-agl-ft", getprop("/FMGC/internal/eng-out-reduc"));
|
||||
} else if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") == 3) {
|
||||
setprop("it-autoflight/settings/accel-agl-ft", getprop("/FMGC/internal/eng-out-reduc"));
|
||||
setprop("/it-autoflight/settings/accel-agl-ft", getprop("/FMGC/internal/eng-out-reduc"));
|
||||
} else {
|
||||
setprop("it-autoflight/settings/accel-agl-ft", getprop("/FMGC/internal/accel-agl-ft"));
|
||||
setprop("/it-autoflight/settings/accel-agl-ft", getprop("/FMGC/internal/accel-agl-ft"));
|
||||
}
|
||||
|
||||
setprop("/FMGC/internal/gw", math.round(getprop("/fdm/jsbsim/inertia/weight-lbs"), 100));
|
||||
|
@ -870,8 +878,8 @@ var ManagedSPD = maketimer(0.25, func {
|
|||
mngktsmach = getprop("/FMGC/internal/mng-kts-mach");
|
||||
mng_spd = getprop("/FMGC/internal/mng-spd");
|
||||
mng_spd_cmd = getprop("/FMGC/internal/mng-spd-cmd");
|
||||
kts_sel = getprop("/it-autoflight/input/spd-kts");
|
||||
mach_sel = getprop("/it-autoflight/input/spd-mach");
|
||||
kts_sel = getprop("/it-autoflight/input/kts");
|
||||
mach_sel = getprop("/it-autoflight/input/mach");
|
||||
srsSPD = getprop("/it-autoflight/settings/togaspd");
|
||||
phase = getprop("/FMGC/status/phase"); # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done
|
||||
flap = getprop("/controls/flight/flaps-pos");
|
||||
|
@ -967,17 +975,17 @@ var ManagedSPD = maketimer(0.25, func {
|
|||
}
|
||||
|
||||
if (ktsmach and !mngktsmach) {
|
||||
setprop("it-autoflight/input/kts-mach", 0);
|
||||
setprop("/it-autoflight/input/kts-mach", 0);
|
||||
} else if (!ktsmach and mngktsmach) {
|
||||
setprop("it-autoflight/input/kts-mach", 1);
|
||||
setprop("/it-autoflight/input/kts-mach", 1);
|
||||
}
|
||||
|
||||
mng_spd = getprop("/FMGC/internal/mng-spd");
|
||||
|
||||
if (kts_sel != mng_spd and !ktsmach) {
|
||||
setprop("it-autoflight/input/spd-kts", mng_spd);
|
||||
setprop("/it-autoflight/input/kts", mng_spd);
|
||||
} else if (mach_sel != mng_spd and ktsmach) {
|
||||
setprop("it-autoflight/input/spd-mach", mng_spd);
|
||||
setprop("/it-autoflight/input/mach", mng_spd);
|
||||
}
|
||||
} else {
|
||||
ManagedSPD.stop();
|
||||
|
|
|
@ -94,8 +94,8 @@ var fplnItem = {
|
|||
return sprintf("%03.0f", math.round(me.trk));
|
||||
},
|
||||
getSpd: func() {
|
||||
if (me.index == 0 and getprop("FMGC/internal/v1-set")) {
|
||||
return [sprintf("%3.0f", math.round(getprop("FMGC/internal/v1"))), "mag"];
|
||||
if (me.index == 0 and fmgc.FMGCInternal.v1set) {
|
||||
return [sprintf("%3.0f", math.round(fmgc.FMGCInternal.v1)), "mag"];
|
||||
} elsif (me.wp.speed_cstr != nil and me.wp.speed_cstr != 0) {
|
||||
return [sprintf("%3.0f", me.wp.speed_cstr), "mag"];
|
||||
} else {
|
||||
|
|
|
@ -136,12 +136,13 @@ var MCDU_reset = func(i) {
|
|||
# PERF
|
||||
|
||||
#PERF TO
|
||||
setprop("/FMGC/internal/v1", 0);
|
||||
setprop("/FMGC/internal/v1-set", 0);
|
||||
setprop("/FMGC/internal/vr", 0);
|
||||
setprop("/FMGC/internal/vr-set", 0);
|
||||
setprop("/FMGC/internal/v2", 0);
|
||||
setprop("/FMGC/internal/v2-set", 0);
|
||||
fmgc.FMGCInternal.v1 = 0;
|
||||
fmgc.FMGCInternal.v1set = 0;
|
||||
fmgc.FMGCInternal.vr = 0;
|
||||
fmgc.FMGCInternal.vrset = 0;
|
||||
fmgc.FMGCInternal.v2 = 0;
|
||||
fmgc.FMGCInternal.v2set = 0;
|
||||
|
||||
setprop("FMGC/internal/accel-agl-ft", "1500"); #eventually set to 1500 above runway
|
||||
setprop("/MCDUC/thracc-set", 0);
|
||||
setprop("FMGC/internal/to-flap", 0);
|
||||
|
|
|
@ -8,15 +8,21 @@ var perfTOInput = func(key, i) {
|
|||
if (key == "L1") {
|
||||
if (getprop("/FMGC/status/phase") != 1) {
|
||||
if (scratchpad == "CLR") {
|
||||
setprop("/FMGC/internal/v1", 0);
|
||||
setprop("/FMGC/internal/v1-set", 0);
|
||||
fmgc.FMGCInternal.v1 = 0;
|
||||
fmgc.FMGCInternal.v1set = 0;
|
||||
fmgc.FMGCNodes.v1.setValue(0);
|
||||
fmgc.FMGCNodes.v1set.setValue(0);
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
var tfs = size(scratchpad);
|
||||
if (tfs == 3) {
|
||||
if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 350) {
|
||||
setprop("/FMGC/internal/v1", scratchpad);
|
||||
setprop("/FMGC/internal/v1-set", 1);
|
||||
fmgc.FMGCInternal.v1 = scratchpad;
|
||||
fmgc.FMGCInternal.v1set = 1;
|
||||
|
||||
# for sounds:
|
||||
fmgc.FMGCNodes.v1.setValue(scratchpad);
|
||||
fmgc.FMGCNodes.v1set.setValue(1);
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
|
@ -31,15 +37,15 @@ var perfTOInput = func(key, i) {
|
|||
} else if (key == "L2") {
|
||||
if (getprop("/FMGC/status/phase") != 1) {
|
||||
if (scratchpad == "CLR") {
|
||||
setprop("/FMGC/internal/vr", 0);
|
||||
setprop("/FMGC/internal/vr-set", 0);
|
||||
fmgc.FMGCInternal.vr = 0;
|
||||
fmgc.FMGCInternal.vrset = 0;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
var tfs = size(scratchpad);
|
||||
if (tfs == 3) {
|
||||
if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 350) {
|
||||
setprop("/FMGC/internal/vr", scratchpad);
|
||||
setprop("/FMGC/internal/vr-set", 1);
|
||||
fmgc.FMGCInternal.vr = scratchpad;
|
||||
fmgc.FMGCInternal.vrset = 1;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
|
@ -54,17 +60,18 @@ var perfTOInput = func(key, i) {
|
|||
} else if (key == "L3") {
|
||||
if (getprop("/FMGC/status/phase") != 1) {
|
||||
if (scratchpad == "CLR") {
|
||||
setprop("/FMGC/internal/v2", 0);
|
||||
setprop("/FMGC/internal/v2-set", 0);
|
||||
setprop("it-autoflight/settings/togaspd", 157);
|
||||
fmgc.FMGCInternal.v2 = 0;
|
||||
fmgc.FMGCInternal.v2set = 0;
|
||||
setprop("/it-autoflight/settings/togaspd", 157);
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
var tfs = size(scratchpad);
|
||||
if (tfs == 3) {
|
||||
if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 350) {
|
||||
setprop("/FMGC/internal/v2", scratchpad);
|
||||
setprop("/FMGC/internal/v2-set", 1);
|
||||
setprop("it-autoflight/settings/togaspd", scratchpad);
|
||||
fmgc.FMGCInternal.v2 = scratchpad;
|
||||
fmgc.FMGCInternal.v2set = 1;
|
||||
fmgc.updatePitchArm2();
|
||||
setprop("/it-autoflight/settings/togaspd", scratchpad);
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
|
|
|
@ -788,7 +788,7 @@
|
|||
<summer name="/systems/fuel/internal/apu-flow-rate">
|
||||
<input>/systems/fuel/internal/left-wing-tank-apu</input>
|
||||
<input>/systems/fuel/internal/center-tank-apu</input>
|
||||
<input>//systems/fuel/internal/right-wing-tank-apu</input>
|
||||
<input>/systems/fuel/internal/right-wing-tank-apu</input>
|
||||
<output>propulsion/tank[7]/external-flow-rate-pps</output>
|
||||
</summer>
|
||||
</channel>
|
||||
|
|
|
@ -1,109 +1,50 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!-- Copyright (c) 2020 Josh Davidson (Octal450) -->
|
||||
|
||||
<!-- IT-AUTOFLIGHT -->
|
||||
<!-- Copyright (c) 2020 Joshua Davidson (Octal450) -->
|
||||
|
||||
<PropertyList>
|
||||
|
||||
<!-- Predictors -->
|
||||
|
||||
<predict-simple>
|
||||
<name>IAS 5 SECOND PREDICTOR</name>
|
||||
<name>IAS 5 Second Predictor</name>
|
||||
<debug>false</debug>
|
||||
<input>/instrumentation/airspeed-indicator/indicated-speed-kt</input>
|
||||
<output>/it-autoflight/internal/lookahead-5-sec-airspeed-kt</output>
|
||||
<seconds>5.0</seconds>
|
||||
<filter-gain>0.0</filter-gain>
|
||||
<output>/it-autoflight/internal/kts-predicted-5</output>
|
||||
<seconds>5</seconds>
|
||||
<filter-gain>0</filter-gain>
|
||||
</predict-simple>
|
||||
|
||||
<predict-simple>
|
||||
<name>IAS 10 SECOND PREDICTOR</name>
|
||||
<name>MACH 5 Second Predictor</name>
|
||||
<debug>false</debug>
|
||||
<input>/instrumentation/airspeed-indicator/indicated-mach</input>
|
||||
<output>/it-autoflight/internal/mach-predicted-5</output>
|
||||
<seconds>5</seconds>
|
||||
<filter-gain>0</filter-gain>
|
||||
</predict-simple>
|
||||
|
||||
<predict-simple>
|
||||
<name>IAS 15 Second Predictor</name>
|
||||
<debug>false</debug>
|
||||
<input>/instrumentation/airspeed-indicator/indicated-speed-kt</input>
|
||||
<output>/it-autoflight/internal/lookahead-10-sec-airspeed-kt</output>
|
||||
<seconds>10.0</seconds>
|
||||
<filter-gain>0.0</filter-gain>
|
||||
<output>/it-autoflight/internal/kts-predicted-15</output>
|
||||
<seconds>15</seconds>
|
||||
<filter-gain>0</filter-gain>
|
||||
</predict-simple>
|
||||
|
||||
<predict-simple>
|
||||
<name>IAS 15 SECOND PREDICTOR</name>
|
||||
<debug>false</debug>
|
||||
<input>/instrumentation/airspeed-indicator/indicated-speed-kt</input>
|
||||
<output>/it-autoflight/internal/lookahead-15-sec-airspeed-kt</output>
|
||||
<seconds>15.0</seconds>
|
||||
<filter-gain>0.0</filter-gain>
|
||||
</predict-simple>
|
||||
|
||||
<predict-simple>
|
||||
<name>MACH 5 SECOND PREDICTOR</name>
|
||||
<name>MACH 15 Second Predictor</name>
|
||||
<debug>false</debug>
|
||||
<input>/instrumentation/airspeed-indicator/indicated-mach</input>
|
||||
<output>/it-autoflight/internal/lookahead-5-sec-mach</output>
|
||||
<seconds>5.0</seconds>
|
||||
<filter-gain>0.0</filter-gain>
|
||||
</predict-simple>
|
||||
|
||||
<predict-simple>
|
||||
<name>MACH 10 SECOND PREDICTOR</name>
|
||||
<debug>false</debug>
|
||||
<input>/instrumentation/airspeed-indicator/indicated-mach</input>
|
||||
<output>/it-autoflight/internal/lookahead-10-sec-mach</output>
|
||||
<seconds>10.0</seconds>
|
||||
<filter-gain>0.0</filter-gain>
|
||||
</predict-simple>
|
||||
|
||||
<predict-simple>
|
||||
<name>MACH 15 SECOND PREDICTOR</name>
|
||||
<debug>false</debug>
|
||||
<input>/instrumentation/airspeed-indicator/indicated-mach</input>
|
||||
<output>/it-autoflight/internal/lookahead-15-sec-mach</output>
|
||||
<seconds>15.0</seconds>
|
||||
<filter-gain>0.0</filter-gain>
|
||||
<output>/it-autoflight/internal/mach-predicted-15</output>
|
||||
<seconds>15</seconds>
|
||||
<filter-gain>0</filter-gain>
|
||||
</predict-simple>
|
||||
|
||||
<!-- Autopilot Helpers/Calculators -->
|
||||
|
||||
<filter>
|
||||
<name>AUTOLAND FD FPM</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/position/gear-agl-ft</property>
|
||||
<entry><ind>100</ind><dep>-650</dep></entry>
|
||||
<entry><ind> 50</ind><dep>-500</dep></entry>
|
||||
<entry><ind> 45</ind><dep> -70</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/target-fpm-c2</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>AUTOLAND FPM</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/position/gear-agl-ft</property>
|
||||
<entry><ind>100</ind><dep>-650</dep></entry>
|
||||
<entry><ind> 50</ind><dep>-500</dep></entry>
|
||||
<entry><ind> 40</ind><dep>-400</dep></entry>
|
||||
<entry><ind> 30</ind><dep>-300</dep></entry>
|
||||
<entry><ind> 20</ind><dep>-180</dep></entry>
|
||||
<entry><ind> 10</ind><dep>-100</dep></entry>
|
||||
<entry><ind> 5</ind><dep> -70</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/target-fpm-c</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>FMGC MNG SPD</name>
|
||||
<name>FMGC Managed Knots</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
|
@ -124,7 +65,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>FMGC MNG MACH</name>
|
||||
<name>FMGC Managed Mach</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
|
@ -149,7 +90,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>FMGC Target IAS PFD</name>
|
||||
<name>FMGC Target Knots PFD</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
|
@ -159,7 +100,7 @@
|
|||
<value>0</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/input/spd-kts</property>
|
||||
<property>/it-autoflight/input/kts</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
|
@ -174,7 +115,7 @@
|
|||
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
|
||||
</div>
|
||||
<property>/it-autoflight/input/spd-mach</property>
|
||||
<property>/it-autoflight/input/mach</property>
|
||||
</product>
|
||||
</expression>
|
||||
</input>
|
||||
|
@ -182,20 +123,11 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>KTS INPUT FILTER</name>
|
||||
<name>Knots Input Filter</name>
|
||||
<debug>false</debug>
|
||||
<type>noise-spike</type>
|
||||
<feedback-if-disabled>true</feedback-if-disabled>
|
||||
<initialize-to>output</initialize-to>
|
||||
<input>
|
||||
<condition>
|
||||
<not-equals>
|
||||
<property>/it-autoflight/mode/vert</property>
|
||||
<value>T/O CLB</value>
|
||||
</not-equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/input/spd-kts</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
|
@ -203,9 +135,31 @@
|
|||
<value>T/O CLB</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/settings/togaspd</property>
|
||||
<expression>
|
||||
<sum>
|
||||
<property>/it-autoflight/settings/togaspd</property>
|
||||
<value>10</value>
|
||||
</sum>
|
||||
</expression>
|
||||
</input>
|
||||
<input>/it-autoflight/input/kts</input>
|
||||
<output>/it-autoflight/internal/flch-kts</output>
|
||||
<min>
|
||||
<expression>
|
||||
<difference>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
|
||||
<value>25</value>
|
||||
</difference>
|
||||
</expression>
|
||||
</min>
|
||||
<max>
|
||||
<expression>
|
||||
<sum>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
|
||||
<value>25</value>
|
||||
</sum>
|
||||
</expression>
|
||||
</max>
|
||||
<max-rate-of-change>
|
||||
<condition>
|
||||
<and>
|
||||
|
@ -239,13 +193,29 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>MACH INPUT FILTER</name>
|
||||
<name>Mach Input Filter</name>
|
||||
<debug>false</debug>
|
||||
<type>noise-spike</type>
|
||||
<feedback-if-disabled>true</feedback-if-disabled>
|
||||
<initialize-to>output</initialize-to>
|
||||
<input>/it-autoflight/input/spd-mach</input>
|
||||
<input>/it-autoflight/input/mach</input>
|
||||
<output>/it-autoflight/internal/flch-mach</output>
|
||||
<min>
|
||||
<expression>
|
||||
<difference>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
|
||||
<value>0.045</value>
|
||||
</difference>
|
||||
</expression>
|
||||
</min>
|
||||
<max>
|
||||
<expression>
|
||||
<sum>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
|
||||
<value>0.045</value>
|
||||
</sum>
|
||||
</expression>
|
||||
</max>
|
||||
<max-rate-of-change>
|
||||
<condition>
|
||||
<and>
|
||||
|
@ -273,13 +243,13 @@
|
|||
</equals>
|
||||
</and>
|
||||
</condition>
|
||||
<value>0.05</value>
|
||||
<value>0.04</value>
|
||||
</max-rate-of-change>
|
||||
<max-rate-of-change>1</max-rate-of-change>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>IAS SYNC</name>
|
||||
<name>Knots Sync</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<enable>
|
||||
|
@ -300,11 +270,11 @@
|
|||
</floor>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/input/spd-kts</output>
|
||||
<output>/it-autoflight/input/kts</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>MACH SYNC</name>
|
||||
<name>Mach Sync</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<enable>
|
||||
|
@ -331,11 +301,11 @@
|
|||
</div>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/input/spd-mach</output>
|
||||
<output>/it-autoflight/input/mach</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>HEADING DEG</name>
|
||||
<name>Heading Deg</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
|
@ -351,7 +321,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>TRACK DEG</name>
|
||||
<name>Track Deg</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
|
@ -385,7 +355,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>DRIFT ANGLE</name>
|
||||
<name>Drift Angle</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
|
@ -407,7 +377,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>HEADING ERROR DEG</name>
|
||||
<name>Heading Error Deg</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
|
@ -479,7 +449,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>VERT SPEED SYNC</name>
|
||||
<name>Vertical Speed Sync</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
|
@ -505,7 +475,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>VERT SPEED FILTER</name>
|
||||
<name>Vertical Speed Filter</name>
|
||||
<debug>false</debug>
|
||||
<type>noise-spike</type>
|
||||
<feedback-if-disabled>true</feedback-if-disabled>
|
||||
|
@ -545,7 +515,37 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>NAV ERROR DEG</name>
|
||||
<name>VS Abs</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<update-interval-secs type="double">0.02</update-interval-secs>
|
||||
<input>
|
||||
<expression>
|
||||
<abs>
|
||||
<property>/it-autoflight/input/vs</property>
|
||||
</abs>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/input/vs-abs</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>FPA Abs</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<update-interval-secs type="double">0.02</update-interval-secs>
|
||||
<input>
|
||||
<expression>
|
||||
<abs>
|
||||
<property>/it-autoflight/input/fpa</property>
|
||||
</abs>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/input/fpa-abs</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Nav Error Deg</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
|
@ -564,7 +564,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>INTERNAL VERTICAL SPEED COMPUTER</name>
|
||||
<name>Internal Vertical Speed</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
|
@ -573,92 +573,12 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>INTERNAL VERTICAL SPEED COMPUTER SYNC 4</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<enable>
|
||||
<condition>
|
||||
<not>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>4</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>7</value>
|
||||
</equals>
|
||||
</or>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</not>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/it-autoflight/internal/vert-speed-fpm</input>
|
||||
<output>/it-autoflight/internal/target-fpm-b</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>INTERNAL VERTICAL SPEED COMPUTER SYNC 5</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<enable>
|
||||
<condition>
|
||||
<not>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>5</value>
|
||||
</equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</not>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/it-autoflight/internal/vert-speed-fpm</input>
|
||||
<output>/it-autoflight/internal/target-fpm-d</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>NAV1 G/S FPM Calc</name>
|
||||
<name>Nav G/S FPM Calc</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>/instrumentation/nav[0]/gs-rate-of-climb-fpm</input>
|
||||
<output>/it-autoflight/internal/nav1-rate-of-climb-fpm</output>
|
||||
<output>/it-autoflight/internal/nav-rate-of-climb-fpm</output>
|
||||
<min>
|
||||
<condition>
|
||||
<not-equals>
|
||||
|
@ -681,7 +601,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>HEADING PREDICTOR STAGE 1</name>
|
||||
<name>Heading Predictor Stage 1</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
|
@ -731,7 +651,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>HEADING PREDICTOR STAGE 2</name>
|
||||
<name>Heading Predictor Stage 2</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
|
@ -768,7 +688,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>ALTITUDE PREDICTOR</name>
|
||||
<name>Altitude Predictor</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
|
@ -787,7 +707,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>INTERNAL FPA COMPUTER</name>
|
||||
<name>Internal FPA Computer</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
|
@ -803,26 +723,10 @@
|
|||
</filter>
|
||||
|
||||
<!-- Flight Director -->
|
||||
|
||||
<filter>
|
||||
<name>IT-CONTROLLER: TARGET ROLL CMD</name>
|
||||
<name>FD Target Roll Filter</name>
|
||||
<debug>false</debug>
|
||||
<type>noise-spike</type>
|
||||
<input>
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/lat</property>
|
||||
<value>4</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/lat</property>
|
||||
<value>5</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
<value>0</value>
|
||||
</input>
|
||||
<input>/it-autoflight/internal/target-roll-deg</input>
|
||||
<output>/it-autoflight/internal/target-roll-fd</output>
|
||||
<max-rate-of-change>
|
||||
|
@ -844,16 +748,16 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>FD: ROLL</name>
|
||||
<name>FD Roll</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<dif>
|
||||
<difference>
|
||||
<property>/it-autoflight/internal/target-roll-fd</property>
|
||||
<property>/orientation/roll-deg</property>
|
||||
</dif>
|
||||
</difference>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/fd/roll-bar</output>
|
||||
|
@ -862,16 +766,16 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>FD: PITCH</name>
|
||||
<name>FD Pitch</name>
|
||||
<debug>false</debug>
|
||||
<type>noise-spike</type>
|
||||
<input>
|
||||
<expression>
|
||||
<product>
|
||||
<dif>
|
||||
<difference>
|
||||
<property>/it-autoflight/internal/target-common-fpm</property>
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
</dif>
|
||||
</difference>
|
||||
<table>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
|
||||
<entry><ind>0.20</ind><dep>0.004</dep></entry>
|
||||
|
@ -882,21 +786,8 @@
|
|||
</input>
|
||||
<output>/it-autoflight/fd/pitch-bar</output>
|
||||
<min>-15</min>
|
||||
<max>30</max>
|
||||
<max>15</max>
|
||||
<max-rate-of-change>10</max-rate-of-change>
|
||||
</filter>
|
||||
|
||||
<logic>
|
||||
<!-- somewhat confusing : this input is not 'are the flaps in landing configration', but rather,
|
||||
'are the flaps NOT in a landing configuration'. There is a configuration bit to flip
|
||||
the sense of this, if required. -->
|
||||
<input>
|
||||
<less-than>
|
||||
<property>/controls/flight/flaps</property>
|
||||
<value>0.8</value>
|
||||
</less-than>
|
||||
</input>
|
||||
<output>/instrumentation/mk-viii/inputs/discretes/landing-flaps</output>
|
||||
</logic>
|
||||
|
||||
</PropertyList>
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!-- Copyright (c) 2020 Josh Davidson (Octal450) -->
|
||||
|
||||
<!-- IT-AUTOFLIGHT -->
|
||||
<!-- Copyright (c) 2020 Josh Davidson (Octal450) -->
|
||||
|
||||
<PropertyList>
|
||||
|
||||
<!-- Pitch Axis -->
|
||||
|
||||
<filter>
|
||||
<name>ALTITUDE CAPTURE/HOLD</name>
|
||||
<name>IT-CONTROLLER: Altitude Capture/Hold</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>-5</gain>
|
||||
|
@ -21,148 +19,54 @@
|
|||
</sum>
|
||||
</expression>
|
||||
</input>
|
||||
<reference>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>8</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/mng-alt</property>
|
||||
</reference>
|
||||
<reference>/it-autoflight/internal/alt</reference>
|
||||
<output>/it-autoflight/internal/target-fpm</output>
|
||||
<output>/it-autoflight/internal/target-fpm-alt</output>
|
||||
<min>/it-autoflight/internal/min-vs</min>
|
||||
<max>/it-autoflight/internal/max-vs</max>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>FPA ERROR</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>/it-autoflight/internal/fpa</input>
|
||||
<reference>/it-autoflight/input/fpa</reference>
|
||||
<output>/it-autoflight/internal/fpa-error</output>
|
||||
<min>-1.5</min>
|
||||
<max>1.5</max>
|
||||
</filter>
|
||||
|
||||
<pid-controller>
|
||||
<name>FPA HOLD</name>
|
||||
<debug>false</debug>
|
||||
<enable>
|
||||
<condition>
|
||||
<and>
|
||||
<logic>
|
||||
<input>
|
||||
<and>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>5</value>
|
||||
<value>4</value>
|
||||
</equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</and>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/it-autoflight/internal/fpa-error</input>
|
||||
<reference>0</reference>
|
||||
<output>/it-autoflight/internal/target-fpm-d</output>
|
||||
<config>
|
||||
<Kp>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/fdm/jsbsim/velocities/vc-kts</property>
|
||||
<entry><ind>140</ind><dep>120</dep></entry>
|
||||
<entry><ind>360</ind><dep>340</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</Kp>
|
||||
<Ti>
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
<value>2.0</value>
|
||||
</Ti>
|
||||
<Ti>10.0</Ti>
|
||||
<Td>0.002</Td>
|
||||
<u_min>
|
||||
<expression>
|
||||
<dif>
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
<value>2500</value>
|
||||
</dif>
|
||||
</expression>
|
||||
</u_min>
|
||||
<u_max>
|
||||
<expression>
|
||||
<sum>
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
<value>2500</value>
|
||||
</sum>
|
||||
</expression>
|
||||
</u_max>
|
||||
</config>
|
||||
</pid-controller>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>7</value>
|
||||
</equals>
|
||||
</or>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</and>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/flch-active</output>
|
||||
</logic>
|
||||
|
||||
<pid-controller>
|
||||
<name>FLCH SPEED BY PITCH</name>
|
||||
<name>IT-CONTROLLER: Speed By Pitch</name>
|
||||
<debug>false</debug>
|
||||
<enable>
|
||||
<condition>
|
||||
<and>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>4</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>7</value>
|
||||
</equals>
|
||||
</or>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</and>
|
||||
<property>/it-autoflight/internal/flch-active</property>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>
|
||||
|
@ -172,7 +76,7 @@
|
|||
<value>0</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/lookahead-15-sec-airspeed-kt</property>
|
||||
<property>/it-autoflight/internal/kts-predicted-15</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
|
@ -181,8 +85,8 @@
|
|||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/lookahead-15-sec-mach</property>
|
||||
<scale>750.0</scale>
|
||||
<property>/it-autoflight/internal/mach-predicted-15</property>
|
||||
<scale>750</scale>
|
||||
</input>
|
||||
<reference>
|
||||
<condition>
|
||||
|
@ -201,28 +105,11 @@
|
|||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/flch-mach</property>
|
||||
<scale>750.0</scale>
|
||||
<scale>750</scale>
|
||||
</reference>
|
||||
<output>/it-autoflight/internal/target-fpm-b</output>
|
||||
<output>/it-autoflight/internal/target-fpm-flch</output>
|
||||
<config>
|
||||
<Kp>
|
||||
<condition>
|
||||
<not-equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>7</value>
|
||||
</not-equals>
|
||||
</condition>
|
||||
<value>-55</value>
|
||||
</Kp>
|
||||
<Kp>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>7</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<value>-60</value>
|
||||
</Kp>
|
||||
<Kp>-55</Kp>
|
||||
<Ti>2.5</Ti>
|
||||
<Td>0.001</Td>
|
||||
<u_min>
|
||||
|
@ -232,48 +119,16 @@
|
|||
<value>2</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<value>150</value>
|
||||
<value>120</value>
|
||||
</u_min>
|
||||
<u_min>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/thr-mode</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<dif>
|
||||
<difference>
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
<value>2500</value>
|
||||
</dif>
|
||||
</difference>
|
||||
</expression>
|
||||
</u_min>
|
||||
<u_max>
|
||||
<condition>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/thr-mode</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/gear/gear[1]/wow</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/gear/gear[2]/wow</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</and>
|
||||
</and>
|
||||
</condition>
|
||||
<expression>
|
||||
<sum>
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
<value>2500</value>
|
||||
</sum>
|
||||
</expression>
|
||||
</u_max>
|
||||
<u_max>
|
||||
<condition>
|
||||
<and>
|
||||
|
@ -302,29 +157,9 @@
|
|||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<value>-150</value>
|
||||
<value>-120</value>
|
||||
</u_max>
|
||||
<u_min>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/thr-mode</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<dif>
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
<value>2500</value>
|
||||
</dif>
|
||||
</expression>
|
||||
</u_min>
|
||||
<u_max>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/thr-mode</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<sum>
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
|
@ -335,6 +170,190 @@
|
|||
</config>
|
||||
</pid-controller>
|
||||
|
||||
<filter>
|
||||
<name>Speed By Pitch Inactive Sync</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<enable>
|
||||
<condition>
|
||||
<not><property>/it-autoflight/internal/flch-active</property></not>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/it-autoflight/internal/vert-speed-fpm</input>
|
||||
<output>/it-autoflight/internal/target-fpm-flch</output>
|
||||
</filter>
|
||||
|
||||
<logic>
|
||||
<input>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>5</value>
|
||||
</equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/fd2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</and>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/fpa-active</output>
|
||||
</logic>
|
||||
|
||||
<filter>
|
||||
<name>IT-CONTROLLER: FPA</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<condition>
|
||||
<not><property>/it-autoflight/internal/fpa-active</property></not>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
</input>
|
||||
<input>
|
||||
<expression>
|
||||
<sum>
|
||||
<difference> <!-- Fix an issue with the calculation -->
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
<product>
|
||||
<property>/velocities/vertical-speed-fps</property>
|
||||
<value>60</value>
|
||||
</product>
|
||||
</difference>
|
||||
<product>
|
||||
<sin>
|
||||
<deg2rad>
|
||||
<property>/it-autoflight/input/fpa</property>
|
||||
</deg2rad>
|
||||
</sin>
|
||||
<property>/instrumentation/airspeed-indicator/true-speed-kt</property>
|
||||
<value>101.26859142607174</value> <!-- FPM to Knot -->
|
||||
</product>
|
||||
</sum>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/target-fpm-fpa-raw</output>
|
||||
<min>
|
||||
<expression>
|
||||
<difference>
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
<value>2500</value>
|
||||
</difference>
|
||||
</expression>
|
||||
</min>
|
||||
<max>
|
||||
<expression>
|
||||
<sum>
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
<value>2500</value>
|
||||
</sum>
|
||||
</expression>
|
||||
</max>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>FPA FPM Filter</name>
|
||||
<type>noise-spike</type>
|
||||
<input>/it-autoflight/internal/target-fpm-fpa-raw</input>
|
||||
<output>/it-autoflight/internal/target-fpm-fpa</output>
|
||||
<max-rate-of-change>
|
||||
<condition>
|
||||
<not><property>/it-autoflight/internal/fpa-active</property></not>
|
||||
</condition>
|
||||
<value>10000</value>
|
||||
</max-rate-of-change>
|
||||
<max-rate-of-change>300</max-rate-of-change>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>IT-CONTROLLER: Flare FD</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<sum>
|
||||
<difference> <!-- Fix an issue with the calculation -->
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
<product>
|
||||
<property>/velocities/vertical-speed-fps</property>
|
||||
<value>60</value>
|
||||
</product>
|
||||
</difference>
|
||||
<product>
|
||||
<sin>
|
||||
<deg2rad>
|
||||
<table>
|
||||
<property>/position/gear-agl-ft</property>
|
||||
<entry><ind>100</ind><dep>-2.80</dep></entry>
|
||||
<entry><ind> 50</ind><dep>-2.12</dep></entry>
|
||||
<entry><ind> 45</ind><dep>-0.61</dep></entry>
|
||||
</table>
|
||||
</deg2rad>
|
||||
</sin>
|
||||
<property>/instrumentation/airspeed-indicator/true-speed-kt</property>
|
||||
<value>101.26859142607174</value> <!-- FPM to Knot -->
|
||||
</product>
|
||||
</sum>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/target-fpm-land-fd</output>
|
||||
<min>-1200</min>
|
||||
<max>0</max>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>IT-CONTROLLER: Flare</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<sum>
|
||||
<difference> <!-- Fix an issue with the calculation -->
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
<product>
|
||||
<property>/velocities/vertical-speed-fps</property>
|
||||
<value>60</value>
|
||||
</product>
|
||||
</difference>
|
||||
<product>
|
||||
<sin>
|
||||
<deg2rad>
|
||||
<table>
|
||||
<property>/position/gear-agl-ft</property>
|
||||
<entry><ind>100</ind><dep>-2.80</dep></entry>
|
||||
<entry><ind> 50</ind><dep>-2.12</dep></entry>
|
||||
<entry><ind> 40</ind><dep>-1.58</dep></entry>
|
||||
<entry><ind> 30</ind><dep>-1.23</dep></entry>
|
||||
<entry><ind> 20</ind><dep>-0.92</dep></entry>
|
||||
<entry><ind> 10</ind><dep>-0.61</dep></entry>
|
||||
</table>
|
||||
</deg2rad>
|
||||
</sin>
|
||||
<property>/instrumentation/airspeed-indicator/true-speed-kt</property>
|
||||
<value>101.26859142607174</value> <!-- FPM to Knot -->
|
||||
</product>
|
||||
</sum>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/target-fpm-land</output>
|
||||
<min>-1200</min>
|
||||
<max>0</max>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>TARGET FPM</name>
|
||||
<debug>false</debug>
|
||||
|
@ -347,7 +366,7 @@
|
|||
<value>0</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/target-fpm</property>
|
||||
<property>/it-autoflight/internal/target-fpm-alt</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
|
@ -371,7 +390,7 @@
|
|||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/target-fpm-b</property>
|
||||
<property>/it-autoflight/internal/target-fpm-flch</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
|
@ -380,7 +399,7 @@
|
|||
<value>6</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/target-fpm-c2</property>
|
||||
<property>/it-autoflight/internal/target-fpm-land-fd</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
|
@ -389,7 +408,7 @@
|
|||
<value>5</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/target-fpm-d</property>
|
||||
<property>/it-autoflight/internal/target-fpm-fpa-raw</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
|
@ -398,61 +417,25 @@
|
|||
<value>2</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/nav1-rate-of-climb-fpm</property>
|
||||
<property>/it-autoflight/internal/nav-rate-of-climb-fpm</property>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/target-common-fpm</output>
|
||||
</filter>
|
||||
|
||||
<pid-controller>
|
||||
<name>FPM HOLD</name>
|
||||
<name>IT-CONTROLLER: FPM Hold</name>
|
||||
<debug>false</debug>
|
||||
<enable>
|
||||
<condition>
|
||||
<and>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>2</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>4</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>5</value>
|
||||
</equals>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>6</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/gear/gear[1]/wow</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/gear/gear[2]/wow</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</and>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>7</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>8</value>
|
||||
</equals>
|
||||
</or>
|
||||
<equals>
|
||||
<property>/gear/gear[1]/wow</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/gear/gear[2]/wow</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
|
@ -467,15 +450,6 @@
|
|||
</condition>
|
||||
</enable>
|
||||
<input>/it-autoflight/internal/vert-speed-fpm</input>
|
||||
<reference>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/target-fpm</property>
|
||||
</reference>
|
||||
<reference>
|
||||
<condition>
|
||||
<equals>
|
||||
|
@ -485,30 +459,6 @@
|
|||
</condition>
|
||||
<property>/it-autoflight/internal/vs</property>
|
||||
</reference>
|
||||
<reference>
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>4</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>7</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/target-fpm-b</property>
|
||||
</reference>
|
||||
<reference>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>6</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/target-fpm-c</property>
|
||||
</reference>
|
||||
<reference>
|
||||
<condition>
|
||||
<equals>
|
||||
|
@ -516,17 +466,18 @@
|
|||
<value>5</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/target-fpm-d</property>
|
||||
<property>/it-autoflight/internal/target-fpm-fpa</property>
|
||||
</reference>
|
||||
<reference>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>2</value>
|
||||
<value>6</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/it-autoflight/internal/nav1-rate-of-climb-fpm</property>
|
||||
<property>/it-autoflight/internal/target-fpm-land</property>
|
||||
</reference>
|
||||
<reference>/it-autoflight/internal/target-common-fpm</reference>
|
||||
<output>/it-autoflight/internal/target-pitch-deg</output>
|
||||
<config>
|
||||
<Kp>
|
||||
|
@ -555,23 +506,6 @@
|
|||
</Kp>
|
||||
<Ti>2.5</Ti>
|
||||
<Td>0.0001</Td>
|
||||
<u_min>
|
||||
<condition>
|
||||
<not-equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>6</value>
|
||||
</not-equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<max>
|
||||
<dif>
|
||||
<property>/orientation/pitch-deg</property>
|
||||
<value>5</value>
|
||||
</dif>
|
||||
<value>-10</value>
|
||||
</max>
|
||||
</expression>
|
||||
</u_min>
|
||||
<u_min>
|
||||
<condition>
|
||||
<equals>
|
||||
|
@ -581,29 +515,17 @@
|
|||
</condition>
|
||||
<value>0</value>
|
||||
</u_min>
|
||||
<u_max>
|
||||
<condition>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/gear/gear[1]/wow</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/gear/gear[2]/wow</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
</and>
|
||||
</condition>
|
||||
<u_min>
|
||||
<expression>
|
||||
<min>
|
||||
<sum>
|
||||
<max>
|
||||
<dif>
|
||||
<property>/orientation/pitch-deg</property>
|
||||
<value>5</value>
|
||||
</sum>
|
||||
<value>30</value>
|
||||
</min>
|
||||
</dif>
|
||||
<value>-15</value>
|
||||
</max>
|
||||
</expression>
|
||||
</u_max>
|
||||
</u_min>
|
||||
<u_max>
|
||||
<condition>
|
||||
<or>
|
||||
|
@ -619,26 +541,66 @@
|
|||
</condition>
|
||||
<value>10</value>
|
||||
</u_max>
|
||||
<u_max>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/vert</property>
|
||||
<value>7</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<expression>
|
||||
<min>
|
||||
<sum>
|
||||
<property>/orientation/pitch-deg</property>
|
||||
<value>5</value>
|
||||
</sum>
|
||||
<value>18</value>
|
||||
</min>
|
||||
</expression>
|
||||
</u_max>
|
||||
<u_max>
|
||||
<expression>
|
||||
<min>
|
||||
<sum>
|
||||
<property>/orientation/pitch-deg</property>
|
||||
<value>5</value>
|
||||
</sum>
|
||||
<value>30</value>
|
||||
</min>
|
||||
</expression>
|
||||
</u_max>
|
||||
</config>
|
||||
</pid-controller>
|
||||
|
||||
<filter>
|
||||
<name>PITCH DEG SYNC</name>
|
||||
<name>System Command: Pitch Target Inactive Sync</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<enable>
|
||||
<condition>
|
||||
<and>
|
||||
<not-equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
<value>1</value>
|
||||
</not-equals>
|
||||
<not-equals>
|
||||
<property>/it-autoflight/output/ap2</property>
|
||||
<value>1</value>
|
||||
</not-equals>
|
||||
</and>
|
||||
<not>
|
||||
<and>
|
||||
<equals>
|
||||
<property>/gear/gear[1]/wow</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/gear/gear[2]/wow</property>
|
||||
<value>0</value>
|
||||
</equals>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap1</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/ap2</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</and>
|
||||
</not>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>/orientation/pitch-deg</input>
|
||||
|
@ -648,10 +610,10 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>System Command: Pitch Rate</name>
|
||||
<name>System Command: Pitch Rate Target</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>0.15</gain>
|
||||
<gain>0.125</gain>
|
||||
<input>/orientation/pitch-deg</input>
|
||||
<reference>/it-autoflight/internal/target-pitch-deg</reference>
|
||||
<output>/fdm/jsbsim/fbw/fmgc/pitch-cmd</output> <!-- Inputs to the FBW Pitch -->
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<!-- Copyright (c) 2020 Josh Davidson (Octal450) -->
|
||||
|
||||
<!-- IT-AUTOFLIGHT -->
|
||||
<!-- Copyright (c) 2020 Josh Davidson (Octal450) -->
|
||||
|
||||
<PropertyList>
|
||||
|
||||
<!-- Roll Axis -->
|
||||
|
||||
<filter>
|
||||
<name>IT-CONTROLLER: HDG/LNAV ROLL</name>
|
||||
<name>IT-CONTROLLER: Heading/LNAV</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>
|
||||
|
@ -66,7 +64,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>IT-CONTROLLER: VORLOC ROLL</name>
|
||||
<name>IT-CONTROLLER: VOR/LOC</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>
|
||||
|
@ -117,7 +115,29 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>ROLL DEG SYNC</name>
|
||||
<name>IT-CONTROLLER: Align/Rollout/Takeoff</name>
|
||||
<debug>false</debug>
|
||||
<type>noise-spike</type>
|
||||
<enable>
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/lat</property>
|
||||
<value>4</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/lat</property>
|
||||
<value>5</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>0</input>
|
||||
<output>/it-autoflight/internal/target-roll-deg</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>System Command: Roll Target Inactive Sync</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
|
@ -153,24 +173,9 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>IT-CONTROLLER: TARGET ROLL CMD</name>
|
||||
<name>System Command: Target Roll Filter</name>
|
||||
<debug>false</debug>
|
||||
<type>noise-spike</type>
|
||||
<input>
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/lat</property>
|
||||
<value>4</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>/it-autoflight/output/lat</property>
|
||||
<value>5</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
<value>0</value>
|
||||
</input>
|
||||
<input>/it-autoflight/internal/target-roll-deg</input>
|
||||
<output>/it-autoflight/internal/target-roll</output>
|
||||
<max-rate-of-change>
|
||||
|
@ -215,7 +220,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>System Command: Roll Rate</name>
|
||||
<name>System Command: Roll Rate Target</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>-0.1</gain>
|
||||
|
@ -227,9 +232,8 @@
|
|||
</filter>
|
||||
|
||||
<!-- Yaw Axis -->
|
||||
|
||||
<pi-simple-controller>
|
||||
<name>RUDDER VORLOC TRK</name>
|
||||
<name>IT-CONTROLLER: Yaw VOR/LOC</name>
|
||||
<debug>false</debug>
|
||||
<enable>
|
||||
<condition>
|
||||
|
@ -266,7 +270,7 @@
|
|||
</pi-simple-controller>
|
||||
|
||||
<filter>
|
||||
<name>IT-CONTROLLER: RUDDER CMD</name>
|
||||
<name>System Command: Rudder</name>
|
||||
<debug>false</debug>
|
||||
<type>noise-spike</type>
|
||||
<input>
|
||||
|
|
|
@ -5,15 +5,30 @@
|
|||
<PropertyList>
|
||||
|
||||
<!-- Thrust Axis -->
|
||||
|
||||
<filter>
|
||||
<name>KTS INPUT FILTER</name>
|
||||
<name>A/THR Knots Input Filter</name>
|
||||
<debug>false</debug>
|
||||
<type>noise-spike</type>
|
||||
<feedback-if-disabled>true</feedback-if-disabled>
|
||||
<initialize-to>output</initialize-to>
|
||||
<input>/it-autoflight/input/spd-kts</input>
|
||||
<output>/it-autoflight/internal/kts</output>
|
||||
<input>/it-autoflight/input/kts</input>
|
||||
<output>/it-autoflight/internal/athr-kts</output>
|
||||
<min>
|
||||
<expression>
|
||||
<difference>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
|
||||
<value>25</value>
|
||||
</difference>
|
||||
</expression>
|
||||
</min>
|
||||
<max>
|
||||
<expression>
|
||||
<sum>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
|
||||
<value>25</value>
|
||||
</sum>
|
||||
</expression>
|
||||
</max>
|
||||
<max-rate-of-change>
|
||||
<condition>
|
||||
<and>
|
||||
|
@ -49,13 +64,29 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>MACH INPUT FILTER</name>
|
||||
<name>A/THR Mach Input Filter</name>
|
||||
<debug>false</debug>
|
||||
<type>noise-spike</type>
|
||||
<feedback-if-disabled>true</feedback-if-disabled>
|
||||
<initialize-to>output</initialize-to>
|
||||
<input>/it-autoflight/input/spd-mach</input>
|
||||
<output>/it-autoflight/internal/mach</output>
|
||||
<input>/it-autoflight/input/mach</input>
|
||||
<output>/it-autoflight/internal/athr-mach</output>
|
||||
<min>
|
||||
<expression>
|
||||
<difference>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
|
||||
<value>0.045</value>
|
||||
</difference>
|
||||
</expression>
|
||||
</min>
|
||||
<max>
|
||||
<expression>
|
||||
<sum>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
|
||||
<value>0.045</value>
|
||||
</sum>
|
||||
</expression>
|
||||
</max>
|
||||
<max-rate-of-change>
|
||||
<condition>
|
||||
<and>
|
||||
|
@ -85,7 +116,7 @@
|
|||
</not-equals>
|
||||
</and>
|
||||
</condition>
|
||||
<value>0.1</value>
|
||||
<value>0.08</value>
|
||||
</max-rate-of-change>
|
||||
<max-rate-of-change>2</max-rate-of-change>
|
||||
</filter>
|
||||
|
@ -106,7 +137,7 @@
|
|||
</filter>
|
||||
|
||||
<pid-controller>
|
||||
<name>IT-CONTROLLER: IAS THRUST</name>
|
||||
<name>IT-CONTROLLER: Knots</name>
|
||||
<debug>false</debug>
|
||||
<enable>
|
||||
<condition>
|
||||
|
@ -217,7 +248,7 @@
|
|||
</condition>
|
||||
</enable>
|
||||
<input>/it-autoflight/internal/current-speed-input</input>
|
||||
<reference>/it-autoflight/internal/kts</reference>
|
||||
<reference>/it-autoflight/internal/athr-kts</reference>
|
||||
<output>/controls/engines/throttle-cmd-pid</output>
|
||||
<config>
|
||||
<Kp>0.055</Kp>
|
||||
|
@ -229,7 +260,7 @@
|
|||
</pid-controller>
|
||||
|
||||
<pid-controller>
|
||||
<name>IT-CONTROLLER: MACH THRUST</name>
|
||||
<name>IT-CONTROLLER: Mach</name>
|
||||
<debug>false</debug>
|
||||
<enable>
|
||||
<condition>
|
||||
|
@ -341,11 +372,11 @@
|
|||
</enable>
|
||||
<input>
|
||||
<property>/it-autoflight/internal/current-mach-input</property>
|
||||
<scale>1000.0</scale>
|
||||
<scale>1000</scale>
|
||||
</input>
|
||||
<reference>
|
||||
<property>/it-autoflight/internal/mach</property>
|
||||
<scale>1000.0</scale>
|
||||
<property>/it-autoflight/internal/athr-mach</property>
|
||||
<scale>1000</scale>
|
||||
</reference>
|
||||
<output>/controls/engines/throttle-cmd-pid</output>
|
||||
<config>
|
||||
|
@ -358,7 +389,7 @@
|
|||
</pid-controller>
|
||||
|
||||
<filter>
|
||||
<name>IT-CONTROLLER: IDLE THRUST</name>
|
||||
<name>IT-CONTROLLER: Idle Limit</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
|
@ -464,12 +495,12 @@
|
|||
</and>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>0.0</input>
|
||||
<input>0</input>
|
||||
<output>/controls/engines/throttle-cmd-pid</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>IT-CONTROLLER: LIMIT THRUST</name>
|
||||
<name>IT-CONTROLLER: Thrust Limit</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
|
@ -575,12 +606,12 @@
|
|||
</and>
|
||||
</condition>
|
||||
</enable>
|
||||
<input>1.0</input>
|
||||
<input>1</input>
|
||||
<output>/controls/engines/throttle-cmd-pid</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>IT-CONTROLLER: FEEDBACK IF DISABLED</name>
|
||||
<name>IT-CONTROLLER: Throttle Inactive Sync</name>
|
||||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
|
|
|
@ -1322,5 +1322,18 @@
|
|||
</input>
|
||||
<output>/instrumentation/pfd/minimums-plus-100</output>
|
||||
</filter>
|
||||
|
||||
<logic>
|
||||
<!-- somewhat confusing : this input is not 'are the flaps in landing configration', but rather,
|
||||
'are the flaps NOT in a landing configuration'. There is a configuration bit to flip
|
||||
the sense of this, if required. -->
|
||||
<input>
|
||||
<less-than>
|
||||
<property>/controls/flight/flaps</property>
|
||||
<value>0.8</value>
|
||||
</less-than>
|
||||
</input>
|
||||
<output>/instrumentation/mk-viii/inputs/discretes/landing-flaps</output>
|
||||
</logic>
|
||||
|
||||
</PropertyList>
|
||||
|
|
|
@ -403,7 +403,7 @@
|
|||
<row>0</row>
|
||||
<col>3</col>
|
||||
<pref-width>50</pref-width>
|
||||
<property>/it-autoflight/input/spd-kts</property>
|
||||
<property>/it-autoflight/input/kts</property>
|
||||
<live type="bool">true</live>
|
||||
<enable>
|
||||
<and>
|
||||
|
@ -529,7 +529,7 @@
|
|||
<row>0</row>
|
||||
<col>3</col>
|
||||
<pref-width>50</pref-width>
|
||||
<property>/it-autoflight/input/spd-mach</property>
|
||||
<property>/it-autoflight/input/mach</property>
|
||||
<live type="bool">true</live>
|
||||
<enable>
|
||||
<and>
|
||||
|
|
Loading…
Reference in a new issue