What’s initial velocity of a body launched at an angle to the horizon

kinematicssolution-verification

I'm trying to throw a projectile at an angle to the horizon. The projectile using its free fall acceleration should fall onto the target. Target height is different. The source is lower than the target. Projectile flight trajectory is parabola. Free fall acceleration is constant and equal to 0.125 units per tic. This unit of measurement is in virtual reality – in game. I'm trying using free fall physics to drop grenade onto target. But both of it are at different heights. Coordinate system origin can be considered to be the source point $S(x_0,y_0,z_0)$ from which grenade is released. We know both points coordinates, free fall acceleration. We can choose the angle to the horizon. We must count the pitch angle between the source and the target. Angle to the horizon will be a value between pitch angle and steep angle. I doubt that I can choose the time during which the projectile would reach the target. It depends on free fall acceleration and angle.

I have to find the initial velocity of the the projectile that should fall right onto target $T(x_1,y_1,z_1)$. But trajectory highest point (parabola vertex) should raise above target height before crossing it. It's the second parabola point at that height.
Please help me to solve it. Analyze and correct me if I'm wrong:
Image https://i.sstatic.net/APnAd.png
$f(x)=ax^2+bx+c$,
Source $S(x_0,y_0,z_0)$, target $T(x_1,y_1,z_1)$, Pitch from source to target $\langle AST = \arctan \bigg(\frac{AT}{SA}\bigg)=\delta$.
$\alpha \in (\delta, 90^\circ)$.
$AT=z_1-z_0$,
$SA=\sqrt{(x_1-x_0)^2+(y_1-y_0)^2}$,
$SA=l=V_{ox}t=V_0 \cos\alpha t$,
$AT=z=V_{oy}t+\frac{g_zt^2}{2}=V_0 \sin\alpha t+\frac{g_zt^2}{2}$,
I need to find initial speed.
$z_1=V_0\sin\alpha t+\frac{g_yt^2}{2}$,
$V_0=\frac{2z_1-g_zt^2}{2\sin\alpha t}.$
$t=\frac{l}{V_0\cos\alpha}$,
$z_1=V_0\sin\alpha t+\frac{g_zt^2}{2}=\frac{V_0l\sin\alpha}{V_0\cos\alpha}+\frac{g_zl^2}{2V_0^2\cos^2\alpha}=l\tan\alpha+\frac{g_zl^2}{2V_0^2\cos^2\alpha},$
$(z_1-l\tan\alpha)V_0^2=\frac{g_zl^2}{2\cos^2\alpha}$,
$V_0^2=\frac{g_zl^2}{2\cos^2\alpha(z_1-l\tan\alpha)}$,
$V_0=\sqrt{\frac{g_zl^2}{2\cos^2\alpha(z_1-l\tan\alpha)}}$.

Is this $V_0$ will be my actual intial velocity speed? Will the projectile reach the target T when $g=0.125$?

Best Answer

You approach is correct. However check if you correctly choose the sign of $g_z$. It should be negative, if the axis $z$ is directed oppositely to the gravitation force (what you seems to assume).

Related Question