• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA Multiple Conditions including "WindDirection" not working

Messages
105
Country
unitedkingdom
Hi folks,

As a follow on to my previous thread about the Aerodrome Lighting System I am trying to recreate, I have got the models compiled and visible as library objects, so am now trying to get them working with SODE calling them only when necessary. As usual, however, I have hit a problem, in that I cannot apparently use "WindDirection" as part of a multiple Conditional Visibility segment.

The code I have been trying to use is as follows:

Code:
<SimObject Name="ALS1_TotemLightsSE">
<Placement Lat="56.027013276" Lon="-2.805118097 Alt="0#AGL" Hdg="019.6"/>
<Model SimTitle="IJP_ALS1_TotemLights">
<ConditionalVisibility LogicExpression="A$B">
<Condition ID="A" Variable="WindDirection" Value="165-223"/>
<Condition ID="B" Variable="TimeOfDay" Value="DAWN;DUSK;NIGHT"/>
</ConditionalVisibility>
</Model>
</SimObject>

And the object does not appear. However if I change the Condition A line from WindDirection to another option, such as <Condition ID="A" Variable="MonthOfYear" Value="JAN"/> then the object is visible.

Because WindDirection is one of the examples used on the Wiki page (http://sode.12bpilot.ch/?document=the-xml-definition-file/conditionalvisibility-multiple-conditions) and my syntax matches what is there, does anyone have any idea what the problem is? What I actually need to achieve is a three condition expression (LogicExpression="(A|B)$C" where A and B are opposing wind ranges and C is the time of day condition) but if I can't get it working in one direction then this obviously doesn't work either.

Any suggestions appreciated.

Best regards,

Ian P.
 
Hi Ian,

have you tried to change the condition order : A - TimeOfDay / B - WindDirection. ?

My 2 cents
 
Hi Jacques,

I have. It made no difference, unfortunately. Calling other models with the same code doesn't work, either.

All the best,

Ian P.
 
Hi Ian,

Is the SimObject linked with a "Environmental Data Probe"? If you only used the wind variable alone, would then the object be shown?
 
Hi Jeffrey,

Yes, it's linked to a Data Probe and yes, they appear if the WindDirection variable is used alone rather than as part of a multiple condition. Following some more tests, the objects appear if I use anything but WindDirection or WindSpeed as part of a multiple condition. I hadn't tried WindSpeed before, but the same thing happens with that variable as happens with WindDirection.

Here's the entire text of the xml file as it stands. If someone could look through it for obvious errors, that would be very much appreciated - you may note that the Flarepath conditions are copied exactly from the SODE Manual Wiki... That doesn't work, either, for me. I'm slightly baffled and getting really quite frustrated, now. :(

Is it worth me zipping up the objects and the base airfield file, to see if it works on anyone else's machine and it's just me that it is failing for?

Cheers,

Ian P.

Code:
<SODE>    

    <!-- Data Probe serving its clients-->
    <SimObject Name="RAF Drem">
        <Placement Lat="56.021274023" Lon="-2.794929632" Alt="45.000" Hdg="0.0"/>
        <Model SimTitle="12bPilot_SODE_Environmental_Data_Probe">
            <EnvironmentalDataProbe ClientList="RunwayCaravanNE;RunwayCaravanE;RunwayCaravanSE;RunwayCaravanSW;RunwayCaravanW;RunwayCaravanNW;RunwayTee;ALS1_FighterRing;ALS1_TotemLightsNW;ALS1_FlarepathNW;ALS1_TotemLightsSE"/>
        </Model>
    </SimObject>
   
    <!-- Wind Direction Ranges based switching of alternate models-->
    <SimObject Name="RunwayCaravanNE">
        <Placement Lat="56.01352452" Lon="-2.805150198" Alt="0#AGL" Hdg="019.6"/>
        <Model SimTitle="RunwayCaravanBlack">
            <ConditionalVisibility Variable="WindDirection" Value="345-043"/>
        </Model>
    </SimObject>
    <SimObject Name="RunwayCaravanE">
        <Placement Lat="56.014674156" Lon="-2.808550056" Alt="0#AGL" Hdg="77.8"/>
        <Model SimTitle="RunwayCaravanBlack">
            <ConditionalVisibility Variable="WindDirection" Value="044-101"/>
        </Model>
    </SimObject>
    <SimObject Name="RunwayCaravanSE">
        <Placement Lat="56.021309282" Lon="-2.807170692" Alt="0#AGL" Hdg="116.9"/>
        <Model SimTitle="RunwayCaravanBlack">
            <ConditionalVisibility Variable="WindDirection" Value="102-164"/>
        </Model>
    </SimObject>
    <SimObject Name="RunwayCaravanSW">
        <Placement Lat="56.024689371" Lon="-2.798356732" Alt="0#AGL" Hdg="199.6"/>
        <Model SimTitle="RunwayCaravanBlack">
            <ConditionalVisibility Variable="WindDirection" Value="165-223"/>
        </Model>
    </SimObject>
    <SimObject Name="RunwayCaravanW">
        <Placement Lat="56.018730269" Lon="-2.786693778" Alt="0#AGL" Hdg="245.1"/>
        <Model SimTitle="RunwayCaravanBlack">
            <ConditionalVisibility Variable="WindDirection" Value="224-281"/>
        </Model>
    </SimObject>
    <SimObject Name="RunwayCaravanNW">
        <Placement Lat="56.015879171" Lon="-2.791075485" Alt="0#AGL" Hdg="323.9"/>
        <Model SimTitle="RunwayCaravanBlack">
            <ConditionalVisibility Variable="WindDirection" Value="282-344"/>
        </Model>
    </SimObject>

    <SimObject Name="RunwayTee">
        <Placement Lat="56.021217539" Lon="-2.795251406" Alt="0#AGL" Hdg="355.5"/>
        <Model SimTitle="RunwayTee02">
            <ConditionalVisibility Variable="WindDirection" Value="341-045"/>
        </Model>
        <Model SimTitle="RunwayTee07">
            <ConditionalVisibility Variable="WindDirection" Value="046-097"/>
        </Model>
        <Model SimTitle="RunwayTee12">
            <ConditionalVisibility Variable="WindDirection" Value="098-160"/>
        </Model>
        <Model SimTitle="RunwayTee20">
            <ConditionalVisibility Variable="WindDirection" Value="161-226"/>
        </Model>
        <Model SimTitle="RunwayTee25">
            <ConditionalVisibility Variable="WindDirection" Value="227-277"/>
        </Model>
        <Model SimTitle="RunwayTee30">
            <ConditionalVisibility Variable="WindDirection" Value="278-340"/>
        </Model>
    </SimObject> 

    <!--Time of Day based switching of object-->
    <SimObject Name="ALS1_FighterRing">
        <Placement Lat="56.019337462" Lon="-2.798641658" Alt="45.000" Hdg="4.5"/>
        <Model SimTitle="IJP_ALS1_FighterRing">
            <ConditionalVisibility Variable="TimeOfDay" Value="DUSK;NIGHT;DAWN"/>
        </Model>
    </SimObject>
   
    <!--Time of Day and Wind Direction based switching of object-->
    <SimObject Name="ALS1_TotemLightsNW">
        <Placement Lat="56.012131654" Lon="-2.805118097" Alt="0#AGL" Hdg="19.6"/>
        <Model SimTitle="IJP_ALS1_TotemLights">
            <ConditionalVisibility LogicExpression="A$(B|C)">
                <Condition ID="A" Variable="TimeOfDay" Value="DUSK;NIGHT;DAWN"/>
                <Condition ID="B" Variable="WindDirection" Value="345-043"/>
                <Condition ID="C" Variable="WindDirection" Value="165-223"/>
            </ConditionalVisibility>
        </Model>
    </SimObject>
    <SimObject Name="ALS1_FlarepathNW">
        <Placement Lat="56.019177025" Lon="-2.802227214" Alt="0#AGL" Hdg="19.6"/>
        <Model SimTitle="IJP_ALS1_4400ftFlarepath">
            <ConditionalVisibility LogicExpression="(A$B)|C|D">
                <Condition ID="A" Variable="WindSpeed" Value="0-10"/>
                <Condition ID="B" Variable="WindDirection" Value="15-175"/>
                <Condition ID="C" Variable="MetVisibility" Value="0-10000"/>
                <Condition ID="D" Variable="MetPrecipitation" Value="RAIN;SNOW"/>
            </ConditionalVisibility>
        </Model>
    </SimObject>
    <SimObject Name="ALS1_TotemLightsSE">
        <Placement Lat="56.027013276" Lon="-2.797950758" Alt="0#AGL" Hdg="199.6"/>
        <Model SimTitle="IJP_ALS1_TotemLights">
            <ConditionalVisibility LogicExpression="A$(B|C)">
                <Condition ID="A" Variable="TimeOfDay" Value="DUSK;NIGHT;DAWN"/>
                <Condition ID="B" Variable="WindDirection" Value="345-043"/>
                <Condition ID="C" Variable="WindDirection" Value="165-223"/>
            </ConditionalVisibility>
        </Model>
    </SimObject>

</SODE>
 
I've zipped up the airfield, simobjects and xml file and put them here: http://www.ianpsdarkcorner.co.uk/historical/raf/x6dm/x6dm_test.zip if it is any help to look at them "in situ".

There's not a whole lot of the airfield right now, because the lights are a major part of it and I wanted to get them working first which, as they aren't, is a bit of a problem. The runway caravans, runway "T" and ring lights (2000yd radius from aerodrome centrepoint) are all working fine, it's just the multiple condition elements that won't appear for me.

All advice appreciated!

Cheers,

Ian P.
 
Alright, I was able to track this one down: I have defined all of those environmental data variables as "single range" data, but you have demonstrated a use case for having one model to react to multiple wind direction ranges (multiple ranges of same variable).
That was something I wanted to avoid, because if two submodels of the same SimObject (by mistake) share the same range of wind direction, SODE cannot determine which one to show.

So, I could define those variables to support multi range, but the developer must then be very careful not to overlap ranges for the alternative submodels.

But still, there is a solution to this using the single range definition: You have to split up the the alternative models to cover each single range.

For your code, I see that only those TotemLights are using multiple wind direction ranges, so after splitting them up, they show correctly in the sim. You'll get this concept by having a look at the altered xml code below...

Code:
<!--Time of Day and Wind Direction based switching of object-->
    <SimObject Name="ALS1_TotemLightsNW">
        <Placement Lat="56.012131654" Lon="-2.805118097" Alt="0#AGL" Hdg="19.6"/>
        <Model SimTitle="IJP_ALS1_TotemLights">
            <ConditionalVisibility LogicExpression="A$B">
                <Condition ID="A" Variable="TimeOfDay" Value="DUSK;NIGHT;DAWN"/>
                <Condition ID="B" Variable="WindDirection" Value="345-043"/>
            </ConditionalVisibility>
        </Model>
        <Model SimTitle="IJP_ALS1_TotemLights">
            <ConditionalVisibility LogicExpression="A$B">
                <Condition ID="A" Variable="TimeOfDay" Value="DUSK;NIGHT;DAWN"/>
                <Condition ID="B" Variable="WindDirection" Value="165-223"/>
            </ConditionalVisibility>
        </Model>
    </SimObject>
    <SimObject Name="ALS1_FlarepathNW">
        <Placement Lat="56.019177025" Lon="-2.802227214" Alt="0#AGL" Hdg="19.6"/>
        <Model SimTitle="IJP_ALS1_4400ftFlarepath">
            <ConditionalVisibility LogicExpression="(A$B)|C|D">
                <Condition ID="A" Variable="WindSpeed" Value="0-10"/>
                <Condition ID="B" Variable="WindDirection" Value="15-175"/>
                <Condition ID="C" Variable="MetVisibility" Value="0-10000"/>
                <Condition ID="D" Variable="MetPrecipitation" Value="RAIN;SNOW"/>
            </ConditionalVisibility>
        </Model>
    </SimObject>
    <SimObject Name="ALS1_TotemLightsSE">
        <Placement Lat="56.027013276" Lon="-2.797950758" Alt="0#AGL" Hdg="199.6"/>
        <Model SimTitle="IJP_ALS1_TotemLights">
            <ConditionalVisibility LogicExpression="A$B">
                <Condition ID="A" Variable="TimeOfDay" Value="DUSK;NIGHT;DAWN"/>
                <Condition ID="B" Variable="WindDirection" Value="345-043"/>
            </ConditionalVisibility>
        </Model>
        <Model SimTitle="IJP_ALS1_TotemLights">
            <ConditionalVisibility LogicExpression="A$B">
                <Condition ID="A" Variable="TimeOfDay" Value="DUSK;NIGHT;DAWN"/>
                <Condition ID="B" Variable="WindDirection" Value="165-223"/>
            </ConditionalVisibility>
        </Model>
    </SimObject>

Let me now if it works now. Also, if you think it wou
 
Hi Jeffrey,

There'll be a lot more "TimeofDay" and "WindDirection" controlled objects by the time I've finished, with "Funnel" Lights, "Flarepath" lights, a Spotlight and an approach angle light per runway direction (the approach angle lights are going to be fun...) - only the totem lights, which are required to be visible at both ends of the active runway, will ever require two opposing wind directions, but I can happily place them the way you suggest above.

I'll give it a go and let you know. Thanks very much.

All the best,

Ian P.
 
Back
Top