angle2hms: Convert astronomical angle in degrees to hours, minutes and...

View source: R/astronomy.R

angle2hmsR Documentation

Convert astronomical angle in degrees to hours, minutes and seconds

Description

The purpose of angle2hms is to facilitate comparison of rightAscension angles computed by sunAngle() and moonAngle() 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 11h40m48s.10 for the value used in the “Examples”; see Chapter 1 of Meeus (1991) for more on angle calculation and representation.

Usage

angle2hms(angle)

Arguments

angle

numerical value giving an angle in degrees

Value

angle2hms returns a list containing values time (a numerical value for decimal hour, between 0 and 24), hour, minute, and second (the last of which may have a fractional part), and string, a character value indicates the time in hour-minute-second notation, with the second part to two decimal places and intervening h, m and s characters between the units.

Author(s)

Dan Kelley

References

  • Meeus, Jean. Astronomical Algorithms. Second Edition. Richmond, Virginia, USA: Willmann-Bell, 1991.

See Also

Other things related to astronomy: eclipticalToEquatorial(), equatorialToLocalHorizontal(), julianCenturyAnomaly(), julianDay(), moonAngle(), siderealTime(), sunAngle(), sunDeclinationRightAscension()

Examples

# A randomly-chosen example on page 99 of Meeus (1991).
angle2hms(177.74208) # string component 11h50m58s.10


oce documentation built on July 6, 2022, 1:06 a.m.