The purpose of angle2hms is to facilitate comparison of
rightAscension angles computed by
with angles reported in astronomical sources and software, which
often employ an hour-minute-second notation. In that notation,
decimal hour is computed as 24/360 times the angle in degrees,
and from that decimal hour are compute integer hour and minute
values, plus a decimal second value. It is common in the
astronomical literature to use strings to represent the results,
e.g. with \(11^h40^m48^s.10\) for the
value used in the “Examples”; see Chapter 1 of
Meeuse (1991) for more on angle calculation and representation.
numerical value giving an angle in degrees
angle2hms returns a list containing
time (a numerical value for decimal hour, between 0 and 24),
second (the last of which may have a fractional
string, a character value indicates the time in hour-minute-second
notation, with the second part to two decimal places and intervening
s characters between the units.
Meeus, Jean, 1991. Astronomical algorithms. Willmann-Bell, Richmond VA, USA. 429 pages.
Other things related to astronomy:
# A randomly-chosen example on page 99 of Meeus (1991). angle2hms(177.74208) # string component 11h50m58s.10#> $hourDecimal #>  11.84947 #> #> $hour #>  11 #> #> $minute #>  50 #> #> $second #>  58.0992 #> #> $string #>  "11h50m58s.10" #>