We know how to measure the height of a mountain from the ground using triangulation:
https://en.wikipedia.org/wiki/Solution_of_triangles
The question is how to do same from the top of the mountain.
Formally: from the top T of a mountain looking down to a straight road on the ground with 3 mile markers A B C. Given AB = BC = 1 miles and two angles ATB and BTC. Calculate the distance TB, or equivalently the height of T.
Need a formula that can be implemented by a program.
Thanks.
According to the following diagram, the key to the problem is to find $\theta$ in terms of x and y.
It should be clear that the areas of the three shaded triangles are the same. Then, $pq \sin y = qr \sin x$. This means $\dfrac {p}{r} = \dfrac {\sin x}{\sin y}$.
In $\triangle TAC$, $\dfrac {p}{r} = \dfrac {\sin (\pi – ((x + y) + \theta)}{\sin \theta}$.
Then, $\dfrac {\sin x}{\sin y} = \dfrac {\sin ((x + y) + \theta)}{\sin \theta}$. From which, $\theta$ can be found.