icing is finished

This commit is contained in:
Jonathan Redpath 2017-06-22 15:12:25 +01:00
parent e1ed669331
commit 09bb6e1dd8
8 changed files with 410 additions and 98 deletions

View file

@ -3591,6 +3591,281 @@
</animation>
<!-- Anti-ice -->
<!-- Eng and Wing -->
<animation>
<type>select</type>
<object-name>WingAntiIceBtn2O</object-name>
<condition>
<or>
<equals>
<property>/controls/deice/wing</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>WingAntiIceBtn1F</object-name>
<condition>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>WingAntiIceBtn1</object-name>
<condition>
<equals>
<property>/controls/switches/annun-test</property>
<value>0</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>WingAntiIceBtn2</object-name>
<condition>
<equals>
<property>/controls/deice/wing</property>
<value>0</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>Eng1AntiIceBtn2O</object-name>
<condition>
<or>
<equals>
<property>/controls/deice/lengine</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>Eng1AntiIceBtn1F</object-name>
<condition>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>Eng1AntiIceBtn1</object-name>
<condition>
<equals>
<property>/controls/switches/annun-test</property>
<value>0</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>Eng1AntiIceBtn2</object-name>
<condition>
<equals>
<property>/controls/deice/lengine</property>
<value>0</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>Eng2AntiIceBtn2O</object-name>
<condition>
<or>
<equals>
<property>/controls/deice/rengine</property>
<value>1</value>
</equals>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</or>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>Eng2AntiIceBtn1F</object-name>
<condition>
<equals>
<property>/controls/switches/annun-test</property>
<value>1</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>Eng2AntiIceBtn1</object-name>
<condition>
<equals>
<property>/controls/switches/annun-test</property>
<value>0</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>Eng2AntiIceBtn2</object-name>
<condition>
<equals>
<property>/controls/deice/rengine</property>
<value>0</value>
</equals>
</condition>
</animation>
<animation>
<name>Wing Anti-ice Pick</name>
<type>pick</type>
<object-name>WingAntiIceBtn2O</object-name>
<object-name>WingAntiIceBtn2</object-name>
<object-name>WingAntiIceBtn1F</object-name>
<object-name>WingAntiIceBtn1</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/battery1-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/battery2-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/deice/wing</property>
</binding>
<binding>
<command>nasal</command>
<script>setprop("/sim/sounde/oh-btn", 1);</script>
</binding>
</action>
</animation>
<animation>
<name>Left Engine Anti-ice Pick</name>
<type>pick</type>
<object-name>Eng1AntiIceBtn2O</object-name>
<object-name>Eng1AntiIceBtn2</object-name>
<object-name>Eng1AntiIceBtn1F</object-name>
<object-name>Eng1AntiIceBtn1</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/battery1-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/battery2-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/deice/lengine</property>
</binding>
<binding>
<command>nasal</command>
<script>setprop("/sim/sounde/oh-btn", 1);</script>
</binding>
</action>
</animation>
<animation>
<name>Right Engine Anti-ice Pick</name>
<type>pick</type>
<object-name>Eng2AntiIceBtn2O</object-name>
<object-name>Eng2AntiIceBtn2</object-name>
<object-name>Eng2AntiIceBtn1F</object-name>
<object-name>Eng2AntiIceBtn1</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<condition>
<or>
<greater-than-equals>
<property>/systems/electrical/battery1-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/battery2-amps</property>
<value>120</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc1</property>
<value>25</value>
</greater-than-equals>
<greater-than-equals>
<property>/systems/electrical/bus/dc2</property>
<value>25</value>
</greater-than-equals>
</or>
</condition>
<command>property-toggle</command>
<property>/controls/deice/rengine</property>
</binding>
<binding>
<command>nasal</command>
<script>setprop("/sim/sounde/oh-btn", 1);</script>
</binding>
</action>
</animation>
<!-- Window Heat and Probe Button -->
<!-- 0.5 is auto, 1 is on -->
<animation>
@ -4182,4 +4457,4 @@
</condition>
</animation>
</PropertyList>
</PropertyList>

View file

@ -8,7 +8,99 @@ MATERIAL "OHPanelOnBat" rgb 0.8 0.8 0.8 amb 1 1 1 emis 1 1 1 spec 0.5 0.5 0.5
MATERIAL "Switch" rgb 0.678431 0.678431 0.678431 amb 0.678431 0.678431 0.678431 emis 0 0 0 spec 0 0 0 shi 32 trans 0.004
MATERIAL "ac3dmat1" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 1 1 1 shi 128 trans 0
OBJECT world
kids 272
kids 273
OBJECT poly
name "WingAntiIceBtn1F"
loc 0.000113685 -5.00064e-005 -4.99785e-005
data 8
Cube.040
texture "buttons5.png"
crease 30.000000
numvert 8
-0.01 -0.2082 0.1337
-0.01 -0.2082 0.1537
-0.007 -0.2082 0.1537
-0.007 -0.2082 0.1337
-0.01 -0.2182 0.1337
-0.01 -0.2182 0.1537
-0.007 -0.2182 0.1537
-0.007 -0.2182 0.1337
numsurf 4
SURF 0x0
mat 4
refs 4
3 0.503906 0.492188
7 0.503906 0.242188
4 0.503906 0.242188
0 0.503906 0.492188
SURF 0x0
mat 4
refs 4
6 0.00390625 0.242188
2 0.00390634 0.492188
1 0.00390634 0.492188
5 0.00390625 0.242188
SURF 0x0
mat 4
refs 4
7 0.503906 0.242188
3 0.503906 0.492188
2 0.00390634 0.492188
6 0.00390625 0.242188
SURF 0x0
mat 4
refs 4
3 0.503906 0.492188
0 0.503906 0.492188
1 0.00390634 0.492188
2 0.00390634 0.492188
kids 0
OBJECT poly
name "WingAntiIceBtn1"
loc 0.000113685 -5.00064e-005 -4.99785e-005
data 8
Cube.040
texture "buttons.png"
crease 30.000000
numvert 8
-0.007 -0.2182 0.1337
-0.007 -0.2182 0.1537
-0.01 -0.2182 0.1537
-0.01 -0.2182 0.1337
-0.007 -0.2082 0.1337
-0.007 -0.2082 0.1537
-0.01 -0.2082 0.1537
-0.01 -0.2082 0.1337
numsurf 4
SURF 0x0
mat 4
refs 4
4 0.503906 0.492188
7 0.503906 0.492188
6 0.00390634 0.492188
5 0.00390634 0.492188
SURF 0x0
mat 4
refs 4
0 0.503906 0.242188
4 0.503906 0.492188
5 0.00390634 0.492188
1 0.00390625 0.242188
SURF 0x0
mat 4
refs 4
1 0.00390625 0.242188
5 0.00390634 0.492188
6 0.00390634 0.492188
2 0.00390625 0.242188
SURF 0x0
mat 4
refs 4
4 0.503906 0.492188
0 0.503906 0.242188
3 0.503906 0.242188
7 0.503906 0.492188
kids 0
OBJECT poly
name "WingAntiIceBtn2O"
loc 0.000113685 -5.00064e-005 -4.99785e-005
@ -32582,52 +32674,6 @@ refs 4
10 9.31321e-008 1
kids 0
OBJECT poly
name "WingAntiIceBtn1"
loc 0.000113685 -5.00064e-005 -4.99785e-005
data 8
Cube.040
texture "buttons5.png"
crease 30.000000
numvert 8
-0.01 -0.2082 0.1337
-0.01 -0.2082 0.1537
-0.007 -0.2082 0.1537
-0.007 -0.2082 0.1337
-0.01 -0.2182 0.1337
-0.01 -0.2182 0.1537
-0.007 -0.2182 0.1537
-0.007 -0.2182 0.1337
numsurf 4
SURF 0x0
mat 4
refs 4
3 0.503906 0.492188
7 0.503906 0.242188
4 0.503906 0.242188
0 0.503906 0.492188
SURF 0x0
mat 4
refs 4
6 0.00390625 0.242188
2 0.00390634 0.492188
1 0.00390634 0.492188
5 0.00390625 0.242188
SURF 0x0
mat 4
refs 4
7 0.503906 0.242188
3 0.503906 0.492188
2 0.00390634 0.492188
6 0.00390625 0.242188
SURF 0x0
mat 4
refs 4
3 0.503906 0.492188
0 0.503906 0.492188
1 0.00390634 0.492188
2 0.00390634 0.492188
kids 0
OBJECT poly
name "WingAntiIceBtn2"
loc 0.000113685 -5.00064e-005 -4.99785e-005
data 8

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 KiB

View file

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>
<sim>
<model>
<livery>
<name>Aeropostale</name>
<texture>Liveries/A320/CFM-100/A320-APT.png</texture>
</livery>
</model>
</sim>
<options>
<EIS2 type="bool">0</EIS2>
</options>
<sharklet type="bool">0</sharklet>
</PropertyList>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 KiB

View file

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>
<sim>
<model>
<livery>
<name>Volaris</name>
<texture>Liveries/A320/CFM-100/VOI.png</texture>
</livery>
</model>
</sim>
<options>
<EIS2 type="bool">0</EIS2>
</options>
<sharklet type="bool">0</sharklet>
</PropertyList>

View file

@ -17,7 +17,7 @@ PitotIcing = func {
if( !failed ) {
setprop("/systems/pitot/failed", 1);
}
} else if( icing > 0.03 ) {
} else if( icing < 0.03 ) {
if( failed ) {
setprop("/systems/pitot/failed", 0);
}

View file

@ -7,9 +7,15 @@ var icingInit = func {
setprop("/systems/icing/severity", "0"); # maximum severity: we will make it random
setprop("/systems/icing/factor", 0.0); # the factor is how many inches we add per second
setprop("/systems/icing/max-spread-degc", 0.0);
setprop("/systems/icing/melt-w-heat-factor", -0.00005000);
setprop("/systems/icing/icingcond", 0);
setprop("/controls/switches/windowprobeheat", 0);
setprop("/controls/switches/windowprobeheatfault", 0);
setprop("/controls/deice/wing", 0);
setprop("/controls/deice/lengine", 0);
setprop("/controls/deice/rengine", 0);
setprop("/controls/deice/windowprobeheat", 0);
icing_timer.start();
}
@ -22,7 +28,13 @@ var icingModel = func {
var factor = getprop("/systems/icing/factor");
var maxSpread = getprop("/systems/icing/max-spread-degc");
var icingCond = getprop("/systems/icing/icingcond");
var pause = getprop("/sim/freeze/master");
var melt = getprop("/systems/icing/melt-w-heat-factor");
var wing = getprop("/controls/deice/wing");
var lengine = getprop("/controls/deice/lengine");
var rengine = getprop("/controls/deice/rengine");
var windowprobe = getprop("/controls/deice/windowprobeheat");
if (severity == "0") {
setprop("/systems/icing/factor", -0.00000166);
} else if (severity == "1") {
@ -54,54 +66,69 @@ var icingModel = func {
var icing1 = getprop("/sim/model/icing/iceable[0]/ice-inches");
var sensitive1 = getprop("/sim/model/icing/iceable[0]/sensitivity");
var v = icing1 + (factor * sensitive1);
if (icing1 < 0.0) {
var a = icing1 + melt;
if (icing1 < 0.0 and !pause) {
setprop("/sim/model/icing/iceable[0]/ice-inches", 0.0);
} else {
} else if (wing) {
setprop("/sim/model/icing/iceable[0]/ice-inches", a);
} else if (!pause and !wing) {
setprop("/sim/model/icing/iceable[0]/ice-inches", v);
}
var icing2 = getprop("/sim/model/icing/iceable[1]/ice-inches");
var sensitive2 = getprop("/sim/model/icing/iceable[1]/sensitivity");
var u = icing2 + (factor * sensitive2);
if (icing2 < 0.0) {
var b = icing2 + melt;
if (icing2 < 0.0 and !pause) {
setprop("/sim/model/icing/iceable[1]/ice-inches", 0.0);
} else {
} else if (lengine) {
setprop("/sim/model/icing/iceable[1]/ice-inches", b);
} else if (!pause and !lengine) {
setprop("/sim/model/icing/iceable[1]/ice-inches", u);
}
var icing3 = getprop("/sim/model/icing/iceable[2]/ice-inches");
var sensitive3 = getprop("/sim/model/icing/iceable[2]/sensitivity");
var t = icing3 + (factor * sensitive3);
if (icing3 < 0.0) {
var c = icing3 + melt;
if (icing3 < 0.0 and !pause) {
setprop("/sim/model/icing/iceable[2]/ice-inches", 0.0);
} else {
} else if (rengine) {
setprop("/sim/model/icing/iceable[2]/ice-inches", c);
} else if (!pause and !rengine) {
setprop("/sim/model/icing/iceable[2]/ice-inches", t);
}
var icing4 = getprop("/sim/model/icing/iceable[3]/ice-inches");
var sensitive4 = getprop("/sim/model/icing/iceable[3]/sensitivity");
var s = icing4 + (factor * sensitive4);
if (icing4 < 0.0) {
var d = icing4 + melt;
if (icing4 < 0.0 and !pause) {
setprop("/sim/model/icing/iceable[3]/ice-inches", 0.0);
} else {
} else if (windowprobe) {
setprop("/sim/model/icing/iceable[3]/ice-inches", d);
} else if (!pause and !windowprobe) {
setprop("/sim/model/icing/iceable[3]/ice-inches", s);
}
var icing5 = getprop("/sim/model/icing/iceable[4]/ice-inches");
var sensitive5 = getprop("/sim/model/icing/iceable[4]/sensitivity");
var r = icing5 + (factor * sensitive5);
if (icing5 < 0.0) {
if (icing5 < 0.0 and !pause) {
setprop("/sim/model/icing/iceable[4]/ice-inches", 0.0);
} else {
} else if (!pause) {
setprop("/sim/model/icing/iceable[4]/ice-inches", r);
}
var icing6 = getprop("/sim/model/icing/iceable[5]/ice-inches");
var sensitive6 = getprop("/sim/model/icing/iceable[5]/sensitivity");
var q = icing6 + (factor * sensitive6);
if (icing6 < 0.0) {
var e = icing6 + melt;
if (icing6 < 0.0 and !pause) {
setprop("/sim/model/icing/iceable[5]/ice-inches", 0.0);
} else {
} else if (windowprobe) {
setprop("/sim/model/icing/iceable[5]/ice-inches", e);
} else if (!pause and !windowprobe) {
setprop("/sim/model/icing/iceable[5]/ice-inches", q);
}