Jump to content
The simFlight Network Forums
Ray Proudfoot

Ai refresh problems on STB

Recommended Posts

I'm running P3D v3.4 and STB (versions unknown but they are the latest after a check) on a server / client setup.

I'm using a utility that checks the departure time for Ai aircraft and if that time is more than 90 mins ahead it deletes them. Well, they don't get deleted immediately but they are removed from the gate they occupy and placed within the 40nm 'bubble' in P3D. Several minutes later they are deleted.

I'm doing this because when I arrive at airports like LPPT all the terminal gates are occupied by Ai and many won't be departing for several hours.

But the problem is STB is not updating its display to reflect these changes. I even closed the client and server applications and started them again a minute later. The same Ai aircraft were shown on STB but they didn't actually occupy the gate STB showed them at.

Can you offer any reason why this is happening please? Shouldn't STB refresh its data many times a minute? What is the default refresh time? The server runs on a i7 4770K and the client on an i5 so plenty of processing power.

Share this post


Link to post
Share on other sites

STB does not poll for refresh for most of the information it requires.  Instead it asks to be notified when something changes, a programming pattern that was introduced with SimConnect and is a very popular model in software engineering today.  For your situation it sounds like one of the following has occurred:

1) For some reason we are not receiving notifications from the simulator

2) Internally within Prepar3D the gate information is not changing.  If a third party simply relocates an AI to new coordinates, I don't think that does anything for the simulator's gate allocations (and runways too as appropriate).  The only way this can change is for the AI to go through it's normal workflow as driven by the simulator.

3) Maybe it's not being deleted correctly and the simulator still has knowledge about it, if it persists on the board after disconnecting and reconnecting the STB client.  The "correct" way is to invoke a method in one of the runtime simulator DLLs, as a suitable method does not exist in SimConnect.  I've seen some applications simply move the aircraft beyond the "reality bubble" in an attempt to force the simulator to delete, but that does not always work.

If you would like me to further qualify what is happening, please do the following:

1) Do Settings -> Columns Tab and check and enable the Object ID and State Columns in all three sections.

image.png.c7492fc4be6a215be506c93ab520aca7.png

2) Set up a trace as per appendix C of the user guide

3) Reproduce the problem, send me the trace file and tell me the Object ID values involved.  Better still, send a screenshot.

Thanks
Simon

Share this post


Link to post
Share on other sites

Hi Simon,

I've been busy today testing a new version of RemoveAiSleepers by Oliver Binder which removes all Ai that have a departure time more than 90mins ahead of the current sim time.

STB then updates its schedule showing those aircraft as "Departed nn:nn" where nn:nn is the time the Ai was deleted.

This is a freeware program available for all versions of FSX/P3D which you may be interested in. Scroll down to the bottom of that page. https://lorby-si.weebly.com/downloads.html

It's annoying that P3D / MyTraffic Pro inject these aircraft so many hours before their departure time. It means there are fewer gates at your arrival airport and too many effectively static aircraft at your departure one. By removing the Ai that won't depart for at least 90 mins I'm able to increase my Ai Traffic % and as a consequence see far more ground movements as a result as well as having more free gates at my destination.

I'm not attaching any blame to STB. It's just the window into what's happening in FSX / P3D.

Share this post


Link to post
Share on other sites

Hi Ray

Thank you for the suggestion, It's an interesting take on the problem of AI traffic density. It's entirely a "feature" of the simulator that future departures are "injected" so far in advance.

I could probably introduce a configuration setting that treats AI deleted at the gate differently than those deleted in the air.  Rather than "Departed at xx:xx" I could simply delete them from STB entirely.  Unfortunately I can't tell who deleted an aircraft and why, and whether it was a third party of the simulator itself.

The thing you may not like is STB for Prepar3D V3 is no longer under active development, so this is something for STB for Prepar3D V4.

Simon

 

Share this post


Link to post
Share on other sites

Hi Simon,

Don't worry. It's something I can live with until I eventually make the move to v4. I thought it might be of interest to you. When I do make the move I'll be in touch.

Share this post


Link to post
Share on other sites

Hi Simon,

I've reordered the loading of programs which results in not having a load of departed aircraft showing up on STB.

I run RemoveAISleepers from SimStarterNG and mark it only to run when P3D is ready. From FSUIPC I run the DataServer and again, only when P3D is ready.

This gives me a 'clean' STB schedule.

Share this post


Link to post
Share on other sites

Hi Simon,

I've found that even if I reduce the time on RemoveAISleepers with P3D running the multiple Departed nn:nn entries can be removed by selecting Disconnect and Reconnect on the Client.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.