What the command for finding the gun's elevation ?
Hah! Zat ees nussing, my slow-witted minions! ;D
Just kidding ya.
Seriously, though.
If you want to find the elevation, and azimuth of the gun (or the shell it fired), this is what you can do.
Soon after the shell leaves the barrel, you take a two samples of the shell's location.
So sample 1 = (x1,y1,z1),
and sample 2 =(x2,y2,z2).
Regardless of whether projectiles in OFP follow a semi-circular, parabolic, or other type of trajectory, if you take the two sample pretty close to each other, then the path between them approximates to straight line.
Which is what you need for elevation.
STEP 1:
To make life easier for yourself, do a transfer of coordinates, so that Sample 1 is your origin (0,0,0), and Sample 2 becomes
(x2-x1,y2-y1,z2-z1). So just call Sample 2 values as (X,Y,Z).
STEP 2:
To find the gun's Azimuth do the ArcTan (or Tan Inverse) of the ratio (X/Y). That is Azimuth=Arctan(X/Y).
Be sure not to confuse degrees with radians.
I believe OFP accepts degrees, so your Azimuth answer should be in degrees.
STEP 3:
Define a value R=[(X^2)+(Y^2)+(Z^2)]^(0.5).
That is the square root of the sum of the squares of X,Y, and Z.
GUN ELEVATION = ArcSine(Z/R)=Elevation Angle.
Again don't confuse degrees with radians.
STEP 4:
There's probably an easier way to do this with Vector Algebra, but I'm too lazy to look it up.
Someone please correct me if I've made a mistake.
Ain't math sweet. ;D