R/sun_longitude.R

Defines functions sun_longitude

Documented in sun_longitude

# ---------------------------------------------------------------------------- #
#' sun_longitude
#'
#' @description Get Solar longitude for a given Julian day number.
#'
#' @param jd Julian day
#'
#' @return Solar longitude for \code{jd}
#'
#' @examples
#' sun_longitude(2459778)
#' sun_longitude(2459500)
sun_longitude <- function(jd){
  return (swephR::swe_calc_ut(jd, swephR::SE$SUN, swephR::SE$FLG_SWIEPH)$xx[1])
}
# ---------------------------------------------------------------------------- #

Try the VedicDateTime package in your browser

Any scripts or data that you put into this service are public.

VedicDateTime documentation built on Sept. 20, 2023, 9:08 a.m.