siderust-cpp 0.8.0
Header-only C++ wrapper for siderust
Loading...
Searching...
No Matches
siderust::BodyTarget Class Reference

Target implementation for solar-system bodies. More...

#include <siderust/body_target.hpp>

Inheritance diagram for siderust::BodyTarget:
Collaboration diagram for siderust::BodyTarget:

Public Member Functions

 BodyTarget (Body body)
 Construct a BodyTarget for a given solar-system body.
 
std::string name () const override
 Returns the body's conventional name ("Sun", "Moon", "Mars", …).
 
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< 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.
 
std::vector< CrossingEventcrossings (const Geodetic &obs, const Period< TT, MJD > &window, qtty::Degree threshold, const SearchOptions &opts={}) const override
 Find threshold-crossing events (rising / setting).
 
std::vector< CulminationEventculminations (const Geodetic &obs, const Period< TT, MJD > &window, const SearchOptions &opts={}) const override
 Find culmination (local altitude extremum) events.
 
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::vector< AzimuthCrossingEventazimuth_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.
 
- Public Member Functions inherited from siderust::Target
virtual ~Target ()=default
 
 Target ()=default
 
 Target (const Target &)=delete
 
Targetoperator= (const Target &)=delete
 
 Target (Target &&)=default
 
Targetoperator= (Target &&)=default
 

Detailed Description

Target implementation for solar-system bodies.

Wraps a Body enum value and dispatches all altitude/azimuth queries through the FFI siderust_body_* functions.

BodyTarget is lightweight (holds a single enum value), copyable, and can be used directly or stored as std::unique_ptr<Target> for polymorphic dispatch.

Examples
05_target_tracking.cpp.

Definition at line 232 of file body_target.hpp.

Constructor & Destructor Documentation

◆ BodyTarget()

siderust::BodyTarget::BodyTarget ( Body  body)
inlineexplicit

Construct a BodyTarget for a given solar-system body.

Parameters
bodyThe body to track.

Definition at line 238 of file body_target.hpp.

Member Function Documentation

◆ above_threshold()

std::vector< Period< TT, MJD > > siderust::BodyTarget::above_threshold ( const Geodetic obs,
const Period< TT, MJD > &  window,
qtty::Degree  threshold,
const SearchOptions opts = {} 
) const
inlineoverridevirtual

Find periods when the object is above a threshold altitude.

Implements siderust::Target.

Definition at line 281 of file body_target.hpp.

◆ altitude_at()

qtty::Degree siderust::BodyTarget::altitude_at ( const Geodetic obs,
const Time< TT, MJD > &  mjd 
) const
inlineoverridevirtual

Compute altitude (degrees) at a given Time<TT, MJD> instant.

Implements siderust::Target.

Definition at line 276 of file body_target.hpp.

References siderust::body::altitude_at().

◆ azimuth_at()

qtty::Degree siderust::BodyTarget::azimuth_at ( const Geodetic obs,
const Time< TT, MJD > &  mjd 
) const
inlineoverridevirtual

Compute azimuth (degrees, N-clockwise) at a given Time<TT, MJD> instant.

Implements siderust::Target.

Definition at line 308 of file body_target.hpp.

References siderust::body::azimuth_at().

◆ azimuth_crossings()

std::vector< AzimuthCrossingEvent > siderust::BodyTarget::azimuth_crossings ( const Geodetic obs,
const Period< TT, MJD > &  window,
qtty::Degree  bearing,
const SearchOptions opts = {} 
) const
inlineoverridevirtual

Find epochs when the object crosses a given azimuth bearing.

Implements siderust::Target.

Definition at line 314 of file body_target.hpp.

◆ below_threshold()

std::vector< Period< TT, MJD > > siderust::BodyTarget::below_threshold ( const Geodetic obs,
const Period< TT, MJD > &  window,
qtty::Degree  threshold,
const SearchOptions opts = {} 
) const
inlineoverridevirtual

Find periods when the object is below a threshold altitude.

Implements siderust::Target.

Definition at line 287 of file body_target.hpp.

◆ body()

Body siderust::BodyTarget::body ( ) const
inline

Access the underlying Body enum value.

Definition at line 320 of file body_target.hpp.

◆ crossings()

std::vector< CrossingEvent > siderust::BodyTarget::crossings ( const Geodetic obs,
const Period< TT, MJD > &  window,
qtty::Degree  threshold,
const SearchOptions opts = {} 
) const
inlineoverridevirtual

Find threshold-crossing events (rising / setting).

Implements siderust::Target.

Definition at line 293 of file body_target.hpp.

◆ culminations()

std::vector< CulminationEvent > siderust::BodyTarget::culminations ( const Geodetic obs,
const Period< TT, MJD > &  window,
const SearchOptions opts = {} 
) const
inlineoverridevirtual

Find culmination (local altitude extremum) events.

Implements siderust::Target.

Definition at line 299 of file body_target.hpp.

◆ name()

std::string siderust::BodyTarget::name ( ) const
inlineoverridevirtual

Returns the body's conventional name ("Sun", "Moon", "Mars", …).

Implements siderust::Target.

Definition at line 247 of file body_target.hpp.

References siderust::Jupiter, siderust::Mars, siderust::Mercury, siderust::Moon, siderust::Neptune, siderust::Saturn, siderust::Sun, siderust::Uranus, and siderust::Venus.


The documentation for this class was generated from the following file: