Bullet Drop
-
claygast
- Posts: 62
- Joined: 2004-07-23 02:06
Bullet Drop
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...
*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...

-
DrZero
- Retired PR Developer
- Posts: 936
- Joined: 2004-07-24 12:00
-
Anti-}{ero
- Posts: 159
- Joined: 2004-08-14 15:32
-
claygast
- Posts: 62
- Joined: 2004-07-23 02:06
But those are somewhat negligible given that the bullet's shape minimizes all of those.[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

-
Dirtball
- Posts: 101
- Joined: 2004-07-28 03:06
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.
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.

-
Evilhomer
- Retired PR Developer
- Posts: 2193
- Joined: 2004-08-03 12:00
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.)[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![]()
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!).

-
DrZero
- Retired PR Developer
- Posts: 936
- Joined: 2004-07-24 12:00
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 
i'll teach you some stuff
-
Dirtball
- Posts: 101
- Joined: 2004-07-28 03:06
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.
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.

-
DrZero
- Retired PR Developer
- Posts: 936
- Joined: 2004-07-24 12:00
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 
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
-
Bumlingfool56
- Posts: 87
- Joined: 2004-08-18 18:46
-
Black Beret
- Retired PR Developer
- Posts: 2022
- Joined: 2004-07-23 12:00
-
DrZero
- Retired PR Developer
- Posts: 936
- Joined: 2004-07-24 12:00
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
-
Alpha_Lima
- Retired PR Developer
- Posts: 313
- Joined: 2004-09-04 12:00




