sunDeclinationRightAscension | R Documentation |
The formulae are from Meeus (1991), chapter 24 (which uses chapter 21).
sunDeclinationRightAscension(time, apparent = FALSE)
time |
a POSIXct time. This ought to be in UTC timezone; if not, the behaviour of this function is unlikely to be correct. |
apparent |
logical value indicating whether to return the 'apparent' angles. |
A list containing declination
and rightAscension
, in degrees.
Dan Kelley, based on formulae in Meeus (1991).
Meeus, Jean. Astronomical Algorithms. Second Edition. Richmond, Virginia, USA: Willmann-Bell, 1991.
Other things related to astronomy:
angle2hms()
,
eclipticalToEquatorial()
,
equatorialToLocalHorizontal()
,
julianCenturyAnomaly()
,
julianDay()
,
moonAngle()
,
siderealTime()
,
sunAngle()
# Example 24.a in Meeus (1991) (page 158 PDF, 153 print)
time <- as.POSIXct("1992-10-13 00:00:00", tz = "UTC")
a <- sunDeclinationRightAscension(time, apparent = TRUE)
stopifnot(abs(a$declination - (-7.78507)) < 0.00004)
stopifnot(abs(a$rightAscension - (-161.61919)) < 0.00003)
b <- sunDeclinationRightAscension(time)
# check against previous results, to protect aginst code-drift errors
stopifnot(abs(b$declination - (-7.785464443)) < 0.000000001)
stopifnot(abs(b$rightAscension - (-161.6183305)) < 0.0000001)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.