body.position {skyscapeR} | R Documentation |
Computes position of Solar System bodies in equatorial coordinates
Description
This function calculates the geocentric or topocentric declination and right ascension of solar
system bodies at a given time. It is a wrapper for function
swe_calc_ut
of package swephR.
Usage
body.position(
obj = "sun",
time,
timezone,
calendar,
dec,
loc = NULL,
refraction,
atm,
temp,
verbose = T
)
Arguments
obj |
(Optional) String containing name of the solar system body of interest. Can be any of the planets (inc. Pluto), the Moon, the Sun or the Ecliptic. Defaults to 'sun'. |
time |
Either a string containing the date and time in the format "YYYY/MM/DD HH:MM:SS"
(see |
timezone |
(Optional) Timezone of input either as a known acronym (e.g. "GMT", "CET") or
a string with continent followed by country capital (e.g. "Europe/London"). See
timezones for details. Only needed if time is a string. #' If not given the value set
by |
calendar |
(Optional) Calendar used in parameter time. G for gregorian and J for julian.
Only needed if time is a string. If not given the value set by |
dec |
(Optional) Output declination: geo for the geocentric, or topo for the topocentric
frame of reference. If not given the value set by |
loc |
(Optional) Location, only needed if output is in topocentric declination. |
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 |
verbose |
(Optional) Boolean to control whether or not to display text. Default is TRUE. |
See Also
swe_calc_ut
, timestring
, time2jd
Examples
# Position of the sun at noon GMT on Christmas day 2018:
body.position('sun', '2018/12/25 12:00:00', timezone='GMT')
# Declination of the moon at same time
body.position('moon', '2018/12/25 12:00:00', timezone='GMT')$equatorial$Dec