Go to Post IMHO if it was legal a peg leg would be better than a caster. - Edoc'sil [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-01-2006, 18:57
Issues Issues is offline
Registered User
FRC #0525
 
Join Date: Nov 2005
Location: Iowa
Posts: 11
Issues is on a distinguished road
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   Spotlight this post!  
Unread 08-01-2006, 19:02
mechanicalbrain's Avatar
mechanicalbrain mechanicalbrain is offline
The red haired Dremel gnome!
FRC #0623 (Ohm robotics)
Team Role: Electrical
 
Join Date: Apr 2005
Rookie Year: 2004
Location: Virginia
Posts: 1,221
mechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond repute
Send a message via AIM to mechanicalbrain Send a message via Yahoo to mechanicalbrain
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
__________________
"Oh my God! There's an axe in my head."
623's 2006 home page
random mechanicalbrain slogans


Last edited by mechanicalbrain : 08-01-2006 at 19:05.
  #3   Spotlight this post!  
Unread 08-01-2006, 19:07
chris31 chris31 is offline
Team 2021 Captain
AKA: Chris Davidson
FRC #2021 (FA Robotics)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2006
Location: Atlanta, GA/ Fredericksburg,VA
Posts: 949
chris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond repute
Send a message via AIM to chris31
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   Spotlight this post!  
Unread 08-01-2006, 19:07
Hutch Hutch is offline
NOTAG
FRC #0461 (Westside Boiler Invasion)
Team Role: Programmer
 
Join Date: Jul 2005
Location: Indiana
Posts: 69
Hutch will become famous soon enoughHutch will become famous soon enough
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   Spotlight this post!  
Unread 08-01-2006, 19:22
Issues Issues is offline
Registered User
FRC #0525
 
Join Date: Nov 2005
Location: Iowa
Posts: 11
Issues is on a distinguished road
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   Spotlight this post!  
Unread 08-01-2006, 19:28
Hutch Hutch is offline
NOTAG
FRC #0461 (Westside Boiler Invasion)
Team Role: Programmer
 
Join Date: Jul 2005
Location: Indiana
Posts: 69
Hutch will become famous soon enoughHutch will become famous soon enough
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   Spotlight this post!  
Unread 08-01-2006, 19:40
mechanicalbrain's Avatar
mechanicalbrain mechanicalbrain is offline
The red haired Dremel gnome!
FRC #0623 (Ohm robotics)
Team Role: Electrical
 
Join Date: Apr 2005
Rookie Year: 2004
Location: Virginia
Posts: 1,221
mechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond repute
Send a message via AIM to mechanicalbrain Send a message via Yahoo to mechanicalbrain
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.
__________________
"Oh my God! There's an axe in my head."
623's 2006 home page
random mechanicalbrain slogans

  #8   Spotlight this post!  
Unread 08-01-2006, 21:56
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Calculating Angle to fire at

Quote:
Originally Posted by mechanicalbrain
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.
If you measure the motor speed, you can make the velocity be constant. Battery voltage will only be relevant if you're trying to make the motor go faster than the available battery power will permit.
  #9   Spotlight this post!  
Unread 08-01-2006, 22:07
Donut Donut is offline
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,311
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
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   Spotlight this post!  
Unread 08-01-2006, 22:08
Elgin Clock's Avatar
Elgin Clock Elgin Clock is offline
updates this status less than FB!
AKA: the one who "will break into your thoughts..."
FRC #0237 (Black Magic)
Team Role: Mentor
 
Join Date: May 2001
Rookie Year: 2001
Location: H20-Town, Connecticut
Posts: 7,773
Elgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond reputeElgin Clock has a reputation beyond repute
Send a message via AIM to Elgin Clock
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:
A football is kicked with an initial velocity of 25 m/s at an angle of 45-degrees with the horizontal. Determine the time of flight, the horizontal displacement, and the peak height of the football.
Horizontal displacement is the info which would be most valuable, along with max height. Time is nice to know, but unless you are calculating how many you can shoot in a match, then it's not really relative.


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
__________________
The influence of many leads to the individuality of one. - E.C.C. (That's me!!)

  #11   Spotlight this post!  
Unread 08-01-2006, 22:13
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,019
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Calculating Angle to fire at

Quote:
Originally Posted by Issues
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?
Come up with some basic aiming equations, and then refine them with experimentation. A look up table might be faster to do (and execute). All you need (for now) is the launch velocity, assume 12 m/s (the max allowed). Camera angle to the target gives distance.

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
__________________

I am N2IRZ - What's your callsign?
  #12   Spotlight this post!  
Unread 08-01-2006, 22:18
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,019
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Calculating Angle to fire at

Quote:
Originally Posted by Donut
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.
Easy: use the Allen-Bradley sensor to measure the velocity, keep track of it and use it to make corrections on your next shot.

But, IMHO, angle will be easier than variable velocity. Not a bad idea, tho.

Don
__________________

I am N2IRZ - What's your callsign?
  #13   Spotlight this post!  
Unread 08-01-2006, 22:30
White_Orpheus's Avatar
White_Orpheus White_Orpheus is offline
Woot for Aphex Twin!
AKA: Chris Teresi
FRC #0253 (MRT)
Team Role: Animator
 
Join Date: Feb 2004
Location: California
Posts: 59
White_Orpheus will become famous soon enoughWhite_Orpheus will become famous soon enough
Send a message via AIM to White_Orpheus
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.
__________________
Team 253
2004 Silicon Valley AVA Winner

Last edited by White_Orpheus : 08-01-2006 at 22:33.
  #14   Spotlight this post!  
Unread 08-01-2006, 22:43
bombadier337's Avatar
bombadier337 bombadier337 is offline
1337 U53R
AKA: Shaver
None #1541 (MidloCANics)
Team Role: College Student
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Richmond VA
Posts: 123
bombadier337 is just really nicebombadier337 is just really nicebombadier337 is just really nicebombadier337 is just really nice
Send a message via AIM to bombadier337
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.
__________________
Midlothian High School - Team 1541
2005 Radioshack Innovation in Control - NASA/VCU Regional
2005 Rookie Inspiration - NASA/VCU Regional

Last edited by bombadier337 : 08-01-2006 at 22:49.
  #15   Spotlight this post!  
Unread 09-01-2006, 01:14
varcsscotty varcsscotty is offline
Programmer
FRC #1571 (Braughtswurst)
 
Join Date: Oct 2005
Location: Gresham, Oregon
Posts: 41
varcsscotty is an unknown quantity at this point
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
__________________
"If you want the best, try the Wurst!"
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 15:39.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi