lon_to_m.m 282 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
function dx = lon_to_m(dlon, alat)
% dx = lon_to_m(dlon, alat)
% dx   = longitude difference in meters
% dlon = longitude difference in degrees
% alat = average latitude between the two fixes

rlat = alat * pi/180;
p = 111415.13 * cos(rlat) - 94.55 * cos(3 * rlat);
dx = dlon .* p;