geoprimsField-grade geospatial math

Closest point of approach

When two moving objects come closest, how close, and the bearing and range then, in a local flat frame (for separations under 500 km), with climb rates and height for aircraft in 3D.

Planning and education aid. Not for primary navigation. Full disclaimer

141.42m

Closest approach is 141.42 m in 110 s.

Time to CPA
Bearing of B at CPA
Separation now
Scene length
Provenance
Computed by
navigation.route.cpa 1.0.0, core 0.1.0
Model
Constant velocities in a local east-north(-up) frame: t = −(r·v) / |v|², the 3D minimum when heights or climb rates are given
Accuracy
Exact in the plane; the flat-plane approximation is good to about 0.1% under 500 km
Notes
None
Cites
Karney, C. F. F., Journal of Geodesy, Algorithms for geodesics

Something look off?

Your values

Showing an example. Change anything.
More options 4
Run many at once from a CSV

Loading…

N ↑ABCPA 141.42 m in 110 s
How we got thisFormula, worked example, sources, and proof

Model: Constant velocities in a local east-north(-up) frame: t = −(r·v) / |v|², the 3D minimum when heights or climb rates are given

Accuracy: Exact in the plane; the flat-plane approximation is good to about 0.1% under 500 km

When to use this: Use this to see whether two moving things will pass close enough to matter: two aircraft on steady courses, two vessels crossing, a drone against traffic, a chase boat against a target. Give each one's course and speed and where the second stands relative to the first, and it reports when they are nearest, how near, and the bearing and range at that moment. With heights and climb rates it does the same in three dimensions, which is the case that matters in the air, where two tracks that cross on a chart may be a thousand feet apart.

Limitations: It assumes both keep their present course and speed, so it is a picture of the next few minutes and not a prediction: one turn and the answer is void. The frame is flat, which is why the separation should be kept under 500 km, where the approximation costs about a tenth of a percent. It is geometry, not separation standards: it does not know about wake turbulence, required separation minima, or the rules of the road, and a closest approach that looks comfortable here may still be a violation. Where the two are already moving apart the closest approach is in the past, which is flagged, and the present separation is the number that matters.

Worked example: A heading east, B crossing southbound. Source: exactly solvable by hand: with r = (1000, 1200) m and a relative velocity of (−10, −10) m/s, t = −(r·v)/|v|² = 22000/200 = 110 s exactly, the relative position is then (−100, +100) m, so the separation is 100√2 = 141.4213562373095 m on a bearing of exactly 315°, and the present separation is √(1000² + 1200²) = 1562.0499351813308 m. It is golden test vector v001, and every build checks the tool still gives its answer within its tolerance.

You enter

A course
090 deg
A speed
10 m/s
B course
180 deg
B east of A
1000 m
B north of A
1200 m
B speed
10 m/s

You get

Separation at CPA
141.42 m
Time to CPA
110 s
Bearing of B at CPA
315°
Separation now
1,562.05 m
Scene length
165 s

Review: Not yet independently reviewed by a geodesist.

Last verified: 2026-09-18, 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.

Changes

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

Sources

Terms

CPA: closest point of approach
The time and distance at which two moving aircraft or vessels will pass nearest each other. Source: The American Practical Navigator (Bowditch), NGA Pub. No. 9