Go to Post FIRST competitions are a microcosm of real world engineering projects. - KenWittlief [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 23-01-2009, 19:15
Snow Pickles Snow Pickles is offline
Registered User
FRC #1569
 
Join Date: Jan 2009
Location: Idaho
Posts: 3
Snow Pickles is an unknown quantity at this point
A Equation for a Cannon

My team was planning on making cannon during the first week. I thought I'd be cool to make it autonomously shoot. So I made a huge trig/calc function to calculate the specs. Just as I finished it, they decided to go the easy way with some roller thing, nothing fun to program.
So thats my story, and attached is the function. It's long and it's ugly.

It's designed for a rotating cannon of variable velocity. It returns a pair<float , pair<float , float>> of <velocity to shoot , <angle to shoot , enemy's angle>>. The enemy's angle is to determine if the enemy is coming at you and blocking his trailer.

It needs a camera that is tracked to the target trailer. It also needs a rangefinder attached to the camera, preferably with a narrow beam pattern.

It's in c++, but you could change the pairs to structs to make it c.

I'm not sure if it works, I'm not sure if it even compiles. But if anyone is interested I'll help anyone fix it and use it.
Attached Files
File Type: cpp CannonEquation.cpp (5.8 KB, 75 views)
Reply With Quote
 


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
Air Cannon Rob2713g General Forum 40 27-05-2009 21:15
ball cannon??? stinkypooman General Forum 142 06-03-2009 13:48
diff equation grapher Rickertsen2 Technical Discussion 4 01-03-2006 01:37
Help with Soave-Redlich-Kwong Equation for gasses. sanddrag Math and Science 0 11-01-2006 00:01
Complex Equation Solver Dejhan_Tulip Math and Science 8 18-04-2004 21:13


All times are GMT -5. The time now is 12:03.

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