Solved the projectile aiming calcs with drag

20170223, 01:58 AM
Post: #1




Solved the projectile aiming calcs with drag
Finally sat down and spent an evening working through some other solutions and got a system of equations that will aim a projectile when there is drag.
Now I need to properly test it and optimise it.. but it's looking good so far. This should allow a lot more fidelity in terms of projectile effective ranges, speeds, damage at different ranges, etc. Will have a clearer view tomorrow evening whether it works or not This is definitely something that could go back into FTD. Reviewed FtD on steam yet? It's the #1 thing you can do to help FtD (and future games by Brilliant Skies!), so please take the time! 

20170223, 02:34 AM
Post: #2




RE: Solved the projectile aiming calcs with drag
Yes! Thanks Nick~


20170223, 02:57 AM
Post: #3




RE: Solved the projectile aiming calcs with drag
wow you did it!.
Im very qurious about the method you used. Especially if it was what I haven't known. 

20170223, 03:24 PM
Post: #4




RE: Solved the projectile aiming calcs with drag
If you've written it up, I'd be interested to see the math.
I imagine this would have difficulty with air density changes with altitude in FtD. But making shells suffer constant drag at any positive altitude could resolve this. This could also replace the "effective flight time" mechanic of shells with this softer cap. 

20170223, 03:29 PM
Post: #5




RE: Solved the projectile aiming calcs with drag
(20170223 01:58 AM)Nick Smart Wrote: Finally sat down and spent an evening working through some other solutions and got a system of equations that will aim a projectile when there is drag. That's a very good thing! Will it also work when projectiles go underwater? 

20170223, 04:13 PM
Post: #6




RE: Solved the projectile aiming calcs with drag
I think it might be different equatiin but coefficients are surely different


20170223, 05:23 PM
Post: #7




RE: Solved the projectile aiming calcs with drag
(20170223 01:58 AM)Nick Smart Wrote: Finally sat down and spent an evening working through some other solutions and got a system of equations that will aim a projectile when there is drag. I recently posted a (first version of a) script on the forums which can also handle trajectories that are partially underwater . How does yours work? On a related note, what will gravity be like in Forgotten Shores? Will it have the same (slightly odd) decreasing gravity as FtD or just constant gravity at all heights? Constant gravity would make mortars a lot easier. With more realistic vehicle propulsion they might even become useable! 

20170223, 05:57 PM
(This post was last modified: 20170223 05:58 PM by HerpeDerp.)
Post: #8




RE: Solved the projectile aiming calcs with drag
(20170223 03:29 PM)Gladyon Wrote: That's a very good thing! Aiming when the projectiles are only underwater is the exact same calculation as above water with drag, except for a single constant. However, when part of the trajectory is above water and part underwater it becomes exceptionally more difficult. One cause for this is that, if the drag is constant along the entire trajectory, it is possible to consider the horizontal movement of the shell separately from the vertical movement, since the horizontal forces on the shell do not depend on the altitude of the shell. If the trajectory is partially underwater and partially above water however, the horizontal drag depends on the altitude of the shell (above water vs underwater) so you can't consider horizontal and vertical movement separately anymore. 

20170223, 08:53 PM
Post: #9




RE: Solved the projectile aiming calcs with drag
The difficult bit  and the bit I have solved  is getting code to tell you how to aim in order to hit when drag is present.
I have basically just got "linear drag equations" (quadratic drag equations do not exist) and a solver and am rotating the reference frame so that there is a "down range" axis, a "cross range" axis and an "up" axis. I then solve for the down range velocity that produces a down range impact time that allows the cross range to solve for a cross range velocity and the altitude to solve for an up/down velocity... it all solves to produce a firing solution where the magnitude of the solutions velocity equals the weapon muzzle velocity. 10k calls in 200miliseconds so should easily run fast enough. Will post code later. Reviewed FtD on steam yet? It's the #1 thing you can do to help FtD (and future games by Brilliant Skies!), so please take the time! 

20170223, 09:05 PM
Post: #10




RE: Solved the projectile aiming calcs with drag  
« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)