Merge pull request #47 from legoboyvdlp/master

major updates
This commit is contained in:
Joshua Davidson 2017-06-10 15:53:28 -04:00 committed by GitHub
commit 5e137d6685
6 changed files with 213 additions and 99 deletions

View file

@ -98,7 +98,6 @@ var systemsReset = func {
systems.ADIRSreset();
systems.pneu_init();
systems.hyd_init();
systems.press_init();
systems.fuel_init();
fmgc.FMGCinit();
mcdu1.MCDU_reset();

View file

@ -3171,7 +3171,7 @@
<action>
<button>0</button>
<repeatable>false</repeatable>
<!--binding>
<binding>
<condition>
<or>
<greater-than-equals>
@ -3185,8 +3185,8 @@
</or>
</condition>
<command>property-toggle</command>
<property>/controls/pressurization/auto</property>
</binding-->
<property>/systems/pressurization/auto</property>
</binding>
<binding>
<command>nasal</command>
<script>setprop("/sim/sounde/btn1", 1);</script>
@ -3217,7 +3217,7 @@
<condition>
<or>
<equals>
<property>/controls/pressurization/auto</property>
<property>/systems/pressurization/auto</property>
<value>0</value>
</equals>
<equals>
@ -3230,12 +3230,12 @@
<animation>
<type>pick</type>
<object-name>DitchBtn</object-name>
<object-name>DitchBtn1</object-name>
<object-name>DitchBtn2O</object-name>
<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>

View file

@ -18,6 +18,8 @@ var hyd_init = func {
setprop("/systems/hydraulic/blue-psi", 0);
setprop("/systems/hydraulic/green-psi", 0);
setprop("/systems/hydraulic/yellow-psi", 0);
setprop("/systems/hydraulic/spoiler3and4-inhibit", 0);
setprop("/systems/hydraulic/spoiler-inhibit", 0);
setprop("/controls/gear/brake-parking", 0);
hyd_timer.start();
}
@ -133,6 +135,26 @@ var master_hyd = func {
setprop("/systems/hydraulic/yellow-psi", 0);
}
}
var lelev = getprop("/systems/failures/elevator-left");
var relev = getprop("/systems/failures/elevator-right");
var flap = getprop("/controls/flight/flap-txt");
var state1 = getprop("/systems/thrust/state1");
var state2 = getprop("/systems/thrust/state2");
var alpha = getprop("/systems/thrust/alpha-floor");
var sec1 = getprop("/systems/failures/sec1");
var sec3 = getprop("/systems/failures/sec3");
#var aoa_prot = getprop("aoaprotection);
if (lelev or relev) {
setprop("/systems/hydraulic/spoiler3and4-inhibit", 1);
} else {
setprop("/systems/hydraulic/spoiler3and4-inhibit", 0);
}
if ((flap == "FULL") or alpha or (sec1 and sec3) or (((state1 == "MCT") or (state1 == "TOGA")) and ((state2 == "MCT") or (state2 == "TOGA")))) {
setprop("/systems/hydraulic/spoiler-inhibit", 1);
} else {
setprop("/systems/hydraulic/spoiler-inhibit", 0);
}
}
#######################

View file

@ -162,7 +162,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();

View file

@ -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,13 @@ 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");
}
}
###################

View file

@ -203,29 +203,61 @@
</filter>
<filter>
<name>Target Pressurize Altitude</name>
<type>gain</type>
<gain>1</gain>
<update-interval-secs type="double">0.1</update-interval-secs>
<input>
<expression>
<table>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
<entry><ind> 0</ind><dep> 0</dep></entry>
<entry><ind> 1000</ind><dep> 500</dep></entry>
<entry><ind> 5000</ind><dep>1100</dep></entry>
<entry><ind>20000</ind><dep>5200</dep></entry>
<entry><ind>30000</ind><dep>6700</dep></entry>
<entry><ind>30000</ind><dep>7900</dep></entry>
<entry><ind>40500</ind><dep>8000</dep></entry>
</table>
</expression>
</input>
<output>/systems/pressurization/targetalt</output>
</filter>
<name>Target Pressurize Altitude CMD</name>
<type>gain</type>
<gain>1</gain>
<update-interval-secs type="double">0.1</update-interval-secs>
<input>
<expression>
<table>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
<entry><ind> 0</ind><dep> 0</dep></entry>
<entry><ind> 1000</ind><dep> 500</dep></entry>
<entry><ind> 5000</ind><dep>1100</dep></entry>
<entry><ind>20000</ind><dep>5200</dep></entry>
<entry><ind>30000</ind><dep>6700</dep></entry>
<entry><ind>30000</ind><dep>7900</dep></entry>
<entry><ind>40500</ind><dep>8000</dep></entry>
</table>
</expression>
</input>
<output>/systems/pressurization/targetalt-cmd</output>
</filter>
<filter>
<name>Cabin PSI</name>
<name>Target Pressurize Altitude</name>
<type>gain</type>
<gain>1</gain>
<update-interval-secs type="double">0.1</update-interval-secs>
<input>
<condition>
<or>
<equals>
<property>/gear/gear[1]/wow</property>
<value>1</value>
</equals>
<less-than>
<property>/systems/pressurization/targetalt-cmd</property>
<property>/systems/pressurization/cabinalt-norm</property>
</less-than>
</or>
</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 target</name>
<type>gain</type>
<gain>1</gain>
<update-interval-secs type="double">0.1</update-interval-secs>
@ -233,20 +265,49 @@
<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</output>
<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>
<filter>
<name>Ambient PSI (ICAO std)</name>
<type>gain</type>
@ -256,41 +317,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 +375,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 +399,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 +407,48 @@
<expression>
<table>
<property>/it-autoflight/internal/vert-speed-fpm</property>
<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>-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>
</table>
</expression>
</input>
<output>/systems/pressurization/targetvs</output>
<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>