48 Sun = SIDERUST_BODY_SUN,
49 Moon = SIDERUST_BODY_MOON,
50 Mercury = SIDERUST_BODY_MERCURY,
51 Venus = SIDERUST_BODY_VENUS,
52 Mars = SIDERUST_BODY_MARS,
53 Jupiter = SIDERUST_BODY_JUPITER,
54 Saturn = SIDERUST_BODY_SATURN,
55 Uranus = SIDERUST_BODY_URANUS,
56 Neptune = SIDERUST_BODY_NEPTUNE,
71 obs.
to_c(), mjd.value(), &out),
73 return qtty::Radian(out);
81 qtty::Degree threshold,
83 tempoch_period_mjd_t *ptr =
nullptr;
86 obs.
to_c(), window.c_inner(), threshold.value(),
87 opts.to_c(), &ptr, &count),
88 "body::above_threshold");
97 qtty::Degree threshold,
99 tempoch_period_mjd_t *ptr =
nullptr;
102 obs.
to_c(), window.c_inner(), threshold.value(),
103 opts.to_c(), &ptr, &count),
104 "body::below_threshold");
114 siderust_crossing_event_t *ptr =
nullptr;
117 obs.
to_c(), window.c_inner(), threshold.value(), opts.to_c(),
129 siderust_culmination_event_t *ptr =
nullptr;
132 obs.
to_c(), window.c_inner(), opts.to_c(), &ptr, &count),
133 "body::culminations");
142 qtty::Degree min_alt, qtty::Degree max_alt,
144 tempoch_period_mjd_t *ptr =
nullptr;
147 obs.
to_c(), window.c_inner(), min_alt.value(),
148 max_alt.value(), opts.to_c(), &ptr, &count),
149 "body::altitude_ranges");
165 obs.
to_c(), mjd.value(), &out),
167 return qtty::Radian(out);
175 qtty::Degree bearing,
177 siderust_azimuth_crossing_event_t *ptr =
nullptr;
180 obs.
to_c(), window.c_inner(), bearing.value(),
181 opts.to_c(), &ptr, &count),
182 "body::azimuth_crossings");
192 siderust_azimuth_extremum_t *ptr =
nullptr;
195 obs.
to_c(), window.c_inner(), opts.to_c(), &ptr, &count),
196 "body::azimuth_extrema");
205 qtty::Degree min, qtty::Degree max,
207 tempoch_period_mjd_t *ptr =
nullptr;
210 obs.
to_c(), window.c_inner(), min.value(), max.value(),
211 opts.to_c(), &ptr, &count),
212 "body::in_azimuth_range");
247 std::string
name()
const override {
268 return "Unknown Body";
278 return qtty::Degree(rad.value() * 180.0 / 3.14159265358979323846);
282 qtty::Degree threshold,
288 qtty::Degree threshold,
294 qtty::Degree threshold,
310 return qtty::Degree(rad.value() * 180.0 / 3.14159265358979323846);
313 std::vector<AzimuthCrossingEvent>
Altitude computations for Sun, Moon, stars, and arbitrary ICRS directions.
Azimuth computations for Sun, Moon, stars, and arbitrary ICRS directions.
Target implementation for solar-system bodies.
std::vector< Period< TT, MJD > > below_threshold(const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree threshold, const SearchOptions &opts={}) const override
Find periods when the object is below a threshold altitude.
qtty::Degree altitude_at(const Geodetic &obs, const Time< TT, MJD > &mjd) const override
Compute altitude (degrees) at a given Time<TT, MJD> instant.
std::vector< Period< TT, MJD > > above_threshold(const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree threshold, const SearchOptions &opts={}) const override
Find periods when the object is above a threshold altitude.
std::vector< CrossingEvent > crossings(const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree threshold, const SearchOptions &opts={}) const override
Find threshold-crossing events (rising / setting).
std::vector< AzimuthCrossingEvent > azimuth_crossings(const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree bearing, const SearchOptions &opts={}) const override
Find epochs when the object crosses a given azimuth bearing.
Body body() const
Access the underlying Body enum value.
std::vector< CulminationEvent > culminations(const Geodetic &obs, const Period< TT, MJD > &window, const SearchOptions &opts={}) const override
Find culmination (local altitude extremum) events.
BodyTarget(Body body)
Construct a BodyTarget for a given solar-system body.
qtty::Degree azimuth_at(const Geodetic &obs, const Time< TT, MJD > &mjd) const override
Compute azimuth (degrees, N-clockwise) at a given Time<TT, MJD> instant.
std::string name() const override
Returns the body's conventional name ("Sun", "Moon", "Mars", …).
Abstract base for any celestial object that can be tracked from an observer location.
Error handling and utility base for the siderust C++ wrapper.
std::vector< Period< TT, MJD > > below_threshold(Body b, const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree threshold, const SearchOptions &opts={})
Find periods when a body is below a threshold altitude.
std::vector< Period< TT, MJD > > altitude_ranges(Body b, const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree min_alt, qtty::Degree max_alt, const SearchOptions &opts={})
Find periods when a body's altitude is within [min, max].
std::vector< Period< TT, MJD > > in_azimuth_range(Body b, const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree min, qtty::Degree max, const SearchOptions &opts={})
Find periods when a body's azimuth is within [min, max].
qtty::Radian altitude_at(Body b, const Geodetic &obs, const Time< TT, MJD > &mjd)
Compute a body's altitude (radians) at a given Time<TT, MJD> instant.
std::vector< Period< TT, MJD > > above_threshold(Body b, const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree threshold, const SearchOptions &opts={})
Find periods when a body is above a threshold altitude.
qtty::Radian azimuth_at(Body b, const Geodetic &obs, const Time< TT, MJD > &mjd)
Compute a body's azimuth (radians) at a given Time<TT, MJD> instant.
std::vector< CrossingEvent > crossings(Body b, const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree threshold, const SearchOptions &opts={})
Find threshold-crossing events for a body.
std::vector< AzimuthExtremum > azimuth_extrema(Body b, const Geodetic &obs, const Period< TT, MJD > &window, const SearchOptions &opts={})
Find azimuth extrema (northernmost/southernmost bearing) for a body.
std::vector< AzimuthCrossingEvent > azimuth_crossings(Body b, const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree bearing, const SearchOptions &opts={})
Find azimuth-bearing crossing events for a body.
std::vector< CulminationEvent > culminations(Body b, const Geodetic &obs, const Period< TT, MJD > &window, const SearchOptions &opts={})
Find culmination events for a body.
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)
siderust_subject_t make_body_subject(SiderustBody b)
Build a siderust_subject_t for a solar-system body.
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)
tempoch::EncodedTime< Scale, Format > Time
void check_status(siderust_status_t status, const char *operation)
tempoch::Period< Time< Scale, Format > > Period
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.
Abstract base class for all celestial targets.