Using a single property for all gear chocks #151
This commit is contained in:
parent
719d87fb69
commit
b504ed18a1
8 changed files with 16 additions and 42 deletions
|
@ -951,9 +951,7 @@
|
||||||
|
|
||||||
<services n="0">
|
<services n="0">
|
||||||
<chocks n="0">
|
<chocks n="0">
|
||||||
<nose type="bool">0</nose>
|
<enable type="bool">0</enable>
|
||||||
<left type="bool">0</left>
|
|
||||||
<right type="bool">0</right>
|
|
||||||
</chocks>
|
</chocks>
|
||||||
<fuel-truck>
|
<fuel-truck>
|
||||||
<connect type="bool">0</connect>
|
<connect type="bool">0</connect>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<pitch-deg type="float">0.0</pitch-deg>
|
<pitch-deg type="float">0.0</pitch-deg>
|
||||||
<min-turn-radius-m type="float">15</min-turn-radius-m>
|
<min-turn-radius-m type="float">15</min-turn-radius-m>
|
||||||
<stopping-distance-m type="float">5.0</stopping-distance-m>
|
<stopping-distance-m type="float">5.0</stopping-distance-m>
|
||||||
<chocks alias="/services/chocks/nose"/>
|
<chocks alias="/services/chocks/enable"/>
|
||||||
<available type="int">1</available>
|
<available type="int">1</available>
|
||||||
<enabled type="int"/>
|
<enabled type="int"/>
|
||||||
<connected type="bool">false</connected>
|
<connected type="bool">false</connected>
|
||||||
|
|
|
@ -57,18 +57,9 @@
|
||||||
<property>/gear/gear[2]/wow</property>
|
<property>/gear/gear[2]/wow</property>
|
||||||
</and>
|
</and>
|
||||||
</enable>
|
</enable>
|
||||||
<property>/services/chocks/nose</property>
|
<property>/services/chocks/enable</property>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-toggle</command>
|
<command>dialog-apply</command>
|
||||||
<property>/services/chocks/left</property>
|
|
||||||
</binding>
|
|
||||||
<binding>
|
|
||||||
<command>property-toggle</command>
|
|
||||||
<property>/services/chocks/right</property>
|
|
||||||
</binding>
|
|
||||||
<binding>
|
|
||||||
<command>property-toggle</command>
|
|
||||||
<property>/services/chocks/nose</property>
|
|
||||||
</binding>
|
</binding>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
</checkbox>
|
</checkbox>
|
||||||
|
@ -136,9 +127,7 @@
|
||||||
<and>
|
<and>
|
||||||
<or>
|
<or>
|
||||||
<property>/controls/gear/brake-parking</property>
|
<property>/controls/gear/brake-parking</property>
|
||||||
<property>/services/chocks/nose</property>
|
<property>/services/chocks/enable</property>
|
||||||
<property>/services/chocks/left</property>
|
|
||||||
<property>/services/chocks/right</property>
|
|
||||||
</or>
|
</or>
|
||||||
<less-than>
|
<less-than>
|
||||||
<property>/velocities/groundspeed-kt</property>
|
<property>/velocities/groundspeed-kt</property>
|
||||||
|
@ -164,9 +153,7 @@
|
||||||
<and>
|
<and>
|
||||||
<or>
|
<or>
|
||||||
<property>/controls/gear/brake-parking</property>
|
<property>/controls/gear/brake-parking</property>
|
||||||
<property>/services/chocks/nose</property>
|
<property>/services/chocks/enable</property>
|
||||||
<property>/services/chocks/left</property>
|
|
||||||
<property>/services/chocks/right</property>
|
|
||||||
</or>
|
</or>
|
||||||
<less-than>
|
<less-than>
|
||||||
<property>/velocities/groundspeed-kt</property>
|
<property>/velocities/groundspeed-kt</property>
|
||||||
|
@ -192,9 +179,7 @@
|
||||||
<and>
|
<and>
|
||||||
<or>
|
<or>
|
||||||
<property>/controls/gear/brake-parking</property>
|
<property>/controls/gear/brake-parking</property>
|
||||||
<property>/services/chocks/nose</property>
|
<property>/services/chocks/enable</property>
|
||||||
<property>/services/chocks/left</property>
|
|
||||||
<property>/services/chocks/right</property>
|
|
||||||
</or>
|
</or>
|
||||||
<less-than>
|
<less-than>
|
||||||
<property>/velocities/groundspeed-kt</property>
|
<property>/velocities/groundspeed-kt</property>
|
||||||
|
|
|
@ -132,7 +132,7 @@
|
||||||
<path>Aircraft/A320-family/Models/Services/Chocks/chock_nose.ac</path>
|
<path>Aircraft/A320-family/Models/Services/Chocks/chock_nose.ac</path>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<equals>
|
||||||
<property>services/chocks/nose</property>
|
<property>services/chocks/enable</property>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</equals>
|
</equals>
|
||||||
</condition>
|
</condition>
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
<path>Aircraft/A320-family/Models/Services/Chocks/chock_left.ac</path>
|
<path>Aircraft/A320-family/Models/Services/Chocks/chock_left.ac</path>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<equals>
|
||||||
<property>services/chocks/left</property>
|
<property>services/chocks/enable</property>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</equals>
|
</equals>
|
||||||
</condition>
|
</condition>
|
||||||
|
@ -163,7 +163,7 @@
|
||||||
<path>Aircraft/A320-family/Models/Services/Chocks/chock_right.ac</path>
|
<path>Aircraft/A320-family/Models/Services/Chocks/chock_right.ac</path>
|
||||||
<condition>
|
<condition>
|
||||||
<equals>
|
<equals>
|
||||||
<property>services/chocks/right</property>
|
<property>services/chocks/enable</property>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</equals>
|
</equals>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
|
@ -250,7 +250,7 @@ var systemsLoop = maketimer(0.1, func {
|
||||||
systems.APUController.loop();
|
systems.APUController.loop();
|
||||||
systems.HFLoop();
|
systems.HFLoop();
|
||||||
|
|
||||||
if ((getprop("/controls/pneumatic/switches/groundair") or getprop("/controls/electrical/ground-cart")) and ((getprop("/velocities/groundspeed-kt") > 2) or (getprop("/controls/gear/brake-parking") == 0 and getprop("/services/chocks/nose") == 0 and getprop("/services/chocks/left") == 0 and getprop("/services/chocks/right") == 0))) {
|
if ((getprop("/controls/pneumatic/switches/groundair") or getprop("/controls/electrical/ground-cart")) and ((getprop("/velocities/groundspeed-kt") > 2) or (getprop("/controls/gear/brake-parking") == 0 and getprop("/services/chocks/enable") == 0))) {
|
||||||
setprop("/controls/electrical/ground-cart", 0);
|
setprop("/controls/electrical/ground-cart", 0);
|
||||||
setprop("/controls/pneumatic/switches/groundair", 0);
|
setprop("/controls/pneumatic/switches/groundair", 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,7 +169,7 @@ var BrakeSystem =
|
||||||
var V2_R = V1 - me.BrakeDecel * dt * RBrakeLevel;
|
var V2_R = V1 - me.BrakeDecel * dt * RBrakeLevel;
|
||||||
|
|
||||||
LThermalEnergy += (Mass * getprop("gear/gear[1]/compression-norm") * (math.pow(V1, 2) - math.pow(V2_L, 2)) / 2);
|
LThermalEnergy += (Mass * getprop("gear/gear[1]/compression-norm") * (math.pow(V1, 2) - math.pow(V2_L, 2)) / 2);
|
||||||
if (getprop("services/chocks/left")) {
|
if (getprop("services/chocks/enable")) {
|
||||||
if (!getprop("controls/gear/brake-parking")) {
|
if (!getprop("controls/gear/brake-parking")) {
|
||||||
# cooling effect: reduce thermal energy by (LnCoolFactor) * dt
|
# cooling effect: reduce thermal energy by (LnCoolFactor) * dt
|
||||||
LThermalEnergy = LThermalEnergy * math.exp(LnCoolFactor * dt);
|
LThermalEnergy = LThermalEnergy * math.exp(LnCoolFactor * dt);
|
||||||
|
@ -202,7 +202,7 @@ var BrakeSystem =
|
||||||
};
|
};
|
||||||
|
|
||||||
RThermalEnergy += (Mass * getprop("gear/gear[2]/compression-norm") * (math.pow(V1, 2) - math.pow(V2_R, 2)) / 2);
|
RThermalEnergy += (Mass * getprop("gear/gear[2]/compression-norm") * (math.pow(V1, 2) - math.pow(V2_R, 2)) / 2);
|
||||||
if (getprop("services/chocks/right")) {
|
if (getprop("services/chocks/enable")) {
|
||||||
if (!getprop("controls/gear/brake-parking")) {
|
if (!getprop("controls/gear/brake-parking")) {
|
||||||
# cooling effect: reduce thermal energy by (RnCoolFactor) * dt
|
# cooling effect: reduce thermal energy by (RnCoolFactor) * dt
|
||||||
RThermalEnergy = RThermalEnergy * math.exp(RnCoolFactor * dt);
|
RThermalEnergy = RThermalEnergy * math.exp(RnCoolFactor * dt);
|
||||||
|
|
|
@ -20,9 +20,7 @@ var ground_services = {
|
||||||
|
|
||||||
# Set them all to 0 if the aircraft is not stationary
|
# Set them all to 0 if the aircraft is not stationary
|
||||||
if (getprop("velocities/groundspeed-kt") >= 2) {
|
if (getprop("velocities/groundspeed-kt") >= 2) {
|
||||||
setprop("services/chocks/nose", 0);
|
setprop("services/chocks/enable", 0);
|
||||||
setprop("services/chocks/left", 0);
|
|
||||||
setprop("services/chocks/right", 0);
|
|
||||||
setprop("services/fuel-truck/enable", 0);
|
setprop("services/fuel-truck/enable", 0);
|
||||||
setprop("services/deicing_truck/enable", 0);
|
setprop("services/deicing_truck/enable", 0);
|
||||||
setprop("services/catering/enable", 0);
|
setprop("services/catering/enable", 0);
|
||||||
|
|
|
@ -930,16 +930,10 @@
|
||||||
<c1>20</c1>
|
<c1>20</c1>
|
||||||
</lag_filter>
|
</lag_filter>
|
||||||
|
|
||||||
<pure_gain name="/services/chocks/nose-half">
|
|
||||||
<input>/services/chocks/nose</input>
|
|
||||||
<gain>0.5</gain>
|
|
||||||
</pure_gain>
|
|
||||||
|
|
||||||
<summer name="fcs/left-brake-summer">
|
<summer name="fcs/left-brake-summer">
|
||||||
<input>/controls/gear/brake-left</input>
|
<input>/controls/gear/brake-left</input>
|
||||||
<input>/controls/gear/brake-parking</input>
|
<input>/controls/gear/brake-parking</input>
|
||||||
<input>/services/chocks/nose-half</input>
|
<input>/services/chocks/enable</input>
|
||||||
<input>/services/chocks/left</input>
|
|
||||||
<clipto>
|
<clipto>
|
||||||
<min>0</min>
|
<min>0</min>
|
||||||
<max>1</max>
|
<max>1</max>
|
||||||
|
@ -957,8 +951,7 @@
|
||||||
<summer name="fcs/right-brake-summer">
|
<summer name="fcs/right-brake-summer">
|
||||||
<input>/controls/gear/brake-right</input>
|
<input>/controls/gear/brake-right</input>
|
||||||
<input>/controls/gear/brake-parking</input>
|
<input>/controls/gear/brake-parking</input>
|
||||||
<input>/services/chocks/nose-half</input>
|
<input>/services/chocks/enable</input>
|
||||||
<input>/services/chocks/right</input>
|
|
||||||
<clipto>
|
<clipto>
|
||||||
<min>0</min>
|
<min>0</min>
|
||||||
<max>1</max>
|
<max>1</max>
|
||||||
|
|
Loading…
Add table
Reference in a new issue