zjw123asd 发表于 2012-4-20 20:30
题目就是如上所示
function r = geodistance( ci , cf , m )
%GEODISTANCE: Calculates the distance in meters between two points on earth surface.
%
% Usage: r = geodistance( coordinates1 , coordinates2 , method ) ;
%
% Where coordinates1 = [lambda1,phi1] defines the
% initial position and coordinates2 = [lambda2,phi2]
% 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 trigonometry and a
% spheroidal model for the earth, respectively.
% Methods 3 to 24 use Vincenty's formulae, based on ellipsoid
% parameters.
% Here it follows the correspondence between m and the type of
% ellipsoid:
%
% m = 3 -> ANS , m = 4 -> GRS80, m = 5 -> WGS72,
% m = 6 -> WGS84, m = 7 -> NSWC-9Z2,
% m = 8 -> Clarke 1866, m = 9 -> Clarke 1880,
% m = 10 -> Airy 1830,
% m = 11 -> Bessel 1841 (Ethiopia,Indonesia,Japan,Korea),
% m = 12 -> Bessel 1841 (Namibia),
% m = 1