The theodolite is the standard tool of optical survey. It is a small tripod-mounted high precision telescope with a total system magnification of 15x-60x and a dizzying array of dials, knobs, levels, and auxiliary lens systems, with which extremely high precision measurements of horizontal (``azimuth'') and vertical (``altitude'') angles are made. Usable resolution of 15 arc seconds (12 parts per million) is common. Professional surveyors are migrating en masse to electronic theodolites with digital readouts; as a consequence classic purely mechanical theodolites such as the Kern DKM1 are available in the used market for under $1000.
The theodolite is the most general and precise tool for parallax rangefinding. Fundamentally, the technique is the same as is used in SLR cameras with parallax focus displays, in one piece coincident image rangefinders like the Wild and Barr & Stroud, and even in adjustable objective rangefinding riflescopes (the size of the objective lens is the baseline).
The technique articulated below involves no mathematical approximations, so the results are as good as the measurements. It can be used to measure large geographic distances for surveying purposes - e.g., distances to the tops of distant mountains or other landmarks (using a large, laser-measured or theodolite-measured baseline) - or shorter distances of one to six miles using baselines measured directly with line or tape, to compute targeting solutions for artillery and very high power small arms.
No doubt the ideal solution equipment-wise is what's called a ``total station'', which has an integral precision laser rangefinder with which the baseline length can be instantly measured with millimeter accuracy. Unfortunately, these things cost a fortune, and are rather bulky. Common consumer-grade laser rangefinders such as the Bushnell Yardage Pro 1000 are sufficiently accurate to measure large (800+ yard) baselines for casual geographic surveying, but are not accurate enough for even casual use in short baseline rangefinding.
So, without further ado, what follows is my recipe for theodolite rangefinding with a completely arbitrary baseline (unleveled, skewed, whatever). I developed it over the course of exchanges with participants in the Biggerhammer.net Discussion Forum. The coolest thing you can do with the recipe is rangefind with a baseline that goes straight up a hillside.
Stick poles in the ground (or otherwise fixed vertically) at the two vertices. The planted poles must be at least as high as the theodolite's lens, must have perpendicular bubble levels on them, and must be ruled at both ends such that the depth of the plant can be read revealing which rule at the other end corresponds to the height of the theodolite lens (the top rules must be clearly readable through the theodolite's eyepiece).
Measure the baseline distance using some sort of ruled measuring line or tape that can be pulled taut along the ground. It should be able to handle at least 30 meters. If you don't have a second pair of hands, attaching one end to the bottom of a well-planted vertex pole should work well enough. The end of the line should be equipped with a hook for easy pole attachment with a precisely known length offset (preferably zero).
Choose a vertex for the first set of measurements. Yank out the pole, place and level the theodolite over it, and use the theodolite's optical plummet or, in its absence, a dangling weight, to center on the hole. Measure the azimuth between the other baseline vertex and the target, and the angular altitudes of the target and of the other vertex (specifically, of the exact spot on the pole where the theodolite lens will be when measuring from that pole, using the rules as discussed above). Now restore the pole, move to the other vertex, and repeat. The measured altitudes of the other theodolite positions should be equal neglecting sign (this is an error check).
Though the computations can accommodate essentially any baseline, no matter how pathological, the baseline vertices should be somewhat close to right angles of course, so that the lateral component of the baseline (the part that contributes to parallax) is as big as possible.
Note that this method will accurately compute the range even if one measurement position is directly above the other (that's what I had in mind for a pathological baseline).
So, to review, you perform the following direct measurements:
and you want range to target from each vertex, TargDist1 and TargDist2 (I do both just for completeness).
First, derive the actual vertex angles from the azimuths and altitudes. This is done by computing the dot product, which can be done by converting to cartesian coordinates (assuming unit vector lengths), multiplying the components, adding them, then taking the cos-1 of the resulting sum.
In the cartesian coords: x is right, y is up, z is downrange, and the azimuth from the vertex to the target is defined to be zero (this is natural). _t_ are the components for the vector pointing at the target, and _b_ are the components for the vector pointing at the other vertex.
xt1 = 0
yt1 = sin(Alt1)
zt1 = cos(Alt1)
xb1 = sin(Az1)*cos(AltDiff)
yb1 = sin(AltDiff)
zb1 = cos(Az1)*cos(AltDiff)
(and similarly for the other vertex)
DotProd1 = (xt1*xb1) + (yt1*yb1) + (zt1*zb1)
DotProd2 = (xt2*xb2) + (yt2*yb2) + (zt2*zb2)
Now compute the vertex angles:
An1 = cos-1(DotProd1)
An2 = cos-1(DotProd2)
These can actually be written out fairly compactly, though incomprehensibly:
An1 = cos-1(sin(Alt1)*sin(AltDiff) + cos(Alt1)*cos(Az1)*cos(AltDiff))
An2 = cos-1(sin(Alt2)*sin(-AltDiff) + cos(Alt2)*cos(Az2)*cos(-AltDiff))
If the baseline and target are all on perfectly level ground at the same height, the labyrinthine procedure above can be skipped, and An1 and An2 measured directly.
The final bit is:
Vertex at target, AnT = 180degrees - (An1 + An2)
TargDist1 = BaseLen * sin(An2) / sin(AnT)
TargDist2 = BaseLen * sin(An1) / sin(AnT)
The all-at-once formula in terms of directly measured quantities is:
TargDist1 = BaseLen * sin(cos-1(sin(Alt2)*sin(-AltDiff) +
cos(Alt2)*cos(Az2)*cos(-AltDiff))) /
sin(180degrees - (cos-1(sin(Alt1)*sin(AltDiff) + cos(Alt1)*cos(Az1)*cos(AltDiff)) +
cos-1(sin(Alt2)*sin(-AltDiff) +
cos(Alt2)*cos(Az2)*cos(-AltDiff))))
TargDist2 = BaseLen * sin(cos-1(sin(Alt1)*sin(AltDiff) +
cos(Alt1)*cos(Az1)*cos(AltDiff))) /
sin(180degrees - (cos-1(sin(Alt1)*sin(AltDiff) + cos(Alt1)*cos(Az1)*cos(AltDiff)) +
cos-1(sin(Alt2)*sin(-AltDiff) +
cos(Alt2)*cos(Az2)*cos(-AltDiff))))
I think it's safe to say the above two belong in a programmable calculator...
On flat ground with everything at the same level, they reduce greatly, as already hinted:
TargDist1 = BaseLen * sin(Az2) / sin(180degrees - (Az1 + Az2))
TargDist2 = BaseLen * sin(Az1) / sin(180degrees - (Az1 + Az2))
I haven't rigorously checked my math, so don't use it for real world operations unless you've done the rigorous checking yourself. If you do confidently validate it, let me know.