ita_sph_distance.m 410 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
function result = ita_sph_distance(point1, point2)

% <ITA-Toolbox>
% This file is part of the application SphericalHarmonics for the ITA-Toolbox. All rights reserved. 
% You can find the license for this m-file in the application folder. 
% </ITA-Toolbox>


lat1 = point1(:,1);
lon1 = point1(:,2);

lat2 = point2(:,1);
lon2 = point2(:,2);

result = distance([pi/2 - lat1 lon1], [pi/2 - lat2 lon2], 'radians');