Nico Kaan Posted July 3, 2017 at 03:34 PM Posted July 3, 2017 at 03:34 PM Hello Ross, In my PSXseeconTraffic program I try to set the flaps of AI aircraft at several stages in the flight. I use SimConnect's event FLAPS_SET for that. The strange thing is that I manage to set the flaps when an aircraft starts at the ground and during take-off, but in the landing phase the SimConnect evenst have no effect. I cannot set the flaps in the down position... Have you any idea why, and what mechanism are you using to set the flaps of an Ai aircraft? Hope you can help me. Kind regards, Nico Kaan (developer of VMRGenerator) Nico Kaan Developer: PSXseeconTraffic, ParkPosGenerator and AILGenerator Link to comment Share on other sites More sharing options...
Ross Carlson Posted July 3, 2017 at 04:23 PM Posted July 3, 2017 at 04:23 PM I use the same event ... maybe the difference is the way you create the aircraft? What SimConnect method do you use to create it? Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy Senior Controller, Boston Virtual ARTCC Link to comment Share on other sites More sharing options...
Nico Kaan Posted July 4, 2017 at 06:32 AM Author Posted July 4, 2017 at 06:32 AM I'm using SimConnect_AICreateNonATCAircraft to create an aircraft. When I receive the SimConnect message it has been created I send these three events KEY_FREEZE_LATITUDE_LONGITUDE_SET, KEY_FREEZE_ALTITUDE_SET and KEY_FREEZE_ATTITUDE_SET, because I "slew"aircraft through space myself by calculating alt, lat,lon, pitch , bank and heading 30 times per second. This goes fine at the ground and when taking of, but in the landing phase the flaps no longer respond. Nico Kaan Developer: PSXseeconTraffic, ParkPosGenerator and AILGenerator Link to comment Share on other sites More sharing options...
Ross Carlson Posted July 4, 2017 at 01:51 PM Posted July 4, 2017 at 01:51 PM I use the same method, but in addition to sending the freeze events, I also call AIReleaseControl on the aircraft when I get the object ID. Might be worth a try. I doubt this would matter, but I don't move the aircraft every 30 seconds, instead I subscribe to the sim frame event and interpolate the location at that time. That way the movement of the aircraft is in sync with the sim frame rate. Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy Senior Controller, Boston Virtual ARTCC Link to comment Share on other sites More sharing options...
Nico Kaan Posted July 4, 2017 at 06:45 PM Author Posted July 4, 2017 at 06:45 PM AIReleaseControl was the solution! Why its absence only effected the landing phase I don't know, but it now works. Thx. Nico Kaan Developer: PSXseeconTraffic, ParkPosGenerator and AILGenerator Link to comment Share on other sites More sharing options...
Ross Carlson Posted July 4, 2017 at 08:36 PM Posted July 4, 2017 at 08:36 PM Yes ... that is truly strange ... glad it helped, though. Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy Senior Controller, Boston Virtual ARTCC Link to comment Share on other sites More sharing options...
Pascal M 1430714 Posted July 29, 2018 at 10:59 AM Posted July 29, 2018 at 10:59 AM Hello, First, sorry for my English, i'm from France… I know that it's an old topic, i have a question about AIReleaseControl. From years, everything have been created, there's an application for all we want, but this time, just for fun, i begin to create my own little application. I have a problem to control a plane. The plane start, takes off, but i can control it. I understand that there's a conflict between my instructions and the AI. AIReleasControl seems to be the solution. But you guess ? I don't understand how to use AIRelease control. Is there anyone here who could give me an example of the AIReleasCOntrol use. C or VB, no matter, I just need a little help to continue. Thanks in advance Link to comment Share on other sites More sharing options...
Kieran Samuel Cross Posted July 29, 2018 at 04:44 PM Posted July 29, 2018 at 04:44 PM -snip- I find the Prepar3D SDK incredible helpful for this kind of thing, especially since SimConnect is the same throughout P3D, FSX etc. http://www.prepar3d.com/SDKv4/sdk/simconnect_api/references/simobject_functions.html#SimConnect_AIReleaseControl Kind Regards, Kieran Cross, Link to comment Share on other sites More sharing options...
Pascal M 1430714 Posted July 29, 2018 at 05:30 PM Posted July 29, 2018 at 05:30 PM Thank you Kieran, I'm going to read this. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts