az2dec {skyscapeR} | R Documentation |
Calculates declination from azimuth and altitude measurements
Description
This function calculates the declination corresponding to an
orientation , i.e. an azimuth. The altitude can either be given
or, alternatively, if a skyscapeR.horizon object is provided,
the corresponding horizon altitude will be automatically retrieved.
This function is a wrapper for function swe_azalt_rev
of package swephR.
Usage
az2dec(
az,
loc,
alt,
refraction = skyscapeR.env$refraction,
atm = skyscapeR.env$atm,
temp = skyscapeR.env$temp
)
Arguments
az |
Azimuth(s) for which to calculate declination(s). See examples below. |
loc |
Location, can be either a skyscapeR.horizon object or, alternatively, an array of latitude values. |
alt |
(Optional) Altitude of orientation. If left empty and a skyscapeR.horizon
is provided then this is will automatically retrieved from the horizon data via |
refraction |
(Optional) Whether atmospheric refraction is to be taken into account.
If not given the value set by |
atm |
(Optional) Atmospheric pressure for refraction calculation.
If not given the value set by |
temp |
(Optional) Atmospheric temperature for refraction calculation.
If not given the value set by |
See Also
Examples
dec <- az2dec(az=92, loc=c(35,-8), alt=2)
# flat horizon with 2 degrees of altitude
hor <- createHor(az=c(0,360), alt=c(2,2), loc=c(35,-8,25))
dec <- az2dec(92, loc=hor)
# Can also be used for an array of azimuths:
decs <- az2dec(az=c(87,92,110), loc=hor)