Determining Altitude

        / | \
       /  |  \
     /    O   \
    /   .   .  \
  /x .        .z\
 /. w         y .\
Two observers, A & B, are a distance D apart on flat ground and are both looking at the same object C above them (just for the sake of argument, let's say it's the point of maximum height of a water rocket.) With the angles they measure, they want to determine the height of C above the ground.

Assume that point O on the ground is directly below C (AOC and BOC are right angles).
Angles w (OAB) and y (OBA) are measured in the horizontal plane.
Angles x (OAC) and z (OBC) are measured vertically.

Find OC in terms of D and the necessary angles (I don't think all of the angles will be needed.)

Follow-Up: Many people have quickly found that the two lower angles (w,y) and one upper angle (x,z) can be used to find OC. Can OC be found with just one of (w,y) and both of (x,z)?

Source: Original (personal necessity...) A good starting place for water rocketry is:

The simplest solution received was:

OC = D * tan(x) * sin(y) / sin(w+y)

This is found by first using the sine law to find AO, then multiplying by tan(x) to get OC.

2nd Follow-up: If either w or y is zero, then this formula won't work. Find a formula for OC in this special case.
Wilfred Theunissen sent the following solution to this possibility:

If w=0 then y=0 too, so we have the following three situations:

Case1: O is between A and B (so x and z < 90 degrees)
Case2: O isn't between A and B (say x>90 degrees and z<90 degrees
Case3: O=A or O=B : this is trivial.    

Let AB=D and

1) D^2 = AC^2 + BC^2 -2*AC*BC*cos(180-(x+z))

2) sin(x) = OC/AC so AC = OC/sin(x)
3) sin(z) = OC/BC so BC = OC/sin(z)

Substituting 2) and 3) in 1) and cos(180-alpha) = -cos(alpha)

4) D^2 = (OC/sin(x))^2+(OC/sin(z))^2+2*OC^2*cos(x+z)/(sin(x)*sin(z))

multiplying with sin(x)^2*sin(z)^2 we get

5) sin(x)^2*sin(z)^2*D^2 = OC^2 *

Rewriting de righthand-side we get:

6) sin(x)^2*sin(z)^2*D^2 = OC^2

so OC can be calculated from 6) 


1) D^2 = AC^2 + BC^2 -2*AC*BC*cos(180-(x+z))

2) sin(180-x) = OC/AC so AC = OC/sin(180-x)
3) sin(z) = OC/BC so BC = OC/sin(z)

But because sin(180-x)=sin(x) we get the same formula as in Case1 !!!!

Mail to Ken