2003-01-25 22:12:08 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<PropertyList>
|
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<name>system-failures</name>
|
|
|
|
<modal>false</modal>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
|
|
|
|
<nasal>
|
|
|
|
<open>
|
|
|
|
# Code to populate the engine entries.
|
|
|
|
var groups = cmdarg().getChildren("group");
|
2010-12-27 20:19:31 +00:00
|
|
|
var group = groups[1].getChildren("group")[2];
|
2009-02-12 20:24:06 +00:00
|
|
|
var engines = props.globals.getNode("/engines");
|
|
|
|
var row = 4;
|
|
|
|
var engine = 0;
|
|
|
|
var i = 0;
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
group.removeChildren("checkbox");
|
|
|
|
group.removeChildren("input");
|
|
|
|
group.removeChildren("text");
|
|
|
|
|
|
|
|
# Copy in the labels.
|
|
|
|
var target = group.getNode("text[" ~ i ~ "]", 1);
|
|
|
|
props.copy(group.getNode("engine-label"), target);
|
|
|
|
i += 1;
|
|
|
|
|
|
|
|
target = group.getNode("text[" ~ i ~ "]", 1);
|
|
|
|
props.copy(group.getNode("mtbf-label"), target);
|
|
|
|
i += 1;
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
foreach (var e; engines.getChildren("engine")) {
|
2014-05-13 18:31:35 +00:00
|
|
|
var starter = e.getChild("starter");
|
|
|
|
var running = e.getChild("running");
|
|
|
|
|
|
|
|
(starter != nil and starter != "" and starter.getType() != "NONE")
|
|
|
|
or (running != nil and running != "" and running.getType() != "NONE")
|
|
|
|
or continue;
|
|
|
|
|
|
|
|
row = row + 1;
|
|
|
|
|
|
|
|
# Set up the label
|
|
|
|
target = group.getNode("text[" ~ i ~ "]", 1);
|
|
|
|
props.copy(group.getNode("text-template"), target);
|
|
|
|
target.getNode("row").setValue(row);
|
|
|
|
|
|
|
|
if (size(engines.getChildren("engine")) == 1) {
|
|
|
|
target.getNode("label").setValue("Engine");
|
|
|
|
} else {
|
|
|
|
# Engines are indexed from 1 in the GUI.
|
|
|
|
target.getNode("label").setValue("Engine " ~ (engine + 1));
|
2009-02-12 20:24:06 +00:00
|
|
|
}
|
2014-05-13 18:31:35 +00:00
|
|
|
|
|
|
|
# Now the checkbox
|
|
|
|
target = group.getNode("checkbox[" ~ i ~ "]", 1);
|
|
|
|
props.copy(group.getChild("checkbox-template"), target);
|
|
|
|
target.getNode("row").setValue(row);
|
|
|
|
|
|
|
|
var failure = "/sim/failure-manager/engines/engine[" ~ engine ~ "]/serviceable";
|
|
|
|
target.getNode("property").setValue(failure);
|
|
|
|
|
|
|
|
# Finally the MTBF
|
|
|
|
target = group.getNode("input[" ~ i ~ "]", 1);
|
|
|
|
props.copy(group.getChild("input-template"), target);
|
|
|
|
target.getNode("row").setValue(row);
|
|
|
|
i += 1;
|
|
|
|
|
|
|
|
var mtbf = "/sim/failure-manager/engines/engine[" ~ engine ~ "]/mtbf";
|
|
|
|
target.getNode("property").setValue(mtbf);
|
|
|
|
engine += 1;
|
2009-02-12 20:24:06 +00:00
|
|
|
}
|
2010-12-27 20:19:31 +00:00
|
|
|
|
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
</open>
|
|
|
|
</nasal>
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
2010-12-27 20:19:31 +00:00
|
|
|
<empty><stretch>1</stretch></empty>
|
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<text>
|
|
|
|
<label>System Failures</label>
|
|
|
|
</text>
|
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<empty><stretch>1</stretch></empty>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<pref-width>16</pref-width>
|
|
|
|
<pref-height>16</pref-height>
|
|
|
|
<legend></legend>
|
|
|
|
<keynum>27</keynum>
|
|
|
|
<border>2</border>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
2009-02-12 20:24:06 +00:00
|
|
|
</group>
|
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<hrule/>
|
|
|
|
|
|
|
|
<text>
|
2009-02-12 20:24:06 +00:00
|
|
|
<halign>left</halign>
|
2010-12-27 20:19:31 +00:00
|
|
|
<label>Uncheck a system to fail it, or set the Mean Time/Cycles Between Failures.</label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<hrule/>
|
2009-02-12 20:24:06 +00:00
|
|
|
|
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<halign>left</halign>
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<layout>table</layout>
|
|
|
|
<halign>center</halign>
|
|
|
|
<valign>top</valign>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<label>System</label>
|
|
|
|
</text>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>2</col>
|
|
|
|
<label>MTBF (sec)</label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>1</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Vacuum System</label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<checkbox>
|
|
|
|
<row>1</row>
|
|
|
|
<col>1</col>
|
2014-05-13 18:31:35 +00:00
|
|
|
<property>/sim/failure-manager/systems/vacuum/serviceable</property>
|
2009-02-12 20:24:06 +00:00
|
|
|
</checkbox>
|
|
|
|
|
|
|
|
<input>
|
|
|
|
<row>1</row>
|
|
|
|
<col>2</col>
|
|
|
|
<property>/sim/failure-manager/systems/vacuum/mtbf</property>
|
|
|
|
</input>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>2</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Static System</label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<checkbox>
|
|
|
|
<row>2</row>
|
|
|
|
<col>1</col>
|
2014-05-13 18:31:35 +00:00
|
|
|
<property>/sim/failure-manager/systems/static/serviceable</property>
|
2009-02-12 20:24:06 +00:00
|
|
|
</checkbox>
|
|
|
|
|
|
|
|
<input>
|
|
|
|
<row>2</row>
|
|
|
|
<col>2</col>
|
|
|
|
<property>/sim/failure-manager/systems/static/mtbf</property>
|
|
|
|
</input>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>3</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Pitot System</label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<checkbox>
|
|
|
|
<row>3</row>
|
|
|
|
<col>1</col>
|
2014-05-13 18:31:35 +00:00
|
|
|
<property>/sim/failure-manager/systems/pitot/serviceable</property>
|
2009-02-12 20:24:06 +00:00
|
|
|
</checkbox>
|
|
|
|
|
|
|
|
<input>
|
|
|
|
<row>3</row>
|
|
|
|
<col>2</col>
|
|
|
|
<property>/sim/failure-manager/systems/pitot/mtbf</property>
|
|
|
|
</input>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>4</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Electrical System</label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<checkbox>
|
|
|
|
<row>4</row>
|
|
|
|
<col>1</col>
|
2014-05-13 18:31:35 +00:00
|
|
|
<property>/sim/failure-manager/systems/electrical/serviceable</property>
|
2009-02-12 20:24:06 +00:00
|
|
|
</checkbox>
|
|
|
|
|
|
|
|
<input>
|
|
|
|
<row>4</row>
|
|
|
|
<col>2</col>
|
|
|
|
<property>/sim/failure-manager/systems/electrical/mtbf</property>
|
|
|
|
</input>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>5</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Aileron</label>
|
|
|
|
</text>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<checkbox>
|
|
|
|
<row>5</row>
|
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/failure-manager/controls/flight/aileron/serviceable</property>
|
|
|
|
</checkbox>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<input>
|
|
|
|
<row>5</row>
|
|
|
|
<col>2</col>
|
|
|
|
<property>/sim/failure-manager/controls/flight/aileron/mtbf</property>
|
|
|
|
</input>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<text>
|
|
|
|
<row>6</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Elevator</label>
|
|
|
|
</text>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<checkbox>
|
|
|
|
<row>6</row>
|
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/failure-manager/controls/flight/elevator/serviceable</property>
|
|
|
|
</checkbox>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<input>
|
|
|
|
<row>6</row>
|
|
|
|
<col>2</col>
|
|
|
|
<property>/sim/failure-manager/controls/flight/elevator/mtbf</property>
|
|
|
|
</input>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<text>
|
|
|
|
<row>7</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Rudder</label>
|
|
|
|
</text>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<checkbox>
|
|
|
|
<row>7</row>
|
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/failure-manager/controls/flight/rudder/serviceable</property>
|
|
|
|
</checkbox>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<input>
|
|
|
|
<row>7</row>
|
|
|
|
<col>2</col>
|
|
|
|
<property>/sim/failure-manager/controls/flight/rudder/mtbf</property>
|
|
|
|
</input>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<vrule/>
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<layout>table</layout>
|
|
|
|
<halign>center</halign>
|
|
|
|
<valign>top</valign>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<label>System</label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>2</col>
|
|
|
|
<label>MCBF</label>
|
|
|
|
</text>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<text>
|
|
|
|
<row>1</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Landing Gear</label>
|
|
|
|
</text>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<checkbox>
|
|
|
|
<row>1</row>
|
|
|
|
<col>1</col>
|
2014-05-13 18:31:35 +00:00
|
|
|
<property>/sim/failure-manager/controls/gear/serviceable</property>
|
2009-02-12 20:24:06 +00:00
|
|
|
</checkbox>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<input>
|
|
|
|
<row>1</row>
|
|
|
|
<col>2</col>
|
2014-05-13 18:31:35 +00:00
|
|
|
<property>/sim/failure-manager/controls/gear/mcbf</property>
|
2009-02-12 20:24:06 +00:00
|
|
|
</input>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<text>
|
|
|
|
<row>2</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Flaps</label>
|
|
|
|
</text>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<checkbox>
|
|
|
|
<row>2</row>
|
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/failure-manager/controls/flight/flaps/serviceable</property>
|
|
|
|
</checkbox>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<input>
|
|
|
|
<row>2</row>
|
|
|
|
<col>2</col>
|
|
|
|
<property>/sim/failure-manager/controls/flight/flaps/mcbf</property>
|
|
|
|
</input>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<text>
|
|
|
|
<row>3</row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Speedbrake</label>
|
|
|
|
</text>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<checkbox>
|
|
|
|
<row>3</row>
|
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/failure-manager/controls/flight/speedbrake/serviceable</property>
|
|
|
|
</checkbox>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<input>
|
|
|
|
<row>3</row>
|
|
|
|
<col>2</col>
|
|
|
|
<property>/sim/failure-manager/controls/flight/speedbrake/mcbf</property>
|
|
|
|
</input>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<vrule/>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<group>
|
|
|
|
<layout>table</layout>
|
|
|
|
<halign>center</halign>
|
|
|
|
<valign>top</valign>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<engine-label>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<label>Engine</label>
|
|
|
|
</engine-label>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<mtbf-label>
|
|
|
|
<row>0</row>
|
|
|
|
<col>2</col>
|
|
|
|
<label>MTBF</label>
|
|
|
|
</mtbf-label>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<text-template>
|
|
|
|
<row><!-- template value--></row>
|
|
|
|
<col>0</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label><!-- template value--></label>
|
|
|
|
</text-template>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<checkbox-template>
|
|
|
|
<row><!-- template value--></row>
|
|
|
|
<col>1</col>
|
|
|
|
<property><!-- template value--></property>
|
|
|
|
</checkbox-template>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<input-template>
|
|
|
|
<row><!-- template value--></row>
|
|
|
|
<col>2</col>
|
|
|
|
<property><!-- template value--></property>
|
|
|
|
</input-template>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<hrule/>
|
|
|
|
|
2009-02-12 20:24:06 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<legend>OK</legend>
|
|
|
|
<default>true</default>
|
|
|
|
<equal>true</equal>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<legend>Apply</legend>
|
|
|
|
<equal>true</equal>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button>
|
2014-05-13 18:31:35 +00:00
|
|
|
<legend>Refresh</legend>
|
2009-02-12 20:24:06 +00:00
|
|
|
<equal>true</equal>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-update</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<legend>Cancel</legend>
|
|
|
|
<equal>true</equal>
|
|
|
|
<key>Esc</key>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</group>
|
2003-01-25 22:12:08 +00:00
|
|
|
|
|
|
|
</PropertyList>
|