Merge branch 'dev' into FMGC
This commit is contained in:
commit
b8627ca92c
10 changed files with 59347 additions and 59336 deletions
|
@ -18,7 +18,7 @@
|
|||
|
||||
<condition>
|
||||
<equals>
|
||||
<property>gear/Lbrake-smoke</property>
|
||||
<property>gear/gear[1]/Lbrake-smoke</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
<counter>
|
||||
<particles-per-sec>
|
||||
<property>gear/Lbrake-thermal-energy</property>
|
||||
<property>gear/gear[1]/Lbrake-thermal-energy</property>
|
||||
<factor>20</factor>
|
||||
<spread>70</spread>
|
||||
</particles-per-sec>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
<condition>
|
||||
<equals>
|
||||
<property>gear/Rbrake-smoke</property>
|
||||
<property>gear/gear[2]/Rbrake-smoke</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</condition>
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
<counter>
|
||||
<particles-per-sec>
|
||||
<property>gear/Rbrake-thermal-energy</property>
|
||||
<property>gear/gear[2]/Rbrake-thermal-energy</property>
|
||||
<factor>20</factor>
|
||||
<spread>70</spread>
|
||||
</particles-per-sec>
|
||||
|
|
|
@ -368,6 +368,8 @@
|
|||
<object-name>audio_vhf2_led</object-name>
|
||||
<object-name>audio_vhf3_led</object-name>
|
||||
<object-name>autoland_light_on</object-name>
|
||||
<object-name>brk_fan_on</object-name>
|
||||
<object-name>brk_hot_on</object-name>
|
||||
<object-name>cstr_led</object-name>
|
||||
<object-name>cstr_led.001</object-name>
|
||||
<object-name>dec_low_on</object-name>
|
||||
|
@ -676,6 +678,71 @@
|
|||
</action>
|
||||
</animation>
|
||||
|
||||
<!-- Brake's fans -->
|
||||
<animation>
|
||||
<type>pick</type>
|
||||
<object-name>brk_fan</object-name>
|
||||
<action>
|
||||
<button>0</button>
|
||||
<binding>
|
||||
<condition>
|
||||
<greater-than-equals>
|
||||
<property>systems/electrical/bus/dc-ess</property>
|
||||
<value>25</value>
|
||||
</greater-than-equals>
|
||||
</condition>
|
||||
<command>property-toggle</command>
|
||||
<property>controls/gear/brake-fans</property>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>brk_fan_on</object-name>
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/switches/annun-test</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<equals>
|
||||
<property>controls/gear/brake-fans</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
</or>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<animation>
|
||||
<type>select</type>
|
||||
<object-name>brk_hot_on</object-name>
|
||||
<condition>
|
||||
<or>
|
||||
<equals>
|
||||
<property>controls/switches/annun-test</property>
|
||||
<value>1</value>
|
||||
</equals>
|
||||
<greater-than-equals>
|
||||
<property>gear/gear[1]/L1brake-temp-degc</property>
|
||||
<value>300</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>gear/gear[1]/L2brake-temp-degc</property>
|
||||
<value>300</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>gear/gear[2]/R3brake-temp-degc</property>
|
||||
<value>300</value>
|
||||
</greater-than-equals>
|
||||
<greater-than-equals>
|
||||
<property>gear/gear[2]/R4brake-temp-degc</property>
|
||||
<value>300</value>
|
||||
</greater-than-equals>
|
||||
</or>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
<!-- Autobrakes -->
|
||||
<animation>
|
||||
<type>select</type>
|
||||
|
@ -6486,6 +6553,8 @@
|
|||
<object-name>brightness_nd_2_fo.mark</object-name>
|
||||
<object-name>brightness_panel_emit</object-name>
|
||||
<object-name>brk_fan</object-name>
|
||||
<object-name>brk_fan_on</object-name>
|
||||
<object-name>brk_hot_on</object-name>
|
||||
<object-name>dec_low_on</object-name>
|
||||
<object-name>dec_max_on</object-name>
|
||||
<object-name>dec_med_on</object-name>
|
||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 101 KiB |
|
@ -179,6 +179,10 @@ var g_resv_ovht = props.globals.getNode("/systems/hydraulic/green-resv-ovht", 1)
|
|||
var askidsw = 0;
|
||||
var brakemode = 0;
|
||||
var accum = 0;
|
||||
var L1BrakeTempc = props.globals.getNode("/gear/gear[1]/L1brake-temp-degc", 1);
|
||||
var L2BrakeTempc = props.globals.getNode("/gear/gear[1]/L2brake-temp-degc", 1);
|
||||
var R3BrakeTempc = props.globals.getNode("/gear/gear[2]/R3brake-temp-degc", 1);
|
||||
var R4BrakeTempc = props.globals.getNode("/gear/gear[2]/R4brake-temp-degc", 1);
|
||||
|
||||
var eng1_running = props.globals.getNode("/engines/engine[0]/running", 1);
|
||||
var eng2_running = props.globals.getNode("/engines/engine[1]/running", 1);
|
||||
|
@ -2794,7 +2798,7 @@ var canvas_lowerECAM_wheel = {
|
|||
return ["TAT","SAT","GW","UTCh","UTCm","lgctltext","NORMbrk","NWStext","leftdoor","rightdoor","nosegeardoorL","nosegeardoorR","autobrk","autobrkind","NWS","NWSrect","normbrk-rect","altnbrk","normbrkhyd","spoiler1Rex","spoiler1Rrt","spoiler2Rex",
|
||||
"spoiler2Rrt","spoiler3Rex","spoiler3Rrt","spoiler4Rex","spoiler4Rrt","spoiler5Rex","spoiler5Rrt","spoiler1Lex","spoiler1Lrt","spoiler2Lex","spoiler2Lrt","spoiler3Lex","spoiler3Lrt","spoiler4Lex","spoiler4Lrt","spoiler5Lex","spoiler5Lrt","spoiler1Rf",
|
||||
"spoiler2Rf","spoiler3Rf","spoiler4Rf","spoiler5Rf","spoiler1Lf","spoiler2Lf","spoiler3Lf","spoiler4Lf","spoiler5Lf","ALTNbrk","altnbrkhyd","altnbrk-rect","antiskidtext","brakearrow","accupress_text","accuonlyarrow","accuonly","braketemp1","normbrkhyd",
|
||||
"braketemp2","braketemp3","braketemp4","leftuplock","noseuplock","rightuplock","Triangle-Left1","Triangle-Left2","Triangle-Nose1","Triangle-Nose2","Triangle-Right1","Triangle-Right2","BSCUrect1","BSCUrect2","BSCU1","BSCU2"];
|
||||
"braketemp2","braketemp3","braketemp4","toparc1","toparc2","toparc3","toparc4","leftuplock","noseuplock","rightuplock","Triangle-Left1","Triangle-Left2","Triangle-Nose1","Triangle-Nose2","Triangle-Right1","Triangle-Right2","BSCUrect1","BSCUrect2","BSCU1","BSCU2"];
|
||||
},
|
||||
update: func() {
|
||||
blue_psi = systems.HYD.Psi.blue.getValue();
|
||||
|
@ -3220,11 +3224,92 @@ var canvas_lowerECAM_wheel = {
|
|||
me["spoiler5Rf"].hide();
|
||||
}
|
||||
|
||||
# Show Brakes temperature
|
||||
if (L1BrakeTempc.getValue() > 300) {
|
||||
me["braketemp1"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["braketemp1"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
|
||||
if (L2BrakeTempc.getValue() > 300) {
|
||||
me["braketemp2"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["braketemp2"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
if (R3BrakeTempc.getValue() > 300) {
|
||||
me["braketemp3"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["braketemp3"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
if (R4BrakeTempc.getValue() > 300) {
|
||||
me["braketemp4"].setColor(0.7333,0.3803,0);
|
||||
} else {
|
||||
me["braketemp4"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
|
||||
# Brake arcs
|
||||
if (L1BrakeTempc.getValue() > 300) {
|
||||
me["toparc1"].setColor(0.7333,0.3803,0);
|
||||
} else
|
||||
{
|
||||
if (L1BrakeTempc.getValue() > 100 and L1BrakeTempc.getValue() < 300)
|
||||
{
|
||||
me["toparc1"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
else {
|
||||
me["toparc1"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
}
|
||||
if (L2BrakeTempc.getValue() > 300) {
|
||||
me["toparc2"].setColor(0.7333,0.3803,0);
|
||||
} else
|
||||
{
|
||||
if (L2BrakeTempc.getValue() > 100 and L2BrakeTempc.getValue() < 300)
|
||||
{
|
||||
me["toparc2"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
else {
|
||||
me["toparc2"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
}
|
||||
if (R3BrakeTempc.getValue() > 300) {
|
||||
me["toparc3"].setColor(0.7333,0.3803,0);
|
||||
} else
|
||||
{
|
||||
if (R3BrakeTempc.getValue() > 100 and R3BrakeTempc.getValue() < 300)
|
||||
{
|
||||
me["toparc3"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
else {
|
||||
me["toparc3"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
}
|
||||
if (R4BrakeTempc.getValue() > 300) {
|
||||
me["toparc4"].setColor(0.7333,0.3803,0);
|
||||
} else
|
||||
{
|
||||
if (R4BrakeTempc.getValue() > 100 and R4BrakeTempc.getValue() < 300)
|
||||
{
|
||||
me["toparc4"].setColor(0.0509,0.7529,0.2941);
|
||||
}
|
||||
else {
|
||||
me["toparc4"].setColor(0.8078,0.8039,0.8078);
|
||||
}
|
||||
}
|
||||
me["braketemp1"].setText(sprintf("%s", math.round(L1BrakeTempc.getValue(), 1)));
|
||||
me["braketemp2"].setText(sprintf("%s", math.round(L2BrakeTempc.getValue(), 1)));
|
||||
me["braketemp3"].setText(sprintf("%s", math.round(R3BrakeTempc.getValue(), 1)));
|
||||
me["braketemp4"].setText(sprintf("%s", math.round(R4BrakeTempc.getValue(), 1)));
|
||||
me["braketemp1"].show();
|
||||
me["braketemp2"].show();
|
||||
me["braketemp3"].show();
|
||||
me["braketemp4"].show();
|
||||
me["toparc1"].show();
|
||||
me["toparc2"].show();
|
||||
me["toparc3"].show();
|
||||
me["toparc4"].show();
|
||||
|
||||
# Hide not yet implemented stuff
|
||||
me["braketemp1"].hide();
|
||||
me["braketemp2"].hide();
|
||||
me["braketemp3"].hide();
|
||||
me["braketemp4"].hide();
|
||||
me["leftuplock"].hide();
|
||||
me["noseuplock"].hide();
|
||||
me["rightuplock"].hide();
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
inkscape:version="0.91 r13725"
|
||||
inkscape:version="0.92.4 (unknown)"
|
||||
sodipodi:docname="wheel.svg">
|
||||
<metadata
|
||||
id="metadata375">
|
||||
|
@ -38,14 +38,14 @@
|
|||
inkscape:pageopacity="1"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1030"
|
||||
inkscape:window-height="1016"
|
||||
id="namedview371"
|
||||
showgrid="true"
|
||||
inkscape:zoom="0.35028385"
|
||||
inkscape:cx="1369.3266"
|
||||
inkscape:cy="888.08553"
|
||||
inkscape:window-x="1592"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:zoom="0.49537617"
|
||||
inkscape:cx="95.098853"
|
||||
inkscape:cy="639.56062"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2">
|
||||
<inkscape:grid
|
||||
|
@ -82,8 +82,7 @@
|
|||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="500.75214"
|
||||
y="977.31793"
|
||||
id="text6232"
|
||||
sodipodi:linespacing="0%"><tspan
|
||||
id="text6232"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3726-1-4-5-7"
|
||||
x="500.75214"
|
||||
|
@ -94,8 +93,7 @@
|
|||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="254.86758"
|
||||
y="938.9859"
|
||||
id="text6233"
|
||||
sodipodi:linespacing="0%"><tspan
|
||||
id="text6233"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3726-1-4-5-3"
|
||||
x="254.86758"
|
||||
|
@ -106,8 +104,7 @@
|
|||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#179ab7;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="940.17981"
|
||||
y="939.82428"
|
||||
id="text6234"
|
||||
sodipodi:linespacing="0%"><tspan
|
||||
id="text6234"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3726-1-4-5-7-7"
|
||||
x="940.17981"
|
||||
|
@ -118,8 +115,7 @@
|
|||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="695.24951"
|
||||
y="939.8045"
|
||||
id="text3912"
|
||||
sodipodi:linespacing="0%"><tspan
|
||||
id="text3912"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3914"
|
||||
x="695.24951"
|
||||
|
@ -130,8 +126,7 @@
|
|||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="48.73233"
|
||||
y="939.2984"
|
||||
id="text6235"
|
||||
sodipodi:linespacing="0%"><tspan
|
||||
id="text6235"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3914-9"
|
||||
x="48.73233"
|
||||
|
@ -142,8 +137,7 @@
|
|||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="47.952412"
|
||||
y="975.40332"
|
||||
id="text6236"
|
||||
sodipodi:linespacing="0%"><tspan
|
||||
id="text6236"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3914-9-4"
|
||||
x="47.952412"
|
||||
|
@ -155,8 +149,7 @@
|
|||
x="212.32626"
|
||||
y="938.96637"
|
||||
id="TAT"
|
||||
inkscape:label="#text5149"
|
||||
sodipodi:linespacing="0%"><tspan
|
||||
inkscape:label="#text5149"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5151-5-7-1"
|
||||
x="212.32626"
|
||||
|
@ -168,8 +161,7 @@
|
|||
x="212.3264"
|
||||
y="975.40363"
|
||||
id="SAT"
|
||||
inkscape:label="#text5149"
|
||||
sodipodi:linespacing="0%"><tspan
|
||||
inkscape:label="#text5149"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5151-5-7-1-0"
|
||||
x="212.3264"
|
||||
|
@ -181,15 +173,13 @@
|
|||
x="925.0899"
|
||||
y="939.78522"
|
||||
id="GW"
|
||||
inkscape:label="#text5149"
|
||||
sodipodi:linespacing="0%"><tspan
|
||||
inkscape:label="#text5149"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5151-5-7-1-9"
|
||||
x="925.0899"
|
||||
y="939.78522"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:36px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b">120000</tspan></text>
|
||||
<text
|
||||
sodipodi:linespacing="0%"
|
||||
id="text4170"
|
||||
y="975.42352"
|
||||
x="254.86758"
|
||||
|
@ -201,7 +191,6 @@
|
|||
id="tspan4172"
|
||||
sodipodi:role="line">°C</tspan></text>
|
||||
<text
|
||||
sodipodi:linespacing="0%"
|
||||
inkscape:label="#text5149"
|
||||
id="UTCh"
|
||||
y="976.25214"
|
||||
|
@ -219,8 +208,7 @@
|
|||
x="560.88452"
|
||||
y="976.25214"
|
||||
id="UTCm"
|
||||
inkscape:label="#text5149"
|
||||
sodipodi:linespacing="0%"><tspan
|
||||
inkscape:label="#text5149"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4180"
|
||||
x="560.88452"
|
||||
|
@ -255,7 +243,7 @@
|
|||
id="text4476"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4478"
|
||||
x="505.625"
|
||||
x="504.4375"
|
||||
y="284"
|
||||
style="font-size:32px;line-height:1.25"> </tspan></text>
|
||||
<text
|
||||
|
@ -332,7 +320,7 @@
|
|||
style="font-size:32px;line-height:1.25">ANTI SKID</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="435.54364"
|
||||
y="667.42596"
|
||||
id="ALTNbrk"
|
||||
|
@ -341,7 +329,7 @@
|
|||
id="tspan4275"
|
||||
x="435.54364"
|
||||
y="667.42596"
|
||||
style="font-size:32px;line-height:1.25;fill:#0dc04b;fill-opacity:1;">ALTN BRK</tspan></text>
|
||||
style="font-size:32px;line-height:1.25;fill:#0dc04b;fill-opacity:1">ALTN BRK</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
|
@ -370,14 +358,14 @@
|
|||
id="NORMbrk"
|
||||
y="616.38831"
|
||||
x="426.55933"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"
|
||||
inkscape:label="#text4285"><tspan
|
||||
y="616.38831"
|
||||
x="426.55933"
|
||||
id="tspan4287"
|
||||
sodipodi:role="line"
|
||||
style="font-size:32px;line-height:1.25;fill:#0dc04b;fill-opacity:1;">NORM BRK</tspan></text>
|
||||
style="font-size:32px;line-height:1.25;fill:#0dc04b;fill-opacity:1">NORM BRK</tspan></text>
|
||||
<text
|
||||
id="accupress_text"
|
||||
y="707.69037"
|
||||
|
@ -1016,8 +1004,8 @@
|
|||
sodipodi:role="line"
|
||||
id="tspan4357-0-1"
|
||||
x="429.4884"
|
||||
y="624.30054"
|
||||
style="font-size:34.50801086px;line-height:1.25" /></text>
|
||||
y="620.99146"
|
||||
style="font-size:34.50801086px;line-height:1.25"> </tspan></text>
|
||||
<rect
|
||||
style="fill:#898989;fill-opacity:1;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
id="normbrk-rect"
|
||||
|
@ -1028,7 +1016,7 @@
|
|||
inkscape:label="#rect4370-3-6-2-8-9-7" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="425.9541"
|
||||
y="575.56732"
|
||||
id="normbrkhyd"
|
||||
|
@ -1038,12 +1026,12 @@
|
|||
id="tspan4357-0-1-1"
|
||||
x="425.9541"
|
||||
y="575.56732"
|
||||
style="font-size:34.50801086px;line-height:1.25;fill:#0dc04b;fill-opacity:1;">G</tspan><tspan
|
||||
style="font-size:34.50801086px;line-height:1.25;fill:#0dc04b;fill-opacity:1">G</tspan><tspan
|
||||
sodipodi:role="line"
|
||||
x="425.9541"
|
||||
y="590.92816"
|
||||
y="618.70233"
|
||||
id="tspan4332"
|
||||
style="font-size:34.50801086px;line-height:1.25;fill:#0dc04b;fill-opacity:1;" /></text>
|
||||
style="font-size:34.50801086px;line-height:1.25;fill:#0dc04b;fill-opacity:1"> </tspan></text>
|
||||
<rect
|
||||
y="525.2644"
|
||||
x="632.14337"
|
||||
|
@ -1062,7 +1050,7 @@
|
|||
inkscape:label="#rect4336" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="636.59528"
|
||||
y="554.79926"
|
||||
id="BSCU2"
|
||||
|
@ -1071,10 +1059,10 @@
|
|||
id="tspan192"
|
||||
x="636.59528"
|
||||
y="554.79926"
|
||||
style="font-size:32px;line-height:1.25;fill:#bb6100;fill-opacity:1;">2</tspan></text>
|
||||
style="font-size:32px;line-height:1.25;fill:#bb6100;fill-opacity:1">2</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="602.89856"
|
||||
y="554.79913"
|
||||
id="BSCU1"
|
||||
|
@ -1083,7 +1071,7 @@
|
|||
id="tspan195"
|
||||
x="602.89856"
|
||||
y="554.79913"
|
||||
style="font-size:32px;line-height:1.25;fill:#bb6100;fill-opacity:1;">1</tspan></text>
|
||||
style="font-size:32px;line-height:1.25;fill:#bb6100;fill-opacity:1">1</tspan></text>
|
||||
<rect
|
||||
y="336.88196"
|
||||
x="364.16824"
|
||||
|
@ -1098,13 +1086,13 @@
|
|||
id="NWS"
|
||||
y="341.20551"
|
||||
x="397.44525"
|
||||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#bb6100;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
y="341.20551"
|
||||
x="397.44525"
|
||||
id="tspan4356"
|
||||
sodipodi:role="line"
|
||||
style="font-size:34.50801086px;line-height:1.25;fill:#bb6100;fill-opacity:1;">Y</tspan></text>
|
||||
style="font-size:34.50801086px;line-height:1.25;fill:#bb6100;fill-opacity:1">Y</tspan></text>
|
||||
<path
|
||||
style="fill:#0dc04b;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 406.87622,675.56692 0.0702,27.55948 9.82741,0.0703 0.0285,6.18467 9.45224,-8.4158 -9.41055,-7.68184 -0.0702,6.04621 -6.94937,-0.0703 -0.49137,-23.62242 z"
|
||||
|
@ -1131,9 +1119,9 @@
|
|||
id="altnbrkhyd"
|
||||
y="620.81592"
|
||||
x="427.90295"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-size:34.50801086px;line-height:1.25;fill:#0dc04b;fill-opacity:1;"
|
||||
style="font-size:34.50801086px;line-height:1.25;fill:#0dc04b;fill-opacity:1"
|
||||
id="tspan1000"
|
||||
y="620.81592"
|
||||
x="427.90295"
|
||||
|
@ -1192,8 +1180,7 @@
|
|||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';letter-spacing:0px;word-spacing:0px;fill:#0dc04b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="455.59897"
|
||||
y="707.69037"
|
||||
id="accuonly"
|
||||
sodipodi:linespacing="0%"><tspan
|
||||
id="accuonly"><tspan
|
||||
style="font-size:32px;line-height:1.25"
|
||||
sodipodi:role="line"
|
||||
id="tspan4312"
|
||||
|
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
|
@ -1524,6 +1524,12 @@ var messages_right_memo = func {
|
|||
park_brk.colour = "g";
|
||||
}
|
||||
|
||||
if (getprop("/controls/gear/brake-fans") == 1) {
|
||||
brk_fan.active = 1;
|
||||
} else {
|
||||
brk_fan.active = 0;
|
||||
}
|
||||
|
||||
if (getprop("/controls/hydraulic/ptu") == 1 and ((getprop("/systems/hydraulic/yellow-psi") < 1450 and getprop("/systems/hydraulic/green-psi") > 1450 and getprop("/controls/hydraulic/elec-pump-yellow") == 0) or (getprop("/systems/hydraulic/yellow-psi") > 1450 and getprop("/systems/hydraulic/green-psi") < 1450))) {
|
||||
ptu.active = 1;
|
||||
} else {
|
||||
|
@ -1681,4 +1687,4 @@ setlistener("/engines/engine[1]/state", func() {
|
|||
} else {
|
||||
dualFailNode.setBoolValue(0);
|
||||
}
|
||||
}, 0, 0);
|
||||
}, 0, 0);
|
||||
|
|
|
@ -333,7 +333,7 @@ var memos = std.Vector.new([
|
|||
var apu_avail = memo.new(msg: "APU AVAIL" ),
|
||||
var apu_bleed = memo.new(msg: "APU BLEED" ),
|
||||
var ldg_lt = memo.new(msg: "LDG LT" ),
|
||||
var brk_fan = memo.new(msg: "BRK FAN" ), # Not yet implemented
|
||||
var brk_fan = memo.new(msg: "BRK FAN" ),
|
||||
var audio3_xfrd = memo.new(msg: "AUDIO 3 XFRD"), # Not yet implemented
|
||||
var switchg_pnl = memo.new(msg: "SWITCHG PNL" ), # Not yet implemented
|
||||
var gpws_flap3 = memo.new(msg: "GPWS FLAP 3" ),
|
||||
|
@ -487,4 +487,4 @@ var statusInop = std.Vector.new();
|
|||
var statusMaintenance = std.Vector.new();
|
||||
|
||||
# hack thrust lock message:
|
||||
var msgSave = athr_lock.msg;
|
||||
var msgSave = athr_lock.msg;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# is just meant to distinguish normal energy levels from exceptionally
|
||||
# high levels. The target is to drive EICAS "brakes overheat" messages
|
||||
# and gear effects only, to "reward" pilots with exceptionally bad
|
||||
# landings...
|
||||
# landings...
|
||||
#
|
||||
# To avoid complicated calculations of different braking effects (roll/air
|
||||
# drag, reverse thrust etc), we simply assume the brake system to cause a
|
||||
|
@ -24,192 +24,360 @@
|
|||
# "overheated brakes", any level <=1 means "brake temperature OK".
|
||||
# No exact science here - but good enough for now :-).
|
||||
##########################################################################
|
||||
|
||||
#
|
||||
# Added brakes temp calculations and adapted for A320-family
|
||||
# 2020, Andrea Vezzali
|
||||
#
|
||||
##########################################################################
|
||||
var BrakeSystem =
|
||||
{
|
||||
new : func()
|
||||
{
|
||||
var m = { parents : [BrakeSystem]};
|
||||
# deceleration caused by brakes alone (knots/s2)
|
||||
m.BrakeDecel = 1.0; # kt/s^2
|
||||
#m.LBrakeDecel = getprop("systems/hydraulic/brakes/pressure-left-psi") / 1000 * getprop("controls/autobrake/decel-error"); # kt/s^2
|
||||
#m.RBrakeDecel = getprop("systems/hydraulic/brakes/pressure-right-psi") / 1000 * getprop("controls/autobrake/decel-error"); # kt/s^2
|
||||
# Higher value means quicker cooling
|
||||
m.CoolingFactor = 0.005;
|
||||
# Scaling divisor. Use this to scale the energy output.
|
||||
# Manually tune this value: a total energy output
|
||||
# at "/gear/brake-thermal-energy" > 1.0 means overheated brakes,
|
||||
# anything below <= 1.0 means energy absorbed by brakes is OK.
|
||||
#m.ScalingDivisor= 700000*450.0;
|
||||
m.ScalingDivisor= 1;
|
||||
|
||||
m.LSmokeActive = 0;
|
||||
m.LSmokeToggle = 0;
|
||||
m.RSmokeActive = 0;
|
||||
m.RSmokeToggle = 0;
|
||||
m.nCoolFactor = math.ln(1-m.CoolingFactor);
|
||||
new : func()
|
||||
{
|
||||
var m = { parents : [BrakeSystem]};
|
||||
# deceleration caused by brakes alone (knots/s2)
|
||||
m.BrakeDecel = 1.0; # kt/s^2
|
||||
# Higher value means quicker cooling
|
||||
m.CoolingFactor = 0.000125;
|
||||
# Scaling divisor. Use this to scale the energy output.
|
||||
# Manually tune this value: a total energy output
|
||||
# at "/gear/brake-thermal-energy" > 1.0 means overheated brakes,
|
||||
# anything below <= 1.0 means energy absorbed by brakes is OK.
|
||||
#m.ScalingDivisor= 700000*450.0;
|
||||
|
||||
m.reset();
|
||||
m.ScalingDivisor = 0.000000006;
|
||||
|
||||
m.LSmokeActive = 0;
|
||||
m.LSmokeToggle = 0;
|
||||
m.RSmokeActive = 0;
|
||||
m.RSmokeToggle = 0;
|
||||
# m.LnCoolFactor = math.ln(1-m.CoolingFactor);
|
||||
|
||||
return m;
|
||||
},
|
||||
m.reset();
|
||||
|
||||
reset : func()
|
||||
{
|
||||
# Initial thermal energy
|
||||
setprop("gear/Lbrake-thermal-energy",0.0);
|
||||
setprop("gear/Rbrake-thermal-energy",0.0);
|
||||
setprop("gear/Lbrake-smoke",0);
|
||||
setprop("gear/Rbrake-smoke",0);
|
||||
setprop("sim/animation/fire-services",0);
|
||||
me.LastSimTime = 0.0;
|
||||
},
|
||||
return m;
|
||||
},
|
||||
|
||||
# update brake energy
|
||||
update : func()
|
||||
{
|
||||
var CurrentTime = getprop("sim/time/elapsed-sec");
|
||||
var dt = CurrentTime - me.LastSimTime;
|
||||
reset : func()
|
||||
{
|
||||
# Initial thermal energy
|
||||
setprop("gear/gear[1]/Lbrake-thermal-energy",0.0);
|
||||
setprop("gear/gear[2]/Rbrake-thermal-energy",0.0);
|
||||
|
||||
if (dt<1.0)
|
||||
{
|
||||
var OnGround = getprop("gear/gear[1]/wow");
|
||||
var LThermalEnergy = getprop("gear/Lbrake-thermal-energy");
|
||||
var RThermalEnergy = getprop("gear/Rbrake-thermal-energy");
|
||||
if (getprop("controls/gear/brake-parking"))
|
||||
{
|
||||
var LBrakeLevel=1.0;
|
||||
var RBrakeLevel=1.0;
|
||||
var BrakeLevel = (LBrakeLevel + RBrakeLevel)/2;
|
||||
}
|
||||
else
|
||||
var LBrakeLevel = getprop("fdm/jsbsim/fcs/left-brake-cmd-norm");
|
||||
var RBrakeLevel = getprop("fdm/jsbsim/fcs/right-brake-cmd-norm");
|
||||
var BrakeLevel = (LBrakeLevel + RBrakeLevel)/2;
|
||||
if ((OnGround)and(BrakeLevel>0))
|
||||
{
|
||||
# absorb more energy
|
||||
var V1 = getprop("velocities/groundspeed-kt");
|
||||
var Mass = getprop("fdm/jsbsim/inertia/weight-lbs")/(me.ScalingDivisor*200000000);
|
||||
# absorb some kinetic energy:
|
||||
# dE= 1/2 * m * V1^2 - 1/2 * m * V2^2)
|
||||
var V2_L = V1 - me.BrakeDecel*dt * LBrakeLevel;
|
||||
var V2_R = V1 - me.BrakeDecel*dt * RBrakeLevel;
|
||||
# do not absorb more energy when plane is (almost) stopped
|
||||
if (V2_L>0)
|
||||
LThermalEnergy += Mass * (V1*V1 - V2_L*V2_L)/2;
|
||||
if (V2_R>0)
|
||||
RThermalEnergy += Mass * (V1*V1 - V2_R*V2_R)/2;
|
||||
}
|
||||
setprop("controls/gear/brake-fans",0);
|
||||
setprop("gear/gear[1]/Lbrake-smoke",0);
|
||||
setprop("gear/gear[2]/Rbrake-smoke",0);
|
||||
setprop("gear/gear[1]/L-Thrust",0);
|
||||
setprop("gear/gear[2]/R-Thrust",0);
|
||||
|
||||
# cooling effect: reduce thermal energy by factor (1-m.CoolingFactor)^dt
|
||||
LThermalEnergy = LThermalEnergy * math.exp(me.nCoolFactor * dt);
|
||||
RThermalEnergy = RThermalEnergy * math.exp(me.nCoolFactor * dt);
|
||||
#Introducing a random error on temp sensors (max 5°C)
|
||||
setprop("gear/gear[1]/L1error-temp-degc", math.round(rand()*(5)) - 2.5);
|
||||
setprop("gear/gear[1]/L2error-temp-degc", math.round(rand()*(5)) - 2.5);
|
||||
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);
|
||||
|
||||
setprop("gear/Lbrake-thermal-energy",LThermalEnergy);
|
||||
setprop("gear/Rbrake-thermal-energy",RThermalEnergy);
|
||||
|
||||
if ((LThermalEnergy>1)and(!me.LSmokeActive))
|
||||
{
|
||||
# start smoke processing
|
||||
me.LSmokeActive = 1;
|
||||
settimer(func { BrakeSys.Lsmoke(); },0);
|
||||
}
|
||||
if ((RThermalEnergy>1)and(!me.RSmokeActive))
|
||||
{
|
||||
# start smoke processing
|
||||
me.RSmokeActive = 1;
|
||||
settimer(func { BrakeSys.Rsmoke(); },0);
|
||||
}
|
||||
}
|
||||
|
||||
me.LastSimTime = CurrentTime;
|
||||
# 5 updates per second are good enough
|
||||
settimer(func { BrakeSys.update(); },0.2);
|
||||
},
|
||||
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");
|
||||
|
||||
# smoke processing
|
||||
Lsmoke : func()
|
||||
{
|
||||
if ((me.LSmokeActive)and(getprop("gear/Lbrake-thermal-energy")>1))
|
||||
{
|
||||
# make density of smoke effect depend on energy level
|
||||
var LSmokeDelay=0;
|
||||
var LThermalEnergy = getprop("gear/Lbrake-thermal-energy");
|
||||
if (LThermalEnergy < 1.5)
|
||||
LSmokeDelay=(1.5-LThermalEnergy);
|
||||
# No smoke when gear retracted
|
||||
var LSmokeValue = (getprop("gear/gear[1]/position-norm")>0.5);
|
||||
# toggle smoke to interpolate different densities
|
||||
if (LSmokeDelay>0.05)
|
||||
{
|
||||
me.LSmokeToggle = !me.LSmokeToggle;
|
||||
if (!me.LSmokeToggle)
|
||||
LSmokeValue = 0;
|
||||
else
|
||||
LSmokeDelay = 0;
|
||||
}
|
||||
setprop("gear/Lbrake-smoke",LSmokeValue);
|
||||
settimer(func { BrakeSys.Lsmoke(); },LSmokeDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
# stop smoke processing
|
||||
setprop("gear/Lbrake-smoke",0);
|
||||
setprop("sim/animation/fire-services",0);
|
||||
me.LSmokeActive = 0;
|
||||
}
|
||||
if (getprop("gear/Lbrake-thermal-energy") > 1.5)
|
||||
setprop("sim/animation/fire-services",1);
|
||||
else
|
||||
setprop("sim/animation/fire-services",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"));
|
||||
setprop("gear/gear[2]/R3brake-temp-degc",tatdegc+getprop("gear/gear[2]/R3error-temp-degc"));
|
||||
setprop("gear/gear[2]/R4brake-temp-degc",tatdegc+getprop("gear/gear[2]/R4error-temp-degc"));
|
||||
|
||||
# smoke processing
|
||||
Rsmoke : func()
|
||||
{
|
||||
if ((me.RSmokeActive)and(getprop("gear/Rbrake-thermal-energy")>1))
|
||||
{
|
||||
# make density of smoke effect depend on energy level
|
||||
var RSmokeDelay=0;
|
||||
var RThermalEnergy = getprop("gear/Rbrake-thermal-energy");
|
||||
if (RThermalEnergy < 1.5)
|
||||
RSmokeDelay=(1.5-RThermalEnergy);
|
||||
# No smoke when gear retracted
|
||||
var RSmokeValue = (getprop("gear/gear[2]/position-norm")>0.5);
|
||||
# toggle smoke to interpolate different densities
|
||||
if (RSmokeDelay>0.05)
|
||||
{
|
||||
me.RSmokeToggle = !me.RSmokeToggle;
|
||||
if (!me.RSmokeToggle)
|
||||
RSmokeValue = 0;
|
||||
else
|
||||
RSmokeDelay = 0;
|
||||
}
|
||||
setprop("gear/Rbrake-smoke",RSmokeValue);
|
||||
settimer(func { BrakeSys.Rsmoke(); },RSmokeDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
# stop smoke processing
|
||||
setprop("gear/Rbrake-smoke",0);
|
||||
me.RSmokeActive = 0;
|
||||
}
|
||||
if (getprop("gear/Rbrake-thermal-energy") > 1.5)
|
||||
setprop("sim/animation/fire-services",1);
|
||||
else
|
||||
setprop("sim/animation/fire-services",0);
|
||||
},
|
||||
setprop("sim/animation/fire-services",0);
|
||||
me.LastSimTime = 0.0;
|
||||
},
|
||||
|
||||
# update brake energy
|
||||
update : func()
|
||||
{
|
||||
var CurrentTime = getprop("sim/time/elapsed-sec");
|
||||
var dt = CurrentTime - me.LastSimTime;
|
||||
var LThermalEnergy = getprop("gear/gear[1]/Lbrake-thermal-energy");
|
||||
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 L_thrust_lb = getprop("engines/engine[0]/thrust_lb");
|
||||
var R_thrust_lb = getprop("engines/engine[1]/thrust_lb");
|
||||
|
||||
if (dt<1.0)
|
||||
{
|
||||
var OnGround = getprop("gear/gear[1]/wow");
|
||||
#cooling effect: adjust cooling factor by a value proportional to the environment temp (m.CoolingFactor + environment temp-degc * 0.00001)
|
||||
var LCoolingRatio = me.CoolingFactor+(tatdegc*0.000001);
|
||||
var RCoolingRatio = me.CoolingFactor+(tatdegc*0.000001);
|
||||
if (getprop("controls/gear/brake-fans"))
|
||||
{
|
||||
#increase CoolingRatio if Brake Fans are active
|
||||
LCoolingRatio = LCoolingRatio * 3;
|
||||
RCoolingRatio = RCoolingRatio * 3;
|
||||
}
|
||||
if (getprop("gear/gear[1]/position-norm"))
|
||||
{
|
||||
#increase CoolingRatio if gear down according to airspeed
|
||||
LCoolingRatio = LCoolingRatio * getprop("velocities/airspeed-kt");
|
||||
} else {
|
||||
#Reduced CoolingRatio if gear up
|
||||
LCoolingRatio = LCoolingRatio * 0.1;
|
||||
}
|
||||
if (getprop("gear/gear[2]/position-norm"))
|
||||
{
|
||||
#increase CoolingRatio if gear down according to airspeed
|
||||
RCoolingRatio = RCoolingRatio * getprop("velocities/airspeed-kt");
|
||||
} else {
|
||||
#Reduced CoolingRatio if gear up
|
||||
RCoolingRatio = RCoolingRatio * 0.1;
|
||||
}
|
||||
if (LBrakeLevel>0)
|
||||
{
|
||||
#Reduced CoolingRatio if Brakes used
|
||||
LCoolingRatio = LCoolingRatio * 0.1 * LBrakeLevel;
|
||||
}
|
||||
if (RBrakeLevel>0)
|
||||
{
|
||||
#Reduced CoolingRatio if Brakes used
|
||||
RCoolingRatio = RCoolingRatio * 0.1 * RBrakeLevel;
|
||||
}
|
||||
|
||||
var LnCoolFactor = math.ln(1-LCoolingRatio);
|
||||
var RnCoolFactor = math.ln(1-RCoolingRatio);
|
||||
|
||||
L_thrust_lb = math.abs(getprop("engines/engine[0]/thrust_lb"));
|
||||
if (L_thrust_lb < 1)
|
||||
{
|
||||
L_thrust_lb = 1
|
||||
}
|
||||
L_Thrust = math.pow((math.log10(L_thrust_lb)),10)*0.0000000002;
|
||||
|
||||
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;
|
||||
|
||||
if (OnGround)
|
||||
{
|
||||
var V1 = getprop("velocities/groundspeed-kt");
|
||||
var Mass = getprop("fdm/jsbsim/inertia/weight-lbs")*(me.ScalingDivisor);
|
||||
|
||||
# absorb some kinetic energy:
|
||||
# dE= 1/2 * m * V1^2 - 1/2 * m * V2^2)
|
||||
var V2_L = V1 - me.BrakeDecel * dt * LBrakeLevel;
|
||||
var V2_R = V1 - me.BrakeDecel * dt * RBrakeLevel;
|
||||
|
||||
#TODO - Adjust ThermalEnergy according to differential braking
|
||||
#LBrakeLevel-RBrakeLevel
|
||||
|
||||
LThermalEnergy += (Mass * (math.pow(V1, 2) - math.pow(V2_L, 2)) / 2);
|
||||
if (getprop("services/chocks/left"))
|
||||
{
|
||||
if (!getprop("controls/gear/brake-parking"))
|
||||
{
|
||||
# cooling effect: reduce thermal energy by (LnCoolFactor) * dt
|
||||
LThermalEnergy = LThermalEnergy * math.exp(LnCoolFactor * dt);
|
||||
} else {
|
||||
#LThermalEnergy += L_Thrust;
|
||||
# cooling effect: reduce thermal energy by (LnCoolFactor) * dt
|
||||
LThermalEnergy = (LThermalEnergy * math.exp(LnCoolFactor * dt)) + (L_Thrust * dt);
|
||||
}
|
||||
} else {
|
||||
if (!getprop("controls/gear/brake-parking"))
|
||||
{
|
||||
if (LBrakeLevel>0)
|
||||
{
|
||||
if (V2_L>0)
|
||||
{
|
||||
#LThermalEnergy += (Mass * (math.pow(V1, 2) - math.pow(V2_L, 2)) / 2) + L_thrust;
|
||||
# cooling effect: reduce thermal energy by (LnCoolFactor) * dt
|
||||
LThermalEnergy = LThermalEnergy * math.exp(LnCoolFactor * dt);
|
||||
} else {
|
||||
#LThermalEnergy += math.abs(L_Thrust);
|
||||
# cooling effect: reduce thermal energy by (LnCoolFactor) * dt
|
||||
LThermalEnergy = (LThermalEnergy * math.exp(LnCoolFactor * dt)) + (L_Thrust * dt);
|
||||
}
|
||||
} else {
|
||||
# cooling effect: reduce thermal energy by (LnCoolFactor) * dt
|
||||
LThermalEnergy = LThermalEnergy * math.exp(LnCoolFactor * dt);
|
||||
}
|
||||
} else {
|
||||
#LThermalEnergy += math.abs(L_Thrust);
|
||||
# cooling effect: reduce thermal energy by (LnCoolFactor) * dt
|
||||
LThermalEnergy = (LThermalEnergy * math.exp(LnCoolFactor * dt)) + (L_Thrust * dt);
|
||||
}
|
||||
}
|
||||
|
||||
RThermalEnergy += (Mass * (math.pow(V1, 2) - math.pow(V2_R, 2)) / 2);
|
||||
if (getprop("services/chocks/right"))
|
||||
{
|
||||
if (!getprop("controls/gear/brake-parking"))
|
||||
{
|
||||
# cooling effect: reduce thermal energy by (RnCoolFactor) * dt
|
||||
RThermalEnergy = RThermalEnergy * math.exp(RnCoolFactor * dt);
|
||||
} else {
|
||||
#RThermalEnergy += math.abs(R_Thrust);
|
||||
# cooling effect: reduce thermal energy by (RnCoolFactor) * dt
|
||||
RThermalEnergy = (RThermalEnergy * math.exp(RnCoolFactor * dt)) + (R_Thrust * dt);
|
||||
}
|
||||
} else {
|
||||
if (!getprop("controls/gear/brake-parking"))
|
||||
{
|
||||
if (RBrakeLevel>0)
|
||||
{
|
||||
if (V2_R>0)
|
||||
{
|
||||
#RThermalEnergy += (Mass * (math.pow(V1, 2) - math.pow(V2_R, 2)) / 2) + R_thrust;
|
||||
# cooling effect: reduce thermal energy by (RnCoolFactor) * dt
|
||||
RThermalEnergy = RThermalEnergy * math.exp(RnCoolFactor * dt);
|
||||
} else {
|
||||
#RThermalEnergy += math.abs(R_Thrust);
|
||||
# cooling effect: reduce thermal energy by (RnCoolFactor) * dt
|
||||
RThermalEnergy = (RThermalEnergy * math.exp(RnCoolFactor * dt)) + (R_Thrust * dt);
|
||||
}
|
||||
} else {
|
||||
# cooling effect: reduce thermal energy by (RnCoolFactor) * dt
|
||||
RThermalEnergy = RThermalEnergy * math.exp(RnCoolFactor * dt);
|
||||
}
|
||||
} else {
|
||||
#RThermalEnergy += math.abs(R_Thrust);
|
||||
# cooling effect: reduce thermal energy by (RnCoolFactor) * dt
|
||||
RThermalEnergy = (RThermalEnergy * math.exp(RnCoolFactor * dt)) + (R_Thrust * dt);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
LThermalEnergy = LThermalEnergy * math.exp(LnCoolFactor * dt);
|
||||
RThermalEnergy = RThermalEnergy * math.exp(RnCoolFactor * dt);
|
||||
}
|
||||
|
||||
if (LThermalEnergy < 0) {
|
||||
LThermalEnergy = 0
|
||||
}
|
||||
if (LThermalEnergy > 3) {
|
||||
LThermalEnergy = 3
|
||||
}
|
||||
if (RThermalEnergy < 0) {
|
||||
RThermalEnergy = 0
|
||||
}
|
||||
if (RThermalEnergy > 3) {
|
||||
RThermalEnergy = 3
|
||||
}
|
||||
|
||||
setprop("gear/gear[1]/L-Thrust",L_Thrust);
|
||||
setprop("gear/gear[2]/R-Thrust",R_Thrust);
|
||||
setprop("gear/gear[1]/Lbrake-thermal-energy",LThermalEnergy);
|
||||
setprop("gear/gear[2]/Rbrake-thermal-energy",RThermalEnergy);
|
||||
|
||||
#Calculating Brakes temperature
|
||||
setprop("gear/gear[1]/L1brake-temp-degc",tatdegc+getprop("gear/gear[1]/L1error-temp-degc")+(LThermalEnergy * (300-tatdegc-getprop("gear/gear[1]/L1error-temp-degc"))));
|
||||
setprop("gear/gear[1]/L2brake-temp-degc",tatdegc+getprop("gear/gear[1]/L2error-temp-degc")+(LThermalEnergy * (300-tatdegc-getprop("gear/gear[1]/L2error-temp-degc"))));
|
||||
setprop("gear/gear[2]/R3brake-temp-degc",tatdegc+getprop("gear/gear[2]/R3error-temp-degc")+(RThermalEnergy * (300-tatdegc-getprop("gear/gear[2]/R3error-temp-degc"))));
|
||||
setprop("gear/gear[2]/R4brake-temp-degc",tatdegc+getprop("gear/gear[2]/R4error-temp-degc")+(RThermalEnergy * (300-tatdegc-getprop("gear/gear[2]/R4error-temp-degc"))));
|
||||
|
||||
if ((LThermalEnergy>1)and(!me.LSmokeActive))
|
||||
{
|
||||
# start smoke processing
|
||||
me.LSmokeActive = 1;
|
||||
settimer(func { BrakeSys.Lsmoke(); },0);
|
||||
}
|
||||
if ((RThermalEnergy>1)and(!me.RSmokeActive))
|
||||
{
|
||||
# start smoke processing
|
||||
me.RSmokeActive = 1;
|
||||
settimer(func { BrakeSys.Rsmoke(); },0);
|
||||
}
|
||||
}
|
||||
|
||||
me.LastSimTime = CurrentTime;
|
||||
# 5 updates per second are good enough
|
||||
settimer(func { BrakeSys.update(); },0.2);
|
||||
},
|
||||
|
||||
# smoke processing
|
||||
Lsmoke : func()
|
||||
{
|
||||
if ((me.LSmokeActive)and(getprop("gear/gear[1]/Lbrake-thermal-energy")>1))
|
||||
{
|
||||
# make density of smoke effect depend on energy level
|
||||
var LSmokeDelay=0;
|
||||
var LThermalEnergy = getprop("gear/gear[1]/Lbrake-thermal-energy");
|
||||
if (LThermalEnergy < 1.5)
|
||||
LSmokeDelay=(1.5-LThermalEnergy);
|
||||
# No smoke when gear retracted
|
||||
var LSmokeValue = (getprop("gear/gear[1]/position-norm")>0.5);
|
||||
# toggle smoke to interpolate different densities
|
||||
if (LSmokeDelay>0.05)
|
||||
{
|
||||
me.LSmokeToggle = !me.LSmokeToggle;
|
||||
if (!me.LSmokeToggle)
|
||||
LSmokeValue = 0;
|
||||
else
|
||||
LSmokeDelay = 0;
|
||||
}
|
||||
setprop("gear/gear[1]/Lbrake-smoke",LSmokeValue);
|
||||
settimer(func { BrakeSys.Lsmoke(); },LSmokeDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
# stop smoke processing
|
||||
setprop("gear/gear[1]/Lbrake-smoke",0);
|
||||
setprop("sim/animation/fire-services",0);
|
||||
me.LSmokeActive = 0;
|
||||
}
|
||||
if (getprop("gear/gear[1]/Lbrake-thermal-energy") > 1.5)
|
||||
setprop("sim/animation/fire-services",1);
|
||||
else
|
||||
setprop("sim/animation/fire-services",0);
|
||||
},
|
||||
|
||||
# smoke processing
|
||||
Rsmoke : func()
|
||||
{
|
||||
if ((me.RSmokeActive)and(getprop("gear/gear[2]/Rbrake-thermal-energy")>1))
|
||||
{
|
||||
# make density of smoke effect depend on energy level
|
||||
var RSmokeDelay=0;
|
||||
var RThermalEnergy = getprop("gear/gear[2]/Rbrake-thermal-energy");
|
||||
if (RThermalEnergy < 1.5)
|
||||
RSmokeDelay=(1.5-RThermalEnergy);
|
||||
# No smoke when gear retracted
|
||||
var RSmokeValue = (getprop("gear/gear[2]/position-norm")>0.5);
|
||||
# toggle smoke to interpolate different densities
|
||||
if (RSmokeDelay>0.05)
|
||||
{
|
||||
me.RSmokeToggle = !me.RSmokeToggle;
|
||||
if (!me.RSmokeToggle)
|
||||
RSmokeValue = 0;
|
||||
else
|
||||
RSmokeDelay = 0;
|
||||
}
|
||||
setprop("gear/gear[2]/Rbrake-smoke",RSmokeValue);
|
||||
settimer(func { BrakeSys.Rsmoke(); },RSmokeDelay);
|
||||
}
|
||||
else
|
||||
{
|
||||
# stop smoke processing
|
||||
setprop("gear/gear[2]/Rbrake-smoke",0);
|
||||
me.RSmokeActive = 0;
|
||||
}
|
||||
if (getprop("gear/gear[2]/Rbrake-thermal-energy") > 1.5)
|
||||
setprop("sim/animation/fire-services",1);
|
||||
else
|
||||
setprop("sim/animation/fire-services",0);
|
||||
},
|
||||
};
|
||||
|
||||
var BrakeSys = BrakeSystem.new();
|
||||
|
||||
setlistener("sim/signals/fdm-initialized",
|
||||
# executed on _every_ FDM reset (but not installing new listeners)
|
||||
func(idle) { BrakeSys.reset(); },
|
||||
0,0);
|
||||
# executed on _every_ FDM reset (but not installing new listeners)
|
||||
func(idle) { BrakeSys.reset(); },
|
||||
0,0);
|
||||
|
||||
settimer(func()
|
||||
{
|
||||
BrakeSys.update();
|
||||
}, 5);
|
||||
{
|
||||
BrakeSys.update();
|
||||
}, 5);
|
||||
|
|
Loading…
Reference in a new issue