- #1
Edvin
- 5
- 2
Greetings,
Most projectile problems are presented from the muzzle of a cannon; however, how do we solve the problem if the velocity is known at the muzzle; but the angle is controlled at the base of the canon.
The issue is that, when the canon angle changes, so does the muzzle location!
The problem that I am trying to solve is for a small robot that shoots a ball into a coffee cup. I can control the angle; but, not the velocity. When I try to solve the problem, I end-up with a fourth degree polynomial.
I'm not concerned with air drag; because, it is negligible (at least in the simulation I created in algodoo.
Here is how I approach the problem:
If this is right, I would have to write an algorithm to solve a 4th degree polynomial. Alternatively, I can ignore the canon length, and then loop through different angles until I calculate the right value.
However, I would prefer to solve the problem down to an equation and then plug it in.
Please let me know if I'm mistaking or if there is another way of solving this problem.
Tnx,
Edvin
Most projectile problems are presented from the muzzle of a cannon; however, how do we solve the problem if the velocity is known at the muzzle; but the angle is controlled at the base of the canon.
The issue is that, when the canon angle changes, so does the muzzle location!
The problem that I am trying to solve is for a small robot that shoots a ball into a coffee cup. I can control the angle; but, not the velocity. When I try to solve the problem, I end-up with a fourth degree polynomial.
I'm not concerned with air drag; because, it is negligible (at least in the simulation I created in algodoo.
Here is how I approach the problem:
h = v0 t + 1/2 g t2
given that vx = v cosθ and vy = vsinθ
Also, distance traveled is given by d = vx t; therefore, d= t v cosθ, where t = d/(v cosθ)
Next, I add the extra height and distance as the canon angle changes.
The extra horizontal length for given barrel length L is going to be L - L cosθ.
So, t = (d +L - L cos θ)/ (v cos θ)
The extra height is L sin θ
So, the first equation changes to:
h = L sinθ + vy t + 1/2 g t2
h = L sinθ + v sinθ [ (d +L - L cos θ )/ (v cos θ) ] + 1/2 [(d +L - L cos θ )/ (v cos θ)]2
...
2v2h2 - 2L2 - 2v2(d+L)tanθ - g(d+L)2 - g(d+L)2 tan2θ = 2 L g sqrt(1+tan2θ)
...
x1 tan4θ + x2 tan3θ + x3 tan2θ + x4 tanθ + x5 = 0
given that vx = v cosθ and vy = vsinθ
Also, distance traveled is given by d = vx t; therefore, d= t v cosθ, where t = d/(v cosθ)
Next, I add the extra height and distance as the canon angle changes.
The extra horizontal length for given barrel length L is going to be L - L cosθ.
So, t = (d +L - L cos θ)/ (v cos θ)
The extra height is L sin θ
So, the first equation changes to:
h = L sinθ + vy t + 1/2 g t2
h = L sinθ + v sinθ [ (d +L - L cos θ )/ (v cos θ) ] + 1/2 [(d +L - L cos θ )/ (v cos θ)]2
...
2v2h2 - 2L2 - 2v2(d+L)tanθ - g(d+L)2 - g(d+L)2 tan2θ = 2 L g sqrt(1+tan2θ)
...
x1 tan4θ + x2 tan3θ + x3 tan2θ + x4 tanθ + x5 = 0
If this is right, I would have to write an algorithm to solve a 4th degree polynomial. Alternatively, I can ignore the canon length, and then loop through different angles until I calculate the right value.
However, I would prefer to solve the problem down to an equation and then plug it in.
Please let me know if I'm mistaking or if there is another way of solving this problem.
Tnx,
Edvin