Expand description
Raw FFI bindings to the Swiss Ephemeris C library.
The C sources (v2.10.03, pinned in vendor/UPSTREAM_COMMIT) are vendored
and compiled by build.rs with TLSOFF, so the library keeps one
process-wide state (ephemeris path, open file handles, caches) shared by
all threads. The Swiss Ephemeris is not thread-safe: callers must
serialize every call into this crate. The companion sweph crate does
that behind a mutex and is the recommended entry point; use these raw
bindings directly only if you provide equivalent locking.
Swiss Ephemeris is © Astrodienst AG, dual-licensed AGPL-3.0 or the Swiss Ephemeris Professional License. This crate is distributed under AGPL-3.0.
Constants§
- SEFLG_
ASTROMETRIC - SEFLG_
BARYCTR - SEFLG_
EPHMASK - Mask of the ephemeris-source bits.
swe_calc_utreturns the flags it actually used — compare against this mask to detect a silent fallback (e.g. Swiss requested, Moshier substituted because data files are absent). - SEFLG_
EQUATORIAL - SEFLG_
HELCTR - SEFLG_
J2000 - SEFLG_
JPLEPH - SEFLG_
MOSEPH - SEFLG_
NOABERR - SEFLG_
NOGDEFL - SEFLG_
NONUT - SEFLG_
RADIANS - SEFLG_
SIDEREAL - SEFLG_
SPEED - SEFLG_
SPEE D3 - SEFLG_
SWIEPH - SEFLG_
TOPOCTR - SEFLG_
TRUEPOS - SEFLG_
XYZ - SE_
AST_ OFFSET - Add a minor-planet catalogue number to this offset to address any
numbered asteroid (requires the corresponding
se*.se1asteroid file). - SE_
CERES - SE_
CHIRON - SE_
EARTH - SE_
ECL_ ANNULAR - SE_
ECL_ ANNULAR_ TOTAL - SE_
ECL_ CENTRAL - SE_
ECL_ NONCENTRAL - SE_
ECL_ PARTIAL - SE_
ECL_ PENUMBRAL - SE_
ECL_ TOTAL - SE_
GREG_ CAL - SE_
JUL_ CAL - SE_JUNO
- SE_
JUPITER - SE_MARS
- SE_
MAX_ STNAME - Size the C API requires for
serrerror-message buffers (AS_MAXCH). - SE_
MEAN_ APOG - SE_
MEAN_ NODE - SE_
MERCURY - SE_MOON
- SE_
NEPTUNE - SE_
OSCU_ APOG - SE_
PALLAS - SE_
PHOLUS - SE_
PLUTO - SE_
SATURN - SE_
SIDM_ DELUCE - SE_
SIDM_ FAGAN_ BRADLEY - SE_
SIDM_ KRISHNAMURTI - SE_
SIDM_ LAHIRI - SE_
SIDM_ RAMAN - SE_SUN
- SE_
TRUE_ NODE - SE_
URANUS - SE_
VENUS - SE_
VESTA