Convert radians to degrees, minutes, and seconds

Share:

Description

Angular conversion from radians to degrees, minutes, and seconds

Usage

1
rad2dms(rad = 1, places = 2)

Arguments

rad

Decimal radians

places

Number of decimal places in seconds term (0:6)

Details

Convert radians to degrees, minutes, and seconds.

Value

Fixed-format string with sign, then degrees, minutes, and seconds separated by colons.

Author(s)

Andrew Harris

See Also

rad2hms, dms2rad, hms2rad

Examples

1
2
3
rad2dms(2.44)
rad2dms(dms2rad(c('-1,4,5.12', '10:04: 5.3')), places=3)
rad2dms(-66.5 * pi/180) # from degrees to dms