distance between two geo points , I am trying to convert Rhumb lines distance calculation in matlab but it is not work properly

1 回表示 (過去 30 日間)
I am trying to convert Rhumb lines distance calculation in matlab but it is not work properly can some body help :
%rhumb line
clc
th1=4.385704984670893; % latitude 1
th2=4.382316850229801; % latitude 2
lon1= 100.97986760432356 ; % longitude 1
lon2= 100.96958025244206 ; % longitude 2
Dlon=lon2-lon1;
Dth=th2-th1;
R=6371
LD=log(tan(pi/4+th2/2)/tan(pi/4+th1/2)); % latitude difference
cos(th1)
abs(LD);
q=Dth/LD;
d=sqrt((Dth)^2 + ((q)^2) * (Dlon)^2)*R
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% following is pic of javascript coade and description

回答 (0 件)

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by