63 Body = SIDERUST_SUBJECT_KIND_T_BODY,
64 Star = SIDERUST_SUBJECT_KIND_T_STAR,
65 Icrs = SIDERUST_SUBJECT_KIND_T_ICRS,
88 siderust_subject_t s{};
89 s.
kind = SIDERUST_SUBJECT_KIND_T_BODY;
90 s.body =
static_cast<SiderustBody
>(b);
99 siderust_subject_t s{};
100 s.
kind = SIDERUST_SUBJECT_KIND_T_STAR;
101 s.star_handle =
star.c_handle();
112 siderust_subject_t s{};
113 s.
kind = SIDERUST_SUBJECT_KIND_T_ICRS;
114 s.icrs_dir = dir.
to_c();
125 siderust_subject_t s{};
126 s.
kind = SIDERUST_SUBJECT_KIND_T_GENERIC_TARGET;
127 s.generic_target_handle = tgt.
c_handle();
134 const siderust_subject_t &
c_inner()
const {
return inner_; }
137 siderust_subject_t inner_{};
138 explicit Subject(siderust_subject_t s) : inner_(s) {}
152 "altitude_at(Subject)");
153 return qtty::Radian(out);
161 qtty::Degree threshold,
163 tempoch_period_mjd_t *ptr =
nullptr;
166 threshold.value(), opts.to_c(), &ptr, &count),
167 "above_threshold(Subject)");
176 qtty::Degree threshold,
178 tempoch_period_mjd_t *ptr =
nullptr;
181 threshold.value(), opts.to_c(), &ptr, &count),
182 "below_threshold(Subject)");
192 siderust_crossing_event_t *ptr =
nullptr;
195 opts.to_c(), &ptr, &count),
196 "crossings(Subject)");
206 siderust_culmination_event_t *ptr =
nullptr;
210 "culminations(Subject)");
219 qtty::Degree min_alt, qtty::Degree max_alt,
221 tempoch_period_mjd_t *ptr =
nullptr;
224 min_alt.value(), max_alt.value(), opts.to_c(), &ptr,
226 "altitude_ranges(Subject)");
236 "azimuth_at(Subject)");
237 return qtty::Degree(out);
245 qtty::Degree bearing,
247 siderust_azimuth_crossing_event_t *ptr =
nullptr;
250 bearing.value(), opts.to_c(), &ptr, &count),
251 "azimuth_crossings(Subject)");
261 siderust_azimuth_extremum_t *ptr =
nullptr;
265 "azimuth_extrema(Subject)");
274 qtty::Degree min_deg, qtty::Degree max_deg,
276 tempoch_period_mjd_t *ptr =
nullptr;
279 min_deg.value(), max_deg.value(), opts.to_c(), &ptr,
281 "in_azimuth_range(Subject)");
Altitude computations for Sun, Moon, stars, and arbitrary ICRS directions.
Azimuth computations for Sun, Moon, stars, and arbitrary ICRS directions.
RAII Star handle, Planet value type, and catalog helpers.
Target implementation for solar-system bodies.
Fixed celestial direction target — a Target for a specific sky position.
const SiderustGenericTarget * c_handle() const
Access the underlying C handle (advanced use).
RAII handle to a Star (opaque Rust object).
Unified, lightweight handle representing any celestial subject.
const siderust_subject_t & c_inner() const
static Subject body(Body b)
Create a subject for a solar-system body.
static Subject target(const DirectionTarget< C > &tgt)
Create a subject borrowing an opaque SiderustTarget handle.
static Subject star(const siderust::Star &star)
Create a subject borrowing a Star handle.
static Subject icrs(const spherical::Direction< frames::ICRS > &dir)
Create a subject for an inline ICRS direction.
Coordinate module umbrella.
Error handling and utility base for the siderust C++ wrapper.
std::vector< AzimuthExtremum > az_extrema_from_c(siderust_azimuth_extremum_t *ptr, uintptr_t count)
std::vector< CrossingEvent > crossings_from_c(siderust_crossing_event_t *ptr, uintptr_t count)
std::vector< CulminationEvent > culminations_from_c(siderust_culmination_event_t *ptr, uintptr_t count)
std::vector< AzimuthCrossingEvent > az_crossings_from_c(siderust_azimuth_crossing_event_t *ptr, uintptr_t count)
std::vector< Period< TT, MJD > > periods_from_c(tempoch_period_mjd_t *ptr, uintptr_t count)
SubjectKind
Discriminant for the active field in a Subject.
tempoch::EncodedTime< Scale, Format > Time
void check_status(siderust_status_t status, const char *operation)
std::vector< Period< TT, MJD > > 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].
tempoch::Period< Time< Scale, Format > > Period
std::vector< CrossingEvent > 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< AzimuthCrossingEvent > 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< Period< TT, MJD > > 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].
std::vector< AzimuthExtremum > 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 > > 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< CulminationEvent > culminations(const Subject &subj, const Geodetic &obs, const Period< TT, MJD > &window, const SearchOptions &opts={})
Culmination (local extrema) events for a subject.
qtty::Degree azimuth_at(const Subject &subj, const Geodetic &obs, const Time< TT, MJD > &mjd)
Azimuth at an instant (degrees, N-clockwise) for any subject.
qtty::Radian 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 > > 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.
Body
Identifies a solar-system body for generic altitude/azimuth dispatch.
Geodetic position (WGS84 ellipsoid).
siderust_geodetic_t to_c() const
Convert to C FFI struct.
Options for altitude search algorithms.
A direction on the celestial sphere, compile-time tagged by frame.
siderust_spherical_dir_t to_c() const
Strongly-typed fixed-direction Target for any supported frame.
Public siderust time tags and typed time/period aliases.