geoprimsField-grade geospatial math

Leveling network adjustment

Adjusted elevations for a network of leveling runs between benchmarks, by weighted least squares from one or more fixed benchmarks, with standard errors, residuals, and the reference variance.

Experimental: not yet fully verified. How results are checked

0.00001712

Extra runs to check the net: 2. Test: needs a standard deviation for every run.

Adjusted benchmarks
BenchmarkAdjusted elevationStandard error
BM B105.1189 m±4.7 mm
BM C107.5752 m±4.8 mm
BM D101.9052 m±5.6 mm
Residuals
ObservationResidualStandardized residual
BM A to BM B-4.1 mm-1.17
BM B to BM C0.3 mm0.08
BM C to BM A-5.2 mm-1.17
BM B to BM D-2.7 mm-1.10
BM D to BM C-4 mm-1.10
Degrees of freedom
Chi-square test at 95%
Equations
Provenance
Computed by
survey.reduction.level-network 1.0.0, core 0.1.0
Model
Observation equations H_to − H_from = Δh + v with weight 1/σ², 1/length, or 1/setups; normal equations (AᵀPA) x = AᵀPl solved by Cholesky; σ0² = vᵀPv / r; standard errors √(σ0² Q_xx); standardized residuals v / (σ0 √Q_vv); two-tailed 95% chi-square test of vᵀPv when standard deviations are given (Ghilani, Adjustment Computations)
Accuracy
Exact weighted least squares for the stated weights
Notes
1 shown with the answer
Cites
Ghilani, C. D., Wiley, Adjustment Computations: Spatial Data Analysis

Something look off?

Your values

Showing an example. Change anything.
BM ABM BBM CBM DLargest residual: BM C to BM A, -5.2 mm
How we got thisFormula, worked example, sources, and proof

Model: Observation equations H_to − H_from = Δh + v with weight 1/σ², 1/length, or 1/setups; normal equations (AᵀPA) x = AᵀPl solved by Cholesky; σ0² = vᵀPv / r; standard errors √(σ0² Q_xx); standardized residuals v / (σ0 √Q_vv); two-tailed 95% chi-square test of vᵀPv when standard deviations are given (Ghilani, Adjustment Computations)

Accuracy: Exact weighted least squares for the stated weights

When to use this: Use this when leveling runs tie several benchmarks into a network with loops or more runs than needed, and you want one consistent set of elevations. Enter the fixed benchmarks and each run's height difference with its length, number of setups, or standard deviation; it returns adjusted elevations with standard errors and shows which runs fit worst.

Limitations: Weights by length or setups give relative weights only, so the chi-square test runs only when every run has a standard deviation. Fixed benchmarks are held exactly. Every benchmark must connect to a fixed one through the runs. It adjusts height differences as given, without rod, curvature, or orthometric corrections.

Worked example: A small net: one fixed benchmark, three new ones, five runs. Source: Constructed network with a 9 mm loop misclosure.

You enter

Fixed benchmarks
BM A, 100.000 m
Leveling runs
BM A, BM B, 5.123 m, 2.0 km BM B, BM C, 2.456 m, 1.5 km BM C, BM A, -7.570 m, 2.5 km BM B, BM D, -3.211 m, 1.2 km BM D, BM C, 5.674 m, 1.8 km

You get

Reference variance
0.00001712
Degrees of freedom
2
Chi-square test at 95%
needs a standard deviation for every run
Equations
Observation equations (unknowns only; fixed elevations moved to the right): H(BM B) = 105.123 m + v1 (weight 0.5) H(BM C) − H(BM B) = 2.456 m + v2 (weight 0.6667) −H(BM C) = -107.57 m + v3 (weight 0.4) H(BM D) − H(BM B) = -3.211 m + v4 (weight 0.8333) H(BM C) − H(BM D) = 5.674 m + v5 (weight 0.5556) Normal equations N x = t: [2, -0.6667, -0.8333] · x = 53.6 [-0.6667, 1.622, -0.5556] · x = 47.8176 [-0.8333, -0.5556, 1.389] · x = -5.82806

Review: Not yet independently reviewed by a licensed surveyor.

Last verified: 2026-10-20, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.

Status: version 1.0.0, core 0.1.0. See this tool in the verification report.

Checked against: 20 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.

Sources

Experimental means this tool has not yet met the stable bar: at least 20 golden vectors, differential tests, and an independent worked example.