Acceleration (and deceleration, which is just acceleration with a minus in front of it) is defined as the change of speed with regards to time, ie. mps/s; a constant acceleration of +9.8m/s^2 means that an object's speed grows 9.8m/s in one second. 2s*9.8m/s^2=19.6m/s after two seconds, etc. Generally, for a constant acceleration
a you can calculate an object's speed at time t, with the initial velocity v0 with the function:
v(t) = a*t + v[sub]0[/sub]This means that your algorithm for constant vertical deceleration (the new setVelocity code) is valid. It
should produce perfect parabolic trajectories, but you have to remember that you can't disable the physics engine in its entirety, and it could create anomalies at range limits - it has a .01 sec window in which to screw things up by accounting for air drag and slowing the shell minutely. Though, this is just a guess; I don't have that deep knowledge of the inner workings of the game. You could, though, use setpos to guide the shell precisely through the trajectory.
Extremely short-range shots will not obey the range equation, by the way - you have a rotating and tilting barrel, the muzzle of which defines the starting point of the trajectory. The starting height will vary according to the angle at which the gun is tilted. Still, that's not a major concern, as you can just aim through the sights in that case

As for the launch angle, you can derive it from the Pythagorean theorem and basic trigonometry, provided you have the initial velocity vector. You have to consider that you have the vertical component of velocity, z, and the horizontal components x and y. First, you need the total horizontal component xy = Sqrt (x^2 + y^2) as per Pythagoras, and then you can consider this probably poorly done ASCII drawing of a vector triangle:
xyz
/| z
/ |
/ |
/ |
/ |
/ |
/ a |
------------->
xyHere you have the horizontal component xy, the vertical component z and the total muzzle velocity xyz (whose magnitude is given by Pythagoras: xyz = Sqrt(x^2 + y^2 + z^2), or from the muzzle velocity recording event handler I presented before) and the angle a, which is the launch angle. Then, from trigonometry you can see that tan a = z/xy, or as well, sin a = z/xyz or cos a = xy/xyz, so you get a = atan z/xy = asin z/xyz = acos xy/xyz.
Then, to show off
advanced mathematics my progress at examining ballistics in ArmA: The realistic drag equation, where F~v^2 produces a frickin' complex solution, with an awfully awkward singularity at the limit approaching maximum range and _several_ beyond it. More of that later, first something about the relation F~v. It's solvable, quite easily. It can be tuned to give quite accurate velocity predictions, at least on MK19 at some angles, though dunno about the range, as I have kept at predicting velocities with somewhat simpler equations (yes, I'm lazy). However, my gut feeling about terminal velocity experiments says that F~v^2 is what we should be looking at, but I still have to confirm this properly.
Well, as for the math for F~v^2... it's still a bit beyond me. Fortunately, I've got my trusty
Mathematica, and here's a screenshot of my current notebook:

Yeah. How you like them apples.