![]() |
siderust-cpp 0.8.0
Header-only C++ wrapper for siderust
|
Unified Subject type — one value to represent any celestial entity. More...
#include "altitude.hpp"#include "azimuth.hpp"#include "bodies.hpp"#include "body_target.hpp"#include "coordinates.hpp"#include "ffi_core.hpp"#include "target.hpp"#include "time.hpp"#include <vector>

Go to the source code of this file.
Classes | |
| class | siderust::Subject |
| Unified, lightweight handle representing any celestial subject. More... | |
Namespaces | |
| namespace | siderust |
Enumerations | |
| enum class | siderust::SubjectKind : int32_t { siderust::Body = SIDERUST_SUBJECT_KIND_T_BODY , siderust::Star = SIDERUST_SUBJECT_KIND_T_STAR , siderust::Icrs = SIDERUST_SUBJECT_KIND_T_ICRS , siderust::GenericTarget = SIDERUST_SUBJECT_KIND_T_GENERIC_TARGET } |
| Discriminant for the active field in a Subject. More... | |
Functions | |
| qtty::Radian | siderust::altitude_at (const Subject &subj, const Geodetic &obs, const Time< TT, MJD > &mjd) |
| Altitude at an instant (radians) for any subject. | |
| std::vector< Period< TT, MJD > > | siderust::above_threshold (const Subject &subj, const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree threshold, const SearchOptions &opts={}) |
| Periods when a subject is above a threshold altitude. | |
| std::vector< Period< TT, MJD > > | siderust::below_threshold (const Subject &subj, const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree threshold, const SearchOptions &opts={}) |
| Periods when a subject is below a threshold altitude. | |
| std::vector< CrossingEvent > | siderust::crossings (const Subject &subj, const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree threshold, const SearchOptions &opts={}) |
| Threshold-crossing events for a subject. | |
| std::vector< CulminationEvent > | siderust::culminations (const Subject &subj, const Geodetic &obs, const Period< TT, MJD > &window, const SearchOptions &opts={}) |
| Culmination (local extrema) events for a subject. | |
| std::vector< Period< TT, MJD > > | siderust::altitude_ranges (const Subject &subj, const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree min_alt, qtty::Degree max_alt, const SearchOptions &opts={}) |
| Periods when a subject's altitude is within [min, max]. | |
| qtty::Degree | siderust::azimuth_at (const Subject &subj, const Geodetic &obs, const Time< TT, MJD > &mjd) |
| Azimuth at an instant (degrees, N-clockwise) for any subject. | |
| std::vector< AzimuthCrossingEvent > | siderust::azimuth_crossings (const Subject &subj, const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree bearing, const SearchOptions &opts={}) |
| Azimuth bearing-crossing events for a subject. | |
| std::vector< AzimuthExtremum > | siderust::azimuth_extrema (const Subject &subj, const Geodetic &obs, const Period< TT, MJD > &window, const SearchOptions &opts={}) |
| Azimuth extrema (northernmost / southernmost) for a subject. | |
| std::vector< Period< TT, MJD > > | siderust::in_azimuth_range (const Subject &subj, const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree min_deg, qtty::Degree max_deg, const SearchOptions &opts={}) |
| Periods when a subject's azimuth is within [min_deg, max_deg]. | |
Unified Subject type — one value to represent any celestial entity.
Subject is a lightweight tagged value (akin to std::variant) that wraps the FFI siderust_subject_t struct. It can carry:
| Kind | Data |
|---|---|
Body | siderust::Body discriminant |
Star | borrows an existing siderust::Star |
Icrs | inline spherical::Direction<frames::ICRS> |
Target | borrows an existing DirectionTarget<…> |
All unified functions (altitude_at, above_threshold, …) accept a Subject so the caller no longer needs separate sun::, moon::, body::, star::, icrs::, and target-specific calls.
Lifetime: when constructing from Star or DirectionTarget, the Subject borrows the handle — the original object must outlive it.
Definition in file subject.hpp.