FMGC: rework of alphaprot/max try 1, Control: Reduce upwards authority nearing stall alpha
This commit is contained in:
parent
fe53c4d753
commit
6f829acacc
6 changed files with 74 additions and 20 deletions
|
@ -89,6 +89,8 @@ var canvas_pfd = {
|
||||||
tgt_kts: 0,
|
tgt_kts: 0,
|
||||||
tgt_ias: 0,
|
tgt_ias: 0,
|
||||||
vapp: 0,
|
vapp: 0,
|
||||||
|
valphaprot: 0,
|
||||||
|
valphamax: 0,
|
||||||
vls: 0,
|
vls: 0,
|
||||||
new: func(svg, name, number) {
|
new: func(svg, name, number) {
|
||||||
var obj = {parents: [canvas_pfd] };
|
var obj = {parents: [canvas_pfd] };
|
||||||
|
@ -656,6 +658,9 @@ var canvas_pfd = {
|
||||||
|
|
||||||
if (!fmgc.FMGCInternal.takeoffState and fmgc.FMGCInternal.phase >= 1 and !notification.gear1Wow and !notification.gear2Wow) {
|
if (!fmgc.FMGCInternal.takeoffState and fmgc.FMGCInternal.phase >= 1 and !notification.gear1Wow and !notification.gear2Wow) {
|
||||||
me.vls = fmgc.FMGCNodes.vls.getValue();
|
me.vls = fmgc.FMGCNodes.vls.getValue();
|
||||||
|
me.valphaprot = fmgc.FMGCNodes.valphaProt.getValue();
|
||||||
|
me.valphamax = fmgc.FMGCNodes.valphaMax.getValue();
|
||||||
|
|
||||||
if (me.vls <= 30) {
|
if (me.vls <= 30) {
|
||||||
me.VLSmin = 0 - me.ASI;
|
me.VLSmin = 0 - me.ASI;
|
||||||
} else if (me.vls >= 420) {
|
} else if (me.vls >= 420) {
|
||||||
|
@ -664,20 +669,20 @@ var canvas_pfd = {
|
||||||
me.VLSmin = me.vls - 30 - me.ASI;
|
me.VLSmin = me.vls - 30 - me.ASI;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fmgc.FMGCInternal.alpha_prot <= 30) {
|
if (me.valphaprot <= 30) {
|
||||||
me.ALPHAprot = 0 - me.ASI;
|
me.ALPHAprot = 0 - me.ASI;
|
||||||
} else if (fmgc.FMGCInternal.alpha_prot >= 420) {
|
} else if (me.valphaprot >= 420) {
|
||||||
me.ALPHAprot = 390 - me.ASI;
|
me.ALPHAprot = 390 - me.ASI;
|
||||||
} else {
|
} else {
|
||||||
me.ALPHAprot = fmgc.FMGCInternal.alpha_prot - 30 - me.ASI;
|
me.ALPHAprot = me.valphaprot - 30 - me.ASI;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fmgc.FMGCInternal.alpha_max <= 30) {
|
if (me.valphamax <= 30) {
|
||||||
me.ALPHAmax = 0 - me.ASI;
|
me.ALPHAmax = 0 - me.ASI;
|
||||||
} else if (fmgc.FMGCInternal.alpha_max >= 420) {
|
} else if (me.valphamax >= 420) {
|
||||||
me.ALPHAmax = 390 - me.ASI;
|
me.ALPHAmax = 390 - me.ASI;
|
||||||
} else {
|
} else {
|
||||||
me.ALPHAmax = fmgc.FMGCInternal.alpha_max - 30 - me.ASI;
|
me.ALPHAmax = me.valphamax - 30 - me.ASI;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fmgc.FMGCInternal.vsw <= 30) {
|
if (fmgc.FMGCInternal.vsw <= 30) {
|
||||||
|
|
|
@ -261,6 +261,7 @@ var FMGCNodes = {
|
||||||
clean: props.globals.getNode("/FMGC/internal/clean"),
|
clean: props.globals.getNode("/FMGC/internal/clean"),
|
||||||
flap2: props.globals.getNode("/FMGC/internal/flap-2"),
|
flap2: props.globals.getNode("/FMGC/internal/flap-2"),
|
||||||
flap3: props.globals.getNode("/FMGC/internal/flap-3"),
|
flap3: props.globals.getNode("/FMGC/internal/flap-3"),
|
||||||
|
ktsToMachFactor: props.globals.getNode("/FMGC/internal/kts-to-mach-factor"),
|
||||||
lw: props.globals.getNode("/FMGC/internal/lw"),
|
lw: props.globals.getNode("/FMGC/internal/lw"),
|
||||||
lwClean: props.globals.getNode("/FMGC/internal/lw-clean"),
|
lwClean: props.globals.getNode("/FMGC/internal/lw-clean"),
|
||||||
lwVs1gConf0: props.globals.getNode("/FMGC/internal/lw-vs1g-conf-0"),
|
lwVs1gConf0: props.globals.getNode("/FMGC/internal/lw-vs1g-conf-0"),
|
||||||
|
@ -269,14 +270,13 @@ var FMGCNodes = {
|
||||||
lwVs1gConf3: props.globals.getNode("/FMGC/internal/lw-vs1g-conf-3"),
|
lwVs1gConf3: props.globals.getNode("/FMGC/internal/lw-vs1g-conf-3"),
|
||||||
lwVs1gConfFull: props.globals.getNode("/FMGC/internal/lw-vs1g-conf-full"),
|
lwVs1gConfFull: props.globals.getNode("/FMGC/internal/lw-vs1g-conf-full"),
|
||||||
mngSpdAlt: props.globals.getNode("/FMGC/internal/mng-alt-spd"),
|
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"),
|
machToKtsFactor: props.globals.getNode("/FMGC/internal/mach-to-kts-factor"),
|
||||||
mngMachAlt: props.globals.getNode("/FMGC/internal/mng-alt-mach"),
|
mngMachAlt: props.globals.getNode("/FMGC/internal/mng-alt-mach"),
|
||||||
slat: props.globals.getNode("/FMGC/internal/slat"),
|
|
||||||
Power: {
|
Power: {
|
||||||
FMGC1Powered: props.globals.getNode("systems/fmgc/power/power-1-on"),
|
FMGC1Powered: props.globals.getNode("systems/fmgc/power/power-1-on"),
|
||||||
FMGC2Powered: props.globals.getNode("systems/fmgc/power/power-2-on"),
|
FMGC2Powered: props.globals.getNode("systems/fmgc/power/power-2-on"),
|
||||||
},
|
},
|
||||||
|
slat: props.globals.getNode("/FMGC/internal/slat"),
|
||||||
toFromSet: props.globals.initNode("/FMGC/internal/tofrom-set", 0, "BOOL"),
|
toFromSet: props.globals.initNode("/FMGC/internal/tofrom-set", 0, "BOOL"),
|
||||||
toState: props.globals.initNode("/FMGC/internal/to-state", 0, "BOOL"),
|
toState: props.globals.initNode("/FMGC/internal/to-state", 0, "BOOL"),
|
||||||
tow: props.globals.getNode("/FMGC/internal/tow"),
|
tow: props.globals.getNode("/FMGC/internal/tow"),
|
||||||
|
@ -289,6 +289,8 @@ var FMGCNodes = {
|
||||||
v1: props.globals.initNode("/FMGC/internal/v1", 0, "DOUBLE"),
|
v1: props.globals.initNode("/FMGC/internal/v1", 0, "DOUBLE"),
|
||||||
v1set: props.globals.initNode("/FMGC/internal/v1-set", 0, "BOOL"),
|
v1set: props.globals.initNode("/FMGC/internal/v1-set", 0, "BOOL"),
|
||||||
phase: props.globals.initNode("/FMGC/internal/phase", 0, "INT"),
|
phase: props.globals.initNode("/FMGC/internal/phase", 0, "INT"),
|
||||||
|
valphaMax: props.globals.getNode("/FMGC/internal/valpha-max"),
|
||||||
|
valphaProt: props.globals.getNode("/FMGC/internal/valpha-prot"),
|
||||||
vls: props.globals.getNode("/FMGC/internal/vls"),
|
vls: props.globals.getNode("/FMGC/internal/vls"),
|
||||||
vmax: props.globals.getNode("/FMGC/internal/vmax"),
|
vmax: props.globals.getNode("/FMGC/internal/vmax"),
|
||||||
vs1g: props.globals.getNode("/FMGC/internal/vs1g"),
|
vs1g: props.globals.getNode("/FMGC/internal/vs1g"),
|
||||||
|
@ -823,8 +825,8 @@ var masterFMGC = maketimer(0.2, func {
|
||||||
aoa = getprop("/systems/navigation/adr/output/aoa-1");
|
aoa = getprop("/systems/navigation/adr/output/aoa-1");
|
||||||
cas = getprop("/systems/navigation/adr/output/cas-1");
|
cas = getprop("/systems/navigation/adr/output/cas-1");
|
||||||
if (aoa > -5) {
|
if (aoa > -5) {
|
||||||
FMGCInternal.alpha_prot = cas * math.sqrt((aoa - aoa_0)/(aoa_prot - aoa_0));
|
FMGCInternal.alpha_prot = FMGCNodes.valphaProt.getValue();
|
||||||
FMGCInternal.alpha_max = cas * math.sqrt((aoa - aoa_0)/(aoa_max - aoa_0));
|
FMGCInternal.alpha_max = FMGCNodes.valphaMax.getValue();
|
||||||
} else {
|
} else {
|
||||||
FMGCInternal.alpha_prot = 0;
|
FMGCInternal.alpha_prot = 0;
|
||||||
FMGCInternal.alpha_max = 0;
|
FMGCInternal.alpha_max = 0;
|
||||||
|
|
|
@ -1009,7 +1009,7 @@
|
||||||
|
|
||||||
<!-- Alpha Floor and Toga Lk -->
|
<!-- Alpha Floor and Toga Lk -->
|
||||||
<switch name="fadec/alpha-floor-engage">
|
<switch name="fadec/alpha-floor-engage">
|
||||||
<default value="9.5"/>
|
<default value="14.5"/>
|
||||||
<test logic="OR" value="15">
|
<test logic="OR" value="15">
|
||||||
/controls/flight/flaps-pos eq 1
|
/controls/flight/flaps-pos eq 1
|
||||||
/controls/flight/flaps-pos eq 2
|
/controls/flight/flaps-pos eq 2
|
||||||
|
|
|
@ -1474,16 +1474,32 @@
|
||||||
</function>
|
</function>
|
||||||
</fcs_function>
|
</fcs_function>
|
||||||
|
|
||||||
|
<summer name="fbw/pitch/stall-alpha-error">
|
||||||
|
<input>aero/alpha-deg-fixed</input>
|
||||||
|
<input>-fbw/stall-alpha-deg</input>
|
||||||
|
</summer>
|
||||||
|
|
||||||
<fcs_function name="fbw/pitch/e-i-min">
|
<fcs_function name="fbw/pitch/e-i-min">
|
||||||
<function>
|
<function>
|
||||||
<table>
|
<max>
|
||||||
<independentVar lookup="row">fbw/pitch/max-rad-error</independentVar>
|
<table>
|
||||||
<tableData>
|
<independentVar lookup="row">fbw/pitch/max-rad-error</independentVar>
|
||||||
-0.087266 -1.0
|
<tableData>
|
||||||
-0.034907 -0.1
|
-0.087266 -1.0
|
||||||
0.000000 0.0
|
-0.034907 -0.1
|
||||||
</tableData>
|
0.000000 0.0
|
||||||
</table>
|
</tableData>
|
||||||
|
</table>
|
||||||
|
<table>
|
||||||
|
<independentVar lookup="row">fbw/pitch/stall-alpha-error</independentVar>
|
||||||
|
<independentVar lookup="column">/it-fbw/law</independentVar>
|
||||||
|
<tableData>
|
||||||
|
0 1
|
||||||
|
-2.5 -1 -1
|
||||||
|
0.0 0 -1
|
||||||
|
</tableData>
|
||||||
|
</table>
|
||||||
|
</max>
|
||||||
</function>
|
</function>
|
||||||
</fcs_function>
|
</fcs_function>
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,10 @@
|
||||||
<!-- Copyright (c) 2022 Josh Davidson and Jonathan Redpath -->
|
<!-- Copyright (c) 2022 Josh Davidson and Jonathan Redpath -->
|
||||||
|
|
||||||
<system name="A320: FMGC">
|
<system name="A320: FMGC">
|
||||||
|
|
||||||
<property value="350">/FMGC/internal/vmo-kts</property>
|
<property value="350">/FMGC/internal/vmo-kts</property>
|
||||||
|
<property value="100">test</property>
|
||||||
|
<property value="0.2">test2</property>
|
||||||
|
|
||||||
<channel name="FMGC Power" execrate="8">
|
<channel name="FMGC Power" execrate="8">
|
||||||
|
|
||||||
|
@ -189,6 +192,34 @@
|
||||||
</function>
|
</function>
|
||||||
</fcs_function>
|
</fcs_function>
|
||||||
|
|
||||||
|
<!-- V alpha prot/max -->
|
||||||
|
<lag_filter name="/FMGC/internal/valphadot-lag">
|
||||||
|
<input>aero/alphadot-rad_sec</input>
|
||||||
|
<c1>test2</c1>
|
||||||
|
</lag_filter>
|
||||||
|
|
||||||
|
<pure_gain name="/FMGC/internal/valphadot-offset">
|
||||||
|
<input>/FMGC/internal/valphadot-lag</input>
|
||||||
|
<gain>test</gain>
|
||||||
|
</pure_gain>
|
||||||
|
|
||||||
|
<fcs_function name="/FMGC/internal/valpha-prot">
|
||||||
|
<function>
|
||||||
|
<sum>
|
||||||
|
<product>
|
||||||
|
<property>/FMGC/internal/vs1g-kts</property>
|
||||||
|
<value>1.09</value>
|
||||||
|
</product>
|
||||||
|
<property>/FMGC/internal/valphadot-offset</property>
|
||||||
|
</sum>
|
||||||
|
</function>
|
||||||
|
</fcs_function>
|
||||||
|
|
||||||
|
<summer name="/FMGC/internal/valpha-max">
|
||||||
|
<input>/FMGC/internal/vs1g-kts</input>
|
||||||
|
<input>/FMGC/internal/valphadot-offset</input>
|
||||||
|
</summer>
|
||||||
|
|
||||||
<!-- Extra VS1g tables for predictions etc -->
|
<!-- Extra VS1g tables for predictions etc -->
|
||||||
<fcs_function name="/FMGC/internal/vs1g-conf-0">
|
<fcs_function name="/FMGC/internal/vs1g-conf-0">
|
||||||
<function>
|
<function>
|
||||||
|
|
|
@ -1468,7 +1468,7 @@
|
||||||
|
|
||||||
<!-- Alpha Floor and Toga Lk -->
|
<!-- Alpha Floor and Toga Lk -->
|
||||||
<switch name="fadec/alpha-floor-engage">
|
<switch name="fadec/alpha-floor-engage">
|
||||||
<default value="9.5"/>
|
<default value="14.5"/>
|
||||||
<test logic="OR" value="15">
|
<test logic="OR" value="15">
|
||||||
/controls/flight/flaps-pos eq 1
|
/controls/flight/flaps-pos eq 1
|
||||||
/controls/flight/flaps-pos eq 2
|
/controls/flight/flaps-pos eq 2
|
||||||
|
|
Loading…
Add table
Reference in a new issue