Function File: rad = km2rad (km)
Function File: rad = km2rad (km, radius)
Function File: rad = km2rad (km, sphere)

Converts distance to angle by dividing distance by radius.

Calculates the angles rad for the distances km in a sphere with radius (also in kilometers). If unspecified, radius defaults to 6371, the mean radius of Earth.

Alternatively, sphere can be one of "sun", "mercury", "venus", "earth", "moon", "mars", "jupiter", "saturn", "uranus", "neptune", or "pluto", in which case radius will be set to that object mean radius.

See also: deg2km, deg2sm, km2rad, km2deg, nm2deg, nm2rad, rad2km, rad2nm, rad2sm, sm2deg, sm2rad.

Package: mapping