• 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 TCAS Overlay

Now i got to figure out how to detect the AI vertical so i can make more complex rules when the pilot should stay level climb or descend.
What do you mean when you say, "AI vertical"?

Anyway, a description of RA logic can be found here, starting on page 29.
 
The range code seems a bit excessive to me. Shouldn't "10 (>C:fs9traffic:range,number)" work as well?

But thanks for the input. Maybe I'll try your implementation method as it seems a bit more compact.

That won't work i tired the same exact code earlier today. And 15NM would open. That would need some input to activate 10.
(C:fs9traffic:range,number) 10 max 10 min d (>C:fs9traffic:range,number)
This is what works.
 
What do you mean when you say, "AI vertical"?

Anyway, a description of RA logic can be found here, starting on page 29.

The VSI for AI. But this info is not available from this DLL. Also there is no way to detect if the AI is in front of you or behind you because the distance is what the DLL uses and that means all directions. So you can't clear the RA until the TA is also cleared after the AI passes you. So this is another issue right now but it works fin like that.

I will post my code soon with a video as i have got the best i can so far today.

I have also added 2 failure flags that was on in the other video. But only the VSI failure can work as this is included in FSX. So no luck for a TCAS failure. And to see both flags i have both show with battery on and avionics off.
 
Last edited:


I removed my own brightness control from the code because the PDF allows you to control this. I won't use it because i will use the main ELT knob in my aircraft.
So this code is just set to full brightness. Use this and add a mouse control.

<Brightness> (C:fs9traffic:Brightness,number) 25 max 255 min d (&gt;C:fs9traffic:brightness,number)</Brightness>


Code:
<Gauge Name="VSI_TCAS" Version="1.0">
    <Image Name="TCAS_BACKGROUND.bmp" />


<!--  TA RA RANGES  -->
    <Update  Hidden="No">
        40 (&gt;C:fs9traffic:timeSeparationTA,number)
        25 (&gt;C:fs9traffic:timeSeparationRA,number)
        4.0 (&gt;C:fs9traffic:distSeparationTA,number)
        2.0 (&gt;C:fs9traffic:distSeparationRA,number)
        1200 (&gt;C:fs9traffic:altSeparationTA,number)
        600 (&gt;C:fs9traffic:altSeparationRA,number)
    </Update>


<!--  TCAS DISPLAY  -->
    <Element>
        <Visible>(A:ELECTRICAL AVIONICS BUS VOLTAGE,Volts) 3.0 &gt; </Visible>
        <Element>
            <Position X="0" Y="0"/>
            <MaskImage Name="TCAS_MASK.bmp" ImageSizes="1024,1024"/>
            <CustomDraw Name="fs9traffic:TCAS" X="1024" Y="1024" SymbolSize="12.0"
               OtherColour="0xF0F0F0" TAColour="0xFFFF00" RAColour="0xFF0000"
                OtherAboveAlt="3000" OtherBelowAlt="3000" MaxRange="8" ProximityRange="4.0" ProximityBelowAlt="1200" ProximityAboveAlt="1200" >
                <CenterX>512</CenterX>
                <CenterY>636</CenterY>
                <ProximityColour>'0x5fffaa' '0x7ac688' '0x7ab678' 3 (L:SColor,enum) case </ProximityColour>
                <Heading>(A:GPS GROUND TRUE HEADING, degrees)</Heading>
                <Range>(C:fs9traffic:range,number) 8 max 8 min d (&gt;C:fs9traffic:range,number)</Range>
                <Brightness> (C:fs9traffic:Brightness,number) 255 max 255 min  d (&gt;C:fs9traffic:brightness,number)</Brightness>
            </CustomDraw>
        </Element>
    </Element>


<!--  TRAFFIC TEXT  -->
    <Element>
        <Visible>(C:fs9traffic:Advisory,number) 0 > </Visible>
        <Element>
            <Position X="400" Y="200"/>
            <Text X="540" Y="80" Length="7" Font="QUARTZ" FontSize="80" Adjust="Left" VerticalAdjust="Center" Color="%('0x0000ff' '0x00ffff' '0xffff7f' 3 (C:fs9traffic:advisory,number) case)" Multiline="No" >
                <String>TRAFFIC</String>
            </Text>
        </Element>
    </Element>




<!--  CENTER OF TCAS  -->
        <Element>
        <Visible>(A:ELECTRICAL AVIONICS BUS VOLTAGE,Volts) 3.0 &gt; (C:fs9traffic:Advisory,number) 0 > and</Visible>
                <Position X="0" Y="0"/>
                  <Image Name="CENTER.bmp"  Bright="Yes">
                </Image>
        </Element>

<!--  VSI LABELS  -->
        <Element>
        <Visible>(A:ELECTRICAL AVIONICS BUS VOLTAGE,Volts) 3.0 &gt;</Visible>
                <Position X="0" Y="0"/>
                  <Image Name="VSI.bmp"  Bright="Yes">
                </Image>
        </Element>
        <Element>
        <Visible>(A:ELECTRICAL AVIONICS BUS VOLTAGE,Volts) 3.0 &gt; (C:fs9traffic:Advisory,number) 0 == and</Visible>
                <Position X="0" Y="0"/>
                  <Image Name="VERTICAL_SPEED.bmp"  Bright="Yes">
                </Image>
        </Element>

<!--  VSI FLAGS  -->
        <Element>
        <Visible>(A:ELECTRICAL MAIN BUS VOLTAGE,Volts) 8 &gt; (A:ELECTRICAL AVIONICS BUS VOLTAGE,Volts) 3.0 &lt; and</Visible>
                <Position X="55" Y="115"/>
                  <Image Name="TCAS_FLAG.bmp"  Bright="Yes">
                </Image>
        </Element>
        <Element>
        <Visible>(A:ELECTRICAL MAIN BUS VOLTAGE,Volts) 8 &gt; (A:ELECTRICAL AVIONICS BUS VOLTAGE,Volts) 3.0 &lt; and (A:PARTIAL PANEL VERTICAL VELOCITY,Enum) 1 == or</Visible>
                <Position X="54" Y="795"/>
                  <Image Name="VS_FLAG.bmp"  Bright="Yes">
                </Image>
        </Element>



<!--  DESCEND IMAGE -->
        <Element>
            <Visible>0.1 600 (C:fs9traffic:advisoryAltDiff,number) rng (C:fs9traffic:Advisory,number) 2 == and</Visible>
                <Position X="0" Y="0"/>
                  <Image Name="DECEND.bmp"  Bright="Yes">
                </Image>
        </Element>

<!--  CLIMB IMAGE  -->
        <Element>
            <Visible>-600 -0.1 (C:fs9traffic:advisoryAltDiff,number) rng (C:fs9traffic:Advisory,number) 2 == and</Visible>
                <Position X="0" Y="0"/>
                  <Image Name="CLIMB.bmp"  Bright="Yes">
                </Image>
        </Element>

<!--  TA SOUND  -->
        <Element>
             <Select>
                <Value>
            2.10 3.80 (C:fs9traffic:advisoryDist,number) rng (C:fs9traffic:Advisory,number) 1 == and (L:NODE82,enum) 0 == and if{ 1 (>L:XMLSND82,enum) 1 (>L:NODE82,enum) }
                </Value>
             </Select>
        </Element>

<!--  RA SOUND DESCEND -->
        <Element>
             <Select>
                <Value>
            10 600 (C:fs9traffic:advisoryAltDiff,number) rng 0 1.80 (C:fs9traffic:advisoryDist,number) rng and (C:fs9traffic:Advisory,number) 2 == and (L:NODE84,enum) 0 == and if{ 1 (>L:XMLSND84,enum) 1 (>L:NODE84,enum) }
                </Value>
             </Select>
        </Element>

<!--  RA SOUND CLIMB -->
        <Element>
             <Select>
                <Value>
            -600 -10 (C:fs9traffic:advisoryAltDiff,number) rng 0 1.80 (C:fs9traffic:advisoryDist,number) rng and (C:fs9traffic:Advisory,number) 2 == and (L:NODE83,enum) 0 == and if{ 1 (>L:XMLSND83,enum) 1 (>L:NODE83,enum) }
                </Value>
             </Select>
        </Element>

<!--  CLEAR SOUND  -->
        <Element>
             <Select>
                <Value>
            (C:fs9traffic:Advisory,number) 0 == (L:NODE85,enum) 0 == and if{ 1 (>L:XMLSND85,enum) 1 (>L:NODE85,enum) }
                </Value>
             </Select>
        </Element>

<!--  RESET NODE SOUNDS  -->
        <Element>
             <Select>
                <Value>
            -600 -10 (C:fs9traffic:advisoryAltDiff,number) rng 0 1.80 (C:fs9traffic:advisoryDist,number) rng and (C:fs9traffic:Advisory,number) 2 == and (C:fs9traffic:Advisory,number) 0 == or (C:fs9traffic:Advisory,number) 1 == or if{ 0 (>L:NODE84,enum) }
            10 600 (C:fs9traffic:advisoryAltDiff,number) rng 0 1.80 (C:fs9traffic:advisoryDist,number) rng and (C:fs9traffic:Advisory,number) 2 == and (C:fs9traffic:Advisory,number) 0 == or (C:fs9traffic:Advisory,number) 1 == or if{ 0 (>L:NODE83,enum) }

            (C:fs9traffic:Advisory,number) 0 == (C:fs9traffic:Advisory,number) 2 == or if{ 0 (>L:NODE82,enum) }
            (C:fs9traffic:Advisory,number) 0 > if{ 0 (>L:NODE85,enum) }
                </Value>
             </Select>
        </Element>



    <Element>
    <Visible>(A:ELECTRICAL AVIONICS BUS VOLTAGE,Volts) 3.0 &gt;</Visible>
    <Element>
        <Position X="520" Y="512" />
        <Image Name="VSI_POINTER.bmp">
            <Axis X="0" Y="30" PointsTo="East" />
        </Image>
        <Rotate>
            <Value Minimum="-60" Maximum="60">(A:Vertical speed,feet per minute) 100 /</Value>
            <Nonlinearity>
                <Item Value="-60" X="914" Y="617" />
                <Item Value="-50" X="894" Y="684" />
                <Item Value="-40" X="855" Y="743" />
                <Item Value="-30" X="760" Y="845" />
                <Item Value="-20" X="630" Y="900" />
                <Item Value="-10" X="324" Y="857" />
                <Item Value="-5" X="181" Y="714" />
                <Item Value="0" X="127" Y="509" />
                <Item Value="5" X="181" Y="311" />
                <Item Value="10" X="329" Y="164" />
                <Item Value="20" X="630" Y="128" />
                <Item Value="30" X="760" Y="183" />
                <Item Value="40" X="855" Y="282" />
                <Item Value="50" X="894" Y="342" />
                <Item Value="60" X="914" Y="406" />
            </Nonlinearity>
            <Delay DegreesPerSecond="40" />
            <Failures>
                <GAUGE_VERTICAL_SPEED Action="Freeze" />
            </Failures>
        </Rotate>
    </Element>
    </Element>



  <Mouse>
  <Area Left="0" Top="0" Width="1024" Height="1024">
   <Tooltip>ALT: %((C:fs9traffic:advisoryAltDiff,number) )%!4d!ft% DISTANCE: %((C:fs9traffic:advisoryDist,number) )%!6.1f!NM% ADVISORY: %((C:fs9traffic:Advisory,number) )%!d!% TRACK: %((C:fs9traffic:advisoryTrackAngle,number) )%!d! DEGREES%{end}</Tooltip>
  </Area>
  </Mouse>


</Gauge>
 
Back
Top