Learn R Programming

astrolibR (version 0.1)

radec: Convert Right Ascension and declination from decimal to sexigesimal units

Description

Convert Right Ascension and declination from decimal to sexigesimal units

Usage

radec(ra, dec, hours=F)

Arguments

ra
Right Ascension, in degrees, scalar or vector
dec
declination, in degrees, scalar or vector
hours
if =TRUE, then the input right ascension should be specified in decimal hours instead of degrees (default = FALSE)

Value

list with components:
ihr
Right Ascension hours, integer scalar or vector
imin
Right Ascension minutes, integer scalar or vector
xsec
Right Ascension seconds, real scalar or vector
ideg
declination degrees, integer scalar or vector
imn
declination degrees, integer scalar or vector
xsc
declination degrees, real scalar or vector

Details

The conversion is to sexigesimal hours for RA, and sexigesimal degrees for declination.

Examples

Run this code
radec(10.592, -82.663)

Run the code above in your browser using DataLab