az2dec: Calculates declination from azimuth and altitude measurements

Description Usage Arguments See Also Examples

View source: R/mechanics.R

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

1
2
3
4
5
6
7
8
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 hor2alt

refraction

(Optional) Whether atmospheric refraction is to be taken into account. If not given the value set by skyscapeR.vars will be used instead.

atm

(Optional) Atmospheric pressure for refraction calculation. If not given the value set by skyscapeR.vars will be used instead.

temp

(Optional) Atmospheric temperature for refraction calculation. If not given the value set by skyscapeR.vars will be used instead.

See Also

swe_azalt_rev, hor2alt

Examples

1
2
3
4
5
6
7
8
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)

skyscapeR documentation built on Oct. 30, 2021, 1:06 a.m.