# Compensating for bullet drop

1. Dec 18, 2013

### Dux

I'm hoping that someone on this board can tell me where I'm going wrong here.

Basically, I'm trying to calculate the upward angle at which one would need to aim a gun in order to fire a bullet to perfectly compensate for the effect of gravity on the bullet during the course of its flight over a given time and distance. Using standard kinematic equations, I have come up with the following:

-1/2gt^2 + Vi * t = Dv

g = acceleration due to gravity, 9.8
t = time
Vi = initial upward velocity
Dv = total vertical displacement

My thought was that simply making Dv equal to 0 and solving for Vi, I could determine the initial upward velocity I would need to counteract the downward acceleration due to gravity like so:

-1/2gt^2 + Vi * t = 0
-Vi * t = -1/2gt^2
Vi = 1/2gt

I then figured I could combine this number with the total magnitude of the bullet's initial velocity (the bullet's muzzle velocity) and use a little trigonometry to determine the angle like so:

θ = asin(Vi/V)

This produces an angle that seems fairly reasonable, but when I plug it into a ballistics simulation I'm using, the result is that the bullet actually falls slightly below the point of aim. The longer the distance/time, the more pronounced the error becomes. At distances beyond 600 meters, the error starts to become very substantial.

I feel like I must be missing something. Anyone have any ideas?

2. Dec 18, 2013

### turbo

If you want to understand ballistics, you must understand that bullet-drop is proportional to the horizontal component of the bullet's trajectory. If you are a hunter shooting at a deer, do you aim high or low when the deer is up-slope from you? How about when the deer is downhill from you? In each case, the horizontal component of the shot is reduced. Does this help?

3. Dec 18, 2013

### dauto

How sophisticated is you ballistic simulator? does it include friction?

4. Dec 18, 2013

### Dux

In both cases, you would need to aim lower than you would at the same distance on flat terrain. However, I am not sure how this ties into my bullet drop compensation calculation.

It includes a basic air friction model, yes. The calculation for air friction is as follows:

a = -kv^2

a = acceleration due to air friction
v = instantaneous velocity of the bullet
k = a constant (based on bullet size/shape)

This can be integrated twice to arrive at the formula for time of flight, which is as follows:

t = (1/(V * k)) * (exp(D * k) - 1)

V = muzzle velocity (total initial velocity)
D = distance to point of aim
exp = the exponential function (e to the power of...)

I have verified that the formula for time is accurate within the simulation.

5. Dec 18, 2013

### thegreenlaser

I'm not sure if this will be the answer, but I just want to make sure you're aware of an approximation you've made. Technically, the air resistance force isn't purely horizontal; it will point opposite to the instantaneous velocity. You've implicitly assumed within both of your calculations (in this post and your original post) that the friction force is purely horizontal even though the bullet's velocity has a vertical component.

Now, that might very well be a reasonable approximation since I'm assuming the bullet's trajectory is pretty close to horizontal. However, it might be worth doing a little estimation just to make sure your assumption is actually reasonable. I would personally calculate the vertical and horizontal components of the friction force as the bullet leaves the barrel, just to get some idea of how big those forces are. You're neglecting the vertical friction force in your calculations, so you should hope that it's small compared to the other forces involved (like gravity). Here's exactly what I would calculate:

Let θ be the inital angle and V the initial muzzle velocity. V you should know, and pick the largest reasonable value of θ you would ever expect to see based on your calculations so far. Then the initial friction force will have magnitude

Ffric,tot = mkV2

and it will point opposite to the initial velocity vector (at angle θ). So, initially, the vertical component of the friction force will be

Ffric,vert = mkV2 sin(θ)

and the horizontal component will be

Ffric,hor = mkV2 cos(θ)

and the gravitational force will, of course, be

Fgrav = mg

Now, pick some value of the mass m (it doesn't actually matter here... m=1 is probably the easiest) and calculate those four forces Ffric,tot, Ffric,vert, Ffric,hor, Fgrav for the largest value of θ you would expect to see. If your approximation is correct, you should find that:

Ffric,vert is very small compared to Fgrav
Ffric,hor is almost equal to Ffric,tot

If you find that either of those things are not true, then your implicit approximation that the friction force is purely horizontal is probably not a good approximation, in which case you'll probably end up with an ugly differential equation to solve...

Again, I don't know if that's going to fix your problem, but it might be worth checking.

Last edited: Dec 18, 2013
6. Dec 18, 2013

### Dux

@thegreenlaser:
Thanks for bringing that up. You're right, but the kind of angles we're talking about here are typically less than one degree; the drag in the downward direction is negligible. I have tried adjusting for it in the simulation, but it doesn't have a noticeable effect on the results.

7. Dec 18, 2013

### cjl

Unless I'm missing something, this is really quite simple.

Your model is a pure ballistic trajectory - no drag. Your simulation includes drag. Therefore, at long ranges, the travel time will be significantly longer for your simulation than for your mathematical model, resulting in significantly more drop.

8. Dec 18, 2013

### Dux

The travel time calculation I am using (see above) accounts for drag. It's actually based on the equation that the simulation engine uses for drag.

9. Dec 18, 2013

### AlephZero

Can you compare your simulation program with a different one? I would expect the program is using numerical integration to find the path of the bullet. AFAIK there is no "exact" solution, except for a few things like your formula for the time of travel (and that formula ignores gravity, though if you are only have angles of 1 degree, from a straight line path, that might not be too important).

There are plenty of poor ways to do numerical integration - in fact people get taught some of them in physics and engineering "numerical methods" courses, judging by some of the questions on PF! Being an expert on ballistics doesn't necessarily make someone an expert on numerical methods as well.

10. Dec 19, 2013

### jhae2.718

Along those lines, if you rearrange your equations into a form $\dot{y} = f(t,y)$ something simple like a 4-th order Runge-Kutta method should be a decent starting point. (If you have access to MATLAB, ode45 is a great generic numerical solver for initial value problems.)

I would probably derive the vector kinematics using curvilinear coordinates for my equations of motion instead of using the simplistic projectile motion equations.

11. Dec 19, 2013

### Andrew Mason

You may wish to look at this thread where a similar question was considered.

The analysis should work fine if the target is within a few degrees of horizontal.

AM

12. Dec 23, 2013

### Dux

All of this was pretty much over my head. Could you break this down a little further?

Your equation in the last post of this thread is essentially exactly what I've been using, but it produces an angle that is too small (close to accurate at shorter ranges, but substantially off once bullet flight times come up to a full second or more). I can't figure out why that is.

13. Dec 23, 2013

### Andrew Mason

How are you determining flight time? You cannot use range/muzzle velocity.

AM

14. Dec 30, 2013

### Dux

Flight time is determined by the following equation:

t = (1/(V * k)) * (exp(D * k) - 1)

V = muzzle velocity (total initial velocity)
k = a constant (based on bullet size/shape)
D = distance to point of aim
exp = the exponential function (e to the power of...)

That equation was derived from the equation that the simulation uses to determine (negative) acceleration due to drag:

a = -kv^2

a = acceleration due to air friction
v = instantaneous velocity of the bullet
k = a constant (based on bullet size/shape)

I've verified that the time of flight equation is accurate.

15. Dec 31, 2013

### Andrew Mason

Drag has to be measured. There many factors / conditions that can influence drag. The only way to verify your equation is find a way of actually measuring time of flight. If the bullet is stable during flight, bullet drop is actually a pretty good way to measure flight time. The time of flight is just: $$t = \sqrt{\frac{2s}{g}}$$ where s is the vertical drop.

If the bullet is not stable (i.e. it yaws during flight) it will prescribe a spiral path so drop will not be consistent.

AM