Home > freetb4matlab > mapping > azimuth.m

azimuth

PURPOSE ^

%

SYNOPSIS ^

function az = azimuth(varargin)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} @var{az} = azimuth(@var{lat1},@var{lon1},@var{lat2},@var{lon2})
% @deftypefnx {Function File} {} @var{az} = azimuth(@var{lat1},@var{lon1},@var{lat2},@var{lon2},@var{units})
% @deftypefnx {Function File} {} @var{az} = azimuth(@var{pt1}, @var{pt2})
% @deftypefnx {Function File} {} @var{az} = azimuth(@var{pt1}, @var{pt2},@var{units})
%
% Calculates the great circle azimuth from a point 1 to a point 2.
% The latitude and longitude of these two points can either be given 
% independently or as columns of the matrices @var{pt1} and @var{pt2} in 
% the form [latitude longitude].
%
% The units for the input coordinates and output angles can be 
% 'degrees' (the default) or 'radians'.
%
% @example
% >> azimuth([10,10], [10,40])
% ans = 87.336
% >> azimuth([0,10], [0,40])
% ans = 90
% >> azimuth(pi/4,0,pi/4,-pi/2,'radians')
% ans = 5.3279
% @end example
%
% @seealso{elevation,distance}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003