Description Usage Arguments Details Value Author(s) See Also Examples
Convert Hour Angle and Declination to Horizon (alt-az) coordinates
1 | hadec2altaz( ha, dec, lat, ws=F)
|
ha |
local apparent hour angle, in degrees, scalar or vector |
dec |
local apparent declination, in degrees, scalar or vector |
lat |
local latitude, in degrees, scalar or vector |
ws |
if FALSE, the output azimuth is measured East from North. If TRUE, the output azimuth is measured West from South. (default=FALSE) |
This function is intended mainly to be used by function eq2hor. It correctly treats the singularities at the North and South Celestial Poles.
Similar functions, elev and azimuth, are provided in the CRAN package astroFns.
alt |
local apparent altitude, in degrees |
az |
local apparent azimuth, in degrees |
Written by Chris O'Dell (Univ. Wisconsin), 2002
R adaptation by Arnab Chakraborty June 2013
1 2 3 4 5 6 7 8 9 | # What were the apparent altitude and azimuth of the sun when it transited
# the local meridian at Pine Bluff Observatory (Lat=+43.07833 degrees) on
# April 21, 2002? An object transits the local meridian at 0 hour angle.
# Assume this will happen at roughly 1 PM local time (18:00 UTC).
# Result: Altitude alt = 58.90, Azimuth az = 180.0
jd <- jdcnv(2002, 4, 21, 18.) # get rough Julian date to determine Sun declination
sun_pos <- sunpos(jd)
hadec2altaz(0., sun_pos$dec, 43.078333)
|
$alt
[1] 58.89983
$az
[1] 180
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.