matlab 计算经纬度两点间距离

该博客介绍了如何使用matlab计算地球上两点之间的距离,包括简单的距离估计方法和利用函数`geodistance`进行精确计算,考虑了多种椭球体模型,适用于长距离计算。还提供了一些示例来展示不同计算方法的使用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

公众号:战略咨询文库

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值