AI aircraft vibrates.

Discuss on the SimConnect SDK can be used by programmers to write add-on components for Prepar3D
Locked
rvDevman
Posts: 8
Joined: Wed Jan 26, 2022 6:25 am

AI aircraft vibrates.

Post by rvDevman »

Hello,

I want to make an AI aircraft (F-16) loop-the-loop on a strict route.
I found that the Waypoint feature by SimDirector does not allow such detailed specifications.
So, using SimConnect, I tried the following procedure, but the AI ​​aircraft vibrates.
Could you tell me the cause and how to improve it?

Here are the steps I took:
(1)First of all, operate the aircraft by yourself, acquire the flight specifications and save them in CSV. (Acquisition frequency is 60Hz)
(2)Next, read the CSV into the memory first, set it in the generated AI aircraft, and forcibly fly it. (Playback frequency is 60Hz)

The items to be acquired by CSV and set to AI aircraft are as follows.
-latitude
-longitude
-altitude
-pitch
-roll
-heading
-knots

I use the following function to generate an AI aircraft.
->simconnect.AICreateNonATCAircraft (containerTitle, tailNumber, init, requestID);

Second, I use the following function for the parameter set to the AI ​​aircraft.
->simconnect_set.SetDataOnSimObject (DEFINITIONS.Position, aiObjId, 0, aiParam);

I wondered if there was a conflict between the AI ​​behavior and the parameter set, so I prepared an AI object assign callback function and described the following, but the result did not change.
simconnect_set.AIReleaseControlEx(data.dwObjectID, EVENTS.AI_RELEASE, true);
simconnect_set.TransmitClientEvent(data.dwObjectID, EVENTS.KEY_FREEZE_LATITUDE_LONGITUDE_TOGGLE, 0, GROUPID.FLAG, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY);
simconnect_set.TransmitClientEvent(data.dwObjectID, EVENTS.KEY_FREEZE_ALTITUDE_TOGGLE, 0, GROUPID.FLAG, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY);
simconnect_set.TransmitClientEvent(data.dwObjectID, EVENTS.KEY_FREEZE_ATTITUDE_TOGGLE, 0, GROUPID.FLAG, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY);

What should I do to improve?
Could you please give your comment?

Thank you.
zamirk
Posts: 132
Joined: Mon Jul 21, 2014 8:39 am

Re: AI aircraft vibrates.

Post by zamirk »

I am facing same problem these days, did you fixed it?
I am using P3D v4.5.
zamirk
Posts: 132
Joined: Mon Jul 21, 2014 8:39 am

Re: AI aircraft vibrates.

Post by zamirk »

Kindly anyone from LM team?
NormanLGibson
Posts: 223
Joined: Sat Feb 04, 2012 2:41 am

Re: AI aircraft vibrates.

Post by NormanLGibson »

Have you fps set to Maximum Or unlimited.

Try dropping it to a number eg 30, 40 or 60fps.
zamirk
Posts: 132
Joined: Mon Jul 21, 2014 8:39 am

Re: AI aircraft vibrates.

Post by zamirk »

I have already tried all combinations, usually trying all my code with 30 FPS
Locked