Computing positions of planets, asteroids, lunar nodes and apogees using Swiss Ephemeris.
swe_calc_ut(jd_ut, ipl, iflag)
swe_calc(jd_et, ipl, iflag)
UT Julian day number as double (day)
Body/planet as integer (SE$SUN=0, SE$Moon=1, ... SE$PLUTO=9)
Computation flag as integer, many options possible (section 2.3.1)
ET Julian day number as double (day)
swe_calc_ut
returns a list with named entries: return
status flag as integer,
xx
information on planet position, and serr
error message as string.
swe_calc
returns a list with named entries: return
status flag as integer,
xx
updated star name as string and serr
error message as string.
It compute positions using UT.
It compute positions using ET.
Section 2 in http://www.astro.com/swisseph/swephprg.htm. Remember that array indices start in R at 1, while in C they start at 0!
data(SE)
swe_calc_ut(2458346.82639, SE$MOON, SE$FLG_MOSEPH)
#> $return
#> [1] 4
#>
#> $xx
#> [1] 2.094039e+02 5.238765e+00 2.547673e-03 0.000000e+00 0.000000e+00
#> [6] 0.000000e+00
#>
#> $serr
#> [1] ""
#>
swe_calc(2458346.82639, SE$MOON, SE$FLG_MOSEPH)
#> $return
#> [1] 4
#>
#> $xx
#> [1] 209.39320561 5.23865656 0.00254764 0.00000000 0.00000000
#> [6] 0.00000000
#>
#> $serr
#> [1] ""
#>