January 24, 200818 yr 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?
January 25, 200818 yr - 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; }}
January 25, 200818 yr 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.
January 26, 200818 yr 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?
January 26, 200818 yr Commercial Member 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 Win10: 22H2 19045.2728 CPU: 9900KS at 5.5GHz Memory: 32Gb at 3800 MHz. GPU: RTX 24Gb Titan 2 x 2160p projectors at 25Hz onto 200 FOV curved screen
January 26, 200818 yr Commercial Member >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 Win10: 22H2 19045.2728 CPU: 9900KS at 5.5GHz Memory: 32Gb at 3800 MHz. GPU: RTX 24Gb Titan 2 x 2160p projectors at 25Hz onto 200 FOV curved screen
January 28, 200818 yr In the SDK for SP2 this has been updated. Well, the documentation has been updated, the variable is no longer marked as writable.Daniel
Create an account or sign in to comment