Page 1 of 2
Bullet Drop
Posted: 2004-09-13 19:06
by claygast
Just to let any coders know, if you want realistic bullet drop, that the acceleration of gravity is -9.8 meters/(second^2), meaning that every second, the bullet's vertical velocity increases in the downward direction by 9.8m/s. I don't know if this helps, but from this you may be able to derive THE MOST realistic bullet drop physics known in a mod.
*So, assuming that the drop bullet feature is a random numerical value, say 1-100, that I could help you guys find the most possibly realistic ingame drop. IDK, I'm guessing I could... Not an expert...
Posted: 2004-09-13 19:57
by ArchEnemy
Thanks for the information.
BTW "-9.8 meters/(second^2)," what do you exactly mean by the "^2"?
Posted: 2004-09-13 21:59
by DrZero
Get out of my house!!!!!!!
im the head of physics here Spart
also, theres far more than gravity to account for when you are calculatiing bullet drop, you forget momentum, inertial reisitance, friction, dynamic propulsion.... so much
also the ^2 means "squared" or, to the power of 2
Posted: 2004-09-13 22:37
by Dirtball
I'm curious how some of those items will affect bullet drop. Resistance is obvious as the air is going to impart some force on the object....but the impact of the rest is evading me.
Posted: 2004-09-13 23:08
by Anti-}{ero
[R-DEV wrote:DrZero]
momentum, inertial reisitance, friction, dynamic propulsion.... so much
also the ^2 means "squared" or, to the power of 2
im comfuzzed *scratches head* big words
Posted: 2004-09-14 00:52
by claygast
[R-DEV wrote:DrZero]Get out of my house!!!!!!!
im the head of physics here Spart
also, theres far more than gravity to account for when you are calculatiing bullet drop, you forget momentum, inertial reisitance, friction, dynamic propulsion.... so much
also the ^2 means "squared" or, to the power of 2
But those are somewhat negligible given that the bullet's shape minimizes all of those.
Posted: 2004-09-14 03:50
by DrZero
it minimizes things but, it still has an effect, also, evil homer, i thought you were a physics teacher? bah, whats with nobody knowing anything about physics

Posted: 2004-09-14 04:01
by Dirtball
As a physics major I do have some (lol) expierence with what he is describing...but Not always with the same names. Most of what he mentioned would effect (from what I can tell) the velocity as it leaves the barrel (spin rate and velocity) and the way is strikes it's target (momentum)...but those have 0 effect on the actual hit point so I'm lost where they come into play in calculating the bullet drop. All that is necessary to very accurately calcuate the bullet drop is gravity. A lesser effect of wind resistance does come into play...but as calculating the actual equation for wind resistance is VERY complicated involving some nasty nasty math and a level of fluid dynamics I don't have yet and probably won't for at least 2 year maybe more, I don't fell like figuring it out. The effects of resistance would be > 5 orders of magnitude less than the order of magnitude of the solution. Meaning that if the drop due to gravity was 3cm, then the drop due to resistance slowing would be <.00003 cm.
oh and that is for small distances...small being like <300yds or so for a medium velocity bullet such as a m16 might use. Lower velocity bullets (Pistol)would be less effected by wind resistance than higher velocity bullets (closer to laminar flow due to lower velocity), But on the other hand higher velocity bullets (Sniper rounds) would be effected to a greater degree due to the higher muzzel velocity. But keep in mind the higher muzzle velocity is countered by less dop due to gravity (shorter air time over same distance) and a better shape to limit non-laminar (turbulent) flow. Basically correct me if I'm wrong, but with the eception of gravity all other effects are negligble, with the possible exception of wind resistance on very long range shots, but even that will be very small.
Posted: 2004-09-14 04:20
by DrZero
see, i have that fluid dynamics knowledge
the thing is, when you are calculating wind resistance you need to use things like momentum and the intert density of air, if you want i can explain some stuff to you

Posted: 2004-09-14 06:29
by Evilhomer
[R-DEV wrote:DrZero]see, i have that fluid dynamics knowledge
the thing is, when you are calculating wind resistance you need to use things like momentum and the intert density of air, if you want i can explain some stuff to you
he does physics to a level far higher than my academic stream (I have allways been useless at lessons, teaching GCSE is about as much as I can do, hence the reason I joined the army.)
But from what I can determine of what he's saying, yes, momentum indefinetly would play a determining path of a bullet, as would the rate of spin and the air resistance. However small they may seem on a bullet going very fast, a bullet shot over a mile would not be travelling at the same velocity as when it came out of the barrel, hence it's trajectory will decrease. (Im really glad he's doing this and not me!).
Posted: 2004-09-14 08:41
by DrZero
lol, sorry, i dont mean to undermine you or anything evilhomer, i understand where you are coming from, gravity will play a far larger role on the course of the bullet than air resistance will but i just want to make things as realistic as possible
i'll teach you some stuff

you can pass it onto your students, give them a lesson in pre-PhD fluid dynamics

maybe you or one of your students will be able to help me

Posted: 2004-09-14 16:05
by ArchEnemy
i have some feelings that i will have some difficult to code this

Posted: 2004-09-14 18:26
by Dirtball
Not going to be difficult at all...it's just math. I'm sure he'll be doing the calculus and handing you plain old equations...not to mention a lot of the factors will simply be constants based on the type of bullet being fired for our purpose. Obviously beware though that constant math calculation will lag even the best computers. I could see us having issues calculating wind resistance effects for anything except sniper rounds. The innaccuray and gravitational effects will be many orders of magnitude greater than the effects of wind resistance so pistols and assualt rifles. On the other hand shooting a .50 berrett (might be spelled wrong lol) at it's maximum effective range the air resistance drop in velocity will be an important calcuation.
As for coding the calculation is actually pretty damn simple, you need to have a velocity x and y, x will be equal to the V_m (muzzel velocity)*cos(theta) - integral((F/m)*t*(dF)). The integral part is the hard part, that's where DrZero has to step in with a equation for the F vs. Time. And unless we go really overboard the v_y = v_m*sin(theta)-9.8*t. Do realize that the expansion for F could be very complicated and would probably require a goodly number of long double type variables, hence the reason why having 20 or so full auto weapons firing could quickly leading to an overwhelmed processor and memory. That is my concern.
Posted: 2004-09-14 18:34
by BlakeJr
That's easy to solve. Just make the game turn based..........
Maybe better forget that one, huh?

Posted: 2004-09-14 22:26
by DrZero
The way i'm doing it, i will end up with a simple y=(something different for each round). By creating an axis along which each bullet flys from when its fired, this will cut down the CPU usage immensly.....
also, wind resistance is extremely complicated, i can do it, but even with me, starting my PhD in a few days.... it takes me a good 20 minutes per equation

and they are extremely messy and never very fun

Posted: 2004-09-14 23:03
by Bumlingfool56
i am confuzzled.
oh well im just glad im not part of this project because if i had do this the bullets would be lets say a meesly 20 meters off.

ops:
and thats not very realistic now is it
Posted: 2004-09-14 23:03
by DrZero
im aiming for accuracy down to 2-3cm from real life at 1000m
Posted: 2004-09-15 03:55
by Black Beret
[R-DEV wrote:Dirtball]I could see us having issues calculating wind resistance effects for anything except sniper rounds.
I'm not quite sure what you mean by this, Dirtball.
Posted: 2004-09-15 05:22
by DrZero
Wind resistance is an extremely complicated equation, you have to take in to account about 7 factors, it takes me about 20-30 minutes to do a wind resistance calculation of 1 bullet, its about 4 pages worth of working out... thats a big load on the CPU, we dont want every gun to be killing the CPU with equations like that 10 times a second
Posted: 2004-09-15 15:09
by Alpha_Lima
[R-DEV wrote:DrZero]im aiming for accuracy down to 2-3cm from real life at 1000m
You planning that for all weapon fire (including tanks and artillery) or just sniper rounds?