Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   MAX ball shot trajectory (http://www.chiefdelphi.com/forums/showthread.php?t=41806)

Nitroxextreme 13-01-2006 22:38

MAX ball shot trajectory
 
I know that most teams must be working out the math as to how far they actually can shoot the ball with a 12 m/s speed

I'm sure that people are also playing around with the concept that if you are moving forward when shooting you will have a faster speed and hence longer trajectory

However, I believe that if you are really planning on shooting the "long shot" your not gonna want to be moving because even if you can shoot it really accurate standing still once you move there will be almost no accuracy.

So who has figured out the ideal angle and hence the maximum trajectory?

Donut 13-01-2006 22:44

Re: MAX ball shot trajectory
 
Part of that depends on what height your shooter is at. We were originally planning on a higher shooter, I was getting that with a shooter 54" off of the ground shooting the ball at 12 m/s at a 45 degree angle, you would be able to land the ball in the goal from just under 45', without air resistance. With air resistance my guess is the maximum range will be somewhere within a few feet of 40'.

racsan12345 13-01-2006 22:50

Re: MAX ball shot trajectory
 
For launching 4.5 feet to 8.5 feet:

Please input the initial velocity in meters per second: 12.8
Please input the coefficient of drag (0.07 - 0.5): 0.416
The uber best range is 14.7775 meters at an uber angle of 47 degrees.

For more calculations refer to my
C++ Code:
#include <iostream.h>
#include <math.h>

int main()
{
// float i = cos(x); x is in radians
// float i = atan(x); i is in radians arctangent

float x;
float y;
float v_initial = 12.8;
float v_x;
float v_y;
float initial_angle;
float theta;
float drag;
float area = pow((3.5 * 2.54 / 100), 2) * 3.14159;
float mass = .206; //kilograms
float C_D; //Coefficient of Drag
float a_x;
float a_y;
float increment = .01; //Incrementing time
float best_range;
float rad_conv = 2.0 * 3.14159 / 360.0;
float uber_best_range = 0;
float uber_angle = 0;

cout << "This program will calculate the maximum range and best angle to launch a 7 inch diameter poof ball." << endl << endl;
cout << "Please input the initial velocity in meters per second: ";
cin >> v_initial;

cout << "Please input the coefficient of drag (0.07 - 0.5): ";
cin >> C_D;

for(initial_angle = 10; initial_angle <= 80; initial_angle = initial angle + .5)
{
x = 0;
y = 0;
v_x = v_initial * cos(initial_angle * rad_conv);
v_y = v_initial * sin(initial_angle* rad_conv);
best_range = 0;

do
{
theta = atan(v_y/v_x);
drag = .5 * C_D * area * sqrt(pow(v_x, 2) + pow(v_y, 2));
a_x = drag / mass * cos(theta);
a_y = drag / mass * sin(theta) + 9.8;

v_x = v_x - a_x * increment;
v_y = v_y - a_y * increment;

x = x + v_x * increment;
y = y + v_y * increment;

if(y > 1.3 && v_y < 0) //To change height difference, change the 1.3 (meters).
best_range = x;

}while(y >= 0);

cout << "At " << initial_angle << " degrees, the best range is " << best_range << " meters." << endl << endl;

if(best_range > uber_best_range)
{
uber_best_range = best_range;
uber_angle = initial_angle;
}

}

cout << "The uber best range is " << uber_best_range << " meters at an uber angle of " << uber_angle << " degrees.";

return 0;
}

Donut 13-01-2006 22:56

Re: MAX ball shot trajectory
 
Quote:

Originally Posted by racsan12345
For launching 4.5 feet to 8.5 feet:

Please input the initial velocity in meters per second: 12.8
Please input the coefficient of drag (0.07 - 0.5): 0.416
The uber best range is 14.7775 meters at an uber angle of 47 degrees.
}

Why are you using a starting velocity of 12.8 m/s? I believe we're limited to 12 m/s.

Tatsu 13-01-2006 23:17

Re: MAX ball shot trajectory
 
Racsan, your calculations dont make sense

once the ball reaches maximum trajectory, drag DECREASES ay not increases it.. so the plus sign there doesnt make sense.. you need an if statement.. if vy is negative, then change the sign on drag.

Anyway my data say

.798 radians at 9.97 meters launched at 12 m/s

The only simplifying assumption I made was that
drag in x direction = dragcoef*vx^2 rather than taking the sine of the drag.. its accurate enough I believe.

Tatsu

Kevin Sevcik 14-01-2006 08:52

Re: MAX ball shot trajectory
 
The easiest way to figure the direction of the drag is Fx = Fd * Vx / V, actually. You need all those numbers anyways. Back on the topic of the thread, though, I get a maximum range somewhere around 30 to 35 feet depending on your Cd assumptions. It's all terribly approximate because our ball might be rough enough for the Cd to start at .2 when the ball is traveeling 12 m/s. Then jump up to .416 as it slows down.

racsan12345 15-01-2006 00:02

Re: MAX ball shot trajectory
 
Quote:

Originally Posted by Tatsu
Racsan, your calculations dont make sense

once the ball reaches maximum trajectory, drag DECREASES ay not increases it.. so the plus sign there doesnt make sense.. you need an if statement.. if vy is negative, then change the sign on drag.

Tatsu

Tatsu,

When v_y is negative, it makes atan(v_y/v_x) makes theta negative, thus making sin(theta) negative. So you wouldn't need that if statement.

binary_sandman 15-01-2006 02:10

Re: MAX ball shot trajectory
 
shooting the ball into the top goal is very Probable the ball itself is 7in the goal is 40in more tham 4 times the size;
traveling at 11.9meters per second to be safe;
39.041984feet per sec which can be made from the middle of
the field (in theroy).
conclude this there is a good chance this will work esp.
we have already programed Autonomous and most of
drive motors
{1388 all the way}

Tatsu 15-01-2006 12:59

Re: MAX ball shot trajectory
 
racsan - agreed. sorry, my mistake

Lil' Lavery 15-01-2006 18:27

Re: MAX ball shot trajectory
 
45 degrees is the angle that will give you the greatest maximum range from the goal, but that's is not the only factor to be considered. Because the goal has a top there is a period where you cannot shoot, as your shot would be hitting above the goal at that point. Also, because of the wall there is a period where your shot will hit the wall before it can get high enough to pass through the goal.
Thus why I suggest a variable angle.

ThomasP 15-01-2006 18:36

Re: MAX ball shot trajectory
 
You don't need variable angle to get a better range of shots, you can have variable force to have the same effect.

lukevanoort 15-01-2006 19:26

Re: MAX ball shot trajectory
 
Although this isn't entirely on topic, make sure that you don't end up too far above the minimum. The goal slants forwards just a little bit, so any power over what you need to score it and it'll smack the top of the goal and fall onto the platform.

mathking 16-01-2006 00:15

Re: MAX ball shot trajectory
 
I wouldn't bother with computations of drag. At 12 m/s with a circular ball flung by some mechanical system, the influence of drag is probably not going to be distinguishable from other sources of variation.

Why not just do some basic calculations with pencil and paper and then make a spreadsheet. All you really need is basic physics:
v = initial_velocity + at d = vt + .5*a*t^2 quadratic formula.
(OK, you need sin and cos of your angle too.)

A perhaps more interesting question than what is the farthest a ball can be thrown is what is the minimum angle of elevation required to get the ball into the center goal at all?

Example:

Assume an initial "muzzle velocity" of 12 m/s and an angle of 20 degrees:
Upward velocity = 12 * sin(20) = 4.104 m/s
So what is the maximum height above the gun this ball will reach?
Well it will reach this max height when v = 0, so:

0=4.104 - 9.8t
9.8t = 4.104
t = 4.104/9.8 = 0.419 seconds

d = 4.104*0.419 + (.5)(-9.8)(0.419^2)
d = 1.719 - .860
d = 0.859 m = 33.8 inches

When you release the ball, remember that no part of the robot can be above 60 inches. So the bottom of the ball at the release point may be well below 60 inches. But let's assume the top boundary condition of a release at 60 inches.

60 + 33.8 = 93.8 inches = 7 ft 9.8 inches = well below the goal.

b_mallerd 16-01-2006 02:13

Re: MAX ball shot trajectory
 
If you've done any of those physics labs...you'll find that theoretical physics is only a very rough approximiation of the actual answer. I think you can use the formulas for a rough starting point but guessing and testing is probably the best way. These balls are so light that if there is spin on it...there is going to be a major trajectory change anyways. Ever see a ping pong ball with back spin? It flys very wierd.

mathking 16-01-2006 10:02

Re: MAX ball shot trajectory
 
b_mallerd's admonition is on target. It is why I mentioned not worrying about calculating drag because of all the other sources of variation. It is quite profitable to do the basic computations first, however. You want to find the boundary conditions for values such as release angle and motor speed so you know where to start your testing.

You should find things like the minimum angle required to even get the ball up to the center goal. If you are using a spinning wheel launcher you should figure out the minimum number of revolutions per minute to get the velocity you want. Computing these can also make your life much easier when it comes to testing because you will be able to be much more systematic.


All times are GMT -5. The time now is 18:45.

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