siderust-cpp
Header-only C++ wrapper for siderust
Loading...
Searching...
No Matches
siderust::spherical::Position< C, F, U > Struct Template Reference

A spherical position (direction + distance), compile-time tagged. More...

#include <siderust/coordinates/spherical.hpp>

Public Member Functions

 Position ()
 
 Position (qtty::Degree azimuth, qtty::Degree polar, U dist)
 
 Position (double azimuth_deg, double polar_deg, double dist_val)
 
Direction< F > direction () const
 Extract the direction component.
 
distance () const
 
Component accessors by frame convention
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
 
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_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
 

Static Public Member Functions

static constexpr siderust_frame_t frame_id ()
 
static constexpr siderust_center_t center_id ()
 

Detailed Description

template<typename C, typename F, typename U = qtty::Meter>
struct siderust::spherical::Position< C, F, U >

A spherical position (direction + distance), compile-time tagged.

Mirrors Rust's affn::spherical::Position<C, F, U>.

Template Parameters
CReference center tag (e.g. centers::Barycentric).
FReference frame tag (e.g. frames::ICRS).
UDistance unit (default: qtty::Meter).
Examples
coordinate_systems_example.cpp, and coordinates_examples.cpp.

Definition at line 180 of file spherical.hpp.

Constructor & Destructor Documentation

◆ Position() [1/3]

template<typename C , typename F , typename U = qtty::Meter>
siderust::spherical::Position< C, F, U >::Position ( )
inline

Definition at line 190 of file spherical.hpp.

◆ Position() [2/3]

template<typename C , typename F , typename U = qtty::Meter>
siderust::spherical::Position< C, F, U >::Position ( qtty::Degree  azimuth,
qtty::Degree  polar,
dist 
)
inline

Definition at line 193 of file spherical.hpp.

◆ Position() [3/3]

template<typename C , typename F , typename U = qtty::Meter>
siderust::spherical::Position< C, F, U >::Position ( double  azimuth_deg,
double  polar_deg,
double  dist_val 
)
inline

Definition at line 196 of file spherical.hpp.

Member Function Documentation

◆ al()

template<typename C , typename F , typename U = qtty::Meter>
template<typename F_ = F, std::enable_if_t< frames::has_az_alt_v< F_ >, int > = 0>
qtty::Degree siderust::spherical::Position< C, F, U >::al ( ) const
inline

Definition at line 218 of file spherical.hpp.

◆ alt()

template<typename C , typename F , typename U = qtty::Meter>
template<typename F_ = F, std::enable_if_t< frames::has_az_alt_v< F_ >, int > = 0>
qtty::Degree siderust::spherical::Position< C, F, U >::alt ( ) const
inline

Definition at line 221 of file spherical.hpp.

◆ az()

template<typename C , typename F , typename U = qtty::Meter>
template<typename F_ = F, std::enable_if_t< frames::has_az_alt_v< F_ >, int > = 0>
qtty::Degree siderust::spherical::Position< C, F, U >::az ( ) const
inline

Definition at line 215 of file spherical.hpp.

◆ center_id()

template<typename C , typename F , typename U = qtty::Meter>
static constexpr siderust_center_t siderust::spherical::Position< C, F, U >::center_id ( )
inlinestaticconstexpr

Definition at line 231 of file spherical.hpp.

◆ dec()

template<typename C , typename F , typename U = qtty::Meter>
template<typename F_ = F, std::enable_if_t< frames::has_ra_dec_v< F_ >, int > = 0>
qtty::Degree siderust::spherical::Position< C, F, U >::dec ( ) const
inline
Examples
coordinate_systems_example.cpp.

Definition at line 212 of file spherical.hpp.

Referenced by main(), and spherical_position_example().

◆ direction()

template<typename C , typename F , typename U = qtty::Meter>
Direction< F > siderust::spherical::Position< C, F, U >::direction ( ) const
inline

Extract the direction component.

Examples
coordinate_systems_example.cpp.

Definition at line 202 of file spherical.hpp.

Referenced by main(), and spherical_position_example().

◆ distance()

template<typename C , typename F , typename U = qtty::Meter>
U siderust::spherical::Position< C, F, U >::distance ( ) const
inline
Examples
coordinate_systems_example.cpp.

Definition at line 233 of file spherical.hpp.

Referenced by main(), and spherical_position_example().

◆ frame_id()

template<typename C , typename F , typename U = qtty::Meter>
static constexpr siderust_frame_t siderust::spherical::Position< C, F, U >::frame_id ( )
inlinestaticconstexpr

Definition at line 230 of file spherical.hpp.

◆ lat()

template<typename C , typename F , typename U = qtty::Meter>
template<typename F_ = F, std::enable_if_t< frames::has_lon_lat_v< F_ >, int > = 0>
qtty::Degree siderust::spherical::Position< C, F, U >::lat ( ) const
inline

Definition at line 227 of file spherical.hpp.

◆ lon()

template<typename C , typename F , typename U = qtty::Meter>
template<typename F_ = F, std::enable_if_t< frames::has_lon_lat_v< F_ >, int > = 0>
qtty::Degree siderust::spherical::Position< C, F, U >::lon ( ) const
inline

Definition at line 224 of file spherical.hpp.

◆ ra()

template<typename C , typename F , typename U = qtty::Meter>
template<typename F_ = F, std::enable_if_t< frames::has_ra_dec_v< F_ >, int > = 0>
qtty::Degree siderust::spherical::Position< C, F, U >::ra ( ) const
inline
Examples
coordinate_systems_example.cpp.

Definition at line 209 of file spherical.hpp.

Referenced by main(), and spherical_position_example().


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