Skip to main content

Radio Direction Finding and TDOA

What is radio direction finding?​

Radio direction finding (RDF, or DF) measures the direction a radio signal comes from, using a turning antenna or an antenna array. One receiver gives a bearing, a line pointing towards the transmitter. Bearings from two or more separate receivers cross at the transmitter's position, called a fix. TDOA (time difference of arrival) finds a fix from arrival times instead.

A simulated direction finding network in a dark navy theme. On the left, a compass-rose DF display for receiver B shows a bright cyan strobe at the current bearing, a shaded wedge for the spread of recent bearings and a trail of fading dots for past bearings. On the right, a map with a km grid shows three receivers, A, B and C, as triangles, their three bearing lines crossing near the middle, a white error ellipse around the fix, a cloud of past fixes and a red cross for the true simulated transmitter inside the ellipse

A simulated DF network: the DF display for one receiver, and three bearings crossing at a fix with its 95% error ellipse. Try the interactive version.

Key takeaways
  • A direction finder measures a bearing; two or more bearings from separate sites cross at a fix. This is triangulation, or AOA (angle of arrival) location.
  • On a DF display, the strobe is the latest bearing, and the spread of recent bearings shows how far to trust it.
  • Bearing errors grow with distance and are magnified when lines cross at a shallow angle. The error ellipse shows the area the transmitter is probably in.
  • TDOA uses arrival-time differences: about 300 m per microsecond. Each difference puts the transmitter on a hyperbola, and two hyperbolas from three receivers cross at a fix.
  • Multipath, poor site geometry and, for TDOA, clock errors are the main causes of a wrong fix.

What direction finding is used for​

Direction finding is older than radar. Early direction finders helped ships and aircraft navigate by taking bearings on radio stations at known positions. Today it is mostly used the other way round: to find a transmitter whose position is unknown.

  • Search and rescue. Distress beacons on 406 MHz are found by the Cospas-Sarsat satellite system: ELTs (emergency locator transmitters) on aircraft, EPIRBs (emergency position-indicating radio beacons) on ships and PLBs (personal locator beacons) carried by walkers and sailors. The newest satellites in medium Earth orbit (MEOSAR) locate a beacon from the differences in the time and frequency of its signal at several satellites, from as little as a single burst. Many beacons also send a low-power 121.5 MHz signal that rescue aircraft and boats home in on with a direction finder.
  • Spectrum management. National regulators run networks of fixed and mobile monitoring stations to find sources of interference and unlicensed transmitters. The International Telecommunication Union (ITU) handbook on spectrum monitoring describes how they do it, with both bearings and TDOA.
  • Amateur radio direction finding (ARDF, or "fox hunting"). Competitors run through a forest with a handheld receiver and directional antenna to find hidden transmitters. International competitions use the 3.5 MHz (80 m) and 144 MHz (2 m) amateur bands.
  • Wildlife tracking. Biologists fit animals with small VHF transmitters and take bearings with a handheld directional antenna from two or three spots, then cross them on a map.
  • Signals intelligence. Locating an emitter is one of the core tasks of SIGINT, alongside finding signals and analysing them. See what SIGINT is and how to read a SIGINT dashboard. Intercepting and locating other people's communications is regulated by law and done by authorised agencies.

How a direction finder measures a bearing​

Every DF method compares what the signal does at antennas in different places or orientations. The main families are below; the ITU handbook gives a fuller comparison.

MethodWhat it measuresStrengthsWeaknesses
Rotating loop or directional antennaSignal strength as the antenna turns; the bearing is at the sharp null (loop) or the peak (directional antenna)Simple; works with any signal that lasts long enoughSlow; a loop's figure-of-eight pattern has two nulls 180° apart
Adcock array with Watson-Watt processingAmplitudes on two crossed antenna pairs, plus an all-round sense antennaNear-instant bearing from a burst of about a millisecond; classic HF direction finderSmall aperture, so reflections near the site distort it
Doppler and pseudo-DopplerThe frequency shift from an antenna moving in a circle, simulated by switching round a ring of antennasGood sensitivity; less disturbed by multipath than Watson-WattNeeds the signal for a full switching cycle
Phase interferometerThe phase difference between antennas a known distance apartAccurate and fastAmbiguous when antennas are more than half a wavelength apart, unless several spacings are combined
Correlative interferometerPhases and amplitudes on all antennas, matched against a calibration table measured for every directionWide aperture handles distorted wavefronts; can correct site errorsNeeds a calibrated array and several receiver channels

Loop antennas and the null​

A small loop antenna receives nothing from a signal that arrives square-on to the face of the loop, along its axis, and most from one arriving edge-on. Turning the loop until the signal disappears gives a sharp null, with the loop's axis pointing along the bearing. The null is far sharper than the broad maximum, which is why the early direction finders listened for silence. A loop has two nulls 180° apart, so it can't tell whether the transmitter is in front or behind. Adding a small all-round "sense" antenna turns the figure of eight into a heart shape (a cardioid) with a single null, which settles it.

Adcock and Watson-Watt​

An Adcock array replaces the loop with pairs of vertical antennas, which ignore most of the horizontally polarised energy that bounces off the ionosphere at night and once caused large bearing errors at HF. Two pairs at right angles give one signal proportional to the sine of the bearing and one to the cosine. In 1926 Robert Watson-Watt and J. F. Herd published a direction finder that fed those two signals to the plates of a cathode ray tube. The spot drew a line at the bearing angle at once, with no turning antenna. Modern Watson-Watt direction finders compute the same angle, arctan(sine / cosine), digitally.

Doppler direction finding​

If one antenna moves round a circle, a signal arriving from one side is shifted up in frequency as the antenna moves towards the transmitter and down as it moves away. The receiver hears this as a tone at the rotation rate, and the tone's phase gives the bearing. Real Doppler direction finders don't spin an antenna; they switch quickly round a ring of fixed antennas spaced less than half a wavelength apart (pseudo-Doppler).

Interferometry and correlative DF​

A wave arriving at angle θ from the line between two antennas a distance d apart reaches one antenna slightly before the other. The phase difference is Δφ = 2π d cos θ / λ, where λ is the wavelength. Measuring Δφ gives the angle. If d is more than half a wavelength, several angles give the same phase, so practical arrays combine short and long spacings. A correlative interferometer goes one step further: it records the phases and amplitudes the array actually produces for every direction during calibration, then picks the direction whose stored pattern best matches each measurement. The ITU handbook quotes an accuracy of 1° to 2° rms for Watson-Watt systems and 1° rms or better for correlative interferometers, before the effects of the site.

The antenna's own pattern matters to all of these; see antenna radiation patterns for nulls, lobes and beamwidth.

How to read a DF display​

A diagram of a DF display: a dark compass rose with six numbered parts. 1, the bearing scale with 000 degrees at the top, read clockwise. 2, an orange strobe from the centre at 063 degrees, the latest bearing. 3, a shaded wedge either side of the strobe showing two standard deviations of the recent bearings. 4, orange dots for recent bearings, the newest at the rim and older ones further in and fainter. 5, a single yellow dot at 140 degrees, a stray bearing from a reflection or another signal. 6, a readout reading 063.4 degrees, spread plus or minus 2.9 degrees, quality 87 percent and minus 92 dBm

Most direction finders show their result on a compass rose like this, for one receiver at a time.

  1. Bearing scale. 000° is north at the top, and bearings run clockwise: 090° east, 180° south, 270° west. A bearing is always from the receiver towards the signal. Some displays can be switched to show bearings relative to a vehicle's heading instead; check which before you report one.
  2. Strobe. The line from the centre is the latest bearing. On older equipment it was literally the trace on the cathode ray tube.
  3. Spread. How widely the recent bearings scatter. A narrow spread means a steady bearing; a wide one means a weak signal, interference or reflections.
  4. History. Past bearings, so you can see whether the bearing is steady, drifting (the transmitter or the receiver is moving) or jumping between two directions.
  5. Stray bearings. A bearing far from the rest is usually a reflection, or another signal on the same frequency. Many direction finders give each bearing a quality value so that these "wild" bearings can be left out of the fix.
  6. Readout. The bearing in figures, a quality or confidence value, and the signal level. Quality scales differ between makers; treat it as a ranking, not a probability.

Triangulation: how bearings give a fix​

One bearing only says which line the transmitter is on. A second receiver in a different place gives a second line, and the transmitter is where they cross. This is triangulation, also called AOA location.

Two panels with the same three receivers A, B and C. Left, triangulation: three bearing lines, each a few degrees off, form a small shaded triangle (the cocked hat) near the transmitter, with a dashed 95% error ellipse around the fix. Right, TDOA: three curved hyperbolas labelled B minus A, C minus A and C minus B cross at a single point at the transmitter

Why three bearings are better than two​

Two bearings always cross somewhere (unless they're parallel), so a fix from two stations gives no sign of whether either bearing is wrong. With three bearings the lines rarely meet at a point. The small triangle they leave is called the cocked hat, a term from marine navigation. A large cocked hat warns that at least one bearing is off.

The transmitter is not necessarily inside the cocked hat. Navigators have long been taught that if each line is equally likely to pass either side of the true position, the chance that the true position is inside the triangle is only 1 in 4. Formal statements and proofs of this result, with the conditions it needs, were published in 2021. So modern systems don't use the triangle. They compute the point that best fits all the bearings, weighting each by how precise it is, and draw an error ellipse around it: the area that contains the transmitter with a stated probability, often 50%, 90% or 95%. The method goes back to R. G. Stansfield's 1947 paper on the statistics of DF fixing, and it is what the ITU handbook describes for monitoring networks.

How distance and geometry set the accuracy​

A bearing error is an angle, so the distance it moves the line grows with range: the sideways error is the range times the tangent of the bearing error. With a 2° error, a bearing line misses a transmitter 50 km away by 50 × tan 2° ≈ 1.75 km.

The angle at which the lines cross matters as much. If one line moves sideways by a distance e, the crossing point slides along the other line by e / sin γ, where γ is the angle between them. At 90° that is just e. At 30° it doubles (1 / sin 30° = 2), and at 10° it is almost six times as large, so the error ellipse becomes long and thin, pointing along the lines. Bearings from stations almost in line with the transmitter are nearly useless for range. That is why DF networks place their stations around the area they cover, not along one side of it.

This effect of geometry is called dilution of precision. For position fixing it is usually quoted as GDOP (geometric dilution of precision): the factor by which the geometry multiplies the measurement error into a position error. A GDOP close to 1 is good geometry. Both AOA and TDOA are most precise when the transmitter is inside the area surrounded by the receivers.

What is TDOA?​

TDOA (time difference of arrival) locates a transmitter from when its signal arrives, not from which direction. Radio waves travel at the speed of light, 299,792,458 m/s, which is about 300 m per microsecond (µs) or 30 cm per nanosecond. If the same signal reaches receiver A before receiver B, the transmitter is closer to A, by 300 m for each microsecond of difference.

Why one time difference gives a hyperbola​

All the points that are a fixed distance closer to A than to B lie on one curve: a branch of a hyperbola with A and B at its foci. One time difference doesn't place the transmitter at a point; it puts it somewhere on that curve. A second pair of receivers, for example A and C, gives a second hyperbola, and the transmitter is where they cross. So TDOA needs at least three receivers for a position on a map, and four for a position in three dimensions, such as an aircraft's height. The process of finding a position from range differences is called multilateration.

A worked example​

Receivers A and B are 30 km apart. A signal reaches A 20.0 µs before it reaches B.

  • The range difference is 20.0 µs × 0.2998 km/µs = 6.00 km. The transmitter is 6.00 km closer to A than to B.
  • Every point where the distance to B minus the distance to A equals 6 km is on one hyperbola, which curves round A. Its vertex, where it crosses the line from A to B, is 12 km from A and 18 km from B (12 + 18 = 30 and 18 − 12 = 6).
  • A timing error of 1 µs moves the hyperbola by about 300 m in range difference. A timing error of 20 ns moves it by 6 m.
  • A third receiver, C, gives a second time difference, C − A, and a second hyperbola. Where they cross is the fix.

With three receivers there are only two independent time differences. A third hyperbola from B and C passes through the same crossing whatever the errors (if arrival times are measured at each site), so it adds no check. A fourth receiver gives a redundant measurement that can expose a bad one.

How the time difference is measured​

The receivers usually don't know when the signal was sent, and most signals have no clear start. So each pair of receivers records the same stretch of signal, and a computer slides one recording past the other to find the delay at which they match best. That delay is the peak of the cross-correlation of the two recordings; see autocorrelation and cross-correlation for how the peak is found and why it's sharp. A signal with more bandwidth gives a narrower peak and a more precise delay. An unmodulated carrier has almost no bandwidth, so it gives a broad peak and can be impossible to locate this way, while AOA handles it easily.

Every receiver must be time-stamped on a common clock, and a clock error turns straight into a range error. The ITU notes that the need for nanosecond-level synchronisation held TDOA back for civil use until satellite navigation (GPS, Galileo and GLONASS) made accurate timing cheap; synchronisation better than 20 ns is achievable.

FDOA​

If the transmitter or the receivers are moving, each receiver also sees a slightly different Doppler shift. FDOA (frequency difference of arrival) uses those frequency differences as a second set of measurements. It is often combined with TDOA on aircraft and satellites, as in the MEOSAR rescue satellites above.

AOA vs TDOA​

The ITU compares the two methods in a report (SM.2211) and concludes that they complement each other: a system using both can do better than either alone.

AOA (bearings, triangulation)TDOA (time differences, multilateration)
What each site measuresThe direction of arrivalThe time of arrival, compared between sites
One measurement givesA straight line of bearing from one siteA hyperbola, from a pair of sites
Sites needed for a 2D fix2 (3 to check the bearings agree)3 (4 to check the measurements agree)
AntennaA direction-finding array, calibratedA simple omnidirectional antenna
Clock synchronisationLoose: seconds will often doTight: a small fraction of 1 / bandwidth, tens of nanoseconds
Narrowband and unmodulated signalsWorks wellHard or impossible
Wideband and very short signalsWorks, with fast enough equipmentWorks well, including weak signals
Accuracy and distanceError grows with distance from each siteSet by geometry (GDOP) and timing, not directly by the distance between receivers
Single siteOne site can home in on a transmitter by movingNeeds at least two sites and a data link
Data sent to the central processorBearings and quality values (small)Recorded signal samples (large)

Common mistakes in direction finding​

  • Trusting a bearing near a reflector. Buildings, hills, vehicles and the receiver's own mast reflect signals. A direction finder near them can report the direction of the reflection, not the transmitter, and the error doesn't shrink with averaging. Choose open sites and look for bearings that jump between two directions.
  • Poor baseline geometry. Stations that are close together, or nearly in line with the transmitter, give lines or hyperbolas that cross at shallow angles and a long, thin error ellipse. Spread the sites around the area of interest.
  • Locating from outside the network. Outside the area surrounded by the receivers, TDOA hyperbolas become nearly parallel and act like a single line of bearing, so the error ellipse stretches along the direction to the transmitter.
  • Unsynchronised TDOA clocks. One microsecond of clock offset at one receiver is a 300 m range error, which the geometry can multiply further. Check GNSS timing at every site.
  • Mixing two signals. Two transmitters on the same frequency give bearings that belong to different places. A fix from them is meaningless.
  • Trusting the error ellipse to cover a bias. The ellipse is computed from the random scatter of the measurements. A reflection or a clock offset shifts the fix consistently, so the ellipse can be small and still miss the transmitter. In the demo, tick the multipath box and watch the ellipse move away from the red cross.
  • Reading a two-line fix as certain. Two bearings always cross somewhere. Without a third line or an error ellipse, there is no way to tell how good the fix is.
  • Mixing up true and relative bearings. A bearing taken relative to a vehicle's heading must be converted to a true bearing (from north) before it is drawn on a map.

How to build a direction finding display in JavaScript, React or Angular​

A DF system has to show bearings from several sites as they arrive, several times a second, alongside the map they're plotted on. SciChart.js draws both the polar DF display and the map as GPU-accelerated charts that stay smooth while every line updates on every measurement. The demo below is a synthetic network of three receivers, A, B and C, a few tens of kilometres apart, listening to one simulated transmitter. Each receiver reports a noisy bearing and arrival time five times a second. The fix is a weighted least-squares fit, the ellipse contains the true position 95% of the time, and the hyperbolas are drawn from the measured time differences.

Drag the red cross (the transmitter) or a receiver on the map and watch the ellipse change: it is about 1.5 km long in TDOA mode with the transmitter inside the triangle, and about 30 km long when the transmitter is 40 km outside it. Switch Method between AOA, TDOA and both. Move Bearing noise or Timing noise, choose the receiver for the DF display (or click a receiver), and tick Multipath at B to block the direct path to B so it hears only an echo off a reflector. Hover over the map to read the bearings and range differences at any point. Scroll to zoom and double-click to reset.

Here is the code for this chart. The measurements, the fix and the error ellipse are plain JavaScript. SciChart.js draws the DF display and the map.

// Radio direction finding and TDOA: a polar DF display and a map of the fix, charted with SciChart.js
const {
SciChartSurface,
SciChartPolarSurface,
NumericAxis,
PolarNumericAxis,
EPolarAxisMode,
EPolarGridlineMode,
EPolarLabelMode,
EAutoRange,
NumberRange,
XyDataSeries,
XyxDataSeries,
FastLineRenderableSeries,
XyScatterRenderableSeries,
PolarLineRenderableSeries,
PolarXyScatterRenderableSeries,
PolarColumnRenderableSeries,
EColumnMode,
EllipsePointMarker,
TrianglePointMarker,
SquarePointMarker,
CrossPointMarker,
TextAnnotation,
EHorizontalAnchorPoint,
EVerticalAnchorPoint,
MouseWheelZoomModifier,
CustomChartModifier2D,
EModifierType,
translateFromCanvasToSeriesViewRect,
SciChartJsNavyTheme
} = SciChart;
// or, for npm, import { SciChartSurface, ... } from "scichart"

// --- The scenario: positions in km east (x) and north (y) of a reference point ---
const DEFAULT_RECEIVERS = [{ x: 20, y: 15 }, { x: 80, y: 20 }, { x: 45, y: 65 }];
const receivers = DEFAULT_RECEIVERS.map((r) => ({ ...r }));
const transmitter = { x: 58, y: 40 };
const reflector = { x: 75, y: 45 }; // a hill: with multipath on, B hears only the echo off it
const NAMES = ["A", "B", "C"];
const PAIRS = [[0, 1], [0, 2], [1, 2]]; // hyperbolas for B−A, C−A and C−B
const rng = makeRandom(20261127);

// One set of measurements: a bearing and a time of arrival at each receiver, with noise.
// Arrival times are kept as ranges (time × c) in km, so time differences become range differences.
function measure(sigmaDeg, sigmaUs, multipath) {
const bearings = [];
const ranges = [];
receivers.forEach((r, i) => {
const blocked = multipath && i === 1;
const source = blocked ? reflector : transmitter;
bearings.push((bearingTo(r, source) + sigmaDeg * gaussian(rng) + 360) % 360);
const path = blocked ? distance(transmitter, reflector) + distance(reflector, r) : distance(transmitter, r);
ranges.push(path + C_KM_PER_US * sigmaUs * gaussian(rng));
});
return { bearings, rangeDiffs: PAIRS.map(([i, j]) => ranges[j] - ranges[i]) };
}

// The fix: weighted least squares by Gauss-Newton iteration. Bearings have standard deviation sigmaDeg.
// Range differences B−A and C−A share A's timing noise, so their covariance is (c·σt)² [[2, 1], [1, 2]].
// Returns the position and its covariance P (the inverse of the information matrix JᵀWJ at the fix).
function solveFix(meas, useAoa, useTdoa, sigmaDeg, sigmaUs, start) {
let p = { ...start };
let P = null;
const varBearing = (sigmaDeg * DEG) ** 2;
const varRange = (C_KM_PER_US * sigmaUs) ** 2;
const W = [[2 / 3 / varRange, -1 / 3 / varRange], [-1 / 3 / varRange, 2 / 3 / varRange]]; // inverse of the covariance above
for (let iteration = 0; iteration < 30; iteration++) {
let n11 = 0, n12 = 0, n22 = 0, g1 = 0, g2 = 0;
if (useAoa) {
receivers.forEach((r, i) => {
const dx = p.x - r.x;
const dy = p.y - r.y;
const q = dx * dx + dy * dy;
const jx = dy / q; // ∂bearing/∂x for bearing = atan2(dx, dy)
const jy = -dx / q; // ∂bearing/∂y
const residual = wrapPi(meas.bearings[i] * DEG - Math.atan2(dx, dy));
n11 += (jx * jx) / varBearing;
n12 += (jx * jy) / varBearing;
n22 += (jy * jy) / varBearing;
g1 += (jx * residual) / varBearing;
g2 += (jy * residual) / varBearing;
});
}
if (useTdoa) {
const u = receivers.map((r) => {
const d = distance(p, r);
return { x: (p.x - r.x) / d, y: (p.y - r.y) / d, d };
});
const J = [[u[1].x - u[0].x, u[1].y - u[0].y], [u[2].x - u[0].x, u[2].y - u[0].y]];
const residual = [meas.rangeDiffs[0] - (u[1].d - u[0].d), meas.rangeDiffs[1] - (u[2].d - u[0].d)];
for (let a = 0; a < 2; a++) {
for (let b = 0; b < 2; b++) {
n11 += J[a][0] * W[a][b] * J[b][0];
n12 += J[a][0] * W[a][b] * J[b][1];
n22 += J[a][1] * W[a][b] * J[b][1];
g1 += J[a][0] * W[a][b] * residual[b];
g2 += J[a][1] * W[a][b] * residual[b];
}
}
}
const det = n11 * n22 - n12 * n12;
if (!(det > 0)) return null; // e.g. all bearings parallel: no crossing
P = { xx: n22 / det, xy: -n12 / det, yy: n11 / det };
let sx = P.xx * g1 + P.xy * g2;
let sy = P.xy * g1 + P.yy * g2;
const step = Math.hypot(sx, sy);
if (step > 30) {
sx *= 30 / step; // limit each step, so a poor start can't throw the fix far away
sy *= 30 / step;
}
p = { x: p.x + sx, y: p.y + sy };
if (step < 1e-6) break;
}
return Number.isFinite(p.x) && Number.isFinite(p.y) ? { p, P } : null;
}

// A starting point for the bearings-only fix: the point closest to all bearing lines (unweighted, closed form)
function crossingPoint(bearings) {
let a11 = 0, a12 = 0, a22 = 0, b1 = 0, b2 = 0;
receivers.forEach((r, i) => {
const nx = Math.cos(bearings[i] * DEG); // normal to the bearing line (sin, cos)
const ny = -Math.sin(bearings[i] * DEG);
const c = nx * r.x + ny * r.y;
a11 += nx * nx;
a12 += nx * ny;
a22 += ny * ny;
b1 += nx * c;
b2 += ny * c;
});
const det = a11 * a22 - a12 * a12;
return det > 1e-9 ? { x: (a22 * b1 - a12 * b2) / det, y: (a11 * b2 - a12 * b1) / det } : null;
}

// The 95% error ellipse from the fix covariance: eigenvalues give the axes, the eigenvector the orientation
function errorEllipse(fix) {
const { xx, xy, yy } = fix.P;
const half = Math.sqrt(((xx - yy) / 2) ** 2 + xy * xy);
const major = ELLIPSE_95 * Math.sqrt((xx + yy) / 2 + half);
const minor = ELLIPSE_95 * Math.sqrt(Math.max((xx + yy) / 2 - half, 0));
const angle = 0.5 * Math.atan2(2 * xy, xx - yy);
const xs = [];
const ys = [];
for (let k = 0; k <= 72; k++) {
const t = (k / 72) * 2 * Math.PI;
const ex = major * Math.cos(t);
const ey = minor * Math.sin(t);
xs.push(fix.p.x + ex * Math.cos(angle) - ey * Math.sin(angle));
ys.push(fix.p.y + ex * Math.sin(angle) + ey * Math.cos(angle));
}
return { major, minor, xs, ys };
}

// The points where |p − f2| − |p − f1| equals rangeDiff: one branch of a hyperbola with foci at the receivers
function hyperbola(f1, f2, rangeDiff, reach) {
const c = distance(f1, f2) / 2;
if (Math.abs(rangeDiff) >= 2 * c) return { xs: [], ys: [] }; // impossible: longer than the baseline
const a = rangeDiff / 2;
const b = Math.sqrt(c * c - a * a);
const ux = (f2.x - f1.x) / (2 * c);
const uy = (f2.y - f1.y) / (2 * c);
const mx = (f1.x + f2.x) / 2;
const my = (f1.y + f2.y) / 2;
const tMax = Math.asinh(reach / b);
const xs = [];
const ys = [];
for (let k = 0; k <= 200; k++) {
const t = -tMax + (2 * tMax * k) / 200;
const along = -a * Math.cosh(t); // along the baseline, from its midpoint towards f2
const across = b * Math.sinh(t);
xs.push(mx + along * ux - across * uy);
ys.push(my + along * uy + across * ux);
}
return { xs, ys };
}

const theme = new SciChartJsNavyTheme();

// --- Chart 1: the DF display, a compass rose for one receiver ---
const df = await SciChartPolarSurface.create(ui.dfDiv, {
theme,
title: "DF display",
titleStyle: { fontSize: 15, color: "#dfe7f5" }
});
df.sciChartSurface.background = "#0B1A2E";
const bearingAxis = new PolarNumericAxis(df.wasmContext, {
polarAxisMode: EPolarAxisMode.Angular,
visibleRange: new NumberRange(0, 360),
autoRange: EAutoRange.Never,
startAngle: Math.PI / 2, // 000° at the top
flippedCoordinates: true, // bearings increase clockwise, like a compass
autoTicks: false,
majorDelta: 30,
polarLabelMode: EPolarLabelMode.Horizontal,
drawMinorGridLines: false,
drawMajorBands: false,
majorGridLineStyle: { strokeThickness: 1, color: "#FFFFFF22" }
});
bearingAxis.labelProvider.formatLabel = (value) => (value >= 360 ? "" : `${pad3(value)}°`);
const radiusAxis = new PolarNumericAxis(df.wasmContext, {
polarAxisMode: EPolarAxisMode.Radial,
visibleRange: new NumberRange(0, 1),
autoRange: EAutoRange.Never,
startAngle: Math.PI / 2,
gridlineMode: EPolarGridlineMode.Circles,
autoTicks: false,
majorDelta: 0.25,
drawLabels: false,
drawMinorGridLines: false,
drawMajorBands: false,
majorGridLineStyle: { strokeThickness: 1, color: "#FFFFFF22" }
});
df.sciChartSurface.xAxes.add(bearingAxis);
df.sciChartSurface.yAxes.add(radiusAxis);

// The spread: a wedge 2 standard deviations either side of the strobe. Three copies, a turn apart,
// so the wedge still draws when it crosses north (the chart only draws 0° to 360°)
const spreadData = new XyxDataSeries(df.wasmContext, { xValues: [-360, 0, 360], x1Values: [-360, 0, 360], yValues: [1, 1, 1] });
const spread = new PolarColumnRenderableSeries(df.wasmContext, {
dataSeries: spreadData,
columnXMode: EColumnMode.StartEnd,
strokeThickness: 0,
fill: "#FFFFFF30"
});
const trueLine = new PolarLineRenderableSeries(df.wasmContext, {
dataSeries: new XyDataSeries(df.wasmContext),
stroke: "#FF8A8A",
strokeThickness: 1.5,
strokeDashArray: [5, 5]
});
// The strobe: a coloured line with a white core, so it stands out from the history dots
const strobeData = new XyDataSeries(df.wasmContext);
const strobe = new PolarLineRenderableSeries(df.wasmContext, { dataSeries: strobeData, stroke: "#FFFFFF", strokeThickness: 6 });
const strobeCore = new PolarLineRenderableSeries(df.wasmContext, { dataSeries: strobeData, stroke: "#FFFFFF", strokeThickness: 2 });
// Recent bearings as dots, newest at the rim; older dots move inwards and fade (four age groups)
const historyLayers = [0.9, 0.6, 0.38, 0.2].map(
(opacity) =>
new PolarXyScatterRenderableSeries(df.wasmContext, {
dataSeries: new XyDataSeries(df.wasmContext),
opacity,
pointMarker: new EllipsePointMarker(df.wasmContext, { width: 6, height: 6, strokeThickness: 0, fill: "#FFFFFF" })
})
);
df.sciChartSurface.renderableSeries.add(spread, ...historyLayers, trueLine, strobe, strobeCore);

// --- Chart 2: the map, a plain km grid ---
const map = await SciChartSurface.create(ui.mapDiv, {
theme,
title: "Map (km)",
titleStyle: { fontSize: 15, color: "#dfe7f5" }
});
const wasm = map.wasmContext;
const axisOptions = { autoRange: EAutoRange.Never, labelPrecision: 0, axisTitleStyle: { fontSize: 14 }, labelStyle: { fontSize: 12 } };
const xAxis = new NumericAxis(wasm, { ...axisOptions, axisTitle: "East (km)", visibleRange: new NumberRange(MAP_VIEW.xMin, MAP_VIEW.xMax) });
const yAxis = new NumericAxis(wasm, { ...axisOptions, axisTitle: "North (km)", visibleRange: new NumberRange(0, 80) });
map.sciChartSurface.xAxes.add(xAxis);
map.sciChartSurface.yAxes.add(yAxis);

const line = (stroke, thickness, extra = {}) =>
new FastLineRenderableSeries(wasm, { dataSeries: new XyDataSeries(wasm, { containsNaN: true }), stroke, strokeThickness: thickness, ...extra });
const scatter = (pointMarker) => new XyScatterRenderableSeries(wasm, { dataSeries: new XyDataSeries(wasm), pointMarker });
const bearingLines = RECEIVER_COLOURS.map((colour) => line(colour, 2));
const sectorLines = line("#FFFFFF66", 1, { strokeDashArray: [4, 4] }); // ±2σ either side of the selected receiver's bearing
const hyperbolas = PAIR_COLOURS.map((colour) => line(colour, 2));
const echoPath = line("#C9A96E", 1.5, { strokeDashArray: [2, 4] }); // transmitter → reflector → B
const ellipseLine = line("#FFFFFF", 2);
const pastFixes = scatter(new EllipsePointMarker(wasm, { width: 4, height: 4, strokeThickness: 0, fill: "#FFFFFF66" }));
const fixMarker = scatter(new EllipsePointMarker(wasm, { width: 11, height: 11, strokeThickness: 2, stroke: "#FFFFFF", fill: "#FFFFFF55" }));
const receiverMarkers = RECEIVER_COLOURS.map((colour) =>
scatter(new TrianglePointMarker(wasm, { width: 16, height: 16, strokeThickness: 2, stroke: colour, fill: colour + "AA" }))
);
const transmitterMarker = scatter(new CrossPointMarker(wasm, { width: 16, height: 16, strokeThickness: 3, stroke: "#FF5C5C" }));
const reflectorMarker = scatter(new SquarePointMarker(wasm, { width: 12, height: 12, strokeThickness: 2, stroke: "#C9A96E", fill: "#C9A96E55" }));
map.sciChartSurface.renderableSeries.add(
...hyperbolas,
...bearingLines,
sectorLines,
echoPath,
pastFixes,
ellipseLine,
fixMarker,
reflectorMarker,
...receiverMarkers,
transmitterMarker
);
const label = (text, color, toLeft = false) =>
new TextAnnotation({
text,
textColor: color,
fontSize: 13,
xCoordShift: toLeft ? -10 : 10,
yCoordShift: toLeft ? 8 : -8,
horizontalAnchorPoint: toLeft ? EHorizontalAnchorPoint.Right : EHorizontalAnchorPoint.Left,
verticalAnchorPoint: toLeft ? EVerticalAnchorPoint.Top : EVerticalAnchorPoint.Bottom
});
const receiverLabels = NAMES.map((name, i) => label(name, RECEIVER_COLOURS[i]));
const transmitterLabel = label("Transmitter (true)", "#FF8A8A");
const fixLabel = label("Fix", "#FFFFFF", true);
const reflectorLabel = label("Reflector", "#C9A96E");
map.sciChartSurface.annotations.add(...receiverLabels, transmitterLabel, fixLabel, reflectorLabel);
map.sciChartSurface.chartModifiers.add(new MouseWheelZoomModifier());

const setXy = (series, xs, ys) => {
series.dataSeries.clear();
if (xs.length > 0) series.dataSeries.appendRange(xs, ys);
};
const place = (annotation, p) => {
annotation.x1 = p.x;
annotation.y1 = p.y;
};

// Keep 1 km the same length on both axes, so angles, circles and ellipses aren't distorted
function keepSquare() {
const rect = map.sciChartSurface.seriesViewRect;
if (!rect || rect.width < 10 || rect.height < 10) return;
const xr = xAxis.visibleRange;
const yr = yAxis.visibleRange;
const span = ((xr.max - xr.min) * rect.height) / rect.width;
if (Math.abs(yr.max - yr.min - span) > span * 1e-3) {
const centre = (yr.min + yr.max) / 2;
yAxis.visibleRange = new NumberRange(centre - span / 2, centre + span / 2);
}
}
function resetView() {
xAxis.visibleRange = new NumberRange(MAP_VIEW.xMin, MAP_VIEW.xMax);
yAxis.visibleRange = new NumberRange(MAP_VIEW.yCentre - 40, MAP_VIEW.yCentre + 40);
keepSquare();
}

// --- State and drawing ---
const bearingHistory = [[], [], []]; // newest first, per receiver
const fixHistory = [];
let latest = null;
let fix = null;
let lastFixPosition = null;

function settings() {
return {
mode: ui.modeSelect.value,
selected: Number(ui.receiverSelect.value),
sigmaDeg: Number(ui.bearingInput.value),
sigmaUs: Number(ui.timingInput.value),
multipath: ui.multipathInput.checked
};
}

// Take one new set of measurements and compute the fix
function step() {
const s = settings();
latest = measure(s.sigmaDeg, s.sigmaUs, s.multipath);
latest.bearings.forEach((b, i) => {
bearingHistory[i].unshift(b);
if (bearingHistory[i].length > HISTORY) bearingHistory[i].pop();
});
const useAoa = s.mode !== "tdoa";
const useTdoa = s.mode !== "aoa";
const centroid = { x: (receivers[0].x + receivers[1].x + receivers[2].x) / 3, y: (receivers[0].y + receivers[1].y + receivers[2].y) / 3 };
const start = (useAoa && crossingPoint(latest.bearings)) || lastFixPosition || centroid;
fix = solveFix(latest, useAoa, useTdoa, s.sigmaDeg, s.sigmaUs, start);
if (fix && distance(fix.p, centroid) > 1000) fix = null; // bearings nearly parallel: no useful crossing
if (fix) {
lastFixPosition = fix.p;
fixHistory.unshift(fix.p);
if (fixHistory.length > FIX_HISTORY) fixHistory.pop();
}
draw();
}

function drawDfDisplay(s) {
const i = s.selected;
const colour = RECEIVER_COLOURS[i];
const history = bearingHistory[i];
if (history.length === 0) return;
df.sciChartSurface.title = `DF display: receiver ${NAMES[i]}`;
const bearing = history[0];
strobe.stroke = colour;
setXy(strobe, [bearing, bearing], [0, 1]);
const trueBearing = bearingTo(receivers[i], transmitter);
setXy(trueLine, [trueBearing, trueBearing], [0, 1]);
// Spread of the recent bearings: the circular standard deviation, shown as ±2σ
let sumSin = 0;
let sumCos = 0;
const recent = history.slice(0, 12);
for (const b of recent) {
sumSin += Math.sin(b * DEG);
sumCos += Math.cos(b * DEG);
}
const meanBearing = ((Math.atan2(sumSin, sumCos) / DEG) + 360) % 360;
const resultant = Math.min(1, Math.hypot(sumSin, sumCos) / recent.length);
const spreadDeg = recent.length > 2 ? Math.sqrt(-2 * Math.log(Math.max(resultant, 1e-9))) / DEG : s.sigmaDeg;
spread.fill = colour + "38";
for (let k = 0; k < 3; k++) spreadData.updateXyz(k, meanBearing - 2 * spreadDeg + (k - 1) * 360, 1, meanBearing + 2 * spreadDeg + (k - 1) * 360);
// History dots: newest on the rim, each older one a little further in
historyLayers.forEach((layer, group) => {
const xs = [];
const ys = [];
for (let age = group * 6; age < Math.min(history.length, (group + 1) * 6); age++) {
xs.push(history[age]);
ys.push(0.96 - age * 0.028);
}
layer.pointMarker.fill = colour;
setXy(layer, xs, ys);
});
return { bearing, meanBearing, spreadDeg, trueBearing };
}

function draw() {
if (!latest) return;
const s = settings();
const showAoa = s.mode !== "tdoa";
const showTdoa = s.mode !== "aoa";
const reach = 400; // km: long enough to run off the map
// Bearing lines from each receiver, and the ±2σ sector of the selected one
bearingLines.forEach((series, i) => {
const b = latest.bearings[i] * DEG;
const r = receivers[i];
setXy(series, [r.x, r.x + reach * Math.sin(b)], [r.y, r.y + reach * Math.cos(b)]);
series.isVisible = showAoa;
});
const r = receivers[s.selected];
const b = latest.bearings[s.selected];
const lo = (b - 2 * s.sigmaDeg) * DEG;
const hi = (b + 2 * s.sigmaDeg) * DEG;
setXy(sectorLines, [r.x, r.x + reach * Math.sin(lo), NaN, r.x, r.x + reach * Math.sin(hi)], [r.y, r.y + reach * Math.cos(lo), NaN, r.y, r.y + reach * Math.cos(hi)]);
sectorLines.isVisible = showAoa;
// Hyperbolas from the measured range differences of each receiver pair
PAIRS.forEach(([i, j], k) => {
const h = hyperbola(receivers[i], receivers[j], latest.rangeDiffs[k], reach);
setXy(hyperbolas[k], h.xs, h.ys);
hyperbolas[k].isVisible = showTdoa;
});
// The multipath echo path
echoPath.isVisible = s.multipath;
reflectorMarker.isVisible = s.multipath;
reflectorLabel.isHidden = !s.multipath;
setXy(echoPath, [transmitter.x, reflector.x, receivers[1].x], [transmitter.y, reflector.y, receivers[1].y]);
setXy(reflectorMarker, [reflector.x], [reflector.y]);
place(reflectorLabel, reflector);
// Sites
receivers.forEach((rx, i) => {
setXy(receiverMarkers[i], [rx.x], [rx.y]);
place(receiverLabels[i], rx);
});
setXy(transmitterMarker, [transmitter.x], [transmitter.y]);
place(transmitterLabel, transmitter);
setXy(pastFixes, fixHistory.map((p) => p.x), fixHistory.map((p) => p.y));
// The fix and its error ellipse
let summary;
if (fix) {
const e = errorEllipse(fix);
setXy(ellipseLine, e.xs, e.ys);
setXy(fixMarker, [fix.p.x], [fix.p.y]);
place(fixLabel, fix.p);
fixLabel.isHidden = false;
const miss = distance(fix.p, transmitter);
const gdop = s.mode === "tdoa" ? ` · GDOP ${(Math.sqrt(fix.P.xx + fix.P.yy) / (C_KM_PER_US * s.sigmaUs)).toFixed(1)}` : "";
summary =
`Fix ${fix.p.x.toFixed(1)} km E, ${fix.p.y.toFixed(1)} km N, ${miss.toFixed(2)} km from the true position · ` +
`95% error ellipse ${(2 * e.major).toFixed(2)} × ${(2 * e.minor).toFixed(2)} km${gdop}`;
} else {
setXy(ellipseLine, [], []);
setXy(fixMarker, [], []);
fixLabel.isHidden = true;
summary = "No fix: the measurements don't cross";
}
const d = drawDfDisplay(s);
const dfText = d
? ` · ${NAMES[s.selected]}: bearing ${d.bearing.toFixed(1)}°, spread ±${d.spreadDeg.toFixed(1)}° (1σ, last 12)` +
(s.multipath && s.selected === 1 ? `, true ${d.trueBearing.toFixed(1)}° (echo off the reflector)` : "")
: "";
ui.readout.textContent = summary + dfText + ". Simulated data.";
}

// --- Hover readouts and dragging on the map ---
let dragging = null; // the object being dragged: transmitter, or a receiver
let hoverText = "";
function hoverReadout(p) {
const bearings = receivers.map((rx, i) => `${NAMES[i]} ${pad3(bearingTo(rx, p))}°`).join(", ");
const dBA = distance(p, receivers[1]) - distance(p, receivers[0]);
const dCA = distance(p, receivers[2]) - distance(p, receivers[0]);
return (
`Cursor ${p.x.toFixed(1)} km E, ${p.y.toFixed(1)} km N · bearings from ${bearings} · ` +
`range differences B−A ${dBA.toFixed(2)} km (${(dBA / C_KM_PER_US).toFixed(1)} µs), C−A ${dCA.toFixed(2)} km (${(dCA / C_KM_PER_US).toFixed(1)} µs)`
);
}
class MapDragModifier extends CustomChartModifier2D {
get modifierType() {
return EModifierType.Chart2DModifier;
}
toData(args) {
const point = translateFromCanvasToSeriesViewRect(args.mousePoint, this.parentSurface.seriesViewRect);
if (!point) return null;
return {
x: xAxis.getCurrentCoordinateCalculator().getDataValue(point.x),
y: yAxis.getCurrentCoordinateCalculator().getDataValue(point.y),
px: point.x,
py: point.y
};
}
modifierMouseDown(args) {
super.modifierMouseDown(args);
const m = this.toData(args);
if (!m) return;
// Pick the nearest site within about 20 pixels of the mouse
const xc = xAxis.getCurrentCoordinateCalculator();
const yc = yAxis.getCurrentCoordinateCalculator();
const candidates = [transmitter, ...receivers];
let best = null;
let bestDistance = 20 * (window.devicePixelRatio || 1);
for (const c of candidates) {
const dp = Math.hypot(xc.getCoordinate(c.x) - m.px, yc.getCoordinate(c.y) - m.py);
if (dp < bestDistance) {
best = c;
bestDistance = dp;
}
}
dragging = best;
const index = receivers.indexOf(best);
if (index >= 0) ui.receiverSelect.value = String(index); // clicking a receiver shows its DF display
if (best) args.handled = true;
}
modifierMouseMove(args) {
super.modifierMouseMove(args);
const m = this.toData(args);
if (dragging && m) {
dragging.x = m.x;
dragging.y = m.y;
fixHistory.length = 0; // the old fixes belong to the old geometry
step(); // measure again at once, so the bearings, hyperbolas and fix follow the mouse
}
hoverText = m ? hoverReadout(m) : "";
ui.hover.textContent = hoverText;
}
modifierMouseUp(args) {
super.modifierMouseUp(args);
dragging = null;
}
modifierMouseLeave(args) {
super.modifierMouseLeave(args);
dragging = null;
ui.hover.textContent = "";
}
modifierDoubleClick(args) {
super.modifierDoubleClick(args);
resetView();
}
}
map.sciChartSurface.chartModifiers.add(new MapDragModifier());

// Hover on the DF display: the bearing under the mouse
class DfReadoutModifier extends CustomChartModifier2D {
get modifierType() {
return EModifierType.Chart2DPolarModifier;
}
modifierMouseMove(args) {
super.modifierMouseMove(args);
const point = translateFromCanvasToSeriesViewRect(args.mousePoint, this.parentSurface.seriesViewRect);
if (!point) return;
const polar = bearingAxis.reverseTransform(point.x, point.y);
const bearing = (bearingAxis.getCurrentCoordinateCalculator().getDataValue(polar.x) + 360) % 360;
ui.hover.textContent = `DF display: cursor at bearing ${pad3(bearing)}° from receiver ${NAMES[settings().selected]}`;
}
modifierMouseLeave(args) {
super.modifierMouseLeave(args);
ui.hover.textContent = "";
}
}
df.sciChartSurface.chartModifiers.add(new DfReadoutModifier());

// --- The key ---
const swatch = (colour, text, dashed = false) =>
`<span style="display:inline-flex; align-items:center; gap:5px"><span style="display:inline-block; width:18px; ` +
`border-top:2px ${dashed ? "dashed" : "solid"} ${colour}"></span>${text}</span>`;
ui.key.innerHTML =
swatch(RECEIVER_COLOURS[0], "Bearing A") +
swatch(RECEIVER_COLOURS[1], "Bearing B") +
swatch(RECEIVER_COLOURS[2], "Bearing C") +
swatch(PAIR_COLOURS[0], "Hyperbola B−A") +
swatch(PAIR_COLOURS[1], "Hyperbola C−A") +
swatch(PAIR_COLOURS[2], "Hyperbola C−B") +
swatch("#FFFFFF", "95% error ellipse") +
swatch("#FFFFFFAA", "±2σ either side of the DF receiver's bearing", true) +
swatch("#FF8A8A", "True bearing on the DF display (known only in a simulation)", true) +
`<span>Drag the red cross or a receiver. Scroll to zoom, double-click to reset. All positions and signals are simulated.</span>`;

// --- Controls ---
function updateControls() {
const s = settings();
ui.bearingOutput.textContent = `${s.sigmaDeg.toFixed(1)}°`;
ui.timingOutput.textContent = `${s.sigmaUs.toFixed(1)} µs`;
ui.labelFor("bearingNoise").style.display = s.mode === "tdoa" ? "none" : "";
ui.labelFor("timingNoise").style.display = s.mode === "aoa" ? "none" : "";
}
const restart = () => {
fixHistory.length = 0;
updateControls();
step();
};
ui.modeSelect.addEventListener("change", restart);
ui.multipathInput.addEventListener("change", restart);
ui.bearingInput.addEventListener("input", restart);
ui.timingInput.addEventListener("input", restart);
ui.receiverSelect.addEventListener("change", draw);

// --- New measurements MEASUREMENTS_PER_SECOND times a second; stops when the chart is deleted ---
updateControls();
resetView();
for (let k = 0; k < HISTORY; k++) step(); // fill the history, so the displays aren't empty at the start
let last = performance.now();
function animate(now) {
if (map.sciChartSurface.isDeleted || df.sciChartSurface.isDeleted) return;
keepSquare();
if (now - last >= 1000 / MEASUREMENTS_PER_SECOND) {
last = now;
step();
}
requestAnimationFrame(animate);
}
requestAnimationFrame(animate);

Key points:

  • The DF display is a SciChartPolarSurface. The angular PolarNumericAxis runs from 0 to 360° with startAngle: Math.PI / 2 and flippedCoordinates: true, so 000° is at the top and bearings increase clockwise. The strobe is a PolarLineRenderableSeries from the centre to the rim, the spread a PolarColumnRenderableSeries wedge, and the history a PolarXyScatterRenderableSeries.
  • The map is an ordinary SciChartSurface with two NumericAxis axes in km. Bearing lines, hyperbolas and the error ellipse are FastLineRenderableSeries, and the sites are XyScatterRenderableSeries with triangle and cross point markers. The visible ranges are adjusted so 1 km is the same length on both axes, so angles and ellipses aren't distorted.
  • The fix is a Gauss-Newton weighted least-squares solution. Its covariance gives the ellipse axes (eigenvalues) and direction (eigenvector), scaled by 2.45 for 95%. Each hyperbola is drawn from its parametric form, a·cosh t and b·sinh t, rotated onto the line between the two receivers.
  • A custom chart modifier drags the transmitter and receivers and shows the hover readout, using the axes' coordinate calculators to convert between pixels and km.

See it in the demo app: JavaScript polar line chart · React polar line chart · Angular polar line chart.

Go deeper: SciChart.js polar line chart documentation, the polar column documentation for the spread wedge, the line series documentation for the map, and custom chart modifiers for dragging. For a display that also measures range, see how to read a radar screen; for passive bearings underwater, see sonar displays. For how aerospace and defence software uses SciChart, see SciChart for aerospace and defence.

Frequently asked questions​

What is radio direction finding?​

Radio direction finding (RDF or DF) measures the direction a radio signal arrives from, using an antenna array or a turning antenna. One receiver gives a bearing: a line from the receiver towards the transmitter. Bearings from two or more receivers in different places cross at the transmitter's position, which is called a fix.

What is TDOA?​

TDOA (time difference of arrival) locates a transmitter from the differences in the time its signal reaches several receivers with synchronised clocks. Each microsecond of difference means the transmitter is about 300 m closer to one receiver than the other. One time difference puts the transmitter on a hyperbola; two or more, from three or more receivers, cross at its position.

How many receivers do you need to locate a transmitter?​

With bearings, two receivers give a fix where their lines cross, but three are better: they show whether the bearings agree and keep the fix usable when two lines cross at a shallow angle. With TDOA, two receivers give only a hyperbola, and at least three are needed for a position on a map. A fourth TDOA receiver adds a check that can expose a bad measurement.

What is the difference between AOA and TDOA?​

AOA (angle of arrival) measures the direction of the signal at each site with a direction-finding antenna array, and the fix is where the bearing lines cross. TDOA measures arrival times at simple antennas with very accurate synchronised clocks, and the fix is where hyperbolas cross. AOA works on narrowband and unmodulated signals; TDOA needs signal bandwidth but locates wideband signals well. Many systems combine both.

What is a cocked hat in direction finding?​

A cocked hat is the small triangle formed when three bearing lines don't meet at one point because each has a small error. The transmitter is not always inside it: if each line is equally likely to fall either side of the true position, the chance is only one in four. Modern systems draw an error ellipse instead, sized from the bearing errors and the geometry.

How do I make a direction finding display in JavaScript?​

Use a polar chart with the angular axis running 0 to 360 degrees clockwise from the top, and draw the latest bearing as a polar line from the centre to the rim, the spread as a polar column wedge and past bearings as polar scatter points. For the fix, use an x-y chart in km with line series for the bearing lines, hyperbolas and error ellipse. SciChart.js does this in plain JavaScript, React or Angular.

Sources​