FMGC: Redo bank limit logic on better
This commit is contained in:
parent
f88138da9e
commit
b6af0fab1a
2 changed files with 18 additions and 13 deletions
|
@ -116,8 +116,7 @@ var Internal = {
|
|||
altDiff: 0,
|
||||
altTemp: 0,
|
||||
altPredicted: props.globals.initNode("/it-autoflight/internal/altitude-predicted", 0, "DOUBLE"),
|
||||
bankLimit: props.globals.initNode("/it-autoflight/internal/bank-limit", 30, "INT"),
|
||||
bankLimitAuto: 30,
|
||||
bankLimit: props.globals.initNode("/it-autoflight/internal/bank-limit", 0, "DOUBLE"),
|
||||
captVs: 0,
|
||||
driftAngle: props.globals.initNode("/it-autoflight/internal/drift-angle-deg", 0, "DOUBLE"),
|
||||
driftAngleTemp: 0,
|
||||
|
@ -228,7 +227,6 @@ var ITAF = {
|
|||
Internal.minVs.setValue(-500);
|
||||
Internal.maxVs.setValue(500);
|
||||
Internal.bankLimit.setValue(30);
|
||||
Internal.bankLimitAuto = 30;
|
||||
Internal.alt.setValue(10000);
|
||||
Internal.altCaptureActive = 0;
|
||||
Input.kts.setValue(100);
|
||||
|
@ -371,16 +369,6 @@ var ITAF = {
|
|||
FPLN.activeTemp = FPLN.active.getValue();
|
||||
FPLN.currentWpTemp = FPLN.currentWp.getValue();
|
||||
|
||||
# Bank Limit
|
||||
if (Velocities.trueAirspeedKtTemp >= 420) {
|
||||
Internal.bankLimitAuto = 15;
|
||||
} else if (Velocities.trueAirspeedKtTemp >= 340) {
|
||||
Internal.bankLimitAuto = 20;
|
||||
} else {
|
||||
Internal.bankLimitAuto = 30;
|
||||
}
|
||||
Internal.bankLimit.setValue(Internal.bankLimitAuto);
|
||||
|
||||
# If in LNAV mode and route is not longer active, switch to HDG HLD
|
||||
if (Output.lat.getValue() == 1) { # Only evaulate the rest of the condition if we are in LNAV mode
|
||||
if (flightPlanController.num[2].getValue() == 0 or !FPLN.active.getBoolValue()) {
|
||||
|
|
|
@ -80,6 +80,23 @@
|
|||
</predict-simple>
|
||||
|
||||
<!-- Autopilot Helpers/Calculators -->
|
||||
<filter>
|
||||
<name>Auto Bank Limit</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<input>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/velocities/mach</property>
|
||||
<entry><ind>0.55</ind><dep>25</dep></entry>
|
||||
<entry><ind>0.80</ind><dep>20</dep></entry>
|
||||
<entry><ind>0.90</ind><dep>10</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/it-autoflight/internal/bank-limit</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>FMGC Managed Knots</name>
|
||||
<type>gain</type>
|
||||
|
|
Loading…
Reference in a new issue