I am a GIS programmer implementing a visualization.
I am modeling the idealized trajectory of a particle ejected from a volcanic vent using:
$$\text{distance} = \frac{(v^2 \times sin(2\theta))}{g}.$$
Where $g = 1.62\:\mathrm{m/s^2}$, $v$ is velocity, and $\theta$ is ejection angle. $g$ is the lunar gravity constant I was supplied.
How can I incorporate the slope of the underlying surface assuming a single point of ejection? $$$$$$$$
EDIT: My current workflow is to compute total travel distance, extract a topographic profile along the total theoretical travel distance and then check the height of the projectile to the height of the actual surface at 100m intervals. In this way I can compute the landing site for the projectile.
EDIT 2: I updated the question with the correct formula. Apologies for the incorrect transposition. My implementation now assumes a completely flat surface. What happens when the ejection surface is sloped either uphill or downhill?