1,简单估计:例子如下 第一个点经纬度 120 24 第二个点经纬度 121 24
D=distance(24,120,24,121) % distance看matlab help
pi=3.1415926;
dx=D*6371*1000*2*pi/360;
2 利用一下程序函数
function r = geodistance( ci , cf , m )
% Calculates the distance in meters between two points on earth surface.
%
% SYNTAX: r = geodistance( coordinates1 , coordinates2 , method ) ;
%
% Where coordinates1 = [longitude1,latitude1] defines the
% initial position and coordinates2 = [longitude2,latitude2]
% defines the final position.
% Coordinates values should be specified in decimal degrees.
% Method can be an integer between 1 and 23, default is m = 6.
% Methods 1 and 2 are based on spherical trigono
matlab 计算经纬度两点间距离
最新推荐文章于 2024-04-23 16:41:04 发布