Documentation

This is machine translation

Translated by
Mouse over text to see original. Click the button below to return to the English verison of the page.

Convert spherical distance from kilometers to radians

Syntax

`rad = km2rad(km)rad = km2rad(km,radius)rad = km2rad(km,sphere)`

Description

`rad = km2rad(km)` converts distances from kilometers to radians as measured along a great circle on a sphere with a radius of 6371 km, the mean radius of the Earth.

`rad = km2rad(km,radius)` converts distances from kilometers to radians as measured along a great circle on a sphere having the specified radius. `radius` must be in units of kilometers.

`rad = km2rad(km,sphere)`converts distances from kilometers to radians , as measured along a great circle on a sphere approximating an object in the Solar System. `sphere` may be one of the following values: `'sun'`, `'moon'`, `'mercury'`, `'venus'`, `'earth'`, `'mars'`, `'jupiter'`, `'saturn'`, `'uranus'`, `'neptune'`, or `'pluto'`, and is case-insensitive.

Examples

How many radians does 1,000 km span on the Earth and on the Moon?

```rad = km2rad(1000) rad = 0.1570 rad = km2rad(1000,'moon') rad = 0.5754 ```