Moisture effect on engines + brakes temp bug fix
This commit is contained in:
parent
3da7fb6416
commit
868fd28a16
12 changed files with 456 additions and 10 deletions
99
Models/Effects/Moisture.xml
Executable file
99
Models/Effects/Moisture.xml
Executable file
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
PRESTES Hangar - 2010 - presteshangar.wikidot.com
|
||||
=================================================
|
||||
|
||||
Creation July 08, 2010 12:11:39 AM
|
||||
Revisions
|
||||
0.0.1 July 08, 2010 12:11:52 AM
|
||||
|
||||
Original code author Maggse.
|
||||
|
||||
-->
|
||||
<PropertyList>
|
||||
<particlesystem>
|
||||
<!-- <type>trail</type>-->
|
||||
<name>flare</name>
|
||||
<texture>res/smoke.png</texture>
|
||||
<emissive>true</emissive>
|
||||
<lighting>false</lighting>
|
||||
<offsets>
|
||||
<x-m>0</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>0</z-m>
|
||||
<pitch-deg>90</pitch-deg>
|
||||
</offsets>
|
||||
|
||||
<attach>local</attach>
|
||||
|
||||
<placer>
|
||||
<type>point</type>
|
||||
</placer>
|
||||
|
||||
<shooter>
|
||||
<theta-min-deg>0</theta-min-deg>
|
||||
<theta-max-deg>0</theta-max-deg>
|
||||
<phi-min-deg>0</phi-min-deg>
|
||||
<phi-max-deg>0</phi-max-deg>
|
||||
<speed>
|
||||
<value>10</value>
|
||||
<spread>1</spread>
|
||||
</speed>
|
||||
<rotation-speed>
|
||||
<x-min-deg-sec>0</x-min-deg-sec>
|
||||
<y-min-deg-sec>0</y-min-deg-sec>
|
||||
<z-min-deg-sec>10</z-min-deg-sec>
|
||||
<x-max-deg-sec>0</x-max-deg-sec>
|
||||
<y-max-deg-sec>10</y-max-deg-sec>
|
||||
<z-max-deg-sec>20</z-max-deg-sec>
|
||||
</rotation-speed>
|
||||
</shooter>
|
||||
|
||||
<counter>
|
||||
<particles-per-sec>
|
||||
<value>100</value>
|
||||
<spread>10</spread>
|
||||
</particles-per-sec>
|
||||
</counter>
|
||||
|
||||
<align>billboard</align>
|
||||
|
||||
<particle>
|
||||
<start>
|
||||
<color>
|
||||
<red><value>0.3</value></red>
|
||||
<green><value>0.3</value></green>
|
||||
<blue><value>0.3</value></blue>
|
||||
<alpha><value>0.40</value></alpha>
|
||||
</color>
|
||||
<size>
|
||||
<value>1.3</value>
|
||||
</size>
|
||||
</start>
|
||||
<end>
|
||||
<color>
|
||||
<red><value>0.65</value></red>
|
||||
<green><value>0.45</value></green>
|
||||
<blue><value>0.35</value></blue>
|
||||
<alpha><value>0.2</value></alpha>
|
||||
</color>
|
||||
<size>
|
||||
<value>0.4</value>
|
||||
</size>
|
||||
</end>
|
||||
|
||||
<life-sec><value>0.1</value></life-sec>
|
||||
<mass-kg>0.4</mass-kg>
|
||||
<radius-m>0.1</radius-m>
|
||||
</particle>
|
||||
|
||||
<program>
|
||||
<fluid>air</fluid>
|
||||
<gravity type="bool">false</gravity>
|
||||
<wind type="bool">false</wind>
|
||||
</program>
|
||||
|
||||
</particlesystem>
|
||||
|
||||
</PropertyList>
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
<value>50</value>
|
||||
</greater-than>
|
||||
<greater-than>
|
||||
<property>/position/altitude-ft</property>
|
||||
<property>position/altitude-ft</property>
|
||||
<value>19000</value>
|
||||
</greater-than>
|
||||
<less-than>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<value>50</value>
|
||||
</greater-than>
|
||||
<greater-than>
|
||||
<property>/position/altitude-ft</property>
|
||||
<property>position/altitude-ft</property>
|
||||
<value>19000</value>
|
||||
</greater-than>
|
||||
<less-than>
|
||||
|
|
|
@ -62,6 +62,59 @@
|
|||
</offsets>
|
||||
</model>
|
||||
|
||||
<!-- Takeoff/Landing Engine Moisture -->
|
||||
<model>
|
||||
<name>Left</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/Moisture.xml</path>
|
||||
<condition>
|
||||
<and>
|
||||
<greater-than>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>1</value>
|
||||
</greater-than>
|
||||
<greater-than>
|
||||
<property>environment/relative-humidity</property>
|
||||
<value>45</value>
|
||||
</greater-than>
|
||||
<less-than-equals>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>75</value>
|
||||
</less-than-equals>
|
||||
<less-than-equals>
|
||||
<property>sim/time/sun-angle-rad</property>
|
||||
<value>1.63</value>
|
||||
</less-than-equals>
|
||||
<greater-than>
|
||||
<property>engines/engine[0]/n1</property>
|
||||
<value>60</value>
|
||||
</greater-than>
|
||||
<!-- <not>
|
||||
<property>sim/crashed</property>
|
||||
</not> -->
|
||||
</and>
|
||||
</condition>
|
||||
<offsets>
|
||||
<x-m>-0.5</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>0</z-m>
|
||||
<pitch-deg>0</pitch-deg>
|
||||
</offsets>
|
||||
</model>
|
||||
|
||||
<!-- ############### -->
|
||||
<!-- Tubofan Exhaust -->
|
||||
<!-- ###############
|
||||
<model>
|
||||
<name>Left Tubofan Exhaust</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/Exhaust/Exhaust.xml</path>
|
||||
<offsets>
|
||||
<x-m>-7.0</x-m>
|
||||
<y-m>-7.77</y-m>
|
||||
<z-m>-4.4</z-m>
|
||||
<pitch-deg>0</pitch-deg>
|
||||
</offsets>
|
||||
</model> -->
|
||||
|
||||
<model>
|
||||
<name>Engine fire</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/enginefire.xml</path>
|
||||
|
|
|
@ -62,6 +62,61 @@
|
|||
</offsets>
|
||||
</model>
|
||||
|
||||
|
||||
<!-- Takeoff/Landing Engine Moisture -->
|
||||
<model>
|
||||
<name>Right</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/Moisture.xml</path>
|
||||
<condition>
|
||||
<and>
|
||||
<greater-than>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>1</value>
|
||||
</greater-than>
|
||||
<greater-than>
|
||||
<property>environment/relative-humidity</property>
|
||||
<value>45</value>
|
||||
</greater-than>
|
||||
<less-than-equals>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>75</value>
|
||||
</less-than-equals>
|
||||
<less-than-equals>
|
||||
<property>sim/time/sun-angle-rad</property>
|
||||
<value>1.63</value>
|
||||
</less-than-equals>
|
||||
<greater-than>
|
||||
<property>engines/engine[1]/n1</property>
|
||||
<value>60</value>
|
||||
</greater-than>
|
||||
<!-- <not>
|
||||
<property>sim/crashed</property>
|
||||
</not> -->
|
||||
</and>
|
||||
</condition>
|
||||
<offsets>
|
||||
<x-m>-0.5</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>0</z-m>
|
||||
<pitch-deg>0</pitch-deg>
|
||||
</offsets>
|
||||
</model>
|
||||
|
||||
<!-- ############### -->
|
||||
<!-- Tubofan Exhaust -->
|
||||
<!-- ###############
|
||||
<model>
|
||||
<name>Right Tubofan Exhaust</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/Exhaust/Exhaust.xml</path>
|
||||
<offsets>
|
||||
<x-m>-7.0</x-m>
|
||||
<y-m> 7.77</y-m>
|
||||
<z-m>-4.4</z-m>
|
||||
<pitch-deg>0</pitch-deg>
|
||||
</offsets>
|
||||
</model>
|
||||
-->
|
||||
|
||||
<model>
|
||||
<name>Engine fire</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/enginefire.xml</path>
|
||||
|
|
|
@ -49,6 +49,45 @@
|
|||
</offsets>
|
||||
</model>
|
||||
|
||||
<!-- Takeoff/Landing Engine Moisture -->
|
||||
<model>
|
||||
<name>Left</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/Moisture.xml</path>
|
||||
<condition>
|
||||
<and>
|
||||
<greater-than>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>1</value>
|
||||
</greater-than>
|
||||
<greater-than>
|
||||
<property>environment/relative-humidity</property>
|
||||
<value>45</value>
|
||||
</greater-than>
|
||||
<less-than-equals>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>75</value>
|
||||
</less-than-equals>
|
||||
<less-than-equals>
|
||||
<property>sim/time/sun-angle-rad</property>
|
||||
<value>1.63</value>
|
||||
</less-than-equals>
|
||||
<greater-than>
|
||||
<property>engines/engine[0]/n1</property>
|
||||
<value>60</value>
|
||||
</greater-than>
|
||||
<!-- <not>
|
||||
<property>sim/crashed</property>
|
||||
</not> -->
|
||||
</and>
|
||||
</condition>
|
||||
<offsets>
|
||||
<x-m>-0.5</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>0</z-m>
|
||||
<pitch-deg>0</pitch-deg>
|
||||
</offsets>
|
||||
</model>
|
||||
|
||||
<model>
|
||||
<name>Engine fire</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/enginefire.xml</path>
|
||||
|
|
|
@ -49,6 +49,45 @@
|
|||
</offsets>
|
||||
</model>
|
||||
|
||||
<!-- Takeoff/Landing Engine Moisture -->
|
||||
<model>
|
||||
<name>Left</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/Moisture.xml</path>
|
||||
<condition>
|
||||
<and>
|
||||
<greater-than>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>1</value>
|
||||
</greater-than>
|
||||
<greater-than>
|
||||
<property>environment/relative-humidity</property>
|
||||
<value>45</value>
|
||||
</greater-than>
|
||||
<less-than-equals>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>75</value>
|
||||
</less-than-equals>
|
||||
<less-than-equals>
|
||||
<property>sim/time/sun-angle-rad</property>
|
||||
<value>1.63</value>
|
||||
</less-than-equals>
|
||||
<greater-than>
|
||||
<property>engines/engine[1]/n1</property>
|
||||
<value>60</value>
|
||||
</greater-than>
|
||||
<!-- <not>
|
||||
<property>sim/crashed</property>
|
||||
</not> -->
|
||||
</and>
|
||||
</condition>
|
||||
<offsets>
|
||||
<x-m>-0.5</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>0</z-m>
|
||||
<pitch-deg>0</pitch-deg>
|
||||
</offsets>
|
||||
</model>
|
||||
|
||||
<model>
|
||||
<name>Engine fire</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/enginefire.xml</path>
|
||||
|
|
|
@ -51,6 +51,45 @@
|
|||
</offsets>
|
||||
</model>
|
||||
|
||||
<!-- Takeoff/Landing Engine Moisture -->
|
||||
<model>
|
||||
<name>Left</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/Moisture.xml</path>
|
||||
<condition>
|
||||
<and>
|
||||
<greater-than>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>1</value>
|
||||
</greater-than>
|
||||
<greater-than>
|
||||
<property>environment/relative-humidity</property>
|
||||
<value>45</value>
|
||||
</greater-than>
|
||||
<less-than-equals>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>75</value>
|
||||
</less-than-equals>
|
||||
<less-than-equals>
|
||||
<property>sim/time/sun-angle-rad</property>
|
||||
<value>1.63</value>
|
||||
</less-than-equals>
|
||||
<greater-than>
|
||||
<property>engines/engine[0]/n1</property>
|
||||
<value>60</value>
|
||||
</greater-than>
|
||||
<!-- <not>
|
||||
<property>sim/crashed</property>
|
||||
</not> -->
|
||||
</and>
|
||||
</condition>
|
||||
<offsets>
|
||||
<x-m>-0.5</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>0</z-m>
|
||||
<pitch-deg>0</pitch-deg>
|
||||
</offsets>
|
||||
</model>
|
||||
|
||||
<model>
|
||||
<name>Engine fire</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/enginefire.xml</path>
|
||||
|
|
|
@ -51,6 +51,45 @@
|
|||
</offsets>
|
||||
</model>
|
||||
|
||||
<!-- Takeoff/Landing Engine Moisture -->
|
||||
<model>
|
||||
<name>Right</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/Moisture.xml</path>
|
||||
<condition>
|
||||
<and>
|
||||
<greater-than>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>1</value>
|
||||
</greater-than>
|
||||
<greater-than>
|
||||
<property>environment/relative-humidity</property>
|
||||
<value>45</value>
|
||||
</greater-than>
|
||||
<less-than-equals>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>75</value>
|
||||
</less-than-equals>
|
||||
<less-than-equals>
|
||||
<property>sim/time/sun-angle-rad</property>
|
||||
<value>1.63</value>
|
||||
</less-than-equals>
|
||||
<greater-than>
|
||||
<property>engines/engine[1]/n1</property>
|
||||
<value>60</value>
|
||||
</greater-than>
|
||||
<!-- <not>
|
||||
<property>sim/crashed</property>
|
||||
</not> -->
|
||||
</and>
|
||||
</condition>
|
||||
<offsets>
|
||||
<x-m>-0.5</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>0</z-m>
|
||||
<pitch-deg>0</pitch-deg>
|
||||
</offsets>
|
||||
</model>
|
||||
|
||||
<model>
|
||||
<name>Engine fire</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/enginefire.xml</path>
|
||||
|
|
|
@ -48,6 +48,45 @@
|
|||
</offsets>
|
||||
</model>
|
||||
|
||||
<!-- Takeoff/Landing Engine Moisture -->
|
||||
<model>
|
||||
<name>Left</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/Moisture.xml</path>
|
||||
<condition>
|
||||
<and>
|
||||
<greater-than>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>1</value>
|
||||
</greater-than>
|
||||
<greater-than>
|
||||
<property>environment/relative-humidity</property>
|
||||
<value>45</value>
|
||||
</greater-than>
|
||||
<less-than-equals>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>75</value>
|
||||
</less-than-equals>
|
||||
<less-than-equals>
|
||||
<property>sim/time/sun-angle-rad</property>
|
||||
<value>1.63</value>
|
||||
</less-than-equals>
|
||||
<greater-than>
|
||||
<property>engines/engine[0]/n1</property>
|
||||
<value>60</value>
|
||||
</greater-than>
|
||||
<!-- <not>
|
||||
<property>sim/crashed</property>
|
||||
</not> -->
|
||||
</and>
|
||||
</condition>
|
||||
<offsets>
|
||||
<x-m>-0.5</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>0</z-m>
|
||||
<pitch-deg>0</pitch-deg>
|
||||
</offsets>
|
||||
</model>
|
||||
|
||||
<model>
|
||||
<name>Engine fire</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/enginefire.xml</path>
|
||||
|
|
|
@ -48,6 +48,45 @@
|
|||
</offsets>
|
||||
</model>
|
||||
|
||||
<!-- Takeoff/Landing Engine Moisture -->
|
||||
<model>
|
||||
<name>Right</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/Moisture.xml</path>
|
||||
<condition>
|
||||
<and>
|
||||
<greater-than>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>1</value>
|
||||
</greater-than>
|
||||
<greater-than>
|
||||
<property>environment/relative-humidity</property>
|
||||
<value>45</value>
|
||||
</greater-than>
|
||||
<less-than-equals>
|
||||
<property>position/altitude-agl-ft</property>
|
||||
<value>75</value>
|
||||
</less-than-equals>
|
||||
<less-than-equals>
|
||||
<property>sim/time/sun-angle-rad</property>
|
||||
<value>1.63</value>
|
||||
</less-than-equals>
|
||||
<greater-than>
|
||||
<property>engines/engine[1]/n1</property>
|
||||
<value>60</value>
|
||||
</greater-than>
|
||||
<!-- <not>
|
||||
<property>sim/crashed</property>
|
||||
</not> -->
|
||||
</and>
|
||||
</condition>
|
||||
<offsets>
|
||||
<x-m>-0.5</x-m>
|
||||
<y-m>0</y-m>
|
||||
<z-m>0</z-m>
|
||||
<pitch-deg>0</pitch-deg>
|
||||
</offsets>
|
||||
</model>
|
||||
|
||||
<model>
|
||||
<name>Engine fire</name>
|
||||
<path>Aircraft/A320-family/Models/Effects/enginefire.xml</path>
|
||||
|
|
|
@ -75,9 +75,9 @@ var BrakeSystem =
|
|||
setprop("gear/gear[2]/R3error-temp-degc", math.round(rand()*(5)) - 2.5);
|
||||
setprop("gear/gear[2]/R4error-temp-degc", math.round(rand()*(5)) - 2.5);
|
||||
|
||||
var atemp = getprop("environment/temperature-degc") or 0;
|
||||
var vmach = getprop("velocities/mach") or 0;
|
||||
var tatdegc = getprop("/systems/navigation/probes/tat-1/compute-tat");
|
||||
#var atemp = getprop("environment/temperature-degc") or 0;
|
||||
#var vmach = getprop("velocities/mach") or 0;
|
||||
var tatdegc = getprop("/systems/navigation/probes/tat-1/compute-tat") or 0;
|
||||
|
||||
setprop("gear/gear[1]/L1brake-temp-degc",tatdegc+getprop("gear/gear[1]/L1error-temp-degc"));
|
||||
setprop("gear/gear[1]/L2brake-temp-degc",tatdegc+getprop("gear/gear[1]/L2error-temp-degc"));
|
||||
|
@ -97,9 +97,10 @@ var BrakeSystem =
|
|||
var RThermalEnergy = getprop("gear/gear[2]/Rbrake-thermal-energy");
|
||||
var LBrakeLevel = getprop("fdm/jsbsim/fcs/left-brake-cmd-norm");
|
||||
var RBrakeLevel = getprop("fdm/jsbsim/fcs/right-brake-cmd-norm");
|
||||
var atemp = getprop("environment/temperature-degc") or 0;
|
||||
var vmach = getprop("velocities/mach") or 0;
|
||||
var tatdegc = atemp * (1 + (0.2 * math.pow(vmach, 2)));
|
||||
#var atemp = getprop("environment/temperature-degc") or 0;
|
||||
#var vmach = getprop("velocities/mach") or 0;
|
||||
#var tatdegc = atemp * (1 + (0.2 * math.pow(vmach, 2)));
|
||||
var tatdegc = getprop("/systems/navigation/probes/tat-1/compute-tat") or 0;
|
||||
var L_thrust_lb = getprop("engines/engine[0]/thrust_lb");
|
||||
var R_thrust_lb = getprop("engines/engine[1]/thrust_lb");
|
||||
|
||||
|
@ -150,14 +151,18 @@ var BrakeSystem =
|
|||
{
|
||||
L_thrust_lb = 1
|
||||
}
|
||||
L_Thrust = math.pow((math.log10(L_thrust_lb)),10)*0.0000000002;
|
||||
#Disabling thrust computation on Brakes temperature
|
||||
#L_Thrust = math.pow((math.log10(L_thrust_lb)),10)*0.0000000002;
|
||||
L_Thrust = 0;
|
||||
|
||||
R_thrust_lb = math.abs(getprop("engines/engine[1]/thrust_lb"));
|
||||
if (R_thrust_lb < 1)
|
||||
{
|
||||
R_thrust_lb = 1
|
||||
}
|
||||
R_Thrust = math.pow((math.log10(R_thrust_lb)),10)*0.0000000002;
|
||||
#Disabling thrust computation on Brakes temperature
|
||||
#R_Thrust = math.pow((math.log10(R_thrust_lb)),10)*0.0000000002;
|
||||
R_Thrust = 0;
|
||||
|
||||
if (OnGround)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue