So here at team #4095 camp we have finished going through the math that goes along with firing the ball at different angles so that it can be programmed much easier. And yes, like I promised, there are pictures of the math!

Finding Y
g = Acceleration by gravity, 9.8 m/s/s or 32.2 ft/s/s.
v = Velocity of the ball.
You can see the math here, and in the next step weāll break it apart a bit more.

Finding more Y
Top left: Yo is subtracted over to the other side of the equations. TAN is split into SINĪ over COSĪ, then 1-COSĪ over COSĪ (yay trigonometric identities!).
Bottom left: Excluding the subtraction of gd^2/2(vCOSĪ)^2, we move d into the numerator.
Bottom right: This part is distributed into separate fractions.

Now we have this
Self explanatory. If you donāt know, \ just means that I am continuing the equation on the next line.

Ha, I can only use five images. Continued next. (Iām sorry about the double post, but you leave me no choice delphi).

Making some constants
Just for easier use. Also as an aside, now looking back on this J doesnāt seem necessary because (Y - Yo) is already contained in parenthesis so it shouldnāt matter if it getās changed into a constant or not.

Quadratic equation time!
We now have put this equation into where we can take it and put it into the quadratic equation.

And for ease
We just use the variables that we defined earlier just so that transitioning it into code will be easier.

Important stuff [READ]: If you take only the part under the square root sign, you can find out if it will reach the hoop or not. If it is less than zero, than it will not reach it, but if it is greater than zero it will reach it.

Hope this helps you if youāre stuck. Also if you see a miscalculation please donāt hesitate to call us out on it!

Where can I find some information on how to define set and retrieve registry values in Labview.
Iām attempting to change the constant strings in begin, teleop and disable and getting undefined references to the registry.

Not to overcomplicate things, but a (acceleration of ball) is not a constant āgā, but a summation of acceleration due to gravity, Drag, and Lift.

Change in gravity is a function of Y.

Acceleration due to drag is a function of velocity where a_d = .5rhoV^2*Cd / M_ball (rho = air density (function of temperature), Cd = drag coefficient for spherical ball, M_ball = ball mass)

Acceleration due to lift is a function of ball spin where a_l = 16/3pi^2R^3alpharho*V
(alpha is spin rate in radians/sec, R is ball radius), perpendicular to the spin axis

Sum the forces together in 3 dimensions to get the actual āaā in your equation, but calculating the final position would require iteration or an ODE solver.

Maybe this could be a good student summer post-build season project ::rtm::

Weāre working with the āshoot the ball with a nice flat trajectoryā equation, hoping we donāt have to adjust anything as long as weāre on the keyā¦

Yes, thatās been discussed at great length here on CD.

Thereās a paper here that someone posted a link to a few weeks ago which discusses the effects of air friction and magnus effect, and concluded that it would be reasonable to ignore them.

I donāt know whether or not I agree with that conclusion, but I suspect that even if those effects were included, other factors such as variations in ball mass, size, compressibility, surface texture, and location of center-of-mass relative to center-of-volume, and air currents and atmospheric pressure would play a roleā¦ not to mention the effect of variations from shot-to-shot in the launcher itself.

Bottom line: in this application, equations are useful for getting a ballpark estimate.

Change in gravity is a function of Y.

You werenāt seriously suggesting changing āgā with height of the ball should be considered, were you? I didnāt see a smiley face at the end of that.

calculating the final position would require iteration or an ODE solver.

With air friction and magnus included, the DE would be non-linear, and itās unlikely that an ODE solver could find a closed-form solution. The only way to solve would be numerical (āiterationā, most likely rk4).

Maybe this could be a good student summer post-build season project

I think there have been a couple of attempts already that have been posted here.