Projectile Motion with Air Resistance and Wind

I am wondering how the general kinematics equations would change in the following situation.

If an object were fired out of a cannon, or some sort of launcher, so that it had both an initial velocity and an initial angle, and air resistance is taken into account, what would be the equations for the x and y components of the position, velocity, and acceleration.

Furthermore, I am wondering how these equations would change if there were also a wind blowing at an angle. In essence, what I would like to know is how to rewrite the kinematics equations to take into account the air resistance and moving wind and the terminal velocity.

The reason I want to know this is that I am writing a program to model this behavior, but I first need to know these equations.

Also, if possible, could someone provide some help on finding equations for the maximum height the projectile reaches, as well as the distance it travels before it hits the ground? I would like both of these to be values the user of the program can find if desired.

Oh, and in the scenario of the wind, it can blow from any angle, which means it will affect the x and y velocities and either augment them or lessen them depending on the angle at which it blows. So I guess another request is an explanation of how to obtain the set of equations (position, velocity, acceleration) for the x direction based on whether the wind angle is helpful or hurtful, and how to obtain the set of equations for the y direction, based again on whether the wind is helpful or hurtful.

I would naturally have a constraint on the wind velocity so that the object would always inevitably hit the ground, so the force of the wind in the y-direction, if it were blowing upwards, would have to be less than the force of gravity of the object, so that it still fell. Sorry, I know I'm asking a lot, it's just that I really want to understand the principles behind this. Any help at all here would be very much appreciated, but if possible, could whoever responds please try to address all of my questions, numerous though they are?

Oh, one final note. As this is being written in a computer program (python 2.7.3, to be exact), I cannot perform any integration or differentiation of the functions. Instead, I will need to create a small time step, dt, and plot the points at each time step over a certain interval. The values of the radius of the object, its mass, its initial velocity and angle, the wind velocity and angle, and dt can all be entered by the user, and the values of wind angle and wind velocity are defaulted to 0, the angle is defaulted to 45 degrees, and dt is defaulted to 0.001, although these values can be changed by the user whenever they desire.

Thanks in advance for any help provided!

-
If you are seeking an answer with a high degree of accuracy, this becomes a HUGELY complex problem dependent on multiple variables including shape of the projectile, pressure/temperature of the air, and a number of other factors. How precise an answer do you need? – Mik Cox Dec 5 '12 at 0:27
A precision of maybe .01 would be fine for my purposes. Maybe even less, depending on how time-consuming the programming is. – Chris Spedden Dec 5 '12 at 0:43
And I recognize its complexity and the variables involved, as I have been working on combining them into a few unified equations for the past few days, but to no avail. Hence my post on here, where people are undoubtedly more talented at such matters than I. Whatever you can do will be most helpful! – Chris Spedden Dec 5 '12 at 0:46
Wouldn't the wind have an effect on on the object other than just changing the relative speed? The force of the wind acting on the object would change things, would it not? The wind can act in any direction in this scenario. To clarify, if the angle of the wind is between 0 and 90 degrees, or between 270 and 360 degrees, it will be acting in the positive x direction, thus affecting the acceleration in that direction. And the same for the y direction. Also, how would I tie in terminal velocity to this situation, so that the speed increases, then slows down as it approaches terminal velocity? – Chris Spedden Dec 5 '12 at 1:30
Also, I have seen this document before, but am unsure of something in it. When they say ax = -(D/m)vvx, what does vvx mean exactly? – Chris Spedden Dec 5 '12 at 1:30

Note that in the document cited, they make the assumption that the air is not moving, and begun their derivation from $f = Dv^2$, and this $v$ was relative to the air and therefore the following equations simply used the velocity of the ball. For the more complex case where the air is moving as well, you will need to account for this change and make sure that the x and y components of the force due to drag are calculated using the relative velocity of the projectile through the now-moving air.
Also worth noting is the fact that if the wind direction changes, the effective footprint of your projectile will change, thus changing $D$ and therefore the force due to drag. If you are willing to make a reasonable approximation for the average footprint of your projectile, however, this will likely yield a result that is accurate enough for your purposes.