![]() |
siderust-cpp
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) | JulianDate, MJD, UTC, Period — value types with arithmetic and UTC round-trips |
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 |
Bodies (bodies.hpp) | Star (RAII, catalog + custom), Planet (8 planets), ProperMotion, Orbit |
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 |
Ephemeris (ephemeris.hpp) | VSOP87 Sun/Earth positions, ELP2000 Moon position |
cargo) — FFI libraries are built automaticallysiderust/siderust.hpp — umbrella include for the full public APIsiderust/time.hpp — UTC, JulianDate, MJD, and Periodsiderust/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/ephemeris.hpp — VSOP87 / ELP2000 position queriesIf Doxygen is installed, CMake exposes a docs target:
Then open:
build/docs/doxygen/html/index.html