1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can I command AI Traffic like traffictoolbox?

Discussion in 'Tools programming' started by bluecode, 31/12/08.

  1. bluecode

    bluecode

    Joined:
    4/8/07
    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.
  2. Indian Eagle SJ

    Indian Eagle SJ

    Joined:
    15/4/09
    Messages:
    42
    Country:
    unitedkingdom
    you can try ATC simulator
  3. brynmwr

    brynmwr

    Joined:
    29/5/08
    Messages:
    5
    Country:
    solomonislands
    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.
  4. jvile

    jvile

    Joined:
    24/1/05
    Messages:
    7,606
    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: 20/4/09
  5. brynmwr

    brynmwr

    Joined:
    29/5/08
    Messages:
    5
    Country:
    solomonislands
    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.
  6. jvile

    jvile

    Joined:
    24/1/05
    Messages:
    7,606
    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.
  7. brynmwr

    brynmwr

    Joined:
    29/5/08
    Messages:
    5
    Country:
    solomonislands
    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

Share This Page