P3D Missile Example move in zigzag.

For topics related to the creation of simulation objects (SimObjects). This includes development of aircraft, ground, and maritime vehicles.
Post Reply
rtv_bwkim
Posts: 3
Joined: Wed Nov 06, 2019 5:57 am

P3D Missile Example move in zigzag.

Post by rtv_bwkim »

Im using P3D v4 Pro Plus.

To design custom dynamic model, i just add SDK sample missile model to add-on list and fire this missile.

The problem is that missile move in zigzags and missile is juddering.
But, the trajectory of missile is smooth.

For Problem,
1) I change a parameter(Simulation Rate) of function, (RegisterSimulation) : not resolve problem
2) The dynamic model in sample code(Missile.cpp) is solved by numerical solution, Euler Method.
So, i change other numerical method, 4th Runge-Kutta method : not resolve problem
3) I attach to running prepar3D v4 Pro Plus with the Visual Studio Debugger and follow the parameters of missile (ex. position, velocity, force, moment, etc..)
But. that parameters is not weird on flying missile. : It also doesn't resolve problem

Hmm...
How do I resolve this problem?
Which parameter or setting make moving weapon model more smooth?
rtv_bwkim
Posts: 3
Joined: Wed Nov 06, 2019 5:57 am

Re: P3D Missile Example move in zigzag.

Post by rtv_bwkim »

Oh, I found a way to fix this problem.

A weapon as SimObject has simulation rate.
and User can set simulation rate of Prepar3D.
It seems that Both are not same things.

I think that problem i have is about model synchronization.

The Simulation rate for weapon is used for numerical solver of dynamics model about a weapon and the one for Prepar3D setting is used for rendering Prepar3D model and terrain.

Yet, i can't find BEST way to resolve it.
The way i found is to set low simulation rate of Prepar3D.
or other reader may set simulation rate of weapon from the one of Prepar3D
Post Reply