hadec2altaz: Convert Hour Angle and Declination to Horizon (alt-az)...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Convert Hour Angle and Declination to Horizon (alt-az) coordinates

Usage

1
hadec2altaz( ha, dec, lat, ws=F)

Arguments

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)

Details

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.

Value

alt

local apparent altitude, in degrees

az

local apparent azimuth, in degrees

Author(s)

Written by Chris O'Dell (Univ. Wisconsin), 2002

R adaptation by Arnab Chakraborty June 2013

See Also

altaz2hadec eq2hor

Examples

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)

Example output

$alt
[1] 58.89983

$az
[1] 180

astrolibR documentation built on May 2, 2019, 3:26 a.m.