This is my first post on this website and my friends in robotics recommended it to me for math help, so my apologies if I have any of the formatting wrong or any other issues.
So my I have a barrel with a camera attached to it that shoots little rubber balls. However, if I aim directly at the target, bullet drop kicks in and I miss the shot. To account for that I need to aim a little higher, but the question is how much higher do I need to aim. I will explain my current calculations.
In this Image you can see all of my calculations
Shooter Diagram
Variables:
a = length of barrel
b = height of camera from barrel
depth = distance from camera/tip of barrel to the target parallel to the plane of the camera/tip of barrel
range = direct distance from camera to center of target
theta = angle between depth and range from camera
Dp = depth from pivot (depth plus barrel length)
rangep = range from pivot or direct distance from pivot to center of target
rho(denoted as p)= angle between depth and rangep of pivot
v = velocity (I shoot at around 30m/s)
Diffc = difference from depth and range at the end for the camera
Diffp = difference from depth and rangep at the end of the pivot
i = x component of distance from pivot to target
j = y component of distance from pivot to target
PhiF = the final angle we want
t = time
I first drew out the diagram and labeled everything so it would be more clear for me. Hopefully everything makes sense so far. I used all the basic variables that I have laid out to calculate the angle that I want to be aiming at.
I make an equation where i set t = time it takes in the x direction using PhiF and i set the full travel of the bullet in the y direction = vt + 1/2at^2. I plug stuff in there and solve. My final answer was arctan(c1) = PhiF. Obviously this is very wrong and I have tried to check my work and I have asked a lot of my seniors. I hope everything I have said makes sense, I can clarify anything, and if there are any other questions please feel free to ask! Thank you.