Skip to main content

siderust-cpp

Actiu

Header-only C++17 wrapper for the Siderust astronomical computation library: ephemeris, coordinates, altitude events, and observatory support.

2 estrelles
0 forks
C++
AGPL-3.0
Actualitzat avui

Per què existeix

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.

Funcionalitats clau

  • 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

Primers passos

// 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));

Contribuir

Donem la benvinguda a les contribucions! Aquí tens com pots ajudar:

  • 1 Fes un fork del repositori i crea la teva branca des de main
  • 2 Fes els teus canvis i afegeix tests si s'escau
  • 3 Assegura't que tots els tests passen amb cargo test
  • 4 Envia un pull request amb una descripció clara

Llicència

Aquest projecte està llicenciat sota la llicència AGPL-3.0. Consulta el fitxer LICENSE per a més detalls.

Etiquetes

cpp c++17 astronomy ffi bindings