A native desktop GUI for geodetic and general least squares adjustment — four estimators, residual plot, and variance-covariance heatmap. Built in Rust with egui.
| Input Tab | Results Tab |
|---|---|
![]() |
![]() |
| Residual Plot | VCV Heatmap |
|---|---|
![]() |
![]() |
| Method | Formula | Use Case |
|---|---|---|
| Unweighted LS | x̂ = (AᵀA)⁻¹Aᵀb | Equal-precision observations |
| Weighted LS | x̂ = (AᵀWA)⁻¹AᵀWb | Different observation precisions |
| Constrained LS | min ‖v‖² s.t. Cx=d | Fixed constraints on unknowns |
| Robust IRLS | Iterative Huber reweighting | Data with outliers |
General Ax = b — you supply the design matrix A, observation vector b, and optionally the weight matrix W and constraint matrix C. Works for any linear adjustment problem: levelling networks, traverse, polynomial fitting, coordinate transformation, sensor fusion, etc.
- Estimated unknowns x̂ with standard deviations σ(x̂)
- Reference variance σ₀² and σ₀
- Residuals v = Ax̂ − b with standardised values v/σ₀
- Colour-coded outlier detection: green |v/σ₀|<2, yellow 2–3, red >3
- Residual bar chart with hover tooltip
- VCV heatmap — visual variance-covariance matrix
Unweighted LS: x̂ = (AᵀA)⁻¹Aᵀb
Weighted LS: x̂ = (AᵀWA)⁻¹AᵀWb
Constrained LS: augmented system via Lagrange multipliers
σ₀²: vᵀWv / r r = n − u (degrees of freedom)
Σ_x̂: σ₀² · (AᵀWA)⁻¹
Robust IRLS — Huber ψ-function:
ψ(t) = t |t| ≤ k (Gaussian)
ψ(t) = k · sign(t) |t| > k (outlier)
wᵢ = k·σ̂ / |vᵢ| for downweighted obs
σ̂ = median(|vᵢ|) / 0.6745 (MAD robust estimate)
Default k = 1.345 → 95% efficiency under normality.
| Example | n | u | r | Notes |
|---|---|---|---|---|
| Levelling Network | 4 | 3 | 1 | Height differences |
| Polynomial Fit | 5 | 3 | 2 | Quadratic y = a + bx + cx² |
| 2D Position | 5 | 2 | 3 | Weighted observations |
| Outlier Demo | 7 | 2 | 5 | One large outlier — use Robust IRLS |
# Prerequisites: Rust ≥ 1.75
cargo build --release
cargo run --release
# or double-click run.bat on WindowsTests:
cargo test
# 9 passed; 0 failed- Mikhail, E.M. & Ackermann, F. (1976). Observations and Least Squares. IEP.
- Koch, K.-R. (1999). Parameter Estimation and Hypothesis Testing in Linear Models. Springer.
- Huber, P.J. (1964). Robust estimation of a location parameter. Ann. Math. Stat. 35(1).
- Leick, A. (2004). GPS Satellite Surveying, 3rd ed. Wiley.
Dr. Mosab Hawarey
PhD, Geodetic & Photogrammetric Engineering (ITU) | MSc, Geomatics (Purdue) | MBA (Wales) | BSc, MSc (METU)
- GitHub: https://github.com/mhawarey
- Personal: https://hawarey.org/mosab
- ORCID: https://orcid.org/0000-0001-7846-951X
MIT License




