FMGC: Rework VLS and other speeds significantly, AP and A/THR now respect VLS and VMAX
This commit is contained in:
parent
d68988def7
commit
b71db001b3
10 changed files with 372 additions and 128 deletions
|
@ -841,6 +841,7 @@
|
|||
<cost-index type="int">0</cost-index>
|
||||
<flex type="int">45</flex>
|
||||
<to-state type="bool">0</to-state>
|
||||
<vmax type="double">350</vmax>
|
||||
</internal>
|
||||
<simbrief-username type="string"></simbrief-username>
|
||||
</FMGC>
|
||||
|
|
|
@ -85,6 +85,7 @@ var canvas_pfd = {
|
|||
tgt_kts: 0,
|
||||
tgt_ias: 0,
|
||||
vapp: 0,
|
||||
vls: 0,
|
||||
new: func(svg, name, number) {
|
||||
var obj = {parents: [canvas_pfd] };
|
||||
obj.canvas = canvas.new({
|
||||
|
@ -788,12 +789,13 @@ var canvas_pfd = {
|
|||
}
|
||||
|
||||
if (!fmgc.FMGCInternal.takeoffState and fmgc.FMGCInternal.phase >= 1 and !notification.gear1Wow and !notification.gear2Wow) {
|
||||
if (fmgc.FMGCInternal.vls_min <= 30) {
|
||||
me.vls = fmgc.FMGCNodes.vls.getValue();
|
||||
if (me.vls <= 30) {
|
||||
me.VLSmin = 0 - me.ASI;
|
||||
} else if (fmgc.FMGCInternal.vls_min >= 420) {
|
||||
} else if (me.vls >= 420) {
|
||||
me.VLSmin = 390 - me.ASI;
|
||||
} else {
|
||||
me.VLSmin = fmgc.FMGCInternal.vls_min - 30 - me.ASI;
|
||||
me.VLSmin = me.vls - 30 - me.ASI;
|
||||
}
|
||||
|
||||
if (fmgc.FMGCInternal.alpha_prot <= 30) {
|
||||
|
|
|
@ -262,10 +262,6 @@ var ITAF = {
|
|||
Internal.vsTemp = Internal.vs.getValue();
|
||||
Position.indicatedAltitudeFtTemp = Position.indicatedAltitudeFt.getValue();
|
||||
|
||||
# Update VLS / VMAX for autothrust
|
||||
FMGCNodes.vmax.setValue(FMGCInternal.maxspeed);
|
||||
FMGCNodes.vlsMin.setValue(FMGCInternal.vls_min);
|
||||
|
||||
# LNAV Engagement
|
||||
if (Output.lnavArm.getBoolValue()) {
|
||||
me.checkLnav(1);
|
||||
|
|
|
@ -55,6 +55,7 @@ var FMGCinit = func {
|
|||
FMGCInternal.takeoffState = 0;
|
||||
FMGCInternal.minspeed = 0;
|
||||
FMGCInternal.maxspeed = 338;
|
||||
FMGCNodes.vmax.setValue(338);
|
||||
FMGCInternal.phase = 0; # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done
|
||||
FMGCNodes.phase.setValue(0);
|
||||
FMGCInternal.mngSpd = 157;
|
||||
|
@ -257,17 +258,27 @@ var postInit = func() {
|
|||
var FMGCNodes = {
|
||||
costIndex: props.globals.initNode("/FMGC/internal/cost-index", 0, "DOUBLE"),
|
||||
decel: props.globals.initNode("/FMGC/internal/decel", 0, "BOOL"),
|
||||
flap2: props.globals.getNode("/FMGC/internal/flap-2"),
|
||||
flap3: props.globals.getNode("/FMGC/internal/flap-3"),
|
||||
mngSpdAlt: props.globals.getNode("/FMGC/internal/mng-alt-spd"),
|
||||
ktsToMachFactor: props.globals.getNode("/FMGC/internal/kts-to-mach-factor"),
|
||||
machToKtsFactor: props.globals.getNode("/FMGC/internal/mach-to-kts-factor"),
|
||||
mngMachAlt: props.globals.getNode("/FMGC/internal/mng-alt-mach"),
|
||||
slat: props.globals.getNode("/FMGC/internal/slat"),
|
||||
toFromSet: props.globals.initNode("/FMGC/internal/tofrom-set", 0, "BOOL"),
|
||||
toState: props.globals.initNode("/FMGC/internal/to-state", 0, "BOOL"),
|
||||
v1: props.globals.initNode("/FMGC/internal/v1", 0, "DOUBLE"),
|
||||
v1set: props.globals.initNode("/FMGC/internal/v1-set", 0, "BOOL"),
|
||||
phase: props.globals.initNode("/FMGC/internal/phase", 0, "INT"),
|
||||
vlsMin: props.globals.initNode("/FMGC/internal/vls-min", 0, "DOUBLE"),
|
||||
vmax: props.globals.initNode("/FMGC/internal/vmax", 0, "DOUBLE"),
|
||||
vls: props.globals.getNode("/FMGC/internal/vls"),
|
||||
vmax: props.globals.getNode("/FMGC/internal/vmax"),
|
||||
vs1g: props.globals.getNode("/FMGC/internal/vs1g"),
|
||||
vs1gConf0: props.globals.getNode("/FMGC/internal/vs1g-conf-0"),
|
||||
vs1gConf1: props.globals.getNode("/FMGC/internal/vs1g-conf-1"),
|
||||
vs1gConf1f: props.globals.getNode("/FMGC/internal/vs1g-conf-1f"),
|
||||
vs1gConf2: props.globals.getNode("/FMGC/internal/vs1g-conf-2"),
|
||||
vs1gConf3: props.globals.getNode("/FMGC/internal/vs1g-conf-3"),
|
||||
vs1gConfFull: props.globals.getNode("/FMGC/internal/vs1g-conf-full"),
|
||||
};
|
||||
|
||||
############
|
||||
|
@ -558,7 +569,6 @@ var radios = maketimer(1, func() {
|
|||
var newphase = nil;
|
||||
|
||||
var masterFMGC = maketimer(0.2, func {
|
||||
|
||||
n1_left = pts.Engines.Engine.n1Actual[0].getValue();
|
||||
n1_right = pts.Engines.Engine.n1Actual[1].getValue();
|
||||
modelat = Modes.PFD.FMA.rollMode.getValue();
|
||||
|
@ -638,6 +648,7 @@ var masterFMGC = maketimer(0.2, func {
|
|||
} else {
|
||||
FMGCInternal.maxspeed = fmgc.FMGCInternal.vmo_mmo.getValue();
|
||||
}
|
||||
FMGCNodes.vmax.setValue(FMGCInternal.maxspeed);
|
||||
|
||||
if (newphase != FMGCInternal.phase) { # phase changed
|
||||
FMGCInternal.phase = newphase;
|
||||
|
@ -693,6 +704,19 @@ var masterFMGC = maketimer(0.2, func {
|
|||
}
|
||||
}
|
||||
|
||||
# Speeds
|
||||
FMGCInternal.vsw = FMGCNodes.vs1g.getValue();
|
||||
FMGCInternal.vls = FMGCNodes.vls.getValue();
|
||||
FMGCInternal.vs1g_conf_0 = FMGCNodes.vs1gConf0.getValue();
|
||||
FMGCInternal.vs1g_conf_1 = FMGCNodes.vs1gConf1.getValue();
|
||||
FMGCInternal.vs1g_conf_1f = FMGCNodes.vs1gConf1f.getValue();
|
||||
FMGCInternal.vs1g_conf_2 = FMGCNodes.vs1gConf2.getValue();
|
||||
FMGCInternal.vs1g_conf_3 = FMGCNodes.vs1gConf3.getValue();
|
||||
FMGCInternal.vs1g_conf_full = FMGCNodes.vs1gConfFull.getValue();
|
||||
FMGCInternal.slat = FMGCNodes.slat.getValue();
|
||||
FMGCInternal.flap2 = FMGCNodes.flap2.getValue();
|
||||
FMGCInternal.flap3 = FMGCNodes.flap3.getValue();
|
||||
|
||||
############################
|
||||
# calculate speeds
|
||||
############################
|
||||
|
@ -700,27 +724,6 @@ var masterFMGC = maketimer(0.2, func {
|
|||
weight_lbs = pts.Fdm.JSBsim.Inertia.weightLbs.getValue() / 1000;
|
||||
altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue();
|
||||
|
||||
# current speeds
|
||||
FMGCInternal.clean = 2 * weight_lbs * 0.45359237 + 85;
|
||||
if (altitude > 20000) {
|
||||
FMGCInternal.clean += (altitude - 20000) / 1000;
|
||||
}
|
||||
|
||||
FMGCInternal.vs1g_clean = 0.0024 * weight_lbs * weight_lbs + 0.124 * weight_lbs + 88.942;
|
||||
FMGCInternal.vs1g_conf_1 = -0.0007 * weight_lbs * weight_lbs + 0.6795 * weight_lbs + 44.673;
|
||||
FMGCInternal.vs1g_conf_1f = -0.0001 * weight_lbs * weight_lbs + 0.5211 * weight_lbs + 49.027;
|
||||
FMGCInternal.vs1g_conf_2 = -0.0005 * weight_lbs * weight_lbs + 0.5488 * weight_lbs + 44.279;
|
||||
FMGCInternal.vs1g_conf_3 = -0.0005 * weight_lbs * weight_lbs + 0.5488 * weight_lbs + 43.279;
|
||||
FMGCInternal.vs1g_conf_full = -0.0007 * weight_lbs * weight_lbs + 0.6002 * weight_lbs + 38.479;
|
||||
FMGCInternal.slat = FMGCInternal.vs1g_clean * 1.23;
|
||||
FMGCInternal.flap2 = FMGCInternal.vs1g_conf_2 * 1.47;
|
||||
FMGCInternal.flap3 = FMGCInternal.vs1g_conf_3 * 1.36;
|
||||
if (FMGCInternal.ldgConfig3) {
|
||||
FMGCInternal.vls = math.clamp(FMGCInternal.vs1g_conf_3 * 1.23, 113, 999);
|
||||
} else {
|
||||
FMGCInternal.vls = math.clamp(FMGCInternal.vs1g_conf_full * 1.23, 113, 999);
|
||||
}
|
||||
|
||||
if (!fmgc.FMGCInternal.vappSpeedSet) {
|
||||
if (FMGCInternal.destWind < 5) {
|
||||
FMGCInternal.vapp = FMGCInternal.vls + 5;
|
||||
|
@ -734,7 +737,7 @@ var masterFMGC = maketimer(0.2, func {
|
|||
# predicted takeoff speeds
|
||||
if (FMGCInternal.phase == 1) {
|
||||
FMGCInternal.clean_to = FMGCInternal.clean;
|
||||
FMGCInternal.vs1g_clean_to = FMGCInternal.vs1g_clean;
|
||||
FMGCInternal.vs1g_conf_0_to = FMGCInternal.vs1g_conf_0;
|
||||
FMGCInternal.vs1g_conf_2_to = FMGCInternal.vs1g_conf_2;
|
||||
FMGCInternal.vs1g_conf_3_to = FMGCInternal.vs1g_conf_3;
|
||||
FMGCInternal.vs1g_conf_full_to = FMGCInternal.vs1g_conf_full;
|
||||
|
@ -745,18 +748,18 @@ var masterFMGC = maketimer(0.2, func {
|
|||
if (altitude > 20000) {
|
||||
FMGCInternal.clean_to += (altitude - 20000) / 1000;
|
||||
}
|
||||
FMGCInternal.vs1g_clean_to = 0.0024 * FMGCInternal.tow * FMGCInternal.tow + 0.124 * FMGCInternal.tow + 88.942;
|
||||
FMGCInternal.vs1g_conf_0_to = 0.0024 * FMGCInternal.tow * FMGCInternal.tow + 0.124 * FMGCInternal.tow + 88.942;
|
||||
FMGCInternal.vs1g_conf_2_to = -0.0005 * FMGCInternal.tow * FMGCInternal.tow + 0.5488 * FMGCInternal.tow + 44.279;
|
||||
FMGCInternal.vs1g_conf_3_to = -0.0005 * FMGCInternal.tow * FMGCInternal.tow + 0.5488 * FMGCInternal.tow + 43.279;
|
||||
FMGCInternal.vs1g_conf_full_to = -0.0007 * FMGCInternal.tow * FMGCInternal.tow + 0.6002 * FMGCInternal.tow + 38.479;
|
||||
FMGCInternal.slat_to = FMGCInternal.vs1g_clean_to * 1.23;
|
||||
FMGCInternal.slat_to = FMGCInternal.vs1g_conf_0_to * 1.23;
|
||||
FMGCInternal.flap2_to = FMGCInternal.vs1g_conf_2_to * 1.47;
|
||||
}
|
||||
|
||||
# predicted approach (temp go-around) speeds
|
||||
if (FMGCInternal.phase == 5 or FMGCInternal.phase == 6) {
|
||||
FMGCInternal.clean_appr = FMGCInternal.clean;
|
||||
FMGCInternal.vs1g_clean_appr = FMGCInternal.vs1g_clean;
|
||||
FMGCInternal.vs1g_conf_0_appr = FMGCInternal.vs1g_conf_0;
|
||||
FMGCInternal.vs1g_conf_2_appr = FMGCInternal.vs1g_conf_2;
|
||||
FMGCInternal.vs1g_conf_3_appr = FMGCInternal.vs1g_conf_3;
|
||||
FMGCInternal.vs1g_conf_full_appr = FMGCInternal.vs1g_conf_full;
|
||||
|
@ -771,11 +774,11 @@ var masterFMGC = maketimer(0.2, func {
|
|||
if (altitude > 20000) {
|
||||
FMGCInternal.clean_appr += (altitude - 20000) / 1000;
|
||||
}
|
||||
FMGCInternal.vs1g_clean_appr = 0.0024 * FMGCInternal.lw * FMGCInternal.lw + 0.124 * FMGCInternal.lw + 88.942;
|
||||
FMGCInternal.vs1g_conf_0_appr = 0.0024 * FMGCInternal.lw * FMGCInternal.lw + 0.124 * FMGCInternal.lw + 88.942;
|
||||
FMGCInternal.vs1g_conf_2_appr = -0.0005 * FMGCInternal.lw * FMGCInternal.lw + 0.5488 * FMGCInternal.lw + 44.279;
|
||||
FMGCInternal.vs1g_conf_3_appr = -0.0005 * FMGCInternal.lw * FMGCInternal.lw + 0.5488 * FMGCInternal.lw + 43.279;
|
||||
FMGCInternal.vs1g_conf_full_appr = -0.0007 * FMGCInternal.lw * FMGCInternal.lw + 0.6002 * FMGCInternal.lw + 38.479;
|
||||
FMGCInternal.slat_appr = FMGCInternal.vs1g_clean_appr * 1.23;
|
||||
FMGCInternal.slat_appr = FMGCInternal.vs1g_conf_0_appr * 1.23;
|
||||
FMGCInternal.flap2_appr = FMGCInternal.vs1g_conf_2_appr * 1.47;
|
||||
if (FMGCInternal.ldgConfig3) {
|
||||
FMGCInternal.vls_appr = FMGCInternal.vs1g_conf_3_appr * 1.23;
|
||||
|
@ -796,8 +799,6 @@ var masterFMGC = maketimer(0.2, func {
|
|||
}
|
||||
}
|
||||
|
||||
# Need info on these, also correct for height at altitude...
|
||||
# https://www.pprune.org/archive/index.php/t-587639.html
|
||||
aoa_prot = 15;
|
||||
aoa_max = 17.5;
|
||||
aoa_0 = -5;
|
||||
|
@ -811,70 +812,6 @@ var masterFMGC = maketimer(0.2, func {
|
|||
FMGCInternal.alpha_max = 0;
|
||||
}
|
||||
|
||||
#FMGCInternal.vs1g_conf_2_appr = FMGCInternal.vs1g_conf_2;
|
||||
#FMGCInternal.vs1g_conf_3_appr = FMGCInternal.vs1g_conf_3;
|
||||
#FMGCInternal.vs1g_conf_full_appr = FMGCInternal.vs1g_conf_full;
|
||||
|
||||
if (flap == 0) { # 0
|
||||
FMGCInternal.vsw = FMGCInternal.vs1g_clean;
|
||||
FMGCInternal.minspeed = FMGCInternal.clean;
|
||||
|
||||
if (FMGCInternal.takeoffState) {
|
||||
FMGCInternal.vls_min = FMGCInternal.vs1g_clean * 1.28;
|
||||
} else {
|
||||
FMGCInternal.vls_min = FMGCInternal.vs1g_clean * 1.23;
|
||||
}
|
||||
} elsif (flap == 1) { # 1
|
||||
FMGCInternal.vsw = FMGCInternal.vs1g_conf_2;
|
||||
FMGCInternal.minspeed = FMGCInternal.slat;
|
||||
|
||||
if (FMGCInternal.takeoffState) {
|
||||
FMGCInternal.vls_min = FMGCInternal.vs1g_conf_1 * 1.28;
|
||||
} else {
|
||||
FMGCInternal.vls_min = FMGCInternal.vs1g_conf_1 * 1.23;
|
||||
}
|
||||
} elsif (flap == 2) { # 1+F
|
||||
FMGCInternal.vsw = FMGCInternal.vs1g_conf_1f;
|
||||
FMGCInternal.minspeed = FMGCInternal.slat;
|
||||
|
||||
if (FMGCInternal.takeoffState) {
|
||||
FMGCInternal.vls_min = FMGCInternal.vs1g_clean * 1.13;
|
||||
} else {
|
||||
FMGCInternal.vls_min = FMGCInternal.vs1g_conf_1f * 1.23;
|
||||
}
|
||||
} elsif (flap == 3) { # 2
|
||||
FMGCInternal.vsw = FMGCInternal.vs1g_conf_2;
|
||||
FMGCInternal.minspeed = FMGCInternal.flap2;
|
||||
|
||||
if (FMGCInternal.takeoffState) {
|
||||
FMGCInternal.vls_min = FMGCInternal.vs1g_clean * 1.13;
|
||||
} else {
|
||||
FMGCInternal.vls_min = FMGCInternal.vs1g_conf_2 * 1.23;
|
||||
}
|
||||
} elsif (flap == 4) { # 3
|
||||
FMGCInternal.vsw = FMGCInternal.vs1g_conf_3;
|
||||
FMGCInternal.minspeed = FMGCInternal.flap3;
|
||||
|
||||
if (FMGCInternal.takeoffState) {
|
||||
FMGCInternal.vls_min = FMGCInternal.vs1g_clean * 1.13;
|
||||
} else {
|
||||
FMGCInternal.vls_min = FMGCInternal.vs1g_conf_3 * 1.23;
|
||||
}
|
||||
} elsif (flap == 5) { # FULL
|
||||
FMGCInternal.vsw = FMGCInternal.vs1g_conf_full;
|
||||
if (FMGCInternal.vappSpeedSet) {
|
||||
FMGCInternal.minspeed = FMGCInternal.vapp_appr;
|
||||
} else {
|
||||
FMGCInternal.minspeed = FMGCInternal.vapp;
|
||||
}
|
||||
|
||||
if (FMGCInternal.takeoffState) {
|
||||
FMGCInternal.vls_min = FMGCInternal.vs1g_clean * 1.13;
|
||||
} else {
|
||||
FMGCInternal.vls_min = FMGCInternal.vs1g_conf_full * 1.23;
|
||||
}
|
||||
}
|
||||
|
||||
if (gear0 and flap < 5 and (state1 == "MCT" or state1 == "MAN THR" or state1 == "TOGA") and (state2 == "MCT" or state2 == "MAN THR" or state2 == "TOGA")) {
|
||||
if (!FMGCInternal.takeoffState) {
|
||||
fmgc.FMGCNodes.toState.setValue(1);
|
||||
|
@ -886,7 +823,6 @@ var masterFMGC = maketimer(0.2, func {
|
|||
}
|
||||
FMGCInternal.takeoffState = 0;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
############################
|
||||
|
|
|
@ -759,7 +759,7 @@
|
|||
<property>/systems/navigation/adr/output/cas-3</property>
|
||||
</max>
|
||||
<difference>
|
||||
<property>/FMGC/internal/vls-min</property>
|
||||
<property>/FMGC/internal/vls</property>
|
||||
<property>/systems/navigation/adr/computation/underspeed-difference</property>
|
||||
</difference>
|
||||
</lt>
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
|
||||
<property value="350">/FMGC/internal/vmo-kts</property>
|
||||
|
||||
<channel name="FMGC" execrate="8">
|
||||
<channel name="Envelope Protection" execrate="8">
|
||||
|
||||
<!-- Vmo/Mmo -->
|
||||
<fcs_function name="/FMGC/internal/mmo-kts">
|
||||
<function>
|
||||
<product>
|
||||
|
@ -16,7 +17,7 @@
|
|||
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
|
||||
<max> <!-- Prevent divide by 0 -->
|
||||
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
|
||||
<value>0.0000001</value>
|
||||
<value>0.0001</value>
|
||||
</max>
|
||||
</quotient>
|
||||
<value>0.82</value>
|
||||
|
@ -41,6 +42,290 @@
|
|||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<!-- VS1g -->
|
||||
<fcs_function name="/FMGC/internal/vs1g-kts">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">inertia/weight-kg</independentVar>
|
||||
<independentVar lookup="column">fcs/flap-pos-deg</independentVar>
|
||||
<independentVar lookup="table">fcs/slat-pos-deg</independentVar>
|
||||
<tableData breakPoint="0"> <!-- 40 column is a guess, no data for flap without slat -->
|
||||
0 40
|
||||
35000 114.99 99.55
|
||||
40000 123.08 106.14
|
||||
45000 130.66 111.83
|
||||
50000 137.73 117.76
|
||||
55000 144.41 123.46
|
||||
60000 150.81 128.89
|
||||
65000 156.76 133.34
|
||||
70000 162.65 138.73
|
||||
75000 168.43 143.60
|
||||
80000 173.65 148.02
|
||||
</tableData>
|
||||
<tableData breakPoint="27">
|
||||
0 10 15 20 35 40
|
||||
35000 95.11 90.08 85.16 83.55 81.61 79.67
|
||||
40000 101.59 96.03 90.31 88.77 86.71 84.65
|
||||
45000 107.89 101.93 95.64 94.32 91.69 89.06
|
||||
50000 113.84 107.55 101.02 99.25 96.56 93.87
|
||||
55000 119.46 112.76 106.07 104.23 101.37 98.51
|
||||
60000 124.84 117.97 110.94 109.10 106.01 102.92
|
||||
65000 130.17 122.96 115.63 113.75 110.25 106.75
|
||||
70000 135.10 127.54 119.99 118.16 114.67 111.18
|
||||
75000 139.91 132.18 124.23 122.28 118.68 115.08
|
||||
80000 144.44 136.54 128.58 126.35 122.58 118.81
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<!-- Extra VS1g tables for predictions etc -->
|
||||
<fcs_function name="/FMGC/internal/vs1g-conf-0">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">inertia/weight-kg</independentVar>
|
||||
<tableData>
|
||||
35000 114.99
|
||||
40000 123.08
|
||||
45000 130.66
|
||||
50000 137.73
|
||||
55000 144.41
|
||||
60000 150.81
|
||||
65000 156.76
|
||||
70000 162.65
|
||||
75000 168.43
|
||||
80000 173.65
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/FMGC/internal/vs1g-conf-1">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">inertia/weight-kg</independentVar>
|
||||
<tableData>
|
||||
35000 95.11
|
||||
40000 101.59
|
||||
45000 107.89
|
||||
50000 113.84
|
||||
55000 119.46
|
||||
60000 124.84
|
||||
65000 130.17
|
||||
70000 135.10
|
||||
75000 139.91
|
||||
80000 144.44
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/FMGC/internal/vs1g-conf-1f">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">inertia/weight-kg</independentVar>
|
||||
<tableData>
|
||||
35000 90.08
|
||||
40000 96.03
|
||||
45000 101.93
|
||||
50000 107.55
|
||||
55000 112.76
|
||||
60000 117.97
|
||||
65000 122.96
|
||||
70000 127.54
|
||||
75000 132.18
|
||||
80000 136.54
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/FMGC/internal/vs1g-conf-2">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">inertia/weight-kg</independentVar>
|
||||
<tableData>
|
||||
35000 85.16
|
||||
40000 90.31
|
||||
45000 95.64
|
||||
50000 101.02
|
||||
55000 106.07
|
||||
60000 110.94
|
||||
65000 115.63
|
||||
70000 119.99
|
||||
75000 124.23
|
||||
80000 128.58
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/FMGC/internal/vs1g-conf-3">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">inertia/weight-kg</independentVar>
|
||||
<tableData>
|
||||
35000 83.55
|
||||
40000 88.77
|
||||
45000 94.32
|
||||
50000 99.25
|
||||
55000 104.23
|
||||
60000 109.10
|
||||
65000 113.75
|
||||
70000 118.16
|
||||
75000 122.28
|
||||
80000 126.35
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/FMGC/internal/vs1g-conf-full">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">inertia/weight-kg</independentVar>
|
||||
<independentVar lookup="column">/options/maxflap</independentVar>
|
||||
<tableData> <!-- CFM 35, IAE 40 -->
|
||||
35 40
|
||||
35000 81.61 79.67
|
||||
40000 86.71 84.65
|
||||
45000 91.69 89.06
|
||||
50000 96.56 93.87
|
||||
55000 101.37 98.51
|
||||
60000 106.01 102.92
|
||||
65000 110.25 106.75
|
||||
70000 114.67 111.18
|
||||
75000 118.68 115.08
|
||||
80000 122.58 118.81
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/FMGC/internal/vs1g-roll-factor">
|
||||
<function>
|
||||
<sqrt> <!-- Take the square root to get the factor -->
|
||||
<quotient> <!-- Calculate neutral load factor from bank -->
|
||||
<value>1</value>
|
||||
<cos>
|
||||
<toradians>
|
||||
<min>
|
||||
<abs>
|
||||
<property>/orientation/roll-deg</property>
|
||||
</abs>
|
||||
<value>89</value> <!-- Above math breaks -->
|
||||
</min>
|
||||
</toradians>
|
||||
</cos>
|
||||
</quotient>
|
||||
</sqrt>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<pure_gain name="/FMGC/internal/vs1g">
|
||||
<input>/FMGC/internal/vs1g-kts</input>
|
||||
<gain>/FMGC/internal/vs1g-roll-factor</gain>
|
||||
<clipto>
|
||||
<min>0</min>
|
||||
<max>/FMGC/internal/vmo-mmo</max>
|
||||
</clipto>
|
||||
</pure_gain>
|
||||
|
||||
<!-- Vls -->
|
||||
<switch name="/FMGC/internal/takeoff-latch">
|
||||
<default value="/FMGC/internal/takeoff-latch"/>
|
||||
<test logic="OR" value="1">
|
||||
position/wow eq 1
|
||||
/FMGC/internal/phase lt 2
|
||||
/FMGC/internal/phase eq 6
|
||||
</test>
|
||||
<test value="0">
|
||||
fcs/flap-pos-deg lt 0.1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/FMGC/internal/vls-factor">
|
||||
<default value="1.23"/> <!-- 1.23 VS1g -->
|
||||
<test value="1.13"> <!-- 1.13 VS1g -->
|
||||
/FMGC/internal/takeoff-latch eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="/FMGC/internal/vls">
|
||||
<function>
|
||||
<product>
|
||||
<property>/FMGC/internal/vs1g-kts</property>
|
||||
<sum>
|
||||
<property>/FMGC/internal/vls-factor</property>
|
||||
<table>
|
||||
<independentVar lookup="row">atmosphere/density-altitude</independentVar>
|
||||
<tableData>
|
||||
0 0.00
|
||||
43000 0.22
|
||||
</tableData>
|
||||
</table>
|
||||
</sum>
|
||||
</product>
|
||||
</function>
|
||||
<clipto>
|
||||
<min>/FMGC/internal/vs1g</min>
|
||||
<max>100000</max>
|
||||
</clipto>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/FMGC/internal/vls-mach">
|
||||
<function>
|
||||
<product>
|
||||
<quotient>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
|
||||
<max> <!-- Prevent divide by 0 -->
|
||||
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
|
||||
<value>0.0001</value>
|
||||
</max>
|
||||
</quotient>
|
||||
<property>/FMGC/internal/vls</property>
|
||||
</product>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<!-- Vmax - Computed in FMGC.nas and ADR.nas -->
|
||||
<fcs_function name="/FMGC/internal/vmax-mach">
|
||||
<function>
|
||||
<product>
|
||||
<quotient>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
|
||||
<max> <!-- Prevent divide by 0 -->
|
||||
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
|
||||
<value>0.0001</value>
|
||||
</max>
|
||||
</quotient>
|
||||
<property>/FMGC/internal/vmax</property>
|
||||
</product>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<!-- Slat -->
|
||||
<pure_gain name="/FMGC/internal/slat">
|
||||
<input>/FMGC/internal/vs1g-conf-1</input>
|
||||
<gain>1.22</gain>
|
||||
</pure_gain>
|
||||
|
||||
<!-- Flap 2 -->
|
||||
<pure_gain name="/FMGC/internal/flap-2">
|
||||
<input>/FMGC/internal/vs1g-conf-2</input>
|
||||
<gain>1.25</gain>
|
||||
</pure_gain>
|
||||
|
||||
<!-- Flap 3 -->
|
||||
<pure_gain name="/FMGC/internal/flap-3">
|
||||
<input>/FMGC/internal/vs1g-conf-3</input>
|
||||
<gain>1.25</gain>
|
||||
</pure_gain>
|
||||
|
||||
</channel>
|
||||
|
||||
<channel name="FMGC Misc" execrate="8">
|
||||
|
||||
<fcs_function name="/systems/fmgc/cas-compare/cas-1-to-3">
|
||||
<function>
|
||||
<abs>
|
||||
|
@ -259,6 +544,7 @@
|
|||
</ifthen>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
</channel>
|
||||
|
||||
</system>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</test>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="/position/gear-agl-ft-tie">
|
||||
<fcs_function name="position/gear-agl-ft">
|
||||
<function>
|
||||
<difference>
|
||||
<property>/position/altitude-agl-ft</property>
|
||||
|
@ -38,11 +38,16 @@
|
|||
<output>/position/gear-agl-ft</output> <!-- So flight recorder can override it -->
|
||||
</fcs_function>
|
||||
|
||||
<pure_gain name="/position/gear-agl-m-tie">
|
||||
<input>/position/gear-agl-ft</input>
|
||||
<pure_gain name="position/gear-agl-m">
|
||||
<input>position/gear-agl-ft</input>
|
||||
<gain>0.3048</gain>
|
||||
<output>/position/gear-agl-m</output> <!-- So flight recorder can override it -->
|
||||
</pure_gain>
|
||||
|
||||
<pure_gain name="inertia/weight-kg">
|
||||
<input>inertia/weight-lbs</input>
|
||||
<gain>0.45359237</gain>
|
||||
</pure_gain>
|
||||
|
||||
</channel>
|
||||
|
||||
|
|
|
@ -239,7 +239,13 @@
|
|||
<expression>
|
||||
<product>
|
||||
<difference>
|
||||
<property>/it-autoflight/input/mach</property>
|
||||
<max>
|
||||
<min>
|
||||
<property>/it-autoflight/input/mach</property>
|
||||
<property>/FMGC/internal/vmax-mach</property>
|
||||
</min>
|
||||
<property>/FMGC/internal/vls-mach</property>
|
||||
</max>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
|
||||
</difference>
|
||||
<value>80</value>
|
||||
|
@ -250,7 +256,13 @@
|
|||
<expression>
|
||||
<product>
|
||||
<difference>
|
||||
<property>/it-autoflight/input/kts</property>
|
||||
<max>
|
||||
<min>
|
||||
<property>/it-autoflight/input/kts</property>
|
||||
<property>/FMGC/internal/vmax</property>
|
||||
</min>
|
||||
<property>/FMGC/internal/vls</property>
|
||||
</max>
|
||||
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
|
||||
</difference>
|
||||
<value>0.08</value>
|
||||
|
|
|
@ -10,7 +10,17 @@
|
|||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>/it-autoflight/input/kts</input>
|
||||
<input>
|
||||
<expression>
|
||||
<max>
|
||||
<min>
|
||||
<property>/it-autoflight/input/kts</property>
|
||||
<property>/FMGC/internal/vmax</property>
|
||||
</min>
|
||||
<property>/FMGC/internal/vls</property>
|
||||
</max>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/athr-kts-cmd</output>
|
||||
<min>
|
||||
<expression>
|
||||
|
@ -72,7 +82,17 @@
|
|||
<debug>false</debug>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>/it-autoflight/input/mach</input>
|
||||
<input>
|
||||
<expression>
|
||||
<max>
|
||||
<min>
|
||||
<property>/it-autoflight/input/mach</property>
|
||||
<property>/FMGC/internal/vmax-mach</property>
|
||||
</min>
|
||||
<property>/FMGC/internal/vls-mach</property>
|
||||
</max>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/athr-mach-cmd</output>
|
||||
<min>
|
||||
<expression>
|
||||
|
|
|
@ -577,20 +577,6 @@
|
|||
<output>/systems/pressurization/targetvs</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>LBtoKG</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<update-interval-secs type="double">0.05</update-interval-secs>
|
||||
<input>
|
||||
<product>
|
||||
<property>/fdm/jsbsim/inertia/weight-lbs</property>
|
||||
<value>0.45359237</value>
|
||||
</product>
|
||||
</input>
|
||||
<output>/fdm/jsbsim/inertia/weight-kg</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>optalt</name>
|
||||
<type>gain</type>
|
||||
|
|
Loading…
Reference in a new issue