# theodolite

theodolite, a MATLAB code which presents the problem of estimating the location of an event which occurs in the sky, atmosphere, or the heavens, using nothing but the reported angle of observation from several stations. This is an example in which a nonlinear least squares solver is needed.

A theodolite is a tool for accurately measuring the angular position of an event. It can be idealized as a pair of protractors, one of which measures an angle in the local horizontal plane, with an origin, say, pointing to the north. The second protractor is used to measure the height of the observation.

When a missile is fired at a test facility, its trajectory was followed by numerous theodolites at scattered locations. Measurements made by the theodolites, taken at the same time, could be used to estimate the actual location of the missile at that time. Since there were multiple measurements available, and the measurements were all subject to some error, it is natural to consider applying the least squares method to the problem of determining an estimated location that minimizes the sum of squared residuals.

### Languages:

theodolite is available in a MATLAB version.

### Related Data and Programs:

geometry, a MATLAB code which performs geometric calculations in 2, 3 and M dimensional space, including the computation of angles, areas, containment, distances, intersections, lengths, and volumes.

### Reference:

1. Charles Hall,
Industrial Mathematics: A Course in Realism,
American Mathematical Monthly,
Volume 82, Number 6, June-July 1975, pages 651-659.

### Source Code:

• line_par_point_dist_3d.m, determines the distance from a point in 3D to a line defined by a parametric equation.
• r8vec_transpose_print.m, prints the transpose of an R8VEC.
• theodolite_f.m, a function which, given a proposed location XYZ for the event, returns a vector F of the distance of the event to each line defined by an observer's data.