|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
|||||
|
|||||
|
Re: Calculating Angle to fire at
Now I know that all those hours I seemingly "wasted" in middle school playing Pocket Tanks has finally come to some use! And all my teacher's never believed me when I told them that learning how to calculate ballistic trajectories on the fly and in my head would become an important skill someday.
![]() |
|
#17
|
|||||
|
|||||
|
Re: Calculating Angle to fire at
It seems to me that there are so many factors(air resistance, spin, etc.) that are not in standard projectile equations that calculations won't be very useful. Experimentation will be required.
|
|
#18
|
|||
|
|||
|
Re: Calculating Angle to fire at
Quote:
|
|
#19
|
|||
|
|||
|
Here is an old equation i used a looong while back... see how you like it...
(It's a very simple equation) V= Ft/s A=Angle of take off (-16/V^2 *((CosA)^2)*X^2) + (X(TanA)) Though this is a great equation, I'd would only use it in approximation. It is very simple and can be done by hand but is meant to be seen on a graphing calculator. So I hope this helps for the newcomers. |
|
#20
|
|||||
|
|||||
|
Re: Calculating Angle to fire at
Quote:
![]() |
|
#21
|
||||
|
||||
|
Re: Calculating Angle to fire at
Quote:
BTW, I've seen a 'bot that can use the camera to position itself and fire ball after ball into the target, so I know that teams can do it if they put the effort into it. -Kevin |
|
#22
|
|||||
|
|||||
|
Re: Calculating Angle to fire at
Quote:
Assumptions: Cd=0.5, rho=1.29 kg/m^3, A = (7/2)^2*pi in^2 = 0.025 m^2, v=12 m/s I know it's not as significant as if we were firing ping-pong balls, but I don't think standard ballistics will give much accuracy without a large fudge factor. |
|
#23
|
||||
|
||||
|
Re: Calculating Angle to fire at
Quote:
I guess I should have said that the effects of wind resistance should be ignored. Discussing drag coefficients and the Reynold's number of a nerf basketball is silly and will only serve to confuse people, who might get turned-off to the idea of going for the three point score. -Kevin |
|
#24
|
||||
|
||||
|
Quote:
Enjoy! - Keith |
|
#25
|
|||||
|
|||||
|
Re: Calculating Angle to fire at
Quote:
Edit: Predictably, 12 m/s puts the Reynold's number right in the critical range for a rough sphere where Cd drops a ton depending on the roughness of the sphere. At 10 m/s the Cd is comfortably 0.5 for most roughnesses. So go figure. It's still an estimate, but it will err on the side of shorter than reality. Last edited by Kevin Sevcik : 09-01-2006 at 15:26. |
|
#26
|
|||||
|
|||||
|
Re: Calculating Angle to fire at
So ignoring the fun stuff (air resistance, spin), suppose your ball's point of release is at the origin with velocity v0 and you want to hit the point (h,k) in the first quadrant. I quickly found a cubic equation which you can solve for theta. I'm sure you'll have fun learning how to solve cubics. Let me know if there's some algebra error. The general idea seems right.
|
|
#27
|
|||||
|
|||||
|
Ah, I love the lunch break. If this is correct, which I'm pretty sure it is, I'm proud to say I did it myself. if it's not, then you get what you paid for.
Given: X (desired position in horizontal direction), Y (desired position in vertical direction) Vo (firing velocity) Find: Launch Angle, A Starting with your two basic projectile motion equations: X = Vo * cos(A) * t Y = Vo * sin(A) * t - 1/2 * g * t^2 First, solve for t to eliminate it from the equation. t = x / (Vo * cos(A) ) Substituting: y = (x * Vo * sin(A)) / (Vo * cos(A)) - (g * x^2)/(2 * Vo^2 * cos^2(A)) Trig Identity: tan(A) = sin(A) / cos(A) y = (x * tan(A) ) - (g * x^2) / (2 * Vo^2 * cos^2(A)) (x * tan(A) - y ) * (2 * Vo^2 * cos^2(A)) = g * x^2 (2 * Vo^2 * x * sin(A) * cos(A)) - (2 * Vo^2 * cos^2(A) * y) = g * x^2 Simplify some more: (2 * x * sin(A) * cos(A)) - (2 * cos^2(A) * y) = (g * x^2) / (Vo^2) Fancy Trig: (x * sin(2A)) - (2 * cos^2(A) * y) = (g * x^2) / (Vo^2) Little More Fancy Trig: (x * sin(2A)) + (-y)(1+cos(2A)) = (g * x^2) / (Vo^2) Not So Fancy Math: (x * sin(2A)) + (-y * cos(2A)) = (((g * x^2) / (Vo^2)) +y) Pretty Fancy Trig Identity: (if there's a mistake, it's bad application here!) a * sin(A) + b * cos (A) = sqrt(A^2 + B^2) * sin(A + T) Where T: arctan(b/a) if a>=0; pi + arctan(b/a) if a<0 I simplified this with the common(?) matlab function atan2 which is a 'smart' arc tan function that takes the sign of the x and y components into account when returning an angle. Note, however, that since A in our case is X, it should never be negative, assuming you're aiming in front of you... Using Pretty Fancy Trig Identity Above: sqrt(x^2 + y^2) * sin(2A + atan2(-y/x)) = (((g * x^2) / (Vo^2)) +y) Finally, when you put this in terms of A: A = 1/2 * (asin( (((g * x^2) / (Vo^2)) +y) / sqrt(x^2 + y^2) ) - atan2(-y/x)) The reason I feel pretty comfortable about this, because when you set Y=0, you get your basic range equation: 2A = asin(g * X / Vo^2)) That's that! Sources: http://en.wikipedia.org/wiki/Trigonometric_identity http://hyperphysics.phy-astr.gsu.edu/hbase/traj.html Matt |
|
#28
|
|||
|
|||
|
Re: Calculating Angle to fire at
That is precisely what I was looking for, if it is correct anyways. I knew it would require some mad trig. Thank you = ).
edit. Now I am trying to add air resistance in the calculation. I think the easiest way to do it would be to determine the terminal velocity of the poof ball and use that with a known weight of a projectile to find the proportionality constant of a poof ball k such that F= k v(y) beacuse the force of air resistance is proportional to speed right? and this k would be the same one to use for the x direction because it is a sphere. Has anyone experimentally determined this value of k? I guess I could try something with my schools logger pro stuff =) Last edited by Issues : 10-01-2006 at 11:33. |
|
#29
|
||||
|
||||
|
Re: Calculating Angle to fire at
Here's a "quick and dirty" Excel spreadsheet that allows the user to vary speed, angle, height, drag coefficient, and for the Mars version of AimHigh (special feature for Dave Lavery
): air density and gravity.The algorithm is based on the white paper found here: http://wps.aw.com/wps/media/objects/...cs/topic01.pdf I made sure the integration gave accurate answers for some test cases (verify max height for vertical shot with zero drag coefficent, etc.). The user should be able to perform some "sensitivity analyses" on parameters like speed, drag coefficient, etc. to get some idea of how the trajectory is affected by changes in the various parameters. You can answer: How much further does a new (low drag) ball fly in Colorado than a beat-up (high drag) ball at the Florida Regional? ![]() |
|
#30
|
|||||
|
|||||
|
Re: Calculating Angle to fire at
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Viewing Angle of Camera | Joe Johnson | Technical Discussion | 10 | 14-01-2005 14:11 |
| Calc. Triangle Angle or Side Based on Ellipses? | indieFan | Math and Science | 1 | 07-06-2004 21:25 |
| Serious VCU Fire | Joe Matt | Chit-Chat | 3 | 26-03-2004 19:04 |
| PBASIC ARCTAN function | Greg Ross | Programming | 14 | 11-05-2003 12:28 |
| 45 degree PVC angle fittings: which? | archiver | 2001 | 2 | 23-06-2002 22:53 |