|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||||
|
|||||
|
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 Last edited by mechanicalbrain : 08-01-2006 at 19:05. |
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||
|
|||
|
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? |
|
#6
|
|||
|
|||
|
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? |
|
#7
|
|||||
|
|||||
|
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.
|
|
#8
|
|||||
|
|||||
|
Re: Calculating Angle to fire at
Quote:
|
|
#9
|
||||
|
||||
|
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. |
|
#10
|
|||||
|
|||||
|
Re: Calculating Angle to fire at
Quote:
But, IMHO, angle will be easier than variable velocity. Not a bad idea, tho. Don |
|
#11
|
||||
|
||||
|
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. Last edited by White_Orpheus : 08-01-2006 at 22:33. |
|
#12
|
||||
|
||||
|
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. Last edited by bombadier337 : 08-01-2006 at 22:49. |
|
#13
|
|||
|
|||
|
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 |
|
#14
|
|||||
|
|||||
|
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 |
|
#15
|
||||
|
||||
|
Re: Calculating Angle to fire at
When seeking guidance, look up. There is a very good website with the basics, not only on ballistics, but also on other cool and significant topics. I am really very impressed by this website. I recommend starting with this index page:
http://exploration.grc.nasa.gov/educ...ket/short.html You will probably want to be sure to have a look at this particular page: http://exploration.grc.nasa.gov/educ...et/flteqs.html Our government has borrowed trillions of dollars to fund this website, so you should take advantage of it! The strictly ballistic part (without air resistance) you can do parametrically, using the Newtonian relation F=m*a, with first term physics/calculus, or algebraically by looking it up. That's a good first approximation and probably 80% right or so. The drag part is a much harder problem because the drag always shows up as a force vector whose vertical and horizontal components are changing as a function of the magnitude and direction of the overall velocity vector. Drag in the horizontal direction, for instance, will be largest at the top of the projectile's arc. For this reason you cannot treat the components as ordinary differential equations with separable variables as you can using the simple Newtonian equations of motion. If the projectile is dropping straight down there is no horizontal component, and if it is a car there is no vertical component, which is why you can solve for terminal velocity using simple calculus. You can make some simplifying assumptions about the average horizontal and vertical drag components, and that will get you closer if you pick the right assumptions. However, your best bet is to do prepare a numerical model using the state equations and some sort of calculation software--you can use Excel, or MATLAB, or Mathematica, or Mathcad, or program it in C. In other words, chop the problem up into N parts of the total flight time T (t0,t1,t2...tN), calculate an approximation at each interval, plug that value back in to calculate the conditions at t2, and so forth. The more the N, the more reality will be willing to cooperate with your answer...if the numbers you pick for the drag coefficient and for the area and so on are the right ones. Oh, I almost forgot. There is also the Magnus effect which adds another wrinkle yet. A symmetrical spinning or rotating projectile moving through a viscous fluid (for example, air) will experience forces due to pressure differences caused by the Bernoulli effect created by the rotation. This is the subject of curveballs and so on. And while we're on that subject, I should probably mention surface roughness, reynolds number, airstreams, laminar flow, turbulent flow, and chaos theory. Not to worry, though. If even the very smartest of us really understood this stuff (and I am not one of those guys), we wouldn't need to build wind tunnels. Your numerical simulation will get you in the ballpark. Once in, you need to build a pitching machine and do some testing. Good luck. |
![]() |
| 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 |