Add APU fire, fix for non-IAE

This commit is contained in:
legoboyvdlp R 2019-04-16 16:22:06 +01:00
parent 8e7dfdfbf5
commit 679e1d5f19
16 changed files with 307 additions and 25 deletions

View file

@ -511,6 +511,16 @@
<live>true</live>
</checkbox>
<checkbox>
<label>APU</label>
<halign>left</halign>
<property>/systems/failures/apu-fire</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Right Engine</label>
<halign>left</halign>

View file

@ -405,4 +405,14 @@
</condition>
</animation>
<!-- APU fire -->
<model>
<name>APU Fire</name>
<path>Aircraft/IDG-A32X/Models/Effects/a320-apufire.xml</path>
<offsets>
<x-m>40.15</x-m>
<y-m>0.0</y-m>
<z-m>1.08</z-m>
</offsets>
</model>
</PropertyList>

View file

@ -435,4 +435,15 @@
</condition>
</animation>
<!-- APU fire -->
<model>
<name>APU Fire</name>
<path>Aircraft/IDG-A32X/Models/Effects/a320-apufire.xml</path>
<offsets>
<x-m>40.15</x-m>
<y-m>0.0</y-m>
<z-m>1.08</z-m>
</offsets>
</model>
</PropertyList>

View file

@ -434,4 +434,14 @@
</condition>
</animation>
<!-- APU fire -->
<model>
<name>APU Fire</name>
<path>Aircraft/IDG-A32X/Models/Effects/a320-apufire.xml</path>
<offsets>
<x-m>40.15</x-m>
<y-m>0.0</y-m>
<z-m>1.08</z-m>
</offsets>
</model>
</PropertyList>

View file

@ -415,4 +415,14 @@
</condition>
</animation>
<!-- APU fire -->
<model>
<name>APU Fire</name>
<path>Aircraft/IDG-A32X/Models/Effects/a320-apufire.xml</path>
<offsets>
<x-m>40.15</x-m>
<y-m>0.0</y-m>
<z-m>1.08</z-m>
</offsets>
</model>
</PropertyList>

View file

@ -421,4 +421,14 @@
</condition>
</animation>
<!-- APU fire -->
<model>
<name>APU Fire</name>
<path>Aircraft/IDG-A32X/Models/Effects/a320-apufire.xml</path>
<offsets>
<x-m>40.15</x-m>
<y-m>0.0</y-m>
<z-m>1.08</z-m>
</offsets>
</model>
</PropertyList>

View file

@ -0,0 +1,35 @@
<?xml version="1.0"?>
<PropertyList>
<path>Aircraft/Generic/Effects/Thruster/thrust_flame.ac</path>
<nopreview/>
<animation>
<type>scale</type>
<property>systems/failures/apu-fire</property>
<x-min>0.2</x-min>
<y-min>0.3</y-min>
<z-min>0.3</z-min>
<y-max>0.8</y-max>
<z-max>0.8</z-max>
<x-factor>0.2</x-factor>
<y-factor>0.2</y-factor>
<z-factor>0.2</z-factor>
</animation>
<animation>
<type>select</type>
<object-name>Bounding_box</object-name>
<condition>
<greater-than>
<property>systems/failures/apu-fire</property>
<value>0.8</value>
</greater-than>
</condition>
</animation>
<effect>
<inherits-from>Aircraft/IDG-A32X/Models/Effects/flame-apu</inherits-from>
<object-name>Bounding_box</object-name>
</effect>
</PropertyList>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
<name>AB-flame</name>
<inherits-from>Effects/thrust-flame</inherits-from>
<parameters>
<base_flame_b type="float"><use>/sim/model/flame/blue-base</use></base_flame_b>
<base_flame_density type="float">0.01</base_flame_density>
<base_flame_g type="float"><use>/sim/model/flame/green-base</use></base_flame_g>
<base_flame_r type="float"><use>/sim/model/flame/red-base</use></base_flame_r>
<deflection_coeff type="float">0</deflection_coeff>
<flame_color_high_b type="float"><use>/sim/model/flame/blue-high</use></flame_color_high_b>
<flame_color_high_g type="float"><use>/sim/model/flame/green-high</use></flame_color_high_g>
<flame_color_high_r type="float"><use>/sim/model/flame/red-high</use></flame_color_high_r>
<flame_color_low_b type="float"><use>/sim/model/flame/blue-low</use></flame_color_low_b>
<flame_color_low_g type="float"><use>/sim/model/flame/green-low</use></flame_color_low_g>
<flame_color_low_r type="float"><use>/sim/model/flame/red-low</use></flame_color_low_r>
<flame_radius_fraction type="float">0.7</flame_radius_fraction>
<noise_scale type="float">0.8</noise_scale>
<noise_strength type="float">0.4</noise_strength>
<thrust_collimation type="float">0.2</thrust_collimation>
<thrust_density type="float">0.8</thrust_density>
<use_noise type="int">1</use_noise>
<use_shocks type="int">0</use_shocks>
</parameters>
</PropertyList>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
<name>AB-flame</name>
<inherits-from>Effects/thrust-flame</inherits-from>
<parameters>
<base_flame_b type="float"><use>/sim/model/flame/blue-base</use></base_flame_b>
<base_flame_density type="float">0.01</base_flame_density>
<base_flame_g type="float"><use>/sim/model/flame/green-base</use></base_flame_g>
<base_flame_r type="float"><use>/sim/model/flame/red-base</use></base_flame_r>
<deflection_coeff type="float">0</deflection_coeff>
<flame_color_high_b type="float"><use>/sim/model/flame/blue-high</use></flame_color_high_b>
<flame_color_high_g type="float"><use>/sim/model/flame/green-high</use></flame_color_high_g>
<flame_color_high_r type="float"><use>/sim/model/flame/red-high</use></flame_color_high_r>
<flame_color_low_b type="float"><use>/sim/model/flame/blue-low</use></flame_color_low_b>
<flame_color_low_g type="float"><use>/sim/model/flame/green-low</use></flame_color_low_g>
<flame_color_low_r type="float"><use>/sim/model/flame/red-low</use></flame_color_low_r>
<flame_radius_fraction type="float">0.4</flame_radius_fraction>
<noise_scale type="float">0.8</noise_scale>
<noise_strength type="float">0.2</noise_strength>
<thrust_collimation type="float">0.5</thrust_collimation>
<thrust_density type="float">0.8</thrust_density>
<use_noise type="int">1</use_noise>
<use_shocks type="int">0</use_shocks>
</parameters>
</PropertyList>

View file

@ -0,0 +1,35 @@
<?xml version="1.0"?>
<PropertyList>
<path>Aircraft/Generic/Effects/Thruster/thrust_flame.ac</path>
<nopreview/>
<animation>
<type>scale</type>
<property>systems/failures/engine-left-fire</property>
<x-min>0.2</x-min>
<y-min>0.3</y-min>
<z-min>0.3</z-min>
<y-max>0.8</y-max>
<z-max>0.8</z-max>
<x-factor>0.4</x-factor>
<y-factor>0.35</y-factor>
<z-factor>0.35</z-factor>
</animation>
<animation>
<type>select</type>
<object-name>Bounding_box</object-name>
<condition>
<greater-than>
<property>systems/failures/engine-left-fire</property>
<value>0.8</value>
</greater-than>
</condition>
</animation>
<effect>
<inherits-from>Aircraft/IDG-A32X/Models/Effects/flame-cfm</inherits-from>
<object-name>Bounding_box</object-name>
</effect>
</PropertyList>

View file

@ -0,0 +1,35 @@
<?xml version="1.0"?>
<PropertyList>
<path>Aircraft/Generic/Effects/Thruster/thrust_flame.ac</path>
<nopreview/>
<animation>
<type>scale</type>
<property>systems/failures/engine-right-fire</property>
<x-min>0.2</x-min>
<y-min>0.3</y-min>
<z-min>0.3</z-min>
<y-max>0.8</y-max>
<z-max>0.8</z-max>
<x-factor>0.4</x-factor>
<y-factor>0.35</y-factor>
<z-factor>0.35</z-factor>
</animation>
<animation>
<type>select</type>
<object-name>Bounding_box</object-name>
<condition>
<greater-than>
<property>systems/failures/engine-right-fire</property>
<value>0.8</value>
</greater-than>
</condition>
</animation>
<effect>
<inherits-from>Aircraft/IDG-A32X/Models/Effects/flame-cfm</inherits-from>
<object-name>Bounding_box</object-name>
</effect>
</PropertyList>

View file

@ -27,21 +27,21 @@
<model>
<name>Engine.CFM.Left.FireBBox</name>
<path>Aircraft/IDG-A32X/Models/Wings/a320-fire-left.xml</path>
<path>Aircraft/IDG-A32X/Models/Wings/a320-fire-left-cfm.xml</path>
<offsets>
<x-m>-1.6387912</x-m>
<x-m>3.2</x-m>
<y-m>-5.755</y-m>
<z-m>-1.0170087</z-m>
<z-m>-1.2</z-m>
</offsets>
</model>
<model>
<name>Engine.CFM.RightFireBBox</name>
<path>Aircraft/IDG-A32X/Models/Wings/a320-fire-right.xml</path>
<path>Aircraft/IDG-A32X/Models/Wings/a320-fire-right-cfm.xml</path>
<offsets>
<x-m>-1.6387912</x-m>
<x-m>3.2</x-m>
<y-m>5.755</y-m>
<z-m>-1.0170087</z-m>
<z-m>-1.2</z-m>
</offsets>
</model>

View file

@ -27,21 +27,21 @@
<model>
<name>Engine.CFM.Left.FireBBox</name>
<path>Aircraft/IDG-A32X/Models/Wings/a320-fire-left.xml</path>
<path>Aircraft/IDG-A32X/Models/Wings/a320-fire-left-cfm.xml</path>
<offsets>
<x-m>-1.6387912</x-m>
<x-m>3.28</x-m>
<y-m>-5.755</y-m>
<z-m>-1.0170087</z-m>
<z-m>-1.13</z-m>
</offsets>
</model>
<model>
<name>Engine.CFM.RightFireBBox</name>
<path>Aircraft/IDG-A32X/Models/Wings/a320-fire-right.xml</path>
<path>Aircraft/IDG-A32X/Models/Wings/a320-fire-right-cfm.xml</path>
<offsets>
<x-m>-1.6387912</x-m>
<x-m>3.28</x-m>
<y-m>5.755</y-m>
<z-m>-1.0170087</z-m>
<z-m>-1.13</z-m>
</offsets>
</model>

View file

@ -27,21 +27,21 @@
<model>
<name>Engine.PW.Left.FireBBox</name>
<path>Aircraft/IDG-A32X/Models/Wings/a320-fire-left.xml</path>
<path>Aircraft/IDG-A32X/Models/Wings/a320-fire-left-cfm.xml</path>
<offsets>
<x-m>-1.6387912</x-m>
<x-m>3.8</x-m>
<y-m>-5.755</y-m>
<z-m>-1.0170087</z-m>
<z-m>-1.15</z-m>
</offsets>
</model>
<model>
<name>Engine.PW.RightFireBBox</name>
<path>Aircraft/IDG-A32X/Models/Wings/a320-fire-right.xml</path>
<path>Aircraft/IDG-A32X/Models/Wings/a320-fire-right-cfm.xml</path>
<offsets>
<x-m>-1.6387912</x-m>
<x-m>3.8</x-m>
<y-m>5.755</y-m>
<z-m>-1.0170087</z-m>
<z-m>-1.15</z-m>
</offsets>
</model>

View file

@ -282,14 +282,16 @@ var engFireDetectorUnit = {
};
var detectorLoop = {
sys: 9,
type: 0,
sys: 9,
temperature: "",
new: func(type, sys, temperature) {
elecProp: "",
new: func(type, sys, temperature, elecProp) {
var dL = {parents:[detectorLoop]};
dL.sys = sys;
dL.type = type;
dL.sys = sys;
dL.temperature = temperature;
dL.elecProp = props.globals.getNode(elecProp, 1);
return dL;
},
@ -300,7 +302,7 @@ var detectorLoop = {
if (typeLoop == 1) { index += 1 }
if (propsNasFire[index].getValue() > 250) {
if (propsNasFire[index].getValue() > 250 and me.elecProp.getValue() >= 25) {
me.sendSignal(system,typeLoop);
}
},
@ -412,9 +414,9 @@ var engFireDetectorUnits = std.Vector.new([ engFireDetectorUnit.new(0), engFireD
# Create detector loops
var detectorLoops = std.Vector.new([
detectorLoop.new(0, 0, "/systems/fire/engine1/temperature"), detectorLoop.new(1, 0, "/systems/fire/engine1/temperature"),
detectorLoop.new(0, 1, "/systems/fire/engine2/temperature"), detectorLoop.new(1, 1, "/systems/fire/engine2/temperature"),
detectorLoop.new(0, 2, "/systems/fire/apu/temperature"), detectorLoop.new(1, 2, "/systems/fire/apu/temperature")
detectorLoop.new(0, 0, "/systems/fire/engine1/temperature", "/systems/electrical/bus/dcess"), detectorLoop.new(1, 0, "/systems/fire/engine1/temperature", "/systems/electrical/bus/dc2"),
detectorLoop.new(0, 1, "/systems/fire/engine2/temperature", "/systems/electrical/bus/dc2"), detectorLoop.new(1, 1, "/systems/fire/engine2/temperature", "/systems/electrical/bus/dcess"),
detectorLoop.new(0, 2, "/systems/fire/apu/temperature", "/systems/electrical/bus/dcbat"), detectorLoop.new(1, 2, "/systems/fire/apu/temperature", "/systems/electrical/bus/dcbat")
]);
# Create extinguisher bottles

View file

@ -0,0 +1,64 @@
<!-- Copyright (c) 2019 Jonathan Redpath (legoboyvdlp) -->
<system name="A320: Engine Fire">
<channel name="Engine Fire">
<fcs_function name="engine-fire-1">
<function>
<sum>
<property>/systems/fire/engine1/temperature</property>
<product>
<table>
<independentVar lookup="row">/systems/failures/engine-left-fire</independentVar>
<tableData>
0 0
1 25
</tableData>
</table>
<property>simulation/channel-dt</property>
</product>
</sum>
</function>
<output>/systems/fire/engine1/temperature</output>
</fcs_function>
<fcs_function name="engine-fire-2">
<function>
<sum>
<property>/systems/fire/engine2/temperature</property>
<product>
<table>
<independentVar lookup="row">/systems/failures/engine-right-fire</independentVar>
<tableData>
0 0
1 25
</tableData>
</table>
<property>simulation/channel-dt</property>
</product>
</sum>
</function>
<output>/systems/fire/engine2/temperature</output>
</fcs_function>
<fcs_function name="apufire">
<function>
<sum>
<property>/systems/fire/apu/temperature</property>
<product>
<table>
<independentVar lookup="row">/systems/failures/apu-fire</independentVar>
<tableData>
0 0
1 25
</tableData>
</table>
<property>simulation/channel-dt</property>
</product>
</sum>
</function>
<output>/systems/fire/apu/temperature</output>
</fcs_function>
</channel>
</system>