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">
|
||||
<chocks n="0">
|
||||
<nose type="bool">0</nose>
|
||||
<left type="bool">0</left>
|
||||
<right type="bool">0</right>
|
||||
<enable type="bool">0</enable>
|
||||
</chocks>
|
||||
<fuel-truck>
|
||||
<connect type="bool">0</connect>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<pitch-deg type="float">0.0</pitch-deg>
|
||||
<min-turn-radius-m type="float">15</min-turn-radius-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>
|
||||
<enabled type="int"/>
|
||||
<connected type="bool">false</connected>
|
||||
|
|
|
@ -57,18 +57,9 @@
|
|||
<property>/gear/gear[2]/wow</property>
|
||||
</and>
|
||||
</enable>
|
||||
<property>/services/chocks/nose</property>
|
||||
<property>/services/chocks/enable</property>
|
||||
<binding>
|
||||
<command>property-toggle</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>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
@ -136,9 +127,7 @@
|
|||
<and>
|
||||
<or>
|
||||
<property>/controls/gear/brake-parking</property>
|
||||
<property>/services/chocks/nose</property>
|
||||
<property>/services/chocks/left</property>
|
||||
<property>/services/chocks/right</property>
|
||||
<property>/services/chocks/enable</property>
|
||||
</or>
|
||||
<less-than>
|
||||
<property>/velocities/groundspeed-kt</property>
|
||||
|
@ -164,9 +153,7 @@
|
|||
<and>
|
||||
<or>
|
||||
<property>/controls/gear/brake-parking</property>
|
||||
<property>/services/chocks/nose</property>
|
||||
<property>/services/chocks/left</property>
|
||||
<property>/services/chocks/right</property>
|
||||
<property>/services/chocks/enable</property>
|
||||
</or>
|
||||
<less-than>
|
||||
<property>/velocities/groundspeed-kt</property>
|
||||
|
@ -192,9 +179,7 @@
|
|||
<and>
|
||||
<or>
|
||||
<property>/controls/gear/brake-parking</property>
|
||||
<property>/services/chocks/nose</property>
|
||||
<property>/services/chocks/left</property>
|
||||
<property>/services/chocks/right</property>
|
||||
<property>/services/chocks/enable</property>
|
||||
</or>
|
||||
<less-than>
|
||||
<property>/velocities/groundspeed-kt</property>
|
||||
|
|
|
@ -132,7 +132,7 @@
|
|||
<path>Aircraft/A320-family/Models/Services/Chocks/chock_nose.ac</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>services/chocks/nose</property>
|
||||
<property>services/chocks/enable</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
@ -147,7 +147,7 @@
|
|||
<path>Aircraft/A320-family/Models/Services/Chocks/chock_left.ac</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>services/chocks/left</property>
|
||||
<property>services/chocks/enable</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
@ -163,7 +163,7 @@
|
|||
<path>Aircraft/A320-family/Models/Services/Chocks/chock_right.ac</path>
|
||||
<condition>
|
||||
<equals>
|
||||
<property>services/chocks/right</property>
|
||||
<property>services/chocks/enable</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
|
|
@ -250,7 +250,7 @@ var systemsLoop = maketimer(0.1, func {
|
|||
systems.APUController.loop();
|
||||
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/pneumatic/switches/groundair", 0);
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ var BrakeSystem =
|
|||
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);
|
||||
if (getprop("services/chocks/left")) {
|
||||
if (getprop("services/chocks/enable")) {
|
||||
if (!getprop("controls/gear/brake-parking")) {
|
||||
# cooling effect: reduce thermal energy by (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);
|
||||
if (getprop("services/chocks/right")) {
|
||||
if (getprop("services/chocks/enable")) {
|
||||
if (!getprop("controls/gear/brake-parking")) {
|
||||
# cooling effect: reduce thermal energy by (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
|
||||
if (getprop("velocities/groundspeed-kt") >= 2) {
|
||||
setprop("services/chocks/nose", 0);
|
||||
setprop("services/chocks/left", 0);
|
||||
setprop("services/chocks/right", 0);
|
||||
setprop("services/chocks/enable", 0);
|
||||
setprop("services/fuel-truck/enable", 0);
|
||||
setprop("services/deicing_truck/enable", 0);
|
||||
setprop("services/catering/enable", 0);
|
||||
|
|
|
@ -930,16 +930,10 @@
|
|||
<c1>20</c1>
|
||||
</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">
|
||||
<input>/controls/gear/brake-left</input>
|
||||
<input>/controls/gear/brake-parking</input>
|
||||
<input>/services/chocks/nose-half</input>
|
||||
<input>/services/chocks/left</input>
|
||||
<input>/services/chocks/enable</input>
|
||||
<clipto>
|
||||
<min>0</min>
|
||||
<max>1</max>
|
||||
|
@ -957,8 +951,7 @@
|
|||
<summer name="fcs/right-brake-summer">
|
||||
<input>/controls/gear/brake-right</input>
|
||||
<input>/controls/gear/brake-parking</input>
|
||||
<input>/services/chocks/nose-half</input>
|
||||
<input>/services/chocks/right</input>
|
||||
<input>/services/chocks/enable</input>
|
||||
<clipto>
|
||||
<min>0</min>
|
||||
<max>1</max>
|
||||
|
|
Loading…
Add table
Reference in a new issue