• 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 Display Aircraft on default ATC Radar

I've just had 5 mins spare and made some headway.
If I click on the aircraft in the Traffic Explorer and tell it to do something (a T&G, land or give it a FP to follow) it enables the traffic in the session info and on the radar screen.

So at a guess they start as sleeping?

Does anybody know how I could give them all a kickstart when I open my radar without individually clicking them all?
I don't know how to start with all traffic in the awakened state, but did you already try setting bit #5 in ITrafficInfo:Filter to see if that shows you the sleeping traffic on the radar screen?

Hope it works for you,

Bob

You've seen this reference I guess? Pages 99-105
 
Last edited:
Thanks to everybody for the pointers so far.

I do have a pdf bob which explains the trafficinfo variables but other than that there doesn't seem to be much info.

On further investigation the traffic I'm trying to show is not in a sleeping state but an "init" state.

I have found no info on init states and assume it stands for initialising or similar?
 
I'm not sure but if I enable extra AI traffic they show as Sleeping with the AI from the server showing as init.

I'm not sure if I'm adding the filter correctly so I'll experiment some more later.

I'll modify the filter to show sleeping AI that I create.
If that works I'll connect to the server and see if the init aircraft show with the same filter setting.
 
I'm still not having much luck with this.

Code:
64 Awake
 32 Sleeping
 16 In Air
 8 On Ground
4 Air Traffic Control 
2 Ground Vehicles 
1 Aircraft

So by my reckoning the filter value of 25 needs to be replaced with 57.

Does that sound correct?
 
Andy,

Concerning the most recent replies in this thread, #21 thru #25, and from a single player perspective:

After thinking about this a little more, I guess ITrafficInfo:Filter isn't the issue. ITrafficInfo:Filter will determine which AI aircraft/vehicles are returned in a nearest traffic search.

However, what is displayed on the fs9gps:Map radar screen is different. Its controlled by LayerVehicles and doesn't seem to be influenced by ITrafficInfo Filter settings. In LayerVehicles, your options are those included in ObjectLayerDetailVehicles. Bits 1 and 2, Ground Vehicles and Airborne vehicles, are the ones of interest.

As far as I can tell, LayerVehicles draws only Awake vehicles. The way I think it works is that AI aircraft/vehicles that have been spawned but are still sleeping will show in the ITrafficInfo list if Filter bit#5 is set, but LayerVehicles will not draw them. In other words, you can see a list of traffic and you can see the AI traffic in Views-View Mode-Outside, but I think LayerVehicles might not necessarily be able to draw everything in the list.

Utilizing the XML variables available in FSX, I don't know of a way to show sleeping vehicles in LayerVehicles. I imagine Microsoft never envisioned the need.

On the other hand, using XML, any traffic, including sleeping, that can be returned in an ITrafficInfo list on your computer certainly could be drawn as an overlay to the radar screen. The XML to do that is included in the Example XML Map Gauges.zip file that can be downloaded from the CustomDraw guidebook page. Personally, I think it works great, but it's a fair amount of work, it involves a start-up scale calibration step if you use it as an overlay to the gps map, and you might be better off if there is a commercial product or other solution out there that satisfies your multi-player plus AI requirements.

The limitation for multiplayer is that I think ITrafficInfo cannot return multiplayer traffic as well as the users generated AI traffic. If I'm wrong and it can, then you can draw everything.

Bob
 
Last edited:
Andy,

Concerning the most recent replies in this thread, #21 thru #25, and from a single player perspective:

After thinking about this a little more, I guess ITrafficInfo:Filter isn't the issue. ITrafficInfo:Filter will determine which AI aircraft/vehicles are returned in a nearest traffic search.

That's the way I see it too and l and I was dealing with this as 2 parts.
Display the AI in the Traffic Info list.
Then see if I can display them on the radarscreen.

As mentioned above there are TCAS displays for the radar screen part, so worst case scenario would be to display them on the session info list and then include a TCAS display as a radar screen.

But with various ITrafficInfo filter settings I wasn't able to display the sleeping traffic on the sessionInfo list?

However, what is displayed on the fs9gps:Map radar screen is different. Its controlled by LayerVehicles and doesn't seem to be influenced by ITrafficInfo Filter settings. In LayerVehicles, your options are those included in ObjectLayerDetailVehicles. Bits 1 and 2, Ground Vehicles and Airborne vehicles, are the ones of interest.

As far as I can tell, LayerVehicles draws only Awake vehicles. The way I think it works is that AI aircraft/vehicles that have been spawned but are still sleeping will show in the ITrafficInfo list if Filter bit#5 is set, but LayerVehicles will not draw them. In other words, you can see a list of traffic and you can see the AI traffic in Views-View Mode-Outside, but I think LayerVehicles might not necessarily be able to draw everything in the list.

I think your right and its a shame.
But the TCAS work around above could still be used if the session info list could show who was online.

On the other hand, using XML, any traffic, including sleeping, that can be returned in an ITrafficInfo list on your computer certainly could be drawn as an overlay to the radar screen. The XML to do that is included in the Example XML Map Gauges.zip file that can be downloaded from the CustomDraw guidebook page. Personally, I think it works great, but it's a fair amount of work, it involves a start-up scale calibration step if you use it as an overlay to the gps map, and you might be better off if there is a commercial product or other solution out there that satisfies your multi-player plus AI requirements.

Bob

Well that's something to have a poke about with in a minute.

Its annoying in that as I have been tinkering I found that the traffic could be displayed if given something to do.
For example I've been going in to Traffic Explorer and telling all the AI aircraft to Take off from an airport.
That then updates their position and the radar shows them.

If I could include some kind of update into the Radar XML for example....
if ((aircraft = init ||asleep) set takeoff from EGLL 27L)

Obviously not a working example but I'm sure you get the idea.

It doesn't matter which airport you tell them to take off from as their position is updated almost immediately.

There are also radar screens both commercially and freeware that will show this traffic.
But the feedback from the controllers at the community I fly with is that the freeware clients are awkward to setup and not very user friendly.

Also none of the Freeware software I have found will show both the multiplayer and AI at the same time.
And both freeware and payware programs require the user to have a separate program open as well as their flight sim.

So they could be vectoring an airborne aircraft to final, and then want to check how close a ground taxi aircraft is getting to the runway from their tower view.

Using the default FSX gauge is a lot easier to quickly look out of the tower window than switching between programs.
 
Last edited:
From my experience in Multiplayer with the Acceleration radar gauge and several other
derivations of it...the Raytheon ANR-75 and the A2A 'maps' , etc I have found that upon
entering a MP session I see ALL the MP aircraft currently in the session based upon the
ObjectLayerDetailVehicles value I have set to show Air, Ground or Both.

When new 'players' (I hate using that term!) enter a session I see their aircraft added to
my Session Info list as well as the radar display screen.

However, if I do something like "Aircraft(reload)" to reload my user aircraft or a couple of
other options like loading a saved flight while IN a MP session, all vehicles are REMOVED
from the radar display but remain listed on the session info list.

So, it may very well be that the way you are entering a session is responsible for what you
are or are not seeing. Once in a session only those aircraft currently in the session or those
that join after you are in then session get shown/updated for display but should you
do something that causes a 'reload' you will lose the display of all aircraft currently in the
session and only those entering after that event will be shown.

If you change your 'role' while logged in to a session this may cause the issue. I know that
once I have done something that causes the currently displayed traffic to 'vanish' I have
to exit the session and re-enter to 'get them back'.

It is interesting to note tat your use of Traffic Explorer can bring traffic 'to life'. Once
I get home next week I will experiment with this by entering a session, reloading
my aircraft and then see if I can cause those 'lost' vehicles to reappear using the
Traffic Toolbox Explorer.

It is too bad that MS/ACES didn't have actual documentation people to write their
SDK's but instead, from what I have seen, relied upon the creators of various modules
to simply 'state the obvious' in the documentation for the most part! Perhaps
then we wouldn't be constantly struggling to find out how some portions of FSX work
by empirical methods!

Paul (who, as a hardware/firmware engineer always commented every line of code
I wrote as to what it did and why!)
 
I'm hoping some clever person here who is familure with XML can tell me where I might be going wrong trying to use the below.
Code:
 if init (>C:TrafficInfo)
{ enroute (&st;C:TrafficInfo) }
As I said at the start I'm not a programmer, I'm just trying to find a solution to something our community uses.
 
I'm hoping some clever person here who is familure with XML can tell me where I might be going wrong trying to use the below.
Code:
 if init (>C:TrafficInfo)
{ enroute (&st;C:TrafficInfo) }
As I said at the start I'm not a programmer, I'm just trying to find a solution to something our community uses.
Hi Andy,

Sorry, but I can't tell what you are trying to do. "TrafficInfo" (presume you mean ITrafficInfo) .... but which ITrafficInfo variable do you have in mind? I also cannot figure out what you're getting at with init, enroute and &st.

We need a fair bit more explanation of what you're trying to do.

Cheers,

Bob
 
Haha.
Yes should have been iTrafficInfo.

if init (>C:ITrafficInfo:state)
{ enroute (&st;C:ITrafficInfo:state) }

If ITrafficInfo:state is "init" set their iTrafficInfo:state to enroute.
 
Last edited:
Where are you getting the AI terms "init" and "enroute"? Do you mean Sleeping and Active?

At any rate, there is no such ITrafficInfo variable, per se, that returns the Sleeping or Active state. You would also like that variable, if it existed, to be settable so that you can activate any or all sleeping AI aircraft. I'm not sure that can be done ...

However, A:ELECTRICAL MASTER BATTERY, bool, or in this case, C:ITrafficInfo:C:ELECTRICAL MASTER BATTERY, bool, appears to be set to 1 as soon as a sleeping AI aircraft becomes active. Before that, it is zero. Eventually, that AI aircraft will begin to taxi and it will show a positive GROUND SPEED.

The SDK advises that A:ELECTRICAL MASTER BATTERY is settable, soooooo, if by chance Tom Aguilo's SIMVARS class (part of XMLTOOLS) can set AI variables also, then you might be able to activate an AI aircraft using XML. There is no mention of this in the SIMVARS documentation. If you could do it, you would have to also identify the index value of the AI aircraft to isolate which aircraft you're setting. This is a real long shot ... I suspect one cannot mess with the AI engine like that.

Bob

[edit] one other big point. I still do not think, or at least, I didn't know, that you can retrieve any information about AI aircraft/vehicles as soon as you enter a Multiplayer session, as if the AI engine is turned off in Multiplayer. If that's true, then why are you interested in AI aircraft at all? I thought this entire thread was really about Multiplayer with one (you) being a controller. In full disclosure, I know almost nothing about Multiplayer ... just curious.
 
Last edited:
As I mentioned way up near the start of this thread, most MP servers disable AI traffic automatically to prevent overloading the server and taking space that should be used by MP aircraft.

As Bob mentioned, I thought we were dealing with MP aircraft in a session. Not AI or a mix of AI and MP aircraft.

Perhaps a restatement of exactly what you wish to accomplish is in order.

Paul
 
What is &st??
Assumed &gt was GET so &st may have been SET?

Bob,
The terms init,sleep, pushback etc are aircraft status shown when using the Traffic Explorer.

All the traffic I want to show on the radar start as init.
Again I assuming this means initialising?

Init aircraft are not shown until they have something to do.
So if I click on an init or sleeping aircraft in Traffic Explorer and give it a flight plan or tell it to take off it then shows on radar.

Because Traffic Explorer can display the status, I hoped that it could be set?
Hence the code above.

What I want to do works perfectly if I go down the aircraft list in Traffic Explorer and set each aircraft to take off manually one by one.

I was hoping this could be done automatically with the above code as not everybody has traffic Explorer enabled, not to mention it's awkward for people which what I'm trying to achieve is supposed to make things easier.

I'll look at different variables like the electrical you mentioned above and see if I have any joy that way.

But if Traffic Explorer can display a status should it not be possible to get it?
Could it be a case it is just undocumented?

Paul,
Sorry I should have made my question slightly clearer as I'm sure it's one that has probably never been asked before.

In my first post I mention that the traffic I want to display comes from a pilot client.

Its not VATSIM traffic I'm trying to show but to make things easier let's say I want VATSIM traffic to display on the default radar.

The VATSIM pilot client injects the traffic into FSX as an init status, whether you're in an FSX multiplayer session or FSX Freeflight mode.
The traffic is there if you look out of your window but will not show on your TCAS or FSX radar screen.

If you were to start in a multiplayer session as ATC and then save the flight, you can then load that flight in a Freeflight session.

So the radar can be used in multiplayer or freeflight (single player) mode.

So while I am asking about multiplayer this is not an FSX Multiplayer as you maybe thinking of.

When I mention AI aircraft, I am including the multiplayer aircraft sent by the various pilot clients as AI because they are shown on radar in a similar why.

Sorry for any confusion and I hope I've explained things a little clearer.

Basically I'm looking for a way to change the AI aircraft (which includes the extra multiplayer traffic) state if they show as in an init state.

But nothing seems documented regarding the state that Traffic Explorer shows.
 
Last edited:
I'm still trying.... :rolleyes:

I'm using a list of simulation variables found here.

Code:
AI TRAFFIC STATE English string describing an AI object's state.  If the object is an aircraft under ATC control the string will be one of:
"init"
"sleep"
"flt plan"
"startup"
"preflight support"
"clearance"
"push back 1"
"push back 2"
"pre taxi out"
"taxi out"
"takeoff 1"
"takeoff 2"
"T&G depart"
"enroute"
"pattern"
"landing"
"rollout"
"go around"
"taxi in"
"shutdown"
"postflight support"

If the AI object is not an aircraft under ATC control, the string is one of:

"Sleep"
"Waypoint"
"Takeoff"
"Landing"
"Taxi"

This string also appears in the State column of the Traffic Explorer tool dialog. See Note 1. String N -

So the below should show the state?

Code:
<GaugeString> %((C:ITrafficInfo:C:AI TRAFFIC STATE, string))%!s!</GaugeString>

My thinking is if I can first retrieve the state I can then look into setting something to make the aircraft active, like the master battery.

I also found this thread which shows how to retrieve the state using SimConnect.

Do I seem to be on the right track?


I've also just noticed that all the aircraft I want to show Squawk 1234.

So is there something similar to below that I could include?

Code:
if 1234 (C:ITrafficInfo:C:TRANSPONDER CODE, string)
       { 1 == (C:ITrafficInfo:C:ELECTRICAL MASTER BATTERY, bool) }
 
Last edited:
Further progress made.

I downloaded the XML Vars gauge by Doug Dawson.
It showed that no matter what value I set in the (&gt;L:Filter) in session_info.xml, it would always show as 25.

So I started looking at the radar_settings.xml and found the code below.

Code:
(L:VehicleObjectDetail) 2 == if{
   6 (&gt;L:VehicleObjectDetail)
   0x19 (&gt;L:Filter)
   quit }

I changed the value 0x19 to 121 to include sleeping aircraft and the aircraft I wanted started to show in the session info.
So aircraft with an "init" status are the same as "sleeping" aircraft.

So I now have all the Aircraft I wanted to show in the Session info but still can't see a blip on the radar screen.

So does anybody know how to show sleeping aircraft on the default radar?

It will be a filter setting somewhere but I'm still looking.
 
or how to include an if statement in XML?

If state = init or squawk = 1234 set take off from an airport or set battery state to 1.

I have included a picture below of an FSX multiplayer session I started and an aircraft on the radar from a pilot client.


OK there is no session information on the aircraft in multiplayer, but they are on the screen with a callsign and can be vectored.

The same setup in single player results in the same and with the session info information.

But I had to right click the aircraft in the Explorer and set it to take off manually in order to show it on the screen in both multiplayer and single player mode.

I just need an XML IF statement. :scratchch
 

Attachments

  • multiplay.png
    multiplay.png
    193.3 KB · Views: 436
Finally got this working by editing one of the SDK examples to show the aircraft, instead of editing the radar guage.

Thanks for everybody's help.
 
Back
Top