dms2rad: Degrees, minutes, and seconds to radians

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/dms2rad.R

Description

Angular conversion from degrees, minutes, and seconds to radians

Usage

1
dms2rad(d = '33d 09m 35.0s')

Arguments

d

String containing degrees, minutes, and seconds

Details

Function reads a string (the input is a string to allow conversion of angles between -1 and zero degrees) with degrees, minutes, and seconds separated by any of characters d, m, s, a colon, or a comma. Spaces are not valid separators, as they are removed as part of input parsing. Decimal values are allowed in any position. Zeros are the default if values for minutes or seconds are missing from the string. A minus sign, W, or w before the degrees indicates negative degrees. Positive degrees are denoted by no character, +, E, or e before the degrees values.

Value

Angle in radians

Author(s)

Andrew Harris

See Also

hms2rad, rad2dms, rad2hms

Examples

1
2
3
4
5
6
7
dms2rad('10, 22, 14')
dms2rad('10:22:14')
dms2rad('10d22m14s')
dms2rad('-0, 30')
dms2rad('-77d30.5m')
dms2rad('W 77d30.5m')
dms2rad(-77.5083333)


astroFns documentation built on May 19, 2017, 12:54 p.m.
Search within the astroFns package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.