1

I'm trying to write a function to determine the trajectory angle of a projectile, theta, from the horizontal required to hit a specified target location.

Inputs: Initial Position (x0, y0), Final Position (xf, yf), and Initial Speed v0

Output: Trajectory Angle theta

The challenge is that I want to use Newtonian drag, i.e. Fd = 1/2 * roh * Cd * Ac * v^2, which introduces a non-linearity. As far as I know, this means that you can't construct an analytical solution. I understand how to calculate the trajectory numerically given an input angle and speed, but I'm not sure how to solve for the final position.

I've found:

(1) Trajectory of a particle on Wikipedia, which shows how to find a trajectory path but not solve for the final position, and

(2) this Phys.SE question, which talks about root-finding with algorithms like the secant method, but I don't know if I can apply this method because of the non-linear v^2 term.

Is there any elegant way to tackle this problem other than a brute force, guess and check approach? I can think of implementing a binary search kind of guess and check method to increase efficiency, but that's still not great.

lg22woo
  • 59

0 Answers0