siderust-cpp
ActiveHeader-only C++17 wrapper for the Siderust astronomical computation library: ephemeris, coordinates, altitude events, and observatory support.
0 stars
0 forks
C++
AGPL-3.0
Updated today
Why it exists
siderust-cpp brings the full power of Siderust to C++ projects via an idiomatic, header-only wrapper over the Rust FFI layer. It provides RAII types, value semantics, and exception-based error handling for time, coordinates, celestial bodies, and altitude computations.
Key Features
- VSOP87 & ELP2000 ephemeris (Sun, Moon, planets)
- Typed coordinate systems (geodetic, spherical, Cartesian)
- Sun/Moon/Star altitude, crossings, and culminations
- Built-in named observatories (Paranal, Mauna Kea, …)
- CMake integration with automatic Rust FFI build
Getting Started
// CMakeLists.txt
find_package(siderust_cpp REQUIRED)
target_link_libraries(myapp PRIVATE siderust::siderust_cpp)
// main.cpp
#include <siderust/siderust.hpp>
using namespace siderust;
auto obs = ROQUE_DE_LOS_MUCHACHOS;
auto jd = JulianDate::from_utc({2026, 7, 15, 22, 0, 0});
auto alt = sun::altitude_at(obs, MJD::from_jd(jd)); Contributing
We welcome contributions! Here's how you can help:
- 1 Fork the repository and create your branch from
main - 2 Make your changes and add tests if applicable
- 3 Ensure all tests pass with
cargo test - 4 Submit a pull request with a clear description
License
This project is licensed under the AGPL-3.0 license. See the LICENSE file for details.
Quick Links
Tags
cpp c++17 astronomy ffi bindings