Functions for: determining Kepler elements, nodes, apsides and orbital periods
swe_nod_aps_ut(jd_ut, ipl, iflag, method)
swe_nod_aps(jd_et, ipl, iflag, method)
swe_get_orbital_elements(jd_et, ipl, iflag)
swe_orbit_max_min_true_distance(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)
Method as integer (SE$NODBIT_MEAN=0
, SE$NODBIT_OSCUN=1
,, SE$NODBIT_OSCU_BAR=4
, SE$NODBIT_FOPOINT=256
)
ET Julian day number as double (day)
swe_nod_aps_ut
returns a list with named entries:
return
status flag as integer, xnasc
ascending nodes as numeric vector,
xndsc
descending nodes as numeric vector, xperi
perihelion as numeric vector, xaphe
aphelion as numeric vector and serr
error message as string
swe_nod_aps
returns a list with named entries:
return
status flag as integer, xnasc
ascending nodes as numeric vector,
xndsc
descending nodes as numeric vector, xperi
perihelion as numeric vector, xaphe
aphelion as numeric vector and serr
error message as string
swe_get_orbital_elements
returns a list with named entries:
return
status flag as integer, dret
function results as numeric vector and serr
error message as string
swe_orbit_max_min_true_distance
returns a list with named entries:
return
status flag as integer, dmax
maximum distance as double,
dmin
minimum distance as double, dtrue
true distance as double and serr
error message as string
Compute planetary nodes and apsides (perihelia, aphelia, second focal points of the orbital ellipses).
Compute planetary nodes and apsides (perihelia, aphelia, second focal points of the orbital ellipses).
This function calculates osculating elements (Kepler elements) and orbital periods.
This function calculates the maximum possible distance, the minimum possible distance and the current true distance of planet.
Section 5 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_nod_aps_ut(2451545,SE$MOON, SE$FLG_MOSEPH,SE$NODBIT_MEAN)
#> $return
#> [1] 0
#>
#> $xnasc
#> [1] 1.250406e+02 3.476104e-13 2.460922e-03 0.000000e+00 0.000000e+00
#> [6] 0.000000e+00
#>
#> $xndsc
#> [1] 3.050406e+02 2.439083e-13 2.671325e-03 0.000000e+00 0.000000e+00
#> [6] 0.000000e+00
#>
#> $xperi
#> [1] 83.464332724 -3.419715015 0.002428485 0.000000000 0.000000000
#> [6] 0.000000000
#>
#> $xaphe
#> [1] 2.634643e+02 3.419715e+00 2.710625e-03 0.000000e+00 0.000000e+00
#> [6] 0.000000e+00
#>
#> $serr
#> [1] ""
#>
swe_nod_aps(2451545,SE$MOON, SE$FLG_MOSEPH,SE$NODBIT_MEAN)
#> $return
#> [1] 0
#>
#> $xnasc
#> [1] 1.250407e+02 1.105681e-13 2.460922e-03 0.000000e+00 0.000000e+00
#> [6] 0.000000e+00
#>
#> $xndsc
#> [1] 3.050407e+02 -2.612689e-13 2.671325e-03 0.000000e+00 0.000000e+00
#> [6] 0.000000e+00
#>
#> $xperi
#> [1] 83.464250479 -3.419723161 0.002428485 0.000000000 0.000000000
#> [6] 0.000000000
#>
#> $xaphe
#> [1] 2.634643e+02 3.419723e+00 2.710625e-03 0.000000e+00 0.000000e+00
#> [6] 0.000000e+00
#>
#> $serr
#> [1] ""
#>
swe_get_orbital_elements(2451545,SE$MOON, SE$FLG_MOSEPH)
#> $return
#> [1] 0
#>
#> $dret
#> [1] 2.552584e-03 6.317394e-02 5.240360e+00 1.239572e+02 3.089075e+02
#> [6] 7.286466e+01 1.466895e+02 1.504159e+02 1.485766e+02 2.195542e+02
#> [11] 7.435498e-02 1.325595e+01 7.435776e-02 -2.933903e+01 2.451534e+06
#> [16] 2.391328e-03 2.713841e-03 0.000000e+00 0.000000e+00 0.000000e+00
#> [21] 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#> [26] 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#> [31] 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#> [36] 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#> [41] 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#> [46] 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
#>
#> $serr
#> [1] ""
#>
swe_orbit_max_min_true_distance(2451545,SE$MOON, SE$FLG_MOSEPH)
#> $return
#> [1] 0
#>
#> $dmax
#> [1] 0.002713841
#>
#> $dmin
#> [1] 0.002391328
#>
#> $dtrue
#> [1] 0.002690191
#>
#> $serr
#> [1] ""
#>