Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



Re: units for great circle distance
Posted:
May 29, 2014 1:06 PM


dpb <none@non.net> wrote in message <lm7ogh$vn3$1@speranza.aioe.org>... > On 5/29/2014 10:21 AM, Jonathan W Smith wrote: > ... [top posting repaired]... > > > dpb <none@non.net> wrote in message <lm5tq8$kgd$1@speranza.aioe.org>... > >> On 5/28/2014 3:29 PM, Jonathan W Smith wrote: > >> > Hello > >> > What are the units for the result of the greatCircleDistance function? > >> > >> Dependent on units of what you input... > > > Good morning: > > > > My longitude and latitude are degrees. How does the function know what > > units you are putting in? If I put in miles, will it output miles? If I > > put in the number 10 how does in know its no miles vs km? > > > > Thanks > > > > Jonathan > > Guess better find out which function you're actually using; there is no > greatCircleDistance() function in current documentation nor at the File > Exchange, I just made a deductive conclusion from the name of the function. > > The Mapping Toolbox function distance() returns an arc length in degrees > by default, optionally in radians. You convert to distance based on > diameter. > > Check the documentation on the function you're using, specifically, for > its assumptions. > > 
There are two great circle distance functions on the file exchange:
http://www.mathworks.com/matlabcentral/fileexchange/36695correspondingpointsthroughmdl/content/Functions3D/GreatCircleDistance.m
http://www.mathworks.com/matlabcentral/fileexchange/23026computethegreatcircledistancebetweentwopoints/content/greatCircleDistance.m



