Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SimConnect and AI Traffic Generation

Featured Replies

Hi,For the past week, I have been adding GA traffic for the region I live in based on the AI Traffic working sample in the FSX SDK. One bit of info I seem to be missing is how make the flightplans roundtrip. I have searched this forum, the SDK and all over the internet looking for info, but have found none so far.1. I have tried ammending the flightplans to include a trip back to the original departure point with no success. Aircarft would take off, but circle the field???2. I cannot find anything "clear" in the api's that would suit these needs.I am not looking for someone to tell me exactly how to do this, just looking for a little direction as to the generic method used by others to generate round trip ai traffic.Thanks in advanceJohn

Hi John,As you stated, there doesn't appear to be a parameter to make flights "round trip". However, as flight plans are in XML format, you could try setting up your program to read the flight plan, reverse the order of the waypoints, write a new temporary flight plan file to the "Flight Simulator X Files" directory, then load that flight plan for the AI aircraft that just landed. For maximum realism, you'd probably want to watch the AI UNIT MODE variable, as it will set itself to "TAXI". I'd check to see if the state changes (perhaps to ZOMBIE or WAITING) when it reaches the gate, and that could be your trigger to load the new flight plan.I haven't tried it, but that's the approach I would go for. I'll add it to my wall of projects I'm working on.

That was exactly the kind of creative thinking I was looking for. I am new to the FS SDK so it will be a while before I figure out some of the better ways to manipulate data. I hope it is sooner rather than later. I appreciate in a very big way your assistance. I owe you one!John

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.