Decompose into horizontal and vertical components and solve analytically:
$$x(t) = v_0\cos\theta \cdot t$$ $$y(t) = h_0 + v_0\sin\theta \cdot t - \frac{1}{2}g t^2$$Maximum height: $t_{max}= \dfrac{v_0\sin\theta}{g}$, $H = h_0 + \dfrac{v_0^2\sin^2\theta}{2g}$
Landing time: $y(t_{land})=0$ Solve to get $R = v_0\cos\theta \cdot t_{land}$
Quadratic drag: $\ddot{\mathbf{r}}=\mathbf{g}-k|\mathbf{v}|\mathbf{v}$, with $k=\rho C_d A/(2m)$ [1/m], integrated using RK4. Presets set launch speed, angle, height and g; the drag setting is retained.
