Skip to main content

Dual GNS Units of the Same Type

Developers can also choose to equip aircraft with two GNS units of the same type, for example two GNS 430s. In this scenario, the instruments need to be indexed so that the instance of the GNS loaded by the panel.cfg file can be matched up with the proper configuration options selected in the panel.xml file. To do this, there are three steps:

First, panel.cfg needs to include an index that matches the NAV/COM index for the instrument. For example, assume two 430s at index 1 and 2:

[VCockpitXX]
size_mm = 350,190
pixel_size = 350,190
texture = $GNSScreen_1
htmlgauge00=NavSystems/GPS/WT430/WT430.html?Index=1, 0, 0, 350,190

[VCockpitXX]
size_mm = 350,190
pixel_size = 350,190
texture = $GNSScreen_2
htmlgauge00=NavSystems/GPS/WT430/WT430.html?Index=2, 0, 0, 350,190

Next, panel.xml needs to reflect the instrument names with the same index. Extending the above example, note the Name tags.

<Instrument>
<Name>AS430_1</Name>
<NewCDIBehavior>True</NewCDIBehavior>
<NavIndex>1</NavIndex>
<ComIndex>1</ComIndex>
</Instrument>

<Instrument>
<Name>AS430_2</Name>
<NewCDIBehavior>True</NewCDIBehavior>
<NavIndex>2</NavIndex>
<ComIndex>2</ComIndex>
</Instrument>

Finally, in your interior model.xml file:

  1. Define new input event sources for the indexed instrument names:
    <ModelBehaviors>
    <Include ModelBehaviorFile="ASOBO\Inputs\Helpers.xml"/>
    <InputEvent ID="AS430_1">
    <Presets>
    <Extend Target="ASOBO_GIE_Anim_Handling">
    <Parameters Type="Default">
    <INPUT_EVENT_ID_SOURCE>AS430_1</INPUT_EVENT_ID_SOURCE>
    </Parameters>
    </Extend>
    </Presets>
    </InputEvent>
    <InputEvent ID="AS430_2">
    <Presets>
    <Extend Target="ASOBO_GIE_Anim_Handling">
    <Parameters Type="Default">
    <INPUT_EVENT_ID_SOURCE>AS430_2</INPUT_EVENT_ID_SOURCE>
    </Parameters>
    </Extend>
    </Presets>
    </InputEvent>
    </ModelBehaviors>
  2. For each instrument, set the value of the AS430 parameter to the indexed variant name:
    <Component ID="AS430_1">
    <Parameters Type="Default">
    <AS430>AS430_1</AS430>
    ...
    </Parameters>
    ...
    </Component>
    <Component ID="AS430_2">
    <Parameters Type="Default">
    <AS430>AS430_2</AS430>
    ...
    </Parameters>
    ...
    </Component>