# Implementing proportional navigation in 3D

Good afternoon guys,

is the formula for the commanded acceleration required to hit the target,
where N is the proportionality constant, λ' is the change in line of sight and V is the closing velocity.

Data I natively have:

[x,y,z] position of both missile and target;
[vx,vy,vz] velocity vector of both missile and target;
[x,y,z] vector which points from missile to target and opposite;
This is set by me but still: maximum speed of missile.

Data I can get with some calculations:

Vertical angle between missile and target (and opposite) ; Horizontal angle between missile and target (and the other way around).

That's the reference system of the game:

• λ' or the derivative with respect to time of the Line of Sight it's a concept I really didn't understand... its unit should be, in theory, Hz or (s^-1) since m/s^2 = λ' * m/s -> λ' = 1/s

• V should be pretty easy to calculate: V = v(missile) - v(target) OR
Vx = (v(missile) - v(target)) * cos (x0y)
Vy = (v(missile) - v(target)) * sin (y0z)
Vz = (v(missile) - v(target)) * cos (y0z)

• N well it's a scalar number, usually 3.

The computed acceleration will then be passed to a RK4 integrator which will move the interceptor towards its target.
To steer the missile, I will simply change its velocity vector at every update (every 1/60th of a second) and its orientation accordingly. For example: if the missile has a velocity of [0,100,0], he's going 100 m/s due y+ axis. If at the next frame it should slightly turn right, then he'll be going to have a velocity of [10,99,0] and so on.

That's the only thing left to finish off my little thesis and unfortunately I'm stuck here. In the meantime, thank you very much!

Here's a video I made, but it doesn't still actually use the Proportional Navigation law: it checks if the missile is "aligned" to its target and eventually correct its route.
That's my actual code: pastebin

That's what i've come up with but sadly doesn't work as expected:

params ["_n","_missile","_target"];
private "_a";

_vm = velocity _missile;
_rm = getPosASLVisual _missile;

_vt = velocity _target;
_rt = getPosASLVisual _target;

_vr = _vt vectorDiff _vm;
_r = _rt vectorDiff _rm;

_omega = (_r vectorCrossProduct _vr) vectorMultiply (1/(_r vectorDotProduct _r));

_a = (_vr vectorCrossProduct _omega) vectorMultiply _n;

_a


Similar questions:
Finding the components of Proportional Navigation in 2D

• It's still not so clear what you're asking, this question seems rooted in control theory. I'm on chat usually where it's much easier to have a back-and-forth discussion. Commented May 17, 2016 at 17:32
• If @MickLH is suggesting some help, hurry and get the rep needed and go have a chat with him :) Commented May 17, 2016 at 18:22
• Ok @YanKarin I think you can access chat now, I heard 20 rep is the barrier Commented May 17, 2016 at 19:08
• Oh well, can you elaborate on this question at least? At the very least, we need to know your "sensor" and your "actuator" that you'll be using to implement the control action. Commented May 17, 2016 at 19:39
• @MickLH Hello again, first of all sorry for not coming to the chat but sadly it wasn't my fault. Anyway, back on topic. The problem is much easier than you might think: it shouldn't be physically implemented by the sense that there is a seeker which is fed with information then an onboard computer calculates all the variables which are given to the thrust vectors of the missile which react accordingly. In real life, the missile seeker sits on a gimbaled gyro, the seeker rotates in the gyro to keep the target locked on and the rate at which it rotates is the LoS rate Commented May 17, 2016 at 19:46