![]() |
siderust-cpp
Header-only C++ wrapper for siderust
|
A direction on the celestial sphere, compile-time tagged by frame. More...
#include <siderust/coordinates/spherical.hpp>
Public Member Functions | |
| Direction () | |
| Direction (qtty::Degree azimuth, qtty::Degree polar) | |
| Direction (double azimuth_deg, double polar_deg) | |
| Raw-double convenience (degrees). | |
| template<typename Target > | |
| std::enable_if_t< frames::has_frame_transform_v< F, Target >, Direction< Target > > | to_frame (const JulianDate &jd) const |
| Transform to a different reference frame. | |
| template<typename Target > | |
| auto | to (const JulianDate &jd) const -> decltype(this->template to_frame< Target >(jd)) |
Shorthand: .to<Target>(jd) (calls to_frame). | |
| template<typename F_ = F> | |
| std::enable_if_t< frames::has_horizontal_transform_v< F_ >, Direction< frames::Horizontal > > | to_horizontal (const JulianDate &jd, const Geodetic &observer) const |
| Transform to the horizontal (alt-az) frame. | |
RA / Dec (equatorial frames only) | |
| template<typename F_ = F, std::enable_if_t< frames::has_ra_dec_v< F_ >, int > = 0> | |
| qtty::Degree | ra () const |
| template<typename F_ = F, std::enable_if_t< frames::has_ra_dec_v< F_ >, int > = 0> | |
| qtty::Degree | dec () const |
Azimuth / Altitude (Horizontal frame only) | |
| template<typename F_ = F, std::enable_if_t< frames::has_az_alt_v< F_ >, int > = 0> | |
| qtty::Degree | az () const |
| template<typename F_ = F, std::enable_if_t< frames::has_az_alt_v< F_ >, int > = 0> | |
| qtty::Degree | al () const |
| template<typename F_ = F, std::enable_if_t< frames::has_az_alt_v< F_ >, int > = 0> | |
| qtty::Degree | alt () const |
| template<typename F_ = F, std::enable_if_t< frames::has_az_alt_v< F_ >, int > = 0> | |
| qtty::Degree | altitude () const |
Longitude / Latitude (lon/lat frames) | |
| template<typename F_ = F, std::enable_if_t< frames::has_lon_lat_v< F_ >, int > = 0> | |
| qtty::Degree | lon () const |
| template<typename F_ = F, std::enable_if_t< frames::has_lon_lat_v< F_ >, int > = 0> | |
| qtty::Degree | lat () const |
| template<typename F_ = F, std::enable_if_t< frames::has_lon_lat_v< F_ >, int > = 0> | |
| qtty::Degree | longitude () const |
| template<typename F_ = F, std::enable_if_t< frames::has_lon_lat_v< F_ >, int > = 0> | |
| qtty::Degree | latitude () const |
Static Public Member Functions | |
Frame info | |
| static constexpr siderust_frame_t | frame_id () |
| static constexpr const char * | frame_name () |
FFI interop | |
| siderust_spherical_dir_t | to_c () const |
| static Direction | from_c (const siderust_spherical_dir_t &c) |
A direction on the celestial sphere, compile-time tagged by frame.
Mirrors Rust's affn::spherical::Direction<F>.
| F | Reference frame tag (e.g. frames::ICRS). |
Definition at line 36 of file spherical.hpp.
|
inline |
Definition at line 44 of file spherical.hpp.
Referenced by siderust::spherical::Direction< F >::from_c().
|
inline |
Definition at line 46 of file spherical.hpp.
|
inline |
Raw-double convenience (degrees).
Definition at line 50 of file spherical.hpp.
|
inline |
Definition at line 78 of file spherical.hpp.
|
inline |
Definition at line 81 of file spherical.hpp.
|
inline |
Definition at line 84 of file spherical.hpp.
|
inline |
Definition at line 75 of file spherical.hpp.
|
inline |
Definition at line 69 of file spherical.hpp.
Referenced by main(), and spherical_direction_example().
|
inlinestaticconstexpr |
Definition at line 55 of file spherical.hpp.
Referenced by siderust::spherical::Direction< F >::to_c().
|
inlinestaticconstexpr |
Definition at line 58 of file spherical.hpp.
|
inlinestatic |
Definition at line 108 of file spherical.hpp.
References siderust::spherical::Direction< F >::Direction().
Referenced by siderust::spherical::Direction< F >::to_frame(), and siderust::spherical::Direction< F >::to_horizontal().
|
inline |
Definition at line 93 of file spherical.hpp.
|
inline |
Definition at line 99 of file spherical.hpp.
|
inline |
Definition at line 90 of file spherical.hpp.
|
inline |
Definition at line 96 of file spherical.hpp.
|
inline |
Definition at line 66 of file spherical.hpp.
Referenced by main(), and spherical_direction_example().
|
inline |
Shorthand: .to<Target>(jd) (calls to_frame).
Definition at line 145 of file spherical.hpp.
Referenced by main(), and spherical_direction_example().
|
inline |
Definition at line 104 of file spherical.hpp.
References siderust::spherical::Direction< F >::frame_id().
Referenced by siderust::icrs_altitude::altitude_at().
|
inline |
Transform to a different reference frame.
Only enabled for frame pairs with a FrameRotationProvider in the FFI. Attempting an unsupported transform is a compile-time error.
| Target | Destination frame tag. |
Definition at line 125 of file spherical.hpp.
References siderust::check_status(), and siderust::spherical::Direction< F >::from_c().
Referenced by main().
|
inline |
Transform to the horizontal (alt-az) frame.
Definition at line 157 of file spherical.hpp.
References siderust::check_status(), siderust::spherical::Direction< F >::from_c(), and siderust::Geodetic::to_c().
Referenced by main(), and spherical_direction_example().