So for my school project I am working on a projectile simulator and air resistance. So I have looked at this.

Equations for an object moving linearly but with air resistance taken into account?

However, how does wind (assuming it goes in a horizontal direction) change the equation for the horizontal velocity.


First be aware that, so far, you have been dealing with projectile velocity as a 2-dimensional phenomenon. This is going to have to change.

In order to conform to standard notation, you'll need to refer to altitude (vertical motion) as the z-coordinate, while horizontal will be handled by x and y coordinates. For ease of calculation, you can assume that you initial velocity has a zero component in one axis, let's say the y axis. Now the equations you're familiar with look the same, except that they are in terms of x and z rather than x and y. Let's start by looking at how to do the simulation in the absence of crosswind.

At any point, you can calculate the x and z velocities $V_x$ and $V_z$, and combine them to get the speed of the projectile, V: $$V = \sqrt{(V_x)^2+(V_y)^2}$$

Use this to calculate the drag on the projectile from the answer you linked to, then decompose the drag force into its x and z components. Apply the components to modify the x and z velocities and calculate the next step.

Now for crosswind. The simplest approach is to assume that the crosswind is much less than the projectile velocities. In this case, you can assume that velocities in the y axis don't affect the other 2 axes.

Start by calculating the relative crosswind - that is the speed of the wind minus the actual y-axis speed. In order to do this, you need to calculate the component of the crosswind which is actually perpendicular to the projectile's motion. For instance, if the wind is at 45 degrees to the projectile's direction, the crosswind sideways to the projectile will be .707 times the wind speed. Recognize that the coefficient of drag is different for crosswind than for the previous calculation, since the "regular" calculation looked at the projectile head-on, while crosswind applies sideways. Knowing the relative crosswind and the crosswind drag coefficient, use the linked answer to calculate the sideways force on the projectile, then apply this to calculate the new velocity and then the new y-axis position.

From the correction for wind direction, it should be clear that, for best accuracy, you ought to factor in the "head-on" component of the wind into the overall drag calculation, but you can always point out that the crosswind is assumed to be much lower than the projectile speed.


This is my guess for 1D motion with air resistance (drag) + wind blowing in negative-$x$ direction and projectile moving in the positive-$x$ direction:

$$\ddot x(t) = - D (v+v_w)^2$$ $$\dot x(t) = v$$

where $v_w$ is the wind velocity and $D$ is a constant.

The point is that in my opinion you cannot take wind into account simply with a constant force term. The wind is just air moving, in this case in the opposite direction of the motion of the projectile; so the relative velocity $v_r$ between air and object will be higher ($v_r=v+v_w$). Since the drag force is proportional to $v_r^2$, the presence of wind is going to increase the drag force in the way expressed in the equation above.

This is a nonlinear differential equation. To solve it analytically is no easy business, I suggest finite difference methods (a simulation).


I did something similar a while ago as a pet project.

Once you start working with wind that is not directly from behind or from the front, you move the system to a 3D system.

Subscripts denote projectile (p), wind (w) and their components (x,y,z). The first order ODE's for such a system are:

$$ \frac{dx}{dt} = v_{px} $$ $$ \frac{dy}{dt} = v_{py} $$ $$ \frac{dz}{dt} = v_{pz} $$

$$ \frac{dv_{px}}{dt} = a_{px} $$

$$ \frac{dv_{py}}{dt} = a_{py} $$ $$ \frac{dv_{pz}}{dt} = a_{pz} $$

where the acceleration of each component is given by

$$a_{px} = \frac{-0.5 C_d \rho A (v_{px}+v_{wx}) ^ 2}{m}$$ $$a_{py} =\frac{-0.5 C_d \rho A (v_{py}+v_{wy}) ^ 2 }{m} $$ $$a_{pz} = \frac{-0.5 C_d \rho A (v_{pz}+v_{wz}) ^ 2}{m}-g$$

remembering to account for gravity in the z direction

This worked out for me, though I'm not 100% sure I'm handling the wind correctly. Hopefully someone can chime in here if I made a mistake.

For your project, I hope you have a spherical projectile. It gets really ugly, really fast if it is something similar to a bullet. In that case, the moment of the projectile has to come into play as well, extending the problem to a 6 DoF system. Then, the Area of the projectile in contact with the wind changes with the rotation. With a complex shape such a bullet, you'll have to do some nasty surface area calculations to determine the drag.

PS: When simulating this, you need checks to stop the solver once the projectile "hit a target" (for e.g the ground) otherwise the integrators lose their mind. I "overcame" this by using a IF-Then-else statement where the IF condition was that if the target hasnt been reached (with a simple distance calculation), the ODE's will be as I described. Else, all ODE's will equal"0" and thus nothing will be calculated further. There is probably a better way to exit a ode45 in matlab, but im not proficient enough to adapt it for my problem.

EDIT1: The drag coefficient also changes with velocity (Reynolds number relationship) but is luckily quite well documented for a sphere. A bullet isnt that well documented though.


Not the answer you're looking for? Browse other questions tagged or ask your own question.