# Panel XML Properties The `panel.xml` file is a configuration file for the virtual cockpit gauges and glasscockpits that are loaded as part of the instrumentation of an aircraft, and it may also be used to configure certain properties of [Electronic Flightbag](../../../../programming-apis/efb/electronic-flight-bag-api/) apps. In general, most of the elements used in this file are *custom* elements that you define and then retrieved in your gauge [JavaScript](../../../../programming-apis/javascript/javascript/) code, and you can also use some of the elements that the SDK has defined in the JS files included for the Microsoft Flight Simulator 2024 aircraft. {{< callout context="note" title="NOTE" icon="outline/bulb" >}} This file is only used by JavaScript instruments, and is **not** used by [WebAssembly](../../../../programming-apis/wasm/webassembly/) instruments. {{< /callout >}}   This file is well suited to making variations of your glass-cockpit depending on the aircraft that will be using it, although it should be noted that it is absolutely *optional* and many aircraft never have any need for this XML file. It is worth noting that there is only ever **one** `panel.xml` file for any single aircraft, and it can - and usually does - contain data and logic for multiple instruments.   When creating the `panel.xml` file, it should have the following structure: ``` xml ```   All `panel.xml` files must have the `` element at the top level, but the other internal elements to that are all *optional* and will be included or not depending on the requirements for the instruments being defined. {{< callout context="note" title="NOTE" icon="outline/bulb" >}} You can find a full example of a JavaScript instrument that includes use of the `panel.xml` file here - [Simple JavaScript Instrument Example](../../../../programming-apis/javascript/javascript/#example) {{< /callout >}}   It should be noted that in many places you can supply [Simulation Variables](../../../../programming-apis/simvars/simulation-variables/) to be used in the different XML elements and element attributes. These may require "indices" to target a specific aircraft component, and for all Microsoft Flight Simulator 2024 this is supplied using a *name* string, as shown in the accompanying element code examples (for more information please see here: [Using Indexed Parameter Names](../../../../programming-apis/simvars/simulation-variables/#h1)).   Finally, there are additional XML elements and attributes that are common to all SimObject XML files which can be used in the panel XML. These are all related to the modular SimObject [Merge Process](../../modular-simobject-merging/), and can be ignored if the SimObject is not modular. You can find these elements and attributes here: - [Modular SimObject XML Properties](../../modular-simobject-xml-properties/)     ### <PlaneHTMLConfig> This is the top-level container for all the different `panel.xml` sections. All `panel.xml` files *must* have this at the top and everything else goes within the open/close `` tags.     ### <[CUSTOM]> A "custom" element is a special element that can be named as you require - for example, the following would all be valid custom element definitions: ``, `` or ``. The value you then place within the element can be read **as a string** by the JavaScript for the gauge (this includes the values `True` and `False`) using the `parseXMLConfig()` method. Note that you may use the `` element or [Panel XML Logic Elements](panel-xml-logic-elements/) to define the value of the custom element instead of assigning it a fixed value or string. This SimVar can be read on the JavaScript side with a `CompositeLogicXMLElement`, which allows you to use a `getValueAsNumber()` method instead of a string.   Below is an example of an instrument that uses a few custom elements for parsing in the gauge JS file: ``` xml ASVigilus Aux ``` In this example, three custom elements are defined and two of them use the `` sub element to create their value.     ### <Instrument> The instrument element is used to define the values and electric component logic for a virtual cockpit instrument. It has no attributes and can contain the following sub-elements: 1. `` 2. `` 3. `` 4. `` 5. `` 6. `<[CUSTOM]>` Note you can have as many instrument element definitions as you have virtual cockpit gauges in the aircraft.     #### <Name> The name element is where you give the `templateID` as defined in your glass-cockpit main class.     #### <Electric> Inside this element you can define your the logic of the electrical system associated with the virtual cockpit instrument being defined. Usually the electrical behavior of your glass-cockpit is defined by several combinations of switches (**Battery**, **Avionics** and **Breakers**, for example) so you can define a set of SimVars here (using the `` sub-element) that link the instrument to these switches.   This element has no attributes and is a sub-element of ``. Below is an example of an instrument with the electrical system setup: ``` xml AS1000_PFD True True ``` In this example, if either Circuit 28 *or* Circuit 29 is **ON**, then the electrical system for the gauge will be turned on.   It is important to note that you may use many of the [Panel XML Logic Elements](panel-xml-logic-elements/) - like ``, ``, ``, etc... - along with the `` sub element within the `` element to define the conditions under which the electrical system will operate.     #### <AlwaysUpdate> Within the simulation menu settings there is an option to set the refresh rate of glass-cockpit displays. When this element is included and set to *true*, the instrument will use the full refresh rate, regardless of the setting. ``` xml A320_Neo_CDU True ```     #### <SkipValidationAfterInit> Glass-cockpit displays can have five "states", which are (in order): Off, Init, WaitingValidation, On, and Reversionary. Now, some glasscockpits will need user input - for example, a button press - to go from the *Init* stage to the *On* stage, and will be in the intermediate *WaitingValidation* stage until that happens. However, this may not always be the case, and so you can specify this element and set it to *true* to skip directly from *Init* to *On*. ``` xml AS1000_MFD True ```     #### <HighlightBackgroundOpacity> For checklist purposes, parts of the glass-cockpit can be highlighted by reducing the opacity of the rest of the screen around it. For that to happen, you need to include this element and set the opacity level of the background from 0.0 to 1.0. ``` xml AS_EPM 0.3 ```     ### <Annunciations> This element is used to define the list of all messages that can displayed in the warning area of compatible instruments (eg the G1000, an airliners EICAS screen, etc...). This element has no attributes and is a container for one or more `` elements. The following example creates an annunciation "warning" event for when the main bus voltage is equal to or less than 25.5: ``` xml Warning LOW VOLTS 25.5 ```     #### <Annunciation> This is a container element for the logic and text related to a single annunciation. It is a sub-element of ``, has no attributes, and can contain the following sub-elements: 1. `` 2. `` 3. `` You may have multiple `` elements in a file.     #### <Type> This specifies the type of annunciation that is being defined, which can be one of the following: - **Warning** - This is a serious issue that needs resolving - **Caution** - This is a minor issue that you should be aware of and try to resolve - **Advisory** - This is a recommendation that something may be wrong and should be checked The element has no attributes and is a sub-element of ``.     #### <Text> This specifies the text that should be displayed when the annunciation conditions have been met. The element has no attributes and is a sub-element of ``.     ### <VoicesAlerts> This is a container element for the logic related to alerts for those aircraft instruments that support the voice alerting system (for example, the G1000, airliner EICAS screens, etc...). This element has no attributes and is a container for one or more `` elements. The following example creates a voice alert event for when the `STALL WARNING` SimVar is "True": ``` xml Warning PULL UP PULL UP aural_pull_up 1160,2320,4930,120000,1070,2380,4285
-1
```     #### <Alert> This is a sub-element of ``, has no attributes, and can contain the following sub-elements: 1. `` 2. `` 3. `` 4. `` 5. `` You may have multiple `` elements in a file.     #### <Type> This is a sub-element of ``, and has no attributes. It is used to define the type of alert that is being triggered, and can be one of the following: - **Warning**: This is a serious warning that something is wrong. This type usually requires a `` element and a `` element as well. - **Caution**: This is a caution that something may be wrong. This type usually requires a `` element and a `` element as well. - **SoundOnly**: This is an alert that is sound only and doesn't use the `` element nor the `` element. - **Test**: This is a test alert, and is usually accompanied by a `` element.     #### <ShortText> The warning message as a short-form string.     #### <LongText> The warning message as a long-form (more explicit) string.     #### <SoundEvent> This element is used to specify the Wwise Event that should be associated with the alert being created. The event name used here should match the WwiseEvent attribute that has been set in the `` element of the `` container in the [sound.xml](../../../sounds/sound-xml/) file. See the [Avionic Sounds Example](../../../sounds/sound-xml-examples/#h8) for an example of use.     #### <Once> This is a sub-element of ``, and has no attributes. When set to "True" it tells the panel logic that this alert should only be played once, for example: ``` xml SoundOnly aural_taws_system_test_ok 30000 True ```     ### <EngineDisplay> The `` element is a container element that can hold one or more `` and/or `` elements, as well as define `` elements for later use. This container has no attributes and it is used to help with the styling of the instruments that are linked to the operation of the engine, linking the styles to specific values derived from conditions, values or SimVars. This element is mostly used in the G1000, G3000, G3X and G3X Touch displays, but can be applied to most glasscockpits. ``` xml Horizontal FuelPress_Gauge FUEL PSI 0 10 CHT °F ```     ### <Gauge> This is an element that belongs in the `` or `` container element, and you can have multiple of these in the `panel.xml` file. This element has no attributes and can contain the following sub-elements: 1. `` 2. `` 3. `` 4. `<Unit>` 5. `<Minimum>` 6. `<Maximum>` 7. `<Style>` 8. `<Value>` 9. `<Value2>` 10. `<ColorZone>` 11. `<ColorLine>` 12. `<ReferenceBug>` 13. `<RedBlink>` 14. `<GraduationLength>` 15. `<GraduationTextLength>` 16. `<BeginText>` 17. `<EndText>` 18. `<CursorText>` 19. `<CursorText2>`   The `<Gauge>` element is used to customise some of the default glass-cockpit gauges available to developers for inclusion in their own displays. Customisation is done by first selecting the `<Type>` of gauge to be created, then defining the `<Style>` of the gauge, and then finally refining the way the gauge will be displayed using text and other elements. The current value that the gauge will be using for the display is defined using the `<Value>` element (and sometimes the `<Value2>` element too, depending on instrument `<Type>`), which can use many of the [Panel XML Logic Elements](panel-xml-logic-elements/) - like `<And>`, `<Or>`, `<Lower>`, `<GreaterEqual>`, etc... - along with the `<Simvar />` element or [Unique Logic Elements](panel-xml-logic-elements/#unique) to extract the required information from the simulation for the gauge.   The example below shows a full and complex implementation of this element: ``` xml <Gauge> <Type>DoubleVertical</Type> <Style> <Height>70</Height> <TextIncrement>1</TextIncrement> </Style> <ID>Piston_LoadGauge</ID> <Title>LOAD 0 100 5252 550 100 100 0 5252 550 100 100 0 yellow 95 100 green 0 95 20 % ```     #### <Type> This element specifies the type of gauge data being generated and is a sub-element of ``. It has no attributes, and can only contain one of the following defining strings:  
StringDescriptionExample
Circular

Defines a circular instrument with a cursor showing a single value.. The value the instrument cursor will be set to is defined using the logic contained in the the <Value> element. This type can also use the following main elements:

  1. <Title>
  2. <Unit>
  3. <Minimum>
  4. <Maximum>
  5. <ColorZone>
  6. <ColorLine>
  7. <ReferenceBug>
  8. <RedBlink>
  9. <GraduationLength>
  10. <GraduationTextLength>
  11. <BeginText>
  12. <EndText>

It can also use the following <Style> sub-elements:

  1. <ValuePos>
  2. <BeginAngle>
  3. <EndAngle>
  4. <CursorType>
  5. <TextIncrement>
  6. <ForceTextColor>
  7. <FontSize>
Example Of A Circular Instrument
Horizontal

Defines a single horizontal "bar" instrument with a cursor showing a single value. This type can also use the following main elements:

  1. <Title>
  2. <Unit>
  3. <Minimum>
  4. <Maximum>
  5. <ColorZone>
  6. <ColorLine>
  7. <RedBlink>
  8. <GraduationLength>
  9. <GraduationTextLength>
  10. <BeginText>
  11. <EndText>
  12. <CursorText>

It can also use the following <Style> sub-elements:

  1. <ValuePos>
  2. <TextIncrement>
  3. <CursorColor>
  4. <CursorStyle>
  5. <Width>
  6. <ValuePrecision>
  7. <ReverseY>
  8. <StrokeWidth>
  9. <FontSize>

The value the instrument will display is defined using the logic contained in the the <Value> element.

Example Of A Horizontal Instrument
DoubleHorizontal

Defines an instrument with a single horizontal "bars" and a double cursor, each of which can show a different value. The values the instrument will display are defined using the logic contained in the the <Value> element (for the top bar) and the <Value2> element (for the bottom bar). This type can also use the following main elements:

  1. <Title>
  2. <Unit>
  3. <Minimum>
  4. <Maximum>
  5. <ColorZone>
  6. <ColorLine>
  7. <RedBlink>
  8. <GraduationLength>
  9. <GraduationTextLength>
  10. <BeginText>
  11. <EndText>
  12. <CursorText>
  13. <CursorText2>

It can also use the following <Style> sub-elements:

  1. <ValuePos>
  2. <TextIncrement>
  3. <ValuePrecision>
Example Of A Double Horizontal Instrument
Vertical

Defines a single vertical "bar" instrument with a cursor showing a single value. The value the instrument will display is defined using the logic contained in the the <Value> element. This type can also use the following main elements:

  1. <Title>
  2. <Unit>
  3. <Minimum>
  4. <Maximum>
  5. <ColorZone>
  6. <ColorLine>
  7. <RedBlink>
  8. <GraduationLength>
  9. <GraduationTextLength>
  10. <BeginText>
  11. <EndText>

It can also use the following <Style> sub-elements:

  1. <ValuePos>
  2. <CursorColor>
  3. <TextIncrement>
Example Of A Vertical Instrument
DoubleVertical

Defines an instrument with two vertical "bars" and a double cursor, each of which can show a different value. The values the instrument will display are defined using the logic contained in the the <Value> element (for the left bar) and the <Value2> element (for the right bar). This type can also use the following main elements:

  1. <Title>
  2. <Unit>
  3. <Minimum>
  4. <Maximum>
  5. <ColorZone>
  6. <ColorLine>
  7. <RedBlink>
  8. <GraduationLength>
  9. <GraduationTextLength>
  10. <BeginText>
  11. <EndText>

It can also use the following <Style> sub-elements:

  1. <TextIncrement>
  2. <Height>
  3. <ValuePrecision>
Example Of A Double Vertical Instrument
FlapsDefines an instrument that displays the flaps position. This instrument requires a <Value> and you can optionally use the <TakeOff> element to give the position of the T/O indicator, and also give it a <Title> and <ID>.Example Of The Flaps Instrument
FlapsSpeedbrakesDefines an instrument that displays the speed brake status. This instrument requires a <Value> and you can optionally give it an <ID>.Example Of The Flaps Speed Brake Instrument
LongitudeFuelDefines a gauge that is specific to the Longitude family of aircraft, and displayes the left and right fuel tank quantity as well as the total fuel quantity.Example Of The Longitude Fuel Instrument
    #### <ID> This element specifies the ID of the gauge being generated and is a sub-element of ``. If you are using two of the same gauge type, then the ID values should be different so you can differentiate between them. This element has no attributes.     #### <Title> This element is a sub-element of `` and is the title of the instrument, and it will be included as part of the display (when appropriate to the ``). It has no attributes.     #### <Unit> This element is a sub-element of `` and sets the unit that the instrument will use. When supplied (and when appropriate to the ``), this will be displayed along with the instrument. It has no attributes and can be omitted for the following instrument types: 1. [Flaps](#Flaps) 2. [FlapsSpeedbrakes](#FlapsSpeedbrakes) 3. [LongitudeFuel](#LongitudeFuel)     #### <Minimum> This element is a sub-element of `` and sets the minimum value for the instrument display (when appropriate to the ``). It has no attributes and can be omitted for the following instrument types: 1. [Flaps](#Flaps) 2. [FlapsSpeedbrakes](#FlapsSpeedbrakes) 3. [LongitudeFuel](#LongitudeFuel)     #### <Maximum> This element is a sub-element of `` and sets the maximum value for the instrument display (when appropriate to the ``). It has no attributes and can be omitted for the following instrument types: 1. [Flaps](#Flaps) 2. [FlapsSpeedbrakes](#FlapsSpeedbrakes) 3. [LongitudeFuel](#LongitudeFuel)     #### <TakeOff> This element is optional and is used to set the position of the take-off indicator for the "flaps" instrument. It takes a value, in degrees, that shows where the T/O indicator should be positioned, with 0° being to the *right* and increasing values going clockwise. If omitted, the default value will be 10°. Only required when the `` is set to "Flaps".     #### <Style> This element is a sub-element of ``, has no attributes, and is a container for the following style elements that will be used to set certain aspects of the instrument that is being defined: 1. `` 2. `` 3. `` 4. `` 5. `` 6. `` 7. `` 8. `` 9. `` 10. `` 11. `` 12. `` 13. `` 14. `` 15. ``   Note that this element is not obligatory and can be omitted regardless of the type of instrument being defined, however it should *always* be omitted for the following instruments: 1. [Flaps](panel-xml/#Flaps) 2. [FlapsSpeedbrakes](panel-xml/#FlapsSpeedbrakes) 3. [LongitudeFuel](panel-xml/#LongitudeFuel)     ##### <SizePercent> This element is a sub-element of ` green 500 2700 yellow 2501 red 2701 ```     ##### <Position> This is a sub element of the `` element, and has no attributes. It sets the position for the line being defined, which should fall between the values set by the `` and `` elements.     #### <ReferenceBug> This element is a sub-element of ``, and is used to show some kind of reference bug (marker) within the instrument being displayed. The element has no atrributes, and can take the following sub-elements: ` 1600 1900 ```     ##### <Style> This is a sub-element of `` and is used to set the style properties for the element. It takes no value itself, but must have the following sub-element: 1. ``     ##### <Position> This sub-element of `` is used to set the position of the reference bug graphic (within the `` and `` values) for the instrument. You can supply a fixed value here, or instead use the [Panel XML Logic Elements](panel-xml-logic-elements/) to determine the position dynamically based on the simulation.     ##### <DisplayLogic> This sub-element of `` is used to display or hide the reference bug being defined for the instrument. This would normally be done using [Panel XML Logic Elements](panel-xml-logic-elements/) to create an expression that will evaluate to 1 (*true*: the bug is displayed) or 0 (*false*: the bug is hidden).     #### <RedBlink> This element is a sub-element of ``, has no attributes, and defines the parameters which will cause certain parts of the instrument to "blick" or "flash" red/white, indicating a serious issue. The element can use any of the [Panel XML Logic Elements](panel-xml-logic-elements/) to create an expression that resolves to 1 (*true*) or 0 (*false*), and when 1 (or greater than 1), the instrument will blink, as shown in the image below: {{< image-center src="images/5_Content_Config/Instruments/panel_xml_19_blink.gif" alt="Example Of A Gauge With The <RedBlink> Element" >}}   Used by the [Circular](#Circular), [Horizontal](#Horizontal), [DoubleHorizontal](#DoubleHorizontal), [Vertical](#Vertical) and [DoubleVertical](#DoubleVertical) instrument types.     #### <GraduationLength> This element is a sub-element of ``, has no attributes, and defines the distance between graduations on the instrument. The value should be proportional to the `` and ``: for example, if the minimum is 0 and the maximum is 100, a graduation length of 20 will show a graduation mark at 20, 40, 60 and 80. Note that if this element is omitted, then no graduation marks will be shown on the instrument. Used by the [Circular](#Circular), [Horizontal](#Horizontal), [DoubleHorizontal](#DoubleHorizontal), [Vertical](#Vertical) and [DoubleVertical](#DoubleVertical) instrument types.     #### <GraduationTextLength> This element may be present in some legacy aircraft but is not actually parsed by the simulation.     #### <BeginText> This element is a sub-element of ``, has no attributes, and defines some text that will be shown aligned with the beginning of the instrument graduation, as illustrated in the image below for various instrument types (for clarity, we have used the text "Hello" as the begin text, and "World" as the end text): ![An Example Showing Various Instruments With Begin And End Text](images/5_Content_Config/Instruments/panel_xml_21_beginend.png)Used by the [Circular](#Circular), [Horizontal](#Horizontal), [DoubleHorizontal](#DoubleHorizontal), [Vertical](#Vertical) and [DoubleVertical](#DoubleVertical) instrument types.     #### <EndText> This element is a sub-element of ``, has no attributes, and defines some text that will be shown aligned with the ending of the instrument graduation, as illustrated in the image shown for the `` element. Used by the [Circular](#Circular), [Horizontal](#Horizontal), [DoubleHorizontal](#DoubleHorizontal), [Vertical](#Vertical) and [DoubleVertical](#DoubleVertical) instrument types.     #### <CursorText> This element is a sub-element of ``, has no attributes, and is used to define a string that will be drawn over the cursor. There is no limit to the length of this string, but due to the size of the cursor being fixed, we recommend that you only use a single character - for example "L" or "R" - since additional characters will cause the text to overspill the cursor and be unreadable. The image below shows an example: Used by the [Horizontal](#Horizontal), [DoubleHorizontal](#DoubleHorizontal) (defines the top cursor text), and [DoubleVertical](#DoubleVertical) (defines the left cursor text) instrument types.     #### <CursorText2> This element is a sub-element of ``, has no attributes, and is used to define a string that will be drawn over the cursor. There is no limit to the length of this string, but due to the size of the cursor being fixed, we recommend that you only use a single character - for example "L" or "R" - since additional characters will cause the text to overspill the cursor and be unreadable. See `` for an example image. Used by the [DoubleHorizontal](#DoubleHorizontal) (defines the right cursor text) and [DoubleVertical](#DoubleVertical) (defines the bottom cursor text) instrument types.     ### <Text> This element can be used within `` to define text-only instrument that is to be displayed. The text itself is defined using one of the position sub-elements: 1. `` 2. `
` 3. `` The element has the following optional attributes:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |------------|-------------------------------------------------------|------------|----------| | `id` | The unique ID of the text element. | String/Int | No | | `fontsize` | The size of the font to be used for the text element. | Float | No | {{< /table-wrapper >}}   Below is a basic example of a text-only instrument definition: ``` xml
FUEL FLOW
GPH green
``` The above would look like this in the glass-cockpit display: {{< image-center src="images/5_Content_Config/Instruments/panel_xml_1_text.png" alt="Example Of A Text-Only Instrument Display" >}}     #### <Left> This is a sub-element of `` and has no attributes. Text will be displayed on the far left of the area where the parent element is being positioned. In general, the text to be displayed goes within these tags, however if you wish to colour it, you will need to use the sub-element `` for the text and `` for the colour.     ##### <Content> This is a sub-element of ``, `
`, or `` and is only required when you are also including the `` sub-element. Its sole purpose is to hold the text to be displayed (see the above example for ``).     ##### <Color> This is a sub-element of ``, `
`, or `` and using it will also require you to use the `` sub-element. The element takes a colour string which will be used to colour the text being displayed (see the above example for ``). Colours should be [CSS compliant](https://www.w3.org/wiki/CSS/Properties/color/keywords "W3 CSS Colour Compliancy Details"), but note that generally only the following are used: red, yellow, green, white, blue, magenta.     #### <Center> This is a sub-element of `` and has no attributes. Text will be displayed in the center of the area where the parent element is being positioned. In general, the text to be displayed goes within these tags, however if you wish to colour it, you will need to use the sub-element `` for the text and `` for the colour.     #### <Right> This is a sub-element of `` and has no attributes. Text will be displayed on the far right of the area where the parent element is being positioned. In general, the text to be displayed goes within these tags, however if you wish to colour it, you will need to use the sub-element `` for the text and `` for the colour.     ### <ColumnsGroup> This is a container element for the `` sub-element, of which there should always be two. It is used to tell the simulation to display two gauges side by side. Note that this element can be nested within a `` sub-element to create rows of gauges, for example: ``` xml ```     #### <Column> This is a sub-element of the `` container, and is used to specify a gauge that should be displayed beside another one, using the `` element. You must have two of these elements within each `` and the first defines the left gauge, and the second the right. The element can have the following (optional) attribute:  
AttributeDescriptionTypeRequired
width

This is the width of the column expressed as a percentage, where 100% is considered the total width of the <ColumnGroup> the element is within. Note that only the value is given, with no need for the % symbol, eg:

<Column width="50">
StringNo
    ### <Condition> This element defines the condition(s) under which an annunciation or voice alert should be triggered. It is primarily a sub-element of ``, ``, and `` , although it can be used in many other situations (for example, as part of an ``). It has the following optional attribute:  
AttributeDescriptionTypeRequired
Suffix

This adds a specific suffix onto the <Text> element string. The suffix itself can only be:

  1. "L"
  2. "R"
  3. "L-R"

See Using The Suffix Attribute, below, for more information.

StringNo
  It is important to note that you may use many of the [Panel XML Logic Elements](panel-xml-logic-elements/) - like ``, ``, ``, ``, etc... - along with the `` element or [Unique Logic Elements](panel-xml-logic-elements/#unique) within the `` element to define the true/false state which will trigger the condition (or not).   #### Using The Suffix Attribute The `Suffix` attribute can be used in a condition that is being created for an `` element. The way it works is as follows: - Your JS code inherits from the `NavSystem` subclass. - Your XML has conditions for one, two or three of the possible suffix strings. - If one of the conditions is true, then the suffix string is appended onto the `` element string. The following example shows how the XML should be structured when using this attribute: ``` xml Caution PITOT HT ON 1 1 1 ```     ### <Simvar /> This self-closing element is a sub-element of multiple other elements and is used to define a SimVar that should be used by the associated variable or element. It is used by: `<[CUSTOM]>`, ``, and as part of the `` element, and can be nested within other [Panel XML Logic Elements](panel-xml-logic-elements/) to create a complex expression.   This element has the following attributes:  
AttributeDescriptionTypeRequired
name

The name of the SimVar that is being referenced along with any parameters, separated by a colon. You can find a complete list of available SimVars here: Simulation Variables

Below you can find an example of how the attribute is formatted:

name="GENERAL ENG OIL PRESSURE:1"
StringYes
unit

The unit that the SimVar should be using, which should be one of the accepted strings listed here: Simulation Variable Units

For example:

unit="psi"
StringYes
    ### <Gamevar /> This self-closing element is a sub-element of multiple other elements and is used to define a Game Variable that should be used by the associated variable or element. It is used by: `<[CUSTOM]>`, ``, and as part of the `` element, and can be nested within other [Panel XML Logic Elements](panel-xml-logic-elements/) to create a complex expression. {{< callout context="caution" title="IMPORTANT!" icon="outline/alert-triangle" >}} This is an obsolete tag and **should not be used**. You should be using the `` element instead. {{< /callout >}}   This element has the following attributes:  
AttributeDescriptionTypeRequired
name

The name of the Game Variable that is being referenced along with any parameters, separated by a colon.

Below you can find an example of how the attribute is formatted:

name="GENERAL ENG OIL PRESSURE:1"
StringYes
unit

The unit that the Game Variable should be using, which should be one of the accepted strings listed here: Simulation Variable Units

For example:

unit="psi"
StringYes
    ### <Constant> This element is used to hold a single constant value and is used as part of the expression being evaluated within the following elements: 1. `<[CUSTOM]>` 2. `` 3. ``   It can also be nested within other [Panel XML Logic Elements](panel-xml-logic-elements/) to create a complex expression.     ### <EFB> This top level element is used to setup certain properties of the aircraft within the {{< glossterm >}}efb{{< /glossterm >}}. Currently this section is used exclusively for customising the layout of the aircraft within the Mass And Balance menu of the aircraft app. Future updates may add more possibilities and sections.   A typical {{< glossterm >}}efb{{< /glossterm >}} definition in the panel XML looks something like this: ``` xml ```   This element can have the following container sub-element: 1. `` 2. ``     #### <MassAndBalance> This is a sub-element of `` and is a container for the other element that will affect the mass and balance of the aircraft. Currently you can only have *one* of these containers defined for the EFB. Note that this is not a required element, and if omitted the aircraft size will be deduced from the aircraft *wingspan*.   The element has the following required attribute:  
AttributeDescriptionTypeRequired
aircraft-size

This is used to define the "size" of the aircraft, which can be either "Small", "Medium", or "Large". It is used to set the zoom level of the aircraft outline displayed in the Mass and Balance menu in the EFB. The smaller the aircraft is, the more the shape will be zoomed in:

The Different Aircraft Sizes In The EFB Display

For informationon how to create the aircraft outline used in the Mass and Balance section of the EFB, please see here: The Aircraft Capture Tool

StringYes
  This element can have the following sub-elements: 1. `` 2. `` 3. ``     #### <Electrical> This is a sub-element of `` and is a container element for the different electrical components that will be displayed as part of the electrical system for the aircraft. It has no attributes and can have the following sub-elements: 1. ``     ##### <Battery> This is a sub-element of `` and is used to define a single battery that is part of the electrical system of the aircraft. It should be noted that - by default - **no** batteries belonging to the electrical system will be displayed in the aircraft app Mass and Balance menu. If you wish *any* to be displayed, then they need to be explicitly listed in this file.   The element has the following required attributes:  
AttributeDescriptionTypeRequired
nameThis is the name of the battery to be shown in the EFB.StringNo (Yes, if no id is specified)
full-title

This attribute corresponds to the name that will be displayed in the popup when clicking on the battery in the aircraft app Mass and Balance menu. This text can be localised.

NOTE: If this is not included, then the title will be generated automatically based on internal calculations. If you wish to force an empty title, then you can use this attribute with an empty string "".

StringNo
short-title

This attribute corresponds to the characters that will be displayed within the battery in the aircraft app Mass and Balance menu.

NOTE: If this is not included, then the short title will be generated automatically based on internal calculations. We strongly recommend that you supply a value for this attribute to prevent text overflow. If you wish to force an empty short-title, then you can use this attribute with an empty string "".

StringNo
section

This attribute is used to show visually the battery position within the aircraft. There are three available strings that can be used:

  1. left
  2. center
  3. right

If this attribute is not included, then it will be considered as "center".

StringNo
      #### <Fuel> This is a sub-element of `` and is a container element for the different tanks that will be displayed as part of the fuel system for the aircraft. It has no attributes and can have the following sub-elements: 1. ``     ##### <Tank> This is a sub-element of `` and `` and is used to define a single tank that is part of the main fuel or liquid dripping system of the aircraft. It should be noted that - by default - **all** tanks belonging to the fuel and liquid dropping systems will be displayed in the aircraft app Mass and Balance menu. However, if at least one tank is listed in the `` or the `` elements, all other tanks that are present in the corresponding system but which are *not* referrenced as an element in the XML, *will not be displayed in the aircraft*. This makes it a useful way to hide specific tanks that should not be directly filled by the user (for example, a reservoir fuel tank).   The element has the following required attributes:  
AttributeDescriptionTypeRequired
nameThis is the name of the fuel tank or the liquid dropping tank in the EFB. If this is included then there is no need for the id attribute. If this is not included, then the title from the Tank.N definition will be used instead.StringNo (Yes, if no id is specified)
id

This is the index of the fuel tank or the liquid dropping tank. If this is included then there is no need for the name attribute.

NOTE: It is preferrable to always use the name attribute, due to the fact that modular aircraft may change the indexing as part of the merge process.

IntegerNo (Yes if no name is specified)
full-title

This attribute corresponds to the name that will be displayed in the popup when clicking on the tank in the aircraft app Mass and Balance menu. This text can be localised.

NOTE: If this is not included, then the EFB will use the tanktitle defined in the CFG file. If you wish to force an empty title, then you can use this attribute with an empty string "".

StringNo
short-title

This attribute corresponds to the characters that will be displayed within the tank in the aircraft app Mass and Balance menu.

NOTE: If this is not included, then the short title will be generated automatically based on internal calculations. We strongly recommend that you supply a value for this attribute to prevent text overflow. If you wish to force an empty short-title, then you can use this attribute with an empty string "".

StringNo
section

This attribute is used to show visually the tank position within the aircraft. There are three available strings that can be used:

  1. left
  2. center
  3. right

If this attribute is not included, then it will be calculated automatically based on the position of the named/indexed tank in the CFG files.

StringNo
    #### <Liquid> This is a sub-element of `` and is a container element for the different tanks that will be displayed as part of the liquid dropping system for the aircraft. It has no attributes and can have the following sub-elements: 1. ``     ### <FlightPerformance> This sub-element of `` allows you to customise some aspects of the **environment** menu in the default aircraft app in the {{< glossterm >}}efb{{< /glossterm >}}. Currently, the only available configuration options are for the aircraft **flaps** which also requires that you have added relevant flaps data to the [flight\_performance.cfg](../../../cfg-files/flight_performance.cfg/) and included the file as part of the aircraft configuration files. Configurations are separated for takeoff and landing, and note that if no configuration is specified, the default flaps lists will be displayed (from 0 to the maximum defined flap index). It is also possible to create a list with custom names for the various flap indices using the flap configurations. {{< image-center src="images/6_Programming/EFB/efb_5_environment.png" alt="The Environment Section Of The Aircraft App In the EFB" >}}   The following example shows how the XML should be structured when using this element: ``` xml ```   This element has no attributes and can have the following sub-elements: 1. `` 2. ``     #### <TakeOff> This is a sub-element of `` and acts as a container element for environment data related to the aircraft takeoff procedures. It has no attributes and uses the following sub-element: 1. ``     #### <Landing> This is a sub-element of `` and acts as a container element for environment data related to the aircraft landing procedures. It has no attributes and uses the following sub-element: 1. ``     #### <FlapsConfiguration> This is a sub-element of the `` and `` and holds one or more of the following sub-elements used to define the different flap indices to display the performance data for: 1. ``     #### <Flap /> This sub-element of `` is used to define a specific flap index to show in the EFB environment section, and if there is corresponding information from the [flight\_performance.cfg](../../../cfg-files/flight_performance.cfg/) for the flap, this will also be shown as well. You can have multiple <Flap> elements, and it is self-closing, requiring the following attributes:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |-------------|-------------|---------|:--------:| | `title` | | String | No | | `flapIndex` | | Integer | Yes | {{< /table-wrapper >}}