• 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.

ATC RADAR SQUAWK

Messages
78
Country
unitedkingdom
Firstly hello, this is my first post after reading these forums for a while.

I've been using flight sim for around 10 or so years and mainly control in multiplayer sessions.

I was hoping somebody could help which something which has been bugging me for a while.

I control a lot using FSX and would like my radar screen to display the squawk of the aircraft under my control.

I know it's in the session info at the bottom, but I would like to see it as a tag above the aircraft on my screen.

Is there a way to do this?
Is it a case of copying the code from the session info into the radar.xml or similar?

Regards,

Roo
 
Last edited:
If it's of any help I've attached an image below of what I would like to acheive.
 

Attachments

  • radarscreen.png
    radarscreen.png
    16.5 KB · Views: 1,633
Roo,

I don't think there is an easy way to do this because the information contained in that tag is coded into the .dll module. The tag information format can be changed, if you want to call it that, through selection of TextDetailLayerVehicles parameters, but adding transponder code or swapping other information does not appear to be an option. You get call sign (player name), model, destination, altitude and airspeed, that's it. But, I will fire up the radar gauge just to remind myself what it looks like, and take another look. Maybe there is a trick that can be done, although I am not hopeful.

Something like you want can certainly be accomplished using an overlay to the radar screen, coded in XML and using ITrafficInfo variables, but I bet you would not find it worth the effort. It would be time consuming and you may find it difficult unless you are experienced writing XML gauges. And it might not look right to you if you use the built-in tags a lot because this would involve adding the Xpndr code as a separate label next to the player's aircraft, not as a direct edit of the existing info tag. However, one could create a custom tag that looks like your example, and with more info if desired, complete with ability to move the tag to different positions when an aircraft is selected ... but, lots of XML involved.

First, let's see if anyone else in this forum has an idea. You never know.

Bob
 
Last edited:
another thought ... is there any commercial product out there that can do this? I don't know ... but maybe something to check
 
I think you can do it in xml by using the ITrafficInfo module custom variables, followed by any Simulation Variable, preceded by the code C (for current aircraft) or S (for selected aircraft), for example:

C:ITrafficInfo:S:ATC FLIGHT NUMBER, string
C:ITrafficInfo:C:ATC AIRLINE, string


you want to read the TRANSPONDER CODE:index and in the SDK you can see that All aircraft (Index of 1 only) share that variable on the multiplayer session. So you should try this and see if it works
 
Here is a Squawk Code available from FS Open. I originally asked for the permission to use and they seemed open to the idea feeling it was a simple code piece (Yah Right!). Bob is right in it is all in the (C:ITrafficInfo). Never liked the "quit" statements, just haven't got to change them yet, which has led to some issues to what I am doing. Hope this helps!

Code:
<!--**************** Squawk Update ****************-->
quit
0 (&gt;C:ITrafficInfo:Filter)
(C:ITrafficInfo:ListSize) (&gt;G:Var1)
(G:Var1) 0 == if{ quit }
(G:Var1) -- (&gt;G:Var1)
:1
    (G:Var1) (&gt;C:ITrafficInfo:CurrentVehicle)
    (G:Var1) (&gt;C:ITrafficInfo:SelectedVehicle)
    (C:ITrafficInfo:S:TRANSPONDER CODE, number) 0 == if{ (C:ITrafficInfo:SelectedVehicleID) (&gt;C:fs9gps:1:SelectedVehicle) }
    (G:Var1) -- (&gt;G:Var1)
    (G:Var1) -1 == if{ quit }   
      g1

(L:IdentPushed) 1 &gt; if{  (L:LocalSquawk,BCO16) (A:TRANSPONDER CODE:1,BCO16) != if{
  (A:TRANSPONDER CODE:1,BCO16) (&gt;K:XPNDR_SET)
  (A:TRANSPONDER CODE:1,BCO16) (&gt;L:LocalSquawk,BCO16) }
  (L:IdentPushed,number) 0 &gt; if{ (L:IdentPushed) ++ (&gt;L:IdentPushed) }
  (L:IdentPushed,number) 55 &gt; if{ 0 (&gt;L:IdentPushed)  (L:TempSquawk,BCO16) (&gt;K:XPNDR_SET) } }

Code:
<!--**************** Squawk Box ****************-->

      <Element Name="SENDIdent">
        <Position X="1005.000" Y="85.000"/>
        <Visible>(L:IdentPushed,bool)</Visible>
        <FormattedText X="110" Y="50" Length="25" Font="Arial Black" FontSize="30" Adjust="Center" VerticalAdjust="Center" Color="Red" Multiline="No" Bright="Yes">
          <String>I D E N T</String>
        </FormattedText>
      </Element>
      <Element Name="Squawk Recieve">
        <Position X="0.000" Y="0.000"/>
        <FormattedText X="32" Y="206" Length="20" Font="Arial Black" FontSize="12" Adjust="Center" VerticalAdjust="Center" Color="0x000000"  Multiline="No" Tabs="0,75,150">
        <String>
          %(c)
          %(1 (&gt;G:Var3) )
          %((L:Filter) (&gt;C:ITrafficInfo:Filter))
          %( (C:ITrafficInfo:ListSize,number) s2 )
          %{if}%((0) s1)
          %{loop}%(l1 (&gt;C:ITrafficInfo:CurrentVehicle))
          %( (C:ITrafficInfo:C:TRANSPONDER CODE, number) 0 == if{ (C:ITrafficInfo:SelectedVehicle) (&gt;G:Var1) (C:ITrafficInfo:CurrentVehicle) (&gt;C:ITrafficInfo:SelectedVehicle) (C:ITrafficInfo:SelectedVehicleID) (&gt;C:fs9gps:1:SelectedVehicle) (G:Var1) (&gt;C:ITrafficInfo:SelectedVehicle)   } )
          %(1 (&gt;G:Var2) (C:ITrafficInfo:CurrentVehicle,number) (L:ListFirstVis,Number) &lt; if{ 0 (&gt;G:Var2) }  )
          %( (G:Var3) 16 &gt;  if{ 0 (&gt;G:Var2) } )
          %( (G:Var2) 1 == if{ (G:Var3) ++ (&gt;G:Var3) }  (G:Var2) )
          %{if}%((C:ITrafficInfo:SelectedVehicle) l1 == )
          %{if}\{rev}\{blc=@FontColor}%{end}
          %( @CurrentCallsign )%!s!\t
          %((C:ITrafficInfo:C:ATC MODEL, string))%!s!\t
          %((C:ITrafficInfo:CurrentDistance, nmiles))%!d! nm
          \{nr}%{end}
          %(l1 ++ s1 l2 &lt; d  (G:Var2) &amp;&amp;)
          %{if}\n\{lsp=16}%{end}
          %{next}
          %{end}
        </String>
        </FormattedText>
      </Element>

Code:
    <Area Left="1000.000" Top="240.000" Width="110" Height="50">
      <Visible>(L:MFDInitStatus,number) 3 ==</Visible>
      <Cursor Type="Hand"/>
      <Tooltip>SQUAWK IDENT</Tooltip>
      <Click>
          (L:Sound_MasterSwitch, bool) 1 == if{ 1 (>L:ButtonClick_Soft, number) }
          (L:IdentPushed) 0 &gt; if{ quit }
          (P:Absolute time,seconds) 10 > 1 (A:TRANSPONDER CODE:1, number) (>L:TempSquawk,BCO16)
        0 (>K:XPNDR_SET)
        1 (>L:IdentPushed)
      </Click> 
    </Area>

Cheers
Greg
 
I think you can do it in xml by using the ITrafficInfo module custom variables, followed by any Simulation Variable, preceded by the code C (for current aircraft) or S (for selected aircraft), for example:

C:ITrafficInfo:S:ATC FLIGHT NUMBER, string
C:ITrafficInfo:C:ATC AIRLINE, string


you want to read the TRANSPONDER CODE:index and in the SDK you can see that All aircraft (Index of 1 only) share that variable on the multiplayer session. So you should try this and see if it works
But Roo wants this information displayed as a tag, not in the traffic list
 
Here is a Squawk Code available from FS Open. I originally asked for the permission to use and they seemed open to the idea feeling it was a simple code piece (Yah Right!). Bob is right in it is all in the (C:ITrafficInfo). Never liked the "quit" statements, just haven't got to change them yet, which has led to some issues to what I am doing. Hope this helps!

Code:
<!--**************** Squawk Update ****************-->
quit
0 (&gt;C:ITrafficInfo:Filter)
(C:ITrafficInfo:ListSize) (&gt;G:Var1)
(G:Var1) 0 == if{ quit }
(G:Var1) -- (&gt;G:Var1)
:1
    (G:Var1) (&gt;C:ITrafficInfo:CurrentVehicle)
    (G:Var1) (&gt;C:ITrafficInfo:SelectedVehicle)
    (C:ITrafficInfo:S:TRANSPONDER CODE, number) 0 == if{ (C:ITrafficInfo:SelectedVehicleID) (&gt;C:fs9gps:1:SelectedVehicle) }
    (G:Var1) -- (&gt;G:Var1)
    (G:Var1) -1 == if{ quit }  
      g1

(L:IdentPushed) 1 &gt; if{  (L:LocalSquawk,BCO16) (A:TRANSPONDER CODE:1,BCO16) != if{
  (A:TRANSPONDER CODE:1,BCO16) (&gt;K:XPNDR_SET)
  (A:TRANSPONDER CODE:1,BCO16) (&gt;L:LocalSquawk,BCO16) }
  (L:IdentPushed,number) 0 &gt; if{ (L:IdentPushed) ++ (&gt;L:IdentPushed) }
  (L:IdentPushed,number) 55 &gt; if{ 0 (&gt;L:IdentPushed)  (L:TempSquawk,BCO16) (&gt;K:XPNDR_SET) } }

Code:
<!--**************** Squawk Box ****************-->

      <Element Name="SENDIdent">
        <Position X="1005.000" Y="85.000"/>
        <Visible>(L:IdentPushed,bool)</Visible>
        <FormattedText X="110" Y="50" Length="25" Font="Arial Black" FontSize="30" Adjust="Center" VerticalAdjust="Center" Color="Red" Multiline="No" Bright="Yes">
          <String>I D E N T</String>
        </FormattedText>
      </Element>
      <Element Name="Squawk Recieve">
        <Position X="0.000" Y="0.000"/>
        <FormattedText X="32" Y="206" Length="20" Font="Arial Black" FontSize="12" Adjust="Center" VerticalAdjust="Center" Color="0x000000"  Multiline="No" Tabs="0,75,150">
        <String>
          %(c)
          %(1 (&gt;G:Var3) )
          %((L:Filter) (&gt;C:ITrafficInfo:Filter))
          %( (C:ITrafficInfo:ListSize,number) s2 )
          %{if}%((0) s1)
          %{loop}%(l1 (&gt;C:ITrafficInfo:CurrentVehicle))
          %( (C:ITrafficInfo:C:TRANSPONDER CODE, number) 0 == if{ (C:ITrafficInfo:SelectedVehicle) (&gt;G:Var1) (C:ITrafficInfo:CurrentVehicle) (&gt;C:ITrafficInfo:SelectedVehicle) (C:ITrafficInfo:SelectedVehicleID) (&gt;C:fs9gps:1:SelectedVehicle) (G:Var1) (&gt;C:ITrafficInfo:SelectedVehicle)   } )
          %(1 (&gt;G:Var2) (C:ITrafficInfo:CurrentVehicle,number) (L:ListFirstVis,Number) &lt; if{ 0 (&gt;G:Var2) }  )
          %( (G:Var3) 16 &gt;  if{ 0 (&gt;G:Var2) } )
          %( (G:Var2) 1 == if{ (G:Var3) ++ (&gt;G:Var3) }  (G:Var2) )
          %{if}%((C:ITrafficInfo:SelectedVehicle) l1 == )
          %{if}\{rev}\{blc=@FontColor}%{end}
          %( @CurrentCallsign )%!s!\t
          %((C:ITrafficInfo:C:ATC MODEL, string))%!s!\t
          %((C:ITrafficInfo:CurrentDistance, nmiles))%!d! nm
          \{nr}%{end}
          %(l1 ++ s1 l2 &lt; d  (G:Var2) &amp;&amp;)
          %{if}\n\{lsp=16}%{end}
          %{next}
          %{end}
        </String>
        </FormattedText>
      </Element>

Code:
    <Area Left="1000.000" Top="240.000" Width="110" Height="50">
      <Visible>(L:MFDInitStatus,number) 3 ==</Visible>
      <Cursor Type="Hand"/>
      <Tooltip>SQUAWK IDENT</Tooltip>
      <Click>
          (L:Sound_MasterSwitch, bool) 1 == if{ 1 (>L:ButtonClick_Soft, number) }
          (L:IdentPushed) 0 &gt; if{ quit }
          (P:Absolute time,seconds) 10 > 1 (A:TRANSPONDER CODE:1, number) (>L:TempSquawk,BCO16)
        0 (>K:XPNDR_SET)
        1 (>L:IdentPushed)
      </Click>
    </Area>

Cheers
Greg

Greg,

Where is this information displayed, do you know??

Bob
 
Based on the data extracted from the Itrafficinfo "Roo" can then print with some xml code the information he wants near the position of his choice.
 
Based on the data extracted from the Itrafficinfo "Roo" can then print with some xml code the information he wants near the position of his choice.
ummmm, and these labels will move with the aircraft as the aircraft traverses the radar screen? He wants to edit the tag, not just display the Xpndr code in a list, which he acknowledges the stock radar gauge already does.
I'll take a look at the script Greg posted to see what that does. Anyway, you're right that much traffic information can be retrieved, but tying it to the tag so that it moves with the aircraft is the challenge
 
Last edited:
Of course they wont move. My meaning is you get the data you want (lat, lon, alt. xpndr. etc...) from the itraffic module and you write/draw the tag at the position you want on your radar screen, you can do it entirely in xml.
 
Of course they wont move. My meaning is you get the data you want (lat, lon, alt. xpndr. etc...) from the itraffic module and you write/draw the tag at the position you want on your radar screen, you can do it entirely in xml.
Hi again,

My point is that the Vehicle 'tag' moves with the aircraft, and I believe that is what the OP is asking about. The question is can this tag be edited to include XPndr code? In this context, 'tag' is that information displayed when TextDetailLayerVehicles is set to 1 or 2 (call sign (player name), model, destination, altitude and airspeed). The excerpt below shows what the tag looks like and how its position can be adjusted for the Selected aircraft. It moves as the aircraft moves.

Page11b.png


Displaying Xpndr code, or any other information that is retrievable using ITrafficInfo, in a fixed position on the screen or in a list separate from the screen can be done using XML, that's correct. In fact, as the OP admits, the FSX stock radar already displays squawk code, although not on the screen, but in a list. It's generated by the session_info.xml gauge.

Getting it to move with the aircraft is more involved and I do not see a simple way, setting, or code swap to do that, but I admit I always could be missing something. In my first response to this thread, I mentioned one way this could be done, but it's far from simple.
 
Greg,
Where is this information displayed, do you know??
Bob

Good Morning all,

The code I provided highlights the FSX stock Aircraft tag in red when an individual "Squawks" Code 0000. When the IDENT button is pushed the tag changes colour for 15 seconds? or more (I really can't remember how long, but will look next time I am on the sim). It provides no additional information other than what is available in the FSX tag. I have set my gauge up to display in the range window when the user presses the "IDENT" button. And re-reading the post that is not what is sought here.

I have to agree that having a movable tag displaying more information would be a lot of work (for me anyway) and really for what gain. But maybe the code could be modified to display the desired info in a list Highlighted when the IDENT is active. But Roo is looking for personalized information in a tag. Just off the top of my head (More to the point is what I have been studying) Taking a total guess here, but could the personalized tags be achieved using Bob's Example Map Integration Loop. Rather than symbols and arrows display the desired (C:ITrafficInfo) information. Just a thought!

Cheers
Greg
 
Good Morning all,

The code I provided highlights the FSX stock Aircraft tag in red when an individual "Squawks" Code 0000. When the IDENT button is pushed the tag changes colour for 15 seconds? or more (I really can't remember how long, but will look next time I am on the sim). It provides no additional information other than what is available in the FSX tag. I have set my gauge up to display in the range window when the user presses the "IDENT" button. And re-reading the post that is not what is sought here.

I have to agree that having a movable tag displaying more information would be a lot of work (for me anyway) and really for what gain. But maybe the code could be modified to display the desired info in a list Highlighted when the IDENT is active. But Roo is looking for personalized information in a tag. Just off the top of my head (More to the point is what I have been studying) Taking a total guess here, but could the personalized tags be achieved using Bob's Example Map Integration Loop. Rather than symbols and arrows display the desired (C:ITrafficInfo) information. Just a thought!

Cheers
Greg
Greg,

A custom, and moving, tag can certainly be made using an overlay if one wants to go to the trouble. My TCAS map solution does that except that Xpndr code is not displayed .. but it easily could be. It seems Andy was hoping for something much easier and dealing with pretty much stock FSX labeling and my overlay thing is not that.

It is a built in feature of FSX that whenever an aircraft is "Selected", its tag turns red so that it can be read more easily from the others. Take a look at that page copied a few posts up. The red label results from Selecting the King Air, traffic Index 2.

The example you attached to your original response generates a list of information, but as you just said, it is not part of the 'tag'. The stock radar gauge (session_info.xml) does that too. It might be nice if the tag could be edited, but ITrafficInfo vars do not give a clue nor do the radar xml gauge files that come with FSX. I certainly could be wrong about this, but probably the tag cannot be edited other than to change the format of its display (ie, TextDetailLayerVehicles 1 or 2).

Bob
 
Thank you to everyone that posted.
It seems it would be more complicated than I thought and not just a case of piching the code from the sessions.xml
For now I have found a solution using Flight Sim Commander which shows exactly what I wanted although I do have to have an extra program open and a big aircraft symbol (me) in the center of my airport.

Thanks again for all the advice.
 
Back
Top