major update to pneumatics
This commit is contained in:
parent
8fd2fd54ac
commit
92379a7bfc
4 changed files with 192 additions and 95 deletions
|
@ -3171,7 +3171,7 @@
|
|||
<action>
|
||||
<button>0</button>
|
||||
<repeatable>false</repeatable>
|
||||
<!--binding>
|
||||
<binding>
|
||||
<condition>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
|
@ -3186,7 +3186,7 @@
|
|||
</condition>
|
||||
<command>property-toggle</command>
|
||||
<property>/controls/pressurization/auto</property>
|
||||
</binding-->
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/btn1", 1);</script>
|
||||
|
@ -3235,7 +3235,7 @@
|
|||
<action>
|
||||
<button>0</button>
|
||||
<repeatable>false</repeatable>
|
||||
<!--binding>
|
||||
<binding>
|
||||
<condition>
|
||||
<or>
|
||||
<greater-than-equals>
|
||||
|
@ -3257,8 +3257,8 @@
|
|||
</or>
|
||||
</condition>
|
||||
<command>property-toggle</command>
|
||||
<property>/controls/ditching</property>
|
||||
</binding-->
|
||||
<property>/systems/pressurization/ditchingpb</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("/sim/sounde/btn1", 1);</script>
|
||||
|
@ -3272,7 +3272,7 @@
|
|||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>/controls/pressurization/unused-oh-btn</property>
|
||||
<property>/systems/pressurization/ditchingpb</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
|
|
|
@ -161,7 +161,6 @@ setlistener("/sim/signals/fdm-initialized", func {
|
|||
systems.adirs_init();
|
||||
systems.pneu_init();
|
||||
systems.hyd_init();
|
||||
systems.press_init();
|
||||
systems.fuel_init();
|
||||
fmgc.APinit();
|
||||
librariesLoop.start();
|
||||
|
|
|
@ -29,10 +29,6 @@ var pneu_init = func {
|
|||
setprop("/systems/pneumatic/startpsir", 0);
|
||||
setprop("/systems/pneumatic/eng1-starter", 0);
|
||||
setprop("/systems/pneumatic/eng2-starter", 0);
|
||||
pneu_timer.start();
|
||||
}
|
||||
|
||||
var press_init = func {
|
||||
setprop("/FMGC/internal/dep-arpt", "");
|
||||
setprop("/systems/pressurization/mode", "GN");
|
||||
setprop("/systems/pressurization/vs", "0");
|
||||
|
@ -43,10 +39,13 @@ var press_init = func {
|
|||
setprop("/systems/pressurization/outflowpos", "0");
|
||||
setprop("/systems/pressurization/deltap-norm", "0");
|
||||
setprop("/systems/pressurization/outflowpos-norm", "0");
|
||||
var altitude = getprop("/position/altitude-ft");
|
||||
var altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
|
||||
setprop("/systems/pressurization/cabinalt", altitude);
|
||||
setprop("/systems/pressurization/targetalt", altitude);
|
||||
setprop("/systems/pressurization/diff-to-target", "0");
|
||||
setprop("/systems/pressurization/ditchingpb", 0);
|
||||
setprop("/systems/pressurization/targetvs", 0);
|
||||
pneu_timer.start();
|
||||
}
|
||||
|
||||
#######################
|
||||
|
@ -157,27 +156,25 @@ var master_pneu = func {
|
|||
var deltap = getprop("/systems/pressurization/deltap");
|
||||
var outflow = getprop("/systems/pressurization/outflowpos");
|
||||
var speed = getprop("/velocities/groundspeed-kt");
|
||||
var cabinalt = getprop("/systems/pressurization/cabinalt");
|
||||
var dep_apt = getprop("autopilot/route-manager/departure/airport");
|
||||
var airport_dep_elev_ft = getprop("autopilot/route-manager/departure/field-elevation-ft");
|
||||
var altitude = getprop("/position/altitude-ft");
|
||||
var altitude = getprop("/instrumentation/altimeter/indicated-altitude-ft");
|
||||
var airport_arr_elev_ft = getprop("autopilot/route-manager/destination/field-elevation-ft");
|
||||
var vs = getprop("/systems/pressurization/vs-norm");
|
||||
var ditch = getprop("/systems/pressurization/ditchingpb");
|
||||
var outflowpos = getprop("/systems/pressurization/outflowpos");
|
||||
var cabinalt = getprop("/systems/pressurization/cabinalt");
|
||||
var targetalt = getprop("/systems/pressurization/targetalt");
|
||||
var targetvs = getprop("/systems/pressurization/targetvs");
|
||||
var ambient = getprop("/systems/pressurization/ambientpsi");
|
||||
var cabinpsi = getprop("/systems/pressurization/cabinpsi");
|
||||
var pause = getprop("/sim/freeze/master");
|
||||
var auto = getprop("/systems/pressurization/auto");
|
||||
|
||||
setprop("/systems/pressurization/diff-to-target", targetalt - cabinalt);
|
||||
setprop("/systems/pressurization/deltap", cabinpsi - ambient);
|
||||
|
||||
if ((pressmode == "GN") and (pressmode != "CL") and (wowl and wowr) and ((state1 == "MCT") or (state1 == "TOGA")) and ((state2 == "MCT") or (state2 == "TOGA"))) {
|
||||
setprop("/systems/pressurization/mode", "TO");
|
||||
}
|
||||
|
||||
if (((!wowl) or (!wowr)) and (speed > 100) and (pressmode == "TO")) {
|
||||
} else if (((!wowl) or (!wowr)) and (speed > 100) and (pressmode == "TO")) {
|
||||
setprop("/systems/pressurization/mode", "CL");
|
||||
}
|
||||
|
||||
|
@ -185,9 +182,23 @@ var master_pneu = func {
|
|||
setprop("/systems/pressurization/vs", targetvs);
|
||||
}
|
||||
|
||||
if (cabinalt != targetalt and !wowl and !wowr) {
|
||||
if (cabinalt != targetalt and !wowl and !wowr and !pause) {
|
||||
setprop("/systems/pressurization/cabinalt", cabinalt + vs);
|
||||
}
|
||||
|
||||
if (ditch and auto) {
|
||||
setprop("/systems/pressurization/outflowpos", "1");
|
||||
}
|
||||
|
||||
if ((targetvs => 0) and (targetvs < 1000) and !ditch) {
|
||||
setprop("/systems/pressurization/outflowpos", "0.75");
|
||||
} else if ((targetvs => 1000) and (targetvs < 1999) and !ditch) {
|
||||
setprop("/systems/pressurization/outflowpos", "0.55");
|
||||
} else if ((targetvs => 2000) and !ditch) {
|
||||
setprop("/systems/pressurization/outflowpos", "0.25");
|
||||
} else if ((targetvs < 0) and !ditch) {
|
||||
setprop("/systems/pressurization/outflowpos", "1");
|
||||
}
|
||||
}
|
||||
|
||||
###################
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Target Pressurize Altitude</name>
|
||||
<name>Target Pressurize Altitude CMD</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<update-interval-secs type="double">0.1</update-interval-secs>
|
||||
|
@ -221,11 +221,37 @@
|
|||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/systems/pressurization/targetalt-cmd</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Target Pressurize Altitude</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<update-interval-secs type="double">0.1</update-interval-secs>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/gear/gear[1]/wow</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/systems/pressurization/cabinalt-norm</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<not>
|
||||
<property>/gear/gear[1]/wow</property>
|
||||
<value>1</value>
|
||||
</not>
|
||||
</condition>
|
||||
<property>/systems/pressurization/targetalt-cmd</property>
|
||||
</input>
|
||||
<output>/systems/pressurization/targetalt</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>Cabin PSI</name>
|
||||
<name>Cabin PSI target</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<update-interval-secs type="double">0.1</update-interval-secs>
|
||||
|
@ -233,17 +259,46 @@
|
|||
<expression>
|
||||
<table>
|
||||
<property>/systems/pressurization/cabinalt-norm</property>
|
||||
<entry><ind>-1000</ind><dep> 16.5</dep></entry>
|
||||
<entry><ind> 0</ind><dep> 14.7</dep></entry>
|
||||
<entry><ind> 1000</ind><dep> 14.6</dep></entry>
|
||||
<entry><ind> 5000</ind><dep> 14.4</dep></entry>
|
||||
<entry><ind>20000</ind><dep> 12.1</dep></entry>
|
||||
<entry><ind>30000</ind><dep> 11.4</dep></entry>
|
||||
<entry><ind>30000</ind><dep> 11.0</dep></entry>
|
||||
<entry><ind>40500</ind><dep> 10.9</dep></entry>
|
||||
<entry><ind>-1000</ind><dep> 16.50000</dep></entry>
|
||||
<entry><ind> 0</ind><dep> 14.70000</dep></entry>
|
||||
<entry><ind> 0</ind><dep> 14.70000</dep></entry>
|
||||
<entry><ind> 1000</ind><dep> 14.20000</dep></entry>
|
||||
<entry><ind> 2000</ind><dep> 13.60000</dep></entry>
|
||||
<entry><ind> 3000</ind><dep> 13.20000</dep></entry>
|
||||
<entry><ind> 4000</ind><dep> 12.70000</dep></entry>
|
||||
<entry><ind> 5000</ind><dep> 12.20000</dep></entry>
|
||||
<entry><ind> 6000</ind><dep> 11.70000</dep></entry>
|
||||
<entry><ind> 7000</ind><dep> 11.30000</dep></entry>
|
||||
<entry><ind> 8000</ind><dep> 10.90000</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/systems/pressurization/cabinpsi-target</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>VS-target</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<update-interval-secs type="double">0.1</update-interval-secs>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/gear/gear[1]/wow</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<property>/systems/pressurization/ambientpsi</property>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<not>
|
||||
<property>/gear/gear[1]/wow</property>
|
||||
<value>1</value>
|
||||
</not>
|
||||
</condition>
|
||||
<property>/systems/pressurization/cabinpsi-target</property>
|
||||
</input>
|
||||
<output>/systems/pressurization/cabinpsi</output>
|
||||
</filter>
|
||||
|
||||
|
@ -256,41 +311,41 @@
|
|||
<expression>
|
||||
<table>
|
||||
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
|
||||
<entry><ind>-1000</ind><dep> 16.5</dep></entry>
|
||||
<entry><ind> 0</ind><dep> 14.7</dep></entry>
|
||||
<entry><ind> 1000</ind><dep> 14.2</dep></entry>
|
||||
<entry><ind> 2000</ind><dep> 13.6</dep></entry>
|
||||
<entry><ind> 3000</ind><dep> 13.2</dep></entry>
|
||||
<entry><ind> 4000</ind><dep> 12.7</dep></entry>
|
||||
<entry><ind> 5000</ind><dep> 12.2</dep></entry>
|
||||
<entry><ind> 6000</ind><dep> 11.7</dep></entry>
|
||||
<entry><ind> 7000</ind><dep> 11.3</dep></entry>
|
||||
<entry><ind> 8000</ind><dep> 10.9</dep></entry>
|
||||
<entry><ind> 9000</ind><dep> 10.5</dep></entry>
|
||||
<entry><ind>10000</ind><dep> 10.1</dep></entry>
|
||||
<entry><ind>11000</ind><dep> 9.7</dep></entry>
|
||||
<entry><ind>12000</ind><dep> 9.3</dep></entry>
|
||||
<entry><ind>13000</ind><dep> 9.0</dep></entry>
|
||||
<entry><ind>14000</ind><dep> 8.6</dep></entry>
|
||||
<entry><ind>15000</ind><dep> 8.3</dep></entry>
|
||||
<entry><ind>16000</ind><dep> 8.0</dep></entry>
|
||||
<entry><ind>17000</ind><dep> 7.6</dep></entry>
|
||||
<entry><ind>18000</ind><dep> 7.3</dep></entry>
|
||||
<entry><ind>19000</ind><dep> 7.0</dep></entry>
|
||||
<entry><ind>20000</ind><dep> 6.8</dep></entry>
|
||||
<entry><ind>22000</ind><dep> 6.2</dep></entry>
|
||||
<entry><ind>24000</ind><dep> 5.7</dep></entry>
|
||||
<entry><ind>26000</ind><dep> 5.2</dep></entry>
|
||||
<entry><ind>28000</ind><dep> 4.7</dep></entry>
|
||||
<entry><ind>30000</ind><dep> 4.4</dep></entry>
|
||||
<entry><ind>32000</ind><dep> 4.0</dep></entry>
|
||||
<entry><ind>34000</ind><dep> 3.6</dep></entry>
|
||||
<entry><ind>36000</ind><dep> 3.3</dep></entry>
|
||||
<entry><ind>38000</ind><dep> 3.0</dep></entry>
|
||||
<entry><ind>39000</ind><dep> 2.9</dep></entry>
|
||||
<entry><ind>40000</ind><dep> 2.7</dep></entry>
|
||||
<entry><ind>41000</ind><dep> 2.6</dep></entry>
|
||||
<entry><ind>42000</ind><dep> 2.5</dep></entry>
|
||||
<entry><ind>-1000</ind><dep> 16.50000</dep></entry>
|
||||
<entry><ind> 0</ind><dep> 14.70000</dep></entry>
|
||||
<entry><ind> 1000</ind><dep> 14.20000</dep></entry>
|
||||
<entry><ind> 2000</ind><dep> 13.60000</dep></entry>
|
||||
<entry><ind> 3000</ind><dep> 13.20000</dep></entry>
|
||||
<entry><ind> 4000</ind><dep> 12.70000</dep></entry>
|
||||
<entry><ind> 5000</ind><dep> 12.20000</dep></entry>
|
||||
<entry><ind> 6000</ind><dep> 11.70000</dep></entry>
|
||||
<entry><ind> 7000</ind><dep> 11.30000</dep></entry>
|
||||
<entry><ind> 8000</ind><dep> 10.90000</dep></entry>
|
||||
<entry><ind> 9000</ind><dep> 10.50000</dep></entry>
|
||||
<entry><ind>10000</ind><dep> 10.10000</dep></entry>
|
||||
<entry><ind>11000</ind><dep> 9.70000</dep></entry>
|
||||
<entry><ind>12000</ind><dep> 9.30000</dep></entry>
|
||||
<entry><ind>13000</ind><dep> 9.00000</dep></entry>
|
||||
<entry><ind>14000</ind><dep> 8.60000</dep></entry>
|
||||
<entry><ind>15000</ind><dep> 8.30000</dep></entry>
|
||||
<entry><ind>16000</ind><dep> 8.00000</dep></entry>
|
||||
<entry><ind>17000</ind><dep> 7.60000</dep></entry>
|
||||
<entry><ind>18000</ind><dep> 7.30000</dep></entry>
|
||||
<entry><ind>19000</ind><dep> 7.00000</dep></entry>
|
||||
<entry><ind>20000</ind><dep> 6.80000</dep></entry>
|
||||
<entry><ind>22000</ind><dep> 6.20000</dep></entry>
|
||||
<entry><ind>24000</ind><dep> 5.70000</dep></entry>
|
||||
<entry><ind>26000</ind><dep> 5.20000</dep></entry>
|
||||
<entry><ind>28000</ind><dep> 4.70000</dep></entry>
|
||||
<entry><ind>30000</ind><dep> 4.40000</dep></entry>
|
||||
<entry><ind>32000</ind><dep> 4.00000</dep></entry>
|
||||
<entry><ind>34000</ind><dep> 3.60000</dep></entry>
|
||||
<entry><ind>36000</ind><dep> 3.30000</dep></entry>
|
||||
<entry><ind>38000</ind><dep> 3.00000</dep></entry>
|
||||
<entry><ind>39000</ind><dep> 2.90000</dep></entry>
|
||||
<entry><ind>40000</ind><dep> 2.70000</dep></entry>
|
||||
<entry><ind>41000</ind><dep> 2.60000</dep></entry>
|
||||
<entry><ind>42000</ind><dep> 2.50000</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
|
@ -314,7 +369,7 @@
|
|||
<property>/systems/pressurization/vs</property>
|
||||
</input>
|
||||
<output>/systems/pressurization/vs-norm</output>
|
||||
<max-rate-of-change>100</max-rate-of-change>
|
||||
<max-rate-of-change>500</max-rate-of-change>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
|
@ -338,7 +393,7 @@
|
|||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>VS-target</name>
|
||||
<name>VS-target-cmd</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<update-interval-secs type="double">0.05</update-interval-secs>
|
||||
|
@ -346,16 +401,48 @@
|
|||
<expression>
|
||||
<table>
|
||||
<property>/it-autoflight/internal/vert-speed-fpm</property>
|
||||
<entry><ind>-1000</ind><dep>-410</dep></entry>
|
||||
<entry><ind>-50000</ind><dep> -50000</dep></entry>
|
||||
<entry><ind>-10000</ind><dep> -5000</dep></entry>
|
||||
<entry><ind> -5000</ind><dep> -1230</dep></entry>
|
||||
<entry><ind> -4000</ind><dep> -1025</dep></entry>
|
||||
<entry><ind> -3000</ind><dep> -820</dep></entry>
|
||||
<entry><ind> -2000</ind><dep> -615</dep></entry>
|
||||
<entry><ind> -1000</ind><dep> -410</dep></entry>
|
||||
<entry><ind> 0</ind><dep> 0</dep></entry>
|
||||
<entry><ind> 1000</ind><dep> 205</dep></entry>
|
||||
<entry><ind> 2000</ind><dep> 410</dep></entry>
|
||||
<entry><ind> 3000</ind><dep> 615</dep></entry>
|
||||
<entry><ind> 4000</ind><dep> 820</dep></entry>
|
||||
<entry><ind> 5000</ind><dep>1025</dep></entry>
|
||||
<entry><ind> 5000</ind><dep> 1025</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<output>/systems/pressurization/targetvs-cmd</output>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>VS-target</name>
|
||||
<type>gain</type>
|
||||
<gain>1</gain>
|
||||
<update-interval-secs type="double">0.1</update-interval-secs>
|
||||
<input>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>/gear/gear[1]/wow</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
<value>0</value>
|
||||
</input>
|
||||
<input>
|
||||
<condition>
|
||||
<not>
|
||||
<property>/gear/gear[1]/wow</property>
|
||||
<value>1</value>
|
||||
</not>
|
||||
</condition>
|
||||
<property>/systems/pressurization/targetvs-cmd</property>
|
||||
</input>
|
||||
<output>/systems/pressurization/targetvs</output>
|
||||
</filter>
|
||||
</PropertyList>
|
||||
|
|
Reference in a new issue