Control: IAE EPR control law
This commit is contained in:
parent
5be6d11265
commit
77d1a2cfa7
3 changed files with 353 additions and 25 deletions
|
@ -206,11 +206,11 @@ var canvas_upperECAM = {
|
|||
}),
|
||||
props.UpdateManager.FromHashValue("EPR_actual_1", 0.0001, func(val) {
|
||||
obj["EPR1"].setText(sprintf("%1.0f", math.floor(val)));
|
||||
obj["EPR1-decimal"].setText(sprintf("%03d", (val - int(val)) * 1000));
|
||||
obj["EPR1-decimal"].setText(sprintf("%03d", math.round((val - int(val)) * 1000)));
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("EPR_actual_2", 0.0001, func(val) {
|
||||
obj["EPR2"].setText(sprintf("%1.0f", math.floor(val)));
|
||||
obj["EPR2-decimal"].setText(sprintf("%03d", (val - int(val)) * 1000));
|
||||
obj["EPR2-decimal"].setText(sprintf("%03d", math.round((val - int(val)) * 1000)));
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("EPR_lim", 0.005, func(val) {
|
||||
obj["EPR1-ylim"].setRotation((val + 90) * D2R);
|
||||
|
@ -279,7 +279,7 @@ var canvas_upperECAM = {
|
|||
}),
|
||||
props.UpdateManager.FromHashValue("eprLimit", 0.0005, func(val) {
|
||||
obj["EPRLim"].setText(sprintf("%1.0f", math.floor(val)));
|
||||
obj["EPRLim-decimal"].setText(sprintf("%03d", (val - int(val)) * 1000));
|
||||
obj["EPRLim-decimal"].setText(sprintf("%03d", math.round((val - int(val)) * 1000)));
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("n1Limit", 0.01, func(val) {
|
||||
obj["N1Lim"].setText(sprintf("%s", math.floor(val + 0.05)));
|
||||
|
|
|
@ -166,6 +166,14 @@
|
|||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<!--
|
||||
Thrust limits on the IAE are kinda hard to do because of EPR - and we don't have a linear way to control throttle
|
||||
The CFM's just use N1, which is linear so it works well to make the FADEC, but as stated primary param is EPR
|
||||
So we have our thrust limits basic in N1 because its easier to calculate, then we calculate corrected EPR
|
||||
After we round the EPR, in order to correctly control/limit thrust, we will convert it BACK to N1... annoying right?
|
||||
Well the advantage is the plane is actually targetting EPR, so its more realistic to do this way even if its more steps
|
||||
I think that's better than just pretending to use EPR, and actually using N1 - if you look close enough, you can tell!
|
||||
-->
|
||||
<fcs_function name="fadec/limit/toga-ref">
|
||||
<function>
|
||||
<product>
|
||||
|
@ -184,23 +192,6 @@
|
|||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/toga">
|
||||
<function>
|
||||
<quotient>
|
||||
<integer>
|
||||
<sum>
|
||||
<product>
|
||||
<property>fadec/limit/toga-ref</property>
|
||||
<value>10</value>
|
||||
</product>
|
||||
<value>0.5</value> <!-- Make it round correctly -->
|
||||
</sum>
|
||||
</integer>
|
||||
<value>10</value>
|
||||
</quotient>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/toga-epr-input">
|
||||
<function>
|
||||
<pow>
|
||||
|
@ -246,6 +237,65 @@
|
|||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/toga-epr-n1-ref"> <!-- Opposite of EPR Calc -->
|
||||
<function>
|
||||
<quotient>
|
||||
<difference>
|
||||
<property>fadec/limit/toga-epr</property>
|
||||
<property>fadec/epr/c2</property>
|
||||
</difference>
|
||||
<max> <!-- Prevent divide by 0 -->
|
||||
<property>fadec/epr/c1</property>
|
||||
<value>0.001</value>
|
||||
</max>
|
||||
</quotient>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/toga-epr-n1"> <!-- Opposite of EPR Calc -->
|
||||
<function>
|
||||
<pow>
|
||||
<table>
|
||||
<independentVar lookup="row">fadec/limit/toga-epr-n1-ref</independentVar>
|
||||
<tableData>
|
||||
0.00 24743.1
|
||||
0.03 53194.6
|
||||
1.00 10000000.0
|
||||
</tableData>
|
||||
</table>
|
||||
<quotient>
|
||||
<value>1</value>
|
||||
<value>3.5</value>
|
||||
</quotient>
|
||||
</pow>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/toga-n1">
|
||||
<function>
|
||||
<quotient>
|
||||
<integer>
|
||||
<sum>
|
||||
<product>
|
||||
<property>fadec/limit/toga-ref</property>
|
||||
<value>10</value>
|
||||
</product>
|
||||
<value>0.5</value> <!-- Make it round correctly -->
|
||||
</sum>
|
||||
</integer>
|
||||
<value>10</value>
|
||||
</quotient>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<switch name="fadec/limit/toga">
|
||||
<default value="fadec/limit/toga-epr-n1"/>
|
||||
<test logic="AND" value="fadec/limit/toga-n1"> <!-- Only if both are in N1 mode! Otherwise the degraded engine uses equivalent N1 to the other engines EPR -->
|
||||
fadec/control-1/n1-mode gt 0
|
||||
fadec/control-2/n1-mode gt 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="fadec/limit/toga-norm">
|
||||
<function>
|
||||
<table>
|
||||
|
@ -310,7 +360,86 @@
|
|||
</test>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="fadec/limit/mct">
|
||||
<fcs_function name="fadec/limit/mct-epr-input">
|
||||
<function>
|
||||
<pow>
|
||||
<property>fadec/limit/mct-ref</property>
|
||||
<value>3.5</value>
|
||||
</pow>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/mct-epr-ref">
|
||||
<function>
|
||||
<sum>
|
||||
<product>
|
||||
<table>
|
||||
<independentVar lookup="row">fadec/limit/mct-epr-input</independentVar>
|
||||
<tableData>
|
||||
24743.1 0.00
|
||||
53194.6 0.03
|
||||
10000000.0 1.00
|
||||
</tableData>
|
||||
</table>
|
||||
<property>fadec/epr/c1</property>
|
||||
</product>
|
||||
<property>fadec/epr/c2</property>
|
||||
</sum>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/mct-epr">
|
||||
<function>
|
||||
<quotient>
|
||||
<integer>
|
||||
<sum>
|
||||
<product>
|
||||
<property>fadec/limit/mct-epr-ref</property>
|
||||
<value>1000</value>
|
||||
</product>
|
||||
<value>0.5</value> <!-- Make it round correctly -->
|
||||
</sum>
|
||||
</integer>
|
||||
<value>1000</value>
|
||||
</quotient>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/mct-epr-n1-ref"> <!-- Opposite of EPR Calc -->
|
||||
<function>
|
||||
<quotient>
|
||||
<difference>
|
||||
<property>fadec/limit/mct-epr</property>
|
||||
<property>fadec/epr/c2</property>
|
||||
</difference>
|
||||
<max> <!-- Prevent divide by 0 -->
|
||||
<property>fadec/epr/c1</property>
|
||||
<value>0.001</value>
|
||||
</max>
|
||||
</quotient>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/mct-epr-n1"> <!-- Opposite of EPR Calc -->
|
||||
<function>
|
||||
<pow>
|
||||
<table>
|
||||
<independentVar lookup="row">fadec/limit/mct-epr-n1-ref</independentVar>
|
||||
<tableData>
|
||||
0.00 24743.1
|
||||
0.03 53194.6
|
||||
1.00 10000000.0
|
||||
</tableData>
|
||||
</table>
|
||||
<quotient>
|
||||
<value>1</value>
|
||||
<value>3.5</value>
|
||||
</quotient>
|
||||
</pow>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/mct-n1">
|
||||
<function>
|
||||
<quotient>
|
||||
<integer>
|
||||
|
@ -327,6 +456,14 @@
|
|||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<switch name="fadec/limit/mct">
|
||||
<default value="fadec/limit/mct-epr-n1"/>
|
||||
<test logic="AND" value="fadec/limit/mct-n1"> <!-- Only if both are in N1 mode! Otherwise the degraded engine uses equivalent N1 to the other engines EPR -->
|
||||
fadec/control-1/n1-mode gt 0
|
||||
fadec/control-2/n1-mode gt 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="fadec/limit/mct-norm">
|
||||
<function>
|
||||
<table>
|
||||
|
@ -357,7 +494,86 @@
|
|||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/climb">
|
||||
<fcs_function name="fadec/limit/climb-epr-input">
|
||||
<function>
|
||||
<pow>
|
||||
<property>fadec/limit/climb-ref</property>
|
||||
<value>3.5</value>
|
||||
</pow>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/climb-epr-ref">
|
||||
<function>
|
||||
<sum>
|
||||
<product>
|
||||
<table>
|
||||
<independentVar lookup="row">fadec/limit/climb-epr-input</independentVar>
|
||||
<tableData>
|
||||
24743.1 0.00
|
||||
53194.6 0.03
|
||||
10000000.0 1.00
|
||||
</tableData>
|
||||
</table>
|
||||
<property>fadec/epr/c1</property>
|
||||
</product>
|
||||
<property>fadec/epr/c2</property>
|
||||
</sum>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/climb-epr">
|
||||
<function>
|
||||
<quotient>
|
||||
<integer>
|
||||
<sum>
|
||||
<product>
|
||||
<property>fadec/limit/climb-epr-ref</property>
|
||||
<value>1000</value>
|
||||
</product>
|
||||
<value>0.5</value> <!-- Make it round correctly -->
|
||||
</sum>
|
||||
</integer>
|
||||
<value>1000</value>
|
||||
</quotient>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/climb-epr-n1-ref"> <!-- Opposite of EPR Calc -->
|
||||
<function>
|
||||
<quotient>
|
||||
<difference>
|
||||
<property>fadec/limit/climb-epr</property>
|
||||
<property>fadec/epr/c2</property>
|
||||
</difference>
|
||||
<max> <!-- Prevent divide by 0 -->
|
||||
<property>fadec/epr/c1</property>
|
||||
<value>0.001</value>
|
||||
</max>
|
||||
</quotient>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/climb-epr-n1"> <!-- Opposite of EPR Calc -->
|
||||
<function>
|
||||
<pow>
|
||||
<table>
|
||||
<independentVar lookup="row">fadec/limit/climb-epr-n1-ref</independentVar>
|
||||
<tableData>
|
||||
0.00 24743.1
|
||||
0.03 53194.6
|
||||
1.00 10000000.0
|
||||
</tableData>
|
||||
</table>
|
||||
<quotient>
|
||||
<value>1</value>
|
||||
<value>3.5</value>
|
||||
</quotient>
|
||||
</pow>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/climb-n1">
|
||||
<function>
|
||||
<quotient>
|
||||
<integer>
|
||||
|
@ -374,6 +590,14 @@
|
|||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<switch name="fadec/limit/climb">
|
||||
<default value="fadec/limit/climb-epr-n1"/>
|
||||
<test logic="AND" value="fadec/limit/climb-n1"> <!-- Only if both are in N1 mode! Otherwise the degraded engine uses equivalent N1 to the other engines EPR -->
|
||||
fadec/control-1/n1-mode gt 0
|
||||
fadec/control-2/n1-mode gt 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="fadec/limit/climb-norm">
|
||||
<function>
|
||||
<table>
|
||||
|
@ -462,7 +686,86 @@
|
|||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/mrev">
|
||||
<fcs_function name="fadec/limit/mrev-epr-input">
|
||||
<function>
|
||||
<pow>
|
||||
<property>fadec/limit/mrev-ref</property>
|
||||
<value>3.5</value>
|
||||
</pow>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/mrev-epr-ref">
|
||||
<function>
|
||||
<sum>
|
||||
<product>
|
||||
<table>
|
||||
<independentVar lookup="row">fadec/limit/mrev-epr-input</independentVar>
|
||||
<tableData>
|
||||
24743.1 0.00
|
||||
53194.6 0.03
|
||||
10000000.0 1.00
|
||||
</tableData>
|
||||
</table>
|
||||
<property>fadec/epr/c1</property>
|
||||
</product>
|
||||
<property>fadec/epr/c2</property>
|
||||
</sum>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/mrev-epr">
|
||||
<function>
|
||||
<quotient>
|
||||
<integer>
|
||||
<sum>
|
||||
<product>
|
||||
<property>fadec/limit/mrev-epr-ref</property>
|
||||
<value>1000</value>
|
||||
</product>
|
||||
<value>0.5</value> <!-- Make it round correctly -->
|
||||
</sum>
|
||||
</integer>
|
||||
<value>1000</value>
|
||||
</quotient>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/mrev-epr-n1-ref"> <!-- Opposite of EPR Calc -->
|
||||
<function>
|
||||
<quotient>
|
||||
<difference>
|
||||
<property>fadec/limit/mrev-epr</property>
|
||||
<property>fadec/epr/c2</property>
|
||||
</difference>
|
||||
<max> <!-- Prevent divide by 0 -->
|
||||
<property>fadec/epr/c1</property>
|
||||
<value>0.001</value>
|
||||
</max>
|
||||
</quotient>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/mrev-epr-n1"> <!-- Opposite of EPR Calc -->
|
||||
<function>
|
||||
<pow>
|
||||
<table>
|
||||
<independentVar lookup="row">fadec/limit/mrev-epr-n1-ref</independentVar>
|
||||
<tableData>
|
||||
0.00 24743.1
|
||||
0.03 53194.6
|
||||
1.00 10000000.0
|
||||
</tableData>
|
||||
</table>
|
||||
<quotient>
|
||||
<value>1</value>
|
||||
<value>3.5</value>
|
||||
</quotient>
|
||||
</pow>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fadec/limit/mrev-n1">
|
||||
<function>
|
||||
<quotient>
|
||||
<integer>
|
||||
|
@ -479,6 +782,14 @@
|
|||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<switch name="fadec/limit/mrev">
|
||||
<default value="fadec/limit/mrev-epr-n1"/>
|
||||
<test logic="AND" value="fadec/limit/mrev-n1"> <!-- Only if both are in N1 mode! Otherwise the degraded engine uses equivalent N1 to the other engines EPR -->
|
||||
fadec/control-1/n1-mode gt 0
|
||||
fadec/control-2/n1-mode gt 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="fadec/limit/mrev-norm">
|
||||
<function>
|
||||
<table>
|
||||
|
@ -1295,7 +1606,24 @@
|
|||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="fadec/limit/active-n1">
|
||||
<switch name="fadec/limit/active-epr">
|
||||
<default value="0"/>
|
||||
<test value="fadec/limit/mrev-epr">
|
||||
fadec/limit/active-mode-int eq 4
|
||||
</test>
|
||||
<test value="fadec/limit/toga-epr">
|
||||
fadec/limit/active-mode-int eq 0
|
||||
</test>
|
||||
<test logic="OR" value="fadec/limit/mct-epr">
|
||||
fadec/limit/active-mode-int eq 1
|
||||
fadec/limit/active-mode-int eq 3
|
||||
</test>
|
||||
<test value="fadec/limit/climb-epr">
|
||||
fadec/limit/active-mode-int eq 2
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="fadec/limit/active-n1"> <!-- Converted from EPR or direct N1, depending on N1 Mode -->
|
||||
<default value="0"/>
|
||||
<test value="fadec/limit/mrev">
|
||||
fadec/limit/active-mode-int eq 4
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<difference>
|
||||
<table>
|
||||
<property>/position/altitude-ft</property>
|
||||
<entry><ind> 0</ind><dep>0.9857</dep></entry>
|
||||
<entry><ind> 0</ind><dep>0.9852</dep></entry>
|
||||
<entry><ind>43000</ind><dep>0.8584</dep></entry>
|
||||
</table>
|
||||
<table>
|
||||
|
|
Loading…
Reference in a new issue