View Single Post
  Spotlight this post!  
Unread 02-02-2016, 13:47
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,077
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Shooter Aiming with Tables

Quote:
Originally Posted by Turing'sEgo View Post
You are given one variable, distance, and want to find 2 output variables, power (wheel speed) and angle.
No. You are given two values: the horizontal distance to, and vertical height of, the apex relative to the launch point.

From that information, you can directly compute the parabolic (no air drag) launch angle and speed.

It's all explained here.

For coordinate system XY whose origin is at the launch point,
the equation for the parabola is:

y = a*x^2 + b*x

Let the (known) apex coordinates in XY be [xp,yp]

then

a = -yp/xp^2
b = 2*yp/xp

So now you know the equation of the parabolic trajectory,
and from that you can find the launch angle theta and launch speed V:

theta = atan(b);
V = sqrt((g/2)/a)/cos(theta);

It's good to be interested in this stuff and to learn it, but for the immediate task at hand it may not be so useful. See my previous post explaining why.