How to find out distance of two different location using their latitude and longitude?

Location 1
Latitude (deg) Longitude (deg)
23.254713123 87.846916806
Location 2
Latitude (deg) Longitude (deg)
23.254712039 87.846917766
Find out the distance of this two locations (in 5 decimal places)?

回答 (1 件)

Benjamin Thompson
Benjamin Thompson 2022 年 4 月 7 日

0 投票

This is pretty easy if you have the Mapping Toolbox:
>> [xNorth, xEast, xDown] = geodetic2ned(23.254712039, 87.846917766, 0, 23.254713123, 87.846916806, 0, wgs84Ellipsoid)
xNorth =
-0.120050380608287
xEast =
0.098235995816677
xDown =
2.156363788918814e-09
You can also use the Aerospace Toolbox to do this in a similar way using lla2ned.

2 件のコメント

SOMNATH MAHATO
SOMNATH MAHATO 2022 年 4 月 7 日
Thank you for your reponse. But i can't get two location distance in km/m.
Benjamin Thompson
Benjamin Thompson 2022 年 4 月 8 日
If you wanted the distance between the two locations in your question, calculate the square root of the sum of the squares. sqrt(x^2 + y^2). It looks like around 15 cm.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File Exchange で Earth and Planetary Science についてさらに検索

質問済み:

2022 年 4 月 7 日

コメント済み:

2022 年 4 月 8 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by