# Orthogonal Distance Fit of a Pyramid (Geodäsie/Vermessung)

Hi Balata,

So, could you please send to me your full name with the title of your algorithm, in order to use it as a reference in my thesis.

A suggestion is maybe:

Lösler, M. (2012). Orthogonal Distance Fit of a Pyramid. http://forum.diegeodaeten.de/index.php?id=4083 (last access: 2012-12-02).

I will try to understand every element that you used in this algorithm.

The used least squares algorithm is a common way for data fitting. It can also be used for other problems like transformations. It is often called Gauß-Helmert model or general least squares. An understandable description of the Gauß-Helmert model (in english) is given by e.g. Neitzel's Generalization of total least-squares on example of unweighted and weighted 2D similarity transformation (Springer allows free download of PDFs til the end of this year!). Moreover, the work of Lenzmann & Lenzmann is to point out: Strenge Auswertung des nichtlinearen Gauß-Helmert-Modells.

To fit the pyramid, the described algorithm fits four planes in one pour. These four planes are parameterized by the so-called Hesse normal form. The first 4 restrictions normalize the normal vector of each plane (subsequent shown for plane 1).

R(1, 4:6)   = 2.*X0(4:6); % nx*nx + ny*ny + nz*nz == 1
...
r(1,1) = X0(4:6)'  *X0(4:6)   - 1;

To estimate the apex within the data fit, 4 additional restrictions are needed. These restrictions simple define the apex as a point of each plane (subsequent shown for plane 1).

R(5, [1:3,  4:7])  = [X0(4:6)'   X0(1:3)' -1]; % nx*xApex + ny*yApex + nz*zApex == d
...
r(5,1) = X0(4:6)'  *X0(1:3) - X0(7);

Good luck with your thesis. Maybe, you can forward a digital copy of your work after finishing to me.

Kind Regards,
Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences