ten {astrolibR}R Documentation

Convert a sexigesimal number or string to decimal

Description

Convert a sexigesimal number or string to decimal

Usage

ten(dd, mm=0, ss=0)   

Arguments

dd

degrees (0-360) or hour (0-24), integer, scalar
or string giving sexigesimal quantity separated by spaces or colons; e.g.. "10 23 34" or "-3:23:45.2".

mm

minutes, integer (0-60), scalar (default = 0)

ss

seconds, integer (0-60), scalar (default = 0)

Details

The output is a real number

= dd + mm/60. + ss/3600

. Inverse of the sixty function. The function tenv can be used when dealing with a vector of sexigesimal quantities.

Value

decimal equivalent of input sexigesimal quantity, real, scalar

Author(s)

Written W. Landsman Raytheon ITSS 2000

R adaptation by Arnab Chakraborty June 2013

See Also

sixty

Examples

ten(12,0,0)   # gives 12
ten("12:00:00")   # gives 12
ten(0,-23,34)  # gives -0.39277778
ten("-0:23:34")   # gives -0.39277778

[Package astrolibR version 0.1 Index]