function z = latlondi(phi1,lamda1,phi2,lamda2)
%
% The function z = latlondi(phi1,lamda1,phi2,lamda2) computes
% the distance (in km) of two points defined by their latitudes
% phi and longitudes lamda along a strait line on a map with 
% constant spacing between zonal lines (not along a great cirlce).
% Since the path is not along the great circle, it is only  
% good for small distances, so for the calculation of length per
% degree of longitude I use the average latitude.
%
%----------------------------------------------------------------
% Written by Vassilis Zervakis, in June 1996, 
%            while at AINCO-Interocean, Madrid, Spain
%----------------------------------------------------------------

averlat = (phi1 + phi2) / 2.;
z = sqrt(deltaphi(phi1,phi2)^2 + deltalam(lamda1,lamda2,averlat)^2);
