Sign in to follow this  
Guest hf_hero

Why my AI aircraft can't take off

Recommended Posts

I use SimConnect_AICreateEnrouteATCAircraft to create one AI aircraft,and place it's pln file to "C:Documents and SettingsAdministratorMy DocumentsFlight Simulator X Files" Dir.The AI aircrfat is created,but can't takeoff.It is on one park forever.What is matter?

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

- Have you looked at the status of the Aircraft in the TrafficToolBox (from the Tools menu in FSX)?- Have you tried splitting the calls? First call: SimConnect_AICreateParkedATCAircraft Then call: SimConnect_AISetAircraftFlightPlan with the ID of the created AI plane.- Do you check the exception/error messages SimConnect might return?In the first 'case' below you can retrieve the ID of your created plane, in the second you will receive exceptions. Do you see an exception after creating the plane?Daniel

void CALLBACK MyDispatchProc(SIMCONNECT_RECV* pData, DWORD cbData){  switch(pData->dwID)  {	case SIMCONNECT_RECV_ID_EVENT_OBJECT_ADDREMOVE:	  SIMCONNECT_RECV_EVENT_OBJECT_ADDREMOVE *evt = (SIMCONNECT_RECV_EVENT_OBJECT_ADDREMOVE*) pData;	  break;	case SIMCONNECT_RECV_ID_EXCEPTION:	  SIMCONNECT_RECV_EXCEPTION *except = (SIMCONNECT_RECV_EXCEPTION*) pData;	  break;  }}

Share this post


Link to post
Share on other sites

If you created the aircraft with the flight plan position set as 0, add a check for (or look in Traffic Toolbox) for the AI TRAFFIC STATE, which might need to be updated to a later stage, if it's in sleep or init or something.

Share this post


Link to post
Share on other sites

I have tested one AI traffic sample provied with FSX SDK.The result is same as above. How to add a check for (or look in Traffic Toolbox) for the AI TRAFFIC STATE?

Share this post


Link to post
Share on other sites

I notice that the Sim Var list in the Simconnect SDK lists this variable as "writable":AI UNIT MODE One of:0: Sleep1: Zombie2: Waypoint3: Takeoff4: Landing5: Taxi6: Working7: WaitingI don't know if it truly IS writable, but it might be worth trying to get FS's ATC to deal with it by writing this. For instance, write '4' for Landing or '5' for taxi?I'd be interested to hear whether this works or not. I might even try exposing it in FSUIPC so I can play with it via FSInterrogate. Pete

Share this post


Link to post
Share on other sites

>I notice that the Sim Var list in the Simconnect SDK lists>this variable as "writable":>>AI UNIT MODE Well, I've tried both reading and writing this Sim Var, and it isn't accepted by that name, at all. So either it is a complete fiction, or maybe it is spelled differently in the code. I've had a look and I can't find it. The rest of the AI variables seem to be listed in the API.DLL of FSX, but not this one.RegardsPete

Share this post


Link to post
Share on other sites

In the SDK for SP2 this has been updated. Well, the documentation has been updated, the variable is no longer marked as writable.Daniel

Share this post


Link to post
Share on other sites

It is a pity!But if Traffic Explorer can do it, how can we carry it out?

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
Sign in to follow this