Why are created AI planes deleted?

obinder
Posts: 130
Joined: Sun Jun 08, 2014 9:43 am

Why are created AI planes deleted?

Postby obinder » Sun Nov 24, 2019 2:11 pm

Hello @ll,

one of my apps makes extensive use of "AICreateParked" and "AICreateEnroute". It has come to my attention that the simulator decides to delete aircraft that were created this way seemingly at random. And in some cases, it outright refuses to create them (Ex. 22).

What are the criteria that P3D applies when it deletes an AI aircraft that is flying along a flight plan and that has been created by a client? And why aren't some aircraft created? Should I be looking for a problem with the flight plan, with the model, with the location..?? Is there any more information to be found about the cause of a delete or an Exception 22?

From my perspective it would be better if the sim didn't delete objects that have been created by a client. Instead, additional Exception codes warning about problems with the flight plan or the model itself would be welcome.

But the main reason I am asking is, that failed creation or a delete by the sim usually leads to stutters. If that happens on a larger scale, that becomes very annoying.

Best regards
Oliver Binder
Lorby-SI

Pete Dowson
Posts: 590
Joined: Sat Dec 18, 2010 3:45 pm

Re: Why are created AI planes deleted?

Postby Pete Dowson » Sun Nov 24, 2019 11:18 pm

one of my apps makes extensive use of "AICreateParked" and "AICreateEnroute". It has come to my attention that the simulator decides to delete aircraft that were created this way seemingly at random. And in some cases, it outright refuses to create them

I assume you are not using FSUIPC's Traffic Limiter, or some other limiter? They work by deletion.

Pete
My System

Win10: 1909 build 18363.592
Processor: I9 9900KS at 5.5GHz
Mobo: Maximus XI Extreme Z390
Memory: 32Gb at 3900 MHz.
GPU: RTX 24Gb Titan
Displays: 2 x 2160p projectors at 25Hz onto 200 FOV curved screen
P3D4 set with 2 windows using ViewGroups

obinder
Posts: 130
Joined: Sun Jun 08, 2014 9:43 am

Re: Why are created AI planes deleted?

Postby obinder » Mon Nov 25, 2019 4:47 pm


I assume you are not using FSUIPC's Traffic Limiter, or some other limiter? They work by deletion.

Pete
Hello Pete,

that goes without saying. It would be awkward to develop an AI traffic app while running a limiter ;o)

My problem lies within the simulators own logic. I just can't find the reasons why it won't accept some flight plans and/or locations apparently. I only get the usual Exception 22, or the sim just removes a plane in flight or on the runway. I know that I am not doing it, and nothing else is either. I would prefer the same logic that is applied to other sim objects - when they are created by a client, only the client can delete them.

Best regards
Oliver Binder
Lorby-SI

User avatar
Blaunarwal
Posts: 306
Joined: Tue Jun 12, 2012 1:37 pm
Location: LSZH

Re: Why are created AI planes deleted?

Postby Blaunarwal » Wed Nov 27, 2019 10:00 am

Maybe there are enough parking spots on the destination airfield, but not the right ones or they are already occupied. But as a Pro, you certainly have considered this. I just don't know any other reason for AI to be deleted.

Dan
Image

obinder
Posts: 130
Joined: Sun Jun 08, 2014 9:43 am

Re: Why are created AI planes deleted?

Postby obinder » Sun Dec 01, 2019 4:32 pm

Maybe there are enough parking spots on the destination airfield, but not the right ones or they are already occupied. But as a Pro, you certainly have considered this. I just don't know any other reason for AI to be deleted.

Dan
Hello Dan,

no, that is not it. To be clear: I am not talking about BGL based traffic. I am calculating the flight plans live, from the real world traffic, and inject AI planes using the SimConnect API. But that is not the whole story either.

Like just right now, my LLTX app is running and wants to place a couple of static helicopters (not AI, just as simple objects) and they are immediately deleted by the sim without any explanation (=no exception, just stutters). When I restart the sim and the app, everything works normally again. It doesn't happen every time, it is as if the sim has moods.

Point being, it would be nice to get a little more information about why things are happening on the API. A generic exception code 22 (or no exception at all) just isn't enough to go on. Trial&error is really no way of writing good software, but it is the only thing left in this situation - and when that gets too time consuming, I just have to give up.

Best regards
Oliver Binder
Lorby-SI


Return to “SimConnect Interface Questions”

Who is online

Users browsing this forum: No registered users and 1 guest