pos2dist

Calculate distance between two points on earth's surface given by latitude-longitude pair.

You are now following this Submission

Calculate distance between two points on earth's surface given by their latitude-longitude pair. Choose method 1 or 2. Method 1 uses plane approximation, only for points within several tens of kilometers; Method 2 calculates sphereic geodesic distance for points farther apart, but ignores flattening of the earth. Output is in km.

Cite As

Langqiu Sun (2026). pos2dist (https://ch.mathworks.com/matlabcentral/fileexchange/5256-pos2dist), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0