www.gusucode.com > map 案例源码 matlab代码程序 > map/ConvertFromSphericalDistanceToLinearDistanceExample.m
%% Convert from Linear Measurements to Spherical Measurements % This example shows how to convert distances along the surface of the % Earth (or another planet) from units of kilometers (km), nautical miles % (nm), or statute miles (sm) to spherical distances in degrees or % radians. %% % Convert a degree of arc length at the Earth's equator to nautical miles. % Copyright 2015 The MathWorks, Inc. nauticalmiles = deg2nm(1) %% % Specify the radius to use in the conversion calculation. The default % value assumes the Earth's radius. nauticalmiles = deg2nm(1,almanac('moon','radius')) %% % Return the distance in statute miles rather than nautical miles. deg2sm(1)