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.

nauticalmiles = deg2nm(1)
nauticalmiles = 60.0405

Specify the radius to use in the conversion calculation. The default value assumes the Earth's radius.

nauticalmiles = deg2nm(1,almanac('moon','radius'))
nauticalmiles = 30.3338

Return the distance in statute miles rather than nautical miles.

ans = 69.0932