![]() |
Calculating Angle to fire at
Ok I don't know why but I am kind of stumped as how to calculate the angle needed to fire at a targed x meters away that is y meters above the launcher when your robot is capable of firing at v meters per second.
From the kinematic equations y= -0.5*g*t^2+v*sin(theta)*t x= v*cos(theta)*t t=x/(v*cos(theta)) Now I plug that into the first equation which is dandy but then I cant isolate theta... It is rather easy to do when the beginning and ending heights are the same. Maybe I need to brush up on my trig but this is as far as I get y= (-g*x^2*sec^2(theta))/(2*v^2) + x*tan(theta) Help would be appreciated |
Re: Calculating Angle to fire at
Here are some formulas. http://www.ngsir.netfirms.com/englishhtm/ThrowABall.htm goole "projectile motion" and remember to calculate air resistance in your equations! :)
Also good guides: http://hyperphysics.phy-astr.gsu.edu/hbase/traj.html http://www.ac.wwu.edu/~vawter/Physic...lesMotion.html |
Re: Calculating Angle to fire at
I havent got around to looking at formulas becuase i dont have the camera code finished becuase i dont have the camera with me. Once i do, ill post the formulas that i used.
|
Re: Calculating Angle to fire at
Well once you get air resistance (which is significant with these) along with any spin, those equations don't quite cut it; some sort of expirementation and creating just an n-th order polynomial approximation might be better (that maps some parameters [distance, angle of camera, power, whatevever] to angle).
Anyhow, my TI-89 doesn't give me anything for those equations so perhaps if I have time in a little bit, I'll solve it by hand. |
Re: Calculating Angle to fire at
I understand all of those things are important, but first I need to figure out how to calculate it simply right :) . Plus do you think experimenting and finding out the average spin of the projectile will help all that much? Won't it vary a lot from launch to launch?
|
Re: Calculating Angle to fire at
I meant experimenting to find the coeffecients... Anyhow, it depends on how you design your mechanism - I know we are trying to come up with something that will give predictable spin for example. Air resistance is probably more important than spin though and would be something to consider if you have anyone on your team who can run the numbers.
Btw, now that you have the links to the projectile motion equations, would you still like me to solve those equations or do you have what you need? |
Re: Calculating Angle to fire at
Also something to keep in mind. Your velocity is not going to be constant (assuming you use a motor to propel the ball) Since your motors power will continue to decrease as the battery drains. As I recall every year their are teams that will drain the entire battery in a single match. I would highly recommend using a Hall effect sensor to monitor your levels and integrate the equations for you motors power into the equations. Also Spin has the potential to really change distance and should be a variable in your equation.
|
Re: Calculating Angle to fire at
Quote:
|
Re: Calculating Angle to fire at
Something I just thought of about an hour ago that you might also want to consider. It still needs to be calculated, but rather than changing the angle (as most everyone on here has said they plan on doing) that the ball is released at, why not keep the angle constant and vary the speed at which it leaves the robot? It gives you the same desired effect, and saves you one motor or servo (and who knows how much weight).
This is going to take alot of testing to get right. Air resistance you could factor in, but spin will be hard to, especially if/once balls start getting deformed from extensive use (eventually this form is going to squish!). Deformations can also effect how much contact the ball will have with the launcher and change speed. |
Re: Calculating Angle to fire at
I found a nice tutorial for projectile motion here:
http://www.physicsclassroom.com/Clas...ors/U3L2f.html Using the equation in the example involving this question, you can find some nice info: Quote:
And if you want to cheat, and use the max allowed velocity here (12m/s), and know how much the mass of the balls are in KG's you can use this. http://galileo.phys.virginia.edu/cla...jarapplet.html |
Re: Calculating Angle to fire at
Quote:
Be sure to impress upon the mechanical design team that variability in the launch velocity is VERY bad, they need to consider that in their design. (I think you will find that the variability is really not much, assuming the system is designed to be stable.) Now, also remember to consider the added velocity if the robot is moving!!! Don |
Re: Calculating Angle to fire at
Quote:
But, IMHO, angle will be easier than variable velocity. Not a bad idea, tho. Don |
Re: Calculating Angle to fire at
This equation doesn't incorporate air resistance or spin, but it'll work for approximating. I have a sinking feeling that there isn't a way to do it with all the variables without forcing the controller to do a numerical integration every time you want to shoot the ball
(theta1)= the angle to the goal from the same height as your cannon (theta2)= the angle of your cannon (h)= height from your cannon to the goal (constant) (v)= velocity of your ball (constant) 1/(v^2) = (tan(theta2)cos^2(theta2)/4.9h(cot(theta1))) - (cos^2(theta2)/4.9h(cot^2(theta1))) It could use some simplifying, and it looks really ugly typed like that, but it works. I like this equation better because rather than accounting for distance to the goal, you only need the angle. I have a feeling the CMU cameras will be more accurate at giving the angle they are pointing at rather than giving a distance to the target. |
Re: Calculating Angle to fire at
For simplicity's sake, we are most likely going to have a shooter with a fixed vertical angle. We may lose the ability to shoot from every point on the field, but if we no where our good positions are we can increase our accuracy. We are simply having an adjustable angle (like that on a LCD projector, though a little more substantial and stable), so we can tweak it before competitions to fine tune it. Just my $0.02
Also, using the y axis signal from a camera set to lock on to the green target could simplify that a lot. You'd just need a formula to convert it to something usable for a lifting mechanism and compensate for an arc. |
Re: Calculating Angle to fire at
OK! something really funny just happened. I was working on these trajectories and having quite the frustrating time with them....
In walks my brother with the comics section of The Oregonian newspaper. He tells me to read the Foxtrot comic, so I do. And what do I find? I find the Foxtrot dude doing equations to calculate the trajectory of a snowball. That made my day! So I got the equations now...heeheehee |
| All times are GMT -5. The time now is 04:31. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi