% LaTeX source for Gauss's Applic to Pract Geom

\documentclass{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{times}

\begin{document}

\begin{center}
  Application of Calculus of Probabilities to a Problem in Practical Geometry\\
  (Extract from a letter of Gauss to Schumacher,\\
  \textit{Astronomische Nachrichten}, Vol.1, p.80
\end{center}

    As you requested, I am sending you the rules concerning the use of the
method of least squares in the addition of the following problem:

\medskip

\parbox{0.9\textwidth}{
    To determine the position of a point from the horizontal angles
    observed from this point between other points whose position is known
    exactly.}

\medskip

    This question, which is very elementary, can cause no difficulty to
those who have grasped the spirit of the method of least squares. 
Nonetheless I shall develop the formulas to which this method leads for
the benefit of those who may have to deal with the practical question
without studying the theory.

    Let a and b be the coordinates of one of the given points; we
shall suppose that one takes the positive $x$ direction from north to south
and the positive $y$ direction from west to east; let $x$ and $y$ be the
approximate coordinates of the unknown point and $dx$, $dy$ the corrections, as
yet unknown, which should be applied to them.  Let us define two quantities
$\phi$ and $r$ by the formulas
\[\tan\phi=\frac{b-y}{a-x},\quad r=\frac{a-x}{\cos\phi}=\frac{b-y}{\sin\phi}\]
being taken in such a quadrant that the value of $r$ is positive.

    Further, let us put
\[\alpha=\frac{206265''(b-y)}{r^2},\quad\beta=\frac{206265''(a-x)}{r^2}\]
Then for an observer placed at the second point, the azimuth of the first
(taking the azimuth of a line parallel to the $x$ axis to be zero) is
\[            \phi + \alpha dx + \beta dy,\]
where the last two terms are expressed in seconds.

    Let $\phi'$, $\alpha'$, $\beta'$ be the quantities corresponding to  
$\phi$, $\alpha$, $\beta$ relative to the second of the given points,  
$\phi''$, $\alpha''$, $\beta''$ those of which refer to the
third, and so on.  Let us suppose that for the angular measurements taken
at the point whose position is unknown, a theodolite has been used without
repetition, with the lens turned successively towards the various known
points without the position of the instrument itself being changed.  If
$h$, $h'$, $h''$ are the observed azimuths, one would have, assuming the 
observations to be rigorously exact and $dx$, $dy$ exactly known,
\begin{equation}
  \hspace{-2em}\phi - h + \alpha dx + \beta dy = \phi' - h' + \alpha'dx + \beta'dy 
  = \phi'' - h'' + \alpha''dx + \beta''dy ...
\end{equation}

    Thus if one writes down that three of these differences have the same
value, one will find the approximate values for $dx$ and $dy$; if only three
points have been observed there is nothing more to be done; but if the
number of points considered is larger, the errors will be best compensated
for by taking the average of the various expressions (1), setting the
difference of each of them from the average equal to zero, and applying to
these equations the method of least squares.

    If all the measurements are independent of each other, each one of
them furnishes an equation between $dx$ and $dy$, and it is necessary to
combine these equations by the method of least squares, taking account, if
one wishes, of the unequal precision of the observations.

    For example, let i be the angle between the first and second
point, i' the angle between the second and third, and so on, reckoning
always from left to right; one obtains the equations
\[\begin{array}{lllllllllllllll}
  \phi'&-&\phi&-&1&+&(\alpha'&-&\alpha)dx&+&(\beta'&-&\beta)dy&=&1\\
  \phi''&-&\phi'&-&1&+&(\alpha''&-&\alpha')dx&+&(\beta''&-&\beta')dy&=&1
\end{array}\]

    If the various measurements have the same weight, one obtains from these
equations two normal equations, by adding them, after having successively
multiplied each one by the coefficient of $dx$ or by the coefficient of $dy$.

    If, on the other hand, the measurements of the angles are of unequal
exactitude, and, for instance, the first is based on $\mu$ and the second on
$\mu'$ repetitions, then it is necessary in the two cases to multiply the 
equations by $\mu$, $\mu'$, etc., before the addition; subsequently one finds 
$dx$, $dy$, etc.\ by elimination between the two normal equations so obtained.

    (The preceding rules are only intended for persons to whom the method
of least squares is still unknown and for whom it would perhaps be wise to
recall that in the multiplications, the signs of $\alpha' - \alpha$, 
$\beta' - \beta$, etc.\ must be rigorously preserved.  Finally, I remark again 
that we are considering only the compensation of errors committed in the 
angles, coordinates of the given points being supposed exact.)

    Let us apply the preceding rules to the observation which we made
together on the Holkensbastion, at Copenhagen.  I must warn you that the
results here cannot be rigorously exact.  Since the observed points were
very close to the station, an inaccuracy of ten or twenty feet in their
position would exert an influence much greater than the errors which are
usually to be expected in measuring angles.  Thus one should not be 
surprised that the best adjustment of the angles leaves differences much
larger than one admits as possible in observations of such a nature.
This application should be taken as an example of the procedure to follow
in other cases.
\begin{center}
  \begin{tabular}{llll}
        \multicolumn{4}{c}{Angles measured from the Holkenbastion}\\
        \ \\
        Friedrichsberg - Petri       &\phantom{1}70$^{\circ}$& 35$'$& 22.8$''$\\
        Petri - Erlosersthurm                  &104  &57  &33.0 \\
        Erlosersthurm - Friedrichsberg         &181  &27  &\phantom{1}5.0\\
        Friedrichsberg - Frauenthurm &\phantom{1}80  &37  &10.8\\
        Frauenthurm - Friedrichsthurm          &101  &11  &50.8\\
        Friedrichsthurm - Friedrichsberg       &178  &11  &\phantom{1}1.5\\
        \ \\
        \multicolumn{4}{c}{Coordinates of the various points in Paris feet,}\\
        \multicolumn{4}{c}{the origin being at the Copenhagen Observatory}\\
        \ \\
        Petri       &\phantom{1}487.7 &\multicolumn{2}{l}{+\ 1007.1}\\
        Frauenthurm &\phantom{1}710.0 &\multicolumn{2}{l}{+\ \phantom{1}674.2}\\
        Friedrichsberg        &2430.6 &\multicolumn{2}{l}{+\ 8335.0}\\
        Elossersthurm         &2940.0 &\multicolumn{2}{l}{$-$\ 3536.0}\\
        Friedrichsthurm       &3059.3 &\multicolumn{2}{l}{$-$\ 2231.2}\\
        \ \\
        \multicolumn{4}{c}{The approximate coordinates of the Bastion are}\\
        \ \\
        \multicolumn{4}{c}{$x = 2836.44$}\\
        \multicolumn{4}{c}{$y = \phantom{1}444.33$}
  \end{tabular}
\end{center}
and thus we find the azimuths
\begin{center}
  \begin{tabular}{llllrrrr}
     Petri     &166$^{\circ}$
     & 30$'$ &42.56$''$ &+ &19.92$dx$ &+ &83.04$dy$\phantom{.}\\
     Frauenthurm     &173  
     & 33  &50.54 &+ &10.80$dx$ &+ &95.78$dy$\phantom{.}\\
     Friedrichsberg &\phantom{1}92  
     & 56  &29.46 &+ &26.06$dx$ &+ &1.37$dy$\phantom{.}\\
     Erlosersthurm   &271  
     & 29  &25.38 &$-$ &51.79$dx$ &$-$ &1.35$dy$\phantom{.}\\
     Friedrichsthurm &274  
     & 45  &41.48 &$-$ &76.56$dx$ &$-$ &6.38$dy$.
  \end{tabular}
\end{center}
The angle which one sees the distance from Petri to Friedrichsberg
is consequently
\[           73^{\circ}\ 34'\ 3.10''-  6.15dx + 81.70dy;\]
and setting it equal to the observed angle, one has
\[          - 79.70'' -  6.15dx +  81.70dy = 0\]

    Similarly one obtains the following equations
\begin{align*}
  \phantom{-}69.82''           - \phantom{1}71.71dx - \phantom{1}84.39dy &= 0\\
  \phantom{-1}9.08\phantom{''} + \phantom{1}77.86dx + \phantom{11}2.69dy &= 0\\
  \phantom{-1}0.28\phantom{''} - \phantom{1}15.27dx + \phantom{1}94.44dy &= 0\\
  \phantom{-1}0.04\phantom{''} - \phantom{1}15.27dx +           102.16dy &= 0\\
  \phantom{1}3.42             +            102.63dx + \phantom{11}7.72dy &= 0
\end{align*}
Supposing the observations to be equally precise, one deduces from this
the normal equations
\begin{align*}
            29640dx + 14033dy &= \phantom{1}4168''\\
            14033dx + 33219dy &= 12383''
\end{align*}
and consequently
\[           dx = -0.05,\quad dy = 0.40; \]
the coordinates of the Bastion are therefore
\begin{align*}
                2836.39&\\
                 444.73&.
\end{align*}

    The differences between the observed values of the angles and those
which one calculates from the results are too big for one to be able to
attribute them to errors of observation; they indicate, as we observed, a
lack of precision in the determination of the known points.

    The coordinates $x$ and $y$, taken as first approximations, were deduced
directly from the fourth and fifth angle.  Although the direct method should
be considered an almost exhausted subject, I shall nevertheless indicate, for
the sake of completeness, the method which I employ in such a case.

    Let $a$ and $b$ be the coordinates of the first known point; those of
the second will be of the form
\[           a + R\cos E,\quad b + R\sin E,\]
and those of the third
\[           a + R'\cos E',\quad b + R'\sin E'.\]
Let
\[           a + \rho\cos\bar\epsilon,\quad b + \rho\cos\bar\epsilon\]
be the desired coordinates of the point from which one is observing; let
$M$ be the observed angle (always from left to right) between the first and
second point, and $M'$ the angle observed between the first and third 
(supposing that, if necessary, one has subtracted 180 degrees); let
\[\begin{array}{rllrll}
   \frac{R}{\sin M}&=&a &\frac{R'}{\sin M'}&=&a'\\
   \ \\
                E-M&=&N,             &E'-M'&=&N'
\end{array}\]
Thus one has the two equations
\[\rho=n\sin(\epsilon-N),\quad\rho'=n'\sin(\epsilon-N')\]
which, written in the following way
\[n=\frac{\rho}{\sin(\epsilon-N)}\quad
  n'=\frac{\rho}{\sin(\epsilon-N')}\]
are solved by the method set forth in \textit{Theoria Motus Corporum 
Coelestium}, page 82.

    One of the solutions set forth in this place leads to the following
rule.  Let $n'$ be larger than, or at least no smaller than $n$, which is
obviously permissible, since one may choose the second point arbitrarily;
then setting
\begin{gather*}
  \frac{n}{n'}=\tan\zeta\\
  \frac{\tan\frac{1}{2}(N'-N)}{\tan(45^{\circ}-\zeta)}=\tan\bar\phi
\end{gather*}
and one will have
\[\epsilon=\frac{1}{2}(N'+N)+\bar\phi.\]
Since $î$ is known, one of the equations, or indeed both of them, will furnish
the value of $\rho$.

    In our example, if we consider Frauenthurm as the first point,
Friedrichsberg as the second and Friedrichsthurm as the third, we have
\[\begin{array}{llllll}
   a      &= &710.0                    &b      &= &684.2\\
   E      &= &77^{\circ}\ 19'\ 31.92'' &E'     &= &308^{\circ}\ 51'\ 45.77''\\
   \log R &= &3.8944205                &\log R'&= &3.5733549\\
   M      &= &99^{\circ}\ 22'\ 50.20'' &M'     &= &101^{\circ}\ 11'\ 50.80''\\
   N      &= &337^{\circ}\ 56'\ 42.72''&N'     &= &207^{\circ}\ 39'\ 54.97''\\
   \log n &= &3.9002650                &\log n'&= &3.5817019
\end{array}\]
and, $n'$ being larger that $m$, we shall change the order and put
\[\begin{array}{llllll}
   N      &= &207^{\circ}\ 39' 54.97''&N''    &= &337^{\circ}\ 56'\ 42.72''\\
   \log n &= &3.5817019               &\log n'&= &3.9002650;
\end{array}\]
from this one obtains
\begin{align*}
  \zeta    &= \phantom{1}19^{\circ}\           39'\ \phantom{1}3.87''\\
  \bar\phi &= \phantom{1}80\phantom{^{\circ}}\ 45\phantom{'}\ 31.69\\
   \epsilon &=           335\phantom{^{\circ}}\ 
   33\phantom{'}\ 50.53\quad
  \log\rho= 3.3303990
\end{align*}
and as coordinates of the Holkensbastion,
\[              2836.441\quad 444.330.\]

\bigskip\bigskip\bigskip

\noindent
Taken from \textit{Work (1803--1826) on the Theory of Least Squares},
trans. H F Trotter, Technical Report No.5, Statistical Techniques Research
Group, Princeton, NJ: Princeton University 1957.

\end{document}

%