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

How can I command AI Traffic like traffictoolbox?

Messages
5
I want to command AI traffic to turn left/right, descent/climb, and landing clearance.

Of course, traffictoolbox.dll does it perfectly, but can't invoke these function in my apps. (also, they seems to not have export table to other app.)

How can I implement these fucntion?

Thanks for read.
 
I haven't been able to work this out either. I was wondering whether the export table would be useable, but I'm afraid my knowledge of programming doesn't extend that far. I have been trying to work through Cyril Hruscak's FSGUI Module User's Guide to see if I can work out how to use the functions in the traffictoolbox. His guide is at http://library.avsim.net/search.php?SearchTerm=cyril+hruscak+fsgui&CatID=root. I principally want to be able to create and delete AI aircraft with customised flight plans.

In terms of manipulating the control of aircraft, though, this is possible through FSUIPC. I wrote a smalled multi-threaded application and assigined a thread to each AI plane, and was then able to send all sorts of commands to the aircraft, including bank, pitch, yaw, gear up and down, and so forth.

The offsets to use are at 2900. The control ids for the offset usage are contained in Pete Dowson's control list at http://www.schiratti.com/files/dowson/FS2004controls.zip.

I think these controls are what AISmooth utilises.

However, if anyone out there has any ideas on how to access the traffictoolbox functions, please share them!

Additionally, if anyone has any thoughts on how to change runway assignments for AI, please share them too. That's my other dream - to work out how to change those. Then, as they say, my FS9 experience would be complete.

Bryn.
 
Additionally, if anyone has any thoughts on how to change runway assignments for AI, please share them too. That's my other dream - to work out how to change those. Then, as they say, my FS9 experience would be complete.

You open all runways using my crosswind runway technique embedded into ADE. Now you close the runway that you do not want AI Planes to use. Any ILS approach code is a non-weather approach and causes the runway selection to carry a very high score.

Once you have the crosswind runways working then you can also apply the weight restriction runway code so certain size AI planes use certain length runways.

If you are working on FS9 then you use AFCAD 2.21 to set up the crosswind runway technique but it requires a little more work.

All of these techniques are part of the original XML coding but ACES did not turn on the coding in some cases so we have to do it manually.
 
Last edited:
Jim, indeed this works - I am a big fan of your work and research and have applied it in my own little way around the place.

To be clear about my 'dream' though, I would like to be able to assign a runway directly to an AI aircraft. This way, I could vary runway allocations to fit my own rules. This would help with runway congestion and realism. Consider some coastal airports with parallel runways - KSEA for instance. It would be good to assign arrivals and departures to all three runways, rather than have 90 per cent go to 34R/16L.

Ideally, if I could directly control the runway allocation, I could then write a simple program that assigned runways based on proportion of overall traffic, aircraft size, airline, time of day, winds, or anything else that took ones fancy. This could all be captured in a simple xml file, which could then be shared with the community.

Does anyone have any ideas on where and when this information might be written in memory? (And then... any ideas on how one preempt it?)

Cheers,

Bryn.
 
Bryn

I cannot help you with finding the code that would directly control the runway allocation.

I use the Empty Weight value in the aircraft.cfg to control AI/User runway selection. This allows me to open all parallel runways such as KATL (5 runways) and the allocation to each pair of parallels is ATC controlled by size of plane.

I have this working and bundled with the ImagineSim FS2004 KATL download and my own FSX KATL if SP1a is used. SP2 is less forgiving with backward compatibility and my compiled SCASM overlayed runways can have an effect on AI Planes when cast shadows on ground is selected.

I also cross paralleled all the FSX EHAM runways then set 04/22 to 6500 ft length. ATC will not vector any plane to use that runway for takeoff or landing if it exceeds EW 74,000 lbs in the aircraft.cfg.

I realize you want to do all coding on the front end of the AI where I am unlocking some code that FS uses to control AI/User plane on the XML compiled bgl side of the code.
 
We should set up a developer prize to create an incentive to find out these tricky things.

I'd pay $500 for the first person to create a small programmatic interface that allows me to create a program that can assign runways to individual aircraft for takeoff and landing!

Bryn
 
Back
Top