This set of functions provides simple position calculations for the sun and moon, taken from Pascal routines published in Montenbruck and Pfleger (1994, Dunlop).
These are completely independent from the (specifically optimized) solar elevation calculations available via [elevation and solar].
astro(lon, lat, astro.calc)EQUHOR(DEC, TAU, PHI)FRAC(x)LMST(MJDay, LAMBDA)lunar(time)mini.sun(time)MJD(date)POLAR(X, Y, Z)
Arguments
lon: vector of longitudes
lat: vector of latitudes
astro.calc: list object containing RA right ascension
DEC: declination
TAU: TAU
PHI: PHI
x: number
MJDay: modified julian day
LAMBDA: LAMBDA
time: vector of date-times in POSIXct format
date: vector of date-times in POSIXct format
X: x-coordinate
Y: y-coordinate
Z: z-coordinate
Returns
astro returns a list object with the components of the moon or sun's position, - r: rho component
theta: theta component - elevation
phi: phi component - azimuth
References
@BOOK{,
title = {Astronomy on the Personal Computer},
publisher = {Springer-Verlag, Berlin},
year = {1994},
author = {Oliver Montenbruck and Thomas Pfleger},
edition = {2 (translated from German by Storm Dunlop)},
}