Hi Unnamed,
We're finishing up something similar, but not entirely identical (all scripting is within the addon -- what I understand you're trying to do is take existing addons and make them work in a manner like indirect fire), but here's the set of limitations you're going to come against (I'm not discouraging, just letting you know, so if you didn't already know about them, you don't learn them "the hard way"):
1) The ShotShell simulation times out at 20 seconds, limiting the range of these weapons.
2) OFP's "Drag" isn't really drag, but the following nasty things mixed together:
A) the relation of shell speed to the maximum speed of the shell. If it hits this, it behaves "Weirdly"
B) the AoA of the shell. If you fire a shell at 80 degrees elevation (with a velocity vector like [0, 10, 100], at impact, the shell will be flying _backwards_ (e.g., [0, -5, -100] )
C) some drag coefficient, and maybe something in the P3D
D) some bizarre OFP notions of gravity and acceleration.
3) You'll be using DoWatch to elevate the muzzles, but DoWatch is not as precise as artillery needs to be.
What we did for UA was do a bunch of test firings, collect that data and store it to an array. Then we exported the array, and put it in a script as a firing table. It worked pretty well, but Denoir had this neural network thingy lying around, so he taught it the firing tables, and now we get <.1 m accuracy at 10km with one neural net call that lasts all of .02 seconds.
I don't think you'll be wanting to mess with neural networks, but table generation and table lookup is pretty easy to do.
Of course, if you _do_ come up with a formula that works, let me know