From: W. eWatson on
LSQ (linear least squares) This is a problem that is based in astronomy
for meteor work.

A meteoroid (rock) is traveling in a straight line through the earth's
atmosphere. By physical laws it will be in a plane of a great circle
that passes through the earth's center. For simplicity, assume the earth
is a sphere. Three observing stations separated by say 50 to 100 miles
all record points along the the meteoroid's path. Again, for simplicity,
assume there are no errors in their observations of altitude (measured
from the station to the zenith, point directly above the station, to the
horizon (90 degrees is overhead and the horizon is at 0 degrees) and
azimuth (starts at north on the horizon, zero degrees, and moves around
the horizon clockwise). 180 degrees is south.

If one draws a line from each station to the first data point on the
track, and another to the last one, there are three planes for each
station that all intersect the line given by the track.

Here's the question. Suppose each station has an error in both alt and
az. Now find the line of intersection that best fits the data. If one
has only two stations, one could fit a plane for each station and find
the intersection of the two planes. BTW, the planes would be fit by a
normal distance to each point, and not to an axis. Solutions to this
problem can be found on the web. I suppose another simplification could
be that all three stations are on the same plane.

This problem and its solution are found in a paper by Ceplecha, 1987,
but the details are murky to me. For two, I'm pretty much OK, but for
three and above it escapes me. His paper covers a lot more territory
than this problem, but this one is what intrigues me the most.