Major improvements, oil simulated, acconfig, lower ecam, etc
This commit is contained in:
parent
88bebf1c7f
commit
e2e42611f2
10 changed files with 465 additions and 263 deletions
|
@ -948,7 +948,12 @@
|
|||
<apu>
|
||||
<oil>
|
||||
<level-l type="double">5.4</level-l>
|
||||
<allow-oil-consumption type="bool">1</allow-oil-consumption>
|
||||
<oil-pressure-psi type="double">0</oil-pressure-psi>
|
||||
<oil-temperature-degC type="double">0</oil-temperature-degC>
|
||||
</oil>
|
||||
<bleed-load-kw type="double">252</bleed-load-kw>
|
||||
<electrical-load-kw type="double">132</electrical-load-kw>
|
||||
<available type="bool">0</available>
|
||||
<dc-bat-three-minutes type="bool">0</dc-bat-three-minutes>
|
||||
<start type="bool">0</start>
|
||||
|
|
|
@ -94,6 +94,7 @@ setprop("systems/acconfig/options/keyboard-mode", 0);
|
|||
# TODO Revert default weight-kgs to 1, when fully implemented
|
||||
setprop("systems/acconfig/options/weight-kgs", 0);
|
||||
setprop("systems/acconfig/options/adirs-skip", 0);
|
||||
setprop("systems/acconfig/options/allow-oil-consumption", 0);
|
||||
setprop("systems/acconfig/options/welcome-skip", 0);
|
||||
setprop("systems/acconfig/options/no-rendering-warn", 0);
|
||||
setprop("systems/acconfig/options/save-state", 0);
|
||||
|
@ -234,6 +235,7 @@ var readSettings = func {
|
|||
setprop("options/system/weight-kgs", getprop("systems/acconfig/options/weight-kgs"));
|
||||
setprop("options/system/save-state", getprop("systems/acconfig/options/save-state"));
|
||||
setprop("controls/adirs/skip", getprop("systems/acconfig/options/adirs-skip"));
|
||||
setprop("systems/apu/oil/allow-oil-consumption", getprop("systems/acconfig/options/allow-oil-consumption"));
|
||||
setprop("sim/model/autopush/route/show", getprop("systems/acconfig/options/autopush/show-route"));
|
||||
setprop("sim/model/autopush/route/show-wingtip", getprop("systems/acconfig/options/autopush/show-wingtip"));
|
||||
|
||||
|
@ -244,6 +246,7 @@ var writeSettings = func {
|
|||
setprop("systems/acconfig/options/weight-kgs", getprop("options/system/weight-kgs"));
|
||||
setprop("systems/acconfig/options/save-state", getprop("options/system/save-state"));
|
||||
setprop("systems/acconfig/options/adirs-skip", getprop("controls/adirs/skip"));
|
||||
setprop("systems/acconfig/options/allow-oil-consumption", getprop("systems/apu/oil/allow-oil-consumption"));
|
||||
setprop("systems/acconfig/options/autopush/show-route", getprop("sim/model/autopush/route/show"));
|
||||
setprop("systems/acconfig/options/autopush/show-wingtip", getprop("sim/model/autopush/route/show-wingtip"));
|
||||
io.write_properties(getprop("sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options");
|
||||
|
@ -347,7 +350,7 @@ var beforestart = func {
|
|||
props.globals.getNode("controls/electrical/switches/bat-1").setValue(1);
|
||||
props.globals.getNode("controls/electrical/switches/bat-2").setValue(1);
|
||||
setprop("controls/apu/master", 1);
|
||||
systems.APUController.APU.startCommand();
|
||||
systems.APUController.APU.startCommand(1);
|
||||
var apu_rpm_chk = setlistener("/engines/engine[2]/n1", func {
|
||||
if (getprop("engines/engine[2]/n1") >= 98) {
|
||||
removelistener(apu_rpm_chk);
|
||||
|
|
|
@ -6,167 +6,208 @@
|
|||
|
||||
<PropertyList>
|
||||
|
||||
<name>ground-services</name>
|
||||
<layout>vbox</layout>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Ground Services</label>
|
||||
</text>
|
||||
<button>
|
||||
<halign>right</halign>
|
||||
<pref-width>20</pref-width>
|
||||
<pref-height>20</pref-height>
|
||||
<legend>X</legend>
|
||||
<key>Esc</key>
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<group>
|
||||
<layout>vbox</layout>
|
||||
<name>ground-services</name>
|
||||
<layout>vbox</layout>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Ground Services</label>
|
||||
</text>
|
||||
<button>
|
||||
<halign>right</halign>
|
||||
<pref-width>20</pref-width>
|
||||
<pref-height>20</pref-height>
|
||||
<legend>X</legend>
|
||||
<key>Esc</key>
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
</group>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<group>
|
||||
<layout>vbox</layout>
|
||||
|
||||
<checkbox>
|
||||
<label>Enable De-icing Truck</label>
|
||||
<halign>left</halign>
|
||||
<property>/services/deicing_truck/enable</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
<checkbox>
|
||||
<label>Enable De-icing Truck</label>
|
||||
<halign>left</halign>
|
||||
<property>/services/deicing_truck/enable</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<button>
|
||||
<legend>De-ice Aircraft</legend>
|
||||
<halign>center</halign>
|
||||
<padding>5</padding>
|
||||
<enable>
|
||||
<property>/services/deicing_truck/enable</property>
|
||||
</enable>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>/services/deicing_truck/de-ice</property>
|
||||
<value>1</value>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<hrule />
|
||||
|
||||
<button>
|
||||
<legend>Fuel Truck</legend>
|
||||
<halign>center</halign>
|
||||
<padding>5</padding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
acconfig.fuel_dlg.open();
|
||||
</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<hrule />
|
||||
|
||||
<checkbox>
|
||||
<label>Enable Catering Truck</label>
|
||||
<halign>left</halign>
|
||||
<property>/services/catering/enable</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
<button>
|
||||
<legend>De-ice Aircraft</legend>
|
||||
<halign>center</halign>
|
||||
<padding>5</padding>
|
||||
<enable>
|
||||
<property>/services/deicing_truck/enable</property>
|
||||
</enable>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>/services/deicing_truck/de-ice</property>
|
||||
<value>1</value>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<hrule />
|
||||
|
||||
<button>
|
||||
<legend>Fuel Truck</legend>
|
||||
<halign>center</halign>
|
||||
<padding>5</padding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
acconfig.fuel_dlg.open();
|
||||
</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<hrule />
|
||||
|
||||
<checkbox>
|
||||
<label>Enable Catering Truck</label>
|
||||
<halign>left</halign>
|
||||
<property>/services/catering/enable</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<button>
|
||||
<legend>Toggle Catering</legend>
|
||||
<halign>center</halign>
|
||||
<padding>5</padding>
|
||||
<enable>
|
||||
<property>/services/catering/enable</property>
|
||||
</enable>
|
||||
<binding>
|
||||
<condition>
|
||||
<less-than>
|
||||
<property>/services/catering/position-norm</property>
|
||||
<value>0.1</value>
|
||||
</less-than>
|
||||
</condition><command>property-interpolate</command>
|
||||
<property>/services/catering/position-norm</property>
|
||||
<value>0.68</value>
|
||||
<time>5</time>
|
||||
</binding>
|
||||
<binding>
|
||||
<condition>
|
||||
<greater-than-equals>
|
||||
<property>/services/catering/position-norm</property>
|
||||
<value>0.1</value>
|
||||
</greater-than-equals>
|
||||
</condition><command>property-interpolate</command>
|
||||
<property>/services/catering/position-norm</property>
|
||||
<value>0.0</value>
|
||||
<time>5</time>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<checkbox>
|
||||
<label>Enable Baggage Ramp</label>
|
||||
<halign>left</halign>
|
||||
<property>/services/baggage/enable</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<group>
|
||||
<button>
|
||||
<legend>Toggle Catering</legend>
|
||||
<halign>center</halign>
|
||||
<padding>5</padding>
|
||||
<enable>
|
||||
<property>/services/catering/enable</property>
|
||||
</enable>
|
||||
<binding>
|
||||
<condition>
|
||||
<less-than>
|
||||
<property>/services/catering/position-norm</property>
|
||||
<value>0.1</value>
|
||||
</less-than>
|
||||
</condition><command>property-interpolate</command>
|
||||
<property>/services/catering/position-norm</property>
|
||||
<value>0.68</value>
|
||||
<time>5</time>
|
||||
</binding>
|
||||
<binding>
|
||||
<condition>
|
||||
<greater-than-equals>
|
||||
<property>/services/catering/position-norm</property>
|
||||
<value>0.1</value>
|
||||
</greater-than-equals>
|
||||
</condition><command>property-interpolate</command>
|
||||
<property>/services/catering/position-norm</property>
|
||||
<value>0.0</value>
|
||||
<time>5</time>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<checkbox>
|
||||
<label>Enable Baggage Ramp</label>
|
||||
<halign>left</halign>
|
||||
<property>/services/baggage/enable</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
|
||||
<hrule>
|
||||
<stretch type="bool">true</stretch>
|
||||
</hrule>
|
||||
<text>
|
||||
<label>Stairways</label>
|
||||
</text>
|
||||
<hrule>
|
||||
<stretch type="bool">true</stretch>
|
||||
</hrule>
|
||||
</group>
|
||||
|
||||
<checkbox>
|
||||
<label>Front Left</label>
|
||||
<halign>left</halign>
|
||||
<property>/services/stairs/l1</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Rear Left</label>
|
||||
<halign>left</halign>
|
||||
<property>/services/stairs/l4</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Stairway Cover</label>
|
||||
<halign>left</halign>
|
||||
<property>/services/stairs/cover</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
|
||||
<hrule>
|
||||
<stretch type="bool">true</stretch>
|
||||
</hrule>
|
||||
<text>
|
||||
<label>APU Oil Level</label>
|
||||
</text>
|
||||
<hrule>
|
||||
<stretch type="bool">true</stretch>
|
||||
</hrule>
|
||||
</group>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
|
||||
<hrule>
|
||||
<stretch type="bool">true</stretch>
|
||||
</hrule>
|
||||
<text>
|
||||
<label>Stairways</label>
|
||||
</text>
|
||||
<hrule>
|
||||
<stretch type="bool">true</stretch>
|
||||
</hrule>
|
||||
</group>
|
||||
|
||||
<checkbox>
|
||||
<label>Front Left</label>
|
||||
<halign>left</halign>
|
||||
<property>/services/stairs/l1</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Rear Left</label>
|
||||
<halign>left</halign>
|
||||
<property>/services/stairs/l4</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Stairway Cover</label>
|
||||
<halign>left</halign>
|
||||
<property>/services/stairs/cover</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
</group>
|
||||
|
||||
<slider>
|
||||
<enable>
|
||||
<property>/systems/apu/oil/allow-oil-consumption</property>
|
||||
</enable>
|
||||
<x>10</x>
|
||||
<y>50</y>
|
||||
<width>200</width>
|
||||
<property>/systems/apu/oil/level-l</property>
|
||||
<min>3.9</min>
|
||||
<max>5.4</max>
|
||||
<live>true</live>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
</slider>
|
||||
|
||||
<text>
|
||||
<x>10</x>
|
||||
<y>200</y>
|
||||
<label>8.8 litres</label> <!-- placeholder for width -->
|
||||
<format>%.1f litres</format>
|
||||
<property>/systems/apu/oil/level-l</property>
|
||||
<live>true</live>
|
||||
</text>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
</PropertyList>
|
||||
|
|
|
@ -426,6 +426,26 @@
|
|||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Allow APU Oil Consumption</label>
|
||||
<halign>left</halign>
|
||||
<property>/systems/apu/oil/allow-oil-consumption</property>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
<property>/systems/apu/oil/allow-oil-consumption</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
acconfig.writeSettings();
|
||||
</script>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<!-- TODO there might be a better way to formulate this. -->
|
||||
|
|
|
@ -596,7 +596,7 @@ var canvas_lowerECAM_apu = {
|
|||
return m;
|
||||
},
|
||||
getKeys: func() {
|
||||
return ["TAT","SAT","GW","UTCh","UTCm","GW-weight-unit","APUN-needle","APUEGT-needle","APUN","APUEGT","APUAvail","APUFlapOpen","APUBleedValve","APUBleedOnline","APUGenOnline","APUGentext","APUGenLoad","APUGenbox","APUGenVolt","APUGenHz","APUBleedPSI","APUfuelLO",
|
||||
return ["TAT","SAT","GW","UTCh","UTCm","GW-weight-unit","APUN-needle","APUEGT-needle","APUN","APUEGT","APUAvail","APUFlapOpen","APUBleedValve","APUBleedOnline","APUGenOnline","APUGentext","APUGenLoad","APUGenbox","APUGenVolt","APUGenHz","APUBleedPSI","APUfuelLO","APU-low-oil",
|
||||
"text3724","text3728","text3732"];
|
||||
},
|
||||
update: func() {
|
||||
|
@ -669,7 +669,7 @@ var canvas_lowerECAM_apu = {
|
|||
me["APUGenHz"].setText(sprintf("%s", math.round(apu_hz.getValue())));
|
||||
|
||||
# APU Bleed
|
||||
if (ir2_knob.getValue() != 0 and (apu_master.getValue() == 1 or bleedapu.getValue() > 0)) {
|
||||
if (systems.ADIRSnew.Operating.adr[0].getValue() and (apu_master.getValue() == 1 or bleedapu.getValue() > 0)) {
|
||||
me["APUBleedPSI"].setColor(0.0509,0.7529,0.2941);
|
||||
me["APUBleedPSI"].setText(sprintf("%s", math.round(bleedapu.getValue())));
|
||||
} else {
|
||||
|
@ -705,6 +705,12 @@ var canvas_lowerECAM_apu = {
|
|||
me["APUN-needle"].setRotation((apu_rpm_rot.getValue() + 90) * D2R);
|
||||
me["APUEGT-needle"].setRotation((apu_egt_rot.getValue() + 90) * D2R);
|
||||
|
||||
if (systems.APUNodes.Oil.level.getValue() < 3.69 and apu_rpm.getValue() < 94.9 and gear0_wow.getValue()) {
|
||||
me["APU-low-oil"].show();
|
||||
} else {
|
||||
me["APU-low-oil"].hide();
|
||||
}
|
||||
|
||||
me.updateBottomStatus();
|
||||
},
|
||||
};
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
inkscape:version="0.91 r13725"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="apu.svg">
|
||||
<metadata
|
||||
id="metadata375">
|
||||
|
@ -37,14 +37,14 @@
|
|||
guidetolerance="10"
|
||||
inkscape:pageopacity="1"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1030"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="705"
|
||||
id="namedview371"
|
||||
showgrid="true"
|
||||
inkscape:zoom="0.94"
|
||||
inkscape:cx="702.20847"
|
||||
inkscape:cy="116.68691"
|
||||
inkscape:window-x="1592"
|
||||
inkscape:zoom="0.76543687"
|
||||
inkscape:cx="663.42185"
|
||||
inkscape:cy="457.30228"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2">
|
||||
|
@ -81,8 +81,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"
|
||||
|
@ -93,8 +92,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"
|
||||
|
@ -105,8 +103,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="GW-weight-unit"
|
||||
sodipodi:linespacing="0%"><tspan
|
||||
id="GW-weight-unit"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3726-1-4-5-7-7"
|
||||
x="940.17981"
|
||||
|
@ -117,8 +114,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"
|
||||
|
@ -129,8 +125,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"
|
||||
|
@ -141,8 +136,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"
|
||||
|
@ -154,8 +148,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"
|
||||
|
@ -167,8 +160,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"
|
||||
|
@ -180,15 +172,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"
|
||||
|
@ -200,7 +190,6 @@
|
|||
id="tspan4172"
|
||||
sodipodi:role="line">°C</tspan></text>
|
||||
<text
|
||||
sodipodi:linespacing="0%"
|
||||
inkscape:label="#text5149"
|
||||
id="UTCh"
|
||||
y="976.25214"
|
||||
|
@ -218,8 +207,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"
|
||||
|
@ -652,13 +640,13 @@
|
|||
<text
|
||||
xml:space="preserve"
|
||||
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="582.35168"
|
||||
y="618.75146"
|
||||
x="580.4906"
|
||||
y="637.36829"
|
||||
id="APUFlapOpen"
|
||||
inkscape:label="#text5149"><tspan
|
||||
sodipodi:role="line"
|
||||
x="582.35168"
|
||||
y="618.75146"
|
||||
x="580.4906"
|
||||
y="637.36829"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#0dc04b"
|
||||
id="tspan5227-3-2">FLAP OPEN</tspan></text>
|
||||
<text
|
||||
|
@ -757,4 +745,21 @@
|
|||
inkscape:transform-center-y="-3.4535777"
|
||||
transform="matrix(1.0702291,0,0,0.97557219,-0.2069507,6.7326558)" />
|
||||
</g>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:12px;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="579.30688"
|
||||
y="743.22437"
|
||||
id="APU-low-oil"
|
||||
inkscape:label="#text4237"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4239-5"
|
||||
x="579.30688"
|
||||
y="743.22437"
|
||||
style="font-size:48px;line-height:1.25;fill:#bb6100;fill-opacity:1;stroke-width:1px">LOW OIL</tspan><tspan
|
||||
sodipodi:role="line"
|
||||
x="579.30688"
|
||||
y="803.22437"
|
||||
style="font-size:48px;line-height:1.25;fill:#bb6100;fill-opacity:1;stroke-width:1px"
|
||||
id="tspan953">LEVEL</tspan></text>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
@ -243,6 +243,7 @@ var systemsLoop = maketimer(0.1, func {
|
|||
rmp.rmpUpdate();
|
||||
fcu.FCUController.loop();
|
||||
dmc.DMController.loop();
|
||||
systems.APUController.loop();
|
||||
|
||||
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))) {
|
||||
setprop("controls/electrical/ground-cart", 0);
|
||||
|
|
|
@ -11,6 +11,8 @@ var APUNodes = {
|
|||
},
|
||||
Oil: {
|
||||
level: props.globals.getNode("systems/apu/oil/level-l"),
|
||||
pressure: props.globals.getNode("systems/apu/oil/oil-pressure-psi"),
|
||||
temperature: props.globals.getNode("systems/apu/oil/oil-temperature-degC"),
|
||||
},
|
||||
masterElecThreeMin: props.globals.getNode("systems/apu/dc-bat-three-minutes"),
|
||||
};
|
||||
|
@ -89,7 +91,7 @@ var APU = {
|
|||
me.checkOil();
|
||||
me.listenSignals = 1;
|
||||
settimer(func() {
|
||||
if (APUNodes.Controls.master.getValue()) {
|
||||
if (APUNodes.Controls.master.getValue() and !getprop("systems/acconfig/autoconfig-running")) {
|
||||
me.setState(2);
|
||||
}
|
||||
}, 3);
|
||||
|
@ -208,11 +210,12 @@ var APU = {
|
|||
checkApuStartTimer.stop();
|
||||
apuStartTimer.stop();
|
||||
apuStartTimer2.stop();
|
||||
apuStartTimer3.stop();
|
||||
cooldownTimer.stop();
|
||||
me.stopAPU();
|
||||
me.setState(7);
|
||||
shutdownTimer.start();
|
||||
me.signals.autoshutdown = 1;
|
||||
me.signals.fault = 1;
|
||||
}
|
||||
},
|
||||
emergencyStop: func() {
|
||||
|
@ -220,6 +223,7 @@ var APU = {
|
|||
checkApuStartTimer.stop();
|
||||
me.inletFlap.close();
|
||||
me.fuelValveCmd.setValue(0);
|
||||
me.signals.autoshutdown = 1;
|
||||
me.signals.fault = 1;
|
||||
me.setState(0);
|
||||
} elsif (me.state >= 4) {
|
||||
|
@ -236,6 +240,11 @@ var APU = {
|
|||
APUNodes.Controls.bleed.setValue(0);
|
||||
me.bleedTime.setValue(pts.Sim.Time.elapsedSec.getValue());
|
||||
},
|
||||
update: func() {
|
||||
if (me.state == 5 and APUNodes.Oil.pressure.getValue() < 35 or APUNodes.Oil.temperature.getValue() > 135) {
|
||||
me.autoStop();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
var APUController = {
|
||||
|
@ -244,8 +253,14 @@ var APUController = {
|
|||
init: func() {
|
||||
if (!me._init) {
|
||||
me.APU = APU.new();
|
||||
me._init = 1;
|
||||
}
|
||||
},
|
||||
loop: func() {
|
||||
if (me._init) {
|
||||
me.APU.update();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var _masterTime = 0;
|
||||
|
|
|
@ -25,6 +25,8 @@ var default = [
|
|||
"/consumables/fuel/tank[2]/level-lbs",
|
||||
"/consumables/fuel/tank[3]/level-lbs",
|
||||
"/consumables/fuel/tank[4]/level-lbs",
|
||||
# apu oil
|
||||
"/systems/apu/oil/level-l",
|
||||
# CONTROLS
|
||||
# rmp
|
||||
"/controls/radio/rmp[0]/on",
|
||||
|
|
|
@ -4,80 +4,184 @@
|
|||
|
||||
<system name="A320: APU">
|
||||
|
||||
<channel name="Inlet Flap">
|
||||
<!-- 100% RPM = 49300 -->
|
||||
<channel name="APU">
|
||||
<!-- bleed 1.8 kg / sec @ 42 psig -->
|
||||
<!-- fuel 148 kg/hr -->
|
||||
<!-- 0% 427°C (800°F)
|
||||
10% 788°C (1450°F)
|
||||
20% 899°C (1650°F)
|
||||
30% 899°C (1650°F)
|
||||
50% 853°C (1567°F)
|
||||
80% 788°C (1450°F)
|
||||
100% 670°C (1238°F) (start)
|
||||
100% 722°C (1332°F) -->
|
||||
<!-- oil psi min 35, normal 50 - 60 -->
|
||||
<!-- oil temp 135 max, 185 @ generator -->
|
||||
<!-- generator 24034 rpm, 10129 rpm fuel ctl, 32045 rpm starter, 51965 rpm cooling, 4137rpm oil pump -->
|
||||
<!-- power 400kw, 132 elec, 252 pneumatic -->
|
||||
<!-- generator 24034 rpm, 10129 rpm fuel ctl, 32045 rpm starter, 51965 rpm cooling, 4137rpm oil pump -->
|
||||
|
||||
<fcs_function name="/systems/apu/bleed-load-kw">
|
||||
<function>
|
||||
<ifthen>
|
||||
<eq>
|
||||
<property>/controls/pneumatic/switches/bleedapu</property>
|
||||
<value>1</value>
|
||||
</eq>
|
||||
<value>252</value>
|
||||
<value>0</value>
|
||||
</ifthen>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
|
||||
<fcs_function name="/systems/apu/electrical-load-kw">
|
||||
<function>
|
||||
<ifthen>
|
||||
<gt>
|
||||
<property>/systems/electrical/relay/apu-glc/output</property>
|
||||
<value>110</value>
|
||||
</gt>
|
||||
<value>132</value>
|
||||
<value>0</value>
|
||||
</ifthen>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/systems/apu/apu-load-cmd">
|
||||
<function>
|
||||
<quotient>
|
||||
<sum>
|
||||
<property>/systems/apu/electrical-load-kw</property>
|
||||
<property>/systems/apu/bleed-load-kw</property>
|
||||
</sum>
|
||||
<value>400</value>
|
||||
</quotient>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<actuator name="/systems/apu/apu-load">
|
||||
<input>/systems/apu/apu-load-cmd</input>
|
||||
<rate_limit>0.01</rate_limit> <!-- 60 seconds cooling period for bleed which is ~ 60% -->
|
||||
</actuator>
|
||||
|
||||
<washout_filter name="/systems/apu/dn-dt">
|
||||
<input>/engines/engine[2]/n1</input>
|
||||
<c1>1</c1>
|
||||
</washout_filter>
|
||||
|
||||
<fcs_function name="/systems/apu/egt-degC">
|
||||
<function>
|
||||
<ifthen>
|
||||
<or>
|
||||
<lt>
|
||||
<property>/engines/engine[2]/n1</property>
|
||||
<value>0.5</value>
|
||||
</lt>
|
||||
<gt>
|
||||
<property>/systems/apu/dn-dt</property>
|
||||
<value>0</value>
|
||||
</gt>
|
||||
</or>
|
||||
<table>
|
||||
<independentVar lookup="row">/engines/engine[2]/n1</independentVar>
|
||||
<tableData>
|
||||
5.0 20.0
|
||||
8.0 45.0
|
||||
10.0 120.0
|
||||
12.0 225.0
|
||||
18.0 430.0
|
||||
25.0 500.0
|
||||
27.0 560.0
|
||||
30.0 720.0
|
||||
35.0 785.0
|
||||
40.0 800.0
|
||||
45.0 795.0
|
||||
50.0 785.0
|
||||
60.0 755.0
|
||||
75.0 645.0
|
||||
90.0 520.0
|
||||
100.0 415.0
|
||||
</tableData>
|
||||
</table>
|
||||
<table>
|
||||
<independentVar lookup="row">/engines/engine[2]/n1</independentVar>
|
||||
<tableData>
|
||||
2.0 200.0
|
||||
8.0 220.0
|
||||
12.0 225.0
|
||||
18.0 240.0
|
||||
30.0 250.0
|
||||
50.0 265.0
|
||||
60.0 295.0
|
||||
75.0 380.0
|
||||
90.0 410.0
|
||||
100.0 415.0
|
||||
</tableData>
|
||||
</table>
|
||||
</ifthen>
|
||||
<sum>
|
||||
<product>
|
||||
<property>/systems/apu/apu-load</property>
|
||||
<value>50</value>
|
||||
</product>
|
||||
<ifthen>
|
||||
<or>
|
||||
<lt>
|
||||
<property>/engines/engine[2]/n1</property>
|
||||
<value>0.5</value>
|
||||
</lt>
|
||||
<gt>
|
||||
<property>/systems/apu/dn-dt</property>
|
||||
<value>0</value>
|
||||
</gt>
|
||||
</or>
|
||||
<table>
|
||||
<independentVar lookup="row">/engines/engine[2]/n1</independentVar>
|
||||
<tableData>
|
||||
5.0 20.0
|
||||
8.0 45.0
|
||||
10.0 120.0
|
||||
12.0 225.0
|
||||
18.0 430.0
|
||||
25.0 500.0
|
||||
27.0 560.0
|
||||
30.0 720.0
|
||||
35.0 785.0
|
||||
40.0 800.0
|
||||
45.0 795.0
|
||||
50.0 785.0
|
||||
60.0 755.0
|
||||
75.0 645.0
|
||||
90.0 520.0
|
||||
100.0 415.0
|
||||
</tableData>
|
||||
</table>
|
||||
<table>
|
||||
<independentVar lookup="row">/engines/engine[2]/n1</independentVar>
|
||||
<tableData>
|
||||
2.0 200.0
|
||||
8.0 220.0
|
||||
12.0 225.0
|
||||
18.0 240.0
|
||||
30.0 250.0
|
||||
50.0 265.0
|
||||
60.0 295.0
|
||||
75.0 380.0
|
||||
90.0 410.0
|
||||
100.0 415.0
|
||||
</tableData>
|
||||
</table>
|
||||
</ifthen>
|
||||
</sum>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/systems/apu/oil/oil-pressure-psi">
|
||||
<function>
|
||||
<table>
|
||||
<independentVar lookup="row">/engines/engine[2]/n1</independentVar>
|
||||
<independentVar lookup="column">/systems/apu/oil/level-l</independentVar>
|
||||
<tableData>
|
||||
0 3.6 5.4
|
||||
8 0 0 0
|
||||
12 0 1 10
|
||||
18 0 5 22
|
||||
30 0 22 41
|
||||
50 0 25 45
|
||||
60 0 28 48
|
||||
75 0 33 52
|
||||
90 0 35 54
|
||||
100 0 36 55
|
||||
</tableData>
|
||||
</table>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<washout_filter name="/systems/apu/dn-dt">
|
||||
<input>/engines/engine[2]/n1</input>
|
||||
<c1>1</c1>
|
||||
</washout_filter>
|
||||
<fcs_function name="/systems/apu/oil/oil-temperature-degC">
|
||||
<function>
|
||||
<product>
|
||||
<sum>
|
||||
<value>1.0</value> <!-- tune -->
|
||||
<product>
|
||||
<property>/systems/apu/apu-load</property>
|
||||
<value>0.3</value>
|
||||
</product>
|
||||
</sum>
|
||||
<table>
|
||||
<independentVar lookup="row">/systems/apu/oil/oil-pressure-psi</independentVar>
|
||||
<tableData>
|
||||
0 0
|
||||
25 135
|
||||
35 105
|
||||
55 85
|
||||
</tableData>
|
||||
</table>
|
||||
<quotient>
|
||||
<property>/engines/engine[2]/n1</property>
|
||||
<value>100</value>
|
||||
</quotient>
|
||||
</product>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="/systems/apu/oil/calc-oil-level">
|
||||
<function>
|
||||
<sum>
|
||||
<property>/systems/apu/oil/level-l</property>
|
||||
<product>
|
||||
<quotient>
|
||||
<property>/engines/engine[2]/n1</property>
|
||||
<value>100</value>
|
||||
</quotient>
|
||||
<property>/systems/apu/oil/allow-oil-consumption</property>
|
||||
<value>-0.00000131437</value>
|
||||
<property>simulation/channel-dt</property>
|
||||
</product>
|
||||
</sum>
|
||||
</function>
|
||||
<output>/systems/apu/oil/level-l</output>
|
||||
</fcs_function>
|
||||
</channel>
|
||||
|
||||
</system>
|
||||
|
|
Loading…
Reference in a new issue