Geodetic Network Least Squares Adjustment Simulator
Geodetic surveying networks solve over-determined observation equations using Parametric Least Squares Adjustment (AT W A x = AT W L) to minimize measurement residual sum of squares.
Surveying Geodesy Tools
Least Squares Adjustment Simulator (2D Trilateration)
| Station | X (m) | Y (m) | Observed distance (m) | σ (m) |
|---|---|---|---|---|
| A | ||||
| B | ||||
| C | ||||
| D |
What Least Squares Does in a Survey Network
Two distances are enough to locate a point in 2D — their circles intersect at the answer. Real surveys never stop at two. They measure more observations than the minimum (redundancy), because every observation carries error, and with only the minimum there is no way to detect a mistake or to say how good the coordinates are. The price of redundancy is inconsistency: three or four measured circles almost never meet at exactly one point.
Least squares adjustment resolves that inconsistency in a principled way. It finds the coordinates that minimize the weighted sum of squared residuals, vTWv — the statistically most probable position under the assumption that observation errors are random and normally distributed with the stated standard deviations. Just as importantly, the same computation yields the covariance matrix of the adjusted coordinates: not just a position, but a defensible statement of its uncertainty. That pair — most probable coordinates plus their covariance — is the output every control-network adjustment is expected to deliver.
How the Adjustment Works
Observation model: di = √((x − xi)2 + (y − yi)2)
Linearised residual equation: vi = ai·dx + bi·dy − li, with ai = (x0−xi)/di0, bi = (y0−yi)/di0, li = diobs − di0
Normal equations: (ATWA)·dx = ATW·l, W = diag(1/σi2) — solved repeatedly (Gauss–Newton) until |dx|, |dy| < 1 µm
A-posteriori variance factor: σ02 = vTWv / (n − 2), n = number of observations, 2 = unknowns (x, y)
Covariance of the coordinates: Σ = σ02·(ATWA)−1 → σx, σy, and the error ellipse
Chi-square test: vTWv is compared with χ20.95(n−2) — 3.841 for 1 dof, 5.991 for 2 dof
The formulation follows the standard parametric (observation-equation) adjustment: see Nielsen, Least Squares Adjustment: Linear and Nonlinear Weighted Regression Analysis (DTU, 2013), and Ghilani & Wolf, Adjustment Computations, for the normal-equation and covariance treatment used in geodetic practice. The chi-square test is the same network-consistency check production software (e.g. Trimble Business Center) applies after an adjustment: if the test fails, the observations and their weights are re-examined — not the arithmetic.
Scope of this simulator: 2D distance observations (trilateration) only. Angle observations, heights and full 3D networks use exactly the same normal equations with additional observation types and unknowns; they are deliberately out of scope here so that every number this page produces can be checked by hand.
Worked Example: A Passing and a Failing Adjustment
Four control stations form a 100 m square: A(0, 0), B(100, 0), C(100, 100), D(0, 100). The true point is P(30, 40); each distance is observed with σ = 0.02 m, and the adjustment starts from the approximate point P0(28, 38). Preset C (the default) adds observation errors of about +15, −18, +12, −8 mm — consistent with the stated σ:
| Quantity | Preset C (clean) | Preset B (outliers) |
|---|---|---|
| Adjusted point P | (30.0062, 40.0010) | (30.0187, 40.0016) |
| Residuals v (A, B, C, D) | −10.49, +12.66, −16.91, +9.95 mm | −27.47, +34.11, −44.82, +26.98 mm |
| vTWv (dof = 2) | 1.638 | 11.639 |
| σ0 | 0.905 | 2.412 |
| σx / σy | 13.20 / 12.49 mm | 35.18 / 33.30 mm |
| Error ellipse a / b (1σ), θ | 13.42 / 12.26 mm, −26.3° | 35.77 / 32.67 mm, −26.3° |
| Chi-square test (χ20.95(2) = 5.991) | 1.638 < 5.991 — PASS | 11.639 > 5.991 — FAIL |
Preset B uses the same stations and the same stated σ, but the observation errors are about +40, −50, +30, −20 mm — two to two-and-a-half times the claimed precision. The adjustment still converges and still returns coordinates, but the chi-square test correctly refuses to certify them: vTWv = 11.639 against a 5.991 limit. Note also what happened to the reported uncertainty: σ0 = 2.412 inflates the ellipse from ~13 mm to ~36 mm. The geometry did not change (θ is identical); only the consistency of the observations did.
Reading the Result
- σ0 near 1 — the observations behaved the way their stated σ said they would. Much larger than 1 means the observations were worse than claimed (or contain a blunder); much smaller than 1 usually means the σ values were pessimistic.
- Residuals are not the observation errors. In Preset C the largest observation error was about 18 mm, but the largest residual is 16.91 mm and the pattern differs per station — the adjustment absorbs part of every error into the adjusted coordinates (which is why P lands 6.3 mm from the true point). Small residuals alone never prove good observations.
- A failed chi-square test is an instruction, not an error message. Re-check the observation with the largest standardized residual (|v|/σ) first, then the weights: a realistic σ for the instrument and conditions. Re-scaling all weights just to force a pass hides the problem the test exists to reveal.
- The ellipse is the deliverable. σx and σy describe the axes separately; the ellipse (a, b, θ) from the full covariance — including the correlation term — is what a specification like “95% semi-major ≤ 35 mm” is checked against. Multiply a and b by 2.45 to go from the 1σ (39.35%) ellipse shown here to the 95% ellipse; the error ellipse simulator explores a given covariance in depth.
Frequently Asked Questions
Why do I need at least 3 distances for one point?
Two distances already determine a 2D point exactly — the two circles intersect at the solution, with zero redundancy. There is nothing left over to form residuals from, so no chi-square test and no honest uncertainty estimate are possible. The third observation creates the first degree of freedom (n − 2 = 1), and each additional observation strengthens both the geometry and the ability to detect a bad observation.
What does sigma0 mean?
σ0 is the a-posteriori variance factor's square root: it compares how the observations actually behaved against the standard deviations claimed for them. σ0 ≈ 1 means the two agree. σ0 well above 1 means the observations were worse than claimed, or one contains a blunder. σ0 well below 1 usually means the claimed σ values were pessimistic. Because the coordinate covariance is σ02·(ATWA)−1, σ0 scales the reported error ellipse directly.
What should I do when the chi-square test fails?
Treat the failure as a finding, not as a formatting problem. First inspect the observation with the largest standardized residual |v|/σ — re-observe it if possible, and reject it only with a documented reason. Then check the fixed station coordinates, and whether the σ values were realistic for the instrument and conditions. Re-scaling all weights until the test passes makes the statistic green while hiding exactly the problem the test exists to reveal.
How is this different from the error-ellipse simulator?
The error ellipse simulator starts from a covariance matrix you already have and visualizes it. This page is the step before: it computes the covariance from raw observations, through the adjustment itself. In practice the two chain together — adjust the network here, then explore the resulting ellipse there.