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 CenterFile Exchange 中查找有关 Read, 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