![]() |
siderust-cpp 0.8.0
Header-only C++ wrapper for siderust
|
siderust-cpp is a modern, header-only C++17 wrapper for siderust — a high-precision astronomical computation engine written in Rust.
It exposes idiomatic C++ types (RAII, value semantics, std::exception hierarchy) on top of the C FFI layer produced by siderust-ffi and tempoch-ffi, so you can use the full power of siderust from any C++17 codebase without writing a single line of Rust.
| Module | What you get |
|---|---|
Time (time.hpp) | UTC, CivilTime, TT-default JulianDate / MJD / Period, plus explicit Time<scale::S> and TimeContext |
Coordinates (coordinates.hpp) | Modular typed API (coordinates/{geodetic,spherical,cartesian,types}.hpp) plus selective alias headers under coordinates/types/{spherical,cartesian}/... |
Frames & Centers (frames.hpp, centers.hpp) | Compile-time frame/center tags, FrameTraits/CenterTraits, transform concept checks |
Orbits (orbit.hpp) | KeplerianOrbit, MeanMotionOrbit, ConicOrbit, PreparedOrbit, plus compatibility alias Orbit |
Bodies (bodies.hpp) | Star (RAII, catalog + custom), Planet (8 planets), ProperMotion, planet orbit data |
Observatories (observatories.hpp) | Named sites: Roque de los Muchachos, Paranal, Mauna Kea, La Silla |
Altitude (altitude.hpp) | Sun / Moon / Star / ICRS altitude: instant, above/below threshold, crossings, culminations |
Azimuth (azimuth.hpp) | Sun / Moon / Star / ICRS azimuth: instant, crossings, extrema, range windows |
Targets (trackable.hpp, target.hpp, body_target.hpp, star_target.hpp) | Polymorphic target tracking across bodies, stars, and fixed ICRS directions |
Lunar Phase (lunar_phase.hpp) | Moon phase geometry, labels, principal phase events, illumination windows |
Ephemeris (ephemeris.hpp) | VSOP87 Sun/Earth positions, ELP2000 Moon position |
Altitude searches use Siderust's internal optimized engines automatically. The only user-facing control is time tolerance:
cargo) — FFI libraries are built automaticallysiderust/siderust.hpp — umbrella include for the full public APIsiderust/time.hpp — UTC, CivilTime, TT-default JulianDate / MJD / Period, explicit Time<scale::S>, and TimeContextJulianDate, MJD, and Period, all pinned to TT.JulianDate::from_utc(...) and MJD::from_utc(...).Time<scale::S> and named aliases such as UT1JulianDate.siderust/coordinates.hpp — modular coordinate API (coordinates/geodetic.hpp, coordinates/spherical.hpp, coordinates/cartesian.hpp, coordinates/types.hpp)siderust/frames.hpp — compile-time frame tags and transform traitssiderust/centers.hpp — compile-time center tags and center-shift traitssiderust/bodies.hpp — Star, Planet, and orbital / proper-motion typessiderust/observatories.hpp — known observatory locations and custom geodetic pointssiderust/altitude.hpp — Sun / Moon / Star altitude queries and event searchsiderust/azimuth.hpp — azimuth queries, crossings, extrema, and azimuth rangessiderust/trackable.hpp, siderust/target.hpp, siderust/body_target.hpp, siderust/star_target.hpp — target abstractions and polymorphic trackingsiderust/lunar_phase.hpp — moon phase geometry, labels, phase events, illumination windowssiderust/ephemeris.hpp — VSOP87 / ELP2000 position queriesIf Doxygen is installed, CMake exposes a docs target:
Then open:
build/docs/doxygen/html/index.html