Plain Grid Positioning Simulator

Teaching tool: place 2–8 base stations and a transmitter on a Cartesian grid, then compare absolute range circles, TDOA hyperbolas, AOA bearing rays, and fused position estimates.

← Europe GDOP explorer

Scene

Choose a preset to load a reproducible teaching case. Loading is undoable.

Placement buttons select a persistent mode. In BTS mode, every empty click adds another station. Switch to target mode to place or move the transmitter. Use Navigate map to pan/zoom without placing points.

Noise sliders scale with the grid width.

Target coordinates and scenario

Undo/redo records scene edits. Locked BTS cannot be dragged but remain active in the solver.

Geometry quality
Calculating…
Solver cost surface
Low → high MSE

Europe OSM 2D view

The same Cartesian simulation is projected onto OpenStreetMap using a spherical azimuthal-equidistant map centered on the selected origin. X is east, Y is north, and all solver calculations remain in meters rather than map pixels.

Loading OpenStreetMap…
Calculating simulation area…
Map geometry
BTS / range circles
True transmitter
TDOA / estimate T
AOA / estimate A
Hybrid estimate H
Geometry quality: low → high
Selected solver MSE contours
Dashed ellipses show confidence.

Positioning result

MethodX mY mError mMSE m²RMSE mConf. major mConf. minor mAngle °

Absolute ranges (circles)

BTSTrue mMeasured mError m

TDOA measurements (hyperbolas)

PairΔrange mΔtime µs

AOA measurements (bearing rays)

BTSTrue °Measured °Error °

Base stations

IDX mY mLockedCopyDelete

Meaning

BTS and measured range circles True transmitter TDOA hyperbolas AOA bearing rays TDOA estimate (T circle) AOA estimate (A triangle) Hybrid estimate (H diamond) Method-colored confidence ellipses Nominal geometry error: blue/green lower, red higher Selected-estimator MSE contours: dark low, red high

Visible TDOA pair colors

Blue circles use the measured absolute range shown below. With circle noise set to 0 m, every circle passes exactly through the red transmitter. TDOA uses the pair-colored hyperbolas listed above.

Teaching guide

1. From arrival time to distance

A radio signal travels approximately at the speed of light, c = 299,792,458 m/s. If transmitter and BTS clocks were perfectly synchronized, one arrival time would imply an absolute range:

rᵢ = c · (tᵢ − t₀)

The unknown transmit time t₀ makes absolute ranging difficult. TDOA removes it by subtracting two arrival times.

For the blue-circle exercise, this simulator assumes each BTS does know an absolute measured range:

r̂ᵢ = ‖p−sᵢ‖ + εᵢ

When circle range noise is zero, εᵢ = 0, so the transmitter lies exactly on every circle. With noise, the circles generally no longer meet at one point.

2. TDOA creates a hyperbola

Choose one BTS as reference r. For every other BTS i, measure:

Δtᵢᵣ = tᵢ − tᵣ
Δrᵢᵣ = c · Δtᵢᵣ = ‖p−sᵢ‖ − ‖p−sᵣ‖

All points p = (x,y) with the same distance difference form a hyperbola. The two BTS are its foci. Each colored curve on the grid is one such constraint.

A range circle says “this exact distance from one BTS.” A TDOA hyperbola says “this exact distance difference between two BTS.”
3. How many BTS are needed?

With N BTS and one reference, there are N−1 TDOA equations.

  • 2 BTS: one hyperbola, so the transmitter is not uniquely located in 2D.
  • 3 BTS: two hyperbolas, the mathematical minimum for a 2D solution.
  • 4+ BTS: an overdetermined system that is normally more robust to noise and poor geometry.

Nearly collinear BTS or a transmitter far outside the BTS perimeter can still produce a weak or ambiguous geometry.

Displaying every BTS pair produces N(N−1)/2 hyperbolas. These pair equations are useful visually but are algebraically redundant; the TDOA solver uses the independent reference-BTS set.

4. Positioning algorithm used here

For a candidate point p, the simulator computes one residual per non-reference BTS:

eᵢ(p) = (‖p−sᵢ‖ − ‖p−sᵣ‖) − Δrᵢᵣ
J(p) = (1/(N−1)) · Σ eᵢ(p)²
  1. Search a coarse grid across the visible paper.
  2. Select the point with the lowest mean squared residual J.
  3. Refine locally with progressively smaller 8-direction steps.
  4. Report the residual RMS, √J, and compare the estimate with the known teaching target.

This transparent search is useful for teaching. Production systems often use Gauss–Newton, Levenberg–Marquardt, closed-form initialization, robust weighting, and clock/calibration models.

The result table reports MSE = J(p̂) and RMSE = √MSE separately for TDOA, AOA, and hybrid solutions.

5. Noise and practical interpretation
σrange = c · σtime

At light speed, 1 ns ≈ 0.30 m, 10 ns ≈ 3.0 m, and 100 ns ≈ 30 m of equivalent range-difference noise before geometry amplification.

Real systems also face multipath, NLOS bias, BTS timing offsets, antenna delays, bandwidth limits, sampling error, and uncertain BTS coordinates. These errors are not all zero-mean Gaussian noise.

Teaching experiment: keep the target fixed, increase timing noise, change the reference BTS, and move one BTS toward a straight line. Watch the hyperbola intersections and position error change.
6. Angle of Arrival (AOA)

AOA estimates the direction from each BTS toward the transmitter. This page uses Cartesian angles: 0° is +X and 90° is +Y.

θᵢ = atan2(y−yᵢ, x−xᵢ)

A measured bearing defines a ray from BTS i. For direction dᵢ = (cos θᵢ, sin θᵢ), a perpendicular unit normal is nᵢ = (−sin θᵢ, cos θᵢ).

e²AOA,ᵢ(p) = cross-track², if dᵢ·(p−sᵢ) ≥ 0; otherwise ‖p−sᵢ‖²

The AOA solver minimizes squared distance to each directional bearing ray. A candidate behind a BTS is measured to the ray origin rather than its backward line extension. Two non-parallel bearings are the 2D minimum; three or more improve robustness.

Hybrid mode minimizes both TDOA range-difference residuals and AOA perpendicular-distance residuals in meters. It demonstrates sensor fusion, but production systems should use calibrated uncertainty weighting.
7. Confidence ellipses from covariance

Each method gets a local 2×2 covariance approximation around its estimate. TDOA uses the range-difference Jacobian and the configured timing noise. AOA converts angular noise to cross-track uncertainty using BTS-to-estimate distance. Hybrid adds the two information matrices.

Cov(p̂) ≈ (JᵀR⁻¹J)⁻¹
a = √(χ²₂(level) · λmax), b = √(χ²₂(level) · λmin)
orientation = ½ atan2(2Covxy, Covxx−Covyy)

The major axis a shows the weak-error direction; the minor axis b shows the stronger direction. A long narrow ellipse reveals geometry weakness that an average confidence circle hides.

A zero-noise measurement constrains only the directions its geometry observes. If that exact geometry is rank-deficient, noisy measurements still determine uncertainty in the remaining direction.
8. Geometry quality heatmap

The background evaluates the local covariance at many candidate points without using the known transmitter position or the current random noise realization. TDOA uses a nominal 1 m range-difference standard deviation; AOA uses a nominal 1° bearing standard deviation; hybrid combines both information matrices.

q(p) = √((Covxx(p)+Covyy(p))/2)

The value q(p) is the average one-axis standard deviation predicted by the local geometry model. Blue and green mean lower geometry amplification; yellow and red mean higher expected error. Transparent cells are singular or insufficient.

Move BTS around the target and watch the background. Geometry is usually strongest inside a well-surrounded station layout and weaker outside it or near a collinear arrangement.
9. Solver MSE cost surface

The optional contour layer evaluates the selected estimator's objective J(p) throughout the visible grid. Each contour joins candidate positions with equal mean squared residual.

cost contour Lₖ = { p : J(p) = cₖ }

Levels are logarithmically spaced from low to high MSE so the shape near a minimum remains visible while also showing the wider landscape. A tight isolated basin indicates a well-defined solution. A long valley indicates weak geometry. Two separate basins can reveal global ambiguity even when the local covariance at either basin is finite.

Compare the TDOA mirror-ambiguity preset with the hybrid-rescue preset. TDOA can show symmetric basins; adding AOA information changes the objective and can select one region.
10. Putting the 2D simulation on an OSM map

The OSM panel does not change the solver. It uses a spherical azimuthal-equidistant projection centered on the selected map origin (φ₀, λ₀). For local point (x,y):

ρ = √(x²+y²), c = ρ/R, bearing = atan2(x,y)
(φ,λ) = destination(φ₀,λ₀,bearing,c)

Here R = 6,371,008.8 m, X points east, and Y points north. This projection preserves distance and direction from the map origin. Its inverse converts a map click back into local X/Y before measurement generation and position estimation.

The map remains a spherical visualization of a flat 2D teaching model. Even at widths up to 10,000 km, distance and direction from the origin are represented by the projection, but distances between arbitrary off-origin points are not a curved-Earth measurement solution.